Hi <@U017X0NM2E7> <@U01819B63HP> I tried to run LVS for the bandgap reference circuit between the b...
a
Hi @Mitch Bailey @Stefan Schippers I tried to run LVS for the bandgap reference circuit between the bandgap.gds and bandgap_xschem.spice . However, both are not mateched due to pnp transistors. is there a good way to pass it?
m
First step is to get the pnp model names to match.
Copy code
sky130_fd_pr__pnp_05v5 (2)                 |(no matching element)                      
...
(no matching element)                      |sky130_fd_pr__pnp_05v5_W0p68L0p68 (2)
This can probably be done with
Copy code
sed -i.bak 's/sky130_fd_pr__pnp_05v5_W0p68L0p68/sky130_fd_pr__pnp_05v5 W=0.68 L=0.68/' bandgap_xschem.spice
s
@Mitch Bailey @Ahmed Reda it seems that for simulation purposes (ngspice) the right name is
sky130_fd_pr__pnp_05v5_W0p68L0p68
, while for layout matching
sky130_fd_pr__pnp_05v5
is the correct symbol name. What should the best way to go to avoid users dealing with these errors? with this difference either LVS or ngspice simulation will fail.
m
Might be able to add something to the netgen setup file. I’ll look into it. ngspice doesn’t have a generic
sky130_fd_pr__pnp_05v5
model with
W
and
L
?
s
@Mitch Bailey I see these 2 models related to 0.68 and 3.4 dimensions (both L and W):
sky130_fd_pr__pnp_05v5_W0p68L0p68.model.spice
sky130_fd_pr__pnp_05v5_W3p40L3p40.model.spice
m
@Tim Edwards I thought something like this would work, but it doesn’t seem to add the property to the devices.
Copy code
property "-circuit2 sky130_fd_pr__res_xhigh_po_0p69" add w 0.69
    equate classes "-circuit1 sky130_fd_pr__res_xhigh_po" "-circuit2 sky130_fd_pr__res_xhigh_po_0p69"
It gives me a topology match with size errors
Copy code
sky130_fd_pr__res_xhigh_po:24 vs. sky130_fd_pr__res_xhigh_po_0p69:R1:
Property w in circuit1 has no matching property in circuit2
t
@Mitch Bailey:
property ... add
doesn't mean to add a property, it means that the specified property is additive. There are definite complications with getting these fixed-width devices to extract right from magic. I made the resistors work reasonably well by defining various marker layers at different sizes. I never did that with the bipolars since there are only a couple of valid modeled device sizes. Magic will extract a PNP device marked with a
pnp
layer as
sky130_fd_pr__pnp_05v5
without the fixed-size suffix. It should work to use the
sky130_fd_pr__pnp_05v0_W0p68L0p68
layout cell from the library and give it a property called
primitive
that indicates that the subcircuit is supposed to be treated as a device and therefore extracted as a black-box. But if all else fails, I prefer your solution of just hacking one netlist to produce the right output with a
sed
script.
m
I may be confused. In the setup file there’s
Copy code
property "-circuit1 $dev" series {l add}
which specifies adding property when merging, but in the code, there’s
Copy code
char *options[] = {
        "add", "create", "remove", "delete", "tolerance", "merge", "serial",
        "series", "parallel", NULL
    };
    enum OptionIdx {
        ADD_IDX, CREATE_IDX, REMOVE_IDX, DELETE_IDX, TOLERANCE_IDX, MERGE_IDX,
        SERIAL_IDX, SERIES_IDX, PARALLEL_IDX
    };
...
            case ADD_IDX:
            case CREATE_IDX:
Looks like there’s also an
add
or
create
command used in the same place as
series
.
a
@Tim Edwards @Mitch Bailey @Stefan Schippers Thank you for you suggestions. The error has been fixed using <sed> script, just hacking one netlist to get right output.