Erik -
/
FastIO_TestBench
Testbench for FastIO
Fork of FastIO by
Revision 7:b45620275f74, committed 2014-07-05
- Comitter:
- Sissors
- Date:
- Sat Jul 05 18:10:56 2014 +0000
- Parent:
- 6:8ad8f8acd0a5
- Commit message:
- Added time in ns
Changed in this revision
diff -r 8ad8f8acd0a5 -r b45620275f74 FastIO.lib --- a/FastIO.lib Wed Jul 02 06:02:25 2014 +0000 +++ b/FastIO.lib Sat Jul 05 18:10:56 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/Sissors/code/FastIO/#85a4a54f15e3 +http://mbed.org/users/Sissors/code/FastIO/#1a6ed4b84590
diff -r 8ad8f8acd0a5 -r b45620275f74 main.cpp --- a/main.cpp Wed Jul 02 06:02:25 2014 +0000 +++ b/main.cpp Sat Jul 05 18:10:56 2014 +0000 @@ -17,7 +17,7 @@ void print_results(int digicount, int fastcount); int main() { - printf("\r\nAll numbers are the number of core clock cycles per IO operation\r\n"); + printf("\r\nStarting test bench\r\n"); basic_test(); fixed_write(); @@ -32,7 +32,8 @@ void print_results(int digicount, int fastcount) { float digicycles = (float)digicount / LOOPS * (float)SystemCoreClock / 1000000.0f; float fastcycles = (float)fastcount / LOOPS * (float)SystemCoreClock / 1000000.0f; - printf("Standard took %.1f cycles, FastIO took %.1f cycles, which is %d%%\r\n", digicycles, fastcycles,(int)(100.0f*fastcycles/digicycles + 0.5)); + printf("Standard took %.2f cycles, FastIO took %.2f cycles, which is %d%%\r\n", digicycles, fastcycles,(int)(100.0f*fastcycles/digicycles + 0.5)); + printf("Standard took %.0fns, FastIO took %.0fns\r\n", (float)digicount/LOOPS * 1000, (float)fastcount/LOOPS * 1000); } void basic_test() {
diff -r 8ad8f8acd0a5 -r b45620275f74 mbed.bld --- a/mbed.bld Wed Jul 02 06:02:25 2014 +0000 +++ b/mbed.bld Sat Jul 05 18:10:56 2014 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file +http://mbed.org/users/mbed_official/code/mbed/builds/04dd9b1680ae \ No newline at end of file