Package: gf180-hdl21
GF 180 MCU - Hdl21 PDK ModuleHdl21 PDK package for the open-source Global Foundries 180nm MCU PDK.https://pypi.org/project/gf180-hdl21/About This TechnologyThe GF180MCU open source PDK is a collaboration between Google and GlobalFoundries to provide a fully open source process design kit (PDK) and related resources to enable the creation of designs manufacturable at GlobalFoundries's facility on their 0.18um 3.3V/6V MCU process technology.InstallationInstall from PyPi via:pip install gf180-hdl21And then import the package asgf180-hdl21:importgf180_hdl21Developmentpip install -e ".[dev]"PDKInstallDataSilicon process technologies generally require non-Python data to execute simulations and other tasks. Gf180 is no different.Those files are not distributed as part of this package.TheGf180package defines an Hdl21PdkInstallationtypegf180.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 180nm PDK:https://anaconda.org/litex-hub/open_pdks.gf180mcuCInstallable withcondavia:conda install -y -c litex-hub open_pdks.gf180mcuCUsing the conda-based installation, a typicalsitepdksmodule might look like:CONDA_PREFIX=os.environ.get("CONDA_PREFIX")model_lib=Path(CONDA_PREFIX)/"share/pdk/gf180mcuC/libs.tech/ngspice/sm141064.Model"importgf180_hdl21gf180_hdl21.install=gf180_hdl21.Install(model_lib=model_lib)Note the conda-based installation supports simulation solely withngspice. Gf180 models compatible with Sandia Labs'Xycehave been generated by the community, but are less straightforward to find, install, and revision control.If you would prefer a local installation, another great method is to use the Volare open_pdk build manager.About this PDK Packagegf180defines a set ofhdl21.ExternalModules comprising the essential devices of the GlobalFoundries 180nm open-source PDK, '
and ancompilemethod for converting process-portablehdl21.Primitiveelements into these modules.There are two major ways to instantiate PDK components offered in this PDK module:CompilationWe first show an example of how this is done using MOSFETs:importhdl21ashimportgf180_hdl21# Use Hdl21 PDK-agnostic Mos primitivemosfet=h.Mos(tp=h.MosType.NMOS,family=h.MosFamily.CORE)# This now the correct Gf180 ExternalModulegf180_hdl21.compile(mosfet)But this will also work for other components, but these devices don't enjoy the same flexibility as MOSFETs, eg.:importhdl21ashimportgf180_hdl21# Use Hdl21 PDK-agnostic resistorsresistor=h.Resistor(model="rm1")# This is now the correct Gf180 External modulegf180.compile(resistor)Direct ReferenceAll Gf180ExternalModules are stored in themodulesnamespace that makes up the bulk of the PDK module. You can use it to referenceExternalModules directly via component name:importgf180_hdl21fromgf180_hdl21.primitivesasgp=gf180_hdl21.GF180MosParams(w=3*µ,l=3*µ)# This is the ExternalModule we wantmosfet=g.PFET_3p3V(p)The complete 180nm design kit includes hundreds of devices.
A subset are targets for conversion from generic Hdl21Primitives.We include them below, two general attributes to note, the first is "Component Name" which is the name that we give the component in the PDK module.The second is the "Model Name" which refers to the underlying subcircuit or model name found in the Gf180 SPICE files, should you want to look up the device in the PDK documentation itself.MOSFETsMOSFETs in Hdl21 are designed to be PDK-agnostic, making it possible select the desired MOS using either model compilation:importgf180_hdl21fromhdl21.primitivesimportMos,MosType,MosFamilya=Mos(tp=MosType.NMOS,family=MosFamily.CORE)gf180_hdl21.compile(a)# a is now an instance of gf180.primitives.NFET_3p3VOr 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µfromgf180_hdl21importGF180MosParamsaspimportgf180_hdl21.primitivesasga=g.NFET_3p3V(p(w=0.2*µ,nf=1))Component NameMos TypeMos FamilyModel NamePortsPFET_3p3VPMOSCOREpfet_03v3d, g, s, bNFET_3p3VNMOSCOREnfet_03v3d, g, s, bNFET_6p0VNMOSIOnfet_06v0d, g, s, bPFET_6p0VPMOSIOpfet_06v0d, g, s, bNFET_3p3V_DSSNMOSNONEnfet_03v3_dssd, g, s, bPFET_3p3V_DSSPMOSNONEpfet_03v3_dssd, g, s, bNFET_6p0V_DSSNMOSNONEnfet_06v0_dssd, g, s, bPFET_6p0V_DSSPMOSNONEpfet_06v0_dssd, g, s, bNFET_6p0V_NATNMOSNONEnfet_06v0_nvtd, g, s, bResistorsResistors are not offered with PDK-agnostic compilation and so must be referred to directly with the correct paramtype:fromhdl21.prefiximportµfromgf180_hdl21importGF180ResParamsaspfromgf180_hdl21.primitivesimportNPLUS_Ua=NPLUS_U(p(r_length=0.3*µ,r_width=0.18*µ))Component NameModel NamePortsNPLUS_Unplus_up, n, bPPLUS_Upplus_up, n, bNPLUS_Snplus_sp, n, bPPLUS_Spplus_sp, n, bNWELLnwellp, n, bNPOLYF_Unpolyf_up, n, bPPOLYF_Uppolyf_up, n, bNPOLYF_Snpolyf_sp, n, bPPOLYF_Sppolyf_sp, n, bPPOLYF_U_1Kppolyf_u_1kp, n, bPPOLYF_U_2Kppolyf_u_2kp, n, bPPOLYF_U_1K_6P0ppolyf_u_1k_6p0p, n, bPPOLYF_U_2K_6P0ppolyf_u_2k_6p0p, n, bPPOLYF_U_3Kppolyf_u_3kp, n, bRM1rm1p, nRM2rm2p, nRM3rm3p, nTM6Ktm6kp, nTM9Ktm9kp, nTM11Ktm11kp, nTM30Ktm30kp, nDiodesDiodes are not offered with PDK-agnostic compilation and so must be referred to directly with the correct paramtype:fromhdl21.prefiximportµ,pfromgf180_hdl21importGF180DiodeParamsasparfromgf180_hdl21.primitivesimportNDSPS_3p3Va=NDSPS_3p3V(par(area=0.3*p,pj=1.2*µ))Component NameModel NamePortsND2PS_3p3Vdiode_nd2ps_03v3p, nPD2NW_3p3Vdiode_pd2nw_03v3p, nND2PS_6p0Vdiode_nd2ps_06v0p, nPD2NW_6p0Vdiode_pd2nw_06v0p, nNW2PS_3p3Vdiode_nw2ps_03v3p, nNW2PS_6p0Vdiode_nw2ps_06v0p, nPW2DWdiode_pw2dwp, nDW2PSdiode_dw2psp, nSchottkysc_diodep, nBJTsBJTs are not offered with PDK-agnostic compilation and so must be referred to directly with the correct paramtype:fromhdl21.prefiximportµ,pfromgf180_hdl21importGF180BipolarParamsasparfromgf180_hdl21.primitivesimportPNP_10p0x0p42a=PNP_10p0x0p42(par(m=2))Component NameModel NamePortsPNP_10p0x0p42pnp_10p00x00p42c, b, ePNP_5p0x0p42pnp_05p00x00p42c, b, ePNP_10p0x10p0pnp_10p00x10p00c, b, ePNP_5p0x5p0pnp_05p00x05p00c, b, eNPN_10p0x10p0npn_10p00x10p00c, b, e, sNPN_5p0x5p0npn_05p00x05p00c, b, e, sNPN_0p54x16p0npn_00p54x16p00c, b, e, sNPN_0p54x8p0npn_00p54x08p00c, b, e, sNPN_0p54x4p0npn_00p54x04p00c, b, e, sNPN_0p54x2p0npn_00p54x02p00c, b, e, sCapacitorsCapacitors are not offered with PDK-agnostic compilation and so must be referred to directly with the correct paramtype:fromhdl21.prefiximportµfromgf180_hdl21importGF180CapParamsasparfromgf180_hdl21.primitivesimportMIM_1p5fFa=MIM_1p5fF(par(c_width=1*µ,c_length=1*µ))Component NameModel NamePortsMIM_1p5fFcap_mim_1f5fFp, nMIM_1p0fFcap_mim_1f0fFp, nMIM_2p0fFcap_mim_2f0fFp, nPMOS_3p3Vcap_pmos_03v3p, nNMOS_6p0Vcap_nmos_06v0p, nPMOS_6p0Vcap_pmos_06v0p, nNMOS_3p3Vcap_nmos_03v3p, nNMOS_Nwell_3p3Vcap_nmos_03v3_bp, nPMOS_Pwell_3p3Vcap_pmos_03v3_bp, nNMOS_Nwell_6p0Vcap_nmos_06v0_bp, nPMOS_Pwell_6p0Vcap_pmos_06v0_bp, nDigital CellsThe PDK is also distributed with two standard cell libraries that we callseven_trackandnine_track. These are distributed withgf180-hdl21as separate name spaces that can be accessed in a similar manner tomodules:fromgf180_hdl21.digital_cells.seven_trackasd7fromgf180_hdl21.digital_cells.nine_trackasd9These cells are named in their spice files inlibs.refof a normalopen_pdkinstall asgf_180_fd_sc_******__device, to find the corresponding device in the digital name space, usedevice, eg.fromgf180_hdl21.digital_cells.seven_trackasd7fromgf180_hdl21importGF180LogicParamsaspsimple_and_gate=d7.and2_1(p())The devices in all are too numerous to cover here, but are covered in great detail in theofficial PDK documentation.