mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-23 21:57:33 -04:00
minor edits
This commit is contained in:
parent
8bb4757769
commit
cd848850d8
1 changed files with 8 additions and 4 deletions
|
@ -41,6 +41,10 @@ use neorv32.neorv32_package.all;
|
|||
use neorv32.neorv32_bootloader_image.all; -- this file is generated by the image generator
|
||||
|
||||
entity neorv32_boot_rom is
|
||||
generic (
|
||||
BOOTROM_BASE : std_ulogic_vector(31 downto 0) := x"FFFF0000"; -- boot ROM base address
|
||||
BOOTROM_SIZE : natural := 4*1024 -- processor-internal boot ROM memory size in bytes
|
||||
);
|
||||
port (
|
||||
clk_i : in std_ulogic; -- global clock line
|
||||
rden_i : in std_ulogic; -- read enable
|
||||
|
@ -53,7 +57,7 @@ end neorv32_boot_rom;
|
|||
architecture neorv32_boot_rom_rtl of neorv32_boot_rom is
|
||||
|
||||
-- local types --
|
||||
type boot_img_t is array (0 to boot_size_c/4-1) of std_ulogic_vector(31 downto 0);
|
||||
type boot_img_t is array (0 to BOOTROM_SIZE/4-1) of std_ulogic_vector(31 downto 0);
|
||||
|
||||
-- init function --
|
||||
-- impure function: returns NOT the same result every time it is evaluated with the same arguments since the source file might have changed
|
||||
|
@ -71,7 +75,7 @@ architecture neorv32_boot_rom_rtl of neorv32_boot_rom is
|
|||
signal acc_en : std_ulogic;
|
||||
signal rden : std_ulogic;
|
||||
signal rdata : std_ulogic_vector(31 downto 0);
|
||||
signal addr : std_ulogic_vector(index_size_f(boot_size_c/4)-1 downto 0);
|
||||
signal addr : std_ulogic_vector(index_size_f(BOOTROM_SIZE/4)-1 downto 0);
|
||||
|
||||
-- bootloader image --
|
||||
constant boot_img : boot_img_t := init_boot_rom(bootloader_init_image);
|
||||
|
@ -80,8 +84,8 @@ begin
|
|||
|
||||
-- Access Control -------------------------------------------------------------------------
|
||||
-- -------------------------------------------------------------------------------------------
|
||||
acc_en <= '1' when (addr_i >= boot_base_c) and (addr_i < std_ulogic_vector(unsigned(boot_base_c) + boot_size_c)) else '0';
|
||||
addr <= addr_i(index_size_f(boot_size_c/4)+1 downto 2); -- word aligned
|
||||
acc_en <= '1' when (addr_i >= BOOTROM_BASE) and (addr_i < std_ulogic_vector(unsigned(BOOTROM_BASE) + BOOTROM_SIZE)) else '0';
|
||||
addr <= addr_i(index_size_f(BOOTROM_SIZE/4)+1 downto 2); -- word aligned
|
||||
|
||||
|
||||
-- Memory Access --------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue