Matrice dei prodotti parziali per moltiplicatori

Sezione dedicata al linguaggio di descrizione hardware per logiche programmabili

Matrice dei prodotti parziali per moltiplicatori

Postby dlbp » 02 Dec 2013, 19:05

Salve. Sono uno studente di ingegneria informatica e sto studiando i moltiplicatori.
Si parla di matrice dei prodotti parziali.
Ho provato ad implementarla ma non ne esco fuori.
Posto il codice.
Code: Select all
entity somma_righe is
generic (width : integer := 4);
    Port ( x : in  STD_LOGIC_VECTOR (width-1 downto 0);
           y : in  STD_LOGIC_VECTOR (width-1 downto 0);
           prodotto : in  STD_LOGIC_VECTOR (width+width-1 downto 0));
end somma_righe;

architecture Behavioral of somma_righe is

type riga is array (width-1 downto 0) of STD_LOGIC;
type matrice is array (0 to width-1) of riga;

signal temp_riga : riga;
signal matrix : matrice;

begin

process (temp_riga)
begin
for i in 0 to width-1 loop
   for j in 0 to width-1 loop
      temp_riga(j) <= x(j) and y(i);
      end loop;
   matrix(i) <= temp_riga;
   end loop;
end process;


end Behavioral;


Probabilmente sbaglio qualcosa. Potete aiutarmi?
Grazie
dlbp
 
Posts: 1
Joined: 02 Dec 2013, 18:46

Return to VHDL x FPGA

Who is online

Users browsing this forum: No registered users and 3 guests

cron