Certain Models not being found/read properly (SKY130)

619 views
Skip to first unread message

cram...@asu.edu

unread,
Nov 27, 2021, 5:02:24 AM11/27/21
to xyce-users
Hi,
I have been running experiments on sky130.
I am just trying to generate IV curves/ gmID database for the same.
Here is the netlist below
NETLIST
.options nonlin continuation=gmin
.options timeint method=trap
.options device temp=25
**.options output initial_interval=1e-8
**.options parser model_binning=true
.options parser scale=1

* Model Includes and Std Cell Includes

.param mc_mm_switch=0
.param mc_pr_switch=0
**.lib "../../../PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130.lib.spice" tt
.lib "/home/chandru/PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130.lib.spice" tt


.param kw = 1
.param pvdd = 1.8

* --- Voltage Sources ---
vdd   supply  0 dc 'pvdd'
vsig  vi  0 dc 'pvdd'

* --- MOS Instances---
*    d     G  S B
XM1 supply vi 0 0 sky130_fd_pr__nfet_01v8_lvt L=0.15 W=0.42
XM2 supply vi 0 0 sky130_fd_pr__nfet_01v8 L=0.15 W=0.42
XM3 0 vi supply 0 sky130_fd_pr__pfet_01v8_lvt L=0.15 W=0.42
XM4 0 vi supply 0 sky130_fd_pr__pfet_01v8 L=0.15 W=0.42
XM5 0 vi supply 0 sky130_fd_pr__pfet_01v8_hvt L=0.15 W=0.42
XM6 supply vi 0 0 sky130_fd_pr__nfet_03v3_nvt L=0.15 W=0.42
XM7 supply vi 0 0 sky130_fd_pr__nfet_05v0_nvt L=0.15 W=0.42


*MM0 supply vi 0 0  nmos_slvt tfin=6.5n l=7n nfin='kw'
*Idd supply drn0 dc 1m
*Rg vi drn0 1m
*Xinv1  vi 1 supply 0 mg_inv
*Xinv2  1 2 supply 0 mg_inv
*Xinv3  2 3 supply 0 mg_inv
*Xinv4  3 4 supply 0 mg_inv
*Xinv5  4 vo supply 0 mg_inv

* --- DC Analysis ---
.op
.DC vsig 0 1.8 0.1

.print dc FORMAT=GNUPLOT V(vi)
.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:Vth)
.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:gds)
.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:gm)
.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:Vdsat)
.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:Vth)
.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:gds)
.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:gm)
.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:Vdsat)
.print dc FORMAT=GNUPLOT ID(XM2:MSKY130_FD_PR__NFET_01V8)
**.print dc FORMAT=GNUPLOT I(XM2)
**.print dc FORMAT=GNUPLOT N(XM3:msky130_fd_pr__pfet_01v8_lvt:Vth)
**.print dc FORMAT=GNUPLOT N(XM3:msky130_fd_pr__pfet_01v8_lvt:gds)
**.print dc FORMAT=GNUPLOT N(XM3:msky130_fd_pr__pfet_01v8_lvt:gm)
**.print dc FORMAT=GNUPLOT N(XM3:msky130_fd_pr__pfet_01v8_lvt:Vdsat)
.print dc FORMAT=GNUPLOT N(XM4:MSKY130_FD_PR__PFET_01V8:Vth)
.print dc FORMAT=GNUPLOT N(XM4:MSKY130_FD_PR__PFET_01V8:gds)
.print dc FORMAT=GNUPLOT N(XM4:MSKY130_FD_PR__PFET_01V8:gm)
.print dc FORMAT=GNUPLOT N(XM4:MSKY130_FD_PR__PFET_01V8:Vdsat)
.print dc FORMAT=GNUPLOT N(XM5:MSKY130_FD_PR__PFET_01V8_HVT:Vth)
.print dc FORMAT=GNUPLOT N(XM5:MSKY130_FD_PR__PFET_01V8_HVT:gds)
.print dc FORMAT=GNUPLOT N(XM5:MSKY130_FD_PR__PFET_01V8_HVT:gm)
.print dc FORMAT=GNUPLOT N(XM5:MSKY130_FD_PR__PFET_01V8_HVT:Vdsat)
*.print dc FORMAT=GNUPLOT N(XM6:MSKY130_FD_PR__PFET_01V8:Vth)
*.print dc FORMAT=GNUPLOT N(XM6:MSKY130_FD_PR__PFET_01V8:gds)
*.print dc FORMAT=GNUPLOT N(XM6:MSKY130_FD_PR__PFET_01V8:gm)
*.print dc FORMAT=GNUPLOT N(XM6:MSKY130_FD_PR__PFET_01V8:Vdsat)
*.print dc FORMAT=GNUPLOT N(XM7:MSKY130_FD_PR__PFET_01V8:Vth)
*.print dc FORMAT=GNUPLOT N(XM7:MSKY130_FD_PR__PFET_01V8:gds)
*.print dc FORMAT=GNUPLOT N(XM7:MSKY130_FD_PR__PFET_01V8:gm)
*.print dc FORMAT=GNUPLOT N(XM7:MSKY130_FD_PR__PFET_01V8:Vdsat)

