---------------------------------------------------------------------------- -- Mastrovito Multiplier AOP(mastrovito_multiplier_AOP.vhd) -- -- Computes the polynomial multiplication mod f in GF(2**m) -- The hardware is genenerate for a specific f. -- where F is an All-One Polynomials (AOP) -- -- ---------------------------------------------------------------------------- library ieee; use ieee.std_logic_1164.all; use ieee.std_logic_arith.all; use ieee.std_logic_unsigned.all; entity mastrovito_AOP_multiplication is generic(M : natural := 8); port ( a, b: in std_logic_vector(M-1 downto 0); c: out std_logic_vector(M-1 downto 0) ); end mastrovito_AOP_multiplication; architecture simple of mastrovito_AOP_multiplication is signal d: std_logic_vector(M-1 downto 0); signal e: std_logic; begin d1: for k in 0 to m-1 generate d2: process(d, a, b) variable aux: std_logic; begin aux := '0'; for i in 0 to k loop aux := aux xor (a(k-i) and b(i)); end loop; for i in k+2 to m-1 loop aux := aux xor (a(m-1-(i-k-2)) and b(i)); end loop; d(k) <= aux; end process; end generate; e1: process(a, b) variable aux: std_logic; begin aux := (a(m-1) and b(1)); for i in 2 to m-1 loop aux := aux xor (a(m-1-(i-1)) and b(i)); end loop; e <= aux; end process; c1: for i in 0 to m-1 generate c(i) <= e xor d(i); end generate; end simple;