Difference between $strobe and $monitor

G

gck

Guest
Can any body explain, how exactly $strobe and $monitor are different.
Please give me the situation where it shows.

Thanks in advance
 
On Wed, 5 Nov 2008 20:19:26 -0800 (PST), gck <gkhedkar@gmail.com>
wrote:

Can any body explain, how exactly $strobe and $monitor are different.
$strobe displays its arguments at the end of the
time-slot in which the $strobe call was executed.

$monitor does the same, but then sensitises itself to all
signals in its argument list so that it executes again
at the end of every future timeslot in which any of
its arguments changes.

Please give me the situation where it shows.
module strobe_vs_monitor;

reg [7:0] Sig;

// Make various things happen to Sig
initial begin
Sig = 1;
Sig <= 2;
repeat (3) #5 Sig = Sig + 1;
end

// Show the difference between $strobe and $monitor
initial begin
$strobe("$strobe at time=%0d: Sig='h%h", $time, Sig);
$monitor("$monitor at time=%0d: Sig='h%h", $time, Sig);
$display("strobe and monitor calls finished at time=%0d", $time);
end

endmodule

--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 
On Thu, 06 Nov 2008 09:04:30 +0000, Jonathan Bromley wrote:


Please give me the situation where it shows.

module strobe_vs_monitor;
[...]

Oops, I forgot to mention my usual terms and conditions:
anything I post is completely free for industrial or
commercial use, but attracts a $2000 one-time royalty
fee when used as a homework solution.
--
Jonathan Bromley, Consultant

DOULOS - Developing Design Know-how
VHDL * Verilog * SystemC * e * Perl * Tcl/Tk * Project Services

Doulos Ltd., 22 Market Place, Ringwood, BH24 1AW, UK
jonathan.bromley@MYCOMPANY.com
http://www.MYCOMPANY.com

The contents of this message may contain personal views which
are not the views of Doulos Ltd., unless specifically stated.
 

Welcome to EDABoard.com

Sponsor

Back
Top