Updated PGEN model to have level triggered reset (matches actual hardware behavior

This commit is contained in:
Andrew Zonenberg 2017-08-14 17:15:56 -07:00
parent e5109847c9
commit 3a404be62a
1 changed files with 4 additions and 4 deletions

View File

@ -741,10 +741,10 @@ module GP_PGEN(input wire nRST, input wire CLK, output reg OUT);
localparam COUNT_MAX = PATTERN_LEN - 1'h1;
reg[3:0] count = 0;
always @(posedge CLK) begin
if(!nRST) begin
count <= COUNT_MAX;
end
always @(posedge CLK, negedge nRST) begin
if(!nRST)
count <= 0;
else begin
count <= count - 1'h1;