mirror of
https://github.com/stnolting/neorv32.git
synced 2025-04-23 21:57:33 -04:00
minor updates due to new SYSINFO component
This commit is contained in:
parent
24aaad85f5
commit
33d74f4604
2 changed files with 3 additions and 3 deletions
|
@ -108,7 +108,7 @@ CORE_TICKS get_time(void) {
|
|||
*/
|
||||
secs_ret time_in_secs(CORE_TICKS ticks) {
|
||||
//secs_ret retval=((secs_ret)ticks) / (secs_ret)EE_TICKS_PER_SEC;
|
||||
secs_ret retval=(secs_ret)(ticks / neorv32_cpu_csr_read(CSR_MCLOCK));
|
||||
secs_ret retval=(secs_ret)(ticks / SYSINFO_CLK);
|
||||
return retval;
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ void portable_init(core_portable *p, int *argc, char *argv[])
|
|||
// setup neorv32 UART
|
||||
neorv32_uart_setup(BAUD_RATE, 0, 0);
|
||||
|
||||
neorv32_uart_printf("NEORV32: Processor running at %u Hz\n", (uint32_t)neorv32_cpu_csr_read(CSR_MCLOCK));
|
||||
neorv32_uart_printf("NEORV32: Processor running at %u Hz\n", (uint32_t)SYSINFO_CLK);
|
||||
neorv32_uart_printf("NEORV32: Executing coremark (%u iterations). This may take some time...\n\n", (uint32_t)ITERATIONS);
|
||||
|
||||
if (sizeof(ee_ptr_int) != sizeof(ee_u8 *)) {
|
||||
|
|
|
@ -185,7 +185,7 @@ void set_speed(void) {
|
|||
}
|
||||
|
||||
// print new clock frequency
|
||||
uint32_t clock = neorv32_cpu_csr_read(CSR_MCLOCK);
|
||||
uint32_t clock = SYSINFO_CLK;
|
||||
switch (prsc) {
|
||||
case 0: clock = clock / 2; break;
|
||||
case 1: clock = clock / 4; break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue