OpenCores
URL https://opencores.org/ocsvn/neorv32/neorv32/trunk

Subversion Repositories neorv32

[/] [neorv32/] [trunk/] [sw/] [example/] [dhrystone/] [dhry_1.c] - Diff between revs 63 and 64

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 63 Rev 64
Line 106... Line 106...
    neorv32_rte_setup(); // capture all exceptions and give debug information, ho hw flow control
    neorv32_rte_setup(); // capture all exceptions and give debug information, ho hw flow control
    neorv32_uart_setup(19200, PARITY_NONE, FLOW_CONTROL_NONE);
    neorv32_uart_setup(19200, PARITY_NONE, FLOW_CONTROL_NONE);
    // check available hardware extensions and compare with compiler flags
    // check available hardware extensions and compare with compiler flags
    neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
    neorv32_rte_check_isa(0); // silent = 0 -> show message if isa mismatch
 
 
    neorv32_uart_printf("NEORV32: Processor running at %u Hz\n", (uint32_t)SYSINFO_CLK);
    neorv32_uart_printf("NEORV32: Processor running at %u Hz\n", (uint32_t)NEORV32_SYSINFO.CLK);
    neorv32_uart_printf("NEORV32: Executing Dhrystone (%u iterations). This may take some time...\n\n", (uint32_t)DHRY_ITERS);
    neorv32_uart_printf("NEORV32: Executing Dhrystone (%u iterations). This may take some time...\n\n", (uint32_t)DHRY_ITERS);
 
 
    // clear cycle counter
    // clear cycle counter
    neorv32_cpu_set_mcycle(0);
    neorv32_cpu_set_mcycle(0);
 
 
Line 341... Line 341...
                        / (float) User_Time;
                        / (float) User_Time;
#endif
#endif
*/
*/
  { /* *****  NEORV32-SPECIFIC ***** */
  { /* *****  NEORV32-SPECIFIC ***** */
    neorv32_uart_printf ("Microseconds for one run through Dhrystone: ");
    neorv32_uart_printf ("Microseconds for one run through Dhrystone: ");
    neorv32_uart_printf ("%u \n", (uint32_t)(((User_Time/SYSINFO_CLK) * Mic_secs_Per_Second) / Number_Of_Runs));
    neorv32_uart_printf ("%u \n", (uint32_t)(((User_Time/NEORV32_SYSINFO.CLK) * Mic_secs_Per_Second) / Number_Of_Runs));
    neorv32_uart_printf ("Dhrystones per Second:                      ");
    neorv32_uart_printf ("Dhrystones per Second:                      ");
    neorv32_uart_printf ("%u \n", (uint32_t)(Number_Of_Runs / (User_Time/SYSINFO_CLK)));
    neorv32_uart_printf ("%u \n", (uint32_t)(Number_Of_Runs / (User_Time/NEORV32_SYSINFO.CLK)));
    neorv32_uart_printf ("\n");
    neorv32_uart_printf ("\n");
 
 
    uint32_t dhry_per_sec = (uint32_t)(Number_Of_Runs / (User_Time/SYSINFO_CLK));
    uint32_t dhry_per_sec = (uint32_t)(Number_Of_Runs / (User_Time/NEORV32_SYSINFO.CLK));
    uint32_t vax_per_sec = dhry_per_sec / 1757;
    uint32_t vax_per_sec = dhry_per_sec / 1757;
 
 
neorv32_uart_printf("NEORV32: << DETAILED RESULTS (integer parts only) >>\n");
neorv32_uart_printf("NEORV32: << DETAILED RESULTS (integer parts only) >>\n");
neorv32_uart_printf("NEORV32: Total cycles:      %u\n", (uint32_t)User_Time);
neorv32_uart_printf("NEORV32: Total cycles:      %u\n", (uint32_t)User_Time);
neorv32_uart_printf("NEORV32: Cycles per second: %u\n", (uint32_t)SYSINFO_CLK);
neorv32_uart_printf("NEORV32: Cycles per second: %u\n", (uint32_t)NEORV32_SYSINFO.CLK);
neorv32_uart_printf("NEORV32: Total runs:        %u\n", (uint32_t)Number_Of_Runs);
neorv32_uart_printf("NEORV32: Total runs:        %u\n", (uint32_t)Number_Of_Runs);
 
 
neorv32_uart_printf("\n");
neorv32_uart_printf("\n");
neorv32_uart_printf("NEORV32: DMIPS/s:           %u\n", (uint32_t)dhry_per_sec);
neorv32_uart_printf("NEORV32: DMIPS/s:           %u\n", (uint32_t)dhry_per_sec);
neorv32_uart_printf("NEORV32: DMIPS/MHz:         %u\n", (uint32_t)(dhry_per_sec / (SYSINFO_CLK / 1000000)));
neorv32_uart_printf("NEORV32: DMIPS/MHz:         %u\n", (uint32_t)(dhry_per_sec / (NEORV32_SYSINFO.CLK / 1000000)));
 
 
neorv32_uart_printf("\n");
neorv32_uart_printf("\n");
neorv32_uart_printf("NEORV32: VAX DMIPS/s:       %u\n", (uint32_t)vax_per_sec);
neorv32_uart_printf("NEORV32: VAX DMIPS/s:       %u\n", (uint32_t)vax_per_sec);
neorv32_uart_printf("NEORV32: VAX DMIPS/MHz:     %u/%u\n", (uint32_t)vax_per_sec, (uint32_t)(SYSINFO_CLK / 1000000));
neorv32_uart_printf("NEORV32: VAX DMIPS/MHz:     %u/%u\n", (uint32_t)vax_per_sec, (uint32_t)(NEORV32_SYSINFO.CLK / 1000000));
  } /* ***** /NEORV32-SPECIFIC ***** */
  } /* ***** /NEORV32-SPECIFIC ***** */
  /*
  /*
    neorv32_uart_printf ("Microseconds for one run through Dhrystone: ");
    neorv32_uart_printf ("Microseconds for one run through Dhrystone: ");
    //neorv32_uart_printf ("%6.1f \n", Microseconds);
    //neorv32_uart_printf ("%6.1f \n", Microseconds);
    neorv32_uart_printf ("%d \n", (int)Microseconds);
    neorv32_uart_printf ("%d \n", (int)Microseconds);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.