Page 349 - Hardware Implementation of Finite-Field Arithmetic
P. 349
Optimal Extension Fields 329
end if;
end if;
end process;
iteration: for index in 0 to 5 generate
registers_e: process(clk)
begin
if clk’event and clk = ‘1’ then
if ce_e = ‘1’ and j = index then
e(index) <= product_p;
end if;
end if;
end process;
end generate;
register_inv: process(clk)
begin
if clk’event and clk = ‘1’ then
if ce_inv = ‘1’ then inv <= next_inv;
end if;
end if;
end process;
counter: process(clk)
begin
if clk’event and clk = ‘1’ then
if load = ‘1’ then j <= “101”;
elsif update = ‘1’ then
if j = 0 then j <= “101”; else j <= j-1;
end if;
end if;
end if;
end process;
z <= product_f;
The complete model additionally includes a control unit.
The package storing the parameter values follows:
package mod_f_divider_parameters is
constant k: natural := 32;
constant p: std_logic_vector(k-1 downto 0) :=
x”f ffffe7d”;
constant m: natural := 6;
type long_polynomial is array(m downto 0) of
std_logic_vector(k-1 downto 0);
type polynomial is array(m-1 downto 0) of
std_logic_vector(k-1 downto 0);
--logm is the number of bits of m-1
constant logm: natural := 3;
constant f: long_polynomial :=
(x”00000001”, x”00000000”, x”00000000”, x”00000000”,
x”00000000”, x”00000000”, x”fffffe7b”);
constant f1: polynomial :=
(x”632e27fc”, x”632e27fb”, x”fffffe7c”, x”9cd1d681”,
x”9cd1d682”, x”00000001”);