Hi everyone,
I am trying to generate the following voltage profile.
Picture attached.
The specifications are :
Vhigh: Voltage 1
Tr: Rise time
Vlow: Voltage 2
Time: Time after which Vhigh falls to Vlow
Tf: Fall time
Code:
`include "disciplines.vams"
module series_rlc1 (p, n1);
parameter real r=1,vout_high=5, //VHIGH value
trise = 100u, //Fall Time
tfall = 100u, //Rise Time
vout_low=3, //VLOW Value
droop_time=3000u;//Time after which VHIGH falls to VLOW
inout p, n1;
electrical p, n1;
analog begin
V(n1) <+ transition(vout_high,0,trise,tfall);
if($abstime==droop_time)
V(n1) <+ transition(vout_low,0,trise,tfall);
end
endmodule
However, I get an error saying I cannot include a transition operator inside a conditional statement. So how do I tell the compile to drop the voltage after a time?