Line 91... |
Line 91... |
signal s_op_0 : std_logic;
|
signal s_op_0 : std_logic;
|
signal s_expo3 : std_logic_vector(8 downto 0);
|
signal s_expo3 : std_logic_vector(8 downto 0);
|
|
|
signal s_infa, s_infb : std_logic;
|
signal s_infa, s_infb : std_logic;
|
signal s_nan_in, s_nan_op, s_nan_a, s_nan_b : std_logic;
|
signal s_nan_in, s_nan_op, s_nan_a, s_nan_b : std_logic;
|
signal s_opa_dn, s_opb_dn : std_logic;
|
|
|
|
begin
|
begin
|
|
|
-- Input Register
|
-- Input Register
|
process(clk_i)
|
process(clk_i)
|
Line 144... |
Line 143... |
process(clk_i)
|
process(clk_i)
|
variable v_shr1, v_shl1 : std_logic_vector(9 downto 0);
|
variable v_shr1, v_shl1 : std_logic_vector(9 downto 0);
|
begin
|
begin
|
if rising_edge(clk_i) then
|
if rising_edge(clk_i) then
|
if s_exp_10a(9)='1' or s_exp_10a="0000000000" then
|
if s_exp_10a(9)='1' or s_exp_10a="0000000000" then
|
v_shr1 := "0000000001" - s_exp_10a;
|
v_shr1 := "0000000001" - s_exp_10a + ("000000000"&s_carry);
|
v_shl1 := (others =>'0');
|
v_shl1 := (others =>'0');
|
s_expo1 <= "000000001";
|
s_expo1 <= "000000001";
|
else
|
else
|
if s_exp_10b(9)='1' or s_exp_10b="0000000000" then
|
if s_exp_10b(9)='1' or s_exp_10b="0000000000" then
|
v_shr1 := (others =>'0');
|
v_shr1 := (others =>'0');
|
Line 251... |
Line 250... |
|
|
s_overflow <= '1' when s_expo3 = "011111111" and (s_infa or s_infb)='0' else '0';
|
s_overflow <= '1' when s_expo3 = "011111111" and (s_infa or s_infb)='0' else '0';
|
|
|
s_ine_o <= '1' when s_op_0='0' and (s_lost or or_reduce(s_frac2a(22 downto 0)) or s_overflow)='1' else '0';
|
s_ine_o <= '1' when s_op_0='0' and (s_lost or or_reduce(s_frac2a(22 downto 0)) or s_overflow)='1' else '0';
|
|
|
process(s_sign_i, s_expo3, s_frac3, s_nan_in, s_nan_op, s_infa, s_infb, s_overflow)
|
process(s_sign_i, s_expo3, s_frac3, s_nan_in, s_nan_op, s_infa, s_infb, s_overflow, s_r_zeros)
|
begin
|
begin
|
if (s_nan_in or s_nan_op)='1' then
|
if (s_nan_in or s_nan_op)='1' then
|
s_output_o <= s_sign_i & QNAN;
|
s_output_o <= s_sign_i & QNAN;
|
elsif (s_infa or s_infb)='1' or s_overflow='1' then
|
elsif (s_infa or s_infb)='1' or s_overflow='1' then
|
s_output_o <= s_sign_i & INF;
|
s_output_o <= s_sign_i & INF;
|
|
elsif s_r_zeros=48 then
|
|
s_output_o <= s_sign_i & ZERO_VECTOR;
|
else
|
else
|
s_output_o <= s_sign_i & s_expo3(7 downto 0) & s_frac3(22 downto 0);
|
s_output_o <= s_sign_i & s_expo3(7 downto 0) & s_frac3(22 downto 0);
|
|
|
end if;
|
end if;
|
end process;
|
end process;
|