From: Luke Kenneth Casson Leighton Date: Sun, 28 Jul 2019 19:27:42 +0000 (+0100) Subject: add F2Int f64 i64 test X-Git-Tag: ls180-24jan2020~693 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1c1f03fa5fd227bbc6673d0e9ea4ab1ae10da829;p=ieee754fpu.git add F2Int f64 i64 test --- diff --git a/src/ieee754/fcvt/test/test_fcvt_f2int_pipe.py b/src/ieee754/fcvt/test/test_fcvt_f2int_pipe.py index dc48b402..bac4824d 100644 --- a/src/ieee754/fcvt/test/test_fcvt_f2int_pipe.py +++ b/src/ieee754/fcvt/test/test_fcvt_f2int_pipe.py @@ -48,6 +48,9 @@ def fcvt_f16_i16(x): def fcvt_f32_i32(x): return sfpy.float.f32_to_i32(x) & 0xffffffff +def fcvt_f64_i64(x): + return sfpy.float.f64_to_i64(x) & 0xffffffffffffffff + ###################### # signed int to fp @@ -70,6 +73,11 @@ def test_int_pipe_i32_f32(): runfp(dut, 32, "test_fcvt_int_pipe_i32_f32", to_int32, fcvt_i32_f32, True, n_vals=100, opcode=0x1) +def test_int_pipe_f64_i64(): + dut = FPCVTF2IntMuxInOut(64, 64, 4, op_wid=1) + runfp(dut, 64, "test_fcvt_f2int_pipe_f64_i64", Float64, fcvt_f64_i64, + True, n_vals=100, opcode=0x1) + def test_int_pipe_f32_i32(): dut = FPCVTF2IntMuxInOut(32, 32, 4, op_wid=1) runfp(dut, 32, "test_fcvt_f2int_pipe_f32_i32", Float32, fcvt_f32_i32, @@ -139,6 +147,7 @@ if __name__ == '__main__': for i in range(200): test_int_pipe_f16_i16() test_int_pipe_f32_i32() + test_int_pipe_f64_i64() continue test_int_pipe_f64_ui64() test_int_pipe_f32_ui32()