From 6b159629243d260e3fea363a75a2a6272bbe3bf2 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Fri, 28 Jun 2019 06:29:33 +0100 Subject: [PATCH] add cookie-cut test_fpdiv_pipe.py --- src/ieee754/fpdiv/test/test_fpdiv_pipe.py | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/ieee754/fpdiv/test/test_fpdiv_pipe.py diff --git a/src/ieee754/fpdiv/test/test_fpdiv_pipe.py b/src/ieee754/fpdiv/test/test_fpdiv_pipe.py new file mode 100644 index 00000000..7f0e120a --- /dev/null +++ b/src/ieee754/fpdiv/test/test_fpdiv_pipe.py @@ -0,0 +1,25 @@ +""" test of FPDIVMuxInOut +""" + +from ieee754.fpdiv.pipeline import (FPDIVMuxInOut,) +from ieee754.fpcommon.test.fpmux import runfp + +from sfpy import Float64, Float32, Float16 +from operator import div + +def test_pipe_fp16(): + dut = FPDIVMuxInOut(16, 4) + runfp(dut, 16, "test_fpdiv_pipe_fp16", Float16, div) + +def test_pipe_fp32(): + dut = FPDIVMuxInOut(32, 4) + runfp(dut, 32, "test_fpdiv_pipe_fp32", Float32, div) + +def test_pipe_fp64(): + dut = FPDIVMuxInOut(64, 4) + runfp(dut, 64, "test_fpdiv_pipe_fp64", Float64, div) + +if __name__ == '__main__': + test_pipe_fp16() + test_pipe_fp32() + test_pipe_fp64() -- 2.30.2