X-Git-Url: http://git.joshuawise.com/firearm.git/blobdiff_plain/6318a7e8b9da8c5372af7353dfaaf97763984cc9..0e3732b3e54e92cd569cd79f41819a7336f1c6ea:/DCache.v diff --git a/DCache.v b/DCache.v index 4528bd8..e1d5d82 100644 --- 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