From 8b377a9d6d0ad281474a8dbff49ea3b093178b28 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Fri, 22 Jan 2010 16:00:45 -0800 Subject: moved into subdir --- usrp2/control_lib/dcache.v | 165 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) create mode 100644 usrp2/control_lib/dcache.v (limited to 'usrp2/control_lib/dcache.v') diff --git a/usrp2/control_lib/dcache.v b/usrp2/control_lib/dcache.v new file mode 100644 index 000000000..9063bf02a --- /dev/null +++ b/usrp2/control_lib/dcache.v @@ -0,0 +1,165 @@ + +module dcache + #(parameter AWIDTH=14, + parameter CWIDTH=6) + (input wb_clk_i, + input wb_rst_i, + + input [AWIDTH-1:0] dwb_adr_i, + input dwb_stb_i, + input dwb_we_i, + input [3:0] dwb_sel_i, + input [31:0] dwb_dat_i, + output [31:0] dwb_dat_o, + output dwb_ack_o, + + input [31:0] dram_dat_i, + output [31:0] dram_dat_o, + output [AWIDTH-1:0] dram_adr_o, + output dram_we_o, + output dram_en_o, + output [3:0] dram_sel_o ); + + localparam TAGWIDTH = AWIDTH-CWIDTH-2; + reg stb_d1, ack_d1, miss_d1; + reg [AWIDTH-1:0] held_addr; + reg [31:0] ddata [0:(1<