![]() |
NEORV32 - Software Framework Documentation
|
Atomic memory access (read-modify-write) emulation functions using LR/SC pairs - source file. More...
Functions | |
uint32_t | neorv32_cpu_amoswapw (uint32_t addr, uint32_t wdata) |
uint32_t | neorv32_cpu_amoaddw (uint32_t addr, uint32_t wdata) |
uint32_t | neorv32_cpu_amoandw (uint32_t addr, uint32_t wdata) |
uint32_t | neorv32_cpu_amoorw (uint32_t addr, uint32_t wdata) |
uint32_t | neorv32_cpu_amoxorw (uint32_t addr, uint32_t wdata) |
int32_t | neorv32_cpu_amomaxw (uint32_t addr, int32_t wdata) |
uint32_t | neorv32_cpu_amomaxuw (uint32_t addr, uint32_t wdata) |
int32_t | neorv32_cpu_amominw (uint32_t addr, int32_t wdata) |
uint32_t | neorv32_cpu_amominuw (uint32_t addr, uint32_t wdata) |
static int32_t | MAX (int32_t a, int32_t b) |
static int32_t | MIN (int32_t a, int32_t b) |
static int32_t | MAXU (uint32_t a, uint32_t b) |
static int32_t | MINU (uint32_t a, uint32_t b) |
Atomic memory access (read-modify-write) emulation functions using LR/SC pairs - source file.
|
inlinestatic |
MIN/MAX helpers.
|
inlinestatic |
MIN/MAX helpers.
|
inlinestatic |
MIN/MAX helpers.
|
inlinestatic |
MIN/MAX helpers.
uint32_t neorv32_cpu_amoaddw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic ADD (AMOADD.W). return <= MEM[addr]; MEM[addr] <= MEM[addr] + wdata
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically added to original data at address (32-bit). |
uint32_t neorv32_cpu_amoandw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic AND (AMOAND.W). return <= MEM[addr]; MEM[addr] <= MEM[addr] and wdata
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically AND-ed with original data at address (32-bit). |
uint32_t neorv32_cpu_amomaxuw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic unsigned MAX (AMOMAXU.W). return <= MEM[addr]; MEM[addr] <= maximum_unsigned(MEM[addr], wdata)
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically MAX-ed with original data at address (unsigned 32-bit). |
int32_t neorv32_cpu_amomaxw | ( | uint32_t | addr, |
int32_t | wdata | ||
) |
Atomic signed MAX (AMOMAX.W). return <= MEM[addr]; MEM[addr] <= maximum_signed(MEM[addr], wdata)
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically MAX-ed with original data at address (signed 32-bit). |
uint32_t neorv32_cpu_amominuw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic unsigned MIN (AMOMINU.W). return <= MEM[addr]; MEM[addr] <= minimum_unsigned(MEM[addr], wdata)
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically MIN-ed with original data at address (unsigned 32-bit). |
int32_t neorv32_cpu_amominw | ( | uint32_t | addr, |
int32_t | wdata | ||
) |
Atomic signed MIN (AMOMIN.W). return <= MEM[addr]; MEM[addr] <= minimum_signed(MEM[addr], wdata)
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically MIN-ed with original data at address (signed 32-bit). |
uint32_t neorv32_cpu_amoorw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic OR (AMOOR.W). return <= MEM[addr]; MEM[addr] <= MEM[addr] or wdata
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically OR-ed with original data at address (32-bit). |
uint32_t neorv32_cpu_amoswapw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic SWAP (AMOSWAP.W). return <= MEM[addr]; MEM[addr] <= wdata
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically stored to address (32-bit). |
uint32_t neorv32_cpu_amoxorw | ( | uint32_t | addr, |
uint32_t | wdata | ||
) |
Atomic XOR (AMOXOR.W). return <= MEM[addr]; MEM[addr] <= MEM[addr] xor wdata
[in] | addr | 32-bit memory address, word-aligned. |
[in] | wdata | Data word to be atomically XOR-ed with original data at address (32-bit). |