What's a good workflow for deciding a bunch of voltages & parameters at once? Say I've got like 5 voltage ranges and 5 transistor sizes to decide on. Write a script to update the netlist, run ngspice, and re-annotate xschem? Some ngspice REPL wizardry?
s
Stefan Schippers
02/07/2024, 9:34 PM
There are many solutions. One is to use .param lines for all parameters (and use params instead of numbers in the schematic).
.param Wmos1=2
.param Lmos1=0.15
...
Then you can run ngspice directly on the .spice file
ngspice -i circuit.spice
You can get simulation data accessible from ngspice control language by using the
meas
command.
alterparam
+
reset
commands can be issued to run another simulation with changed parameters, so you can build an optimization loops.
Linen is a search-engine friendly community platform. We offer integrations with existing Slack/Discord communities and make those conversations Google-searchable.