X-Git-Url: http://git.joshuawise.com/firearm.git/blobdiff_plain/45fa96c0a2fd6e490690cff69dd694a3dce3ab35..981270c3e15a542f5ca03780c562bc24c6c90735:/ICache.v diff --git a/ICache.v b/ICache.v index 3a9f144..2e28adf 100644 --- a/ICache.v +++ b/ICache.v @@ -10,7 +10,7 @@ module ICache( output reg [31:0] rd_data, /* bus interface */ - output reg bus_req, + output wire bus_req, input bus_ack, output reg [31:0] bus_addr, input [31:0] bus_rdata, @@ -35,7 +35,10 @@ module ICache( reg [4:0] i; initial for (i = 0; i < 16; i = i + 1) + begin cache_valid[i[3:0]] = 0; + cache_tags[i[3:0]] = 0; + end wire [5:0] rd_didx = rd_addr[5:0]; wire [3:0] rd_didx_word = rd_didx[5:2]; @@ -63,6 +66,7 @@ module ICache( always @(posedge clk) if (rd_req && !cache_hit) begin if (bus_ready) begin /* Started the fill, and we have data. */ + $display("CACHE FILL: rq adr %08x; bus addr %08x; bus data %08x", rd_addr, bus_addr, bus_rdata); cache_data[rd_idx][cache_fill_pos] <= bus_rdata; cache_fill_pos <= cache_fill_pos + 1; if (cache_fill_pos == 15) begin /* Done? */