1
0
mirror of https://github.com/aolofsson/oh.git synced 2025-01-17 20:02:53 +08:00

Fixing another bug (PS vs N)

This commit is contained in:
Andreas.Olofsson 2020-03-04 21:12:24 -05:00
parent 4f0f81997e
commit 2b2c719765
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@
module oh_clockgate (
input clk, // clock input
input te, // test enable enable
input te, // test enable
input en, // enable (from positive edge FF)
output eclk // enabled clock output
);

View File

@ -19,7 +19,7 @@ module oh_datagate #(parameter DW = 32, // width of data inputs
reg [N-1:0] enable_pipe;
always @ (posedge clk)
enable_pipe[PS-1:0] <= {enable_pipe[PS-2:0],en};
enable_pipe[N-1:0] <= {enable_pipe[N-2:0],en};
//Mask to 0 if no valid for last N cycles
assign enable = en | (|enable_pipe[N-1:0]);