Hey everyone, I'm trying to netlist a sky130 xsche...
# xschem
c
Hey everyone, I'm trying to netlist a sky130 xschem schematic using the xschem CLI, but everytime it give me the following error. Does anyone know how to fix this? global_spice_netlist(): problems opening netlist file
Actually I figured out that it works if I don't specify the output location as a CLI option. So I just deleted the "-o" option and it worked:
xschem \
--netlist --spice --no_x --quit \
--rcfile xschemrc \
-o /workspaces/bandgaps/.viper/netlists/test.spice \
${SCH_FILE}
Is this because there is a conflict with the following line in my xschemrc?
set netlist_dir /workspaces/bandgaps/.viper/netlists
s
@Curtis Mayberry the -o is used to specify the directory where the netlist goes. The filename is either taken from the circuit name (with .spice extension) or specified with -N:
xschem --netlist --spice --no_X --quit --rcfile xschemrc -o /workspaces/bandgaps/.viper/netlists -N test.spice ${SCH_FILE}
The reason for the two separate options for path and for filename is because there is a split netlist mode where xschem outputs each subcircuit netlist into a separate file (this is sometimes preferred when compiling / elaborating VHDL or Verilog or mixed digital designs). In this case only the destination path makes sense.
๐Ÿ‘ 1
@Curtis Mayberry I will take a note to allow in the future full path specification of the netlist file with -N (makes sense since in 99.9999% of the cases split netlisting mode is not used)
๐Ÿ‘ 1
c
Ah, I see, thanks @Stefan Schippers!
I agree, allowing the -N to include the full path is good.
The other thing I have to do after netlisting a design is post-process it to remove the comments around the top-level subckt and ends statement so I can use the Netlist as a spice lib and include it in another Netlist. It would be helpful if there was a --lib option to do this.
s
@Curtis Mayberry If you add:
--tcl 'set lvs_netlist 1'
the top level .subckt will be uncommented. This is often used also for LVS. Also if you update your xschem now the -N accepts full path for netlist file.
๐Ÿ‘ 1
c
Awesome, I'll give those a shot. Thanks @Stefan Schippers!