From b4cbef36ad73ebc8c8521e33e14a33c86ee392c1 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 11 Oct 2008 23:04:06 +0000 Subject: [PATCH] New serdes status interrupt, clk_status interrupt. New capability to flush the ICache. git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@9779 221aa14e-8319-0410-a670-987f0aec2ac5 --- usrp2/firmware/lib/memory_map.h | 6 +++++- usrp2/fpga/control_lib/icache.v | 5 +++-- usrp2/fpga/control_lib/ram_harv_cache.v | 7 +++++-- usrp2/fpga/top/u2_core/u2_core.v | 11 ++++++++--- usrp2/fpga/top/u2_rev3/Makefile | 1 - 5 files changed, 21 insertions(+), 9 deletions(-) diff --git a/usrp2/firmware/lib/memory_map.h b/usrp2/firmware/lib/memory_map.h index 10672474..aa9951e7 100644 --- a/usrp2/firmware/lib/memory_map.h +++ b/usrp2/firmware/lib/memory_map.h @@ -354,6 +354,7 @@ typedef struct { volatile uint32_t phy_ctrl; // LSB is reset line to eth phy volatile uint32_t debug_mux_ctrl; volatile uint32_t ram_page; // FIXME should go somewhere else... + volatile uint32_t flush_icache; // Flush the icache } output_regs_t; #define SERDES_ENABLE 8 @@ -482,6 +483,8 @@ typedef struct { #define IRQ_PPS 7 // pulse per second #define IRQ_UART_RX 8 #define IRQ_UART_TX 9 +#define IRQ_SERDES 10 +#define IRQ_CLKSTATUS 11 #define IRQ_TO_MASK(x) (1 << (x)) @@ -495,7 +498,8 @@ typedef struct { #define PIC_PPS_INT IRQ_TO_MASK(IRQ_PPS) #define PIC_UART_RX_INT IRQ_TO_MASK(IRQ_UART_RX) #define PIC_UART_TX_INT IRQ_TO_MASK(IRQ_UART_TX) - +#define PIC_SERDES IRQ_TO_MASK(IRQ_SERDES) +#define PIC_CLKSTATUS IRQ_TO_MASK(IRQ_CLKSTATUS) typedef struct { volatile uint32_t edge_enable; // mask: 1 -> edge triggered, 0 -> level diff --git a/usrp2/fpga/control_lib/icache.v b/usrp2/fpga/control_lib/icache.v index dd93c88e..bd21f47c 100644 --- a/usrp2/fpga/control_lib/icache.v +++ b/usrp2/fpga/control_lib/icache.v @@ -11,7 +11,8 @@ module icache output iwb_ack_o, input [31:0] iram_dat_i, output [AWIDTH-1:0] iram_adr_o, - output iram_en_o ); + output iram_en_o, + input flush); localparam TAGWIDTH = AWIDTH-CWIDTH-2; reg stb_d1, ack_d1, miss_d1; @@ -28,7 +29,7 @@ module icache // Write into cache integer i; always @(posedge wb_clk_i) - if(wb_rst_i) + if(wb_rst_i | flush) for(i=0;i<(1<