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__from_float32(f32: (bits[1], bits[8], bits[23]) id=493) -> (bits[1], bits[8], bits[7]) { f32_fraction__1: bits[23] = tuple_index(f32, index=2, id=1339, pos=[(1,1327,30), (1,1383,33), (1,1416,45), (1,1721,31), (2,226,25)]) bit_slice.1340: bits[15] = bit_slice(f32_fraction__1, start=0, width=15, id=1340, pos=[(1,1327,30), (1,1383,33), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1341: bits[15] = literal(value=0, id=1341, pos=[(0,1406,19), (0,1496,17), (0,1523,22), (1,421,43), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) round_bit: bits[1] = bit_slice(f32_fraction__1, start=15, width=1, id=1346, pos=[(1,415,28), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) sticky: bits[1] = ne(bit_slice.1340, literal.1341, id=1347, pos=[(0,1496,17), (0,1523,22), (1,421,43), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) bit_slice.1348: bits[1] = bit_slice(f32_fraction__1, start=16, width=1, id=1348, pos=[(1,419,57), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and.1352: bits[1] = and(round_bit, sticky, id=1352, pos=[(1,428,13), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and.1353: bits[1] = and(round_bit, bit_slice.1348, id=1353, pos=[(1,428,38), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) truncated_fraction: bits[7] = bit_slice(f32_fraction__1, start=16, width=7, id=1354, pos=[(1,1111,39), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) round_up: bits[1] = or(and.1352, and.1353, id=1357, pos=[(1,428,13), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and_reduce.1358: bits[1] = and_reduce(truncated_fraction, id=1358, pos=[(1,1115,44), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1561: bits[7] = literal(value=0, id=1561) renormalize: bits[1] = and(round_up, and_reduce.1358, id=1366, pos=[(1,1115,22), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) f32_bexp__2: bits[8] = tuple_index(f32, index=1, id=1342, pos=[(1,40,22), (1,1407,13), (1,1721,31), (2,226,25)]) literal.1345: bits[8] = literal(value=0, id=1345, pos=[(1,41,9), (1,1407,13), (1,1721,31), (2,226,25)]) concat.1600: bits[8] = concat(literal.1561, renormalize, id=1600) eq.1351: bits[1] = eq(f32_bexp__2, literal.1345, id=1351, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) literal.1344: bits[23] = literal(value=0, id=1344, pos=[(1,43,20), (1,1407,13), (1,1721,31), (2,226,25)]) EXPR_MASK: bits[8] = literal(value=255, id=1343, pos=[(1,39,36), (1,1407,13), (1,1721,31), (2,226,25)]) literal.1567: bits[6] = literal(value=0, id=1567) f32_cast_bexp__2: bits[8] = add(f32_bexp__2, concat.1600, id=1422) not.1649: bits[1] = not(eq.1351, id=1649, pos=[(1,1721,31), (2,226,25)]) eq.1350: bits[1] = eq(f32_fraction__1, literal.1344, id=1350, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) eq.1349: bits[1] = eq(f32_bexp__2, EXPR_MASK, id=1349, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) concat.1601: bits[7] = concat(literal.1567, round_up, id=1601) ne.1511: bits[1] = ne(f32_cast_bexp__2, EXPR_MASK, id=1511, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) nor.1650: bits[1] = nor(not.1649, eq.1350, id=1650, pos=[(1,1721,31), (2,226,25)]) and.1356: bits[1] = and(eq.1351, eq.1350, id=1356, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) and.1355: bits[1] = and(eq.1349, eq.1350, id=1355, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) not.1647: bits[1] = not(eq.1349, id=1647, pos=[(1,1721,31), (2,226,25)]) f32_cast_fraction__1: bits[7] = add(truncated_fraction, concat.1601, id=1425) sign_ext.1437: bits[7] = sign_ext(ne.1511, new_bit_count=7, id=1437, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) or.1500: bits[1] = or(nor.1650, and.1356, and.1355, id=1500, pos=[(1,1721,31), (2,226,25)]) nor.1654: bits[1] = nor(not.1647, eq.1350, id=1654, pos=[(1,1721,31), (2,226,25)]) and.1438: bits[7] = and(f32_cast_fraction__1, sign_ext.1437, id=1438, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) nor.1652: bits[1] = nor(eq.1349, eq.1351, id=1652, pos=[(1,1721,31), (2,226,25)]) concat.1434: bits[2] = concat(eq.1351, eq.1349, id=1434, pos=[(1,1721,31), (2,226,25)]) concat.1487: bits[2] = concat(or.1500, nor.1654, id=1487, pos=[(1,1721,31), (2,226,25)]) literal.1612: bits[1] = literal(value=1, id=1612, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) literal.1635: bits[1] = literal(value=0, id=1635, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) bit_slice.1466: bits[1] = bit_slice(and.1438, start=6, width=1, id=1466, pos=[(1,1721,31), (2,226,25)]) bit_slice.1462: bits[6] = bit_slice(and.1438, start=0, width=6, id=1462, pos=[(1,1721,31), (2,226,25)]) sign_ext.1592: bits[6] = sign_ext(nor.1652, new_bit_count=6, id=1592, pos=[(1,1721,31), (2,226,25)]) x_bexp__1: bits[8] = priority_sel(concat.1434, cases=[EXPR_MASK, literal.1345], default=f32_cast_bexp__2, id=1435, pos=[(1,1721,31), (2,226,25)]) f32_sign__2: bits[1] = tuple_index(f32, index=0, id=1389, pos=[(1,1121,15), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) priority_sel.1467: bits[1] = priority_sel(concat.1487, cases=[literal.1612, literal.1635], default=bit_slice.1466, id=1467, pos=[(1,1721,31), (2,226,25)]) and.1593: bits[6] = and(bit_slice.1462, sign_ext.1592, id=1593, pos=[(1,1721,31), (2,226,25)]) ne.1510: bits[1] = ne(x_bexp__1, literal.1345, id=1510, pos=[(1,809,4), (1,1721,22), (2,226,25)]) not.1417: bits[1] = not(f32_sign__2, id=1417, pos=[(1,1721,31), (2,226,25)]) concat.1468: bits[7] = concat(priority_sel.1467, and.1593, id=1468, pos=[(1,1721,31), (2,226,25)]) sign_ext.1445: bits[7] = sign_ext(ne.1510, new_bit_count=7, id=1445, pos=[(1,809,4), (1,1721,22), (2,226,25)]) x_sign: bits[1] = nor(nor.1654, not.1417, id=1418, pos=[(1,1721,31), (2,226,25)]) and.1446: bits[7] = and(concat.1468, sign_ext.1445, id=1446, pos=[(1,809,4), (1,1721,22), (2,226,25)]) ret tuple.1402: (bits[1], bits[8], bits[7]) = tuple(x_sign, x_bexp__1, and.1446, id=1402, pos=[(1,809,4), (1,1721,22), (2,226,25)]) }