Matt Venn
02/29/2024, 1:18 PMMatt Venn
02/29/2024, 1:19 PMMatt Venn
02/29/2024, 1:20 PMMatt Venn
02/29/2024, 1:21 PM.param mc_mm_switch=1
.param mc_pr_switch=1
Matt Venn
02/29/2024, 1:21 PMMatt Venn
02/29/2024, 1:21 PMMatt Venn
02/29/2024, 1:22 PMMatt Venn
02/29/2024, 1:22 PMMatt Venn
02/29/2024, 1:22 PMMatt Venn
02/29/2024, 1:23 PMMatt Venn
02/29/2024, 1:24 PMMatt Venn
02/29/2024, 1:24 PMMatt Venn
02/29/2024, 1:25 PMTim Edwards
02/29/2024, 2:18 PMextract do resistance
doesn't do what you think it does. In fact, it doesn't do anything because it's related to .sim files, not .spice files.Matt Venn
02/29/2024, 2:21 PMTim Edwards
02/29/2024, 2:21 PMload r2r
flatten r2r_flat
load r2r_flat
select top cell
cellname delete r2r
cellname rename r2r_flat r2r
extract all
ext2sim labels on
ext2sim
extresist tolerance 10
extresist
ext2spice lvs
ext2spice cthresh 0
ext2spice extresist on
ext2spice
Beware that this script flattens the cell and then renames the cell to the flattened version, so don't go save the flattened version back to disk, just quit after running this script.Matt Venn
02/29/2024, 2:21 PMTim Edwards
02/29/2024, 2:24 PM.param mc_mm_switch
and .param mc_pr_switch
. Those are taken care of by the .lib
statement. The 3rd argument to .lib
is a section of the .lib
file (sky130.lib.spice
) to read and execute. That section defines the parameters. For the record, mc_mm_switch
is a mismatch parameter (enables mismatch analysis by applying random variation to each component) and mc_pr_switch
is a process variation parameter (enables monte carlo analysis by applying random variation to properties of the entire process).Matt Venn
02/29/2024, 2:26 PMTim Edwards
02/29/2024, 2:26 PMTim Edwards
02/29/2024, 2:29 PMres_generic_po
isn't being found in simulation is probably an independent problem that will need to be tracked down. This seems like a PDK issue.Tim Edwards
02/29/2024, 2:32 PM.lib sky130.lib.spice tt
should have included
$PDK_ROOT/sky130A/libs.tech/ngspice/sky130_fd_pr__model__r+c.model.spice
which should have at line 134:
.model sky130_fd_pr__res_generic_po r tc1r=tc1rsgp tc2r=tc2rsgpu rsh=rp1 dw="-tol_poly/2-poly_dw/2" tnom=30
The original Sky130 PDK incorrectly commented out that line. The official PDK repository from Efabless fixes it.Matt Venn
02/29/2024, 2:34 PMMatt Venn
02/29/2024, 2:34 PMMatt Venn
02/29/2024, 2:35 PMMatt Venn
02/29/2024, 2:35 PMMatt Venn
02/29/2024, 2:35 PMMatt Venn
02/29/2024, 2:37 PMMatt Venn
02/29/2024, 2:37 PMTim Edwards
02/29/2024, 2:49 PMMatt Venn
02/29/2024, 2:56 PMMatt Venn
02/29/2024, 2:57 PMTim Edwards
02/29/2024, 3:02 PMMatt Venn
02/29/2024, 3:03 PMMatt Venn
02/29/2024, 3:03 PMTim Edwards
02/29/2024, 3:03 PMMatt Venn
02/29/2024, 3:19 PMMatt Venn
02/29/2024, 3:20 PMTim Edwards
02/29/2024, 3:20 PMMatt Venn
02/29/2024, 3:22 PMMatt Venn
02/29/2024, 3:23 PMMatt Venn
02/29/2024, 3:23 PMMatt Venn
02/29/2024, 3:25 PMMatt Venn
02/29/2024, 3:25 PMMatt Venn
02/29/2024, 3:25 PMMatt Venn
02/29/2024, 3:25 PMTim Edwards
02/29/2024, 3:26 PMspi2xspice.py
from the "qflow" repository (opencircuitdesign.com) which uses a "generic" logic block I created for xspice which Holger Vogt integrated into the ngspice source. That creates an xspice block that is the equivalent of the low-level SPICE. Then you replace the SPICE subcircuit with the xspice one in the netlist.Matt Venn
02/29/2024, 3:30 PMMatt Venn
02/29/2024, 3:30 PMTim Edwards
02/29/2024, 3:34 PMTim Edwards
02/29/2024, 3:35 PMTim Edwards
02/29/2024, 3:39 PMextresist blackbox on
, which is supposed to do that. I have extremely low confidence that it will actually work.Christoph Maier
03/02/2024, 7:14 PM