FEATURE: Add SWAP generic to filter and correct TB accordingly
This commit is contained in:
@ -11,11 +11,11 @@ library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
use ieee.numeric_std.all;
|
||||
|
||||
library psi_lib;
|
||||
use psi_lib.psi_common_math_pkg.all;
|
||||
use work.psi_common_math_pkg.all;
|
||||
|
||||
entity evr320_data_filter is
|
||||
generic (NUM_BYTES : integer := 8);
|
||||
generic (NUM_BYTES : integer := 8;
|
||||
SWAP : boolean := false ); -- if true byte are swpped at output
|
||||
port ( -- User stream interface
|
||||
i_stream_clk : in std_logic; -- user clock
|
||||
i_stream_data : in std_logic_vector(7 downto 0);
|
||||
@ -75,7 +75,11 @@ begin
|
||||
o_valid <= '1';
|
||||
--*** spatial loop map output ***
|
||||
for i in 0 to NUM_BYTES-1 loop
|
||||
o_data(NUM_BYTES+i*NUM_BYTES-1 downto 0+i*NUM_BYTES) <= table_s(NUM_BYTES-1-i);
|
||||
if SWAP then
|
||||
o_data(NUM_BYTES+i*NUM_BYTES-1 downto 0+i*NUM_BYTES) <= table_s(NUM_BYTES-1-i);
|
||||
else
|
||||
o_data(NUM_BYTES+i*NUM_BYTES-1 downto 0+i*NUM_BYTES) <= table_s(i);
|
||||
end if;
|
||||
end loop;
|
||||
else
|
||||
o_valid <= '0';
|
||||
|
@ -174,7 +174,7 @@ begin
|
||||
|
||||
evr320_data_filter_inst: entity work.evr320_data_filter
|
||||
generic map (
|
||||
ADDRESS => FILTER_ADDRESS,
|
||||
SWAP => false
|
||||
NUM_BYTES => 8
|
||||
)
|
||||
port map (
|
||||
@ -182,6 +182,7 @@ begin
|
||||
i_stream_data => dec_stream_data,
|
||||
i_stream_addr => dec_stream_addr,
|
||||
i_stream_valid => dec_stream_valid,
|
||||
i_address => FILTER_ADDRESS,
|
||||
o_data => filter_data,
|
||||
o_valid => filter_valid
|
||||
);
|
||||
|
Reference in New Issue
Block a user