nonrandom.vhdl
# use an alternative core (in verilog)
-EXTERNAL_CORE=true
+EXTERNAL_CORE=false
+# VHDL does not allow integers greater than 2^32, so shift down
+# by 16 bits and add 16 bits zeros back on in soc-generic.vhdl
+RESET_ADDRESS=65280 # 0xff00_0000>>16
ifeq ($(EXTERNAL_CORE),false)
fpga_files = $(_fpga_files) $(_soc_files) $(core_files)
synth_files = $(core_files) $(soc_files) $(fpga_files) $(clkgen) $(toplevel) $(dmi_dtm)
soc_extra_v = external_core_top.v
endif
-GHDL_IMAGE_GENERICS=-gMEMORY_SIZE=$(MEMORY_SIZE) -gRAM_INIT_FILE=$(RAM_INIT_FILE) \
- -gRESET_LOW=$(RESET_LOW) -gCLK_INPUT=$(CLK_INPUT) -gCLK_FREQUENCY=$(CLK_FREQUENCY) \
- -gSIM_MAIN_BRAM=$(SIM_MAIN_BRAM) -gSIM_BRAM_CHAINBOOT=$(SIM_BRAM_CHAINBOOT) \
+GHDL_IMAGE_GENERICS=-gMEMORY_SIZE=$(MEMORY_SIZE) \
+ -gRAM_INIT_FILE=$(RAM_INIT_FILE) \
+ -gRESET_LOW=$(RESET_LOW) \
+ -gRESET_ADDRESS=$(RESET_ADDRESS) \
+ -gCLK_INPUT=$(CLK_INPUT) \
+ -gCLK_FREQUENCY=$(CLK_FREQUENCY) \
+ -gSIM_MAIN_BRAM=$(SIM_MAIN_BRAM) \
+ -gSIM_BRAM_CHAINBOOT=$(SIM_BRAM_CHAINBOOT) \
-gEXTERNAL_CORE=$(EXTERNAL_CORE)
microwatt.json: $(synth_files) $(RAM_INIT_FILE)
library ieee;
use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
library work;
use work.wishbone_types.all;
EXTERNAL_CORE : boolean := false;
SIM_MAIN_BRAM : boolean := false;
SIM_BRAM_CHAINBOOT : positive := 0;
+ RESET_ADDRESS : integer := 0;
CLK_INPUT : positive := 100000000;
CLK_FREQUENCY : positive := 100000000;
HAS_FPU : boolean := true;
LOG_LENGTH => LOG_LENGTH,
DISABLE_FLATTEN_CORE => DISABLE_FLATTEN_CORE,
UART0_IS_16550 => UART_IS_16550,
- HAS_UART1 => HAS_UART1
+ HAS_UART1 => HAS_UART1,
+ RESET_ADDRESS => (std_ulogic_vector(to_unsigned(RESET_ADDRESS, 48)
+ & x"0000"))
)
port map (
system_clk => system_clk,