WIDTH check for max

D

Deepu

Guest
Hi,

I normally use '$width' task to find out if a signal width is atleast
the delay specified (minimum).

$width(posedge sig_A, 100);

How can i check if the signal width can be maximum of the delay
specified?

Thanks..
 
Deepu wrote:
Hi,

I normally use '$width' task to find out if a signal width is atleast
the delay specified (minimum).

$width(posedge sig_A, 100);

How can i check if the signal width can be maximum of the delay
specified?

Thanks..
You can add a "threshold" to define the maximum width allowable
and then make the "limit" (100 in your example) huge. Any pulse
shorter than the threshold will not produce a violation:

$width (posedge sig_A, 999999, 100);

-- Gabor
 
You can add a "threshold" to define the maximum width allowable
and then make the "limit" (100 in your example) huge.  Any pulse
shorter than the threshold will not produce a violation:

$width (posedge sig_A, 999999, 100);
This might not work as the definition of $width says:

threshold < (reference2 - reference1) < limit
 
Deepu wrote:
You can add a "threshold" to define the maximum width allowable
and then make the "limit" (100 in your example) huge. Any pulse
shorter than the threshold will not produce a violation:

$width (posedge sig_A, 999999, 100);

This might not work as the definition of $width says:

threshold < (reference2 - reference1) < limit
The point I was making is that the limit should be so large
that you have no trouble spotting that the signal exceeds it.
As an example, the limit could be larger than the entire
simulation run. I'm assuming you'd have a serious logic error
if the width exceeds that value. The string of nines in my
example represents a long time for my purposes where the
timescale is usually set to 1 ns.

-- Gabor
 

Welcome to EDABoard.com

Sponsor

Back
Top