1 """ test of FPDIVMuxInOut
4 from ieee754
.fpdiv
.pipeline
import FPDIVMuxInOut
5 from ieee754
.fpcommon
.test
.fpmux
import runfp
6 from ieee754
.div_rem_sqrt_rsqrt
.core
import DivPipeCoreOperation
9 from sfpy
import Float64
, Float32
, Float16
16 class TestDivPipe(unittest
.TestCase
):
17 # FIXME: AttributeError: 'PrevControl' object has no attribute 'valid_i'
18 @unittest.expectedFailure
19 def test_pipe_sqrt_fp16(self
):
20 dut
= FPDIVMuxInOut(16, 4)
21 # don't forget to initialize opcode; don't use magic numbers
22 opcode
= int(DivPipeCoreOperation
.SqrtRem
)
23 runfp(dut
, 16, "test_fpsqrt_pipe_fp16", Float16
, sqrt
,
24 single_op
=True, opcode
=opcode
, n_vals
=100)
26 # FIXME: AttributeError: 'PrevControl' object has no attribute 'valid_i'
27 @unittest.expectedFailure
28 def test_pipe_sqrt_fp32(self
):
29 dut
= FPDIVMuxInOut(32, 4)
30 # don't forget to initialize opcode; don't use magic numbers
31 opcode
= int(DivPipeCoreOperation
.SqrtRem
)
32 runfp(dut
, 32, "test_fpsqrt_pipe_fp32", Float32
, sqrt
,
33 single_op
=True, opcode
=opcode
, n_vals
=100)
35 # FIXME: AttributeError: 'PrevControl' object has no attribute 'valid_i'
36 @unittest.expectedFailure
37 def test_pipe_sqrt_fp64(self
):
38 dut
= FPDIVMuxInOut(64, 4)
39 # don't forget to initialize opcode; don't use magic numbers
40 opcode
= int(DivPipeCoreOperation
.SqrtRem
)
41 runfp(dut
, 64, "test_fpsqrt_pipe_fp64", Float64
, sqrt
,
42 single_op
=True, opcode
=opcode
, n_vals
=100)
45 if __name__
== '__main__':