Functions for simulating RP2350 SRAM access from PIO programs.
More...
|
| EPIO_EXPORT uint8_t | epio_sram_read_byte (epio_t *epio, uint32_t addr) |
| | Read a byte from the emulated SRAM.
|
| |
| EPIO_EXPORT void | epio_sram_set (epio_t *epio, uint32_t addr, uint8_t *data, size_t len) |
| | Write a block of data into the emulated SRAM.
|
| |
| EPIO_EXPORT uint16_t | epio_sram_read_halfword (epio_t *epio, uint32_t addr) |
| | Read a halfword (16-bit) from the emulated SRAM.
|
| |
| EPIO_EXPORT uint32_t | epio_sram_read_word (epio_t *epio, uint32_t addr) |
| | Read a word (32-bit) from the emulated SRAM.
|
| |
| EPIO_EXPORT void | epio_sram_write_byte (epio_t *epio, uint32_t addr, uint8_t value) |
| | Write a byte to the emulated SRAM.
|
| |
| EPIO_EXPORT void | epio_sram_write_halfword (epio_t *epio, uint32_t addr, uint16_t value) |
| | Write a halfword (16-bit) to the emulated SRAM.
|
| |
| EPIO_EXPORT void | epio_sram_write_word (epio_t *epio, uint32_t addr, uint32_t value) |
| | Write a word (32-bit) to the emulated SRAM.
|
| |
Functions for simulating RP2350 SRAM access from PIO programs.
These functions allow tests to set up and inspect SRAM contents, simulating the RP2350 memory map for PIO programs that read or write SRAM via DMA or direct addressing.
◆ epio_sram_read_byte()
| EPIO_EXPORT uint8_t epio_sram_read_byte |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr |
|
) |
| |
Read a byte from the emulated SRAM.
- Parameters
-
| epio | The epio instance. |
| addr | SRAM address to read. |
- Returns
- The byte value at
addr.
◆ epio_sram_read_halfword()
| EPIO_EXPORT uint16_t epio_sram_read_halfword |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr |
|
) |
| |
Read a halfword (16-bit) from the emulated SRAM.
- Parameters
-
| epio | The epio instance. |
| addr | SRAM address to read. Must be 2-byte aligned. |
- Returns
- The 16-bit value at
addr.
◆ epio_sram_read_word()
| EPIO_EXPORT uint32_t epio_sram_read_word |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr |
|
) |
| |
Read a word (32-bit) from the emulated SRAM.
- Parameters
-
| epio | The epio instance. |
| addr | SRAM address to read. Must be 4-byte aligned. |
- Returns
- The 32-bit value at
addr.
◆ epio_sram_set()
| EPIO_EXPORT void epio_sram_set |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
Write a block of data into the emulated SRAM.
Copies len bytes from data into the emulated SRAM starting at addr. Use this to pre-populate SRAM with test data before execution.
- Parameters
-
| epio | The epio instance. |
| addr | Starting SRAM address. |
| data | Pointer to source data. |
| len | Number of bytes to write. |
◆ epio_sram_write_byte()
| EPIO_EXPORT void epio_sram_write_byte |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr, |
|
|
uint8_t |
value |
|
) |
| |
Write a byte to the emulated SRAM.
- Parameters
-
| epio | The epio instance. |
| addr | SRAM address to write. |
| value | The byte value to write. |
◆ epio_sram_write_halfword()
| EPIO_EXPORT void epio_sram_write_halfword |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr, |
|
|
uint16_t |
value |
|
) |
| |
Write a halfword (16-bit) to the emulated SRAM.
- Parameters
-
| epio | The epio instance. |
| addr | SRAM address to write. Must be 2-byte aligned. |
| value | The 16-bit value to write. |
◆ epio_sram_write_word()
| EPIO_EXPORT void epio_sram_write_word |
( |
epio_t * |
epio, |
|
|
uint32_t |
addr, |
|
|
uint32_t |
value |
|
) |
| |
Write a word (32-bit) to the emulated SRAM.
- Parameters
-
| epio | The epio instance. |
| addr | SRAM address to write. Must be 4-byte aligned. |
| value | The 32-bit value to write. |