amruta
New Member
Offline
Posts: 6
|
Ken, I tried your method, but I was not getting the voltage to rise from 0 to 3V. Rather it was staying steady at 3V right from the start. What can I do to ramp this voltage from 0 to 3V with a slew rate of 0.3V/us?
initial begin for (Vraw = 0; Vraw <2.9;Vraw = Vraw+ 0.3)begin $strobe("Vraw=%f. \n", Vraw); #(1u); end end analog begin //V(piecewise_voltage_source)<+(values[i+1] - values[i]) * ($abstime - times[i])/(times[i+1] - times[i]) + values[i]; V(piecewise_voltage_source) <+ transition ( Vraw,0,50u); V(vsrc)<+V(piecewise_voltage_source); I(current_in_out) <+ V(vin, vout)/rdson; x=I(vsrc,vin); $strobe("x=%f. \n", I(vsrc,vin)); end endmodule
|