forked from Github_Repos/cvw
added 1 tick delay on tim reads
This commit is contained in:
parent
682050a33b
commit
b5fa410e15
@ -85,14 +85,14 @@ module dtim #(parameter BASE=0, RANGE = 65535) (
|
||||
generate
|
||||
if (`XLEN == 64) begin
|
||||
always_ff @(posedge HCLK) begin
|
||||
HWADDR <= A;
|
||||
HREADTim0 <= RAM[A[31:3]];
|
||||
HWADDR <= #1 A;
|
||||
HREADTim0 <= #1 RAM[A[31:3]];
|
||||
if (memwrite && risingHREADYTim) RAM[HWADDR[31:3]] <= HWDATA;
|
||||
end
|
||||
end else begin
|
||||
always_ff @(posedge HCLK) begin
|
||||
HWADDR <= A;
|
||||
HREADTim0 <= RAM[A[31:2]];
|
||||
HWADDR <= #1 A;
|
||||
HREADTim0 <= #1 RAM[A[31:2]];
|
||||
if (memwrite && risingHREADYTim) RAM[HWADDR[31:2]] <= HWDATA;
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user