Tim Edwards
05/08/2021, 12:53 AMsky130_fd_pr
device sky130_fd_pr__pnp_05v5_W3p40L3p40
has always had a problem that the layout pin names don't match the SPICE model pin names (the W0p68L0p68
device is worse, because the layout doesn't have any pins at all. . .). Also, the PNP devices cannot have a 4th substrate terminal because the collector is already equal to the substrate. I have a patch file now in open_pdks that changes the SPICE netlist pin names to "Base", "Collector", and "Emitter", and removes the 4th terminal. Can you please change the PNP device model in xschem to match?Stefan Schippers
05/11/2021, 8:37 AM.subckt sky130_fd_pr__pnp_05v5_W3p40L3p40 c b e s
so there are 4 pins in the order c-b-e-s (collector, base, emitter, substrate).
What is the equivalent layout order/naming?
Changing the symbol netlist rule is easy, but i don't know what to change without breaking spice netlist.
Of course in no circumstance should the substrate and the collector be different. I can enforce that by removing altogether the substrate pin and setting it equal to the collector pin in the generated netlist.Tim Edwards
05/11/2021, 1:47 PM.subckt sky130_fd_pr__pnp_05v5_W3p40L3p40 Collector Base Emitter
. It is easier to enforce that the collector and substrate must be the same by removing the substrate pin from the subcircuit call (the model is now called with Collector Base Emitter Collector
).Stefan Schippers
05/12/2021, 9:27 AMStefan Schippers
05/12/2021, 10:03 AM.include /mnt/sda7/home/schippes/pdks/sky130A/libs.tech/ngspice/sky130.lib.spice
that matches my install path. However:
1. ngspice takes ages to load models, i see tons of messages like: Warning: redefinition of .subckt sky130_fd_pr__res_generic_pd__hv, ignored
on all device models, after the last warning message simulation hangs sky130_fd_pr__pnp_05v5_W3p40L3p40
device with current/voltage sources to do a dc sweep. After that long time ngspice dies with this error: Error: unknown subckt: xq1 net2 net1 e1 sky130_fd_pr__pnp_05v5_w3p40l3p40 Simulation interrupted due to error!
2. I have the .spiceinit file with set ngbehavior=hsa
and set ng_nomodcheck
This is the first time i include models installed in the pdks/ directory, i used to include a patched version of the skywater-pdk/libraries/sky130_fd_pr_ngspice/latest/
, obtained by cloning (and patching) the skywater-pdk repo.
May be i am including the wrong file?Tim Edwards
05/12/2021, 1:31 PM.lib
with sky130.lib.spice
, not .include
, and give it a corner name as an argument.Stefan Schippers
05/13/2021, 7:36 AMStefan Schippers
05/13/2021, 8:20 AM.lib /home/schippes/sda7/pdks/sky130A/libs.tech/ngspice/sky130.lib.spice mc tt
.include /home/schippes/sda7/pdks/sky130A/libs.ref/sky130_fd_pr/spice/sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice
Stefan Schippers
05/13/2021, 8:41 AMTim Edwards
05/13/2021, 1:37 PM.lib
statement. Maybe it ignores the second? My method has been to add .param mc_mm_switch=0
at the top of the testbench. The mc
corner has been added for supporting statistical process variation; it cannot (should not?) be combined with another corner. The problem with the mismatch analysis switch is that I cannot find a way to have the parameter defined as 0 by default and overrided it when needed. If I put a .param line in the sky130.lib.spice file, then it becomes a permanent setting and I cannot override it. But unlike the statistical process variation, the mismatch switch can be combined with any process corner. The only solution I can think of is an ugly one, to double the number of entries in sky130.lib.spice and have separate entries for "corner without mismatch" and "corner with mismatch". But I really don't like that solution.Stefan Schippers
05/13/2021, 8:30 PM.lib .... tt mc
, and apparently it loads both library definitions. (tt, typical process corner and mc, montecarlo defs). But i cannot find any proof of that behavior in the manuals so a better approach would be to have 2 .lib lines.Tim Edwards
05/13/2021, 8:33 PMtt
and mc
have the same parameters in them, so only one of them can actually be in effect whether or not both of them are read, and there is no indication of which one would take precedence.Stefan Schippers
05/13/2021, 8:35 PMStefan Schippers
05/13/2021, 8:42 PMpdks/sky130A
is changed from the original skywater-pdk/libraries/sky130_fd_pr
(3 pins, different naming vs 4 pin). Are there other components that are changed?
I need to figure out in xschem_sky130
repository how to adapt the xschemrc to use the spice models (and stdcell netlists) as installed under pdks/sky130A. I think I need some advice from you to make things work with minimal end-user effort, i know you are already processing xschemrc in the open_pdks install phase.Tim Edwards
05/13/2021, 9:27 PM