Skip to content
Snippets Groups Projects
Commit 018d6cd7 authored by Daniel van der Schuur's avatar Daniel van der Schuur
Browse files

-Fixed entity names.

parent ce5ac3c2
No related branches found
No related tags found
No related merge requests found
...@@ -97,8 +97,8 @@ BEGIN ...@@ -97,8 +97,8 @@ BEGIN
GENERIC MAP ( GENERIC MAP (
g_nof_inputs => g_nof_mults, g_nof_inputs => g_nof_mults,
g_accumulator_depth => 10, g_accumulator_depth => 10,
g_data_w => 32 g_data_w => 64
) )
PORT MAP ( PORT MAP (
clk => clk, clk => clk,
rst => rst, rst => rst,
......
...@@ -26,14 +26,14 @@ USE common_lib.common_pkg.ALL; ...@@ -26,14 +26,14 @@ USE common_lib.common_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL; USE dp_lib.dp_stream_pkg.ALL;
USE common_lib.tb_common_pkg.ALL; USE common_lib.tb_common_pkg.ALL;
ENTITY tb_corr_multiplier IS ENTITY tb_corr_accumulator IS
GENERIC ( GENERIC (
g_nof_inputs : NATURAL := 4; g_nof_inputs : NATURAL := 4;
g_multiplier_factor : NATURAL := 2 g_multiplier_factor : NATURAL := 2
); );
END tb_corr_multiplier; END tb_corr_accumulator;
ARCHITECTURE tb OF tb_corr_multiplier IS ARCHITECTURE tb OF tb_corr_accumulator IS
CONSTANT c_clk_period : TIME := 10 ns; CONSTANT c_clk_period : TIME := 10 ns;
CONSTANT c_data_w : NATURAL := 32; CONSTANT c_data_w : NATURAL := 32;
......
...@@ -26,24 +26,51 @@ USE common_lib.common_pkg.ALL; ...@@ -26,24 +26,51 @@ USE common_lib.common_pkg.ALL;
USE dp_lib.dp_stream_pkg.ALL; USE dp_lib.dp_stream_pkg.ALL;
USE common_lib.tb_common_pkg.ALL; USE common_lib.tb_common_pkg.ALL;
ENTITY tb_corr_multiplier IS ENTITY tb_correlator IS
GENERIC ( END tb_correlator;
g_nof_inputs : NATURAL := 4
); ARCHITECTURE tb OF tb_correlator IS
END tb_corr_multiplier;
ARCHITECTURE tb OF tb_corr_multiplier IS CONSTANT c_nof_inputs : NATURAL := 4;
CONSTANT c_nof_mults : NATURAL := (c_nof_inputs*(c_nof_inputs+1))/2;
CONSTANT c_clk_period : TIME := 10 ns; CONSTANT c_clk_period : TIME := 10 ns;
CONSTANT c_data_w : NATURAL := 32; CONSTANT c_data_w : NATURAL := 32;
SIGNAL tb_end : STD_LOGIC := '0'; SIGNAL tb_end : STD_LOGIC := '0';
SIGNAL clk : STD_LOGIC := '1'; SIGNAL clk : STD_LOGIC := '1';
SIGNAL rst : STD_LOGIC; SIGNAL rst : STD_LOGIC;
SIGNAL correlator_snk_in_arr : t_dp_sosi_arr(c_nof_inputs-1 DOWNTO 0);
SIGNAL correlator_src_out : t_dp_sosi;
BEGIN BEGIN
-----------------------------------------------------------------------------
-- Clocks and reset
-----------------------------------------------------------------------------
clk <= NOT clk OR tb_end AFTER c_clk_period/2; clk <= NOT clk OR tb_end AFTER c_clk_period/2;
rst <= '1', '0' AFTER c_clk_period*7; rst <= '1', '0' AFTER c_clk_period*7;
-----------------------------------------------------------------------------
-- Test data
-----------------------------------------------------------------------------
-----------------------------------------------------------------------------
-- Device under test: correlator
-----------------------------------------------------------------------------
u_correlator : ENTITY work.correlator
GENERIC MAP (
g_nof_inputs => c_nof_inputs,
g_nof_mults => c_nof_mults
)
PORT MAP (
clk => clk,
rst => rst,
snk_in_arr => correlator_snk_in_arr,
src_out => correlator_src_out
);
END tb; END tb;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment