aquiles viza
03/28/2024, 4:51 PMcthresh
and rthresh
magic commands.
This is what I've got now.
extract all
ext2sim labels on
ext2sim
extresist tolerance 10
extresist all
ext2spice lvs
ext2spice extresist on
ext2spice cthresh 0
ext2spice -o "$(LAYOUT_NETLIST_PEX)"
I though there may be tests that could be unaffected by the presence of a type of parasitics, like a simulation that behaves in the same way with or without capacitive parasitics.
Could anyone give me some advice on how to filter parasites and whether having pex_cap
, pex_res
variations from the netlist would be useful anywhere?Tim Edwards
03/30/2024, 1:15 AMcthresh
, although I often set cthresh
to something like 0.1
just so I don't get lots of trivially small parasitics in the output.
Never use rthresh
. rthresh
produces "lumped resistances" which only get written to .sim files, and are only meaningful to applications which understand what a lumped resistance is (to my knowledge, only IRSIM reads .sim files, and even IRSIM doesn't handle lumped resistances).
Parasitic resistances are produced by extresist
and are unrelated to rthresh
. To change the number of parasitic resistances, change the extresist tolerance 10
line. But the value 10
is a ratio, not a resistance value. Magic does not just set a cutoff for resistance, because a series chain of small resistances could add up to something quite large. So it's not easy to determine what the effect of changing the tolerance will be. You need to try a few different values and see what output it produces.Tim Edwards
03/30/2024, 1:21 AMload $CELLNAME
flatten ext_flat
load ext_flat
select top cell
cellname delete $CELLNAME
cellname rename ext_flat $CELLNAME
Exit after generating the netlist, and don't save the flattened layout.Tim Edwards
03/30/2024, 1:26 AMset SUB VSUBS
which names the global substrate VSUBS
. For parasitic extraction of circuits with isolated ground nets, I recommend adding set SUB 0
so that the substrate will be the default SPICE global ground node.aquiles viza
03/30/2024, 4:36 PMextresist tolerance
, may I use 100 to allow most of the resistive componets to be on the net?
• The recommendation of setting set SUB 0
should be put everytime pex extraction is done, or just for gf180mcu pdk?Tim Edwards
03/30/2024, 4:59 PMextresist all
to ignore the tolerance and run resistance extraction on every net. But as I said above, whether "10" or "100" is a "good" value to use is not really knowable _a priori_; "10" has been used as a reasonable all-purpose number, but you really have to run the extraction with different values and see what you get.
The set SUB 0
is recommended any time PEX extraction is done. It is not PDK-specific.aquiles viza
03/30/2024, 5:24 PMMAGIC_ROUTINE_LOAD
loads a gds into magic
• MAGIC_ROUTINE_PEX__TOLERANCE
set a tolerance if specified, by default extresist all
Thanks a lot for the feedback, I'm going to evaluate if this is not broken
drc off
gds drccheck off
set SUB 0
$(MAGIC_ROUTINE_LOAD)
flatten $(GDS_CELL)_pex
load $(GDS_CELL)_pex
box values 0 0 0 0
extract path extfiles
extract all
ext2sim labels on
ext2sim
$(MAGIC_ROUTINE_PEX__TOLERANCE)
extresist all
ext2spice lvs
ext2spice extresist on
ext2spice cthresh 0.1
ext2spice -p extfiles -o "$(LAYOUT_NETLIST_PEX)"
puts "Created pex file $(LAYOUT_NETLIST_PEX)"
quit -noprompt
Tim Edwards
03/30/2024, 6:18 PMextresist all
ignores the tolerance value, so if you pass $(MAGIC_ROUTINE_PEX__TOLERANCE)
, you should follow it with just extresist
.aquiles viza
03/30/2024, 7:08 PMcthresh 0
the capacitances are gone.
I'm not sure if the ext files were removed before doing the last pex extraction. I'm redoing it with cap threshold 0 to see if they are still missing