]> Joshua Wise's Git repositories - firearm.git/commitdiff
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 ab684480e3923919d6049b813b588e91fd98e433..356debcb7ceddd20683b0f4de67f4ffe1c1121c0 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;
                                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;
                        end
                end else if (wr_req && cache_hit)
                        cache_data[idx][addr[5:2]] = wr_data;
index b9e4eff39415b0569b866ebf159f4609f30304e9..e90f430930a6b554b09a4bc32247eed61517facd 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;
                                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
                        end
                end
        end
This page took 0.028125 seconds and 4 git commands to generate.