litedram: L2 use latched refill_index
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 11 Jun 2020 10:18:24 +0000 (20:18 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 12 Jun 2020 11:01:34 +0000 (21:01 +1000)
Not a huge difference since wb_req is itself a latch but
may as well

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
litedram/extras/litedram-wrapper-l2.vhdl

index 33aff2859e87c6fc331cb4722e19cced1a0939ed..61b48675cbbdac6cfda0cb6d2ddf5fb35f06ab86 100644 (file)
@@ -962,9 +962,9 @@ begin
                         -- Store new tag in selected way
                         for i in 0 to NUM_WAYS-1 loop
                             if i = refill_way then
-                                tagset := cache_tags(req_index);
+                                tagset := cache_tags(refill_index);
                                 write_tag(i, tagset, req_tag);
-                                cache_tags(req_index) <= tagset;
+                                cache_tags(refill_index) <= tagset;
                             end if;
                         end loop;
                         state <= REFILL_WAIT_ACK;