// ===========================================================
// ActiveUpdate:  Shows how the active region can repopulate
// the other current-time strata.
// Ignoring $display, which is put always in the active region,
// each event at time = 10 puts exactly one new event into one
// of the current-time strata; that one event then is moved to
// the active region and executed.
// ------------------------------------------------------------
// 2010-11-08 jmw: 1.0 Implemented.
// ============================================================
//
`timescale 1ns/100ps
module ActiveUpdate;
//
reg Clock
  , Active, InActive, NonBlock, Monitor;
//
initial
  begin
  Active   = 1'b0;
  InActive = 1'b0;
  NonBlock = 1'b0;
  Monitor  = 1'b1; // Initial value is 1.
  //
  #1 Clock = 1'b0;
  #9 Clock = 1'b1;
  #10 $finish;
  end
//
// This block triggers an event at time = 10 in the active region:
//
always@(posedge Clock)
  begin
  Active = 1'b1;
  $display("%02d Active --> %1b\n", $time, Active);
  end
//
// This block triggers an event at time = 10 in the inactive region:
//
always@(posedge Active)
  begin
  #0 InActive = 1'b1;
  $display("%02d InActive --> %1b\n", $time, InActive);
  end
//
// This block triggers an event at time = 10 in the nonblocking assign region:
//
always@(posedge InActive)
  begin
  NonBlock <= 1'b1;
  $display("%02d NonBlock --> %1b\n", $time, NonBlock);
  end
//
// This block triggers an event at time = 10 in the monitor region:
//
always@(posedge NonBlock)
  begin
  $strobe("%02d Monitor is %1b\n", $time, Monitor);
  end
//
endmodule
