The Designer's Guide Community Forum
https://designers-guide.org/forum/YaBB.pl Modeling >> Behavioral Models >> gates.va and transition() https://designers-guide.org/forum/YaBB.pl?num=1220537539 Message started by Geoffrey_Coram on Sep 4th, 2008, 7:12am |
Title: gates.va and transition() Post by Geoffrey_Coram on Sep 4th, 2008, 7:12am I was running the Verilog-A logic gates from: http://www.designers-guide.org/VerilogAMS/functional-blocks/gates/gates.va in a commercial simulator, and I got this warning: VERILOG-A PERFORMANCE WARNING: "gates.va", line 125: The first argument to the transition filter is a continuous signal, which might slow down the simulation. Further occurrences of this warning will be suppressed. If I change, for example, V(out) <+ transition( !((V(in1) > vth) && (V(in2) > vth)) ? vh : vl, td, tt ); to vout = ( !((V(in1) > vth) && (V(in2) > vth))) ? vh : vl; V(out) <+ transition( vout, td, tt ); then I don't get the warning, and the simulation runs 40x faster! |
Title: Re: gates.va and transition() Post by jbdavid on Sep 4th, 2008, 10:49am you would think Ken would know better.. But maybe SOME commercial simulators figure out that the expression is results in a logical value, and some don't.. I normally only evaluate the logic output on the cross event.. not every time step -- unless I need to support spectreRF.. (and i think the transition statement itself is a problem there) .. jbd |
Title: Re: gates.va and transition() Post by Andrew Beckett on Jan 5th, 2009, 8:29am Hmm, spectre doesn't seem to be that clever about figuring this out. Even just reformulating the same expression as: Code:
stops the warning. I'll file a CCR to see if we can improve it. Regards, Andrew. |
Title: Re: gates.va and transition() Post by Dan Clement on Jan 25th, 2009, 9:40pm Can you please explain why there is a speed difference in the original question? Thanks, Dan |
Title: Re: gates.va and transition() Post by Andrew Beckett on Jan 27th, 2009, 12:37pm Dan, No, but I didn't do any significant tests - mine was just to see if it compiled rather than giving it anything sensible to simulate. Perhaps Geoffrey can comment - I'm sure he'll take this up with Cadence ;) Regards, Andrew. |
Title: Re: gates.va and transition() Post by Dan Clement on Jan 28th, 2009, 6:10am Hi Andrew, That's cool. I seem to keep running into speed issues when I try to use the transition and slew operators. So if anyone can explain the right and wrong way to use these functions, I would truly appreciate more guidance. I am a spectre user. Best Regards, Dan |
Title: Re: gates.va and transition() Post by Geoffrey_Coram on Feb 2nd, 2009, 10:38am I think the issue is, if you were to do V(out) <+ transition( V(in1), td, tt); then every time V(in1) changed even the slightest, the simulator would have to schedule a timepoint at t+td to propagate this change to the output (and further timepoints up to t+td+tt to finish the transition). I guess the simulator sees the V(in1) in the original argument and schedules these timepoints, even at timepoints where the Boolean expression isn't changing. |
Title: Re: gates.va and transition() Post by Andrew Beckett on Feb 3rd, 2009, 9:07pm That's a good point. Merely fixing the warning is not enough - the warning is reasonable, if that's the behaviour. We need to fix it to prevent the transition being unnecessarily triggered by what it sees as a continuous signal. I'll append this to the CCR I filed. Regards, Andrew. |
Title: Re: gates.va and transition() Post by DmitTrix on Feb 8th, 2011, 5:08am (sorry for resurrecting an old thread, but it seems to me the appropriate place to ask...) I've run into this warning ("The first argument to the transition filter is a continuous signal, which might slow down the simulation") while using a simple Sample-and-Hold implemented as follows: parameter real Vt = 0.5 from (-inf:inf); parameter real Td = 0 from [0:inf); parameter real Tr = 100p from (0:inf); parameter real Tf = 100p from (0:inf); real vout_val; analog begin @(cross(V(vclk) - Vt, 1)) vout_val = V(vin); V(vout) <+ transition( vout_val, Td, Tr, Tf ); end Seems that Spectre refers to a real value as to a value that can change continuously (although it doesn't), and issues the warning. I don't see any way to implement it without using a real value, or without using the "transition" filter (removing it will cause too abrupt changes at the output). Any suggestions? Thanx, Dmitry. P.S. I'm running MMSim 10.1 |
Title: Re: gates.va and transition() Post by Geoffrey_Coram on Feb 8th, 2011, 11:24am Quote:
One question might be: does it seem to be slowing down the simulation? |
Title: Re: gates.va and transition() Post by naderi on Feb 24th, 2011, 5:43pm Hi, I also have the same problem. The block is basically a sample and hold. The output signal is not continuous time, despite the warning. I am not sure about the correct method of speed test. However, it seems to me the simulation time increases specially when it is used with other blocks. Ali |
The Designer's Guide Community Forum » Powered by YaBB 2.2.2! YaBB © 2000-2008. All Rights Reserved. |