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 [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_32886; wire [51:0] tuple_index_32887; wire [10:0] x_bexp; wire [10:0] y_bexp; 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_32900; wire [10:0] narrowed_result; wire [10:0] x_bexpor_mask; 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 tuple_index_32909; wire tuple_index_32910; wire [53:0] wide_x_squeezed; wire [55:0] wide_y_shift_bits; wire [10:0] shift; wire [55:0] shrl_32917; wire [56:0] shll_32919; wire [53:0] xddend_x__1_squeezed; wire [54:0] add_32930; wire sticky; wire [56:0] concat_32936; wire [56:0] xbs_fraction; wire nor_32949; wire nor_32955; wire and_32980; wire nor_32982; wire carry_bit; wire and_32990; wire nor_32992; wire and_33031; wire nor_33032; wire nor_33034; wire and_33041; wire nor_33042; wire nor_33044; wire nor_33018; wire nor_33019; wire nor_33024; wire nor_33025; wire nor_33014; wire nor_33015; wire nor_33005; wire nor_33006; wire nor_33075; wire nor_33076; wire and_33078; wire nor_33079; wire nor_33086; wire nor_33087; wire and_33089; wire nor_33090; wire and_33066; wire nor_33068; wire and_33071; wire nor_33072; wire and_33063; wire nor_33064; wire nor_33058; wire nor_33060; wire and_33054; wire nor_33055; wire nor_33049; wire nor_33051; wire and_33119; wire and_33120; wire and_33122; wire and_33123; wire and_33131; wire and_33132; wire and_33134; wire and_33135; wire and_33155; wire nor_33157; wire priority_sel_33165; wire and_33167; wire nor_33169; wire priority_sel_33177; wire and_33152; wire [1:0] priority_sel_33153; wire and_33148; wire and_33144; wire [2:0] concat_33200; wire [2:0] concat_33212; wire [2:0] concat_33188; wire [2:0] concat_33185; wire [2:0] concat_33184; wire [2:0] concat_33182; wire [2:0] concat_33181; wire and_33221; wire and_33227; wire and_33218; wire [2:0] fraction_shift__3; wire and_33248; wire [3:0] priority_sel_33249; wire [3:0] priority_sel_33250; wire [3:0] sel_33364; wire [4:0] concat_33252; 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_33280; wire rounding_carry; wire [11:0] add_33293; wire [6:0] sub_33294; 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 [11:0] wide_exponent__2; wire eq_33309; wire eq_33310; wire eq_33311; wire eq_33312; wire x_sign; wire y_sign; wire [2:0] fraction_shift__2; wire is_operand_inf; wire and_reduce_33332; wire has_pos_inf; wire has_neg_inf; wire [56:0] rounded_fraction; wire [2:0] fraction_shift__1; wire [56:0] shrl_33345; wire is_result_nan; wire result_sign; wire [51:0] result_fraction; wire [51:0] sign_ext_33351; 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 x_bexp__1 = x[62:52]; assign y_bexpnot = ~y_bexp__1; assign x_bexp_extended__1 = {1'h0, x_bexp__1}; assign y_bexpnot_extended = {1'h0, y_bexpnot}; assign full_result = x_bexp_extended__1 + y_bexpnot_extended; assign overflow_detected = full_result[11]; assign tuple_index_32886 = y[51:0]; assign tuple_index_32887 = x[51:0]; assign x_bexp = overflow_detected ? x_bexp__1 : y_bexp__1; assign y_bexp = overflow_detected ? y_bexp__1 : x_bexp__1; assign x_fraction = overflow_detected ? tuple_index_32887 : tuple_index_32886; assign y_fraction = overflow_detected ? tuple_index_32886 : tuple_index_32887; assign nc = ~overflow_detected; assign fraction_x = {1'h1, x_fraction}; assign fraction_y = {1'h1, y_fraction}; assign sign_ext_32900 = {53{y_bexp != 11'h000}}; assign narrowed_result = full_result[10:0]; assign x_bexpor_mask = {11{nc}}; assign fraction_x__1 = fraction_x & {53{x_bexp != 11'h000}}; assign fraction_y__1 = fraction_y & sign_ext_32900; assign xddend_x__1_squeezed_const_lsb_bits = 3'h0; assign result = narrowed_result ^ x_bexpor_mask; assign tuple_index_32909 = x[63:63]; assign tuple_index_32910 = y[63:63]; assign wide_x_squeezed = {1'h0, 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_32917 = shift >= 11'h038 ? 56'h00_0000_0000_0000 : wide_y_shift_bits >> shift; assign shll_32919 = shift >= 11'h039 ? 57'h000_0000_0000_0000 : 57'h1ff_ffff_ffff_ffff << shift; assign xddend_x__1_squeezed = tuple_index_32909 ^ tuple_index_32910 ? -wide_x_squeezed : wide_x_squeezed; assign add_32930 = {{1{xddend_x__1_squeezed[53]}}, xddend_x__1_squeezed} + {2'h0, shrl_32917[55:3]}; assign sticky = ~({1'h0, ~y_fraction} | ~sign_ext_32900 | shll_32919[55:3]) != 53'h00_0000_0000_0000; assign concat_32936 = {add_32930[53:0], shrl_32917[2:1], shrl_32917[0] | sticky}; assign xbs_fraction = add_32930[54] ? -concat_32936 : concat_32936; assign nor_32949 = ~(xbs_fraction[46] | xbs_fraction[45]); assign nor_32955 = ~(xbs_fraction[30] | xbs_fraction[29]); assign and_32980 = ~(xbs_fraction[48] | xbs_fraction[47]) & nor_32949; assign nor_32982 = ~(xbs_fraction[42] | xbs_fraction[41]); assign carry_bit = xbs_fraction[56]; assign and_32990 = ~(xbs_fraction[32] | xbs_fraction[31]) & nor_32955; assign nor_32992 = ~(xbs_fraction[26] | xbs_fraction[25]); assign and_33031 = ~(xbs_fraction[44] | xbs_fraction[43]) & nor_32982; assign nor_33032 = ~(xbs_fraction[44] | xbs_fraction[43] | nor_32982); assign nor_33034 = ~(xbs_fraction[54] | xbs_fraction[53]); assign and_33041 = ~(xbs_fraction[28] | xbs_fraction[27]) & nor_32992; assign nor_33042 = ~(xbs_fraction[28] | xbs_fraction[27] | nor_32992); assign nor_33044 = ~(xbs_fraction[38] | xbs_fraction[37]); assign nor_33018 = ~(xbs_fraction[24] | xbs_fraction[23]); assign nor_33019 = ~(xbs_fraction[22] | xbs_fraction[21]); assign nor_33024 = ~(xbs_fraction[18] | xbs_fraction[17]); assign nor_33025 = ~(xbs_fraction[20] | xbs_fraction[19]); assign nor_33014 = ~(xbs_fraction[14] | xbs_fraction[13]); assign nor_33015 = ~(xbs_fraction[16] | xbs_fraction[15]); assign nor_33005 = ~(xbs_fraction[6] | xbs_fraction[5]); assign nor_33006 = ~(xbs_fraction[8] | xbs_fraction[7]); assign nor_33075 = ~(xbs_fraction[50] | xbs_fraction[49]); assign nor_33076 = ~(~and_32980 | and_33031); assign and_33078 = ~(carry_bit | xbs_fraction[55]) & nor_33034; assign nor_33079 = ~(carry_bit | xbs_fraction[55] | nor_33034); assign nor_33086 = ~(xbs_fraction[34] | xbs_fraction[33]); assign nor_33087 = ~(~and_32990 | and_33041); assign and_33089 = ~(xbs_fraction[40] | xbs_fraction[39]) & nor_33044; assign nor_33090 = ~(xbs_fraction[40] | xbs_fraction[39] | nor_33044); assign and_33066 = nor_33018 & nor_33019; assign nor_33068 = ~(xbs_fraction[24] | ~xbs_fraction[23]); assign and_33071 = nor_33025 & nor_33024; assign nor_33072 = ~(xbs_fraction[20] | ~xbs_fraction[19]); assign and_33063 = nor_33015 & nor_33014; assign nor_33064 = ~(xbs_fraction[16] | ~xbs_fraction[15]); assign nor_33058 = ~(xbs_fraction[10] | xbs_fraction[9]); assign nor_33060 = ~(xbs_fraction[12] | xbs_fraction[11]); assign and_33054 = nor_33006 & nor_33005; assign nor_33055 = ~(xbs_fraction[8] | ~xbs_fraction[7]); assign nor_33049 = ~(xbs_fraction[2] | xbs_fraction[1]); assign nor_33051 = ~(xbs_fraction[4] | xbs_fraction[3]); assign and_33119 = ~(xbs_fraction[52] | xbs_fraction[51]) & nor_33075; assign and_33120 = and_32980 & and_33031; assign and_33122 = nor_33076 & ~nor_33032; assign and_33123 = nor_33076 & nor_33032; assign and_33131 = ~(xbs_fraction[36] | xbs_fraction[35]) & nor_33086; assign and_33132 = and_32990 & and_33041; assign and_33134 = nor_33087 & ~nor_33042; assign and_33135 = nor_33087 & nor_33042; assign and_33155 = and_33078 & and_33119; assign nor_33157 = ~(xbs_fraction[48] | xbs_fraction[47] | nor_32949); assign priority_sel_33165 = priority_sel_1b_2way({nor_33079, and_33078}, 1'h0, ~(xbs_fraction[54] | ~xbs_fraction[53]), ~(carry_bit | ~xbs_fraction[55])); assign and_33167 = and_33089 & and_33131; assign nor_33169 = ~(xbs_fraction[32] | xbs_fraction[31] | nor_32955); assign priority_sel_33177 = priority_sel_1b_2way({nor_33090, and_33089}, 1'h0, ~(xbs_fraction[38] | ~xbs_fraction[37]), ~(xbs_fraction[40] | ~xbs_fraction[39])); assign and_33152 = and_33066 & and_33071; assign priority_sel_33153 = priority_sel_2b_2way({~(xbs_fraction[24] | xbs_fraction[23] | nor_33019), and_33066}, {nor_33068, 1'h0}, {1'h1, ~(xbs_fraction[22] | ~xbs_fraction[21])}, {nor_33018, nor_33068}); assign and_33148 = nor_33060 & nor_33058; assign and_33144 = nor_33051 & nor_33049; assign concat_33200 = {1'h1, ~(xbs_fraction[52] | xbs_fraction[51] | nor_33075) ? {1'h1, ~(xbs_fraction[50] | ~xbs_fraction[49])} : {1'h0, ~(xbs_fraction[52] | ~xbs_fraction[51])}}; assign concat_33212 = {1'h1, ~(xbs_fraction[36] | xbs_fraction[35] | nor_33086) ? {1'h1, ~(xbs_fraction[34] | ~xbs_fraction[33])} : {1'h0, ~(xbs_fraction[36] | ~xbs_fraction[35])}}; assign concat_33188 = {1'h1, priority_sel_2b_2way({~(xbs_fraction[20] | xbs_fraction[19] | nor_33024), and_33071}, {nor_33072, 1'h0}, {1'h1, ~(xbs_fraction[18] | ~xbs_fraction[17])}, {nor_33025, nor_33072})}; assign concat_33185 = {and_33063, priority_sel_2b_2way({~(xbs_fraction[16] | xbs_fraction[15] | nor_33014), and_33063}, {nor_33064, 1'h0}, {1'h1, ~(xbs_fraction[14] | ~xbs_fraction[13])}, {nor_33015, nor_33064})}; assign concat_33184 = {1'h1, ~(xbs_fraction[12] | xbs_fraction[11] | nor_33058) ? {1'h1, ~(xbs_fraction[10] | ~xbs_fraction[9])} : {nor_33060, ~(xbs_fraction[12] | ~xbs_fraction[11])}}; assign concat_33182 = {and_33054, priority_sel_2b_2way({~(xbs_fraction[8] | xbs_fraction[7] | nor_33005), and_33054}, {nor_33055, 1'h0}, {1'h1, ~(xbs_fraction[6] | ~xbs_fraction[5])}, {nor_33006, nor_33055})}; assign concat_33181 = {1'h1, ~(xbs_fraction[4] | xbs_fraction[3] | nor_33049) ? {1'h1, ~(xbs_fraction[2] | ~xbs_fraction[1])} : {nor_33051, ~(xbs_fraction[4] | ~xbs_fraction[3])}}; assign and_33221 = and_33155 & and_33120; assign and_33227 = and_33167 & and_33132; assign and_33218 = and_33063 & and_33148; assign fraction_shift__3 = 3'h4; assign and_33248 = and_33221 & and_33227; assign priority_sel_33249 = priority_sel_4b_2way({~(~and_33155 | and_33120), and_33221}, 4'h0, {1'h1, nor_33076, and_33123 & ~and_33120 | nor_33157 & ~and_33122 & ~and_33123 & ~and_33120, priority_sel_1b_4way({nor_33157, and_33122, and_33123, and_33120}, 1'h0, ~(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_33155, priority_sel_3b_2way({~(~and_33078 | and_33119), and_33155}, {nor_33079, priority_sel_33165, 1'h0}, concat_33200, {1'h0, nor_33079, priority_sel_33165})}); assign priority_sel_33250 = priority_sel_4b_2way({~(~and_33167 | and_33132), and_33227}, 4'h0, {1'h1, nor_33087, and_33135 & ~and_33132 | nor_33169 & ~and_33134 & ~and_33135 & ~and_33132, priority_sel_1b_4way({nor_33169, and_33134, and_33135, and_33132}, 1'h0, ~(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_33167, priority_sel_3b_2way({~(~and_33089 | and_33131), and_33167}, {nor_33090, priority_sel_33177, 1'h0}, concat_33212, {1'h0, nor_33090, priority_sel_33177})}); assign sel_33364 = ~(~and_33152 | and_33218) ? {1'h1, ~(~and_33063 | and_33148) ? concat_33184 : concat_33185} : {and_33152, priority_sel_3b_2way({~(~and_33066 | and_33071), and_33152}, {priority_sel_33153, 1'h0}, concat_33188, {and_33066, priority_sel_33153})}; assign concat_33252 = {1'h1, and_33054 & and_33144 ? {fraction_shift__3, ~xbs_fraction[0]} : {1'h0, ~(~and_33054 | and_33144) ? concat_33181 : concat_33182}}; assign leading_zeroes = and_33221 & and_33248 ? {1'h1, and_33152 & and_33218 ? concat_33252 : {1'h0, sel_33364}} : {1'h0, priority_sel_5b_2way({~(~and_33221 | and_33227), and_33248}, {priority_sel_33249, 1'h0}, {1'h1, priority_sel_33250}, {and_33221, priority_sel_33249})}; assign cancel_fraction = leading_zeroes >= 6'h3a ? 58'h000_0000_0000_0000 : {1'h0, 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_33280 = {1'h0, shifted_fraction[55:3]} + {53'h00_0000_0000_0000, do_round_up}; assign rounding_carry = add_33280[53]; assign add_33293 = {1'h0, x_bexp} + 12'h001; assign sub_33294 = {6'h00, rounding_carry} - {1'h0, leading_zeroes}; assign fraction_is_zero = add_32930 == 55'h00_0000_0000_0000 & ~(shrl_32917[1] | shrl_32917[2]) & ~(shrl_32917[0] | sticky); assign wide_exponent_associative_element = {1'h0, add_33293}; assign wide_exponent_associative_element__1 = {{6{sub_33294[6]}}, sub_33294}; 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 wide_exponent__2 = wide_exponent__1[11:0] & {12{~wide_exponent__1[12]}}; assign eq_33309 = x_bexp == MAX_EXPONENT; assign eq_33310 = x_fraction == 52'h0_0000_0000_0000; assign eq_33311 = y_bexp == MAX_EXPONENT; assign eq_33312 = y_fraction == 52'h0_0000_0000_0000; assign x_sign = overflow_detected ? tuple_index_32909 : tuple_index_32910; assign y_sign = overflow_detected ? tuple_index_32910 : tuple_index_32909; assign fraction_shift__2 = 3'h3; assign is_operand_inf = eq_33309 & eq_33310 | eq_33311 & eq_33312; assign and_reduce_33332 = &wide_exponent__2[10:0]; assign has_pos_inf = ~(~eq_33309 | ~eq_33310 | x_sign) | ~(~eq_33311 | ~eq_33312 | y_sign); assign has_neg_inf = eq_33309 & eq_33310 & x_sign | eq_33311 & eq_33312 & y_sign; assign rounded_fraction = {add_33280, normal_chunk}; assign fraction_shift__1 = rounding_carry ? fraction_shift__3 : fraction_shift__2; assign shrl_33345 = rounded_fraction >> fraction_shift__1; assign is_result_nan = ~(~eq_33309 | eq_33310) | ~(~eq_33311 | eq_33312) | has_pos_inf & has_neg_inf; assign result_sign = priority_sel_1b_2way({add_32930[54], fraction_is_zero}, tuple_index_32909 & tuple_index_32910, ~y_sign, y_sign); assign result_fraction = shrl_33345[51:0]; assign sign_ext_33351 = {52{~(is_operand_inf | wide_exponent__2[11] | and_reduce_33332 | ~((|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_33351; 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_33332 ? 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