<@U016EM8L91B> <@U017X0NM2E7> I am trying to extra...
# magic
p
@Tim Edwards @Mitch Bailey I am trying to extract a spice netlist out of a gds using magic. However the extracted netlist contains multiple duplicate devices. with same nets as well as same device dimensions.Here's spice file for same.
Here's the extraction commands that I used
Copy code
gds flatglob *$$*
gds read vref_gen_nmos_with_trim.gds
loaf vref_gen_nmos_with_trim
select top cell
flatten vref_flat
load vref_flat
select top cell
extract do local
extract no capacitance
extract all
ext2sim labels on
ext2sim
ext2spice lvs
ext2spice -o vref.spice
m
Line 3 is
load
not
loaf
right? If there are multiple parallel devices, magic will extract each one separately. I don’t understand the problem. What is the purpose of the
flatten vref_flat
statement? If you’re using the netlist for LVS, I would suggest keeping as much hierarchy as possible.
p
Yes. Line 3 is load. No I am not using netlist for LVS. I want to simulate the block.
@Mitch Bailey Is there way I can merge the parallel device into one so that the netlist gets shorter. Actually I want to understand the circuit so I am trying to draw schematic out of spice.
m
I don’t know how to simplify the netlist with open source tools. With Calibre, you can run SVS against the same netlist and have it write out the reduced netlist.
t
@Pranav Lulu:
ext2spice merge conservative
👍 2
p
@Tim Edwards Yes. Got that just implemented that few minutes back. Thanks!!
I used ext2spice merge aggressive.
t
"merge aggressive" will merge together parallel devices by adding the widths together (all devices with the same L, regardless of the values of W); generally that's a bit over-aggressive. Normally you just want "merge conservative" which collects together all parallel devices with the same W and L.
p
Okay. Got it.
@Tim Edwards How can we edit existing gds/layout to new device dimensions. I just want to change change parameters W and M of some devices in an existing layout???
t
If you used the device generator in the PDK to create the layout in magic, then you only need to select the instance and type
Ctrl-P
to bring up the parameter window, then change the parameter, and click on
Apply
.
p
@Tim Edwards When I try to select a particular cell inside the layout it gives a error message as below. Also attaching the gds for the same. I had used gds flatglob command before reading the gds for this block.
m
try quoting.
select cell {net$$185804844}
or
select cell net\$\$185804844
p
@Mitch Bailey The above commands didn't work. Also it's an nfet not net.
I could select a particular cell
pfet_CDNS_625341251780_0
but when I pressed
Ctrl+P
to bring up parameter window the bellow error shows up
If I don't use
gds flatglob *$$*
command and directly read the gds I can select the nfet cell which is
nfet$$185807916_0
, now after
Ctrl+P
it gives the below error
m
@Tim Edwards?
t
@Pranav Lulu: Any cell with
CDNS
in the name came from Cadence. In magic, you can only change parameters of cells that are generated with the parameterized cell generator in magic.
p
@Tim Edwards Oh okay. I read on slack somewhere that there is a netlist_to_layout script. How can I use that. I have a new spice netlist for above block with changed parameters.
t
The netlist_to_layout script does not generate or preserve a valid layout. It just creates devices and dumps them into a layout. If that works for you, then it's just a matter of using "Import SPICE" from the "File" menu in magic.
p
Got it.Thanks Tim!!I think I need to make the layout in magic.