A few cleanups. GPIO IRQ number is now 4 as 3 is now taken by the SD card.
loadstore1.vhdl mmu.vhdl dcache.vhdl writeback.vhdl core_debug.vhdl \
core.vhdl fpu.vhdl
-soc_files = $(core_files) wishbone_arbiter.vhdl wishbone_bram_wrapper.vhdl sync_fifo.vhdl \
+soc_files = wishbone_arbiter.vhdl wishbone_bram_wrapper.vhdl sync_fifo.vhdl \
- wishbone_debug_master.vhdl xics.vhdl syscon.vhdl soc.vhdl \
+ wishbone_debug_master.vhdl xics.vhdl syscon.vhdl gpio.vhdl soc.vhdl \
spi_rxtx.vhdl spi_flash_ctrl.vhdl
uart_files = $(wildcard uart16550/*.v)
USE_LITEETH : boolean := false;
UART_IS_16550 : boolean := false;
HAS_UART1 : boolean := true;
- USE_LITESDCARD : boolean := false
++ USE_LITESDCARD : boolean := false;
+ NGPIO : natural := 32
);
port(
ext_clk : in std_ulogic;
LOG_LENGTH => LOG_LENGTH,
HAS_LITEETH => USE_LITEETH,
UART0_IS_16550 => UART_IS_16550,
- HAS_UART1 => false,
+ HAS_UART1 => HAS_UART1,
- HAS_SD_CARD => USE_LITESDCARD
++ HAS_SD_CARD => USE_LITESDCARD,
+ NGPIO => NGPIO
)
port map (
-- System signals
spi_flash_sdat_oe => spi_sdat_oe,
spi_flash_sdat_i => spi_sdat_i,
+ -- GPIO signals
+ gpio_in => gpio_in,
+ gpio_out => gpio_out,
+ gpio_dir => gpio_dir,
+
-- External interrupts
ext_irq_eth => ext_irq_eth,
+ ext_irq_sdcard => ext_irq_sdcard,
-- DRAM wishbone
wb_dram_in => wb_dram_in,
--
-- 0 : UART0
-- 1 : Ethernet
+-- 2 : UART1
+-- 3 : SD card
++-- 4 : GPIO
entity soc is
generic (
HAS_LITEETH : boolean := false;
UART0_IS_16550 : boolean := true;
HAS_UART1 : boolean := false;
- HAS_SD_CARD : boolean := false
+ ICACHE_NUM_LINES : natural := 64;
+ ICACHE_NUM_WAYS : natural := 2;
+ ICACHE_TLB_SIZE : natural := 64;
+ DCACHE_NUM_LINES : natural := 64;
+ DCACHE_NUM_WAYS : natural := 2;
+ DCACHE_TLB_SET_SIZE : natural := 64;
+ DCACHE_TLB_NUM_WAYS : natural := 2;
++ HAS_SD_CARD : boolean := false;
+ NGPIO : natural := 0
);
port(
rst : in std_ulogic;
int_level_in(0) <= uart0_irq;
int_level_in(1) <= ext_irq_eth;
int_level_in(2) <= uart1_irq;
- int_level_in(3) <= gpio_intr;
+ int_level_in(3) <= ext_irq_sdcard;
++ int_level_in(4) <= gpio_intr;
end process;
-- BRAM Memory slave