I'm Ali Elshorbagy and I'm working at Mabrains, I made a small testcase to document a weird behaviour that i found when using loops inside ngspice.
I'm simply doing dc sweep on sky130 nfet transistor on different widths and lengths. I just change the device parameters inside while loop inside control statement.
I found an unexpected behaviour. Initial value for width and length affect solution values.
Normal behaviour during simulation is initial values will be replaced by values given inside the loop but surprisingly i found that initial values affect the results.
In this git repo i have 2 netlists (
netlist1.net and
netlist2.net) exactly the same but initial value for width and length are different. When i invoke ngspice to run those two netlists i have a completely different results
https://github.com/mabrains/xyce_sky130/tree/main/testcases/ngspice_loops_behaviour
I found a similar behaviour whe i used .data inside Xyce and can be found here:
https://github.com/mabrains/xyce_sky130/tree/main/testcases/Xyce_data_behaviour
@User @User