component filter_1_1 is
generic
(data_length :integer := 8;
address_length:integer:=7 ;
comp_num:integer:=4;
total_number:integer:=2);
port ( clk:in std_logic;
--vin:in std_logic;
rst:in std_logic;
----------------------------------------------------------------------------
mem_data:in std_logic_vector(data_length-1 downto 0);
set: in std_logic;
mem_address: in std_logic_vector(address_length downto 0);
wea: in std_logic;
finished:in std_logic; --when L it stills sends data to filter, when H data send.
----------------------------------------------------------------------------
dout: out std_logic_vector(3*data_length-1 downto 0);
done: out std_logic
);
end component;
component rom1 IS
GENERIC
(
ADDRESS_WIDTH : integer := 7;
DATA_WIDTH : integer := 8
);
PORT
(
clock : IN std_logic;
data : IN std_logic_vector(31 DOWNTO 0);
write_address : IN std_logic_vector(7 DOWNTO 0);
we : IN std_logic;
q : OUT std_logic_vector(31 DOWNTO 0)
);
end component;
signal input_data: std_logic_vector(31 downto 0);
----------------------------------------------
begin
reading_from_file: rom1 generic map(ADDRESS_WIDTH=>total_number, DATA_WIDTH=>3*data_length) port map(clk,input_data,address,wea_controller,temp_data);
passing_to_filter: landmark_1
generic map(
data_length=>data_length,
address_length=>address_length,
comp_num=>comp_num,
total_number=>total_number
) port map (
clk=>clk,
--vin=>vin,
rst=>rst,
mem_data=>mem_data,
set=>set,
mem_address=>mem_address,
wea=>wea,
finished=>finished,
temp=>temp,
--------------------------------------
dout=>dout,
temp_in_1=>temp_in_1,
temp_in_2=>temp_in_2,
temp2_sum=>temp2_sum
---------------------------------------
);
dout_temp<=mem_data;
core_address<=mem_address;
dout_res<=temp;