Coremark updates

This commit is contained in:
David Harris 2021-11-30 11:16:13 -08:00
parent bb2bde2743
commit ce50b1010d
2 changed files with 8 additions and 7 deletions

View File

@ -240,6 +240,7 @@ for (i = 0; i < MULTITHREAD; i++)
}
/* automatically determine number of iterations if not set */
// results[0].iterations = 2; // temporary for speed
if (results[0].iterations == 0)
{
secs_ret secs_passed = 0;
@ -289,7 +290,7 @@ for (i = 0; i < MULTITHREAD; i++)
seedcrc = crc16(results[0].seed2, seedcrc);
seedcrc = crc16(results[0].seed3, seedcrc);
seedcrc = crc16(results[0].size, seedcrc);
switch (seedcrc)
{ /* test known output for common seeds */
case 0x8a02: /* seed1=0, seed2=0, seed3=0x66, size 2000 per algorithm */
@ -359,11 +360,11 @@ for (i = 0; i < MULTITHREAD; i++)
ee_printf("CoreMark Size : %lu\n", (long unsigned)results[0].size);
ee_printf("Total ticks : %lu\n", (long unsigned)total_time);
#if HAS_FLOAT
ee_printf("Total time (secs): %f\n", time_in_secs(total_time));
ee_printf("Total time (msecs): %ld\n", (long unsigned)(1000*time_in_secs(total_time)));
if (time_in_secs(total_time) > 0)
ee_printf("Iterations/Sec : %f\n",
default_num_contexts * results[0].iterations
/ time_in_secs(total_time));
ee_printf("Iterations/Sec : %lu / %lu\n",
default_num_contexts * results[0].iterations,
total_time);
#else
ee_printf("Total time (secs): %d\n", time_in_secs(total_time));
if (time_in_secs(total_time) > 0)

View File

@ -196,10 +196,10 @@ void stop_time(void) {
CORE_TICKS get_time(void) {
CORE_TICKS elapsed=(CORE_TICKS)(MYTIMEDIFF(stop_time_val, start_time_val));
unsigned long instructions = minstretDiff();
/* double CPI = elapsed / instructions;
ee_printf(" Called get_time\n");
ee_printf(" Elapsed MTIME: %u\n", elapsed);
ee_printf(" Elapsed MINSTRET: %lu\n", instructions);
ee_printf(" CPI: %lf", CPI); */
ee_printf(" CPI: %lu / %lu\n", elapsed, instructions);
return elapsed;
}
/* Function: time_in_secs