I'm a beginner in using XSchem and NGspice and I was facing some troubles in simulating my first circuit which is a track and hold circuit.
After I create the netlist successfully and try to simulate it I get a whole bunch of errors that I don't know the reasons behind them.
I'll attach the circuit, the script for the clock voltage source, the ngspice commands and the errors window.
If anyone can help me, I'll be very thankful.
02/01/2023, 2:20 AM
For some reason you have set VHDL netlist mode instead of SPICE, so xschem is launching ghdl (the VHDL simulator) instead of ngspice. Go to Options menu and set Spice netlisting mode.
I also recommend saving the schematic with a name to avoid using 'untitled.spice' as the netlist name.
Also remember that ngspice switches need a model describing the switch behavior: