Corrected the "insert_layer.py" routine, which was missing a space
and did not account for files which might have no "labels" section,
and enhanced the script to accept any coordinate list with a length
that is a multiple of four. Used this script in the gf180mcu
Makefile to add the isolated substrate layer into the corner I/O
cell that needs it to extract correctly.
diff --git a/VERSION b/VERSION
index dfa6bf0..5414b84 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.430
+1.0.431
diff --git a/common/insert_layer.py b/common/insert_layer.py
index af4623e..a993882 100755
--- a/common/insert_layer.py
+++ b/common/insert_layer.py
@@ -6,6 +6,10 @@
# The layer is added to the layout in both the mag/ (full) and maglef/
# (abstract) directories. Option "-maglef" or "-mag" will restrict the
# use to only the view indicated by the option.
+#
+# Extended 7/30/2023 to allow multiple rectangles to be specified by
+# allowing any multiple of four coordinates. So eight coordinates will
+# generate two "rect" lines, for example.
#
# e.g.:
#
@@ -23,6 +27,7 @@
layerrex = re.compile('<< ' + layer + ' >>')
sectionrex = re.compile('<< ')
labelsrex = re.compile('<< labels >>')
+ propsrex = re.compile('<< properties >>')
endrex = re.compile('<< end >>')
in_layer = False
@@ -33,19 +38,22 @@
if not done and not in_layer:
# Handle case in which layer did not already exist in file
lmatch = labelsrex.match(line)
+ pmatch = propsrex.match(line)
ematch = endrex.match(line)
- if lmatch or ematch:
- print('<< ' + layer + '>>', file=ofile)
- print('rect ' + geometry, file=ofile)
+ if lmatch or pmatch or ematch:
+ print('<< ' + layer + ' >>', file=ofile)
+ for coords in zip(*[iter(geometry.split())]*4):
+ print('rect ' + ' '.join(coords), file=ofile)
done = True
lmatch = layerrex.match(line)
- if lmatch:
+ if lmatch or pmatch:
in_layer = True
elif in_layer:
smatch = sectionrex.match(line)
if smatch:
- print('rect ' + geometry, file=ofile)
+ for coords in zip(*[iter(geometry.split())]*4):
+ print('rect ' + ' '.join(coords), file=ofile)
in_layer = False
done = True
@@ -63,13 +71,13 @@
options = []
arguments = []
for item in sys.argv[1:]:
- if item.find('-', 0) == 0:
+ if item.find('-', 0) == 0 and len(item) > 1 and item[1].isalpha():
options.append(item)
else:
arguments.append(item)
if len(arguments) < 5:
- print("Not enough options given to insert_layer.py.")
+ print("Not enough arguments given to insert_layer.py.")
usage()
sys.exit(0)
diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in
index 87afbde..289e5b7 100644
--- a/gf180mcu/Makefile.in
+++ b/gf180mcu/Makefile.in
@@ -431,6 +431,7 @@
# The script(s) below are used for custom changes to the vendor PDK files
PORTORDER = ../common/port_order.py ${EF_FORMAT}
ADDPROP = ../common/insert_property.py ${EF_FORMAT}
+ADDLAYER = ../common/insert_layer.py ${EF_FORMAT}
REMOVELAB = ../common/remove_label.py ${EF_FORMAT}
# List the EDA tools to install local setup files for
@@ -1177,6 +1178,10 @@
filter=custom/scripts/fix_io_lef.py \
-verilog cells/*/*.v compile-only \
-library general gf180mcu_fd_io 2>&1 | tee -a ${GF180MCU$*}_make.log
+ # Quick solution to extraction issue---add the isolated substrate layer
+ # in the corner clamp cell that contains the devices being isolated.
+ ${ADDLAYER} ${STAGING_PATH}/${GF180MCU$*} gf180mcu_fd_io ESD_CLAMP_COR \
+ isosubstrate "-42 43458 56113 57130 40932 43016 57057 55812" -mag
sram-%:
# Install SRAM macros from vendor files