OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [or1ksim/] [testsuite/] [or1ksim.tests/] [fp.exp] - Diff between revs 104 and 233

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 104 Rev 233
Line 1... Line 1...
# fp.exp. Floating point tests using DejaGNU under automake
# fp.exp. Floating point tests using DejaGNU under automake
 
 
# Copyright (C) 2010 Embecosm Limited
# Copyright (C) 2010 Embecosm Limited
 
# Copyright (C) 2010 ORSoC AB
 
 
# Contributor Jeremy Bennett 
# Contributor Julius Baxter 
 
 
# This file is part of OpenRISC 1000 Architectural Simulator.
# This file is part of OpenRISC 1000 Architectural Simulator.
 
 
# This program is free software; you can redistribute it and/or modify it
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the Free
# under the terms of the GNU General Public License as published by the Free
Line 22... Line 23...
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# This code is commented throughout for use with Doxygen.
# This code is commented throughout for use with Doxygen.
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
 
 
 
 
# Run the Frame buffer test
# Run the floating point test
run_or1ksim "fp"                  \
run_or1ksim "fp"                  \
    [list "!lf.add.s" \
    [list "!lf.add.s" \
          "   1.0 +  0.0  =  1.0:  OK" \
          "   1.0 +  0.0  =  1.0:  OK" \
          "   1.0 + -0.0  =  1.0:  OK" \
          "   1.0 + -0.0  =  1.0:  OK" \
          "   1.0 +  1.0  =  2.0:  OK" \
          "   1.0 +  1.0  =  2.0:  OK" \
Line 47... Line 48...
          "  -NaN + -NaN  = -NaN:  OK" \
          "  -NaN + -NaN  = -NaN:  OK" \
          "   1.0 + +sNaN = +qNaN: OK" \
          "   1.0 + +sNaN = +qNaN: OK" \
          "   1.0 + -sNaN = -qNaN: OK" \
          "   1.0 + -sNaN = -qNaN: OK" \
          "   1.0 * 2^127 +  1.0 * 2^127  = +inf:  OK" \
          "   1.0 * 2^127 +  1.0 * 2^127  = +inf:  OK" \
          "  -1.0 * 2^127 + -1.0 * 2^127  = -inf:  OK" \
          "  -1.0 * 2^127 + -1.0 * 2^127  = -inf:  OK" \
          "!lf.cust1.s" \
         "lf.cust1.s" \
          "  l.cust1: OK" \
          "  l.cust1: OK" \
          "!lf.div.s" \
         "lf.div.s" \
          "   1.0 /  1.0 =  1.0: OK" \
          "   1.0 /  1.0 =  1.0: OK" \
          "   2.0 /  1.0 =  2.0: OK" \
          "   2.0 /  1.0 =  2.0: OK" \
          "   3.0 /  2.0 =  1.5: OK" \
          "   3.0 /  2.0 =  1.5: OK" \
          "  +0.0 /  1.0 = +0.0: OK" \
          "  +0.0 /  1.0 = +0.0: OK" \
          "  -0.0 /  1.0 = -0.0: OK" \
          "  -0.0 /  1.0 = -0.0: OK" \
Line 94... Line 95...
          "  -1.0 * 2^127  / -1.0 * 2^-129 = +inf: OK" \
          "  -1.0 * 2^127  / -1.0 * 2^-129 = +inf: OK" \
          "   1.0 * 2^-129 /  1.0 * 2^127  = +0.0: OK" \
          "   1.0 * 2^-129 /  1.0 * 2^127  = +0.0: OK" \
          "  -1.0 * 2^-129 /  1.0 * 2^127  = -0.0: OK" \
          "  -1.0 * 2^-129 /  1.0 * 2^127  = -0.0: OK" \
          "   1.0 * 2^-129 / -1.0 * 2^127  = -0.0: OK" \
          "   1.0 * 2^-129 / -1.0 * 2^127  = -0.0: OK" \
          "  -1.0 * 2^-129 / -1.0 * 2^127  = +0.0: OK" \
          "  -1.0 * 2^-129 / -1.0 * 2^127  = +0.0: OK" \
          "!lf.ftoi.s" \
         "lf.ftoi.s" \
          "  (int)  1.0          =  1:    OK" \
          "  (int)  1.0          =  1:    OK" \
          "  (int) -1.0          = -1:    OK" \
          "  (int) -1.0          = -1:    OK" \
          "  (int) +0.0          =  0:    OK" \
          "  (int) +0.0          =  0:    OK" \
          "  (int) -0.0          =  0:    OK" \
          "  (int) -0.0          =  0:    OK" \
          "  (int)  1.5          =  1:    OK" \
          "  (int)  1.5          =  1:    OK" \
          "  (int) -1.5          = -1:    OK" \
          "  (int) -1.5          = -1:    OK" \
          "  (int)  1.0 * 2^126  = -2^31: OK" \
         "  (int)  1.0 * 2^126  = 2^31: OK" \
          "  (int) -1.0 * 2^126  = -2^31: OK" \
          "  (int) -1.0 * 2^126  = -2^31: OK" \
          "  (int)  1.0 * 2^-129 =  0:    OK" \
          "  (int)  1.0 * 2^-129 =  0:    OK" \
          "  (int) -1.0 * 2^-129 =  0:    OK" \
          "  (int) -1.0 * 2^-129 =  0:    OK" \
          "  (int) +inf          = -2^31: OK" \
         "  (int) +inf          = 2^31: OK" \
          "  (int) -inf          = -2^31: OK" \
          "  (int) -inf          = -2^31: OK" \
          "  (int) +NaN          = -2^31: OK" \
         "  (int) +NaN          = 2^31: OK" \
          "  (int) -NaN          = -2^31: OK" \
         "  (int) -NaN          = 2^31: OK" \
          "!lf.itof.s" \
         "lf.itof.s" \
          "  (float)  1.0 =  1: OK" \
          "  (float)  1.0 =  1: OK" \
          "  (float) -1.0 = -1: OK" \
          "  (float) -1.0 = -1: OK" \
          "  (float) +0.0 =  0: OK" \
          "  (float) +0.0 =  0: OK" \
          "  (float) -0.0 =  0: OK" \
          "  (float) -0.0 =  0: OK" \
          "!lf.madd.s" \
         "lf.madd.s" \
          "   1.0 +  1.0 *  1.0 =  2.0: OK" \
          "   1.0 +  1.0 *  1.0 =  2.0: OK" \
          "   0.5 +  1.0 *  1.0 =  1.5: OK" \
          "   0.5 +  1.0 *  1.0 =  1.5: OK" \
          "   1.0 +  0.5 *  2.0 =  2.0: OK" \
          "   1.0 +  0.5 *  2.0 =  2.0: OK" \
          "   1.0 + -1.0 *  2.0 = -1.0: OK" \
          "   1.0 + -1.0 *  2.0 = -1.0: OK" \
          "  -2.0 +  2.0 *  0.5 = -1.0: OK" \
          "  -2.0 +  2.0 *  0.5 = -1.0: OK" \
Line 135... Line 136...
          "   1.0 +  1.0 * +NaN = +NaN: OK" \
          "   1.0 +  1.0 * +NaN = +NaN: OK" \
          "  +NaN +  1.0 * +NaN = +NaN: OK" \
          "  +NaN +  1.0 * +NaN = +NaN: OK" \
          "  -NaN +  1.0 *  1.0 = -NaN: OK" \
          "  -NaN +  1.0 *  1.0 = -NaN: OK" \
          "   1.0 * 2^127  +  1.0 * 2^127  *  1.0          = +inf: OK" \
          "   1.0 * 2^127  +  1.0 * 2^127  *  1.0          = +inf: OK" \
          "   1.0 * 2^127  +  1.0 * 2^127  *  1.0 * 2^-129 = +inf: OK" \
          "   1.0 * 2^127  +  1.0 * 2^127  *  1.0 * 2^-129 = +inf: OK" \
          "!lf.mul.s" \
         "lf.mul.s" \
          "   1.0 *  1.0 =  1.0: OK" \
          "   1.0 *  1.0 =  1.0: OK" \
          "   3.0 *  1.0 =  3.0: OK" \
          "   3.0 *  1.0 =  3.0: OK" \
          "   1.5 *  2.0 =  3.0: OK" \
          "   1.5 *  2.0 =  3.0: OK" \
          "  -1.0 *  2.0 = -2.0: OK" \
          "  -1.0 *  2.0 = -2.0: OK" \
          "  -1.0 * -2.0 = +2.0: OK" \
          "  -1.0 * -2.0 = +2.0: OK" \
          "  +0.0 *  2.0 = +0.0: OK" \
          "  +0.0 *  2.0 = +0.0: OK" \
          "  +0.0 *  2.0 = +0.0: OK" \
          "  +0.0 *  2.0 = +0.0: OK" \
          "  +inf * -2.0 = -inf: OK" \
          "  +inf * -2.0 = -inf: OK" \
          "  +NaN *  2.0 = +NaN: OK" \
          "  +NaN *  2.0 = +NaN: OK" \
          "   1.0 * 2^127 *  1.0 * 2^127 = +inf: OK" \
          "   1.0 * 2^127 *  1.0 * 2^127 = +inf: OK" \
 
         "  -1.0 * 2^127 * -1.0 * 2^127 = +inf: OK" \
          "  -1.0 * 2^127 *  1.0 * 2^127 = -inf: OK" \
          "  -1.0 * 2^127 *  1.0 * 2^127 = -inf: OK" \
          "   1.0 * 2^127 * -1.0 * 2^127 = -inf: OK" \
          "   1.0 * 2^127 * -1.0 * 2^127 = -inf: OK" \
          "  -1.0 * 2^127 * -1.0 * 2^127 = +inf: OK" \
         "lf.rem.s" \
          "!lf.rem.s" \
 
          "   1.0 %  1.0 = +0.0: OK" \
          "   1.0 %  1.0 = +0.0: OK" \
          "   1.0 %  2.0 =  1.0: OK" \
          "   1.0 %  2.0 =  1.0: OK" \
          "   1.5 %  2.0 =  1.5: OK" \
 
          "   2.0 %  1.5 =  0.5: OK" \
          "   2.0 %  1.5 =  0.5: OK" \
          "   3.0 %  1.5 = +0.0: OK" \
          "   3.0 %  1.5 = +0.0: OK" \
          "  -3.0 %  2.0 = -1.0: OK" \
 
          "  -3.0 %  2.0 = -1.0: OK" \
 
          "   3.0 % -2.0 =  1.0: OK" \
 
          "  -3.0 % -2.0 = -1.0: OK" \
 
          "  +0.0 %  2.0 = +0.0: OK" \
          "  +0.0 %  2.0 = +0.0: OK" \
          "  -0.0 %  2.0 = -0.0: OK" \
          "  -0.0 %  2.0 = -0.0: OK" \
          "   2.0 % +0.0 = -NaN: OK" \
          "   2.0 % +0.0 = -NaN: OK" \
          "  -2.0 % +0.0 = -NaN: OK" \
          "  -2.0 % +0.0 = -NaN: OK" \
          "   2.0 % -0.0 = -NaN: OK" \
          "   2.0 % -0.0 = -NaN: OK" \
Line 170... Line 166...
          "  +inf %  2.0 = -NaN: OK" \
          "  +inf %  2.0 = -NaN: OK" \
          "   2.0 % +NaN = +NaN: OK" \
          "   2.0 % +NaN = +NaN: OK" \
          "  +NaN %  2.0 = +NaN: OK" \
          "  +NaN %  2.0 = +NaN: OK" \
          "   1.0 * 2^127  % 1.0 * 2^-129 = +0.0: OK" \
          "   1.0 * 2^127  % 1.0 * 2^-129 = +0.0: OK" \
          "   1.0 * 2^-129 % 1.0 * 2^127  = +0.0: OK" \
          "   1.0 * 2^-129 % 1.0 * 2^127  = +0.0: OK" \
          "!lf.sfeq.s" \
         "lf.sfeq.s" \
          "   1.0 ==  1.0: TRUE" \
          "   1.0 ==  1.0: TRUE" \
          "   1.0 ==  2.0: FALSE" \
          "   1.0 ==  2.0: FALSE" \
          "   1.5 ==  1.5: TRUE" \
          "   1.5 ==  1.5: TRUE" \
          "   1.5 ==  0.5: FALSE" \
          "   1.5 ==  0.5: FALSE" \
          "  -1.5 == -1.5: TRUE" \
          "  -1.5 == -1.5: TRUE" \
Line 191... Line 187...
          "  -NaN == -NaN: FALSE" \
          "  -NaN == -NaN: FALSE" \
          "  +NaN == -NaN: FALSE" \
          "  +NaN == -NaN: FALSE" \
          "   1.0 * 2^-129 == 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-129 == 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-129 == 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-129 == 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^126  == 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^126  == 1.0 * 2^-128: FALSE" \
          "!lf.sfge.s" \
         "lf.sfge.s" \
          "   1.0 >=  1.0: TRUE" \
          "   1.0 >=  1.0: TRUE" \
          "   2.0 >=  1.0: TRUE" \
          "   2.0 >=  1.0: TRUE" \
          "   1.0 >=  2.0: FALSE" \
          "   1.0 >=  2.0: FALSE" \
          "   1.5 >=  1.5: TRUE" \
          "   1.5 >=  1.5: TRUE" \
          "   1.5 >=  0.5: TRUE" \
          "   1.5 >=  0.5: TRUE" \
Line 225... Line 221...
          "   1.0 * 2^-129 >= 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-129 >= 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-129 >= 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-129 >= 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-128 >= 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-128 >= 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^126  >= 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^126  >= 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-128 >= 1.0 * 2^126:  FALSE" \
          "   1.0 * 2^-128 >= 1.0 * 2^126:  FALSE" \
          "!lf.sfgt.s" \
         "lf.sfgt.s" \
          "   1.0 >  1.0: FALSE" \
          "   1.0 >  1.0: FALSE" \
          "   2.0 >  1.0: TRUE" \
          "   2.0 >  1.0: TRUE" \
          "   1.0 >  2.0: FALSE" \
          "   1.0 >  2.0: FALSE" \
          "   1.5 >  1.5: FALSE" \
          "   1.5 >  1.5: FALSE" \
          "   1.5 >  0.5: TRUE" \
          "   1.5 >  0.5: TRUE" \
Line 259... Line 255...
          "   1.0 * 2^-129 > 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-129 > 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-129 > 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-129 > 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-128 > 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-128 > 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^126  > 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^126  > 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-128 > 1.0 * 2^126:  FALSE" \
          "   1.0 * 2^-128 > 1.0 * 2^126:  FALSE" \
          "!lf.sfle.s" \
         "lf.sfle.s" \
          "   1.0 <=  1.0: TRUE" \
          "   1.0 <=  1.0: TRUE" \
          "   2.0 <=  1.0: FALSE" \
          "   2.0 <=  1.0: FALSE" \
          "   1.0 <=  2.0: TRUE" \
          "   1.0 <=  2.0: TRUE" \
          "   1.5 <=  1.5: TRUE" \
          "   1.5 <=  1.5: TRUE" \
          "   1.5 <=  0.5: FALSE" \
          "   1.5 <=  0.5: FALSE" \
Line 293... Line 289...
          "   1.0 * 2^-129 <= 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-129 <= 1.0 * 2^-129: TRUE" \
          "   1.0 * 2^-129 <= 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-129 <= 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-128 <= 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-128 <= 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^126  <= 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^126  <= 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-128 <= 1.0 * 2^126:  TRUE" \
          "   1.0 * 2^-128 <= 1.0 * 2^126:  TRUE" \
          "!lf.sflt.s" \
         "lf.sflt.s" \
          "   1.0 <  1.0: FALSE" \
          "   1.0 <  1.0: FALSE" \
          "   2.0 <  1.0: FALSE" \
          "   2.0 <  1.0: FALSE" \
          "   1.0 <  2.0: TRUE" \
          "   1.0 <  2.0: TRUE" \
          "   1.5 <  1.5: FALSE" \
          "   1.5 <  1.5: FALSE" \
          "   1.5 <  0.5: FALSE" \
          "   1.5 <  0.5: FALSE" \
Line 327... Line 323...
          "   1.0 * 2^-129 < 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-129 < 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-129 < 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-129 < 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-128 < 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-128 < 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^126  < 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^126  < 1.0 * 2^-128: FALSE" \
          "   1.0 * 2^-128 < 1.0 * 2^126:  TRUE" \
          "   1.0 * 2^-128 < 1.0 * 2^126:  TRUE" \
          "!lf.sfne.s" \
         "lf.sfne.s" \
          "   1.0 !=  1.0: FALSE" \
          "   1.0 !=  1.0: FALSE" \
          "   1.0 !=  2.0: TRUE" \
          "   1.0 !=  2.0: TRUE" \
          "   1.5 !=  1.5: FALSE" \
          "   1.5 !=  1.5: FALSE" \
          "   1.5 !=  0.5: TRUE" \
          "   1.5 !=  0.5: TRUE" \
          "  -1.5 != -1.5: FALSE" \
          "  -1.5 != -1.5: FALSE" \
Line 348... Line 344...
          "  -NaN != -NaN: TRUE" \
          "  -NaN != -NaN: TRUE" \
          "  +NaN != -NaN: TRUE" \
          "  +NaN != -NaN: TRUE" \
          "   1.0 * 2^-129 != 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-129 != 1.0 * 2^-129: FALSE" \
          "   1.0 * 2^-129 != 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^-129 != 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^126  != 1.0 * 2^-128: TRUE" \
          "   1.0 * 2^126  != 1.0 * 2^-128: TRUE" \
          "!lf.sub.s" \
         "lf.sub.s" \
          "   1.0 -  0.0  =  1.0:  OK" \
          "   1.0 -  0.0  =  1.0:  OK" \
          "   1.0 - -0.0  =  1.0:  OK" \
          "   1.0 - -0.0  =  1.0:  OK" \
          "   1.0 -  1.0  = +0.0:  OK" \
          "   1.0 -  1.0  = +0.0:  OK" \
          "   2.0 -  1.0  =  1.0:  OK" \
          "   2.0 -  1.0  =  1.0:  OK" \
          "   1.5 -  1.5  = +0.0:  OK" \
          "   1.5 -  1.5  = +0.0:  OK" \
Line 376... Line 372...
          "  -NaN - -NaN  = -NaN:  OK" \
          "  -NaN - -NaN  = -NaN:  OK" \
          "   1.0 - +sNaN = +qNaN: OK" \
          "   1.0 - +sNaN = +qNaN: OK" \
          "   1.0 - -sNaN = -qNaN: OK" \
          "   1.0 - -sNaN = -qNaN: OK" \
          "  -1.0 * 2^127 -  1.0 * 2^127  = +inf:  OK" \
          "  -1.0 * 2^127 -  1.0 * 2^127  = +inf:  OK" \
          "   1.0 * 2^127 - -1.0 * 2^127  = -inf:  OK" \
          "   1.0 * 2^127 - -1.0 * 2^127  = -inf:  OK" \
          "!Test completed" \
         "Test completed" \
          "!report(0xdeaddead);" \
         "report(0xdeaddead);" \
          "!exit(0)"]               \
         "exit(0)"]               \
    "fp.cfg" "fp/fp"
    "fp.cfg" "fp/fp"

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.