The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
Mar 28th, 2024, 7:35am
Pages: 1
Send Topic Print
Creating two pulses with different rise times using two transition operators (Read 1438 times)
Rosh
Junior Member
**
Offline



Posts: 21

Creating two pulses with different rise times using two transition operators
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?
Back to top
 
 
View Profile   IP Logged
Ken Kundert
Global Moderator
*****
Offline



Posts: 2384
Silicon Valley
Re: Creating two pulses with different rise times using two transition operators
Reply #1 - 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
Back to top
 
 
View Profile WWW   IP Logged
Pages: 1
Send Topic Print
Copyright 2002-2024 Designer’s Guide Consulting, Inc. Designer’s Guide® is a registered trademark of Designer’s Guide Consulting, Inc. All rights reserved. Send comments or questions to editor@designers-guide.org. Consider submitting a paper or model.