mirror of
https://github.com/steveicarus/iverilog.git
synced 2026-09-03 07:43:07 +02:00
By adding ivtest to the iverilog source tree, it is easier to keep the regression test synchronized with the source that is being tested. This should be especially helpful for PRs that add a new feature, and have a matching ivtest PR with the regression test for that feature.
52 lines
1.0 KiB
Verilog
52 lines
1.0 KiB
Verilog
/*
|
|
I seem to have found a problem with the $monitor task/events.
|
|
(this is probably related to bug 399)
|
|
The problem only seems to arise in vvp mode and not in vvm.
|
|
Problem: $monitor seems to lose both the first and last time steps.
|
|
|
|
A complete copy of the run follows with source appended at the end.
|
|
(The correct output from vvm is shown in the last run)
|
|
This file compiles and produces the problem.
|
|
|
|
[email protected]
|
|
|
|
*/
|
|
|
|
/*
|
|
|
|
bubba> uname -a
|
|
Linux bubba 2.2.15-4mdk #1 Wed May 10 15:31:30 CEST 2000 i686 unknown
|
|
|
|
bubba> iverilog -V
|
|
Icarus Verilog version 0.6
|
|
Copyright 1998-2002 Stephen Williams
|
|
$Name: $
|
|
|
|
bubba> iverilog -Wall -tvvp stim.v
|
|
bubba> a.out
|
|
Time = 1 a = 1
|
|
|
|
bubba> iverilog -Wall -tvvm stim.v
|
|
bubba> a.out
|
|
Time = 0 a = 0
|
|
Time = 1 a = 1
|
|
Time = 2 a = 0
|
|
|
|
*/
|
|
|
|
// -------------------------------------------------------------------------stim
|
|
module stim;
|
|
reg a;
|
|
|
|
initial begin
|
|
a = 0;
|
|
#1 a = 1;
|
|
#1 a = 0;
|
|
end
|
|
|
|
initial begin
|
|
$monitor("Time = %0d a = %b", $time, a);
|
|
end
|
|
|
|
endmodule
|