The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Creating two pulses with different rise times using two transition operators
https://designers-guide.org/forum/YaBB.pl?num=1454307977

Message started by Rosh on Jan 31st, 2016, 10:26pm

Title: Creating two pulses with different rise times using two transition operators
Post by Rosh on Jan 31st, 2016, 10:26pm

Hello all,

I have to generate two pulses, each with different rise times.

This is my code



Code:
`include "disciplines.vams"

module vdriver(out);
parameter real td = 10n;  
parameter real tt = 10n;      

  output out;
  voltage  out;
  real Vout, tend,rst;

analog
begin

     @(timer(0))
     begin
     Vout=0;
     end


     @(timer(20n))  
     begin
     Vout=5;
     end



     @(timer(40n))
     begin

     Vout=3;
     end

     @(timer(60n))
     begin

     Vout=5;
     end

     V(out)<+transition(Vout,0,td,tt);  //Rise=Fall=10n


end

endmodule



However, I'd like the second the second pulse to have a different rise/fall time.
If I add a second transition operator however, the entire waveform goes haywire. Any recommendation to solve this?

Title: Re: Creating two pulses with different rise times using two transition operators
Post by Ken Kundert on Feb 1st, 2016, 10:48am

You are already changing the voltage of each transition. Use the same technique to change the transition time.

In otherwords, make tt a variable that you set when you set Vout.

-Ken

The Designer's Guide Community Forum » Powered by YaBB 2.2.2!
YaBB © 2000-2008. All Rights Reserved.