674daa35452cd2e99e8706ea35a019b660e0cb4e
1 """ test of FPCVTIntMuxInOut.
3 this one still uses the run_pipe_fp infrastructure which assumes
4 that it's being passed FP input. it doesn't make a heck of a lot
8 from ieee754
.fcvt
.pipeline
import FPCVTIntMuxInOut
9 from ieee754
.fpcommon
.test
.case_gen
import run_pipe_fp
10 from ieee754
.fpcommon
.test
import unit_test_half
11 from ieee754
.fcvt
.test
.up_fcvt_data_16_32
import regressions
14 from sfpy
import Float64
, Float32
, Float16
26 return sfpy
.float.ui32_to_f64(x
)
30 return sfpy
.float.ui32_to_f32(x
)
33 def test_int_pipe_fp16_32():
34 dut
= FPCVTIntMuxInOut(16, 32, 4)
35 run_pipe_fp(dut
, 16, "int_16_32", unit_test_half
, to_uint16
,
36 regressions
, fcvt_32
, 100, True)
39 if __name__
== '__main__':
41 test_int_pipe_fp16_32()