ieee754.fcvt.test package¶
Submodules¶
ieee754.fcvt.test.rangelimited module¶
creates fp numbers that are range-limited
to properly test FPtoFP (higher to lower) and FPtoINT (higher to lower) it’s no good having FP numbers that, statistically 99.99% of the time, are going to be converted to INF (max of the int or float).
therefore, numbers need to be specifically generated that have a high probability of being within the target range or just outside of it
-
ieee754.fcvt.test.rangelimited.
create_int
(fkls, intwid)¶ create a floating-point number to fit into an integer
-
ieee754.fcvt.test.rangelimited.
create_ranged_float
(fkls, mainwid, fracwid)¶ create a floating-point number
range: +/- twice the bit-range fractional part: to ensure that there’s plenty to play with
-
ieee754.fcvt.test.rangelimited.
create_ranged_fp16
(fkls)¶
-
ieee754.fcvt.test.rangelimited.
create_ranged_fp32
(fkls)¶
-
ieee754.fcvt.test.rangelimited.
create_ranged_min_fp16
(fkls)¶
-
ieee754.fcvt.test.rangelimited.
create_ranged_min_fp32
(fkls)¶
-
ieee754.fcvt.test.rangelimited.
create_ranged_min_normal_fp16
(fkls)¶
-
ieee754.fcvt.test.rangelimited.
create_ranged_min_normal_fp32
(fkls)¶
-
ieee754.fcvt.test.rangelimited.
create_ranged_target
(fkls, target, factor=500.0)¶ create a targetted floating-point number just within the min/max range, by +/- 0.5%
ieee754.fcvt.test.test_fcvt_f2int_pipe module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_64_to_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f16_i16
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f16_ui16
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f16_ui32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f32_i32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f32_ui32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f64_i16
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f64_i32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f64_i64
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f64_ui16
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f64_ui32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_f64_ui64
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_i16_f32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_i32_f32
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
fcvt_i32_f64
(x)¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f16_i16
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f16_ui16
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f32_i32
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f32_ui32
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f64_i16
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f64_i32
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f64_i64
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f64_ui16
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f64_ui32
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_f64_ui64
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_i16_f32
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_i32_f32
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_i32_f64
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_ui16_f64
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_ui32_f16
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_ui32_f64
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_ui64_f16
()¶
-
ieee754.fcvt.test.test_fcvt_f2int_pipe.
test_int_pipe_ui64_f32
()¶
ieee754.fcvt.test.test_fcvt_int_pipe module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_16
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_64
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_64_to_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_i16_f32
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_i32_f32
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
fcvt_i32_f64
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_i16_f32
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_i32_f32
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_i32_f64
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui16_f32
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui16_f64
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui32_f16
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui32_f32
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui32_f64
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui64_f16
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
test_int_pipe_ui64_f32
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
to_int16
(x)¶ input: an unsigned int in the range 0..65535 output: a signed int in the range -32768..32767
-
ieee754.fcvt.test.test_fcvt_int_pipe.
to_int32
(x)¶ input: an unsigned int in the range 0..2^32-1 output: a signed int in the range -2^31..2^31-1
-
ieee754.fcvt.test.test_fcvt_int_pipe.
to_uint16
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
to_uint32
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe.
to_uint64
(x)¶
ieee754.fcvt.test.test_fcvt_int_pipe_16_32 module¶
test of FPCVTIntMuxInOut.
this one still uses the run_pipe_fp infrastructure which assumes that it’s being passed FP input. it doesn’t make a heck of a lot of sense, but hey.
-
ieee754.fcvt.test.test_fcvt_int_pipe_16_32.
fcvt_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe_16_32.
fcvt_64
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe_16_32.
test_int_pipe_fp16_32
()¶
-
ieee754.fcvt.test.test_fcvt_int_pipe_16_32.
to_uint16
(x)¶
-
ieee754.fcvt.test.test_fcvt_int_pipe_16_32.
to_uint32
(x)¶
ieee754.fcvt.test.test_fcvt_pipe module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_pipe.
fcvt_16
(x)¶
-
ieee754.fcvt.test.test_fcvt_pipe.
fcvt_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_pipe.
test_down_pipe_fp32_16
()¶
-
ieee754.fcvt.test.test_fcvt_pipe.
test_down_pipe_fp64_16
()¶
-
ieee754.fcvt.test.test_fcvt_pipe.
test_down_pipe_fp64_32
()¶
ieee754.fcvt.test.test_fcvt_pipe_32_16 module¶
test of FPCVTMuxInOut
-
class
ieee754.fcvt.test.test_fcvt_pipe_32_16.
TestFClassPipe
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
test_pipe_fp32_16
()¶
-
-
ieee754.fcvt.test.test_fcvt_pipe_32_16.
fcvt_16
(x)¶
ieee754.fcvt.test.test_fcvt_pipe_64_16 module¶
test of FPCVTMuxInOut
-
class
ieee754.fcvt.test.test_fcvt_pipe_64_16.
TestFClassPipe
(methodName='runTest')¶ Bases:
unittest.case.TestCase
-
test_pipe_fp64_16
()¶
-
-
ieee754.fcvt.test.test_fcvt_pipe_64_16.
fcvt_16
(x)¶
ieee754.fcvt.test.test_fcvt_pipe_64_32 module¶
ieee754.fcvt.test.test_fcvt_pipe_close module¶
test of FPCVTMuxInOut
tests close to the limit of the target output
-
ieee754.fcvt.test.test_fcvt_pipe_close.
fcvt_16
(x)¶
-
ieee754.fcvt.test.test_fcvt_pipe_close.
fcvt_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_pipe_close.
test_down_pipe_fp32_16
()¶
-
ieee754.fcvt.test.test_fcvt_pipe_close.
test_down_pipe_fp64_16
()¶
-
ieee754.fcvt.test.test_fcvt_pipe_close.
test_down_pipe_fp64_32
()¶
ieee754.fcvt.test.test_fcvt_up_pipe module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_up_pipe.
fcvt_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_up_pipe.
fcvt_64
(x)¶
-
ieee754.fcvt.test.test_fcvt_up_pipe.
test_up_pipe_fp16_32
()¶
-
ieee754.fcvt.test.test_fcvt_up_pipe.
test_up_pipe_fp16_64
()¶
-
ieee754.fcvt.test.test_fcvt_up_pipe.
test_up_pipe_fp32_64
()¶
ieee754.fcvt.test.test_fcvt_up_pipe_16_32 module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_up_pipe_16_32.
fcvt_32
(x)¶
-
ieee754.fcvt.test.test_fcvt_up_pipe_16_32.
test_pipe_fp16_32
()¶
ieee754.fcvt.test.test_fcvt_up_pipe_16_64 module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_up_pipe_16_64.
fcvt_64
(x)¶
-
ieee754.fcvt.test.test_fcvt_up_pipe_16_64.
test_pipe_fp16_64
()¶
ieee754.fcvt.test.test_fcvt_up_pipe_32_64 module¶
test of FPCVTMuxInOut
-
ieee754.fcvt.test.test_fcvt_up_pipe_32_64.
fcvt_64
(x)¶
-
ieee754.fcvt.test.test_fcvt_up_pipe_32_64.
test_pipe_fp32_64
()¶