URL
https://opencores.org/ocsvn/neorv32/neorv32/trunk
[/] [neorv32/] [trunk/] [sw/] [lib/] [source/] [neorv32_rte.c] - Diff between revs 34 and 35
Go to most recent revision |
Show entire file |
Details |
Blame |
View Log
Rev 34 |
Rev 35 |
Line 225... |
Line 225... |
case TRAP_CODE_FIRQ_3: neorv32_uart_print("Fast interrupt 3"); break;
|
case TRAP_CODE_FIRQ_3: neorv32_uart_print("Fast interrupt 3"); break;
|
default: neorv32_uart_print("Unknown trap cause: "); __neorv32_rte_print_hex_word(trap_cause); break;
|
default: neorv32_uart_print("Unknown trap cause: "); __neorv32_rte_print_hex_word(trap_cause); break;
|
}
|
}
|
|
|
// instruction address
|
// instruction address
|
neorv32_uart_print(" @ ");
|
neorv32_uart_print(" @ PC=");
|
__neorv32_rte_print_hex_word(neorv32_cpu_csr_read(CSR_MSCRATCH)); // rte core stores actual mepc to mscratch
|
__neorv32_rte_print_hex_word(neorv32_cpu_csr_read(CSR_MSCRATCH)); // rte core stores actual mepc to mscratch
|
|
|
// additional info
|
// additional info
|
neorv32_uart_print(", MTVAL=");
|
neorv32_uart_print(", MTVAL=");
|
__neorv32_rte_print_hex_word(neorv32_cpu_csr_read(CSR_MTVAL));
|
__neorv32_rte_print_hex_word(neorv32_cpu_csr_read(CSR_MTVAL));
|
Line 324... |
Line 324... |
}
|
}
|
}
|
}
|
|
|
neorv32_uart_printf("\n- Min granularity: ");
|
neorv32_uart_printf("\n- Min granularity: ");
|
if (i < 29) {
|
if (i < 29) {
|
neorv32_uart_printf("%u bytes per region (0x%x)\n", (uint32_t)(1 << (i+1+2)), pmp_test_g);
|
neorv32_uart_printf("%u bytes per region\n", (uint32_t)(1 << (i+1+2)));
|
}
|
}
|
else {
|
else {
|
neorv32_uart_printf("2^%u bytes per region\n", i+1+2);
|
neorv32_uart_printf("2^%u bytes per region\n", i+1+2);
|
}
|
}
|
|
|
Line 483... |
Line 483... |
|
|
tmp = (char)(neorv32_cpu_csr_read(CSR_MIMPID) >> (24 - 8*i));
|
tmp = (char)(neorv32_cpu_csr_read(CSR_MIMPID) >> (24 - 8*i));
|
|
|
// serial division
|
// serial division
|
cnt = 0;
|
cnt = 0;
|
while (tmp >= 10) {
|
while (tmp >= 16) {
|
tmp = tmp - 10;
|
tmp = tmp - 16;
|
cnt++;
|
cnt++;
|
}
|
}
|
|
|
if (cnt) {
|
if (cnt) {
|
neorv32_uart_putc('0' + cnt);
|
neorv32_uart_putc('0' + cnt);
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.