 
 
 
 
 
 
 
  
PULSE args
PULSE iv pv delay rise fall width period
The component value is a pulsed function of time.
For voltage and current sources, this is the same as the Spice PULSE function, with some extensions.
The shape of a single pulse is described by the following algorithm:
if (time > _delay+_rise+_width+_fall){
  // past pulse
  ev = _iv;
}else if (time > _delay+_rise+_width){
  // falling
  interp=(time-(_delay+_rise+_width))/_fall;
  ev = _pv + interp * (_iv - _pv);
}else if (time > _delay+_rise){
  // pulsed value
  ev = _pv;
}else if (time > _delay){
  // rising
  interp = (time - _delay) / _rise;
  ev = _iv + interp * (_pv - _iv);
}else{
  // initial value
  ev = _iv;
}