Updated functions to deal with USB clocking. (PPL1) See http://www.nxp.com/documents/user_manual/UM10360.pdf Section 4.6 & 4.7.3
Fork of ClockControl by
Diff: CoreMark/core_main.c
- Revision:
- 1:8b04bd33c7cd
- Parent:
- 0:b5d3bd64d2dc
diff -r b5d3bd64d2dc -r 8b04bd33c7cd CoreMark/core_main.c --- a/CoreMark/core_main.c Sun Jan 24 15:46:26 2010 +0000 +++ b/CoreMark/core_main.c Sun Sep 11 22:36:20 2016 +0000 @@ -104,7 +104,7 @@ portable_init(&(results[0].port), &argc, argv); /* First some checks to make sure benchmark will run ok */ if (sizeof(struct list_head_s)>128) { - ee_printf("list_head structure too big for comparable data!\n"); + ee_printf("list_head structure too big for comparable data!\n\r"); return MAIN_RETURN_VAL; } results[0].seed1=get_seed(1); @@ -239,23 +239,23 @@ switch (seedcrc) { /* test known output for common seeds */ case 0x8a02: /* seed1=0, seed2=0, seed3=0x66, size 2000 per algorithm */ known_id=0; - ee_printf("6k performance run parameters for coremark.\n"); + ee_printf("6k performance run parameters for coremark.\n\r"); break; case 0x7b05: /* seed1=0x3415, seed2=0x3415, seed3=0x66, size 2000 per algorithm */ known_id=1; - ee_printf("6k validation run parameters for coremark.\n"); + ee_printf("6k validation run parameters for coremark.\n\r"); break; case 0x4eaf: /* seed1=0x8, seed2=0x8, seed3=0x8, size 400 per algorithm */ known_id=2; - ee_printf("Profile generation run parameters for coremark.\n"); + ee_printf("Profile generation run parameters for coremark.\n\r"); break; case 0xe9f5: /* seed1=0, seed2=0, seed3=0x66, size 666 per algorithm */ known_id=3; - ee_printf("2K performance run parameters for coremark.\n"); + ee_printf("2K performance run parameters for coremark.\n\r"); break; case 0x18f2: /* seed1=0x3415, seed2=0x3415, seed3=0x66, size 666 per algorithm */ known_id=4; - ee_printf("2K validation run parameters for coremark.\n"); + ee_printf("2K validation run parameters for coremark.\n\r"); break; default: total_errors=-1; @@ -266,17 +266,17 @@ results[i].err=0; if ((results[i].execs & ID_LIST) && (results[i].crclist!=list_known_crc[known_id])) { - ee_printf("[%u]ERROR! list crc 0x%04x - should be 0x%04x\n",i,results[i].crclist,list_known_crc[known_id]); + ee_printf("[%u]ERROR! list crc 0x%04x - should be 0x%04x\n\r",i,results[i].crclist,list_known_crc[known_id]); results[i].err++; } if ((results[i].execs & ID_MATRIX) && (results[i].crcmatrix!=matrix_known_crc[known_id])) { - ee_printf("[%u]ERROR! matrix crc 0x%04x - should be 0x%04x\n",i,results[i].crcmatrix,matrix_known_crc[known_id]); + ee_printf("[%u]ERROR! matrix crc 0x%04x - should be 0x%04x\n\r",i,results[i].crcmatrix,matrix_known_crc[known_id]); results[i].err++; } if ((results[i].execs & ID_STATE) && (results[i].crcstate!=state_known_crc[known_id])) { - ee_printf("[%u]ERROR! state crc 0x%04x - should be 0x%04x\n",i,results[i].crcstate,state_known_crc[known_id]); + ee_printf("[%u]ERROR! state crc 0x%04x - should be 0x%04x\n\r",i,results[i].crcstate,state_known_crc[known_id]); results[i].err++; } total_errors+=results[i].err; @@ -284,44 +284,44 @@ } total_errors+=check_data_types(); /* and report results */ - ee_printf("CoreMark Size : %lu\n",(ee_u32)results[0].size); - ee_printf("Total ticks : %lu\n",(ee_u32)total_time); + ee_printf("CoreMark Size : %lu\n\r",(ee_u32)results[0].size); + ee_printf("Total ticks : %lu\n\r",(ee_u32)total_time); #if HAS_FLOAT - ee_printf("Total time (secs): %f\n",time_in_secs(total_time)); + ee_printf("Total time (secs): %f\n\r",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 : %f\n\r",default_num_contexts*results[0].iterations/time_in_secs(total_time)); #else - ee_printf("Total time (secs): %d\n",time_in_secs(total_time)); + ee_printf("Total time (secs): %d\n\r",time_in_secs(total_time)); if (time_in_secs(total_time) > 0) - ee_printf("Iterations/Sec : %d\n",default_num_contexts*results[0].iterations/time_in_secs(total_time)); + ee_printf("Iterations/Sec : %d\n\r",default_num_contexts*results[0].iterations/time_in_secs(total_time)); #endif if (time_in_secs(total_time) < 10) { - ee_printf("ERROR! Must execute for at least 10 secs for a valid result!\n"); + ee_printf("ERROR! Must execute for at least 10 secs for a valid result!\n\r"); total_errors++; } - ee_printf("Iterations : %lu\n",(ee_u32)default_num_contexts*results[0].iterations); - ee_printf("Compiler version : %s\n",COMPILER_VERSION); - ee_printf("Compiler flags : %s\n",COMPILER_FLAGS); + ee_printf("Iterations : %lu\n\r",(ee_u32)default_num_contexts*results[0].iterations); + ee_printf("Compiler version : %s\n\r",COMPILER_VERSION); + ee_printf("Compiler flags : %s\n\r",COMPILER_FLAGS); #if (MULTITHREAD>1) - ee_printf("Parallel %s : %d\n",PARALLEL_METHOD,default_num_contexts); + ee_printf("Parallel %s : %d\n\r",PARALLEL_METHOD,default_num_contexts); #endif - ee_printf("Memory location : %s\n",MEM_LOCATION); + ee_printf("Memory location : %s\n\r",MEM_LOCATION); /* output for verification */ - ee_printf("seedcrc : 0x%04x\n",seedcrc); + ee_printf("seedcrc : 0x%04x\n\r",seedcrc); if (results[0].execs & ID_LIST) for (i=0 ; i<default_num_contexts; i++) - ee_printf("[%d]crclist : 0x%04x\n",i,results[i].crclist); + ee_printf("[%d]crclist : 0x%04x\n\r",i,results[i].crclist); if (results[0].execs & ID_MATRIX) for (i=0 ; i<default_num_contexts; i++) - ee_printf("[%d]crcmatrix : 0x%04x\n",i,results[i].crcmatrix); + ee_printf("[%d]crcmatrix : 0x%04x\n\r",i,results[i].crcmatrix); if (results[0].execs & ID_STATE) for (i=0 ; i<default_num_contexts; i++) - ee_printf("[%d]crcstate : 0x%04x\n",i,results[i].crcstate); + ee_printf("[%d]crcstate : 0x%04x\n\r",i,results[i].crcstate); for (i=0 ; i<default_num_contexts; i++) - ee_printf("[%d]crcfinal : 0x%04x\n",i,results[i].crc); + ee_printf("[%d]crcfinal : 0x%04x\n\r",i,results[i].crc); if (total_errors==0) { - ee_printf("Correct operation validated. See readme.txt for run and reporting rules.\n"); + ee_printf("Correct operation validated. See readme.txt for run and reporting rules.\n\r"); #if HAS_FLOAT if (known_id==3) { ee_printf("CoreMark 1.0 : %f / %s %s",default_num_contexts*results[0].iterations/time_in_secs(total_time),COMPILER_VERSION,COMPILER_FLAGS); @@ -334,14 +334,14 @@ #if (MULTITHREAD>1) ee_printf(" / %d:%s",default_num_contexts,PARALLEL_METHOD); #endif - ee_printf("\n"); + ee_printf("\n\r"); } #endif } if (total_errors>0) - ee_printf("Errors detected\n"); + ee_printf("Errors detected\n\r"); if (total_errors<0) - ee_printf("Cannot validate operation for these seed values, please compare with results on a known platform.\n"); + ee_printf("Cannot validate operation for these seed values, please compare with results on a known platform.\n\r"); #if (MEM_METHOD==MEM_MALLOC) for (i=0 ; i<MULTITHREAD; i++)