$ display vs $ strobe vs $ monitor in Verilog?

What is the difference between $ display and $ strobe vs $ monitor in Verilog? When each of them is used in the event queue, and how do the operators interact? Can any statement hinder another?

+2
source share
2 answers

I will be pleased to summarize LRM (Language Reference Guide), but you should read it. Everything is in the IEEE Std 1800-2012 & sect; 21.2 Mapping system tasks (Technically SystemVerilog, but these functions are identical.)

  • $display: print nearest values
    • & section; 21.2.1 Display and Recording Tasks
  • $strobe:
    • & ; 21.2.2
  • $monitor: , - . $monitor ; .
    • & ; 21.2.3
  • $write: , $display, (\n)
    • & ; 21.2.1

:

reg [3:0] a,b;
integer i;
initial begin
  $monitor("monitor a:%h b:%h @ %0t", a, b, $time);
  for(i=0; i<4; i=i+1) begin
    $strobe("strobe  a:%h b:%h @ %0t", a, b, $time);
    $display("display a:%h b:%h @ %0t", a, b, $time);
    case(i)
      0 : a = 4;
      1 : b = 1;
      2 : begin end // do nothing
      3 : {a,b} = 9;
    endcase
    $display("display a:%h b:%h @ %0t", a, b, $time);
    #1;
  end
end

: ( , 2)

a: x b: x @0
a: 4 b: x @0
a: 4 b: x @0
a: 4 b: x @0
a: 4 b: x @1
a: 4 b: 1 @1
a: 4 b: 1 @1
a: 4 b: 1 @1
a: 4 b: 1 @2
a: 4 b: 1 @2
a: 4 b: 1 @2
a: 4 b: 1 @3
a: 0 b: 9 @3
a: 0 b: 9 @3
a: 0 b: 9 @3

+10

Verilog/SystemVerilog . .

  • $display ACTIVE, , - ( ), $.
  • $write ACTIVE, (\n). , , .
  • $ MONITOR/POSTPONE, . , $.
  • $ , . $monitor Simulation.

: VERILOG EVENT

: //

, .

+2

Source: https://habr.com/ru/post/1609380/


All Articles