.print dc FORMAT=GNUPLOT I(*) V(*)

*.print dc FORMAT=GNUPLOT N(XM1:VDSSAT)
*.print dc FORMAT=GNUPLOT N(XM1:VGS)
*.print dc FORMAT=GNUPLOT N(XM1:VDS)
*.print dc FORMAT=GNUPLOT N(XM1:GDS)
*.print dc FORMAT=GNUPLOT {kw}
*.print dc FORMAT=GNUPLOT N(XM1:CGG)
**.print tran {v(vi)+1} {v(vo)+1}
**comp {v(vi)+1} reltol=1e-2
**comp {v(vo)+1} reltol=1e-2  abstol=1e-5 zerotol=1e-8
.end


LOG RESULTS
*****
***** Welcome to the Xyce(TM) Parallel Electronic Simulator
*****
***** This is version Xyce DEVELOPMENT-202111250123-(Public_Release-7.4.0-56-g82a079af)-opensource
***** Date: Sat Nov 27 01:53:23 PST 2021


***** Executing netlist sky130_IV.netlist

***** Reading and parsing netlist...
Netlist error in file
 /home/chandru/PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/corners/../../../libs.ref/sky130_fd_pr/spice/sky130_fd_pr__pfet_01v8_lvt__tt.pm3.spice
 at or near line 33
 Model is required for device MSKY130_FD_PR__PFET_01V8_LVT and no valid model
 card found.
Netlist error in file
 /home/chandru/PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/corners/../../../libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_03v3_nvt.pm3.spice
 at or near line 33
 Model is required for device MSKY130_FD_PR__NFET_03V3_NVT and no valid model
 card found.
Netlist error in file
 /home/chandru/PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/corners/../../../libs.ref/sky130_fd_pr/spice/sky130_fd_pr__nfet_05v0_nvt.pm3.spice
 at or near line 36
 Model is required for device MSKY130_FD_PR__NFET_05V0_NVT and no valid model
 card found.
Simulation aborted due to error.  There are 0 MSG_FATAL errors and 3 MSG_ERROR
 errors
*** Xyce Abort ***

Notes:
The issue is the skywater foundry provides the models in the same format for all the 7 transistors
sky130_fd_pr__nfet_01v8_lvt
sky130_fd_pr__nfet_01v8
sky130_fd_pr__pfet_01v8_lvt
sky130_fd_pr__pfet_01v8
sky130_fd_pr__pfet_01v8_hvt
sky130_fd_pr__nfet_03v3_nvt
sky130_fd_pr__nfet_05v0_nvt 
3 Transistors in ref fail without much specifics.
Can the Xyce team provide feedback on whether this is a netlist or sky130 model issue ? I am assuming that this cant be an issue with Xyce.
Thanks in advance!


xyce-users

unread,
Nov 27, 2021, 1:45:00 PM11/27/21
to xyce-users
The Xyce team is on holiday break at the moment, so you are unlikely to get a definitive answer right away on this.

The "Model is required for device <whatever> and no valid model card found" error is one of the more annoyingly cryptic errors that Xyce produces, and it has come up often in this forum and in private email to Xyce group.

