package bfloat16 file_number 0 "/inputs/subtree/xls/dslx/stdlib/std.x" file_number 1 "/inputs/subtree/xls/dslx/stdlib/apfloat.x" file_number 2 "/inputs/subtree/xls/dslx/stdlib/bfloat16.x" top fn __bfloat16__to_uint16(x: (bits[1], bits[8], bits[7]) id=135) -> bits[16] { x_bexp__2: bits[8] = tuple_index(x, index=1, id=337, pos=[(1,266,6), (1,2642,31), (1,2897,29), (2,108,51)]) literal.338: bits[8] = literal(value=129, id=338, pos=[(1,266,6), (1,2642,31), (1,2897,29), (2,108,51)]) exp: bits[8] = add(x_bexp__2, literal.338, id=339, pos=[(1,266,6), (1,2642,31), (1,2897,29), (2,108,51)]) sign_ext.340: bits[9] = sign_ext(exp, new_bit_count=9, id=340, pos=[(1,2897,29), (2,108,51)]) literal.341: bits[9] = literal(value=505, id=341, pos=[(1,2664,29), (1,2897,29), (2,108,51)]) add.342: bits[9] = add(sign_ext.340, literal.341, id=342, pos=[(1,2664,29), (1,2897,29), (2,108,51)]) literal.343: bits[9] = literal(value=1, id=343, pos=[(1,2897,29), (2,108,51)]) x_fraction__2: bits[7] = tuple_index(x, index=2, id=344, pos=[(1,2646,21), (1,2897,29), (2,108,51)]) literal.345: bits[1] = literal(value=1, id=345, pos=[(1,2646,21), (1,2897,29), (2,108,51)]) neg.384: bits[9] = neg(add.342, id=384, pos=[(1,2664,29), (1,2897,29), (2,108,51)]) literal.351: bits[8] = literal(value=255, id=351, pos=[(1,96,29), (1,2651,37), (1,2897,29), (2,108,51)]) literal.352: bits[7] = literal(value=0, id=352, pos=[(1,96,57), (1,2651,37), (1,2897,29), (2,108,51)]) literal.347: bits[9] = literal(value=0, id=347, pos=[(1,2667,18), (1,2897,29), (2,108,51)]) fraction: bits[16] = concat(literal.343, x_fraction__2, id=348, pos=[(1,2897,29), (2,108,51)]) effective_exp: bits[32] = sign_ext(add.342, new_bit_count=32, id=346, pos=[(1,2664,29), (1,2897,29), (2,108,51)]) fraction_shift_bits: bits[8] = concat(literal.345, x_fraction__2, id=349, pos=[(1,2646,21), (1,2897,29), (2,108,51)]) sign_ext.385: bits[32] = sign_ext(neg.384, new_bit_count=32, id=385, pos=[(1,2666,26), (1,2897,29), (2,108,51)]) eq.357: bits[1] = eq(x_bexp__2, literal.351, id=357, pos=[(1,96,6), (1,2651,37), (1,2897,29), (2,108,51)]) ne.358: bits[1] = ne(x_fraction__2, literal.352, id=358, pos=[(1,71,44), (1,2654,20), (1,2897,29), (2,108,51)]) sgt.353: bits[1] = sgt(add.342, literal.347, id=353, pos=[(1,2667,18), (1,2897,29), (2,108,51)]) shll.354: bits[16] = shll(fraction, effective_exp, id=354, pos=[(1,2668,13), (1,2897,29), (2,108,51)]) literal.355: bits[8] = literal(value=0, id=355, pos=[(1,2666,13), (1,2897,29), (2,108,51)]) shrl.356: bits[8] = shrl(fraction_shift_bits, sign_ext.385, id=356, pos=[(1,2666,13), (1,2897,29), (2,108,51)]) and.365: bits[1] = and(eq.357, ne.358, id=365, pos=[(1,71,6), (1,2654,20), (1,2897,29), (2,108,51)]) bit_slice.366: bits[1] = bit_slice(exp, start=7, width=1, id=366, pos=[(1,2656,14), (1,2897,29), (2,108,51)]) literal.359: bits[8] = literal(value=127, id=359, pos=[(1,2658,14), (1,2897,29), (2,108,51)]) bit_slice.360: bits[1] = bit_slice(effective_exp, start=31, width=1, id=360, pos=[(1,2665,11), (1,2897,29), (2,108,51)]) sel.361: bits[16] = sel(sgt.353, cases=[fraction, shll.354], id=361, pos=[(1,2667,15), (1,2897,29), (2,108,51)]) concat.362: bits[16] = concat(literal.355, shrl.356, id=362, pos=[(1,2666,13), (1,2897,29), (2,108,51)]) or.373: bits[1] = or(and.365, bit_slice.366, id=373, pos=[(1,2654,11), (1,2897,29), (2,108,51)]) literal.363: bits[8] = literal(value=16, id=363, pos=[(1,2650,18), (1,2897,29), (2,108,51)]) not.382: bits[1] = not(eq.357, id=382, pos=[(1,96,6), (1,2651,37), (1,2897,29), (2,108,51)]) eq.367: bits[1] = eq(x_bexp__2, literal.359, id=367, pos=[(1,2658,14), (1,2897,29), (2,108,51)]) sel.368: bits[16] = sel(bit_slice.360, cases=[sel.361, concat.362], id=368, pos=[(1,2665,8), (1,2897,29), (2,108,51)]) literal.369: bits[16] = literal(value=1, id=369, pos=[(1,2659,8), (1,2897,29), (2,108,51)]) not.386: bits[1] = not(or.373, id=386, pos=[(1,2654,11), (1,2897,29), (2,108,51)]) x_sign__2: bits[1] = tuple_index(x, index=0, id=370, pos=[(1,2651,64), (1,2897,29), (2,108,51)]) exp_oob: bits[1] = sge(exp, literal.363, id=371, pos=[(1,2650,18), (1,2897,29), (2,108,51)]) nor.383: bits[1] = nor(not.382, ne.358, id=383, pos=[(1,96,6), (1,2651,37), (1,2897,29), (2,108,51)]) sel.374: bits[16] = sel(eq.367, cases=[sel.368, literal.369], id=374, pos=[(1,2658,11), (1,2897,29), (2,108,51)]) sign_ext.387: bits[16] = sign_ext(not.386, new_bit_count=16, id=387, pos=[(1,2654,11), (1,2897,29), (2,108,51)]) not.376: bits[1] = not(x_sign__2, id=376, pos=[(1,2653,8), (1,2897,29), (2,108,51)]) or.377: bits[1] = or(exp_oob, nor.383, x_sign__2, id=377, pos=[(1,2651,20), (1,2897,29), (2,108,51)]) and.388: bits[16] = and(sel.374, sign_ext.387, id=388, pos=[(1,2654,11), (1,2897,29), (2,108,51)]) sign_ext.379: bits[16] = sign_ext(not.376, new_bit_count=16, id=379, pos=[(1,2653,8), (1,2897,29), (2,108,51)]) ret result: bits[16] = sel(or.377, cases=[and.388, sign_ext.379], id=380, pos=[(1,2651,17), (1,2897,29), (2,108,51)]) }