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=1344, pos=[(1,1327,30), (1,1383,33), (1,1416,45), (1,1721,31), (2,226,25)]) bit_slice.1345: bits[15] = bit_slice(f32_fraction__1, start=0, width=15, id=1345, pos=[(1,1327,30), (1,1383,33), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1346: bits[15] = literal(value=0, id=1346, pos=[(0,1411,19), (0,1501,17), (0,1528,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=1351, 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.1345, literal.1346, id=1352, pos=[(0,1501,17), (0,1528,22), (1,421,43), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) bit_slice.1353: bits[1] = bit_slice(f32_fraction__1, start=16, width=1, id=1353, pos=[(1,419,57), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and.1357: bits[1] = and(round_bit, sticky, id=1357, pos=[(1,428,13), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and.1358: bits[1] = and(round_bit, bit_slice.1353, id=1358, 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=1359, pos=[(1,1111,39), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) round_up: bits[1] = or(and.1357, and.1358, id=1362, pos=[(1,428,13), (1,1113,36), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) and_reduce.1363: bits[1] = and_reduce(truncated_fraction, id=1363, pos=[(1,1115,44), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1566: bits[7] = literal(value=0, id=1566) renormalize: bits[1] = and(round_up, and_reduce.1363, id=1371, 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=1347, pos=[(1,40,22), (1,1407,13), (1,1721,31), (2,226,25)]) literal.1350: bits[8] = literal(value=0, id=1350, pos=[(1,41,9), (1,1407,13), (1,1721,31), (2,226,25)]) concat.1605: bits[8] = concat(literal.1566, renormalize, id=1605) eq.1356: bits[1] = eq(f32_bexp__2, literal.1350, id=1356, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) literal.1349: bits[23] = literal(value=0, id=1349, pos=[(1,41,23), (1,1407,13), (1,1721,31), (2,226,25)]) INF_EXP: bits[8] = literal(value=255, id=1348, pos=[(1,1370,43), (1,1416,45), (1,1721,31), (2,226,25)]) literal.1486: bits[6] = literal(value=0, id=1486, pos=[(1,1721,31), (2,226,25)]) f32_cast_bexp__2: bits[8] = add(f32_bexp__2, concat.1605, id=1427) not.1654: bits[1] = not(eq.1356, id=1654, pos=[(1,1721,31), (2,226,25)]) eq.1355: bits[1] = eq(f32_fraction__1, literal.1349, id=1355, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) eq.1354: bits[1] = eq(f32_bexp__2, INF_EXP, id=1354, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) concat.1606: bits[7] = concat(literal.1486, round_up, id=1606) ne.1516: bits[1] = ne(f32_cast_bexp__2, INF_EXP, id=1516, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) nor.1655: bits[1] = nor(not.1654, eq.1355, id=1655, pos=[(1,1721,31), (2,226,25)]) and.1361: bits[1] = and(eq.1356, eq.1355, id=1361, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) and.1360: bits[1] = and(eq.1354, eq.1355, id=1360, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) not.1652: bits[1] = not(eq.1354, id=1652, pos=[(1,1721,31), (2,226,25)]) f32_cast_fraction__1: bits[7] = add(truncated_fraction, concat.1606, id=1430) sign_ext.1442: bits[7] = sign_ext(ne.1516, new_bit_count=7, id=1442, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) or.1505: bits[1] = or(nor.1655, and.1361, and.1360, id=1505, pos=[(1,1721,31), (2,226,25)]) nor.1659: bits[1] = nor(not.1652, eq.1355, id=1659, pos=[(1,1721,31), (2,226,25)]) and.1443: bits[7] = and(f32_cast_fraction__1, sign_ext.1442, id=1443, pos=[(1,1373,4), (1,1416,45), (1,1721,31), (2,226,25)]) nor.1657: bits[1] = nor(eq.1354, eq.1356, id=1657, pos=[(1,1721,31), (2,226,25)]) concat.1439: bits[2] = concat(eq.1356, eq.1354, id=1439, pos=[(1,1721,31), (2,226,25)]) concat.1492: bits[2] = concat(or.1505, nor.1659, id=1492, pos=[(1,1721,31), (2,226,25)]) literal.1478: bits[1] = literal(value=1, id=1478, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) literal.1474: bits[1] = literal(value=0, id=1474, pos=[(1,1407,13), (1,1721,31), (2,226,25)]) bit_slice.1471: bits[1] = bit_slice(and.1443, start=6, width=1, id=1471, pos=[(1,1721,31), (2,226,25)]) bit_slice.1467: bits[6] = bit_slice(and.1443, start=0, width=6, id=1467, pos=[(1,1721,31), (2,226,25)]) sign_ext.1597: bits[6] = sign_ext(nor.1657, new_bit_count=6, id=1597, pos=[(1,1721,31), (2,226,25)]) x_bexp__1: bits[8] = priority_sel(concat.1439, cases=[INF_EXP, literal.1350], default=f32_cast_bexp__2, id=1440, pos=[(1,1721,31), (2,226,25)]) f32_sign__2: bits[1] = tuple_index(f32, index=0, id=1394, pos=[(1,1121,15), (1,1366,27), (1,1416,45), (1,1721,31), (2,226,25)]) priority_sel.1472: bits[1] = priority_sel(concat.1492, cases=[literal.1478, literal.1474], default=bit_slice.1471, id=1472, pos=[(1,1721,31), (2,226,25)]) and.1598: bits[6] = and(bit_slice.1467, sign_ext.1597, id=1598, pos=[(1,1721,31), (2,226,25)]) ne.1515: bits[1] = ne(x_bexp__1, literal.1350, id=1515, pos=[(1,809,4), (1,1721,22), (2,226,25)]) not.1422: bits[1] = not(f32_sign__2, id=1422, pos=[(1,1721,31), (2,226,25)]) concat.1473: bits[7] = concat(priority_sel.1472, and.1598, id=1473, pos=[(1,1721,31), (2,226,25)]) sign_ext.1450: bits[7] = sign_ext(ne.1515, new_bit_count=7, id=1450, pos=[(1,809,4), (1,1721,22), (2,226,25)]) x_sign: bits[1] = nor(nor.1659, not.1422, id=1423, pos=[(1,1721,31), (2,226,25)]) and.1451: bits[7] = and(concat.1473, sign_ext.1450, id=1451, pos=[(1,809,4), (1,1721,22), (2,226,25)]) ret tuple.1407: (bits[1], bits[8], bits[7]) = tuple(x_sign, x_bexp__1, and.1451, id=1407, pos=[(1,809,4), (1,1721,22), (2,226,25)]) }