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=1335, pos=[(1,1327,30), (1,1383,33), (1,1416,45), (1,1721,31), (2,226,25)]) bit_slice.1336: bits[15] = bit_slice(f32_fraction__1, start=0, width=15, id=1336, pos=[(1,1327,30), (1,1383,33), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1337: bits[15] = literal(value=0, id=1337, pos=[(0,1412,19), (0,1502,17), (0,1529,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=1342, 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.1336, literal.1337, id=1343, pos=[(0,1502,17), (0,1529,22), (1,421,43), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) bit_slice.1344: bits[1] = bit_slice(f32_fraction__1, start=16, width=1, id=1344, pos=[(1,419,57), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and.1348: bits[1] = and(round_bit, sticky, id=1348, pos=[(1,428,13), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and.1349: bits[1] = and(round_bit, bit_slice.1344, id=1349, 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=1350, pos=[(1,1111,39), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) round_up: bits[1] = or(and.1348, and.1349, id=1353, pos=[(1,428,13), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and_reduce.1354: bits[1] = and_reduce(truncated_fraction, id=1354, pos=[(1,1115,44), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1557: bits[7] = literal(value=0, id=1557) renormalize: bits[1] = and(round_up, and_reduce.1354, id=1362, 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=1338, pos=[(1,40,22), (1,1407,13), (1,1721,31), (2,226,25)]) literal.1341: bits[8] = literal(value=0, id=1341, pos=[(1,41,9), (1,1407,13), (1,1721,31), (2,226,25)]) concat.1596: bits[8] = concat(literal.1557, renormalize, id=1596) eq.1347: bits[1] = eq(f32_bexp__2, literal.1341, id=1347, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) literal.1340: bits[23] = literal(value=0, id=1340, pos=[(1,43,20), (1,1407,13), (1,1721,31), (2,226,25)]) EXPR_MASK: bits[8] = literal(value=255, id=1339, pos=[(1,39,36), (1,1407,13), (1,1721,31), (2,226,25)]) literal.1563: bits[6] = literal(value=0, id=1563) f32_cast_bexp__2: bits[8] = add(f32_bexp__2, concat.1596, id=1418) not.1645: bits[1] = not(eq.1347, id=1645, pos=[(1,1721,31), (2,226,25)]) eq.1346: bits[1] = eq(f32_fraction__1, literal.1340, id=1346, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) eq.1345: bits[1] = eq(f32_bexp__2, EXPR_MASK, id=1345, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) concat.1597: bits[7] = concat(literal.1563, round_up, id=1597) ne.1507: bits[1] = ne(f32_cast_bexp__2, EXPR_MASK, id=1507, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) nor.1646: bits[1] = nor(not.1645, eq.1346, id=1646, pos=[(1,1721,31), (2,226,25)]) and.1352: bits[1] = and(eq.1347, eq.1346, id=1352, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) and.1351: bits[1] = and(eq.1345, eq.1346, id=1351, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) not.1643: bits[1] = not(eq.1345, id=1643, pos=[(1,1721,31), (2,226,25)]) f32_cast_fraction__1: bits[7] = add(truncated_fraction, concat.1597, id=1421) sign_ext.1433: bits[7] = sign_ext(ne.1507, new_bit_count=7, id=1433, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) or.1496: bits[1] = or(nor.1646, and.1352, and.1351, id=1496, pos=[(1,1721,31), (2,226,25)]) nor.1650: bits[1] = nor(not.1643, eq.1346, id=1650, pos=[(1,1721,31), (2,226,25)]) and.1434: bits[7] = and(f32_cast_fraction__1, sign_ext.1433, id=1434, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) nor.1648: bits[1] = nor(eq.1345, eq.1347, id=1648, pos=[(1,1721,31), (2,226,25)]) concat.1430: bits[2] = concat(eq.1347, eq.1345, id=1430, pos=[(1,1721,31), (2,226,25)]) concat.1483: bits[2] = concat(or.1496, nor.1650, id=1483, pos=[(1,1721,31), (2,226,25)]) literal.1608: bits[1] = literal(value=1, id=1608, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) literal.1631: bits[1] = literal(value=0, id=1631, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) bit_slice.1462: bits[1] = bit_slice(and.1434, start=6, width=1, id=1462, pos=[(1,1721,31), (2,226,25)]) bit_slice.1458: bits[6] = bit_slice(and.1434, start=0, width=6, id=1458, pos=[(1,1721,31), (2,226,25)]) sign_ext.1588: bits[6] = sign_ext(nor.1648, new_bit_count=6, id=1588, pos=[(1,1721,31), (2,226,25)]) x_bexp__1: bits[8] = priority_sel(concat.1430, cases=[EXPR_MASK, literal.1341], default=f32_cast_bexp__2, id=1431, pos=[(1,1721,31), (2,226,25)]) f32_sign__2: bits[1] = tuple_index(f32, index=0, id=1385, pos=[(1,1121,15), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) priority_sel.1463: bits[1] = priority_sel(concat.1483, cases=[literal.1608, literal.1631], default=bit_slice.1462, id=1463, pos=[(1,1721,31), (2,226,25)]) and.1589: bits[6] = and(bit_slice.1458, sign_ext.1588, id=1589, pos=[(1,1721,31), (2,226,25)]) ne.1506: bits[1] = ne(x_bexp__1, literal.1341, id=1506, pos=[(1,809,4), (1,1721,22), (2,226,25)]) not.1413: bits[1] = not(f32_sign__2, id=1413, pos=[(1,1721,31), (2,226,25)]) concat.1464: bits[7] = concat(priority_sel.1463, and.1589, id=1464, pos=[(1,1721,31), (2,226,25)]) sign_ext.1441: bits[7] = sign_ext(ne.1506, new_bit_count=7, id=1441, pos=[(1,809,4), (1,1721,22), (2,226,25)]) x_sign: bits[1] = nor(nor.1650, not.1413, id=1414, pos=[(1,1721,31), (2,226,25)]) and.1442: bits[7] = and(concat.1464, sign_ext.1441, id=1442, pos=[(1,809,4), (1,1721,22), (2,226,25)]) ret tuple.1398: (bits[1], bits[8], bits[7]) = tuple(x_sign, x_bexp__1, and.1442, id=1398, pos=[(1,809,4), (1,1721,22), (2,226,25)]) }