I just banged my head for hours against a non simulating post layout circuit, and it was because the...
m
I just banged my head for hours against a non simulating post layout circuit, and it was because the extracted ports got re-ordered. The LVS extraction keeps the ports ordered by the port number in the mag file, but my script for extraction for simulation seems to put them in an order uninfluenced by the port numbering. Any idea why or how to stop it from happening?
message has been deleted
magic port order
LVS is good:
message has been deleted
extract for sim is bad:
message has been deleted
tcl scripts for LVS and sim extraction are here: https://github.com/mattvenn/tt06-analog-relax-osc/tree/main/mag/tcl
extract_for_lvs and extract_for_sim
lolz
the fix suggested by Stefan works on xschem v3.4.5
t
Historically, I've come up with two ways to deal with this problem. The first was that I used CACE with a special format for pins to create a call to a subcircuit which CACE would then fix the order of the pins; that means you never have to worry about pin order, but it only works with CACE. The other thing is to make sure that the schematic capture tool always generates the pin order the same way (which xschem does, now); then, as long as the schematic is imported into the layout (using magic's "Import SPICE" function, then the layout inherits the port order that was in the schematic. If you don't use that method, you need to ensure that the port order in the layout matches (by index) the port order in the schematic-captured netlist.
c
@Matt Venn I use this https://github.com/wulffern/tech_sky130A/blob/main/script/fixlpe to copy the xschem pin order into the lpe netlist.