I want to have a bunch of .param
directives to serve as test cases, one of which I will uncomment before doing a test. It allows me to make sure tests made in the past still work after making a modification, a bit like an unit test.
.param A=0 B=1 C=2
;.param A=10 B=-1 C=2
;.param A=100 B=2 C=4
One of these parameter is used on a voltage source, with value {D}
. I want to assign a value of PWL(0 0 20m 5)
:
.param A=0 B=1 C=2 D={PWL(0 0 20m 5)}
However this doesn't work, I get a "WARNING: Cannot resolve .param A=0 B=1 C=2 D={PWL(0 0 20m 5)}" message on simulation startup.
I imagined .param
as some kind of macro preprocessor so I expected it to work. Is there a way to do this?
I'm using LTspice.