URL
https://opencores.org/ocsvn/neo430/neo430/trunk
Subversion Repositories neo430
Compare Revisions
- This comparison shows the changes necessary to convert path
/neo430/trunk
- from Rev 185 to Rev 186
- ↔ Reverse comparison
Rev 185 → Rev 186
/neo430/rtl/core/neo430_boot_rom.vhd
79,7 → 79,7
mem_file_access: process(clk_i) |
begin |
-- check max size -- |
if (boot_size_c > 2*1024) then |
if (boot_size_c > boot_max_size_c) then |
assert false report "Boot ROM size out of range! Max 2kB!" severity error; |
end if; |
if rising_edge(clk_i) then |
/neo430/rtl/core/neo430_dmem.vhd
19,7 → 19,7
-- # You should have received a copy of the GNU Lesser General Public License along with this # |
-- # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
-- # ********************************************************************************************* # |
-- # Stephan Nolting, Hannover, Germany 29.04.2019 # |
-- # Stephan Nolting, Hannover, Germany 15.02.2020 # |
-- ################################################################################################# |
|
library ieee; |
79,7 → 79,7
dmem_file_access: process(clk_i) |
begin |
-- check max size -- |
if (DMEM_SIZE > 12*1024) then |
if (DMEM_SIZE > dmem_max_size_c) then |
assert false report "D-mem size out of range! Max 12kB!" severity error; |
end if; |
if rising_edge(clk_i) then |
/neo430/rtl/core/neo430_imem.vhd
24,7 → 24,7
-- # You should have received a copy of the GNU Lesser General Public License along with this # |
-- # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
-- # ********************************************************************************************* # |
-- # Stephan Nolting, Hannover, Germany 29.04.2019 # |
-- # Stephan Nolting, Hannover, Germany 15.02.2020 # |
-- ################################################################################################# |
|
library ieee; |
116,7 → 116,7
imem_file_access: process(clk_i) |
begin |
-- check max size -- |
if (IMEM_SIZE > 48*1024) then |
if (IMEM_SIZE > imem_max_size_c) then |
assert false report "I-mem size out of range! Max 48kB!" severity error; |
end if; |
-- actual memory access -- |
/neo430/rtl/core/neo430_package.vhd
19,7 → 19,7
-- # You should have received a copy of the GNU Lesser General Public License along with this # |
-- # source; if not, download it from https://www.gnu.org/licenses/lgpl-3.0.en.html # |
-- # ********************************************************************************************* # |
-- # Stephan Nolting, Hannover, Germany 12.02.2020 # |
-- # Stephan Nolting, Hannover, Germany 15.02.2020 # |
-- ################################################################################################# |
|
library ieee; |
60,14 → 60,17
-- ------------------------------------------------------------------------------------------- |
|
-- Main Memory: IMEM(ROM/RAM) -- |
constant imem_base_c : std_ulogic_vector(15 downto 0) := x"0000"; -- base address, fixed! |
constant imem_base_c : std_ulogic_vector(15 downto 0) := x"0000"; -- base address, fixed! |
constant imem_max_size_c : natural := 48*1024; -- bytes, fixed! |
|
-- Main Memory: DMEM(RAM) -- |
constant dmem_base_c : std_ulogic_vector(15 downto 0) := x"C000"; -- base address, fixed! |
constant dmem_base_c : std_ulogic_vector(15 downto 0) := x"C000"; -- base address, fixed! |
constant dmem_max_size_c : natural := 12*1024; -- bytes, fixed! |
|
-- Boot ROM -- |
constant boot_base_c : std_ulogic_vector(15 downto 0) := x"F000"; -- bootloader base address, fixed! |
constant boot_size_c : natural := 2048; -- bytes, max 2048 bytes! |
constant boot_base_c : std_ulogic_vector(15 downto 0) := x"F000"; -- bootloader base address, fixed! |
constant boot_size_c : natural := 2048; -- bytes, max 2048 bytes! |
constant boot_max_size_c : natural := 2048; -- bytes, fixed! |
|
-- IO: Peripheral Devices ("IO") Area -- |
-- Each device must use 2 bytes or a multiple of 2 bytes as address space! |
/neo430/rtl/fpga_specific/lattice_ice40up/neo430_dmem.ice40up_spram.vhd
87,27 → 87,6
|
-- Memory Access ------------------------------------------------------------ |
-- ----------------------------------------------------------------------------- |
--dmem_file_access: process(clk_i) |
--begin |
-- -- check max size -- |
-- if (DMEM_SIZE > 12*1024) then |
-- assert false report "D-mem size out of range! Max 12kB!" severity error; |
-- end if; |
-- if rising_edge(clk_i) then |
-- rden <= rden_i and acc_en; |
-- if (acc_en = '1') then -- reduce switching activity when not accessed |
-- if (wren_i(0) = '1') then -- write low byte |
-- dmem_file_l(addr) <= data_i(07 downto 0); |
-- end if; |
-- rdata(07 downto 0) <= dmem_file_l(addr); |
-- if (wren_i(1) = '1') then -- write high byte |
-- dmem_file_h(addr) <= data_i(15 downto 8); |
-- end if; |
-- rdata(15 downto 8) <= dmem_file_h(addr); |
-- end if; |
-- end if; |
--end process dmem_file_access; |
|
dmem_spram_inst : SP256K |
port map ( |
AD => spram_addr, -- I |
/neo430/rtl/fpga_specific/lattice_ice40up/neo430_imem.ice40up_spram.vhd
124,44 → 124,6
|
-- Memory Access ------------------------------------------------------------ |
-- ----------------------------------------------------------------------------- |
--imem_file_access: process(clk_i) |
--begin |
-- -- check max size -- |
-- if (IMEM_SIZE > 48*1024) then |
-- assert false report "I-mem size out of range! Max 48kB!" severity error; |
-- end if; |
-- -- actual memory access -- |
-- if rising_edge(clk_i) then |
-- rden <= rden_i and acc_en; |
-- if (acc_en = '1') then -- reduce switching activity when not accessed |
-- if (IMEM_AS_ROM = true) then -- implement IMEM as true ROM |
-- rdata(07 downto 0) <= imem_file_rom_l(addr); |
-- rdata(15 downto 8) <= imem_file_rom_h(addr); |
-- |
-- elsif (BOOTLD_USE = true) then -- implement IMEM as non-initialized RAM |
-- if (wren_i(0) = '1') and (upen_i = '1') then |
-- imem_file_ram_l(addr) <= data_i(07 downto 0); |
-- end if; |
-- rdata(07 downto 0) <= imem_file_ram_l(addr); |
-- if (wren_i(1) = '1') and (upen_i = '1') then |
-- imem_file_ram_h(addr) <= data_i(15 downto 8); |
-- end if; |
-- rdata(15 downto 8) <= imem_file_ram_h(addr); |
-- |
-- else -- implement IMEM as PRE-INITIALIZED RAM |
-- if (wren_i(0) = '1') and (upen_i = '1') then |
-- imem_file_init_ram_l(addr) <= data_i(07 downto 0); |
-- end if; |
-- rdata(07 downto 0) <= imem_file_init_ram_l(addr); |
-- if (wren_i(1) = '1') and (upen_i = '1') then |
-- imem_file_init_ram_h(addr) <= data_i(15 downto 8); |
-- end if; |
-- rdata(15 downto 8) <= imem_file_init_ram_h(addr); |
-- end if; |
-- end if; |
-- end if; |
--end process imem_file_access; |
|
imem_spram_lo_inst : SP256K |
port map ( |
AD => spram_addr, -- I |
/neo430/sim/ghdl/ghdl_run.sh
1,3 → 1,5
#!/bin/bash |
|
# Project home foler |
homedir=../.. |
|
46,5 → 48,4
|
# Run simulation |
ghdl -e --work=neo430 neo430_tb |
ghdl -r --work=neo430 neo430_tb --stop-time=20ms |
cat $homedir//neo430.uart_tx.txt |
ghdl -r --work=neo430 neo430_tb --stop-time=20ms --ieee-asserts=disable-at-0 --assert-level=error |
/neo430/travis_ci/hw_check.sh
1,3 → 1,8
#!/bin/bash |
|
# Abort if any command returns != 0 |
set -e |
|
# Project home foler |
homedir=/mnt/data |
|
4,7 → 9,7
# The directories of the hw source files |
srcdir_core=$homedir/rtl/core |
srcdir_top_templates=$homedir/rtl/top_templates |
srcdir_sim=$homedir//sim |
srcdir_sim=$homedir/sim |
|
# List files |
ls -al $srcdir_core |
44,7 → 49,15
# Elaborate top entity |
ghdl -e --work=neo430 neo430_top |
|
# Run simulation |
# Prepare UART tx output log file and run simulation |
touch neo430.uart_tx.txt |
chmod 777 neo430.uart_tx.txt |
ghdl -e --work=neo430 neo430_tb |
ghdl -r --work=neo430 neo430_tb --stop-time=20ms |
cat $homedir//neo430.uart_tx.txt |
ghdl -r --work=neo430 neo430_tb --stop-time=20ms --ieee-asserts=disable-at-0 --assert-level=error |
|
# Check output |
uart_res_reference="Blinking LED demo program" |
echo "Checking UART output. Should be" $uart_res_reference |
echo "UART output is:" |
cat neo430.uart_tx.txt |
grep -q "$uart_res_reference" neo430.uart_tx.txt |
/neo430/travis_ci/sw_check.sh
1,3 → 1,8
#!/bin/bash |
|
# Abort if any command returns != 0 |
set -e |
|
# The directories of the sw source files |
srcdir_examples=/mnt/data/sw/example |
srcdir_bootloader=/mnt/data/sw/bootloader |