thnku for your response
Below is the code for convolution ppeline I have used the component approach .I want to give image data as the input and process it .Is there any way ??
----------------------------------------------------------------------------------
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.STD_LOGIC_unsigned.ALL;
use IEEE.STD_LOGIC_arith.ALL;
-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;
-- Uncomment the following library declaration if instantiating
-- any Xilinx primitives in this code.
--library UNISIM;
--use UNISIM.VComponents.all;
entity conv3 is
port( data : in STD_LOGIC_vector(71 downto 0);
clk1,rstn1: in std_logic;
dout : out STD_LOGIC_vector(15 downto 0));
end conv3;
architecture Behavioral of conv3 is
component aaa is
port(l,m,n :in std_logic_vector(7 downto 0);
p,q,r :in std_logic_vector(7 downto 0);
clk,rstn:in std_logic;
dout1
ut std_logic_vector(15 downto 0));
end component;
component adder2 is
Port ( a : in STD_LOGIC_VECTOR(15 downto 0);
b : in STD_LOGIC_VECTOR(15 downto 0);
c : in STD_LOGIC_VECTOR(15 downto 0);
d : out STD_LOGIC_VECTOR(15 downto 0));
end component;
constant k0 : std_logic_vector (7 downto 0):= "00000001";
constant k1 : std_logic_vector (7 downto 0):= "00000010";
constant k2 : std_logic_vector (7 downto 0):= "00000001";
constant k3 : std_logic_vector (7 downto 0):= "00000010";
constant k4 : std_logic_vector (7 downto 0):= "00000100";
constant k5 : std_logic_vector (7 downto 0):= "00000010";
constant k6 : std_logic_vector (7 downto 0):= "00000001";
constant k7 : std_logic_vector (7 downto 0):= "00000010";
constant k8 : std_logic_vector (7 downto 0):= "00000001";
signal a1,a2,a3,a4:std_logic_vector(15 downto 0);
begin
u1:aaa port map(data(71 downto 64),data(63 downto 56),data(55 downto 48),k0,k1,k2,clk1,rstn1,a1);
u2:aaa port map(data(47 downto 40),data(39 downto 32),data(31 downto 24),k3,k4,k5,clk1,rstn1,a2);
u3:aaa port map(data(23 downto 16),data(15 downto 8),data(7 downto 0),k6,k7,k8,clk1,rstn1,a3);
u4:adder2 port map(a1,a2,a3,a4);
dout <= a4;
end Behavioral;
i tried to read text file in test bench by a process. Apart of that code is below
------------------------------------------------------
file img_file : text open read_mode is "stennis1.txt";
variable l : line;
variable temp : natural;
begin
for y in 0 to 127 loop
readline(img_file, l); --gets 1 line at a time
for x in 0 to 127 loop
read(l,temp); --read in each pixel
img_array(x,y) <= temp;
end loop;
end loop;
end process;
-----------------------------------------------
now can u help me out of this plzz???