NEORV32 - Software Framework Documentation
|
CPU Core Functions HW driver header file. More...
Go to the source code of this file.
CPU Core Functions HW driver header file.
|
inline |
Restore all integer registers from the stack.
|
inline |
Save all integer registers to the stack.
|
inline |
Clear bit(s) in CPU control and status register (CSR).
[in] | csr_id | ID of CSR to write. See NEORV32_CSR_enum. |
[in] | mask | Bit mask (high-active) to clear bits (uint32_t). |
|
inline |
Read data from CPU control and status register (CSR).
[in] | csr_id | ID of CSR to read. See NEORV32_CSR_enum. |
|
inline |
Set bit(s) in CPU control and status register (CSR).
[in] | csr_id | ID of CSR to write. See NEORV32_CSR_enum. |
[in] | mask | Bit mask (high-active) to set bits (uint32_t). |
|
inline |
Write data to CPU control and status register (CSR).
[in] | csr_id | ID of CSR to write. See NEORV32_CSR_enum. |
[in] | data | Data to write (uint32_t). |
void neorv32_cpu_delay_ms | ( | uint32_t | time_ms | ) |
Delay function using busy wait.
[in] | time_ms | Time in ms to wait (unsigned 32-bit). |
uint32_t neorv32_cpu_get_clk_from_prsc | ( | int | prsc | ) |
Get actual clocking frequency from prescaler select NEORV32_CLOCK_PRSC_enum
[in] | prsc | Prescaler select NEORV32_CLOCK_PRSC_enum. return Actual raw clock frequency in Hz. |
uint64_t neorv32_cpu_get_cycle | ( | void | ) |
Unavailable extensions warnings. Get cycle counter from cycle[h].
uint64_t neorv32_cpu_get_instret | ( | void | ) |
Get retired instructions counter from instret[h].
void neorv32_cpu_goto_user_mode | ( | void | ) |
Switch from privilege mode MACHINE to privilege mode USER.
uint32_t neorv32_cpu_hpm_get_num_counters | ( | void | ) |
Hardware performance monitors (HPM): Get number of available HPM counters.
uint32_t neorv32_cpu_hpm_get_size | ( | void | ) |
Hardware performance monitors (HPM): Get total counter width
|
inline |
Atomic memory access: invalidate (all) current reservation sets
|
inline |
Atomic memory access: load-reservate word.
[in] | addr | Address (32-bit). |
|
inline |
Load signed byte from address space.
[in] | addr | Address (32-bit). |
|
inline |
Load signed half-word from address space.
[in] | addr | Address (32-bit). |
|
inline |
Load unsigned byte from address space.
[in] | addr | Address (32-bit). |
|
inline |
Load unsigned half-word from address space.
[in] | addr | Address (32-bit). |
|
inline |
Load unsigned word from address space.
[in] | addr | Address (32-bit). |
int neorv32_cpu_pmp_configure_region | ( | int | index, |
uint32_t | addr, | ||
uint8_t | config ) |
Physical memory protection (PMP): Configure region.
[in] | index | Region number (index, 0..PMP_NUM_REGIONS-1). |
[in] | addr | Region address (word address!). |
[in] | config | Region configuration byte (see NEORV32_PMPCFG_ATTRIBUTES_enum). |
uint32_t neorv32_cpu_pmp_get_granularity | ( | void | ) |
Physical memory protection (PMP): Get minimal region size (granularity).
uint32_t neorv32_cpu_pmp_get_num_regions | ( | void | ) |
Physical memory protection (PMP): Get number of available regions.
void neorv32_cpu_set_mcycle | ( | uint64_t | value | ) |
Set machine cycle counter mcycle[h].
[in] | value | New value for mcycle[h] CSR (64-bit). |
void neorv32_cpu_set_minstret | ( | uint64_t | value | ) |
Set machine retired instructions counter minstret[h].
[in] | value | New value for mcycle[h] CSR (64-bit). |
|
inline |
Put CPU into sleep / power-down mode.
|
inline |
Atomic memory access: store-conditional word.
[in] | addr | Address (32-bit). |
[in] | wdata | Data word to-be-written conditionally (32-bit). |
|
inline |
Store unsigned byte to address space.
[in] | addr | Address (32-bit). |
[in] | wdata | Data byte (8-bit) to store. |
|
inline |
Store unsigned half-word to address space.
[in] | addr | Address (32-bit). |
[in] | wdata | Data half-word (16-bit) to store. |
|
inline |
Store unsigned word to address space.
[in] | addr | Address (32-bit). |
[in] | wdata | Data word (32-bit) to store. |