<@U016EM8L91B> Well, this is the kind of thing I w...
# analog-design
v
@User Well, this is the kind of thing I was thinking:
Copy code
** Regression Sim
.param vdd_val=3.3
.param temp_val=27
.param cnr_val="tt"

.option temp=temp_val
.lib '/usr/share/pdk/sky130A/libs.tech/ngspice/sky130.lib.spice' cnr_val

V_VDD VDD GND DC vdd_val
*** Rest of circuit here...

.CONTROL
save @M.*[*]
foreach vdd_loop 2.97 3.3 3.63
	foreach temp_loop -40 27 130
		foreach cnr_loop "tt" "ss" "ff"
			alterparam vdd_val  = $vdd_loop
			alterparam temp_val = $temp_loop
			alterparam cnr_val  = $cnr_loop
			op
			print @M.*[*]
		end $ foreach cnr_loop
	end $ foreach temp_loop
end $ foreach vdd_loop
.endc
.end
Now, that
alterparam
stuff could be very wrong; I haven't really tried it yet. I fear there might be some setting of
curplot
involved. But, that's the gist of what what I'm looking to do, with the example showing the simple case of oppoint corners.
t
If that works, then great. My approach is to write a python script that generates all the variables; I have a nice system on efabless called CACE that takes a testbench and a configuration file and then runs over all process corners, temperatures, voltages, and whatever else you want to loop over, and runs P*V*T individual simulations. One huge advantage is that it can run all simulations in parallel.
That approach is also more simulator-invariant, as you can write a simple testbench that doesn't invoke ngspice-speicific commands.
j
Could you please share your script with which you simulated the PVT?