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" fn __std__mask_bits__8() -> bits[8] { literal.2: bits[8] = literal(value=0, id=2, pos=[(0,835,41)]) X: bits[32] = literal(value=8, id=1, pos=[(0,835,17)]) ret not.3: bits[8] = not(literal.2, id=3, pos=[(0,835,40)]) } fn __apfloat__inf__8_7(sign: bits[1] id=4) -> (bits[1], bits[8], bits[7]) { invoke.7: bits[8] = invoke(to_apply=__std__mask_bits__8, id=7, pos=[(1,78,28)]) literal.8: bits[7] = literal(value=0, id=8, pos=[(1,79,18)]) EXP_SZ: bits[32] = literal(value=8, id=5, pos=[(1,75,11)]) FRACTION_SZ: bits[32] = literal(value=7, id=6, pos=[(1,75,24)]) ret tuple.9: (bits[1], bits[8], bits[7]) = tuple(sign, invoke.7, literal.8, id=9, pos=[(1,76,33)]) } fn __bfloat16__inf(sign: bits[1] id=10) -> (bits[1], bits[8], bits[7]) { ret invoke.11: (bits[1], bits[8], bits[7]) = invoke(sign, to_apply=__apfloat__inf__8_7, id=11, pos=[(2,26,43)]) } top fn __bfloat16__increment_fraction(input: (bits[1], bits[8], bits[7]) id=12) -> (bits[1], bits[8], bits[7]) { input_fraction: bits[7] = tuple_index(input, index=2, id=14, pos=[(2,117,39)]) literal.13: bits[9] = literal(value=128, id=13, pos=[(2,117,23)]) zero_ext.15: bits[9] = zero_ext(input_fraction, new_bit_count=9, id=15) add.16: bits[9] = add(literal.13, zero_ext.15, id=16, pos=[(2,117,23)]) literal.17: bits[9] = literal(value=1, id=17, pos=[(2,117,58)]) new_fraction: bits[9] = add(add.16, literal.17, id=18, pos=[(2,117,23)]) literal.19: bits[9] = literal(value=8, id=19, pos=[(2,118,40)]) input_bexp: bits[8] = tuple_index(input, index=1, id=21, pos=[(2,119,34)]) literal.22: bits[8] = literal(value=254, id=22, pos=[(2,119,43)]) new_fraction_msb: bits[1] = dynamic_bit_slice(new_fraction, literal.19, width=1, id=20, pos=[(2,118,39)]) uge.23: bits[1] = uge(input_bexp, literal.22, id=23, pos=[(2,119,34)]) tuple.24: (bits[1], bits[1]) = tuple(new_fraction_msb, uge.23, id=24, pos=[(2,119,10)]) literal.38: bits[1] = literal(value=1, id=38, pos=[(2,123,9)]) tuple_index.37: bits[1] = tuple_index(tuple.24, index=0, id=37) literal.27: bits[1] = literal(value=1, id=27, pos=[(2,121,9)]) tuple_index.26: bits[1] = tuple_index(tuple.24, index=0, id=26) literal.36: bits[1] = literal(value=1, id=36) eq.39: bits[1] = eq(literal.38, tuple_index.37, id=39) literal.42: bits[1] = literal(value=0, id=42, pos=[(2,123,15)]) tuple_index.41: bits[1] = tuple_index(tuple.24, index=1, id=41) literal.25: bits[1] = literal(value=1, id=25) eq.28: bits[1] = eq(literal.27, tuple_index.26, id=28) literal.31: bits[1] = literal(value=1, id=31, pos=[(2,121,15)]) tuple_index.30: bits[1] = tuple_index(tuple.24, index=1, id=30) and.40: bits[1] = and(literal.36, eq.39, id=40) eq.43: bits[1] = eq(literal.42, tuple_index.41, id=43) and.29: bits[1] = and(literal.25, eq.28, id=29) eq.32: bits[1] = eq(literal.31, tuple_index.30, id=32) input_bexp__1: bits[8] = tuple_index(input, index=1, id=46, pos=[(2,125,23)]) literal.47: bits[8] = literal(value=1, id=47, pos=[(2,125,31)]) literal.49: bits[9] = literal(value=1, id=49, pos=[(2,126,35)]) literal.52: bits[1] = literal(value=1, id=52) literal.54: bits[1] = literal(value=1, id=54, pos=[(2,129,9)]) and.44: bits[1] = and(and.40, eq.43, id=44) and.33: bits[1] = and(and.29, eq.32, id=33) input_sign: bits[1] = tuple_index(input, index=0, id=34, pos=[(2,121,33)]) input_sign__1: bits[1] = tuple_index(input, index=0, id=45, pos=[(2,124,23)]) add.48: bits[8] = add(input_bexp__1, literal.47, id=48, pos=[(2,125,23)]) dynamic_bit_slice.50: bits[7] = dynamic_bit_slice(new_fraction, literal.49, width=7, id=50, pos=[(2,126,34)]) input_sign__2: bits[1] = tuple_index(input, index=0, id=59, pos=[(2,129,36)]) input_bexp__2: bits[8] = tuple_index(input, index=1, id=60, pos=[(2,129,54)]) bit_slice.61: bits[7] = bit_slice(new_fraction, start=0, width=7, id=61, pos=[(2,129,83)]) and.55: bits[1] = and(literal.52, literal.54, id=55) literal.57: bits[1] = literal(value=1, id=57, pos=[(2,129,12)]) concat.63: bits[2] = concat(and.44, and.33, id=63) invoke.35: (bits[1], bits[8], bits[7]) = invoke(input_sign, to_apply=__bfloat16__inf, id=35, pos=[(2,121,27)]) tuple.51: (bits[1], bits[8], bits[7]) = tuple(input_sign__1, add.48, dynamic_bit_slice.50, id=51, pos=[(2,123,30)]) tuple.62: (bits[1], bits[8], bits[7]) = tuple(input_sign__2, input_bexp__2, bit_slice.61, id=62, pos=[(2,129,23)]) tuple_index.53: bits[1] = tuple_index(tuple.24, index=0, id=53) tuple_index.56: bits[1] = tuple_index(tuple.24, index=1, id=56) and.58: bits[1] = and(and.55, literal.57, id=58) ret priority_sel.64: (bits[1], bits[8], bits[7]) = priority_sel(concat.63, cases=[invoke.35, tuple.51], default=tuple.62, id=64) }