When looking for a model to go with a device instance line, Xyce has to look through its collection of model cards and decide which one to use.  Because of the way that it parses the line, it may have to try and reject several before deciding either that it has gotten what it needs or cannot get what it needs, having rejected some as "not valid" for whatever reason.  By the time it reaches this conclusion, all record of what it tried and rejected is pretty much forgotten and so all it can say is "I didn't find a valid one" --- which could mean it found an invalid one or didn't find any of the appropriate name.  It can be difficult to track down why.

To figure out what's going on here, you'd have to figure out which model cards the specified instance uses, and then to work out why Xyce refuses to use it.  When Xyce parses an instance line, it scans forward from the instance name field looking for any field that matches a model name it recognizes.  If it finds a recognized model name, it then checks to see if this model card is of the appropriate type (e.g., that it is an NMOS or PMOS if the device instance is an "M" device), and is appearing late enough in the line to allow for all the required nodes for a model of that type.  If it occurs too early, the model name is invalid (and is assumed instead to be a node name).  It then continues to parse the line looking for a different field with a recognized model name.

Binning complicates this, because the model name match is not exact --- one needs to find both a base model name *and* a binned model name whose LMIN/LMAX, WMIN/WMAX (or other appropriate binning parameter) matches the sizes of the instance. 

There are additional tests on model validity, but I am not immediately able to quote what they are.  The two above are responsible for most of the problems that aren't "the named model doesn't exist."

If it hits the end of the line without finding any model card that names a valid model for that device, it prints that message.  It does not emit any warnings when it rejects a model name during this process, because that model name might in fact be a legitimate node name, too.  In fact, this whole problem exists because of the way the parser was set up to allow node names to have the same name as some model name elsewhere in the circuit.  Much (much, much) older versions of Xyce used not to allow that, and it was a problem for some customers.  Fixing *that* required being less specific in the error message when a valid model cannot be found.

If I were betting on it, the odds are good that the issue here is that the model cards *intended* for use with these instances specify a model type that in some simulators allows some optional nodes to be omitted, and the instance does omit them.  There are a few model types where Xyce is unable to support the full range of optional nodes that the original model developers try to support (the most notable example of this is the BSIM4 SOI model (model levels 70 or 70450), which has an insane number of possible combinations of optional nodes) .  So if Xyce happens to require more nodes for that model type than are provided on the instance lines that use them, Xyce will be declaring those model names "invalid" based on where they appear in the line, and skipping over them.

I'm sorry I can't offer more specific guidance as to why these particular models are being rejected, but the core issue will be something like "not enough nodes on the instance line" or "no matching bin".

xyce-users

unread,
Nov 27, 2021, 1:52:41 PM11/27/21
to xyce-users

The good news, however, is that the devices in question do not appear to be using the BSIM4 SOI model, they are using MOSFET model 54 (BSIM4, not BSIM4 SOI).  So the "not enough nodes" issue is not likely the problem.

More likely is some sort of problem regarding binning.  I cannot investigate further this weekend.

xyce-users

unread,
Nov 27, 2021, 3:08:27 PM11/27/21
to xyce-users

The most likely reason for this is that you're trying to use L=.15, W=.42 with no scale modifiers on your X lines, and are running with the scale option of 1.

This is trying to use .15 and .42 *meter* lengths in the BSIM4.  There is no model card that is valid for devices of such an enormous scale.

The ".options parser scale" option works to scale length and width of many (but not all) devices.  The BSIM4 (level 54 MOSFET) is one where it works.  So for this netlist you might have better luck if you use ".options parser scale=" to set a scale value so that the lengths and widths are scaled appropriately, or add appropriate modifiers (m, u, n, p, or e-3, e-6,e-9, e-12, etc.) to ".15" and ".42" to make them into the actual size (in meters) that you want.

cram...@asu.edu

unread,
Dec 8, 2021, 3:43:26 PM12/8/21
to xyce-users
Sorry for the delay in getting back, 
I reran with the scale option = 1E-6 and the results are still the same. 
I decided to write a small python script which loops through mean bin values (lmin+lmax)/2 and (wmin+wmax)/2 and I still see an issue with binning.
I am using here scale =1E-6 and provide values in Meters. 
Seems to still be an issue with binning it seems, kindly correct me if possible. 
If there is a way to debug binning and provide additional warning or status messages it would be helpful.
I also got some feedback that these sky models were perhaps in a "beta"  release of sorts. 


