OpenCores
URL https://opencores.org/ocsvn/xilinx_virtex_fp_library/xilinx_virtex_fp_library/trunk

Subversion Repositories xilinx_virtex_fp_library

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 12 to Rev 13
    Reverse comparison

Rev 12 → Rev 13

/xilinx_virtex_fp_library/trunk/DualPathFPAdder/ClosePath.v
36,6 → 36,7
 
wire [size_counter - 1 : 0] lzs;
wire [size_exponent- 1 : 0] unadjusted_exponent;
wire [1 : 0] adjust_exponent;
wire [2 : 0] dummy_bits;
wire init_shft_bit, shft_bit;
45,7 → 46,7
wire [size_in_mantissa : 0] rounded_mantissa;
wire [size_in_mantissa-1: 0] r_mantissa;
assign {shifted_m_b, init_shft_bit} = (exp_difference)? {1'b0, m_b_number[size_in_mantissa-1:1], m_b_number[0]} : {m_b_number, 1'b0};
assign {shifted_m_b, init_shft_bit} = (exp_difference)? {1'b0, m_b_number[size_in_mantissa-1:0]} : {m_b_number, 1'b0};
//compute unnormalized_mantissa
assign adder_mantissa = {1'b0, m_a_number} - {1'b0, shifted_m_b};
72,12 → 73,14
.shft(lzs),
.shifted_a({r_mantissa, dummy_bits}));
assign rounded_mantissa = (adder_mantissa[size_in_mantissa + 1])? r_mantissa + 1'b1 : r_mantissa;
assign rounded_mantissa = (adder_mantissa[size_in_mantissa + 1])? {1'b0, r_mantissa} + 1'b1 : {1'b0, r_mantissa};
assign resulted_m_o = (rounded_mantissa[size_in_mantissa])? rounded_mantissa[size_in_mantissa : 1] :
rounded_mantissa[size_in_mantissa-1:0];
assign adjust_exponent = rounded_mantissa[size_in_mantissa]? 2'd2 : 2'd1;
assign ovf = adder_mantissa[size_in_mantissa+1];
assign unadjusted_exponent = exp_inter - lzs;
assign resulted_e_o = unadjusted_exponent + 1'b1;
assign resulted_e_o = unadjusted_exponent + adjust_exponent;
endmodule
/xilinx_virtex_fp_library/trunk/DualPathFPAdder/DualPathFPAdder.v
63,6 → 63,7
wire [size_exception_field - 1 : 0] resulted_exception_field;
wire resulted_sign;
wire swap;
wire zero_flag;
84,9 → 85,9
assign exp_inter = (b_greater_exponent[size_exponent])? {1'b0, e_a_number} : {1'b0, e_b_number};
//set shifter always on m_b_number
assign {m_a_number, m_b_number} = (b_greater_exponent[size_exponent])?
{{1'b1, a_number_i[size_mantissa - 2 :0]}, {1'b1, b_number_i[size_mantissa - 2 :0]}} :
{{1'b1, b_number_i[size_mantissa - 2 :0]}, {1'b1, a_number_i[size_mantissa - 2 :0]}};
assign {swap, m_a_number, m_b_number} = (b_greater_exponent[size_exponent])?
{1'b0, {1'b1, a_number_i[size_mantissa - 2 :0]}, {1'b1, b_number_i[size_mantissa - 2 :0]}} :
{1'b1, {1'b1, b_number_i[size_mantissa - 2 :0]}, {1'b1, a_number_i[size_mantissa - 2 :0]}};
 
effective_op effective_op_instance( .a_sign(s_a_number), .b_sign(s_b_number), .sub(sub), .eff_op(eff_op));
136,8 → 137,8
//set zero_flag in case of equal numbers
assign zero_flag = (exp_difference > 1 | !eff_op)? ~(|fp_resulted_m_o) : ~(|cp_resulted_m_o);
assign resulted_sign = (exp_difference > 1 | !eff_op)? (!a_greater_exponent[size_exponent]? s_a_number : s_b_number) : ~ovf;
assign resulted_sign = (exp_difference > 1 | !eff_op)? (!a_greater_exponent[size_exponent]? s_a_number : (eff_op? ~s_b_number : s_b_number)) : (ovf ^ swap);
assign resulted_number_o = (zero_flag)? {size{1'b0}} :
(exp_difference > 1 | !eff_op)? {resulted_exception_field, resulted_sign, fp_resulted_e_o, fp_resulted_m_o[size_mantissa-2 : 0]}:
{resulted_exception_field, resulted_sign, cp_resulted_e_o, cp_resulted_m_o[size_mantissa-2 : 0]};

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.