mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-03 02:05:21 +00:00
Removed delays from cacheLRU and testbench
This commit is contained in:
parent
690338b758
commit
0caab3c0c9
4
src/cache/cacheLRU.sv
vendored
4
src/cache/cacheLRU.sv
vendored
@ -149,8 +149,8 @@ module cacheLRU
|
|||||||
for (int set = 0; set < NUMLINES; set++) LRUMemory[set] = 0; // exclusion-tag: initialize
|
for (int set = 0; set < NUMLINES; set++) LRUMemory[set] = 0; // exclusion-tag: initialize
|
||||||
else if(CacheEn) begin
|
else if(CacheEn) begin
|
||||||
// Because we are using blocking assignments, change to LRUMemory must occur after LRUMemory is used so we get the proper value
|
// Because we are using blocking assignments, change to LRUMemory must occur after LRUMemory is used so we get the proper value
|
||||||
if(LRUWriteEn & (PAdr == CacheSetTag)) CurrLRU = #1 NextLRU;
|
if(LRUWriteEn & (PAdr == CacheSetTag)) CurrLRU = NextLRU;
|
||||||
else CurrLRU = #1 LRUMemory[CacheSetTag];
|
else CurrLRU = LRUMemory[CacheSetTag];
|
||||||
if(LRUWriteEn) LRUMemory[PAdr] = NextLRU;
|
if(LRUWriteEn) LRUMemory[PAdr] = NextLRU;
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -216,8 +216,8 @@ module testbench;
|
|||||||
end
|
end
|
||||||
|
|
||||||
always_ff @(posedge clk)
|
always_ff @(posedge clk)
|
||||||
if (TestBenchReset) CurrState <= #1 STATE_TESTBENCH_RESET;
|
if (TestBenchReset) CurrState <= STATE_TESTBENCH_RESET;
|
||||||
else CurrState <= #1 NextState;
|
else CurrState <= NextState;
|
||||||
|
|
||||||
// fsm next state logic
|
// fsm next state logic
|
||||||
always_comb begin
|
always_comb begin
|
||||||
|
@ -248,8 +248,8 @@ module testbench;
|
|||||||
end
|
end
|
||||||
|
|
||||||
always_ff @(posedge clk)
|
always_ff @(posedge clk)
|
||||||
if (TestBenchReset) CurrState <= #1 STATE_TESTBENCH_RESET;
|
if (TestBenchReset) CurrState <= STATE_TESTBENCH_RESET;
|
||||||
else CurrState <= #1 NextState;
|
else CurrState <= NextState;
|
||||||
|
|
||||||
// fsm next state logic
|
// fsm next state logic
|
||||||
always_comb begin
|
always_comb begin
|
||||||
|
Loading…
Reference in New Issue
Block a user