<@U01819B63HP> When I create a symbol so that I ca...
# xschem
h
@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
@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&amp;cid=C016HUV935L
h
Thanks, good pointer! I have now matched the
xschem
symbol to the extracted netlist port order using the
sim_pinnumber
property.
s
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
@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
@Stefan Schippers the tutorial ā€œhereā€ link you posted above points to a local file:// URL. Is there one on the net?
s
@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
@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.