Netlist:

.options nonlin continuation=gmin

.options timeint method=trap

.options device temp=25

**.options output initial_interval=1e-8

.options parser model_binning=true

* Scale the values of the device parameters

*.options parser scale=1E-6

* -- Model Includes and Std Cell Includes --

.param mc_mm_switch=0

.param mc_pr_switch=0

.lib "../../../PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130.lib.spice" tt

**.lib "/home/chandru/PDK/open_pdks/sky130/sky130A/libs.tech/ngspice/sky130.lib.spice" tt


**.include "../../../PDK/skywater-pdk/libraries/sky130_fd_pr/latest/models/r+c/res_typical__cap_typical__lin.spice"

**.include "../../../PDK/skywater-pdk/libraries/sky130_fd_pr/latest/models/r+c/res_typical__cap_typical.spice"
**.lib ../../../PDK/skywater-pdk/libraries/sky130_fd_pr/latest/models/sky130.lib.spice tt


.param kw = 1

.param pvdd = 1.8

* --- Voltage Sources ---

vdd supply 0 dc 'pvdd'

vsig vi 0 dc 'pvdd'

* --- Mos Subcircuit ---

* d G S B (Uncomment as you run a specific MOS)

*XM1 supply vi 0 0 sky130_fd_pr__nfet_01v8_lvt L=0.15 W=0.42

*XM2 supply vi 0 0 sky130_fd_pr__nfet_01v8 L=0.15 W=0.42

*XM3 0 vi supply 0 sky130_fd_pr__pfet_01v8_lvt L=0.15 W=0.42

*XM4 0 vi supply 0 sky130_fd_pr__pfet_01v8 L=0.15 W=0.42

*XM5 0 vi supply 0 sky130_fd_pr__pfet_01v8_hvt L=0.15 W=0.42

*XM6 supply vi 0 0 sky130_fd_pr__nfet_03v3_nvt L=0.15 W=0.42

*XM7 supply vi 0 0 sky130_fd_pr__nfet_05v0_nvt L=0.15 W=0.42


* --- Analysis ---

*.tran 10n 5u

.op

.DC vsig 0 1.8 0.1

*.DC kw 1 20 1

*.DC Idd 0 100e-3 0.05e-3

* --- Result Print---


.print dc FORMAT=GNUPLOT V(vi)

.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:Vth)

.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:gds)

.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:gm)

.print dc FORMAT=GNUPLOT N(XM1:MSKY130_FD_PR__NFET_01V8_lvt:Vdsat)

.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:Vth)

.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:gds)

.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:gm)

.print dc FORMAT=GNUPLOT N(XM2:MSKY130_FD_PR__NFET_01V8:Vdsat)

.print dc FORMAT=GNUPLOT ID(XM2:MSKY130_FD_PR__NFET_01V8)

**.print dc FORMAT=GNUPLOT I(XM2)

**.print dc FORMAT=GNUPLOT N(XM3:msky130_fd_pr__pfet_01v8_lvt:Vth)

**.print dc FORMAT=GNUPLOT N(XM3:msky130_fd_pr__pfet_01v8_lvt:gds)

.end

Python Script

import argparse

import os

import sys

