Added installation of the xschem symbols for gf180mcu_fd_io which were just added to the library. Updated references for gf180mcu.
diff --git a/VERSION b/VERSION index d32a2cd..eafbe83 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.542 +1.0.543
diff --git a/gf180mcu/Makefile.in b/gf180mcu/Makefile.in index 611110c..28d4156 100644 --- a/gf180mcu/Makefile.in +++ b/gf180mcu/Makefile.in
@@ -1186,9 +1186,6 @@ rm -rf ${OPENLANE_STAGING_$*}/gf180mcu_as_sc_mcu7t3v3 mkdir ${OPENLANE_STAGING_$*}/gf180mcu_as_sc_mcu7t3v3 cp -rp ${AVALON_TECH_SOURCE}/openlane/gf180mcu_as_sc_mcu7t3v3 ${OPENLANE_STAGING_$*} - # drc_exclude.cells is called out in the config and needs to exist - # even though it is an empty file - touch ${OPENLANE_STAGING_$*}/gf180mcu_as_sc_mcu7t3v3/drc_exclude.cells io-%: # Install custom additions to the I/O pad library @@ -1268,6 +1265,8 @@ -lef cells/*/*_${$*_STACK}.lef \ annotate lefopts=-hide \ filter=custom/scripts/fix_io_lef.py \ + -xschem cells/*/*.sym \ + filter=custom/scripts/make_primitive.py \ -verilog cells/*/*.v compile-only \ -library general gf180mcu_fd_io 2>&1 | tee -a ${GF180MCU$*}_make.log
diff --git a/gf180mcu/custom/scripts/make_primitive.py b/gf180mcu/custom/scripts/make_primitive.py new file mode 100755 index 0000000..336238b --- /dev/null +++ b/gf180mcu/custom/scripts/make_primitive.py
@@ -0,0 +1,86 @@ +#!/usr/bin/env python3 +# +# make_primitive.py --- +# +# Special-purpose filter script that converts "schematic" to "primitive" +# in the xschem symbols of PDK elements that are expected to be used as +# black-box elements in a user schematic, such as I/O cells and standard +# cells. +# +# This script is a filter to be run by setting the name of this script as +# the value to "filter=" for the model install in the gf180mcu Makefile. + +import re +import os +import sys + +def filter(inname, outname): + + # Read input, which is an xschem .sym symbol file. + try: + with open(inname, 'r') as inFile: + symtext = inFile.read() + symlines = symtext.splitlines() + except: + print('make_primitive.py: failed to open ' + inname + ' for reading.', file=sys.stderr) + return 1 + + # Process input with regexp + + fixedlines = [] + modified = False + + for line in symlines: + fixedline = line + fixedline = re.sub('type=subcircuit', 'type=primitive', fixedline) + if line != fixedline: + modified = True + fixedlines.append(fixedline) + + # Write output + if outname == None: + for i in fixedlines: + print(i) + else: + # If the output is a symbolic link but no modifications have been made, + # then leave it alone. If it was modified, then remove the symbolic + # link before writing. + if os.path.islink(outname): + if not modified: + return 0 + else: + os.unlink(outname) + try: + with open(outname, 'w') as outFile: + for i in fixedlines: + print(i, file=outFile) + except: + print('make_primitive.py: failed to open ' + outname + ' for writing.', file=sys.stderr) + return 1 + + +if __name__ == '__main__': + + # This script expects to get one or two arguments. One argument is + # mandatory and is the input file. The other argument is optional and + # is the output file. The output file and input file may be the same + # name, in which case the original input is overwritten. + + options = [] + arguments = [] + for item in sys.argv[1:]: + if item.find('-', 0) == 0: + options.append(item[1:]) + else: + arguments.append(item) + + if len(arguments) > 0: + infilename = arguments[0] + + if len(arguments) > 1: + outfilename = arguments[1] + else: + outfilename = None + + result = filter(infilename, outfilename) + sys.exit(result)
diff --git a/gf180mcu/gf180mcu.json b/gf180mcu/gf180mcu.json index 07ac49e..c4000f5 100644 --- a/gf180mcu/gf180mcu.json +++ b/gf180mcu/gf180mcu.json
@@ -90,16 +90,16 @@ "magic": "MAGIC_COMMIT" }, "reference": { - "open_pdks": "426f95115110d6d0185f1ba3d09b3aa8a014969b", + "open_pdks": "a80ed405766c5d4f21c8bfca84552a7478fe75b2", "magic": "0022c502c8a406d1d565e4dc2236498093ef1314", "gf180mcu_pdk": "a897aa30369d3bcec87d9d50ce9b01f320f854ef", "gf180mcu_fd_pr": "faef89e8c1b392733c32820a7b12e3a3847cc18c", "gf180mcu_fd_pv": "10ee7fc75437edafa56f29f2b1872e95c9f22b71", - "gf180mcu_fd_io": "f84fe10e67a5cb9002e9ae8210f58e570726c366", + "gf180mcu_fd_io": "dff0f7f47e406550dcba9b609d3fd3decd3a4367", "gf180mcu_fd_sc_mcu7t5v0": "8743b6f9641eb8707179c4e51703380d4dc90f16", "gf180mcu_fd_sc_mcu9t5v0": "e0e80f5a6522f10b82165d3aeab9b8ee28e89849", "gf180mcu_fd_ip_sram": "9c411928870ce15226228fa52ddb6ecc0ea4ffbe", - "gf180mcu_as_sc_mcu7t3v3": "4570a9648972e03a0f1593de0479a0f61f945cc6", + "gf180mcu_as_sc_mcu7t3v3": "450f6039f6d7f556b47f74b456c010f424d9cfcd", "gf180mcu_osu_sc_gf12t3v3": "aa2fa8cd1bcb8fe98669acd05c0b0c65879268b3", "gf180mcu_osu_sc_gf9t3v3": "aa2fa8cd1bcb8fe98669acd05c0b0c65879268b3" }
diff --git a/gf180mcu/magic/gf180mcu.tcl b/gf180mcu/magic/gf180mcu.tcl index c466abc..923cd2c 100644 --- a/gf180mcu/magic/gf180mcu.tcl +++ b/gf180mcu/magic/gf180mcu.tcl
@@ -3240,15 +3240,23 @@ guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.28 wmin 0.22 \ class mosfet full_metal 1 \ - compatible {pfet_03v3 pfet_06v0}} + compatible {pfet_03v3 pfet_05v0 pfet_06v0}} } -proc gf180mcu::pfet_06v0_defaults {} { +proc gf180mcu::pfet_05v0_defaults {} { return {w 0.3 l 0.5 m 1 nf 1 diffcov 100 polycov 100 \ guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.5 wmin 0.3 \ + lmax 0.595 class mosfet full_metal 1 \ + compatible {pfet_03v3 pfet_05v0 pfet_06v0}} +} + +proc gf180mcu::pfet_06v0_defaults {} { + return {w 0.3 l 0.55 m 1 nf 1 diffcov 100 polycov 100 \ + guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ + topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.55 wmin 0.3 \ class mosfet full_metal 1 \ - compatible {pfet_03v3 pfet_06v0}} + compatible {pfet_03v3 pfet_05v0 pfet_06v0}} } proc gf180mcu::pfet_03v3_dss_defaults {} { @@ -3256,7 +3264,7 @@ guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.28 wmin 0.22 \ class mosfet full_metal 1 \ - compatible {pfet_03v3_dss pfet_06v0_dss}} + compatible {pfet_03v3_dss pfet_05v0 pfet_06v0_dss}} } proc gf180mcu::pfet_06v0_dss_defaults {} { @@ -3276,15 +3284,23 @@ guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.28 wmin 0.22 \ class mosfet full_metal 1 \ - compatible {nfet_03v3 nfet_06v0 nfet_06v0_nvt}} + compatible {nfet_03v3 nfet_05v0 nfet_06v0 nfet_06v0_nvt}} +} + +proc gf180mcu::nfet_05v0_defaults {} { + return {w 0.3 l 0.6 m 1 nf 1 diffcov 100 polycov 100 \ + guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ + topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.7 wmin 0.3 \ + lmax 0.695 class mosfet full_metal 1 \ + compatible {nfet_03v3 nfet_05v0 nfet_06v0 nfet_06v0_nvt}} } proc gf180mcu::nfet_06v0_defaults {} { - return {w 0.3 l 0.6 m 1 nf 1 diffcov 100 polycov 100 \ + return {w 0.3 l 0.7 m 1 nf 1 diffcov 100 polycov 100 \ guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ topc 1 botc 1 poverlap 0 doverlap 1 lmin 0.6 wmin 0.3 \ class mosfet full_metal 1 \ - compatible {nfet_03v3 nfet_06v0 nfet_06v0_nvt}} + compatible {nfet_03v3 nfet_05v0 nfet_06v0 nfet_06v0_nvt}} } proc gf180mcu::nfet_06v0_nvt_defaults {} { @@ -3292,7 +3308,7 @@ guard 1 glc 1 grc 1 gtc 0 gbc 0 tbcov 100 rlcov 100 \ topc 1 botc 1 poverlap 0 doverlap 1 lmin 1.8 wmin 0.8 \ class mosfet full_metal 1 \ - compatible {nfet_03v3 nfet_06v0 nfet_06v0_nvt}} + compatible {nfet_03v3 nfet_05v0 nfet_06v0 nfet_06v0_nvt}} } proc gf180mcu::nfet_10v0_asym_defaults {} { @@ -3412,6 +3428,10 @@ return [gf180mcu::mos_convert $parameters] } +proc gf180mcu::nfet_05v0_convert {parameters} { + return [gf180mcu::mos_convert $parameters] +} + proc gf180mcu::nfet_06v0_convert {parameters} { return [gf180mcu::mos_convert $parameters] } @@ -3424,6 +3444,10 @@ return [gf180mcu::mos_convert $parameters] } +proc gf180mcu::pfet_05v0_convert {parameters} { + return [gf180mcu::mos_convert $parameters] +} + proc gf180mcu::pfet_06v0_convert {parameters} { return [gf180mcu::mos_convert $parameters] } @@ -3511,6 +3535,10 @@ gf180mcu::mos_dialog nfet_03v3 $parameters } +proc gf180mcu::nfet_05v0_dialog {parameters} { + gf180mcu::mos_dialog nfet_05v0 $parameters +} + proc gf180mcu::nfet_06v0_dialog {parameters} { gf180mcu::mos_dialog nfet_06v0 $parameters } @@ -3523,6 +3551,10 @@ gf180mcu::mos_dialog pfet_03v3 $parameters } +proc gf180mcu::pfet_05v0_dialog {parameters} { + gf180mcu::mos_dialog pfet_05v0 $parameters +} + proc gf180mcu::pfet_06v0_dialog {parameters} { gf180mcu::mos_dialog pfet_06v0 $parameters } @@ -4228,6 +4260,30 @@ } #------------------- +# pMOS 5.0V +#------------------- + +proc gf180mcu::pfet_05v0_draw {parameters} { + set newdict [dict create \ + diff_poly_space 0.30 \ + diff_gate_space 0.30 \ + diff_spacing 0.36 \ + gate_type mvpfet \ + diff_type mvpdiff \ + diff_contact_type mvpdc \ + plus_diff_type mvnsd \ + plus_contact_type mvnsc \ + poly_type poly \ + poly_contact_type pc \ + sub_surround 0.16 \ + dev_surround 0.43 \ + sub_type nwell \ + ] + set drawdict [dict merge $gf180mcu::ruleset $newdict $parameters] + return [gf180mcu::mos_draw $drawdict] +} + +#------------------- # pMOS 6.0V #------------------- @@ -4252,6 +4308,29 @@ } #------------------- +# nMOS 5.0V +#------------------- + +proc gf180mcu::nfet_05v0_draw {parameters} { + set newdict [dict create \ + diff_poly_space 0.30 \ + diff_gate_space 0.30 \ + diff_spacing 0.36 \ + gate_type mvnfet \ + diff_type mvndiff \ + diff_contact_type mvndc \ + plus_diff_type mvpsd \ + plus_contact_type mvpsc \ + poly_type poly \ + poly_contact_type pc \ + sub_type pwell \ + sub_surround 0.16 \ + ] + set drawdict [dict merge $gf180mcu::ruleset $newdict $parameters] + return [gf180mcu::mos_draw $drawdict] +} + +#------------------- # nMOS 6.0V #------------------- @@ -4326,7 +4405,7 @@ } #------------------- -# pMOS 6.0V +# pMOS 6.0V dss #------------------- proc gf180mcu::pfet_06v0_dss_draw {parameters} { @@ -4471,6 +4550,7 @@ #---------------------------------------------------------------- proc gf180mcu::mos_check {parameters} { + set lmax 0 # Set a local variable for each parameter (e.g., $l, $w, etc.) foreach key [dict keys $parameters] { @@ -4506,6 +4586,11 @@ puts stderr "Mos length must be >= $lmin um" dict set parameters l $lmin } + if {($lmax > 0) && ($l > $lmax)} { + puts stderr "MOS length must be <= $lmax" + dict set parameters l $lmax + set l $lmax + } if {$w < $wmin} { puts stderr "Mos width must be >= $wmin um" dict set parameters w $wmin @@ -4580,6 +4665,10 @@ return [gf180mcu::mos_check $parameters] } +proc gf180mcu::nfet_05v0_check {parameters} { + return [gf180mcu::mos_check $parameters] +} + proc gf180mcu::nfet_06v0_check {parameters} { return [gf180mcu::mos_check $parameters] } @@ -4592,6 +4681,10 @@ return [gf180mcu::mos_check $parameters] } +proc gf180mcu::pfet_05v0_check {parameters} { + return [gf180mcu::mos_check $parameters] +} + proc gf180mcu::pfet_06v0_check {parameters} { return [gf180mcu::mos_check $parameters] }
diff --git a/gf180mcu/magic/gf180mcu.tech b/gf180mcu/magic/gf180mcu.tech index 4cb0ac0..08ac8fa 100644 --- a/gf180mcu/magic/gf180mcu.tech +++ b/gf180mcu/magic/gf180mcu.tech
@@ -4853,13 +4853,13 @@ device msubcircuit nfet_03v3 nfet ndiff,ndc ndiff,ndc allpsub error \ l=l w=w a1=as p1=ps a2=ad p2=pd device msubcircuit pfet_06v0 mvpfet mvpdiff,mvpdc mvpdiff,mvpdc allnwell error \ - l>=5.5e-7 l=l w=w a1=as p1=ps a2=ad p2=pd + l>=0.55 l=l w=w a1=as p1=ps a2=ad p2=pd device msubcircuit pfet_05v0 mvpfet mvpdiff,mvpdc mvpdiff,mvpdc allnwell error \ - l<5.5e-7 l=l w=w a1=as p1=ps a2=ad p2=pd + l<0.55 l=l w=w a1=as p1=ps a2=ad p2=pd device msubcircuit nfet_06v0 mvnfet mvndiff,mvndc mvndiff,mvndc allpsub error \ - l>=7e-7 l=l w=w a1=as p1=ps a2=ad p2=pd + l>=0.7 l=l w=w a1=as p1=ps a2=ad p2=pd device msubcircuit nfet_05v0 mvnfet mvndiff,mvndc mvndiff,mvndc allpsub error \ - l<7e-7 l=l w=w a1=as p1=ps a2=ad p2=pd + l<0.7 l=l w=w a1=as p1=ps a2=ad p2=pd device msubcircuit pfet_03v3_dss pfet pdiffres pdiffres allnwell error \ l=l w=w a1=as p1=ps a2=ad p2=pd l1=s_sab l2=d_sab device msubcircuit nfet_03v3_dss nfet ndiffres ndiffres allpsub error \
diff --git a/sky130/sky130.json b/sky130/sky130.json index 56a5bca..d73000b 100644 --- a/sky130/sky130.json +++ b/sky130/sky130.json
@@ -94,7 +94,7 @@ "magic": "MAGIC_COMMIT" }, "reference": { - "open_pdks": "426f95115110d6d0185f1ba3d09b3aa8a014969b", + "open_pdks": "a80ed405766c5d4f21c8bfca84552a7478fe75b2", "magic": "0022c502c8a406d1d565e4dc2236498093ef1314", "sky130_fd_pr": "1232782c1b9fab3aacda74d67ce7c92bf7da8105", "sky130_fd_io": "e60737bf624df95c211fe99c007ddec78e3e081d",