Krzysztof Herman
08/21/2024, 6:54 AMosdi
(for ngspice) file or so
library (for Xyce). In the case of ngspice is simple because you can inform it using .spiceinit
where the actual osdi
file is. Xyce does not have it so you have to run the netlist calling Xyce -plugin ../../../admslibs/Xyce_Plugin_PSP103_VA.so nmos_id_vg_vb.cir
My question is if it is possible to define it on schematic and then pass to xyce this -plugin path_to_file/plugin.so
Stefan Schippers
08/21/2024, 10:22 PM# Setup the default simulation commands if not already set up
set_sim_defaults
# Check the name of the 4th (0,1,2,3) spice simulation command:
puts $sim(spice,3,name)
# --> Xyce batch
# get the command
puts $sim(spice,3,cmd)
# --> Xyce "$N"
# Change the command
set sim(spice,3,cmd) {Xyce -plugin /.../.../... \"$N\"}
# Change the simulator to be used (Xyce)
set sim(spice,default) 3
# run netlist and simulation
xschem netlist
simulate
You can place a launcher (launcher.sym) in the schematic and trigger the above commands by ctrl-clicking it (Left button click on the launcher by holding down the Ctrl key).
The attributes in the image are copied here:
name=h8
descr="Simulate with Xyce"
tclcommand="
# Setup the default simulation commands if not already set up
# for example by already launched simulations.
set_sim_defaults
# Change the Xyce command. In the spice category there are currently
# 5 commands (0, 1, 2, 3, 4). Command 3 is the Xyce batch
# you can get the number by querying $sim(spice,n)
set sim(spice,3,cmd) {Xyce -plugin /.../.../... \"$N\"}
# change the simulator to be used (Xyce)
set sim(spice,default) 3
# run netlist and simulation
xschem netlist
simulate
"
Stefan Schippers
08/21/2024, 10:26 PMNetlist
and Simulate
buttons, since the modified command will not be cleared in the running session.Stefan Schippers
08/21/2024, 10:29 PMsimulator_commands.sym
symbol that gets netlisted only if the selected simulator matches the simulator
attribute of this component. This can be used to put Xyce / ngspice specific commands in different simulator_commands.sym code blocks.Stefan Schippers
08/21/2024, 10:33 PM