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:
Rupert Swarbrick 2020-04-27 09:12:42 +01:00 committed by Rupert Swarbrick
parent 34098bc315
commit 439513ba68
3 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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;

View file

@ -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 {