J
johnp
Guest
Here's a simple question on how a combinatorial blocks are (or are not)
triggered at time 0. Using the following code, what should the value
for the 'bug' variable be when it is printed? ModelSim says 00,
Icarus says XX.
Should the always block be triggered at time 0? Is this simply
undefined?
Opinions?
Thanks!
John Providenza
module test;
wire [1:0] mode = 2'b0;
reg [1:0] bug;
always @(mode)
bug = mode;
initial
begin
#10;
$display("%b %b", mode, bug);
$finish;
end
endmodule
triggered at time 0. Using the following code, what should the value
for the 'bug' variable be when it is printed? ModelSim says 00,
Icarus says XX.
Should the always block be triggered at time 0? Is this simply
undefined?
Opinions?
Thanks!
John Providenza
module test;
wire [1:0] mode = 2'b0;
reg [1:0] bug;
always @(mode)
bug = mode;
initial
begin
#10;
$display("%b %b", mode, bug);
$finish;
end
endmodule