Commit 8006dbda authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

VME_IRQ_Controller: correctly handle interrupts triggered simultaneously by multiple cards.

Also made the IRQ line level sensitive and applied retry timer. This is a rewrite of the IRQ controller, the whole core
needs to be checked again and possibly rewritten too.
parent 35164028
...@@ -414,14 +414,15 @@ begin ...@@ -414,14 +414,15 @@ begin
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
-- Interrupter -- Interrupter
Inst_VME_IRQ_Controller : VME_IRQ_Controller Inst_VME_IRQ_Controller : VME_IRQ_Controller
generic map (
g_retry_timeout => 62500 -- 1ms timeout
)
port map( port map(
clk_i => clk_i, clk_i => clk_i,
reset_n_i => s_reset_IRQ, -- asserted when low reset_n_i => s_reset_IRQ, -- asserted when low
VME_IACKIN_n_i => VME_IACKIN_n_oversampled, VME_IACKIN_n_i => VME_IACKIN_n_oversampled,
VME_AS_n_i => VME_AS_n_oversampled, VME_AS_n_i => VME_AS_n_oversampled,
VME_AS1_n_i => VME_AS_n_i,
VME_DS_n_i => VME_DS_n_oversampled, VME_DS_n_i => VME_DS_n_oversampled,
VME_LWORD_n_i => VME_LWORD_n_i,
VME_ADDR_123_i => VME_ADDR_i(3 downto 1), VME_ADDR_123_i => VME_ADDR_i(3 downto 1),
INT_Level_i => s_INT_Level, INT_Level_i => s_INT_Level,
INT_Vector_i => s_INT_Vector , INT_Vector_i => s_INT_Vector ,
......
This diff is collapsed.
...@@ -358,6 +358,7 @@ package vme64x_pack is ...@@ -358,6 +358,7 @@ package vme64x_pack is
DECIDE_NEXT_CYCLE, DECIDE_NEXT_CYCLE,
INCREMENT_ADDR, INCREMENT_ADDR,
SET_DATA_PHASE SET_DATA_PHASE
-- UGLY_WAIT_TO_MAKE_DECODING_WORK
-- uncomment for using 2e modes: -- uncomment for using 2e modes:
-- WAIT_FOR_DS_2e, -- WAIT_FOR_DS_2e,
-- ADDR_PHASE_1, -- ADDR_PHASE_1,
...@@ -807,28 +808,27 @@ package vme64x_pack is ...@@ -807,28 +808,27 @@ package vme64x_pack is
); );
end component SingleRegInputSample; end component SingleRegInputSample;
component VME_IRQ_Controller
component VME_IRQ_Controller is generic (
port( g_retry_timeout : integer range 1024 to 16777215);
port (
clk_i : in std_logic; clk_i : in std_logic;
reset_n_i : in std_logic; reset_n_i : in std_logic;
VME_IACKIN_n_i : in std_logic; VME_IACKIN_n_i : in std_logic;
VME_AS_n_i : in std_logic; VME_AS_n_i : in std_logic;
VME_AS1_n_i : in std_logic; VME_DS_n_i : in std_logic_vector (1 downto 0);
VME_DS_n_i : in std_logic_vector(1 downto 0); VME_ADDR_123_i : in std_logic_vector (2 downto 0);
VME_LWORD_n_i : in std_logic; INT_Level_i : in std_logic_vector (7 downto 0);
VME_ADDR_123_i : in std_logic_vector(2 downto 0); INT_Vector_i : in std_logic_vector (7 downto 0);
INT_Level_i : in std_logic_vector(7 downto 0);
INT_Vector_i : in std_logic_vector(7 downto 0);
INT_Req_i : in std_logic; INT_Req_i : in std_logic;
VME_IRQ_n_o : out std_logic_vector(6 downto 0); VME_IRQ_n_o : out std_logic_vector (6 downto 0);
VME_IACKOUT_n_o : out std_logic; VME_IACKOUT_n_o : out std_logic;
VME_DTACK_n_o : out std_logic; VME_DTACK_n_o : out std_logic;
VME_DTACK_OE_o : out std_logic; VME_DTACK_OE_o : out std_logic;
VME_DATA_o : out std_logic_vector(31 downto 0); VME_DATA_o : out std_logic_vector (31 downto 0);
VME_DATA_DIR_o : out std_logic VME_DATA_DIR_o : out std_logic);
); end component;
end component VME_IRQ_Controller;
component VME_CRAM is component VME_CRAM is
generic (dl : integer := 8; generic (dl : integer := 8;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment