The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl
Design Languages >> Verilog-AMS >> Transition filter starting at t=0?
https://designers-guide.org/forum/YaBB.pl?num=1334249738

Message started by Bob Atwell on Apr 12th, 2012, 9:55am

Title: Transition filter starting at t=0?
Post by Bob Atwell on Apr 12th, 2012, 9:55am

Is there a way to get a transition filter to start at t=0?  

Assume I want a voltage to ramp from 0 to 1 in 1 sec.  starting at t=0 and ending at t=1.

v <+ transition(1, 0, 1) just starts at 1.

Using @initial_step and @timer doesn't seem to work either.  Am I missing something or is this just not possible?

Title: Re: Transition filter starting at t=0?
Post by Geoffrey_Coram on Apr 13th, 2012, 11:49am

If you do this:

real x;
@(initial_step)
 x = 0;
@(timer(1p))
 x = 1;

V(x) <+ transition(x,0,1);

I would think you could get pretty close to what you were looking for; you can make the argument to @timer smaller, though I guess it has to be always > 0.

Title: Re: Transition filter starting at t=0?
Post by Bob Atwell on Apr 13th, 2012, 3:18pm

Thanks, that was what I came up with too.  
I don't like it much but I don't see any other way around it.

Title: Re: Transition filter starting at t=0?
Post by boulate on Apr 19th, 2012, 10:36am

Why don't you do this?
V() <+ $abstime;

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