Subject: Re: [sv-ec] Section 12.6.4 - wait
From: Michael McNamara (mac@verisity.com)
Date: Fri Feb 07 2003 - 08:50:58 PST
OK, looking at all of this, I must ask: How is a persistant event
different than a register?
Is it just a register that is automatically cleared when the clock
changes?
Could then a user get it today via:
% cat macros.h
`define p_event(A,CLK) reg A = 0; always @(CLK) A = 0
% cat foo.v
`include "macros.h"
module foo;
reg clk = 0; initial forever #10 clk = ~clk ;
`p_event(a,clk); // a persistant event that will be cleared on clk
initial #200 $finish;
always @(clk) $display ($time,,"clk is ",clk);
always @(a) $display ($time,,"a is ",a);
initial begin
#101 a = 1;
end
initial begin: t1
real t_sta;
#103;
t_sta = $time;
wait(a) $display ($time,,"Wait for A started at %g fullfilled",t_sta);
end
initial begin: t2
real t_sta;
#99;
t_sta = $time;
wait(a) $display ($time,,"Wait for A started at %g fullfilled",t_sta);
end
endmodule
This archive was generated by hypermail 2b28 : Fri Feb 07 2003 - 08:51:32 PST