Skip to content

Commit

Permalink
application: Fix coremark and whetstone IPC calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Huaqi Fang <[email protected]>
  • Loading branch information
fanghuaqi committed Jan 16, 2024
1 parent 8a290b5 commit 8184828
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion application/baremetal/benchmark/coremark/core_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ MAIN_RETURN_TYPE main(int argc, char* argv[])
ee_printf("CSV, CoreMark, %u, %u, %u.%s\n", \
(unsigned int)results[0].iterations, (unsigned int)total_time, (unsigned int)(cmk_dmips/1000), pstr);

float f_ipc = (((float)total_time / total_instret));
float f_ipc = (((float)total_instret / total_time));
uint32_t i_ipc = (uint32_t)(f_ipc * 1000);
pstr = dec2str(i_ipc);

Expand Down
2 changes: 1 addition & 1 deletion application/baremetal/benchmark/whetstone/whets.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ int main(void)
printf("\nCSV, Benchmark, MWIPS/MHz\n");
printf("CSV, Whetstone, %u.%s\n", (unsigned int)(whet_mwips/1000), pstr);

float f_ipc = (((float)used_cycle / used_instret));
float f_ipc = (((float)used_instret / used_cycle));
uint32_t i_ipc = (uint32_t)(f_ipc * 1000);
pstr = dec2str(i_ipc);

Expand Down

0 comments on commit 8184828

Please sign in to comment.