URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [test-code-or1k/] [testfloat/] [README] - Rev 233
Compare with Previous | Blame | View Log
TestFloat software tests for floating point operationsFrom http://www.jhauser.us/arithmetic/TestFloat.htmlTestFloat is a program for testing whether a computer's floating-pointconforms to the IEC/IEEE Standard for Binary Floating-point Arithmetic.TestFloat works by comparing the behavior of the machine's floating-pointwith that of the SoftFloat software implementation of floating-point.At present only the single precision floating point capability of the softwareis used to test the OpenRISC's FPU.The main loop of the applications in TestFloat have been modified so they donot rely on input when executed, rather are hard-coded to run all the teststhey possibly can.All of the output functions (fputs, putc, fprintf) have been replaced withversions available in the OR1K support C library.The software included here also includes the SoftFloat library, which isis required to test the hardware FPU.See http://www.jhauser.us/arithmetic/SoftFloat.html for more information onSoftFloat.The or1ksim simulator actually implements its single precision floating pointusing functions from SoftFloat (see the softfloat/ path in the or1ksim project)so potentially any non-standard behavior of the floating point unit in or1ksimwill not be picked up by this test (as TestFloat uses SoftFloat itself to checkagainst the hardware/system results.) However, TestFloat comes with a differentimplementation of the IEEE 754 compliant conversion and arithmetic functions totest SoftFloat against, hopefully picking up any inconsistencies that exist.Note that the bits64 version of SoftFloat's library is included here. It isnot a problem for all of the current OR1K GCC implementations to handle 64-bitdata types.The file layout of SoftFloat and TestFloat, in their distributions, has beendiscarded and all the required files have been included in this path.testfloat is run during the standard check that can be run after compilation.By default only the testfloat program will be run (not testsoftfloat).testsoftfloat will, actually, be compiled and be undertestsuite/test-code-or1k/testfloat and can be run from where if desired.Julius Baxter, August 3 2010
