Line 1... |
Line 1... |
/*
|
/*
|
* $Id: aeMB_testbench.c,v 1.5 2007-04-27 15:17:59 sybreon Exp $
|
* $Id: aeMB_testbench.c,v 1.6 2007-04-30 15:57:10 sybreon Exp $
|
*
|
*
|
* AEMB Function Verification C Testbench
|
* AEMB Function Verification C Testbench
|
* Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
* Copyright (C) 2004-2007 Shawn Tan Ser Ngiap <shawn.tan@aeste.net>
|
*
|
*
|
* This library is free software; you can redistribute it and/or
|
* This library is free software; you can redistribute it and/or
|
Line 23... |
Line 23... |
* It tests a whole gamut of operations and is tightly linked to the
|
* It tests a whole gamut of operations and is tightly linked to the
|
* ae68_testbench.v testbench module for verification.
|
* ae68_testbench.v testbench module for verification.
|
*
|
*
|
* HISTORY
|
* HISTORY
|
* $Log: not supported by cvs2svn $
|
* $Log: not supported by cvs2svn $
|
|
* Revision 1.5 2007/04/27 15:17:59 sybreon
|
|
* Added code documentation.
|
|
* Added new tests that test floating point, modulo arithmetic and multiplication/division.
|
|
*
|
* Revision 1.4 2007/04/25 22:15:05 sybreon
|
* Revision 1.4 2007/04/25 22:15:05 sybreon
|
* Added support for 8-bit and 16-bit data types.
|
* Added support for 8-bit and 16-bit data types.
|
*
|
*
|
* Revision 1.3 2007/04/04 14:09:04 sybreon
|
* Revision 1.3 2007/04/04 14:09:04 sybreon
|
* Added initial interrupt/exception support.
|
* Added initial interrupt/exception support.
|
Line 248... |
Line 252... |
{
|
{
|
// Message Passing Port
|
// Message Passing Port
|
int* mpi = (int*)0xFFFFFFFF;
|
int* mpi = (int*)0xFFFFFFFF;
|
|
|
// Number of each test to run
|
// Number of each test to run
|
int max = 5;
|
int max = 3;
|
|
|
// Fibonacci Test
|
// Fibonacci Test
|
if (fib_test(max) == -1) { *mpi = 0x4C494146; }
|
if (fib_test(max) == -1) { *mpi = 0x4641494C; }
|
|
|
// Euclid Test
|
// Euclid Test
|
if (euclid_test(max) == -1) { *mpi = 0x4C494146; }
|
if (euclid_test(max) == -1) { *mpi = 0x4641494C; }
|
|
|
// Newton-Rhapson Test
|
// Newton-Rhapson Test
|
if (newton_test(max) == -1) { *mpi = 0x4C494146; }
|
if (newton_test(max) == -1) { *mpi = 0x4641494C; }
|
|
|
// ALL PASSED
|
// ALL PASSED
|
return 0;
|
return 0;
|
}
|
}
|
|
|
No newline at end of file
|
No newline at end of file
|