https://open-source-silicon.dev logo
Title
h

Harald Pretl

04/16/2023, 1:10 PM
@Stefan Schippers When I create a symbol so that I can include an extracted netlist, how can I match the port order to that of the extracted netlist?
🌍 1
Ah,
sim_pinnumber
seems to do the trick, I’ll try that…
m

Mitch Bailey

04/16/2023, 3:38 PM
@Harald Pretl There’s a discussion here about setting the order of ports in the extracted netlist. https://open-source-silicon.slack.com/archives/C016HUV935L/p1677358505708119?thread_ts=1677353770.126889&cid=C016HUV935L
h

Harald Pretl

04/16/2023, 5:34 PM
Thanks, good pointer! I have now matched the
xschem
symbol to the extracted netlist port order using the
sim_pinnumber
property.
s

Stefan Schippers

04/16/2023, 6:43 PM
Good you got it right!. Anyway the tutorial page is here
Instead of specifying @pinlist in the symbol format string as in:
format="@name @pinlist @symname"
you can set the netlist rule as follows (assuming a symbol with 3 pins, A, B, Z):
format="@name @@Z @@A @@B @symname"
The first rule relies on the creation order of the pins (first drawn goes first) This order of course can be changed as explained in the tutorial, but explicitly naming the pin order (using the @@x syntax) is probably the simplest method to match a aymbol with an existing netlist.
h

Harald Pretl

04/16/2023, 7:42 PM
@Stefan Schippers is there a way to grab the pinlist from the (included) (extracted) spice netlist? There is a small risk that after the next extraction the pin order changes, and this goes undetected. An automatism would be much safer.
i

Iain Waugh

04/16/2023, 10:45 PM
@Stefan Schippers the tutorial “here” link you posted above points to a local file:// URL. Is there one on the net?
s

Stefan Schippers

04/17/2023, 8:46 AM
@Harald Pretl This requires xschem to look into the extracted netlist produced by another tool. It is possible to use a hook script that generates the
format
(or, better,
lvs_format
, specifically for lvs matching) netlisting rule, but to make this flow robust some convention must be adopted (what netlistfile to look into etc).
h

Harald Pretl

04/18/2023, 10:54 AM
@Stefan Schippers What would work (maybe I implement this in the future): A script given the
xschem
symbol file and the extracted netlist could parse the extracted netlist, and based on the pinorder in the extracted spice netlist adjust the
sim_pinnumber
property of an already existing (handdrawn) symbol. While doing it can check for matching of the pins between these two entities (spice and sym) and report and error. An autocreation of symbol from spice netlist I think is not that important, as usually one starts with a symbol plus something behind for first simulation, and later replace it by an extracted netlist.