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_30347; 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_30354; wire [51:0] tuple_index_30355; wire [10:0] x_bexp; wire [10:0] literal_30357; wire [10:0] y_bexp; wire literal_30359; 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_30368; wire [10:0] narrowed_result; wire [10:0] x_bexpor_mask; wire tuple_index_30372; wire tuple_index_30373; 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_30387; wire [56:0] shll_30389; wire [53:0] xddend_x__1_squeezed; wire [52:0] literal_30399; wire [54:0] add_30400; wire sticky; wire [56:0] concat_30406; wire [56:0] xbs_fraction; wire nor_30419; wire nor_30425; wire and_30450; wire nor_30452; wire carry_bit; wire and_30460; wire nor_30462; wire and_30501; wire nor_30502; wire nor_30504; wire and_30511; wire nor_30512; wire nor_30514; wire nor_30488; wire nor_30489; wire nor_30494; wire nor_30495; wire nor_30484; wire nor_30485; wire nor_30475; wire nor_30476; wire nor_30545; wire nor_30546; wire and_30548; wire nor_30549; wire nor_30556; wire nor_30557; wire and_30559; wire nor_30560; wire and_30536; wire nor_30538; wire and_30541; wire nor_30542; wire and_30533; wire nor_30534; wire nor_30528; wire nor_30530; wire and_30524; wire nor_30525; wire nor_30519; wire nor_30521; wire and_30589; wire and_30590; wire and_30592; wire and_30593; wire and_30601; wire and_30602; wire and_30604; wire and_30605; wire and_30625; wire nor_30627; wire priority_sel_30635; wire and_30637; wire nor_30639; wire priority_sel_30647; wire and_30622; wire [1:0] priority_sel_30623; wire and_30618; wire and_30614; wire [2:0] concat_30670; wire [2:0] concat_30682; wire [2:0] concat_30658; wire [2:0] concat_30655; wire [2:0] concat_30654; wire [2:0] concat_30652; wire [2:0] concat_30651; wire and_30691; wire and_30697; wire and_30688; wire [2:0] fraction_shift__3; wire [3:0] literal_30709; wire and_30718; wire [3:0] priority_sel_30719; wire [3:0] priority_sel_30720; wire [3:0] sel_30832; wire [4:0] concat_30722; 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_30750; wire rounding_carry; wire [11:0] add_30763; wire [6:0] sub_30764; 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_30777; wire [11:0] wide_exponent__2; wire eq_30779; wire eq_30780; wire eq_30781; wire eq_30782; wire [2:0] fraction_shift__2; wire is_operand_inf; wire and_reduce_30800; wire has_pos_inf; wire has_neg_inf; wire [56:0] rounded_fraction; wire [2:0] fraction_shift__1; wire [56:0] shrl_30813; wire is_result_nan; wire result_sign; wire [51:0] result_fraction; wire [51:0] sign_ext_30819; 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_30347 = 1'h0; assign x_bexp__1 = x[62:52]; assign y_bexpnot = ~y_bexp__1; assign x_bexp_extended__1 = {literal_30347, x_bexp__1}; assign y_bexpnot_extended = {literal_30347, y_bexpnot}; assign full_result = x_bexp_extended__1 + y_bexpnot_extended; assign overflow_detected = full_result[11]; assign tuple_index_30354 = y[51:0]; assign tuple_index_30355 = x[51:0]; assign x_bexp = overflow_detected ? x_bexp__1 : y_bexp__1; assign literal_30357 = 11'h000; assign y_bexp = overflow_detected ? y_bexp__1 : x_bexp__1; assign literal_30359 = 1'h1; assign x_fraction = overflow_detected ? tuple_index_30355 : tuple_index_30354; assign y_fraction = overflow_detected ? tuple_index_30354 : tuple_index_30355; assign nc = ~overflow_detected; assign fraction_x = {literal_30359, x_fraction}; assign fraction_y = {literal_30359, y_fraction}; assign sign_ext_30368 = {53{y_bexp != literal_30357}}; assign narrowed_result = full_result[10:0]; assign x_bexpor_mask = {11{nc}}; assign tuple_index_30372 = y[63:63]; assign tuple_index_30373 = x[63:63]; assign fraction_x__1 = fraction_x & {53{x_bexp != literal_30357}}; assign fraction_y__1 = fraction_y & sign_ext_30368; assign xddend_x__1_squeezed_const_lsb_bits = 3'h0; assign result = narrowed_result ^ x_bexpor_mask; assign x_sign = overflow_detected ? tuple_index_30373 : tuple_index_30372; assign y_sign = overflow_detected ? tuple_index_30372 : tuple_index_30373; assign wide_x_squeezed = {literal_30347, 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_30387 = shift >= 11'h038 ? 56'h00_0000_0000_0000 : wide_y_shift_bits >> shift; assign shll_30389 = 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_30399 = 53'h00_0000_0000_0000; assign add_30400 = {{1{xddend_x__1_squeezed[53]}}, xddend_x__1_squeezed} + {2'h0, shrl_30387[55:3]}; assign sticky = ~({literal_30347, ~y_fraction} | ~sign_ext_30368 | shll_30389[55:3]) != literal_30399; assign concat_30406 = {add_30400[53:0], shrl_30387[2:1], shrl_30387[0] | sticky}; assign xbs_fraction = add_30400[54] ? -concat_30406 : concat_30406; assign nor_30419 = ~(xbs_fraction[46] | xbs_fraction[45]); assign nor_30425 = ~(xbs_fraction[30] | xbs_fraction[29]); assign and_30450 = ~(xbs_fraction[48] | xbs_fraction[47]) & nor_30419; assign nor_30452 = ~(xbs_fraction[42] | xbs_fraction[41]); assign carry_bit = xbs_fraction[56]; assign and_30460 = ~(xbs_fraction[32] | xbs_fraction[31]) & nor_30425; assign nor_30462 = ~(xbs_fraction[26] | xbs_fraction[25]); assign and_30501 = ~(xbs_fraction[44] | xbs_fraction[43]) & nor_30452; assign nor_30502 = ~(xbs_fraction[44] | xbs_fraction[43] | nor_30452); assign nor_30504 = ~(xbs_fraction[54] | xbs_fraction[53]); assign and_30511 = ~(xbs_fraction[28] | xbs_fraction[27]) & nor_30462; assign nor_30512 = ~(xbs_fraction[28] | xbs_fraction[27] | nor_30462); assign nor_30514 = ~(xbs_fraction[38] | xbs_fraction[37]); assign nor_30488 = ~(xbs_fraction[24] | xbs_fraction[23]); assign nor_30489 = ~(xbs_fraction[22] | xbs_fraction[21]); assign nor_30494 = ~(xbs_fraction[18] | xbs_fraction[17]); assign nor_30495 = ~(xbs_fraction[20] | xbs_fraction[19]); assign nor_30484 = ~(xbs_fraction[14] | xbs_fraction[13]); assign nor_30485 = ~(xbs_fraction[16] | xbs_fraction[15]); assign nor_30475 = ~(xbs_fraction[6] | xbs_fraction[5]); assign nor_30476 = ~(xbs_fraction[8] | xbs_fraction[7]); assign nor_30545 = ~(xbs_fraction[50] | xbs_fraction[49]); assign nor_30546 = ~(~and_30450 | and_30501); assign and_30548 = ~(carry_bit | xbs_fraction[55]) & nor_30504; assign nor_30549 = ~(carry_bit | xbs_fraction[55] | nor_30504); assign nor_30556 = ~(xbs_fraction[34] | xbs_fraction[33]); assign nor_30557 = ~(~and_30460 | and_30511); assign and_30559 = ~(xbs_fraction[40] | xbs_fraction[39]) & nor_30514; assign nor_30560 = ~(xbs_fraction[40] | xbs_fraction[39] | nor_30514); assign and_30536 = nor_30488 & nor_30489; assign nor_30538 = ~(xbs_fraction[24] | ~xbs_fraction[23]); assign and_30541 = nor_30495 & nor_30494; assign nor_30542 = ~(xbs_fraction[20] | ~xbs_fraction[19]); assign and_30533 = nor_30485 & nor_30484; assign nor_30534 = ~(xbs_fraction[16] | ~xbs_fraction[15]); assign nor_30528 = ~(xbs_fraction[10] | xbs_fraction[9]); assign nor_30530 = ~(xbs_fraction[12] | xbs_fraction[11]); assign and_30524 = nor_30476 & nor_30475; assign nor_30525 = ~(xbs_fraction[8] | ~xbs_fraction[7]); assign nor_30519 = ~(xbs_fraction[2] | xbs_fraction[1]); assign nor_30521 = ~(xbs_fraction[4] | xbs_fraction[3]); assign and_30589 = ~(xbs_fraction[52] | xbs_fraction[51]) & nor_30545; assign and_30590 = and_30450 & and_30501; assign and_30592 = nor_30546 & ~nor_30502; assign and_30593 = nor_30546 & nor_30502; assign and_30601 = ~(xbs_fraction[36] | xbs_fraction[35]) & nor_30556; assign and_30602 = and_30460 & and_30511; assign and_30604 = nor_30557 & ~nor_30512; assign and_30605 = nor_30557 & nor_30512; assign and_30625 = and_30548 & and_30589; assign nor_30627 = ~(xbs_fraction[48] | xbs_fraction[47] | nor_30419); assign priority_sel_30635 = priority_sel_1b_2way({nor_30549, and_30548}, literal_30347, ~(xbs_fraction[54] | ~xbs_fraction[53]), ~(carry_bit | ~xbs_fraction[55])); assign and_30637 = and_30559 & and_30601; assign nor_30639 = ~(xbs_fraction[32] | xbs_fraction[31] | nor_30425); assign priority_sel_30647 = priority_sel_1b_2way({nor_30560, and_30559}, literal_30347, ~(xbs_fraction[38] | ~xbs_fraction[37]), ~(xbs_fraction[40] | ~xbs_fraction[39])); assign and_30622 = and_30536 & and_30541; assign priority_sel_30623 = priority_sel_2b_2way({~(xbs_fraction[24] | xbs_fraction[23] | nor_30489), and_30536}, {nor_30538, literal_30347}, {literal_30359, ~(xbs_fraction[22] | ~xbs_fraction[21])}, {nor_30488, nor_30538}); assign and_30618 = nor_30530 & nor_30528; assign and_30614 = nor_30521 & nor_30519; assign concat_30670 = {literal_30359, ~(xbs_fraction[52] | xbs_fraction[51] | nor_30545) ? {literal_30359, ~(xbs_fraction[50] | ~xbs_fraction[49])} : {literal_30347, ~(xbs_fraction[52] | ~xbs_fraction[51])}}; assign concat_30682 = {literal_30359, ~(xbs_fraction[36] | xbs_fraction[35] | nor_30556) ? {literal_30359, ~(xbs_fraction[34] | ~xbs_fraction[33])} : {literal_30347, ~(xbs_fraction[36] | ~xbs_fraction[35])}}; assign concat_30658 = {literal_30359, priority_sel_2b_2way({~(xbs_fraction[20] | xbs_fraction[19] | nor_30494), and_30541}, {nor_30542, literal_30347}, {literal_30359, ~(xbs_fraction[18] | ~xbs_fraction[17])}, {nor_30495, nor_30542})}; assign concat_30655 = {and_30533, priority_sel_2b_2way({~(xbs_fraction[16] | xbs_fraction[15] | nor_30484), and_30533}, {nor_30534, literal_30347}, {literal_30359, ~(xbs_fraction[14] | ~xbs_fraction[13])}, {nor_30485, nor_30534})}; assign concat_30654 = {literal_30359, ~(xbs_fraction[12] | xbs_fraction[11] | nor_30528) ? {literal_30359, ~(xbs_fraction[10] | ~xbs_fraction[9])} : {nor_30530, ~(xbs_fraction[12] | ~xbs_fraction[11])}}; assign concat_30652 = {and_30524, priority_sel_2b_2way({~(xbs_fraction[8] | xbs_fraction[7] | nor_30475), and_30524}, {nor_30525, literal_30347}, {literal_30359, ~(xbs_fraction[6] | ~xbs_fraction[5])}, {nor_30476, nor_30525})}; assign concat_30651 = {literal_30359, ~(xbs_fraction[4] | xbs_fraction[3] | nor_30519) ? {literal_30359, ~(xbs_fraction[2] | ~xbs_fraction[1])} : {nor_30521, ~(xbs_fraction[4] | ~xbs_fraction[3])}}; assign and_30691 = and_30625 & and_30590; assign and_30697 = and_30637 & and_30602; assign and_30688 = and_30533 & and_30618; assign fraction_shift__3 = 3'h4; assign literal_30709 = 4'h0; assign and_30718 = and_30691 & and_30697; assign priority_sel_30719 = priority_sel_4b_2way({~(~and_30625 | and_30590), and_30691}, literal_30709, {literal_30359, nor_30546, and_30593 & ~and_30590 | nor_30627 & ~and_30592 & ~and_30593 & ~and_30590, priority_sel_1b_4way({nor_30627, and_30592, and_30593, and_30590}, literal_30347, ~(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_30625, priority_sel_3b_2way({~(~and_30548 | and_30589), and_30625}, {nor_30549, priority_sel_30635, literal_30347}, concat_30670, {literal_30347, nor_30549, priority_sel_30635})}); assign priority_sel_30720 = priority_sel_4b_2way({~(~and_30637 | and_30602), and_30697}, literal_30709, {literal_30359, nor_30557, and_30605 & ~and_30602 | nor_30639 & ~and_30604 & ~and_30605 & ~and_30602, priority_sel_1b_4way({nor_30639, and_30604, and_30605, and_30602}, literal_30347, ~(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_30637, priority_sel_3b_2way({~(~and_30559 | and_30601), and_30637}, {nor_30560, priority_sel_30647, literal_30347}, concat_30682, {literal_30347, nor_30560, priority_sel_30647})}); assign sel_30832 = ~(~and_30622 | and_30688) ? {literal_30359, ~(~and_30533 | and_30618) ? concat_30654 : concat_30655} : {and_30622, priority_sel_3b_2way({~(~and_30536 | and_30541), and_30622}, {priority_sel_30623, literal_30347}, concat_30658, {and_30536, priority_sel_30623})}; assign concat_30722 = {literal_30359, and_30524 & and_30614 ? {fraction_shift__3, ~xbs_fraction[0]} : {literal_30347, ~(~and_30524 | and_30614) ? concat_30651 : concat_30652}}; assign leading_zeroes = and_30691 & and_30718 ? {literal_30359, and_30622 & and_30688 ? concat_30722 : {literal_30347, sel_30832}} : {literal_30347, priority_sel_5b_2way({~(~and_30691 | and_30697), and_30718}, {priority_sel_30719, literal_30347}, {literal_30359, priority_sel_30720}, {and_30691, priority_sel_30719})}; assign cancel_fraction = leading_zeroes >= 6'h3a ? 58'h000_0000_0000_0000 : {literal_30347, 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_30750 = {literal_30347, shifted_fraction[55:3]} + {literal_30399, do_round_up}; assign rounding_carry = add_30750[53]; assign add_30763 = {literal_30347, x_bexp} + 12'h001; assign sub_30764 = {6'h00, rounding_carry} - {literal_30347, leading_zeroes}; assign fraction_is_zero = add_30400 == 55'h00_0000_0000_0000 & ~(shrl_30387[1] | shrl_30387[2]) & ~(shrl_30387[0] | sticky); assign wide_exponent_associative_element = {literal_30347, add_30763}; assign wide_exponent_associative_element__1 = {{6{sub_30764[6]}}, sub_30764}; 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_30777 = 52'h0_0000_0000_0000; assign wide_exponent__2 = wide_exponent__1[11:0] & {12{~wide_exponent__1[12]}}; assign eq_30779 = x_bexp == MAX_EXPONENT; assign eq_30780 = x_fraction == literal_30777; assign eq_30781 = y_bexp == MAX_EXPONENT; assign eq_30782 = y_fraction == literal_30777; assign fraction_shift__2 = 3'h3; assign is_operand_inf = eq_30779 & eq_30780 | eq_30781 & eq_30782; assign and_reduce_30800 = &wide_exponent__2[10:0]; assign has_pos_inf = ~(~eq_30779 | ~eq_30780 | x_sign) | ~(~eq_30781 | ~eq_30782 | y_sign); assign has_neg_inf = eq_30779 & eq_30780 & x_sign | eq_30781 & eq_30782 & y_sign; assign rounded_fraction = {add_30750, normal_chunk}; assign fraction_shift__1 = rounding_carry ? fraction_shift__3 : fraction_shift__2; assign shrl_30813 = rounded_fraction >> fraction_shift__1; assign is_result_nan = ~(~eq_30779 | eq_30780) | ~(~eq_30781 | eq_30782) | has_pos_inf & has_neg_inf; assign result_sign = priority_sel_1b_2way({add_30400[54], fraction_is_zero}, x_sign & y_sign, ~y_sign, y_sign); assign result_fraction = shrl_30813[51:0]; assign sign_ext_30819 = {52{~(is_operand_inf | wide_exponent__2[11] | and_reduce_30800 | ~((|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_30819; 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_30800 ? 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