Updated both sky130 and gf180mcu to take advantage of today's update to magic (version 8.3.411) which introduces parameter limits in device extraction records. That lets magic extract the correct device where there are unique device models corresponding to specific parameter values or value ranges. The previous way of doing this (used for sky130) involved defining identifier marker layers for each device model, but since the markers did not correspond to any foundry GDS layers, they could not be imported from GDS. With this PDK update, magic will now extract the correct model name for high-value poly resistors and bipolars. The method was extended to the gf180mcu process for bipolars, which were previously not extractable except by the "device primitive" property (which also does not work through GDS export/re-import).
diff --git a/VERSION b/VERSION index 8bbd18b..1237780 100644 --- a/VERSION +++ b/VERSION
@@ -1 +1 @@ -1.0.421 +1.0.422
diff --git a/gf180mcu/gf180mcu.json b/gf180mcu/gf180mcu.json index 7ca86f1..a20519d 100644 --- a/gf180mcu/gf180mcu.json +++ b/gf180mcu/gf180mcu.json
@@ -89,16 +89,16 @@ "magic": "MAGIC_COMMIT" }, "reference": { - "open_pdks": "6e1e8bc281acdd3b51295f2e97ad51da54100270", - "magic": "e9d434597a9a01b45cce08bb42a9257c5eb0b50d", + "open_pdks": "b6627279552bd1f0f852b1119af10effb2edafd7", + "magic": "b899a500d59fe4f0788231a4a3911efadacc3d06", "gf180mcu_pdk": "a897aa30369d3bcec87d9d50ce9b01f320f854ef", - "gf180mcu_fd_pr": "6010ad599e2ca07d9aeb6e2c295434be117eee58", + "gf180mcu_fd_pr": "29438e43df680b5a4453fc2673ed8001d6dfc13f", "gf180mcu_fd_pv": "bc0385ef83280999f7fc332512d91ca73008f701", "gf180mcu_fd_io": "2aeec51ea2824b6cc0b396acfc39f4535f40b23a", "gf180mcu_fd_sc_mcu7t5v0": "8743b6f9641eb8707179c4e51703380d4dc90f16", "gf180mcu_fd_sc_mcu9t5v0": "376ea56fa36ce7702595ce4e0e3c9357ee38c81c", "gf180mcu_fd_ip_sram": "9c411928870ce15226228fa52ddb6ecc0ea4ffbe", - "gf180mcu_osu_sc_gf12t3v3": "c33c01c9de46b944401f3f33d9787fb16280be11", - "gf180mcu_osu_sc_gf9t3v3": "c33c01c9de46b944401f3f33d9787fb16280be11" + "gf180mcu_osu_sc_gf12t3v3": "df1d8ec95b2cfbfdb8e0128819e9899e968b92a4", + "gf180mcu_osu_sc_gf9t3v3": "df1d8ec95b2cfbfdb8e0128819e9899e968b92a4" } }
diff --git a/gf180mcu/magic/gf180mcu.tcl b/gf180mcu/magic/gf180mcu.tcl index 9702501..dd15fa9 100644 --- a/gf180mcu/magic/gf180mcu.tcl +++ b/gf180mcu/magic/gf180mcu.tcl
@@ -103,7 +103,7 @@ magic::add_toolkit_command $layoutframe "pn_3p3 - p-diode" "magic::gencell gf180mcu::pn_3p3" pdk1 magic::add_toolkit_separator $layoutframe pdk1 - magic::add_toolkit_command $layoutframe "XXX_5x5 (3.3V) - 5.0um^2 " "magic::gencell gf180mcu::vnpn_2x2" pdk1 + magic::add_toolkit_command $layoutframe "vnpn_5x5 (3.3V) - 5.0um^2 " "magic::gencell gf180mcu::vnpn_2x2" pdk1 magic::add_toolkit_command $layoutframe "vnpn_5x0p42 (3.3V) - 5.0um x 0.42um " "magic::gencell gf180mcu::vnpn_5x0p42" pdk1 magic::add_toolkit_command $layoutframe "vnpn_10x10 (3.3V) - 10.0um^2 " "magic::gencell gf180mcu::vnpn_5x5" pdk1 magic::add_toolkit_command $layoutframe "vnpn_10x0p42 (3.3V) - 10.0um x 0.42um " "magic::gencell gf180mcu::vnpn_10x0p42" pdk1
diff --git a/gf180mcu/magic/gf180mcu.tech b/gf180mcu/magic/gf180mcu.tech index 1f7433c..25b3ecf 100644 --- a/gf180mcu/magic/gf180mcu.tech +++ b/gf180mcu/magic/gf180mcu.tech
@@ -21,7 +21,7 @@ version version REVISION description "Global Foundries 180mcu: open PDK rules and DRC" - requires magic-8.3.353 + requires magic-8.3.411 end #----------------------------------------------------- @@ -4770,6 +4770,18 @@ device subcircuit cap_pmos_06v0 mvpcap mvpdiff,mvpdc l=c_length w=c_width device subcircuit cap_nmos_06v0 mvncap mvndiff,mvndc l=c_length w=c_width + device msubcircuit npn_10p00x10p00 npn *ndiff dnwell space/w error a1>99.0 a1<101.0 + device msubcircuit npn_05p00x05p00 npn *ndiff dnwell space/w error a1>24.0 a1<26.0 + device msubcircuit npn_00p54x16p00 npn *ndiff dnwell space/w error a1>8.5 a1<8.7 + device msubcircuit npn_00p54x08p00 npn *ndiff dnwell space/w error a1>4.2 a1<4.4 + device msubcircuit npn_00p54x04p00 npn *ndiff dnwell space/w error a1>2.0 a1<2.2 + device msubcircuit npn_00p54x02p00 npn *ndiff dnwell space/w error a1>1.0 a1<1.2 + + device msubcircuit pnp_10p00x00p42 pnp *pdiff pwell,space/w error a1>4.1 a1<4.3 + device msubcircuit pnp_05p00x00p42 pnp *pdiff pwell,space/w error a1>2.0 a1<2.2 + device msubcircuit pnp_10p00x10p00 pnp *pdiff pwell,space/w error a1>99.0 a1<101.0 + device msubcircuit pnp_05p00x05p00 pnp *pdiff pwell,space/w error a1>24.0 a1<26.0 + device rsubcircuit efuse efuse *poly device rsubcircuit rm1 rm1 *m1 l=r_length w=r_width
diff --git a/sky130/Makefile.in b/sky130/Makefile.in index 2c77d21..e144161 100644 --- a/sky130/Makefile.in +++ b/sky130/Makefile.in
@@ -1360,10 +1360,6 @@ cp custom/models/sky130.lib.spice \ ${STAGING_PATH}/${SKY130$*}/libs.tech/ngspice \ 2>&1 | tee -a ${SKY130$*}_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} -variant=${SKY130$*} \ - 2>&1 | tee -a ${SKY130$*}_make.log || true # Custom: Add "spinit" file cat ./custom/models/spinit >> \
diff --git a/sky130/custom/scripts/add_bipolar_ids.py b/sky130/custom/scripts/add_bipolar_ids.py deleted file mode 100755 index 73e991b..0000000 --- a/sky130/custom/scripts/add_bipolar_ids.py +++ /dev/null
@@ -1,101 +0,0 @@ -#!/usr/bin/env python3 -# -#-------------------------------------------------------------------- -# Add the special ID layers for the bipolar transistors which tell -# the extraction engine in magic to extract the device model that -# is specific to the device size. There is no such GDS layer, so it -# can only be added after the fact. -#-------------------------------------------------------------------- - -import os -import re -import sys - -options = [] -arguments = [] -for item in sys.argv[1:]: - if item.find('-', 0) == 0: - options.append(item[1:]) - else: - arguments.append(item) - -variant = 'sky130A' -magpath = variant + '/libs.ref/sky130_fd_pr/mag' - -if len(options) > 0: - for option in options: - if option.startswith('variant'): - variant = option.split('=')[1] - magpath = variant + '/libs.ref/sky130_fd_pr/mag' - for option in options: - if option == 'ef_format': - magpath = variant + '/libs.ref/mag/sky130_fd_pr' -elif len(arguments) > 0: - magpath = arguments[0] - -baserex = re.compile('<< [np]base >>') - -# Note that the list of NPNs is not comprehensive. However, at the -# moment only 5 special layers and 5 special models are defined in -# the magic techfile and in the device generator. Adding more must -# start with the magic techfile, as the layers must be defined before -# this script can be run. - -devlist = ['sky130_fd_pr__rf_pnp_05v5_W0p68L0p68', - 'sky130_fd_pr__rf_pnp_05v5_W3p40L3p40', - 'sky130_fd_pr__rf_npn_11v0_W1p00L1p00', - 'sky130_fd_pr__rf_npn_05v5_W1p00L1p00', - 'sky130_fd_pr__rf_npn_05v5_W1p00L2p00'] - -typelist = ['pnp0p68', - 'pnp3p40', - 'npn11p0', - 'npn1p00', - 'npn2p00'] - -#-------------------------------------------------------------------- - -for idx, device in enumerate(devlist): - infile_name = magpath + '/' + device + '.mag' - outfile_name = magpath + '/' + device + '_temp.mag' - - if not os.path.exists(infile_name): - print('Error: Cannot find file ' + infile_name) - continue - - print('Adding special ID layer to device ' + device + ' layout') - - type = typelist[idx] - is_baserect = False - infile = open(infile_name, 'r') - outfile = open(outfile_name, 'w') - line_number = 0 - replaced_something = False - - for line in infile: - line_number += 1 - - if is_baserect: - # Repeat the same rectangle as for the bipolar base layer, - # using the ID type layer - outfile.write(line) - outfile.write('<< ' + type + ' >>\n') - replaced_something = True - is_baserect = False - else: - bmatch = baserex.match(line) - if bmatch: - is_baserect = True - - outfile.write(line) - - infile.close() - outfile.close() - - if replaced_something: - print("Something was replaced in '{}'".format(infile_name)) - os.rename(outfile_name, infile_name) - else: - print("Nothing was replaced in '{}'.".format(infile_name)) - os.remove(outfile_name) -
diff --git a/sky130/magic/sky130.tcl b/sky130/magic/sky130.tcl index 57ee4ee..a9991d8 100644 --- a/sky130/magic/sky130.tcl +++ b/sky130/magic/sky130.tcl
@@ -3617,7 +3617,6 @@ set newdict [dict create \ res_type ppres \ - res_idtype res0p35 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -3690,7 +3689,6 @@ set newdict [dict create \ res_type ppres \ - res_idtype res0p69 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -3763,7 +3761,6 @@ set newdict [dict create \ res_type ppres \ - res_idtype res1p41 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -3836,7 +3833,6 @@ set newdict [dict create \ res_type ppres \ - res_idtype res2p85 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -3909,7 +3905,6 @@ set newdict [dict create \ res_type ppres \ - res_idtype res5p73 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -3984,7 +3979,6 @@ set newdict [dict create \ res_type xpres \ - res_idtype res0p35 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -4059,7 +4053,6 @@ set newdict [dict create \ res_type xpres \ - res_idtype res0p35 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -4132,7 +4125,6 @@ set newdict [dict create \ res_type xpres \ - res_idtype res0p69 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -4205,7 +4197,6 @@ set newdict [dict create \ res_type xpres \ - res_idtype res1p41 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -4278,7 +4269,6 @@ set newdict [dict create \ res_type xpres \ - res_idtype res2p85 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \ @@ -4351,7 +4341,6 @@ set newdict [dict create \ res_type xpres \ - res_idtype res5p73 \ end_type xpc \ end_contact_type xpc \ end_contact_size 0 \
diff --git a/sky130/magic/sky130.tech b/sky130/magic/sky130.tech index b5c238e..d4b4373 100644 --- a/sky130/magic/sky130.tech +++ b/sky130/magic/sky130.tech
@@ -23,7 +23,7 @@ version version REVISION description "SkyWater SKY130: Open Source rules and DRC" - requires magic-8.3.306 + requires magic-8.3.411 end #------------------------------------------------------------------------ @@ -311,18 +311,6 @@ -block fillblock,fillblock4 comment comment -comment obscomment -# fixed resistor width identifiers - -comment res0p35 - -comment res0p69 - -comment res1p41 - -comment res2p85 - -comment res5p73 -# fixed bipolar area identifiers - -comment pnp0p68 - -comment pnp3p40 - -comment npn1p00 - -comment npn2p00 - -comment npn11p0 end @@ -471,7 +459,6 @@ psub pwell obstypes obswell,mvobsactive,obsactive,obsli,obsmcon,obsm1,obsm2,obsm3,obsm4,obsm5,obsmrdl,obscomment - idtypes res0p35,res0p69,res1p41,res2p85,res5p73,pnp0p68,pnp3p40,npn1p00,npn2p00,npn11p0 blocktypes fillblock,fillblock4 end @@ -543,17 +530,6 @@ xpc polysilicon pselect2 metal1 contact_X'es rmp polysilicon poly_resist_stripes - res0p35 implant1 - res0p69 implant1 - res1p41 implant1 - res2p85 implant1 - res5p73 implant1 - pnp0p68 implant1 - pnp3p40 implant1 - npn1p00 implant1 - npn2p00 implant1 - npn11p0 implant1 - pdiode pdiffusion pselect2 ndiode ndiffusion nselect2 pdiodec pdiffusion pselect2 metal1 contact_X'es @@ -5331,7 +5307,6 @@ # These types should not be considered as electrical nodes resist blocktypes None resist obstypes None - resist idtypes None resist comment None #------------------------------------------------------------------------- @@ -6397,19 +6372,19 @@ *mvnndiff pwell,space/w error l=l w=w # Bipolars - device msubcircuit sky130_fd_pr__npn_05v5_W1p00L1p00 npn *ndiff dnwell space/w \ - error +npn1p00 - device msubcircuit sky130_fd_pr__npn_05v5_W1p00L2p00 npn *ndiff dnwell space/w \ - error +npn2p00 device msubcircuit sky130_fd_pr__npn_05v5 npn *ndiff dnwell space/w error a1=area - device msubcircuit sky130_fd_pr__pnp_05v5_W0p68L0p68 pnp *pdiff \ - pwell,space/w +pnp0p68 - device msubcircuit sky130_fd_pr__pnp_05v5_W3p40L3p40 pnp *pdiff \ - pwell,space/w +pnp3p40 + device msubcircuit sky130_fd_pr__npn_05v5_W1p00L1p00 npn *ndiff dnwell space/w \ + error a1>0.99 a1<1.01 + device msubcircuit sky130_fd_pr__npn_05v5_W1p00L2p00 npn *ndiff dnwell space/w \ + error a1>1.99 a1<2.01 device msubcircuit sky130_fd_pr__pnp_05v5 pnp *pdiff pwell,space/w a1=area - device msubcircuit sky130_fd_pr__npn_11v0_W1p00L1p00 npn *mvndiff \ - dnwell space/w error +npn11p0 + device msubcircuit sky130_fd_pr__pnp_05v5_W0p68L0p68 pnp *pdiff \ + pwell,space/w a1>0.45 a1<0.47 + device msubcircuit sky130_fd_pr__pnp_05v5_W3p40L3p40 pnp *pdiff \ + pwell,space/w a1>11.55 a1<11.57 device msubcircuit sky130_fd_pr__npn_11v0 npn *mvndiff dnwell space/w error a1=area + device msubcircuit sky130_fd_pr__npn_11v0_W1p00L1p00 npn *mvndiff \ + dnwell space/w error a1>0.99 a1<1.01 # Ignore the extended-drain FET geometry that forms part of the high-voltage # bipolar devices. @@ -6454,30 +6429,30 @@ device ndiode sky130_fd_pr__model__parasitic__diode_ps2dn \ photo pwell,space/w error a=area - device rsubcircuit sky130_fd_pr__res_high_po_0p35 xhrpoly \ - xpc pwell,space/w error +res0p35 l=l - device rsubcircuit sky130_fd_pr__res_high_po_0p69 xhrpoly \ - xpc pwell,space/w error +res0p69 l=l - device rsubcircuit sky130_fd_pr__res_high_po_1p41 xhrpoly \ - xpc pwell,space/w error +res1p41 l=l - device rsubcircuit sky130_fd_pr__res_high_po_2p85 xhrpoly \ - xpc pwell,space/w error +res2p85 l=l - device rsubcircuit sky130_fd_pr__res_high_po_5p73 xhrpoly \ - xpc pwell,space/w error +res5p73 l=l device rsubcircuit sky130_fd_pr__res_high_po xhrpoly \ xpc pwell,space/w error l=l w=w - device rsubcircuit sky130_fd_pr__res_xhigh_po_0p35 uhrpoly \ - xpc pwell,space/w error +res0p35 l=l - device rsubcircuit sky130_fd_pr__res_xhigh_po_0p69 uhrpoly \ - xpc pwell,space/w error +res0p69 l=l - device rsubcircuit sky130_fd_pr__res_xhigh_po_1p41 uhrpoly \ - xpc pwell,space/w error +res1p41 l=l - device rsubcircuit sky130_fd_pr__res_xhigh_po_2p85 uhrpoly \ - xpc pwell,space/w error +res2p85 l=l - device rsubcircuit sky130_fd_pr__res_xhigh_po_5p73 uhrpoly \ - xpc pwell,space/w error +res5p73 l=l + device rsubcircuit sky130_fd_pr__res_high_po_0p35 xhrpoly \ + xpc pwell,space/w error w>0.34 w<0.36 l=l + device rsubcircuit sky130_fd_pr__res_high_po_0p69 xhrpoly \ + xpc pwell,space/w error w>0.68 w<0.70 l=l + device rsubcircuit sky130_fd_pr__res_high_po_1p41 xhrpoly \ + xpc pwell,space/w error w>1.40 w<1.42 l=l + device rsubcircuit sky130_fd_pr__res_high_po_2p85 xhrpoly \ + xpc pwell,space/w error w>2.84 w<2.86 l=l + device rsubcircuit sky130_fd_pr__res_high_po_5p73 xhrpoly \ + xpc pwell,space/w error w>5.72 w<5.74 l=l device rsubcircuit sky130_fd_pr__res_xhigh_po uhrpoly \ xpc pwell,space/w error l=l w=w + device rsubcircuit sky130_fd_pr__res_xhigh_po_0p35 uhrpoly \ + xpc pwell,space/w error w>0.34 w<0.36 l=l + device rsubcircuit sky130_fd_pr__res_xhigh_po_0p69 uhrpoly \ + xpc pwell,space/w error w>0.68 w<0.70 l=l + device rsubcircuit sky130_fd_pr__res_xhigh_po_1p41 uhrpoly \ + xpc pwell,space/w error w>1.40 w<1.42 l=l + device rsubcircuit sky130_fd_pr__res_xhigh_po_2p85 uhrpoly \ + xpc pwell,space/w error w>2.84 w<2.86 l=l + device rsubcircuit sky130_fd_pr__res_xhigh_po_5p73 uhrpoly \ + xpc pwell,space/w error w>5.72 w<5.74 l=l device rsubcircuit sky130_fd_pr__res_generic_nd ndiffres \ *ndiff pwell,space/w error l=l w=w @@ -6591,14 +6566,19 @@ device pdiode sky130_fd_pr__diode_pd2nw_05v5_hvt *pdiodehvt nwell a=area*1E12 p=pj*1E6 device pdiode sky130_fd_pr__diode_pd2nw_11v0 *mvpdiode nwell a=area*1E12 p=pj*1E6 - device bjt sky130_fd_pr__npn_05v5_W1p00L1p00 npn *ndiff dnwell space/w error +npn1p00 - device bjt sky130_fd_pr__npn_05v5_W1p00L2p00 npn *ndiff dnwell space/w error +npn2p00 device bjt sky130_fd_pr__npn_05v5 npn *ndiff dnwell space/w error a1=area - device bjt sky130_fd_pr__pnp_05v5_W0p68L0p68 pnp *pdiff pwell,space/w +pnp0p68 - device bjt sky130_fd_pr__pnp_05v5_W3p40L3p40 pnp *pdiff pwell,space/w +pnp3p40 + device bjt sky130_fd_pr__npn_05v5_W1p00L1p00 npn *ndiff dnwell space/w error \ + a1>0.99 a1<1.01 + device bjt sky130_fd_pr__npn_05v5_W1p00L2p00 npn *ndiff dnwell space/w error \ + a1>1.99 a1<2.01 device bjt sky130_fd_pr__pnp_05v5 pnp *pdiff pwell,space/w a1=area - device bjt sky130_fd_pr__npn_11v0_W1p00L1p00 npn *mvndiff dnwell space/w error +npn11p0 + device bjt sky130_fd_pr__pnp_05v5_W0p68L0p68 pnp *pdiff pwell,space/w \ + a1>0.45 a1<0.48 + device bjt sky130_fd_pr__pnp_05v5_W3p40L3p40 pnp *pdiff pwell,space/w \ + a1>11.55 a1<11.57 device bjt sky130_fd_pr__npn_11v0 npn *mvndiff dnwell space/w error a1=area + device bjt sky130_fd_pr__npn_11v0_W1p00L1p00 npn *mvndiff dnwell space/w error \ + a1>0.99 a1<1.01 #ifdef MIM device capacitor sky130_fd_pr__cap_mim_m3_1 *mimcap *m3 1
diff --git a/sky130/sky130.json b/sky130/sky130.json index 86bef5f..c463f5e 100644 --- a/sky130/sky130.json +++ b/sky130/sky130.json
@@ -94,17 +94,17 @@ "magic": "MAGIC_COMMIT" }, "reference": { - "open_pdks": "6e1e8bc281acdd3b51295f2e97ad51da54100270", - "magic": "e9d434597a9a01b45cce08bb42a9257c5eb0b50d", - "skywater_pdk": "49d3c73c2cd8ea42cdae5056440baef0f72e7e42", - "sky130_osu_sc_t12": "ac90ef0c622a9377a16b5218d9da3ac4169eeaaf", - "sky130_osu_sc_t15": "95d1c19abb47e1b2945847acb4e817b1b8417c43", - "sky130_osu_sc_t18": "aa2b509f3c8f32ea94fdb55ac9768754667c1658", - "sky130_sram_macros": "c2333394e0b0b9d9d71185678a8d8087715d5e3b", + "open_pdks": "b6627279552bd1f0f852b1119af10effb2edafd7", + "magic": "b899a500d59fe4f0788231a4a3911efadacc3d06", + "skywater_pdk": "unknown", + "sky130_osu_sc_t12": "unknown", + "sky130_osu_sc_t15": "unknown", + "sky130_osu_sc_t18": "unknown", + "sky130_sram_macros": "unknown", "sky130_fd_bd_sram": "be33adbcf188fdeab5c061699847d9d440f7a084", "sky130_ml_xx_hd": "6eb3b0718552b034f1bf1870285ff135e3fb2dcb", - "xschem_sky130": "3440c153fc7e9a823d0b36333575609d200efd28", - "klayout_sky130": "1d53b55625d854ebfdd9f7f2941a35f3ffbdf185", - "precheck_sky130": "ff1b8c92478c7992e7977543160bfed98867e5de" + "xschem_sky130": "5f818f03969e91a71529cddf4cd930c8a2c97ac6", + "klayout_sky130": "5e6e2b29d2b9f8d0f2de1b5d5f649f33017dac75", + "precheck_sky130": "22568499b792afbd6f962decf3d8e6c1184dfb1e" } }