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:
parent
4f0f81997e
commit
2b2c719765
@ -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
|
||||
);
|
||||
|
@ -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]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user