module __float64__add( input wire [63:0] x, input wire [63:0] y, output wire [63:0] out ); function automatic priority_sel_1b_2way (input reg [1:0] sel, input reg case0, input reg case1, input reg default_value); begin casez (sel) 2'b?1: begin priority_sel_1b_2way = case0; end 2'b10: begin priority_sel_1b_2way = case1; end 2'b00: begin priority_sel_1b_2way = default_value; end default: begin // Propagate X priority_sel_1b_2way = 1'dx; end endcase end endfunction function automatic [1:0] priority_sel_2b_2way (input reg [1:0] sel, input reg [1:0] case0, input reg [1:0] case1, input reg [1:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_2b_2way = case0; end 2'b10: begin priority_sel_2b_2way = case1; end 2'b00: begin priority_sel_2b_2way = default_value; end default: begin // Propagate X priority_sel_2b_2way = 2'dx; end endcase end endfunction function automatic priority_sel_1b_4way (input reg [3:0] sel, input reg case0, input reg case1, input reg case2, input reg case3, input reg default_value); begin casez (sel) 4'b???1: begin priority_sel_1b_4way = case0; end 4'b??10: begin priority_sel_1b_4way = case1; end 4'b?100: begin priority_sel_1b_4way = case2; end 4'b1000: begin priority_sel_1b_4way = case3; end 4'b0000: begin priority_sel_1b_4way = default_value; end default: begin // Propagate X priority_sel_1b_4way = 1'dx; end endcase end endfunction function automatic [2:0] priority_sel_3b_2way (input reg [1:0] sel, input reg [2:0] case0, input reg [2:0] case1, input reg [2:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_3b_2way = case0; end 2'b10: begin priority_sel_3b_2way = case1; end 2'b00: begin priority_sel_3b_2way = default_value; end default: begin // Propagate X priority_sel_3b_2way = 3'dx; end endcase end endfunction function automatic [3:0] priority_sel_4b_2way (input reg [1:0] sel, input reg [3:0] case0, input reg [3:0] case1, input reg [3:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_4b_2way = case0; end 2'b10: begin priority_sel_4b_2way = case1; end 2'b00: begin priority_sel_4b_2way = default_value; end default: begin // Propagate X priority_sel_4b_2way = 4'dx; end endcase end endfunction function automatic [4:0] priority_sel_5b_2way (input reg [1:0] sel, input reg [4:0] case0, input reg [4:0] case1, input reg [4:0] default_value); begin casez (sel) 2'b?1: begin priority_sel_5b_2way = case0; end 2'b10: begin priority_sel_5b_2way = case1; end 2'b00: begin priority_sel_5b_2way = default_value; end default: begin // Propagate X priority_sel_5b_2way = 5'dx; end endcase end endfunction wire [10:0] y_bexp__1; wire literal_30493; wire [10:0] x_bexp__1; wire [10:0] y_bexpnot; wire [11:0] x_bexp_extended__1; wire [11:0] y_bexpnot_extended; wire [11:0] full_result; wire overflow_detected; wire [51:0] tuple_index_30500; wire [51:0] tuple_index_30501; wire [10:0] x_bexp; wire [10:0] literal_30503; wire [10:0] y_bexp; wire literal_30505; wire [51:0] x_fraction; wire [51:0] y_fraction; wire nc; wire [52:0] fraction_x; wire [52:0] fraction_y; wire [52:0] sign_ext_30514; wire [10:0] narrowed_result; wire [10:0] x_bexpor_mask; wire tuple_index_30518; wire tuple_index_30519; wire [52:0] fraction_x__1; wire [52:0] fraction_y__1; wire [2:0] xddend_x__1_squeezed_const_lsb_bits; wire [10:0] result; wire x_sign; wire y_sign; wire [53:0] wide_x_squeezed; wire [55:0] wide_y_shift_bits; wire [10:0] shift; wire [55:0] shrl_30533; wire [56:0] shll_30535; wire [53:0] xddend_x__1_squeezed; wire [52:0] literal_30545; wire [54:0] add_30546; wire sticky; wire [56:0] concat_30552; wire [56:0] xbs_fraction; wire nor_30565; wire nor_30571; wire and_30596; wire nor_30598; wire carry_bit; wire and_30606; wire nor_30608; wire and_30647; wire nor_30648; wire nor_30650; wire and_30657; wire nor_30658; wire nor_30660; wire nor_30634; wire nor_30635; wire nor_30640; wire nor_30641; wire nor_30630; wire nor_30631; wire nor_30621; wire nor_30622; wire nor_30691; wire nor_30692; wire and_30694; wire nor_30695; wire nor_30702; wire nor_30703; wire and_30705; wire nor_30706; wire and_30682; wire nor_30684; wire and_30687; wire nor_30688; wire and_30679; wire nor_30680; wire nor_30674; wire nor_30676; wire and_30670; wire nor_30671; wire nor_30665; wire nor_30667; wire and_30735; wire and_30736; wire and_30738; wire and_30739; wire and_30747; wire and_30748; wire and_30750; wire and_30751; wire and_30771; wire nor_30773; wire priority_sel_30781; wire and_30783; wire nor_30785; wire priority_sel_30793; wire and_30768; wire [1:0] priority_sel_30769; wire and_30764; wire and_30760; wire [2:0] concat_30816; wire [2:0] concat_30828; wire [2:0] concat_30804; wire [2:0] concat_30801; wire [2:0] concat_30800; wire [2:0] concat_30798; wire [2:0] concat_30797; wire and_30837; wire and_30843; wire and_30834; wire [2:0] fraction_shift__3; wire [3:0] literal_30855; wire and_30864; wire [3:0] priority_sel_30865; wire [3:0] priority_sel_30866; wire [3:0] sel_30978; wire [4:0] concat_30868; wire [5:0] leading_zeroes; wire [57:0] cancel_fraction; wire [55:0] cancel_fraction__1; wire [55:0] carry_fraction__1; wire [55:0] shifted_fraction; wire [2:0] normal_chunk; wire [1:0] half_way_chunk; wire do_round_up; wire [53:0] add_30896; wire rounding_carry; wire [11:0] add_30909; wire [6:0] sub_30910; wire fraction_is_zero; wire [12:0] wide_exponent_associative_element; wire [12:0] wide_exponent_associative_element__1; wire [12:0] wide_exponent; wire [12:0] wide_exponent__1; wire [10:0] MAX_EXPONENT; wire [51:0] literal_30923; wire [11:0] wide_exponent__2; wire eq_30925; wire eq_30926; wire eq_30927; wire eq_30928; wire [2:0] fraction_shift__2; wire is_operand_inf; wire and_reduce_30946; wire has_pos_inf; wire has_neg_inf; wire [56:0] rounded_fraction; wire [2:0] fraction_shift__1; wire [56:0] shrl_30959; wire is_result_nan; wire result_sign; wire [51:0] result_fraction; wire [51:0] sign_ext_30965; wire result_sign__1; wire [51:0] result_fraction__3; wire [51:0] FRACTION_HIGH_BIT; wire result_sign__2; wire [10:0] result_exponent__2; wire [51:0] result_fraction__4; assign y_bexp__1 = y[62:52]; assign literal_30493 = 1'h0; assign x_bexp__1 = x[62:52]; assign y_bexpnot = ~y_bexp__1; assign x_bexp_extended__1 = {literal_30493, x_bexp__1}; assign y_bexpnot_extended = {literal_30493, y_bexpnot}; assign full_result = x_bexp_extended__1 + y_bexpnot_extended; assign overflow_detected = full_result[11]; assign tuple_index_30500 = y[51:0]; assign tuple_index_30501 = x[51:0]; assign x_bexp = overflow_detected ? x_bexp__1 : y_bexp__1; assign literal_30503 = 11'h000; assign y_bexp = overflow_detected ? y_bexp__1 : x_bexp__1; assign literal_30505 = 1'h1; assign x_fraction = overflow_detected ? tuple_index_30501 : tuple_index_30500; assign y_fraction = overflow_detected ? tuple_index_30500 : tuple_index_30501; assign nc = ~overflow_detected; assign fraction_x = {literal_30505, x_fraction}; assign fraction_y = {literal_30505, y_fraction}; assign sign_ext_30514 = {53{y_bexp != literal_30503}}; assign narrowed_result = full_result[10:0]; assign x_bexpor_mask = {11{nc}}; assign tuple_index_30518 = y[63:63]; assign tuple_index_30519 = x[63:63]; assign fraction_x__1 = fraction_x & {53{x_bexp != literal_30503}}; assign fraction_y__1 = fraction_y & sign_ext_30514; assign xddend_x__1_squeezed_const_lsb_bits = 3'h0; assign result = narrowed_result ^ x_bexpor_mask; assign x_sign = overflow_detected ? tuple_index_30519 : tuple_index_30518; assign y_sign = overflow_detected ? tuple_index_30518 : tuple_index_30519; assign wide_x_squeezed = {literal_30493, fraction_x__1}; assign wide_y_shift_bits = {fraction_y__1, xddend_x__1_squeezed_const_lsb_bits}; assign shift = result + {10'h000, overflow_detected}; assign shrl_30533 = shift >= 11'h038 ? 56'h00_0000_0000_0000 : wide_y_shift_bits >> shift; assign shll_30535 = shift >= 11'h039 ? 57'h000_0000_0000_0000 : 57'h1ff_ffff_ffff_ffff << shift; assign xddend_x__1_squeezed = x_sign ^ y_sign ? -wide_x_squeezed : wide_x_squeezed; assign literal_30545 = 53'h00_0000_0000_0000; assign add_30546 = {{1{xddend_x__1_squeezed[53]}}, xddend_x__1_squeezed} + {2'h0, shrl_30533[55:3]}; assign sticky = ~({literal_30493, ~y_fraction} | ~sign_ext_30514 | shll_30535[55:3]) != literal_30545; assign concat_30552 = {add_30546[53:0], shrl_30533[2:1], shrl_30533[0] | sticky}; assign xbs_fraction = add_30546[54] ? -concat_30552 : concat_30552; assign nor_30565 = ~(xbs_fraction[46] | xbs_fraction[45]); assign nor_30571 = ~(xbs_fraction[30] | xbs_fraction[29]); assign and_30596 = ~(xbs_fraction[48] | xbs_fraction[47]) & nor_30565; assign nor_30598 = ~(xbs_fraction[42] | xbs_fraction[41]); assign carry_bit = xbs_fraction[56]; assign and_30606 = ~(xbs_fraction[32] | xbs_fraction[31]) & nor_30571; assign nor_30608 = ~(xbs_fraction[26] | xbs_fraction[25]); assign and_30647 = ~(xbs_fraction[44] | xbs_fraction[43]) & nor_30598; assign nor_30648 = ~(xbs_fraction[44] | xbs_fraction[43] | nor_30598); assign nor_30650 = ~(xbs_fraction[54] | xbs_fraction[53]); assign and_30657 = ~(xbs_fraction[28] | xbs_fraction[27]) & nor_30608; assign nor_30658 = ~(xbs_fraction[28] | xbs_fraction[27] | nor_30608); assign nor_30660 = ~(xbs_fraction[38] | xbs_fraction[37]); assign nor_30634 = ~(xbs_fraction[24] | xbs_fraction[23]); assign nor_30635 = ~(xbs_fraction[22] | xbs_fraction[21]); assign nor_30640 = ~(xbs_fraction[18] | xbs_fraction[17]); assign nor_30641 = ~(xbs_fraction[20] | xbs_fraction[19]); assign nor_30630 = ~(xbs_fraction[14] | xbs_fraction[13]); assign nor_30631 = ~(xbs_fraction[16] | xbs_fraction[15]); assign nor_30621 = ~(xbs_fraction[6] | xbs_fraction[5]); assign nor_30622 = ~(xbs_fraction[8] | xbs_fraction[7]); assign nor_30691 = ~(xbs_fraction[50] | xbs_fraction[49]); assign nor_30692 = ~(~and_30596 | and_30647); assign and_30694 = ~(carry_bit | xbs_fraction[55]) & nor_30650; assign nor_30695 = ~(carry_bit | xbs_fraction[55] | nor_30650); assign nor_30702 = ~(xbs_fraction[34] | xbs_fraction[33]); assign nor_30703 = ~(~and_30606 | and_30657); assign and_30705 = ~(xbs_fraction[40] | xbs_fraction[39]) & nor_30660; assign nor_30706 = ~(xbs_fraction[40] | xbs_fraction[39] | nor_30660); assign and_30682 = nor_30634 & nor_30635; assign nor_30684 = ~(xbs_fraction[24] | ~xbs_fraction[23]); assign and_30687 = nor_30641 & nor_30640; assign nor_30688 = ~(xbs_fraction[20] | ~xbs_fraction[19]); assign and_30679 = nor_30631 & nor_30630; assign nor_30680 = ~(xbs_fraction[16] | ~xbs_fraction[15]); assign nor_30674 = ~(xbs_fraction[10] | xbs_fraction[9]); assign nor_30676 = ~(xbs_fraction[12] | xbs_fraction[11]); assign and_30670 = nor_30622 & nor_30621; assign nor_30671 = ~(xbs_fraction[8] | ~xbs_fraction[7]); assign nor_30665 = ~(xbs_fraction[2] | xbs_fraction[1]); assign nor_30667 = ~(xbs_fraction[4] | xbs_fraction[3]); assign and_30735 = ~(xbs_fraction[52] | xbs_fraction[51]) & nor_30691; assign and_30736 = and_30596 & and_30647; assign and_30738 = nor_30692 & ~nor_30648; assign and_30739 = nor_30692 & nor_30648; assign and_30747 = ~(xbs_fraction[36] | xbs_fraction[35]) & nor_30702; assign and_30748 = and_30606 & and_30657; assign and_30750 = nor_30703 & ~nor_30658; assign and_30751 = nor_30703 & nor_30658; assign and_30771 = and_30694 & and_30735; assign nor_30773 = ~(xbs_fraction[48] | xbs_fraction[47] | nor_30565); assign priority_sel_30781 = priority_sel_1b_2way({nor_30695, and_30694}, literal_30493, ~(xbs_fraction[54] | ~xbs_fraction[53]), ~(carry_bit | ~xbs_fraction[55])); assign and_30783 = and_30705 & and_30747; assign nor_30785 = ~(xbs_fraction[32] | xbs_fraction[31] | nor_30571); assign priority_sel_30793 = priority_sel_1b_2way({nor_30706, and_30705}, literal_30493, ~(xbs_fraction[38] | ~xbs_fraction[37]), ~(xbs_fraction[40] | ~xbs_fraction[39])); assign and_30768 = and_30682 & and_30687; assign priority_sel_30769 = priority_sel_2b_2way({~(xbs_fraction[24] | xbs_fraction[23] | nor_30635), and_30682}, {nor_30684, literal_30493}, {literal_30505, ~(xbs_fraction[22] | ~xbs_fraction[21])}, {nor_30634, nor_30684}); assign and_30764 = nor_30676 & nor_30674; assign and_30760 = nor_30667 & nor_30665; assign concat_30816 = {literal_30505, ~(xbs_fraction[52] | xbs_fraction[51] | nor_30691) ? {literal_30505, ~(xbs_fraction[50] | ~xbs_fraction[49])} : {literal_30493, ~(xbs_fraction[52] | ~xbs_fraction[51])}}; assign concat_30828 = {literal_30505, ~(xbs_fraction[36] | xbs_fraction[35] | nor_30702) ? {literal_30505, ~(xbs_fraction[34] | ~xbs_fraction[33])} : {literal_30493, ~(xbs_fraction[36] | ~xbs_fraction[35])}}; assign concat_30804 = {literal_30505, priority_sel_2b_2way({~(xbs_fraction[20] | xbs_fraction[19] | nor_30640), and_30687}, {nor_30688, literal_30493}, {literal_30505, ~(xbs_fraction[18] | ~xbs_fraction[17])}, {nor_30641, nor_30688})}; assign concat_30801 = {and_30679, priority_sel_2b_2way({~(xbs_fraction[16] | xbs_fraction[15] | nor_30630), and_30679}, {nor_30680, literal_30493}, {literal_30505, ~(xbs_fraction[14] | ~xbs_fraction[13])}, {nor_30631, nor_30680})}; assign concat_30800 = {literal_30505, ~(xbs_fraction[12] | xbs_fraction[11] | nor_30674) ? {literal_30505, ~(xbs_fraction[10] | ~xbs_fraction[9])} : {nor_30676, ~(xbs_fraction[12] | ~xbs_fraction[11])}}; assign concat_30798 = {and_30670, priority_sel_2b_2way({~(xbs_fraction[8] | xbs_fraction[7] | nor_30621), and_30670}, {nor_30671, literal_30493}, {literal_30505, ~(xbs_fraction[6] | ~xbs_fraction[5])}, {nor_30622, nor_30671})}; assign concat_30797 = {literal_30505, ~(xbs_fraction[4] | xbs_fraction[3] | nor_30665) ? {literal_30505, ~(xbs_fraction[2] | ~xbs_fraction[1])} : {nor_30667, ~(xbs_fraction[4] | ~xbs_fraction[3])}}; assign and_30837 = and_30771 & and_30736; assign and_30843 = and_30783 & and_30748; assign and_30834 = and_30679 & and_30764; assign fraction_shift__3 = 3'h4; assign literal_30855 = 4'h0; assign and_30864 = and_30837 & and_30843; assign priority_sel_30865 = priority_sel_4b_2way({~(~and_30771 | and_30736), and_30837}, literal_30855, {literal_30505, nor_30692, and_30739 & ~and_30736 | nor_30773 & ~and_30738 & ~and_30739 & ~and_30736, priority_sel_1b_4way({nor_30773, and_30738, and_30739, and_30736}, literal_30493, ~(xbs_fraction[42] | ~xbs_fraction[41]), ~(xbs_fraction[44] | ~xbs_fraction[43]), ~(xbs_fraction[46] | ~xbs_fraction[45]), ~(xbs_fraction[48] | ~xbs_fraction[47]))}, {and_30771, priority_sel_3b_2way({~(~and_30694 | and_30735), and_30771}, {nor_30695, priority_sel_30781, literal_30493}, concat_30816, {literal_30493, nor_30695, priority_sel_30781})}); assign priority_sel_30866 = priority_sel_4b_2way({~(~and_30783 | and_30748), and_30843}, literal_30855, {literal_30505, nor_30703, and_30751 & ~and_30748 | nor_30785 & ~and_30750 & ~and_30751 & ~and_30748, priority_sel_1b_4way({nor_30785, and_30750, and_30751, and_30748}, literal_30493, ~(xbs_fraction[26] | ~xbs_fraction[25]), ~(xbs_fraction[28] | ~xbs_fraction[27]), ~(xbs_fraction[30] | ~xbs_fraction[29]), ~(xbs_fraction[32] | ~xbs_fraction[31]))}, {and_30783, priority_sel_3b_2way({~(~and_30705 | and_30747), and_30783}, {nor_30706, priority_sel_30793, literal_30493}, concat_30828, {literal_30493, nor_30706, priority_sel_30793})}); assign sel_30978 = ~(~and_30768 | and_30834) ? {literal_30505, ~(~and_30679 | and_30764) ? concat_30800 : concat_30801} : {and_30768, priority_sel_3b_2way({~(~and_30682 | and_30687), and_30768}, {priority_sel_30769, literal_30493}, concat_30804, {and_30682, priority_sel_30769})}; assign concat_30868 = {literal_30505, and_30670 & and_30760 ? {fraction_shift__3, ~xbs_fraction[0]} : {literal_30493, ~(~and_30670 | and_30760) ? concat_30797 : concat_30798}}; assign leading_zeroes = and_30837 & and_30864 ? {literal_30505, and_30768 & and_30834 ? concat_30868 : {literal_30493, sel_30978}} : {literal_30493, priority_sel_5b_2way({~(~and_30837 | and_30843), and_30864}, {priority_sel_30865, literal_30493}, {literal_30505, priority_sel_30866}, {and_30837, priority_sel_30865})}; assign cancel_fraction = leading_zeroes >= 6'h3a ? 58'h000_0000_0000_0000 : {literal_30493, xbs_fraction} << leading_zeroes; assign cancel_fraction__1 = cancel_fraction[56:1]; assign carry_fraction__1 = {xbs_fraction[56:2], xbs_fraction[1] | xbs_fraction[0]}; assign shifted_fraction = carry_bit ? carry_fraction__1 : cancel_fraction__1; assign normal_chunk = shifted_fraction[2:0]; assign half_way_chunk = shifted_fraction[3:2]; assign do_round_up = normal_chunk > fraction_shift__3 | half_way_chunk == 2'h3; assign add_30896 = {literal_30493, shifted_fraction[55:3]} + {literal_30545, do_round_up}; assign rounding_carry = add_30896[53]; assign add_30909 = {literal_30493, x_bexp} + 12'h001; assign sub_30910 = {6'h00, rounding_carry} - {literal_30493, leading_zeroes}; assign fraction_is_zero = add_30546 == 55'h00_0000_0000_0000 & ~(shrl_30533[1] | shrl_30533[2]) & ~(shrl_30533[0] | sticky); assign wide_exponent_associative_element = {literal_30493, add_30909}; assign wide_exponent_associative_element__1 = {{6{sub_30910[6]}}, sub_30910}; assign wide_exponent = wide_exponent_associative_element + wide_exponent_associative_element__1; assign wide_exponent__1 = wide_exponent & {13{~fraction_is_zero}}; assign MAX_EXPONENT = 11'h7ff; assign literal_30923 = 52'h0_0000_0000_0000; assign wide_exponent__2 = wide_exponent__1[11:0] & {12{~wide_exponent__1[12]}}; assign eq_30925 = x_bexp == MAX_EXPONENT; assign eq_30926 = x_fraction == literal_30923; assign eq_30927 = y_bexp == MAX_EXPONENT; assign eq_30928 = y_fraction == literal_30923; assign fraction_shift__2 = 3'h3; assign is_operand_inf = eq_30925 & eq_30926 | eq_30927 & eq_30928; assign and_reduce_30946 = &wide_exponent__2[10:0]; assign has_pos_inf = ~(~eq_30925 | ~eq_30926 | x_sign) | ~(~eq_30927 | ~eq_30928 | y_sign); assign has_neg_inf = eq_30925 & eq_30926 & x_sign | eq_30927 & eq_30928 & y_sign; assign rounded_fraction = {add_30896, normal_chunk}; assign fraction_shift__1 = rounding_carry ? fraction_shift__3 : fraction_shift__2; assign shrl_30959 = rounded_fraction >> fraction_shift__1; assign is_result_nan = ~(~eq_30925 | eq_30926) | ~(~eq_30927 | eq_30928) | has_pos_inf & has_neg_inf; assign result_sign = priority_sel_1b_2way({add_30546[54], fraction_is_zero}, x_sign & y_sign, ~y_sign, y_sign); assign result_fraction = shrl_30959[51:0]; assign sign_ext_30965 = {52{~(is_operand_inf | wide_exponent__2[11] | and_reduce_30946 | ~((|wide_exponent__2[11:1]) | wide_exponent__2[0]))}}; assign result_sign__1 = is_operand_inf ? ~has_pos_inf : result_sign; assign result_fraction__3 = result_fraction & sign_ext_30965; assign FRACTION_HIGH_BIT = 52'h8_0000_0000_0000; assign result_sign__2 = ~is_result_nan & result_sign__1; assign result_exponent__2 = is_result_nan | is_operand_inf | wide_exponent__2[11] | and_reduce_30946 ? MAX_EXPONENT : wide_exponent__2[10:0]; assign result_fraction__4 = is_result_nan ? FRACTION_HIGH_BIT : result_fraction__3; assign out = {result_sign__2, result_exponent__2, result_fraction__4}; endmodule