<@U01819B63HP> Hey Stefan, I was wondering if we could add an option to netlist type called lvs-spic...
a
@Stefan Schippers Hey Stefan, I was wondering if we could add an option to netlist type called lvs-spice, with a different switch on symbols than spiceprefix? Could we do that easily?
s
We can, however tell me exactly what you need to do, will look into that
a
I need to make the generated for spice simulation different from the netlist generated for LVS purposes, here are 2 main changes that need to happen as starts for that: • Netlist devices as X sub circuits for all devices as needed by simulation models for simulation, but netlist same device as M, L, R, C, etc.. for LVS. • Need to define which parameters need to go to the LVS net list and which goes to the simulation netlist and if there are any equations for any parameters, they need to be evaluated for LVS net list.
@Stefan Schippers we could start with the first one as I believe that’s the low hanging fruit.
Basically the user selects which netlist type they want to generate and then generate the netlist.
@Stefan Schippers how hard is that?
s
The first option seems already implemented. The Xschem SImulation menu has the entry "`use spiceprefix attribute`". All devices that use this attribute (for example all sky130 mosfets) will be netlisted as X-subcircuits if the spiceprefix (usually set to 'X') is used in the symbol and the option to use it is enabled in the SImulation menu. I need to understand if there is a different requirement for this specific issue.
a
@Stefan Schippers That’s perfect
Yes, that’s what I need
How about the second requirement?
@Stefan Schippers ?
s
The second is probably more tricky, I think a lvs netlisting rule should be added, a new
lvs_format
attribute could define the format of the netlist line of the component for LVS. If the
Simulation -> LVS netlist
is enabled this attribute should be used (if existing) instead of the default
format
attribute that generates the spice netlist for the component.
a
@Stefan Schippers Totally agree with your ideas
s
Most of this is already implemented. Xschem has a '`xschem set format xxxx`' command that defines the '`format`' attribute used for netlisting. If I do :
xschem set format lvs_format
at the xschem prompt before generating a netlist a
lvs_format
will be used as the netlisting rule instead of the default '`format`' (or
verilog_format
is using verilog or
vhdl_format
if using VHDL). If such an attribute is not found in the symbol then the fallback default is used (
format
for spice). WIll investigate the issue of computing expressions and outputting the result in the lvs netlist...
@Amro Tork Do you have an example of a spice netlist for a component and the desired LVS netlist for it? I think all the pieces are in place, and need to do some testing...
a
Hi @Stefan Schippers, Please find the example CDL and simulation netlists attached.
@Stefan Schippers Let me know if that works for you.
s
Thank you will look and do some tests!
@Amro Tork I have committed the changes in xschem_sky130 (add
lvs_format
attribute to all
pfet
,
nfet
,
npn
and
pnp
devices) and xschem (switch to
lvs_format
attribute for netlisting if
Simulation->LVS netlist
is enabled). What i get now is: Simulation:
Copy code
** pnp
XQ1 net6 net2 PLUS sky130_fd_pr__pnp_05v5_W0p68L0p68 m=1

** pfet
XM4 net7 EN_N VCC VCC sky130_fd_pr__pfet_01v8 L=6 W=2 nf=1 ad='W * 0.29' as='W * 0.29' pd='W + 2 * 0.29'
+ ps='W + 2 * 0.29' nrd=0 nrs=0 sa=0 sb=0 sd=0 mult=1 m=1

** nfet
XM18 G2 G1 VSS VSS sky130_fd_pr__nfet_01v8_lvt L=4 W=6 nf=1 ad='W * 0.29' as='W * 0.29' pd='2*(W + 0.29)'
+ ps='2*(W + 0.29)' nrd=0 nrs=0 sa=0 sb=0 sd=0 mult=1 m=1
Lvs:
Copy code
**pno
Q1 net6 net2 PLUS sky130_fd_pr__pnp_05v5_W0p68L0p68 NE=1 m=1

** pfet
M4 net7 EN_N VCC VCC sky130_fd_pr__pfet_01v8 L=6 W=2 nf=1 m=1

** nfet
M18 G2 G1 VSS VSS sky130_fd_pr__nfet_01v8_lvt L=4 W=6 nf=1 m=1
Using a dedicated attribute for LVS netlists allows complete flexibility (or just use the existing '`format`' attribute used for spice netlists if no change is required). To do next: add this attribute to all other devices that need special syntax for LVS.
a
@Stefan Schippers That’s great
What about GF180MCU?
And how to choose which netlist to generate?
s
The netlist for LVS is set by enabling
Simulation->LVS netlist
For gf180mcu the set of symbol is yet to be done. I started doing that work, but stopped since got no feedback and no answer to any simple questions.
Once the symbols are done switching to g180mcu is a matter of starting xschem with a different xschemrc config file. It is also trivially simple to switch process node runtime with a simple user tcl procedure, basically you need to redefine the XSCHEM_LIBRARY_PATH.
a
@Stefan Schippers Which questions do you have? What it me who didn't answer?
s
@Amro Tork I did an initial commit of symbols to another gf180 related github repo, then it was pulled into gf180mcu, I was told that symbols and all primitives could be renamed due to syntax conventions, so I asked what to do. If all symbols are going to be renamed I prefer to start directly with the new names. I asked what to do but got no answer, so i am in standby on this. The xschem symbols that are therein are an initial and untested commit. I can go through all of these and verify if simulation works and soon after also verify compatibility with LVS. Just give me a name of one person I can ask some details. I know many people are extremely busy or super involved with openlane integration...