Package: sky130-hdl21
Sky130 Hdl21Hdl21 PDK package for the open-source SkyWater 130nm PDK.https://pypi.org/project/sky130-hdl21/About This TechnologySkyWater 130nm is the first notable silicon PDK to be released as open-source software.
The Sky130 effort is heavily community driven, with leadership from Google and eFabless.Related Projects:skywater-pdkopen_pdksthe slack... FIXME ...About this PDK Packagesky130_hdl21defines a set ofhdl21.ExternalModules comprising the essential devices of the SkyWater 130nm open-source PDK, '
and ancompilemethod for converting process-portablehdl21.Primitiveelements into these modules.InstallationInstall from PyPi via:pip install sky130-hdl21And then import the package assky130_hdl21:importsky130_hdl21assertsky130_hdl21.primitivesisnotNone# etcPDKInstallDataSilicon process technologies generally require non-Python data to execute simulations and other tasks. Sky130 is no different.Those files are not distributed as part of this package.Thesky130package defines an Hdl21PdkInstallationtypesky130.Install, which includes references to any such out-of-Python data, generally in the form of filesystem paths. See theHdl21 PDK docsfor more background.A helpful resource for installing the non-Python portions of the 130nm PDK:https://anaconda.org/litex-hub/open_pdks.sky130aInstallable withcondavia:conda install -y -c litex-hub open_pdks.sky130aUsing the conda-based installation, a typicalsitepdksmodule might look like:CONDA_PREFIX=os.environ.get("CONDA_PREFIX")model_lib=Path(CONDA_PREFIX)/"share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice"importsky130_hdl21sky130_hdl21.install=sky130_hdl21.Install(model_lib=model_lib)Note the conda-based installation supports simulation solely withngspice. Sky130 models compatible with Sandia Labs'Xycehave been generated by the community, but are less straightforward to find, install, and revision control.List of Available DevicesIt is important to emphasize that all PDK units are written in microns (μm). We recommend consulting theSKY130 Device Detail Documentationwhich can provide additional information on these additional components.MOSFETsGeneric ResistorsPrecision ResistorsDiodesBipolar Junction TransistorsCapacitorsDigital CellsMOSFETsMOSFETs can be defined using either width (W), length (L) and number of fingers (NF), the SKY130-HDL21 PDK module offers the following components, all with the junction terminals (d,g,s,b) with the exception of NMOS_ISO_20p0VMOSFETs in Hdl21 are designed to be PDK-agnostic, making it possible select the desired MOS using either model compilation:importsky130_hdl21fromhdl21.primitivesimportMos,MosType,MosFamily,MosVtha=Mos(vth=MosVth.STD,tp=MosType.NMOS,family=MosFamily.CORE)sky130_hdl21.compile(a)# a is now an instance of sky130.primitives.NMOS_1p8V_STDOr can be referenced directly using the component name listed below from theprimitivessubmodule.NOTE: If any dimensions are not supplied to the params object, the PDK module will assume the minimal viable dimension of the component that you choose.fromhdl21.prefiximportµfromsky130_hdl21_hdl21importsky130MosParamsaspimportsky130_hdl21.primitivesassa=s.NMOS_1p8V_STD(p(w=0.2*µ,nf=1))Component KeyMosTypeMosVthMosFamilyComponent NameDescriptionNMOS_1p8V_STDNMOSSTDCOREsky130_fd_pr__nfet_01v8Standard 1.8V NMOS transistorNMOS_1p8V_LOWNMOSLOWCOREsky130_fd_pr__nfet_01v8_lvtLow threshold 1.8V NMOSPMOS_1p8V_STDPMOSSTDCOREsky130_fd_pr__pfet_01v8Standard 1.8V PMOS transistorPMOS_1p8V_HIGHPMOSHIGHCOREsky130_fd_pr__pfet_01v8_hvtHigh threshold 1.8V PMOSPMOS_1p8V_LOWPMOSLOWCOREsky130_fd_pr__pfet_01v8_lvtLow threshold 1.8V PMOSPMOS_5p5V_D10_STDPMOSSTDIOsky130_fd_pr__pfet_g5v0d10v5Standard 5.5V PMOS with D10NMOS_5p5V_D10_STDNMOSSTDIOsky130_fd_pr__nfet_g5v0d10v5Standard 5.5V NMOS with D10PMOS_5p5V_D16_STDPMOSSTDIOsky130_fd_pr__pfet_g5v0d16v0Standard 5.5V PMOS with D16NMOS_20p0V_STDNMOSSTDNONEsky130_fd_pr__nfet_20v0Standard 20V NMOS transistorNMOS_20p0V_LOWNMOSZERONONEsky130_fd_pr__nfet_20v0_zvtZero threshold 20V NMOSNMOS_ISO_20p0VNMOSSTDNONEsky130_fd_pr__nfet_20v0_iso5-Terminal Isolated 20V NMOS transistor with an extra terminal called "sub"PMOS_20p0VPMOSSTDNONEsky130_fd_pr__pfet_20v0Standard 20V PMOS transistorNMOS_3p3V_NATNMOSNATIVENONEsky130_fd_pr__nfet_03v3_nvtNative 3.3V NMOS transistorNMOS_5p0V_NATNMOSNATIVENONEsky130_fd_pr__nfet_05v0_nvtNative 5.0V NMOS transistorNMOS_20p0V_NATNMOSNATIVENONEsky130_fd_pr__nfet_20v0_nvtNative 20V NMOS transistorESD_NMOS_1p8VNMOSSTDCOREsky130_fd_pr__esd_nfet_01v8Native ESD 1.8V NMOS, , standard Vth, core familyESD_NMOS_5p5V_D10NMOSSTDIOsky130_fd_pr__esd_nfet_g5v0d10v5ESD NMOS, 5.5V, standard Vth, IO family, D10 variantESD_NMOS_5p5V_NATNMOSNATIVEIOsky130_fd_pr__esd_nfet_g5v0d10v5_nvtESD NMOS, 5.5V, native Vth, IO family, D10 variantESD_PMOS_5p5VPMOSSTDIOsky130_fd_pr__esd_pfet_g5v0d10v5ESD PMOS, 5.5V, standard Vth, IO familyGeneric ResistorsGeneric resistors are resistors composed of materials used in the Sky130 process and can be defined using either width (W), length (L), 3-terminal resistors are formed of substrates and have an additional substrate terminal.Generic resistors are not offered with PDK-agnostic compilation and so must be referred to directly with the correct paramtype:fromhdl21.prefiximportµfromsky130_hdl21_hdl21importSky130GenResParamsaspfromsky130_hdl21_hdl21.primitivesimportGEN_POa=GEN_PO(p(l=0.3*µ,w=0.18*µ))Component KeyComponent NameNumber of TerminalsDescriptionGEN_POsky130_fd_pr__res_generic_po2 (p,n)Generic 2-terminal poly resistorGEN_L1sky130_fd_pr__res_generic_l12 (p,n)Generic 2-terminal local-interconnect resistorGEN_M1sky130_fd_pr__res_generic_m12 (p,n)Generic 2-terminal metal-1 resistorGEN_M2sky130_fd_pr__res_generic_m22 (p,n)Generic 2-terminal metal-2 resistorGEN_M3sky130_fd_pr__res_generic_m32 (p,n)Generic 2-terminal metal-3 resistorGEN_M4sky130_fd_pr__res_generic_m42 (p,n)Generic 2-terminal metal-4 resistorGEN_M5sky130_fd_pr__res_generic_m52 (p,n)Generic 2-terminal metal-5 resistorGEN_NDsky130_fd_pr__res_generic_nd3 (p,n,b)Generic 3-terminal N-diff resistorGEN_PDsky130_fd_pr__res_generic_pd3 (p,n,b)Generic 3-terminal P-diff resistorGEN_ISO_PWsky130_fd_pr__res_iso_pw3 (p,n,b)Generic 3-terminal isolated PW resistorPrecision ResistorsPrecision resistors are made of polysilicon and have a fixed width in the SKY130 PDK, and can be defined in HDL only using the "L" parameter. All devices have junction terminals (p,n,b).NOTE: UNITS ARE ASSUMED TO BE IN MICRONS FOR PRECISION RESISTORSfromhdl21.prefiximportµfromsky130_hdl21importSky130PrecResParamsaspfromsky130_hdl21.primitivesimportGEN_PO# NOTE: We assume the units are in microns herea=GEN_PO(p(L=0.3))Component KeyComponent NameDescriptionPP_PREC_0p35sky130_fd_pr__res_high_po_0p35Precision P+ 0.35μm resistorPP_PREC_0p69sky130_fd_pr__res_high_po_0p69Precision P+ 0.69μm resistorPP_PREC_1p41sky130_fd_pr__res_high_po_1p41Precision P+ 1.41μm resistorPP_PREC_2p85sky130_fd_pr__res_high_po_2p85Precision P+ 2.85μm resistorPP_PREC_5p73sky130_fd_pr__res_high_po_5p73Precision P+ 5.73μm resistorPM_PREC_0p35sky130_fd_pr__res_xhigh_po_0p35Precision P- 0.35μm resistorPM_PREC_0p69sky130_fd_pr__res_xhigh_po_0p69Precision P- 0.69μm resistorPM_PREC_1p41sky130_fd_pr__res_xhigh_po_1p41Precision P- 1.41μm resistorPM_PREC_2p85sky130_fd_pr__res_xhigh_po_2p85Precision P- 2.85μm resistorPM_PREC_5p73sky130_fd_pr__res_xhigh_po_5p73Precision P- 5.73μm resistorDiodesDiodes in HDL21 are defined using width (W) and length (L) which are then converted into area and junction perimeter behind the scenes. All devices have junction terminals (p,n).NOTE: DUE TO ANOTHER INTERESTING SCALING QUIRK, MEASUREMENTS FOR DIODES ARE MULTIPLIED BY 1e12 IN SKY130fromhdl21.prefiximportMEGA,TERAfromsky130_hdl21importSky130DiodeParamsasparfromsky130_hdl21.primitivesimportPWND_5p5Va=PWND_5p5V(par(area=0.3*TERA,pj=1.2*MEGA))Component KeyComponent NameDescriptionPWND_5p5Vsky130_fd_pr__diode_pw2nd_05v5PW2ND diode, 5.5VPWND_11p0Vsky130_fd_pr__diode_pw2nd_11v0PW2ND diode, 11.0VPWND_5p5V_NATsky130_fd_pr__diode_pw2nd_05v5_nvtPW2ND diode, 5.5V, native VTPWND_5p5V_LVTsky130_fd_pr__diode_pw2nd_05v5_lvtPW2ND diode, 5.5V, low VTPDNW_5p5Vsky130_fd_pr__diode_pd2nw_05v5PD2NW diode, 5.5VPDNW_11p0Vsky130_fd_pr__diode_pd2nw_11v0PD2NW diode, 11.0VPDNW_5p5V_HVTsky130_fd_pr__diode_pd2nw_05v5_hvtPD2NW diode, 5.5V, high VTPDNW_5p5V_LVTsky130_fd_pr__diode_pd2nw_05v5_lvtPD2NW diode, 5.5V, low VTPX_RF_PSNWsky130_fd_pr__model__parasitic__rf_diode_ps2nwRF parasitic PS2NW diodePX_RF_PWDNsky130_fd_pr__model__parasitic__rf_diode_pw2dnRF parasitic PW2DN diodePX_PWDNsky130_fd_pr__model__parasitic__diode_pw2dnParasitic PW2DN diodePX_PSDNsky130_fd_pr__model__parasitic__diode_ps2dnParasitic PS2DN diodePX_PSNWsky130_fd_pr__model__parasitic__diode_ps2nwParasitic PS2NW diodeBipolar Junction TransistorsBipolar Junction Transistors in the SKY130 PDK are defined as static devices and do not yet have parametric cells. As such, no parameters can be passed apart from "m" for parallel multiplicity of components:fromsky130_hdl21importSky130BipolarParamsasparfromsky130_hdl21.primitivesimportNPN_5p0V_1x2a=NPN_5p0V_1x2(par(m=2))Component KeyComponent NameNumber of TerminalsDescriptionNPN_5p0V_1x2sky130_fd_pr__npn_05v5_W1p00L2p004 (c,b,e,s)NPN BJT, 5.0V, 1x2μmNPN_11p0V_1x1sky130_fd_pr__npn_11v0_W1p00L1p004 (c,b,e,s)NPN BJT, 11.0V, 1x1μmNPN_5p0V_1x1sky130_fd_pr__npn_05v5_W1p00L1p004 (c,b,e,s)NPN BJT, 5.0V, 1x1μmPNP_5p0V_0p68x0p68sky130_fd_pr__pnp_05v5_W0p68L0p683 (c,b,e)PNP BJT, 5.0V, 0.68x0.68μmPNP_5p0V_3p40x3p40sky130_fd_pr__pnp_05v5_W3p40L3p403 (c,b,e)PNP BJT, 5.0V, 3.4x3.4μmCapacitorsCapacitors in SKY130 come in 4 flavours, the MiM capacitor, the Varactor, the Vertical Parallel Plate transistor and the Vertical Perpendicular Plate capacitor, the latter two accept no arguments and their dimensions are fixed, whereas the first two allow their width and length to be defined:MiM caps:fromhdl21.prefiximportµfromsky130_hdl21importSky130MimCapParamsasparfromsky130_hdl21.primitivesimportMIM_M3a=MIM_M3(w=2*µ,l=2*µ)Varicaps:fromhdl21.prefiximportµfromsky130_hdl21importSky130VarCapParamsasparfromsky130_hdl21.primitivesimportVAR_LVTa=VAR_LVT(w=2*µ,l=2*µ)Vertical-Perpendicular/Parallel Plates:fromsky130_hdl21importSky130VPPParamsasparfromsky130_hdl21.primitivesimportVPP_PARA_5a=VPP_PARA_5(m=1)Component KeyComponent NameNumber of TerminalsCapacitor TypeDescriptionMIM_M3sky130_fd_pr__cap_mim_m3_12 (p,n)MiMMiM capacitor, M3 layerMIM_M4sky130_fd_pr__cap_mim_m3_22 (p,n)MiMMiM capacitor, M4 layerVAR_LVTsky130_fd_pr__cap_var_lvt3 (p,n,b)VaractorVaractor, LVT variantVAR_HVTsky130_fd_pr__cap_var_hvt3 (p,n,b)VaractorVaractor, HVT variantVPP_PARA_1sky130_fd_pr__cap_vpp_04p4x04p6_m1m2_noshield_o23VPP (Parallel)VPP parallel capacitor, 4.4x4.6 µm, M1M2VPP_PARA_2sky130_fd_pr__cap_vpp_02p4x04p6_m1m2_noshield3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 2.4x4.6 µm, M1M2VPP_PARA_3sky130_fd_pr__cap_vpp_08p6x07p8_m1m2_noshield3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 8.6x7.8 µm, M1M2VPP_PARA_4sky130_fd_pr__cap_vpp_04p4x04p6_m1m2_noshield3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 4.4x4.6 µm, M1M2VPP_PARA_5sky130_fd_pr__cap_vpp_11p5x11p7_m1m2_noshield3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 11.5x11.7 µm, M1M2VPP_PARA_6sky130_fd_pr__cap_vpp_44p7x23p1_pol1m1m2m3m4m5_noshield3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 44.7x23.1 µm, POL1M1M2M3M4M5VPP_PARA_7sky130_fd_pr__cap_vpp_02p7x06p1_m1m2m3m4_shieldl1_fingercap3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 2.7x6.1 µm, M1M2M3M4, shield L1, finger capVPP_PARA_8sky130_fd_pr__cap_vpp_02p9x06p1_m1m2m3m4_shieldl1_fingercap23 (p,n,b)VPP (Parallel)VPP parallel capacitor, 2.9x6.1 µm, M1M2M3M4, shield L1, finger cap 2VPP_PARA_9sky130_fd_pr__cap_vpp_02p7x11p1_m1m2m3m4_shieldl1_fingercap3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 2.7x11.1 µm, M1M2M3M4, shield L1, finger capVPP_PARA_10sky130_fd_pr__cap_vpp_02p7x21p1_m1m2m3m4_shieldl1_fingercap3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 2.7x21.1 µm, M1M2M3M4, shield L1, finger capVPP_PARA_11sky130_fd_pr__cap_vpp_02p7x41p1_m1m2m3m4_shieldl1_fingercap3 (p,n,b)VPP (Parallel)VPP parallel capacitor, 2.7x41.1 µm, M1M2M3M4, shield L1, finger capVPP_PERP_1sky130_fd_pr__cap_vpp_11p5x11p7_l1m1m2m3m4_shieldm54 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 11.5x11.7 µm, L1M1M2M3M4, shield M5VPP_PERP_2sky130_fd_pr__cap_vpp_11p5x11p7_l1m1m2m3m4_shieldpom54 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 11.5x11.7 µm, L1M1M2M3M4, shield PoM5VPP_PERP_3sky130_fd_pr__cap_vpp_11p5x11p7_m1m2m3m4_shieldl1m54 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 11.5x11.7 µm, M1M2M3M4, shield L1M5VPP_PERP_4sky130_fd_pr__cap_vpp_04p4x04p6_m1m2m3_shieldl1m5_floatm44 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 4.4x4.6 µm, M1M2M3, shield L1M5, floating M4VPP_PERP_5sky130_fd_pr__cap_vpp_08p6x07p8_m1m2m3_shieldl1m5_floatm44 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 8.6x7.8 µm, M1M2M3, shield L1M5, floating M4VPP_PERP_6sky130_fd_pr__cap_vpp_11p5x11p7_m1m2m3_shieldl1m5_floatm44 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 11.5x11.7 µm, M1M2M3, shield L1M5, floating M4VPP_PERP_7sky130_fd_pr__cap_vpp_11p5x11p7_l1m1m2m3_shieldm44 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 11.5x11.7 µm, L1M1M2M3, shield M4VPP_PERP_8sky130_fd_pr__cap_vpp_06p8x06p1_l1m1m2m3_shieldpom44 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 6.8x6.1 µm, L1M1M2M3, shield PoM4VPP_PERP_9sky130_fd_pr__cap_vpp_06p8x06p1_m1m2m3_shieldl1m44 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 6.8x6.1 µm, M1M2M3, shield L1M4VPP_PERP_10sky130_fd_pr__cap_vpp_11p3x11p8_l1m1m2m3m4_shieldm5_nhvtop4 (p,n,t,b)VPP (Perpendicular)VPP perpendicular capacitor, 11.3x11.8 µm, L1M1M2M3M4, shield M5, NHV topDigital CellsThe full range of SKY130's Standard Cell Libraries also work with the Sky130 PDK, they are far too numerous to name here but excellent documentation is available at:https://diychip.org/sky130/. We allow users to select from each of the libraries using the following import statements:Library NameImport Statementsky130_fd_sc_hdimport sky130.digital_cells.high_density as hdsky130_fd_sc_hdllimport sky130.digital_cells.low_leakage as hdllsky130_fd_sc_hsimport sky130.digital_cells.high_speed as hssky130_fd_sc_hvlimport sky130.digital_cells.high_voltage as hvlsky130_fd_sc_lpimport sky130.digital_cells.low_power as lpsky130_fd_sc_lsimport sky130.digital_cells.low_speed as lssky130_fd_sc_msimport sky130.digital_cells.medium_speed as msIf you like to load all the digital simultaneously, you can also import the entire digital library by callingfrom sky130_hdl21.digital_cells import *, although - this can take a while.Each component is reflects the naming in DIYChip's documentation as well as their ports, for example:importsky130_hdl21.digital_cells.high_densityashdfromsky130_hdl21importSky130LogicParamsasparamp=param()simple_or=hd.or2_0(p)Developmentpip install -e ".[dev]"