from sfpy import Float64, Float32, Float16
+import unittest
+
def fcvt_16(x):
return Float16(x)
from sfpy import Float32, Float16
+import unittest
+
def fcvt_16(x):
return Float16(x)
-def test_pipe_fp32_16():
- dut = FPCVTDownMuxInOut(32, 16, 4)
- run_pipe_fp(dut, 32, "fcvt", unit_test_single, Float32,
- regressions, fcvt_16, 100, True)
+class TestFClassPipe(unittest.TestCase):
+ def test_pipe_fp32_16(self):
+ dut = FPCVTDownMuxInOut(32, 16, 4)
+ run_pipe_fp(dut, 32, "fcvt", unit_test_single, Float32,
+ regressions, fcvt_16, 100, True)
if __name__ == '__main__':
- test_pipe_fp32_16()
+ unittest.main()
from sfpy import Float64, Float16
+import unittest
+
def fcvt_16(x):
return Float16(x)
-def test_pipe_fp64_16():
- dut = FPCVTDownMuxInOut(64, 16, 4)
- run_pipe_fp(dut, 64, "fcvt", unit_test_single, Float64,
- regressions, fcvt_16, 100, True)
+class TestFClassPipe(unittest.TestCase):
+ def test_pipe_fp64_16(self):
+ dut = FPCVTDownMuxInOut(64, 16, 4)
+ run_pipe_fp(dut, 64, "fcvt", unit_test_single, Float64,
+ regressions, fcvt_16, 100, True)
if __name__ == '__main__':
- test_pipe_fp64_16()
+ unittest.main()
from sfpy import Float64, Float32
+import unittest
+
def fcvt_32(x):
return Float32(x)
-def test_pipe_fp64_32():
- dut = FPCVTMuxInOut(64, 32, 4)
- run_pipe_fp(dut, 64, "fcvt", unit_test_single, Float64,
- regressions, fcvt_32, 100, True)
+class TestFClassPipe(unittest.TestCase):
+ def test_pipe_fp64_32(self):
+ dut = FPCVTMuxInOut(64, 32, 4)
+ run_pipe_fp(dut, 64, "fcvt", unit_test_single, Float64,
+ regressions, fcvt_32, 100, True)
if __name__ == '__main__':
- test_pipe_fp64_32()
+ unittest.main()