monitor variables without displaying them

S

Schmigz

Guest
Is there a way to use monitor and not display every single variable
being monitored?

For example:

$monitor("mux_out actual = %x. expected = %x \n", mux_out, out, sel,
a_term, b_term);

I do not want sel, a_term or b_term to display but still need them so
when they change, the string is still displayed.

I searched every where and have not found a method yet. It is not
something vital obviously but more of a can it be done question.

Thanks,
Joe
 
jps0695@rit.edu (Schmigz) wrote in message news:<5b478d34.0412041029.34d61dac@posting.google.com>...
Is there a way to use monitor and not display every single variable
being monitored?

For example:

$monitor("mux_out actual = %x. expected = %x \n", mux_out, out, sel,
a_term, b_term);

I do not want sel, a_term or b_term to display but still need them so
when they change, the string is still displayed.

I searched every where and have not found a method yet. It is not
something vital obviously but more of a can it be done question.
I don't think so. After all, what would be the point of displaying
again when none of the values being displayed have changed since the
last time? If you really want this functionality, you can build it
yourself with something like

always @(mux_out, out, sel, a_term, b_term)
$strobe("mux_out actual = %x, expected = %x", mux_out, out);

$strobe is used here instead of $display so that the display
happens at the end of the time slice, as with $monitor. If that
wasn't a concern, you could just use $display instead.
 
jps0695@rit.edu (Schmigz) wrote in message news:<5b478d34.0412041029.34d61dac@posting.google.com>...
Is there a way to use monitor and not display every single variable
being monitored?

For example:

$monitor("mux_out actual = %x. expected = %x \n", mux_out, out, sel,
a_term, b_term);

I do not want sel, a_term or b_term to display but still need them so
when they change, the string is still displayed.

I searched every where and have not found a method yet. It is not
something vital obviously but more of a can it be done question.

Thanks,
Joe
You may use $display within "always" block:

always @(mux_out or out or sel or a_term or b_term)
$display("mux_out actual = %x. expected = %x \n", mux_out, out);

Regards,
Alexander Gnusin
 

Welcome to EDABoard.com

Sponsor

Back
Top