rtps-fpga/syn/test_top.vhd

95 lines
2.9 KiB
VHDL

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
use work.rtps_package.all;
entity test_top is
port (
-- SYSTEM
clk : in std_logic;
reset : in std_logic;
-- AVALON MM INTERFACE
address : in std_logic_vector(1 downto 0);
read : in std_logic;
write : in std_logic;
readdata : out std_logic_vector(WORD_WIDTH-1 downto 0);
writedata : in std_logic_vector(WORD_WIDTH-1 downto 0);
waitrequest : out std_logic
);
end entity;
architecture arch of test_top is
signal full_fi_wr, write_wr_fi, empty_fo_wr, read_wr_fo, empty_fi_test, read_test_fi, full_fo_test, write_test_fo : std_logic;
signal data_wr_fi, data_fo_wr, data_fi_test, data_test_fo : std_logic_vector(WORD_WIDTH-1 downto 0);
begin
Avalon_MM_wrapper_inst : entity work.Avalon_MM_wrapper(arch)
port map (
clk => clk,
reset => reset,
address => address,
read => read,
write => write,
readdata => readdata,
writedata => writedata,
waitrequest => waitrequest,
full_ri => full_fi_wr,
write_ri => write_wr_fi,
data_ri => data_wr_fi,
empty_ro => empty_fo_wr,
read_ro => read_wr_fo,
data_ro => data_fo_wr
);
FIFO_IN_inst : configuration work.FWFT_FIFO_cfg
generic map (
FIFO_DEPTH => 16384,
DATA_WIDTH => 32
)
port map (
clk => clk,
reset => reset,
data_in => data_wr_fi,
write => write_wr_fi,
read => read_test_fi,
data_out => data_fi_test,
empty => empty_fi_test,
full => full_fi_wr,
free => open
);
FIFO_OUT_inst : configuration work.FWFT_FIFO_cfg
generic map (
FIFO_DEPTH => 16384,
DATA_WIDTH => 32
)
port map (
clk => clk,
reset => reset,
data_in => data_test_fo,
write => write_test_fo,
read => read_wr_fo,
data_out => data_fo_wr,
empty => empty_fo_wr,
full => full_fo_test,
free => open
);
test_fpga_inst : entity work.test_fpga(arch)
port map (
clk => clk,
reset => reset,
empty => empty_fi_test,
read => read_test_fi,
data_in => data_fi_test,
full => full_fo_test,
write => write_test_fo,
data_out => data_test_fo
);
end architecture;