if __name__ == "__main__":

    parser = argparse.ArgumentParser(description="Simulation input")

    parser.add_argument('--filename', help='inputs spice file',required=True)

    parser.add_argument('--mostype', help='Mosfet Type', required=True, nargs='+' , default=[])

    # Model Name

    run_dict = {

        "pfet_lvt" : {                              # lmin    lmax    wmin     wmax

        "sky130_fd_pr__pfet_01v8_lvt__model.0"  : [2.0e-05 , 1.0e-04 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.1"  : [8e-06 , 2.0e-05 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.2"  : [4e-06 , 8e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.3"  : [2e-06 , 4e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.4"  : [1.5e-06 , 2e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.5"  : [1e-06 , 1.5e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.6"  : [5e-07 , 1e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.7"  : [3.5e-07 , 5e-07 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__pfet_01v8_lvt__model.8"  : [2.0e-05 , 1.0e-04 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.9"  : [8e-06 , 2.0e-05 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.10"  : [4e-06 , 8e-06 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.11"  : [2e-06 , 4e-06 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.12"  : [1.5e-06 , 2e-06 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.13"  : [1e-06 , 1.5e-06 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.14"  : [5e-07 , 1e-06 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.15"  : [3.5e-07 , 5e-07 , 5.0e-06 , 7.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.16"  : [2.0e-05 , 1.0e-04 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.17"  : [8e-06 , 2.0e-05 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.18"  : [4e-06 , 8e-06 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.19"  : [2e-06 , 4e-06 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.20"  : [1.5e-06 , 2e-06 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.21"  : [1e-06 , 1.5e-06 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.22"  : [5e-07 , 1e-06 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.23"  : [3.5e-07 , 5e-07 , 3.0e-06 , 5.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.24"  : [2.0e-05 , 1.0e-04 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.25"  : [8e-06 , 2.0e-05 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.26"  : [4e-06 , 8e-06 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.27"  : [2e-06 , 4e-06 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.28"  : [1.5e-06 , 2e-06 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.29"  : [1e-06 , 1.5e-06 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.30"  : [5e-07 , 1e-06 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.31"  : [3.5e-07 , 5e-07 , 1e-06 , 3.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.32"  : [2.0e-05 , 1.0e-04 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.33"  : [8e-06 , 2.0e-05 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.34"  : [4e-06 , 8e-06 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.35"  : [2e-06 , 4e-06 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.36"  : [1.5e-06 , 2e-06 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.37"  : [1e-06 , 1.5e-06 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.38"  : [5e-07 , 1e-06 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.39"  : [3.5e-07 , 5e-07 , 5.5e-07 , 1.0e-6],

        "sky130_fd_pr__pfet_01v8_lvt__model.40"  : [2.0e-05 , 1.0e-04 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.41"  : [8e-06 , 2.0e-05 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.42"  : [4e-06 , 8e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.43"  : [2e-06 , 4e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.44"  : [1.5e-06 , 2e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.45"  : [1e-06 , 1.5e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.46"  : [5e-07 , 1e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__pfet_01v8_lvt__model.47"  : [3.5e-07 , 5e-07 , 4.2e-07 , 5.5e-7],

        },

        "nfet_lvt": {

        "sky130_fd_pr__nfet_01v8_lvt__model.0" : [8e-06 , 1.0e-04 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.1" : [4e-06 , 8e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.2" : [2e-06 , 4e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.3" : [1e-06 , 2e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.4" : [5e-07 , 1e-06 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.5" : [2.5e-07 , 5e-07 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.6" : [1.8e-07 , 2.5e-07 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.7" : [1.5e-07 , 1.8e-07 , 7e-06 , 1.0e-4],

        "sky130_fd_pr__nfet_01v8_lvt__model.8" : [8e-06 , 1.0e-04 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.9" : [4e-06 , 8e-06 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.10" :  [2e-06 , 4e-06 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.11" :  [1e-06 , 2e-06 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.12" :  [5e-07 , 1e-06 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.13" :  [2.5e-07 , 5e-07 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.14" :  [1.8e-07 , 2.5e-07 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.15" :  [1.5e-07 , 1.8e-07 , 5.05e-06 , 7.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.16" :  [8e-06 , 1.0e-04 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.17" :  [4e-06 , 8e-06 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.18" :  [2e-06 , 4e-06 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.19" :  [1e-06 , 2e-06 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.20" :  [5e-07 , 1e-06 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.21" :  [2.5e-07 , 5e-07 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.22" :  [1.8e-07 , 2.5e-07 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.23" :  [1.5e-07 , 1.8e-07 , 5.0e-06 , 5.05e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.24" :  [8e-06 , 1.0e-04 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.25" :  [4e-06 , 8e-06 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.26" :  [2e-06 , 4e-06 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.27" :  [1e-06 , 2e-06 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.28" :  [5e-07 , 1e-06 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.29" :  [2.5e-07 , 5e-07 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.30" :  [1.8e-07 , 2.5e-07 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.31" :  [1.5e-07 , 1.8e-07 , 3.01e-06 , 5.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.32" :  [8e-06 , 1.0e-04 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.33" :  [4e-06 , 8e-06 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.34" :  [2e-06 , 4e-06 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.35" :  [1e-06 , 2e-06 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.36" :  [5e-07 , 1e-06 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.37" :  [2.5e-07 , 5e-07 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.38" :  [1.8e-07 , 2.5e-07 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.39" :  [1.5e-07 , 1.8e-07 , 3.0e-06 , 3.01e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.40" :  [8e-06 , 1.0e-04 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.41" :  [4e-06 , 8e-06 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.42" :  [2e-06 , 4e-06 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.43" :  [1e-06 , 2e-06 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.44" :  [5e-07 , 1e-06 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.45" :  [2.5e-07 , 5e-07 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.46" :  [1.8e-07 , 2.5e-07 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.47" :  [1.5e-07 , 1.8e-07 , 1.65e-06 , 3.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.48" :  [8e-06 , 1.0e-04 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.49" :  [4e-06 , 8e-06 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.50" :  [2e-06 , 4e-06 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.51" :  [1e-06 , 2e-06 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.52" :  [5e-07 , 1e-06 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.53" :  [2.5e-07 , 5e-07 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.54" :  [1.8e-07 , 2.5e-07 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.55" :  [1.5e-07 , 1.8e-07 , 1e-06 , 1.65e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.56" :  [8e-06 , 1.0e-04 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.57" :  [4e-06 , 8e-06 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.58" :  [2e-06 , 4e-06 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.59" :  [1e-06 , 2e-06 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.60" :  [5e-07 , 1e-06 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.61" :  [2.5e-07 , 5e-07 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.62" :  [1.8e-07 , 2.5e-07 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.63" :  [1.5e-07 , 1.8e-07 , 8.4e-07 , 1.0e-6],

        "sky130_fd_pr__nfet_01v8_lvt__model.64" :  [8e-06 , 1.0e-04 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.65" :  [4e-06 , 8e-06 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.66" :  [2e-06 , 4e-06 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.67" :  [1e-06 , 2e-06 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.68" :  [5e-07 , 1e-06 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.69" :  [2.5e-07 , 5e-07 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.70" :  [1.8e-07 , 2.5e-07 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.71" :  [1.5e-07 , 1.8e-07 , 6.4e-07 , 8.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.72" :  [8e-06 , 1.0e-04 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.73" :  [4e-06 , 8e-06 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.74" :  [2e-06 , 4e-06 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.75" :  [1e-06 , 2e-06 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.76" :  [5e-07 , 1e-06 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.77" :  [2.5e-07 , 5e-07 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.78" :  [1.8e-07 , 2.5e-07 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.79" :  [1.5e-07 , 1.8e-07 , 5.5e-07 , 6.4e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.80" :  [8e-06 , 1.0e-04 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.81" :  [4e-06 , 8e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.82" :  [2e-06 , 4e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.83" :  [1e-06 , 2e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.84" :  [5e-07 , 1e-06 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.85" :  [2.5e-07 , 5e-07 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.86" :  [1.8e-07 , 2.5e-07 , 4.2e-07 , 5.5e-7],

        "sky130_fd_pr__nfet_01v8_lvt__model.87" :  [1.5e-07 , 1.8e-07 , 4.2e-07 , 5.5e-7],

                },

        "nfet_3v3" : {

        "sky130_fd_pr__nfet_03v3_nvt__model.0" : [4.95e-07, 5.05e-07, 9.995e-06 ,1.0005e-5],

        "sky130_fd_pr__nfet_03v3_nvt__model.1" : [4.95e-07, 5.05e-07, 9.95e-07  ,1.005e-6],

        "sky130_fd_pr__nfet_03v3_nvt__model.2" : [5.95e-07, 6.05e-07, 9.95e-07  ,1.005e-6],

        "sky130_fd_pr__nfet_03v3_nvt__model.3" : [4.95e-07, 5.05e-07, 3.995e-06 ,4.005e-6],

        "sky130_fd_pr__nfet_03v3_nvt__model.4" : [4.95e-07, 5.05e-07, 4.15e-07  ,4.25e-7],

        "sky130_fd_pr__nfet_03v3_nvt__model.5" : [5.95e-07, 6.05e-07, 4.15e-07  ,4.25e-7],

        "sky130_fd_pr__nfet_03v3_nvt__model.6" : [7.95e-07, 8.05e-07, 4.15e-07  ,4.25e-7],

        "sky130_fd_pr__nfet_03v3_nvt__model.7" : [4.95e-07, 5.05e-07, 6.95e-07  ,7.05e-7],

        "sky130_fd_pr__nfet_03v3_nvt__model.8" : [5.95e-07, 6.05e-07, 6.95e-07  ,7.05e-7],

        }

    }

    args= parser.parse_args()

    fileh = open(args.filename)

    spfile = (fileh.read())

    for mostype in args.mostype:

        os.system(f'mkdir -p {mostype}')

        for binname, binval in run_dict[mostype].items():

            if  mostype == 'pfet_lvt':

                print("Type", mostype, binname)

                Lnew=1e6*(binval[0] + binval[1])/2

                Wnew=1e6*(binval[2] + binval[3])/2

                newspfile = spfile.replace("L=0.15 W=0.42", f'L={Lnew} W={Wnew}').replace("*XM3", "XM3")

            elif mostype == 'nfet_lvt':

                print("Type", mostype, binname)

                Lnew=1e6*(binval[0] + binval[1])/2

                Wnew=1e6*(binval[2] + binval[3])/2

                newspfile = spfile.replace("L=0.15 W=0.42", f'L={Lnew} W={0.42}').replace("*XM1", "XM1")

            elif mostype == 'nfet_3v3':

                print("Type", mostype, binname)

                Lnew=1e6*(binval[0] + binval[1])/2

                Wnew=1e6*(binval[2] + binval[3])/2

                newspfile = spfile.replace("L=0.15 W=0.42", f'L={Lnew} W={Wnew}').replace("*XM6", "XM6")

            filen = open(f'{mostype}/{binname}', mode='w')

            filen.write(newspfile)

            filen.close()

            # Run Xyce 

            print(f'Running Xyce with Lnew:{Lnew} and Wnew:{Wnew}')

            os.system(f"~/Tools/XyceSerial/bin/Xyce {mostype}/{binname} -l {mostype}/{binname}.log")



Regards, 

cram...@asu.edu

unread,
Dec 8, 2021, 3:46:01 PM12/8/21
to xyce-users
Want to clarify that when I say I take the mean  I take the binwise (lmin + lmax)/2, (wmin + wmax)/2
Hopefully this is not a wrong approach.

xyce-users

unread,
Dec 9, 2021, 12:44:27 PM12/9/21
to xyce-users
Thanks for this information.  We'll take a look at this issue this week.

FYI, while binning mostly works in Xyce,  there are circumstances where it is known to break.  One such circumstance that comes to mind is if the L, W parameters are being swept in value using a command like .STEP.  Currently, the way binning is handled in Xyce is during the early setup.  If the L,W parameters get updated for any reason after the setup is over, then Xyce hasn't retained enough information to properly re-bin the models.     I haven't checked your circuit to see if this is the issue; I am mentioning it as an example problem with binning.

regards,
the Xyce team

xyce-users

unread,
Dec 9, 2021, 3:51:28 PM12/9/21
to xyce-users

In the netlist given above, you still aren't properly using "scale".  There is this line:

*.options parser scale=1E-6

but it is commented out. And, the L,W usage on the MOSFET instance lines obviously needs to be scaled.

I haven't run the netlist yet, but I am guessing that is the source of your problem. There may of course be other problems, but you'll need to fix this one first.

thanks,
The Xyce Team

cram...@asu.edu

unread,
Dec 9, 2021, 4:26:27 PM12/9/21
to xyce-users
I think thats my mistake while pasting, I was trying to use different combinations of scale (or removing) and the W/L to see if any particular combination works.
So I pasted the spice from on of my experiments. My bad. 

cram...@asu.edu

unread,
Dec 11, 2021, 8:47:33 PM12/11/21
to xyce-users
Just wanted to clarify the problem exists  even with the scale , updated the netlist below. 


Netlist:

.options nonlin continuation=gmin

.options timeint method=trap

.options device temp=25

**.options output initial_interval=1e-8

.options parser model_binning=true

* Scale the values of the device parameters
Reply all
Reply to author
Forward
0 new messages