Modified the way filter scripts are called so that they will always get the option argument "-ef_format" if EF_STYLE is set. This fixes the method used in a recent commit which was supposed to do the same thing but didn't.
diff --git a/common/foundry_install.py b/common/foundry_install.py index 9a2793a..8909618 100755 --- a/common/foundry_install.py +++ b/common/foundry_install.py
@@ -320,7 +320,7 @@ # script using the "filter" option. #---------------------------------------------------------------------------- -def tfilter(targetroot, filterscript, outfile=[]): +def tfilter(targetroot, filterscript, ef_format=False, outfile=[]): filterroot = os.path.split(filterscript)[1] if os.path.isfile(targetroot): print(' Filtering file ' + targetroot + ' with ' + filterroot) @@ -331,7 +331,12 @@ # Make sure this file is writable (as the original may not be) makeuserwritable(outfile) - fproc = subprocess.run([filterscript, targetroot, outfile], + if ef_format: + arguments = [filterscript, targetroot, outfile, '-ef_format'] + else: + arguments = [filterscript, targetroot, outfile] + + fproc = subprocess.run(arguments, stdin = subprocess.DEVNULL, stdout = subprocess.PIPE, stderr = subprocess.PIPE, universal_newlines = True) if fproc.stdout: @@ -570,7 +575,7 @@ for filter_script in filter_scripts: # Apply filter script to all files in the target directory - tfilter(targname, filter_script) + tfilter(targname, filter_script, ef_format) optionlist.remove(option) @@ -632,7 +637,7 @@ for filter_script in filter_scripts: # Apply filter script to all files in the target directory - tfilter(subtargname, filter_script) + tfilter(subtargname, filter_script, ef_format) else: # Remove any existing file @@ -648,7 +653,7 @@ for filter_script in filter_scripts: # Apply filter script to all files in the target directory - tfilter(targname, filter_script) + tfilter(targname, filter_script, ef_format) optionlist.remove(option) @@ -899,7 +904,7 @@ for filter_script in local_filter_scripts: # Apply filter script to all files in the target directory - tfilter(targname, filter_script) + tfilter(targname, filter_script, ef_format) destfilelist.append(os.path.split(targname)[1])
diff --git a/sky130/Makefile.in b/sky130/Makefile.in index 2af56d8..1bd22be 100644 --- a/sky130/Makefile.in +++ b/sky130/Makefile.in
@@ -819,7 +819,7 @@ # Install device subcircuits from vendor files ${STAGE} -source ${SKYWATER_LIBS_PATH} -target ${STAGING_PATH}/${SKY130A} \ -ngspice sky130_fd_pr/latest/models/* \ - filter=custom/scripts/rename_models.py ${EF_FORMAT} \ + filter=custom/scripts/rename_models.py \ 2>&1 | tee -a ${SKY130A}_make.log # Install device layouts from custom sources ${STAGE} -source ./custom -target ${STAGING_PATH}/${SKY130A} \ @@ -868,12 +868,12 @@ tail -39 ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE}/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice >> ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE}/temp mv ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE}/temp ${STAGING_PATH}/${SKY130A}/libs.ref/${PR_SPICE}/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice # Custom: Add the PNP 3.4x3.4um device model to the includes in "all.spice" - ./custom/scripts/fix_spice_includes.py ${EF_FORMAT} \ + ./custom/scripts/fix_spice_includes.py \ ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice/all.spice \ 2>&1 | tee -a ${SKY130A}_make.log || true # Custom: Parse the (commented out) statistics blocks and generate # ngspice-compatible monte carlo parameters for mismatch and process - ./custom/scripts/mismatch_params.py ${EF_FORMAT} \ + ./custom/scripts/mismatch_params.py \ 2>&1 | tee -a ${SKY130A}_make.log || true ./custom/scripts/mismatch_params.py \ ${STAGING_PATH}/${SKY130A}/libs.tech/ngspice \ @@ -904,7 +904,7 @@ 2>&1 | tee -a ${SKY130A}_make.log || true # Custom: Add special device ID layers to bipolar layouts in magic # to make the extraction models correct. - ./custom/scripts/add_bipolar_ids.py ${EF_FORMAT} \ + ./custom/scripts/add_bipolar_ids.py \ 2>&1 | tee -a ${SKY130A}_make.log || true # Custom: Add "spinit" file
diff --git a/sky130/custom/scripts/rename_cells.py b/sky130/custom/scripts/rename_cells.py index b288a25..de47dcb 100755 --- a/sky130/custom/scripts/rename_cells.py +++ b/sky130/custom/scripts/rename_cells.py
@@ -5,6 +5,7 @@ # This script renames include paths from SPICE files in the cells # (libs.ref/sky130_fd_pr) directory that point to other cells # directories, to point to the correct location in libs.ref/sky130_fd_pr/spice/ +# (or libs.ref/spi/sky130_fd_pr, if -ef_format is specified). # # # This script is a filter to be run by setting the name of this script as