mirror of
https://github.com/antonblanchard/microwatt.git
synced 2026-01-11 23:43:15 +00:00
This changes the SoC interconnect such that the main 64-bit wishbone out of the processor is first split between only 3 slaves (BRAM, DRAM and a general "IO" bus) instead of all the slaves in the SoC. The IO bus leg is then latched and down-converted to 32 bits data width, before going through a second address decoder for the various IO devices. This significantly reduces routing and timing pressure on the main bus, allowing to get rid of frequent timing violations when synthetizing on small'ish FPGAs such as the Artix-7 35T found on the original Arty board. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
72 lines
1.5 KiB
VHDL
72 lines
1.5 KiB
VHDL
library ieee;
|
|
use ieee.std_logic_1164.all;
|
|
use ieee.numeric_std.all;
|
|
|
|
library work;
|
|
use work.common.all;
|
|
use work.wishbone_types.all;
|
|
|
|
entity core_tb is
|
|
end core_tb;
|
|
|
|
architecture behave of core_tb is
|
|
signal clk, rst: std_logic;
|
|
|
|
-- testbench signals
|
|
constant clk_period : time := 10 ns;
|
|
|
|
-- Dummy DRAM
|
|
signal wb_dram_in : wishbone_master_out;
|
|
signal wb_dram_out : wishbone_slave_out;
|
|
signal wb_dram_ctrl_in : wb_io_master_out;
|
|
signal wb_dram_ctrl_out : wb_io_slave_out;
|
|
begin
|
|
|
|
soc0: entity work.soc
|
|
generic map(
|
|
SIM => true,
|
|
MEMORY_SIZE => (384*1024),
|
|
RAM_INIT_FILE => "main_ram.bin",
|
|
RESET_LOW => false,
|
|
CLK_FREQ => 100000000
|
|
)
|
|
port map(
|
|
rst => rst,
|
|
system_clk => clk,
|
|
uart0_rxd => '0',
|
|
uart0_txd => open,
|
|
wb_dram_in => wb_dram_in,
|
|
wb_dram_out => wb_dram_out,
|
|
wb_dram_ctrl_in => wb_dram_ctrl_in,
|
|
wb_dram_ctrl_out => wb_dram_ctrl_out,
|
|
alt_reset => '0'
|
|
);
|
|
|
|
clk_process: process
|
|
begin
|
|
clk <= '0';
|
|
wait for clk_period/2;
|
|
clk <= '1';
|
|
wait for clk_period/2;
|
|
end process;
|
|
|
|
rst_process: process
|
|
begin
|
|
rst <= '1';
|
|
wait for 10*clk_period;
|
|
rst <= '0';
|
|
wait;
|
|
end process;
|
|
|
|
jtag: entity work.sim_jtag;
|
|
|
|
-- Dummy DRAM
|
|
wb_dram_out.ack <= wb_dram_in.cyc and wb_dram_in.stb;
|
|
wb_dram_out.dat <= x"FFFFFFFFFFFFFFFF";
|
|
wb_dram_out.stall <= '0';
|
|
wb_dram_ctrl_out.ack <= wb_dram_ctrl_in.cyc and wb_dram_ctrl_in.stb;
|
|
wb_dram_ctrl_out.dat <= x"FFFFFFFF";
|
|
wb_dram_ctrl_out.stall <= '0';
|
|
|
|
end;
|