sys.path.append("..") from ip_generator.pipeliner import Input, Output, Component from ip_generator.float import single_to_float, float_to_single from ip_generator.float import double_to_float, float_to_double import ip_generator.float import ip_generator.pipeliner #add add = Component() Output(add, 'add_z', float_to_single( single_to_float(Input(add, 32, 'add_a')) + single_to_float(Input(add, 32, 'add_b')) ) ) #add double_add = Component() Output(double_add, 'double_add_z', float_to_double( double_to_float(Input(double_add, 64, 'double_add_a')) + double_to_float(Input(double_add, 64, 'double_add_b')) ) )
import sys sys.path.append("..") from ip_generator.pipeliner import Input, Output, Component from ip_generator.float import single_to_float, float_to_single from ip_generator.float import double_to_float, float_to_double import ip_generator.float import ip_generator.pipeliner #divider div = Component() Output( div, 'div_z', float_to_single( single_to_float(Input(div, 32, 'div_a')) / single_to_float(Input(div, 32, 'div_b')))) #div double_div = Component() Output( double_div, 'double_div_z', float_to_double( double_to_float(Input(double_div, 64, 'double_div_a')) / double_to_float(Input(double_div, 64, 'double_div_b'))))
Input(int_to_single, 32, 'int_to_single_a')))) #unsigned_to_float unsigned_int_to_single = Component() Output( unsigned_int_to_single, 'unsigned_int_to_single_z', float_to_single( ip_generator.float.unsigned_to_float( Input(unsigned_int_to_single, 32, 'unsigned_int_to_single_a')))) #div double_div = Component() Output( double_div, 'double_div_z', float_to_double( double_to_float(Input(double_div, 64, 'double_div_a')) / double_to_float(Input(double_div, 64, 'double_div_b')))) #mul double_mul = Component() Output( double_mul, 'double_mul_z', float_to_double( double_to_float(Input(double_mul, 64, 'double_mul_a')).__mul__( double_to_float(Input(double_mul, 64, 'double_mul_b')), double_mul))) #add double_add = Component() Output( double_add, 'double_add_z',
import sys sys.path.append("..") from ip_generator.pipeliner import Input, Output, Component from ip_generator.float import single_to_float, float_to_single from ip_generator.float import double_to_float, float_to_double import ip_generator.float import ip_generator.pipeliner #mul mul = Component() Output( mul, 'mul_z', float_to_single( single_to_float(Input(mul, 32, 'mul_a')).__mul__( single_to_float(Input(mul, 32, 'mul_b')), mul))) #mul double_mul = Component() Output( double_mul, 'double_mul_z', float_to_double( double_to_float(Input(double_mul, 64, 'double_mul_a')).__mul__( double_to_float(Input(double_mul, 64, 'double_mul_b')), double_mul)))