08/01/2012

Difference between monitor,display & strobe


These commands have the same syntax, and display text on the screen during simulation. They are much less convenient than waveform display tools like cwaves?.


$display and $strobe display once every time they are executed, whereas $monitor displays every time one of its parameters changes.


The difference between $display and $strobe is that $strobe displays the parameters at the very end of the current simulation time unit rather than exactly where it is executed. 

The format string is like that in C/C++, and may contain format characters. 

Format characters include %d (decimal), %h (hexadecimal), %b (binary), %c (character), %s (string) and %t (time), %m (hierarchy level). %5d, %5b etc. would give exactly 5 spaces for the number instead of the space needed. 


Append b, h, o to the task name to change default format to binary, octal or hexadecimal.



Syntax:
$display (“format_string”, par_1, par_2, ... );
$strobe (“format_string”, par_1, par_2, ... );
$monitor (“format_string”, par_1, par_2, ... );

No comments:

Post a Comment