DCache/ICache: Invalidate while filling, so if the fill is aborted, then at least...
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Sat, 17 Jan 2009 11:09:41 +0000 (06:09 -0500)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Sat, 17 Jan 2009 11:09:41 +0000 (06:09 -0500)
DCache.v
ICache.v

index ab68448..356debc 100644 (file)
--- a/DCache.v
+++ b/DCache.v
@@ -86,7 +86,8 @@ module DCache(
                                if (cache_fill_pos == 15) begin /* Done? */
                                        cache_tags[idx] <= tag;
                                        cache_valid[idx] <= 1;
-                               end
+                               end else
+                                       cache_valid[idx] <= 0;
                        end
                end else if (wr_req && cache_hit)
                        cache_data[idx][addr[5:2]] = wr_data;
index b9e4eff..e90f430 100644 (file)
--- a/ICache.v
+++ b/ICache.v
@@ -77,7 +77,9 @@ module ICache(
                                if (cache_fill_pos == 15) begin /* Done? */
                                        cache_tags[rd_idx] <= rd_tag;
                                        cache_valid[rd_idx] <= 1;
-                               end
+                                       $display("ICACHE: Fill complete for line %x, tag %x", rd_idx, rd_tag);
+                               end else
+                                       cache_valid[rd_idx] <= 0;
                        end
                end
        end
This page took 0.020496 seconds and 4 git commands to generate.