2016-12-21 22:43:19 +00:00
|
|
|
// DESCRIPTION: Verilator: Verilog Test module
|
|
|
|
//
|
|
|
|
// This file ONLY is placed into the Public Domain, for any use,
|
|
|
|
// without warranty, 2016 by Wilson Snyder.
|
|
|
|
|
|
|
|
module t
|
|
|
|
(
|
|
|
|
input wire clk,
|
2016-12-21 23:23:14 +00:00
|
|
|
input wire a,
|
|
|
|
input wire b
|
2016-12-21 22:43:19 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
integer q;
|
2017-09-11 23:18:58 +00:00
|
|
|
|
2016-12-21 23:23:14 +00:00
|
|
|
// bug1120
|
2016-12-21 22:43:19 +00:00
|
|
|
always @ (a or posedge clk)
|
|
|
|
begin
|
|
|
|
if (a)
|
|
|
|
q = 0;
|
2017-09-11 23:18:58 +00:00
|
|
|
else
|
2016-12-21 22:43:19 +00:00
|
|
|
q = q + 1;
|
|
|
|
end
|
|
|
|
|
2016-12-21 23:23:14 +00:00
|
|
|
// bug934
|
|
|
|
integer qb;
|
|
|
|
always @((a && b) or posedge clk) begin
|
|
|
|
if (a)
|
|
|
|
qb = 0;
|
|
|
|
else
|
|
|
|
qb = qb + 1;
|
|
|
|
end
|
|
|
|
|
2016-12-21 22:43:19 +00:00
|
|
|
endmodule
|