soc: Slight cleanup of IRQ assignments

Use a separate process to assign selected interrupts to the
interrupt array, and document them.

There's only one interrupt *for now* but that will change
and this way is clearer.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
jtag-port
Benjamin Herrenschmidt 5 years ago
parent e07b3dd6fa
commit 67b6117ebf

@ -17,6 +17,11 @@
#define SPI_FLASH_BASE 0xf0000000 /* SPI Flash memory map */ #define SPI_FLASH_BASE 0xf0000000 /* SPI Flash memory map */
#define DRAM_INIT_BASE 0xff000000 /* Internal DRAM init firmware */ #define DRAM_INIT_BASE 0xff000000 /* Internal DRAM init firmware */


/*
* Interrupt numbers
*/
#define IRQ_UART0 0

/* /*
* Register definitions for the syscon registers * Register definitions for the syscon registers
*/ */

@ -33,6 +33,9 @@ use work.wishbone_types.all;
-- IO bus, this will be fixed when it's moved out of litedram and -- IO bus, this will be fixed when it's moved out of litedram and
-- into the main SoC once we have a common "firmware". -- into the main SoC once we have a common "firmware".


-- Interrupt numbers:
--
-- 0 : UART0


entity soc is entity soc is
generic ( generic (
@ -118,6 +121,7 @@ architecture behaviour of soc is
signal wb_uart0_in : wb_io_master_out; signal wb_uart0_in : wb_io_master_out;
signal wb_uart0_out : wb_io_slave_out; signal wb_uart0_out : wb_io_slave_out;
signal uart0_dat8 : std_ulogic_vector(7 downto 0); signal uart0_dat8 : std_ulogic_vector(7 downto 0);
signal uart0_irq : std_ulogic;


-- SPI Flash controller signals: -- SPI Flash controller signals:
signal wb_spiflash_in : wb_io_master_out; signal wb_spiflash_in : wb_io_master_out;
@ -568,7 +572,7 @@ begin
reset => rst_uart, reset => rst_uart,
txd => uart0_txd, txd => uart0_txd,
rxd => uart0_rxd, rxd => uart0_rxd,
irq => int_level_in(0), irq => uart0_irq,
wb_adr_in => wb_uart0_in.adr(11 downto 0), wb_adr_in => wb_uart0_in.adr(11 downto 0),
wb_dat_in => wb_uart0_in.dat(7 downto 0), wb_dat_in => wb_uart0_in.dat(7 downto 0),
wb_dat_out => uart0_dat8, wb_dat_out => uart0_dat8,
@ -621,6 +625,13 @@ begin
core_irq_out => core_ext_irq core_irq_out => core_ext_irq
); );


-- Assign external interrupts
interrupts: process(all)
begin
int_level_in <= (others => '0');
int_level_in(0) <= uart0_irq;
end process;

-- BRAM Memory slave -- BRAM Memory slave
bram: if MEMORY_SIZE /= 0 generate bram: if MEMORY_SIZE /= 0 generate
bram0: entity work.wishbone_bram_wrapper bram0: entity work.wishbone_bram_wrapper

Loading…
Cancel
Save