mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-22 21:07:34 -04:00
Fixes to invalidation logic in icache core agent
Firstly, the pulse shouldn't be zero length (since that wouldn't actually do anything). Also, 1 time in 500 is too rare for either invalidations or "long invalidations", I think, so this patch also increases how often we see each.
This commit is contained in:
parent
34098bc315
commit
439513ba68
3 changed files with 4 additions and 4 deletions
|
@ -143,7 +143,7 @@ class ibex_icache_core_driver
|
|||
virtual task automatic invalidate();
|
||||
int unsigned num_cycles;
|
||||
`DV_CHECK_STD_RANDOMIZE_WITH_FATAL(num_cycles,
|
||||
num_cycles dist { 0 :/ 499, [1:20] :/ 1 };)
|
||||
num_cycles dist { 1 :/ 10, [2:20] :/ 1 };)
|
||||
cfg.vif.invalidate_pulse(num_cycles);
|
||||
endtask
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ interface ibex_icache_core_if (input clk, input rst_n);
|
|||
//
|
||||
// A one-cycle pulse will start an invalidation, but testing might want a longer pulse (which the
|
||||
// cache should support)
|
||||
task automatic invalidate_pulse(int num_cycles);
|
||||
task automatic invalidate_pulse(int unsigned num_cycles);
|
||||
driver_cb.invalidate <= 1'b1;
|
||||
wait_clks(num_cycles);
|
||||
driver_cb.invalidate <= 1'b0;
|
||||
|
|
|
@ -45,9 +45,9 @@ class ibex_icache_core_req_item extends uvm_sequence_item;
|
|||
}
|
||||
|
||||
constraint c_invalidate_dist {
|
||||
// Poke the cache invalidate line one time in 500. This takes ages and we don't want to
|
||||
// Poke the cache invalidate line one time in 50. This takes ages and we don't want to
|
||||
// accidentally spend most of the test waiting for invalidation.
|
||||
invalidate dist { 0 :/ 499, 1 :/ 1 };
|
||||
invalidate dist { 0 :/ 49, 1 :/ 1 };
|
||||
}
|
||||
|
||||
constraint c_num_insns_dist {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue