Updated PGEN model to have level triggered reset (matches actual hardware behavior
authorAndrew Zonenberg <azonenberg@drawersteak.com>
Tue, 15 Aug 2017 00:15:56 +0000 (17:15 -0700)
committerAndrew Zonenberg <azonenberg@drawersteak.com>
Tue, 15 Aug 2017 16:18:27 +0000 (09:18 -0700)
techlibs/greenpak4/cells_sim_digital.v

index 5d9d677503f4682d3eab828e6eed44bd718dd9eb..6fba941a013a19b761252db15ae45608eefaef90 100644 (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;