+def fclass_32(x):
+ return fclass(32, x)
+
+
+def fclass_64(x):
+ return fclass(64, x)
+
+
+class TestFClassPipe(unittest.TestCase):
+ def test_class_pipe_f16(self):
+ dut = FPClassMuxInOut(16, 16, 4, op_wid=1)
+ runfp(dut, 16, "test_fclass_pipe_f16", Float16, fclass_16,
+ True, n_vals=100)
+
+ def test_class_pipe_f32(self):
+ dut = FPClassMuxInOut(32, 32, 4, op_wid=1)
+ runfp(dut, 32, "test_fclass_pipe_f32", Float32, fclass_32,
+ True, n_vals=100)
+
+ def test_class_pipe_f64(self):
+ dut = FPClassMuxInOut(64, 64, 4, op_wid=1)
+ runfp(dut, 64, "test_fclass_pipe_f64", Float64, fclass_64,
+ True, n_vals=100)
+
+
+class TestFClassPipeCoverage(unittest.TestCase):
+ def test_pipe_class_f16(self):
+ dut = FPClassMuxInOut(16, 16, 4, op_wid=1)
+ run_pipe_fp(dut, 16, "fclass16", unit_test_half, Float16, None,
+ fclass_16, 100, single_op=True)
+
+ def test_pipe_class_f32(self):
+ dut = FPClassMuxInOut(32, 32, 4, op_wid=1)
+ run_pipe_fp(dut, 32, "fclass32", unit_test_half, Float32, None,
+ fclass_32, 100, single_op=True)
+
+ def test_pipe_class_f64(self):
+ dut = FPClassMuxInOut(64, 64, 4, op_wid=1)
+ run_pipe_fp(dut, 64, "fclass64", unit_test_half, Float64, None,
+ fclass_64, 100, single_op=True)