DCache: Fix silly bug involving failing to clear bus_wr.
authorJoshua Wise <joshua@rebirth.joshuawise.com>
Sat, 10 Jan 2009 08:48:06 +0000 (03:48 -0500)
committerJoshua Wise <joshua@rebirth.joshuawise.com>
Sat, 10 Jan 2009 08:48:06 +0000 (03:48 -0500)
DCache.v

index 4528bd8..e1d5d82 100644 (file)
--- a/DCache.v
+++ b/DCache.v
@@ -54,6 +54,11 @@ module DCache(
        reg [3:0] cache_fill_pos = 0;
        assign bus_req = (rd_req && !cache_hit) || wr_req;
        always @(*)
+       begin
+               bus_rd = 0;
+               bus_wr = 0;
+               bus_addr = 0;
+               bus_wdata = 0;
                if (rd_req && !cache_hit && bus_ack) begin
                        bus_addr = {addr[31:6], cache_fill_pos[3:0], 2'b00 /* reads are 32-bits */};
                        bus_rd = 1;
@@ -61,10 +66,8 @@ module DCache(
                        bus_addr = addr;
                        bus_wr = 1;
                        bus_wdata = wr_data;
-               end else begin
-                       bus_addr = 0;
-                       bus_rd = 0;
                end
+       end
        
        always @(posedge clk)
                if (rd_req && !cache_hit) begin
This page took 0.020667 seconds and 4 git commands to generate.