ieee754.fclass.test package

Submodules

ieee754.fclass.test.test_fclass_pipe module

test of FPClassMuxInOut

class ieee754.fclass.test.test_fclass_pipe.TestFClassPipe(methodName='runTest')

Bases: unittest.case.TestCase

test_class_pipe_f16()
test_class_pipe_f32()
test_class_pipe_f64()
class ieee754.fclass.test.test_fclass_pipe.TestFClassPipeCoverage(methodName='runTest')

Bases: unittest.case.TestCase

test_pipe_class_f16()
test_pipe_class_f32()
test_pipe_class_f64()
ieee754.fclass.test.test_fclass_pipe.fclass(wid, x)

analyses the FP number and returns a RISC-V “FCLASS” unary bitfield

this is easy to understand however it has redundant checks (which don’t matter because performance of testing is not hardware-critical) see FPClassMod for a hardware-optimal (hard-to-read) version

ieee754.fclass.test.test_fclass_pipe.fclass_16(x)
ieee754.fclass.test.test_fclass_pipe.fclass_32(x)
ieee754.fclass.test.test_fclass_pipe.fclass_64(x)

Module contents