Ready-to-run snippets

Code Examples

Ready-to-run Verilog, SystemVerilog, and UVM examples. Click any to open it live in the IDE.

← All examples

Scheduling Semantics: Event Processing Flow

Verilog Examples

Runnable example from the Verilog Scheduling Semantics tutorial (Event Processing Flow)

Open in IDE
testbench.v
module regions;
  reg [3:0] a;

  initial begin
    a = 1;
    a <= 2;                              // Update scheduled in the NBA region
    $display ("display : a=%0d", a);     // Active region
    #0 $display ("after #0: a=%0d", a);  // Inactive region
    $strobe ("strobe  : a=%0d", a);      // Monitor region
  end
endmodule
Admin mode — edit and delete controls are visible on each row. Use the IDE to add new snippets via File → Save as Snippet.