Added layouts for the four cells in the HD library that have DRC errors and will
not show DRC clean when used in a design. The buf_16 cell is the most important
one because the others are unlikely to get used. Also reworked the "exclude"
option on foundry_install.py so that it can be used to substitute in alternative
cells for processing, like is being done with the abovementioned cell layouts.
Also added an "include" option that is similar to "exclude"; it is not currently
being used.
diff --git a/VERSION b/VERSION
index 754b84e..82bf676 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.0.179
+1.0.180
diff --git a/common/foundry_install.py b/common/foundry_install.py
index 42846c3..1448d55 100755
--- a/common/foundry_install.py
+++ b/common/foundry_install.py
@@ -95,6 +95,11 @@
# exclude these files/modules/subcircuits. Names may
# also be wildcarded in "glob" format.
#
+# include : This is the complement of "exclude"; name additional
+# files placed in the target directory by a previous
+# run of the script, then add them to the list of files
+# to process. Syntax is the same as "exclude".
+#
# rename : Followed by "=" and an alternative name. For any
# file that is a single entry, change the name of
# the file in the target directory to this (To-do:
@@ -727,7 +732,15 @@
except IndexError:
excludelist = []
else:
- print('Excluding files: ' + (',').join(excludelist))
+ print('Excluding files from source: ' + (',').join(excludelist))
+
+ # Option 'include' has an argument
+ try:
+ includelist = list(item.split('=')[1].split(',') for item in option if item.startswith('incl'))[0]
+ except IndexError:
+ includelist = []
+ else:
+ print('Including files for processing: ' + (',').join(includelist))
# Option 'rename' has an argument
try:
@@ -909,10 +922,53 @@
destfilelist.append(os.path.split(targname)[1])
+ # "exclude" applies the exclusion only to the gathering of source
+ # files. If any of the files that were excluded from the source
+ # (pre-)exists in the destination, then add it to destfilelist
+ # for all additional processing.
+
+ # Get list of all file names in the target directory, not just
+ # the ones that were installed.
+ destallfiles = glob.glob(destlibdir + destpath + '/**')
+ destallnames = list(os.path.split(item)[1] for item in destallfiles)
+
+ # Match names against the exclude list, using fnmatch wildcarding
+ intarglist = []
+ for file in excludelist:
+ intarglist.extend(fnmatch.filter(destallnames, file))
+
+ # Any file from the exclude list that is found to be in the
+ # destination is added back to the list of files to be processed.
+ if intarglist != []:
+ for file in intarglist:
+ if file not in destfilelist:
+ print('Adding back file ' + file + ' for processing.')
+ destfilelist.append(file)
+ excludelist = []
+ elif len(excludelist) > 0:
+ print('Note: No files from exclude list were found in the target.')
+
+ # Any "include" option adds additional files to destfilelist,
+ # if they are found in the target directory.
+ intarglist = []
+ for file in includelist:
+ intarglist.extend(fnmatch.filter(destallnames, file))
+
+ if intarglist != []:
+ for file in intarglist:
+ if file not in destfilelist:
+ print('Adding file ' + file + ' for processing.')
+ destfilelist.append(file)
+ elif len(includelist) > 0:
+ print('Note: No files from include list were found in the target.')
+
+ # Write unsorted file
+ with open(destlibdir + '/filelist.txt', 'w') as ofile:
+ for destfile in destfilelist:
+ print(destfile, file=ofile)
+
+ # Apply sorting and rewrite file with sorted contents
if sortscript:
- with open(destlibdir + '/filelist.txt', 'w') as ofile:
- for destfile in destfilelist:
- print(destfile, file=ofile)
if os.path.isfile(sortscript):
print('Diagnostic: Sorting files with ' + sortscript)
subprocess.run([sortscript, destlibdir],
@@ -990,9 +1046,8 @@
os.rename(origname, targrename)
# If "filelist.txt" was created, remove it
- if sortscript:
- if os.path.isfile(destlibdir + '/filelist.txt'):
- os.remove(destlibdir + '/filelist.txt')
+ if os.path.isfile(destlibdir + '/filelist.txt'):
+ os.remove(destlibdir + '/filelist.txt')
# Find any libraries/options marked as "privileged" (or "private") and
# move the files from libs.tech or libs.ref to libs.priv, leaving a
diff --git a/sky130/Makefile.in b/sky130/Makefile.in
index 2e29af7..c0cd481 100644
--- a/sky130/Makefile.in
+++ b/sky130/Makefile.in
@@ -902,56 +902,57 @@
# Install SkyWater I/O pad library
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.magic.lef compile-only \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib \
-gds %l/latest/cells/*/*.gds compile-only \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
options=custom/scripts/sky130_fd_io_import.tcl \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v \
compile-only filter=custom/scripts/inc_verilog.py \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-library general sky130_fd_io 2>&1 | tee -a ${SKY130A}_make.log
# Remove the base verilog files which have already been included into
# the libraries
${RM} ${STAGING_PATH}/${SKY130A}/libs.ref/${IO_VERILOG}/*.*.v
- # Install custom additions to standard cell libraries
- ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
- -gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
- -lef %l/lef/*.lef \
- -verilog %l/verilog/*.v \
- -library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130A}_make.log
# Add a maskhint set for the GPIO pad .mag view to prevent problems writing
# when writing HVI to GDS during hierarchical adjustments.
${ADDPROP} ${STAGING_PATH}/${SKY130A} sky130_fd_io sky130_fd_io__top_gpiov2 \
"MASKHINTS_HVI 1346 17198 5828 19224 13700 1890 15920 2360 24 17522 1778 20612" -mag
digital-a:
+ # Install custom additions to standard cell libraries
+ ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \
+ -gds %l/gds/*.gds options=custom/scripts/gds_import_setup.tcl \
+ -lef %l/lef/*.lef \
+ -verilog %l/verilog/*.v \
+ -library digital sky130_fd_sc_hd 2>&1 | tee -a ${SKY130A}_make.log
# Install all SkyWater digital standard cells.
${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \
-techlef %l/latest/tech/*.tlef \
-spice %l/latest/cells/*/*.spice compile-only \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
filter=custom/scripts/fix_device_models.py \
-cdl %l/latest/cells/*/*.cdl ignore=topography compile-only \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-lef %l/latest/cells/*/*.magic.lef compile-only \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-doc %l/latest/cells/*/*.pdf \
-lib %l/latest/timing/*.lib \
-gds %l/latest/cells/*/*.gds compile-only \
+ exclude=sky130_fd_sc_hd__buf_16.gds,sky130_fd_sc_hd__a2111oi_0.gds,sky130_fd_sc_hd__clkdlybuf4s15_1.gds,sky130_fd_sc_hd__clkdlybuf4s18_1.gds \
options=custom/scripts/gds_import_setup.tcl \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-verilog %l/latest/models/*/*.v exclude=*.*.v compile-only \
rename=primitives filter=custom/scripts/inc_verilog.py \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-verilog %l/latest/cells/*/*.*.v \
-verilog %l/latest/cells/*/*.v exclude=*.*.v,primitives.v \
compile-only filter=custom/scripts/inc_verilog.py \
- sort=custom/scripts/sort_pdkfiles.py \
+ sort=../common/sort_pdkfiles.py \
-library digital sky130_fd_sc_hd \
-library digital sky130_fd_sc_hdll \
-library digital sky130_fd_sc_hvl \
diff --git a/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__a2111oi_0.gds b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__a2111oi_0.gds
new file mode 100644
index 0000000..815eca3
--- /dev/null
+++ b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__a2111oi_0.gds
Binary files differ
diff --git a/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__buf_16.gds b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__buf_16.gds
new file mode 100644
index 0000000..74c3b8e
--- /dev/null
+++ b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__buf_16.gds
Binary files differ
diff --git a/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__clkdlybuf4s15_1.gds b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__clkdlybuf4s15_1.gds
new file mode 100644
index 0000000..b83e145
--- /dev/null
+++ b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__clkdlybuf4s15_1.gds
Binary files differ
diff --git a/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__clkdlybuf4s18_1.gds b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__clkdlybuf4s18_1.gds
new file mode 100644
index 0000000..156d3a4
--- /dev/null
+++ b/sky130/custom/sky130_fd_sc_hd/gds/sky130_fd_sc_hd__clkdlybuf4s18_1.gds
Binary files differ