|
Message
From: cvs at opencores.org<cvs@o...>
Date: Sat Apr 26 21:32:01 CEST 2008
Subject: [cvs-checkins] MODIFIED: aemb ...
Date: 00/08/04 26:21:32 Modified: aemb/sw/cc simboard.hh testbench.cc Log: Made headers C compatible. Revision Changes Path 1.4 aemb/sw/cc/simboard.hh http://www.opencores.org/cvsweb.shtml/aemb/sw/cc/simboard.hh.diff?r1=1.3&r2=1.4 (In the diff below, changes in quantity of whitespace are not shown.) Index: simboard.hh =================================================================== RCS file: /cvsroot/sybreon/aemb/sw/cc/simboard.hh,v retrieving revision 1.3 retrieving revision 1.4 diff -u -b -r1.3 -r1.4 --- simboard.hh 26 Apr 2008 18:07:19 -0000 1.3 +++ simboard.hh 26 Apr 2008 19:32:00 -0000 1.4 @@ -1,4 +1,4 @@ -/* $Id: simboard.hh,v 1.3 2008/04/26 18:07:19 sybreon Exp $ +/* $Id: simboard.hh,v 1.4 2008/04/26 19:32:00 sybreon Exp $ ** ** AEMB Function Verification C++ Testbench ** Copyright (C) 2004-2008 Shawn Tan <shawn.tan@a...> @@ -34,18 +34,23 @@ INTERRUPT TESTS */ +#ifdef __cplusplus +using namespace aemb; +#endif + volatile int intr = -1; void __attribute__ ((interrupt_handler)) interruptHandler() { - intr = 0; // flag the interrupt + intr = 0; // flag the interrupt service routine } int interruptTest(int timeout) { - aemb::enableInterrupts(); - for (int timer=0; (timer < timeout) && (intr == -1); ++timer); // delay loop - aemb::disableInterrupts(); + enableInterrupts(); + int timer; + for (timer=0; (timer < timeout) && (intr == -1); ++timer); // delay loop + disableInterrupts(); return (intr == 0) ? EXIT_SUCCESS : EXIT_FAILURE; } @@ -122,6 +127,9 @@ /* $Log: simboard.hh,v $ +Revision 1.4 2008/04/26 19:32:00 sybreon +Made headers C compatible. + Revision 1.3 2008/04/26 18:07:19 sybreon Minor cosmetic changes. 1.5 aemb/sw/cc/testbench.cc http://www.opencores.org/cvsweb.shtml/aemb/sw/cc/testbench.cc.diff?r1=1.4&r2=1.5 (In the diff below, changes in quantity of whitespace are not shown.) Index: testbench.cc =================================================================== RCS file: /cvsroot/sybreon/aemb/sw/cc/testbench.cc,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- testbench.cc 26 Apr 2008 18:08:12 -0000 1.4 +++ testbench.cc 26 Apr 2008 19:32:00 -0000 1.5 @@ -1,4 +1,4 @@ -/* $Id: testbench.cc,v 1.4 2008/04/26 18:08:12 sybreon Exp $ +/* $Id: testbench.cc,v 1.5 2008/04/26 19:32:00 sybreon Exp $ ** ** AEMB Function Verification C++ Testbench ** Copyright (C) 2004-2008 Shawn Tan <shawn.tan@a...> @@ -32,25 +32,40 @@ { iprintf("AEMB2 32-bit Microprocessor Core\n"); + iprintf("\nNumerical Tests\n"); // *** 1. FIBONACCI *** - iprintf("Fibonacci Test\n"); if (fibonacciTest(MAX_TEST) != EXIT_SUCCESS) trap(-1); + iprintf("1.\tBasic Integer\tPASS\n"); // *** 2. EUCLIDEAN *** - iprintf("Euclidean Test\n"); if (euclideanTest(MAX_TEST) != EXIT_SUCCESS) trap(-2); + iprintf("2.\tExtra Integer\tPASS\n");
// *** 3. NEWTON-RHAPSON ***
- iprintf("Newton-Rhapson Test\n");
if (newtonTest(MAX_TEST) != EXIT_SUCCESS) trap(-3);
+ iprintf("3.\tFloating Point\tPASS\n");
+
+ iprintf("\nFunctional Tests\n");
+ // *** 4. MEMORY-ALLOC ***
+ if (memoryTest(MAX_TEST) != EXIT_SUCCESS) trap(-4);
+ iprintf("4.\tMemory Alloc\tPASS\n");
+
+ // *** 5. INTERRUPT ***
+ iprintf("5.\tInterrupt\tPASS\n");
+
+ // *** 6. EXTENSION ***
+ iprintf("6.\tExtension\tPASS\n");
// *** 9. PASSED ***
- iprintf("*** PASSED ***\n");
+ iprintf("\n*** PASSED ***\n");
return EXIT_SUCCESS;
}
/*
$Log: testbench.cc,v $
+ Revision 1.5 2008/04/26 19:32:00 sybreon
+ Made headers C compatible.
+
Revision 1.4 2008/04/26 18:08:12 sybreon
Made single-thread compatible.
|
 |