I am trying to get partial sums of 18*18 multiplication. I want to save these in a multidimensional array(18*36) where each index of array contains a partial sum. i tried using an array of std_logic_vector. But I got no results. I even tried array of bit_vector and also also of bits. Here is my VHDL code.
entity partial is
port(
A : in bit_vector(17 downto 0);
B : in bit_vector(17 downto 0);
C : out bit_vector(35 downto 0);
D : out bit
);
end partial;
architecture Behavioral of partial is
type partial_sums is array (17 downto 0, 35 downto 0) of bit;
signal sums : partial_sums;
begin
process (A,B)
begin
--sums <= (others=> (others=>'0'));
--for j in 0 to 17 loop
-- sums(j)<="000000000000000000000000000000000000";
--end loop;
for i in B'low to B'high loop
if ( B(i)='1') then
for p in A'low to A'high loop
sums(i,p) <= A(p);
end loop;
end if;
end loop;
D <= sums(0,0);
end process;
end Behavioral;
I am always getting 0 in D no matter what indices use in sums array. Please help me.