The Designer's Guide Community
Forum
Welcome, Guest. Please Login or Register. Please follow the Forum guidelines.
May 19th, 2024, 2:12am
Pages: 1
Send Topic Print
gates.va and transition() (Read 14380 times)
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
gates.va and transition()
Sep 04th, 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!
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
jbdavid
Community Fellow
*****
Offline



Posts: 378
Silicon Valley
Re: gates.va and transition()
Reply #1 - 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

Back to top
 
 

jbdavid
Mixed Signal Design Verification
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: gates.va and transition()
Reply #2 - 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:
   vout = ( !((V(in1) > vth) && (V(in2) > vth))) ? vh : vl;
   V(out) <+ transition( vout, td, tt ); 



stops the warning. I'll file a CCR to see if we can improve it.

Regards,

Andrew.
Back to top
 
 
View Profile WWW   IP Logged
Dan Clement
Community Member
***
Offline



Posts: 95
Salt Lake City, Utah, USA
Re: gates.va and transition()
Reply #3 - Jan 25th, 2009, 9:40pm
 
Can you please explain why there is a speed difference in the original question?

Thanks,
Dan
Back to top
 
 
View Profile   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: gates.va and transition()
Reply #4 - 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.
Back to top
 
 
View Profile WWW   IP Logged
Dan Clement
Community Member
***
Offline



Posts: 95
Salt Lake City, Utah, USA
Re: gates.va and transition()
Reply #5 - 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
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: gates.va and transition()
Reply #6 - 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.
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
Andrew Beckett
Senior Fellow
******
Offline

Life, don't talk to
me about Life...

Posts: 1742
Bracknell, UK
Re: gates.va and transition()
Reply #7 - 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.
Back to top
 
 
View Profile WWW   IP Logged
DmitTrix
New Member
*
Offline



Posts: 1
Haifa, IL
Re: gates.va and transition()
Reply #8 - 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
Back to top
 
 
View Profile   IP Logged
Geoffrey_Coram
Senior Fellow
******
Offline



Posts: 1999
Massachusetts, USA
Re: gates.va and transition()
Reply #9 - Feb 8th, 2011, 11:24am
 
Quote:
which might slow down


One question might be: does it seem to be slowing down the simulation?
Back to top
 
 

If at first you do succeed, STOP, raise your standards, and stop wasting your time.
View Profile WWW   IP Logged
naderi
New Member
*
Offline



Posts: 8
Canada
Re: gates.va and transition()
Reply #10 - 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
Back to top
 
 
View Profile   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.