Async Reg: Doesn't properly reset for Verilator.
This commit is contained in:
parent
9df3604007
commit
a97add954a
@ -45,21 +45,28 @@ module AsyncResetReg (
|
||||
input clk,
|
||||
input rst);
|
||||
|
||||
`ifdef RANDOMIZE
|
||||
integer initvar;
|
||||
reg [31:0] _RAND;
|
||||
initial begin
|
||||
`ifndef verilator
|
||||
#0.002 begin end
|
||||
`endif
|
||||
`ifdef RANDOMIZE_REG_INIT
|
||||
`ifdef RANDOMIZE
|
||||
integer initvar;
|
||||
reg [31:0] _RAND;
|
||||
_RAND = {1{$random}};
|
||||
if (~rst) begin
|
||||
`endif
|
||||
if (rst) begin
|
||||
`ifdef verilator
|
||||
q = 1'b0;
|
||||
`endif
|
||||
end
|
||||
`ifdef RANDOMIZE
|
||||
`ifndef verilator
|
||||
`endif
|
||||
`ifdef RANDOMIZE_REG_INIT
|
||||
else begin
|
||||
#0.002 begin end
|
||||
q = _RAND[0];
|
||||
end
|
||||
`endif
|
||||
end
|
||||
`endif
|
||||
`endif // `ifdef RANDOMIZE
|
||||
end
|
||||
|
||||
always @(posedge clk or posedge rst) begin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user