05/06/2021, 12:23 AM
@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/' cnr_val

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

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
			print @M.*[*]
		end $ foreach cnr_loop
	end $ foreach temp_loop
end $ foreach vdd_loop
Now, that
stuff could be very wrong; I haven't really tried it yet. I fear there might be some setting of
involved. But, that's the gist of what what I'm looking to do, with the example showing the simple case of oppoint corners.

Tim Edwards

05/06/2021, 4:08 PM
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.

Juan Andres

12/28/2022, 2:34 AM
Could you please share your script with which you simulated the PVT?