<@U01819B63HP> When I switch simulator to Xyce, an...
# xschem
h
@User When I switch simulator to Xyce, and de-select the option
hspice / ngspice netlist
, then I get the following error when I write the netlist:
Copy code
tcleval(): evaluation of script: netlist {/foss/designs/my_example/ana/.tb_inv_740} noshow {tb_inv.spice} failed
         : awk: /foss/tools/xschem/19d9d8a/share/xschem/spice.awk:30: fatal: cannot open file `-xyce' for reading (No such file or directory)
Any idea what is wrong here?
PS When I leave option
hspice / ngspice netlist
selected, then the netlist is written, but
Xyce
complains about
Copy code
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 44
 Parameter AD for device XM10 contains unrecognized symbols: NF W
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 44
 Parameter AS for device XM10 contains unrecognized symbols: NF W
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 44
 Parameter PD for device XM10 contains unrecognized symbols: NF W
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 44
 Parameter PS for device XM10 contains unrecognized symbols: NF W
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 44
 Parameter NRD for device XM10 contains unrecognized symbol: W
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 44
 Parameter NRS for device XM10 contains unrecognized symbol: W
Netlist error in file /foss/designs/my_example/ana/tb_inv.spice at or near
 line 47
y
I don't think the ngspice models work with Xyce out of the box - the joys of spice syntax differences between simulators. Here's a repo with some changes that should work with Xyce: https://github.com/eskiyerli/sky130_reveda/tree/reveda
s
@User as @User said there is no 100% compatibility between ngspice and xyce, i have many duplicate circuits, one for ngspice, the other for xyce, there are differences in command syntax, model parameters and more. For the error when netlisting for xyce with ngspice netlist option disabled, this is a bug, i will take care of this. The hspice/ngspice switch is probably somewhat obsolete now, will fix.
h
@User I saw you fixed the awk file, thanks! Is there a document somewhere, that explains the differences between ngspice and Xyce, and how to setup schematics and simulations for both cases?
s
@User the hspice/ngspice option does just some very minor netlist change on some standard components, for example for voltage sources /resistors/capacitors with expressions replace the
value= <expr>
(syntax used for example in ELDO) with
vol=<expr>
(for controlled voltage sources) or
cur=<expr>
(controlled current sources) or
r=<expr>
(variable resistors) or
c=<expr>
(variable capacitors), I think this is now the prevalling standard. as of now selecting xyce only changes
.save i(vsource)
lines to
.print tran i(vsource)
(xyce does not use .save to store transient / dc data, .save in xyce saves the operating point).
@User in the examples provided with xschem there are some *_xyce.sch circuits, that is ngspice schematics ported to xyce. In most cases all i had to do was to change command lines (instructions to the simulator, like options, .tran, .save and so on) and minor tweaks (for example on some lines xyce does not accept parameters, so i had to literally put numbers). ngspice has a command language that can be used interactively, while xyce is (as far as i know) more batch job oriented. Simple silicon device models (discrete transistors, simple cmos processes) ran on xyce unchanged. However a complex model kit like skywater will probably need some changed to be accepted by xyce. I did not experiment very much (yet) with xyce under skywater umbrella.