Functions for loading instructions and stepping execution.
More...
|
| EPIO_EXPORT void | epio_set_instr (epio_t *epio, uint8_t block, uint8_t instr_num, uint16_t instr) |
| | Write a PIO instruction into the instruction memory of a block.
|
| |
| EPIO_EXPORT uint16_t | epio_get_instr (epio_t *epio, uint8_t block, uint8_t instr_num) |
| | Read a PIO instruction from the instruction memory of a block.
|
| |
| EPIO_EXPORT void | epio_step_cycles (epio_t *epio, uint32_t cycles) |
| | Advance all enabled state machines by a number of clock cycles.
|
| |
| EPIO_EXPORT uint64_t | epio_get_cycle_count (epio_t *epio) |
| | Return the total number of cycles executed since last reset.
|
| |
| EPIO_EXPORT void | epio_reset_cycle_count (epio_t *epio) |
| | Reset the cycle counter to zero.
|
| |
Functions for loading instructions and stepping execution.
◆ epio_get_cycle_count()
| EPIO_EXPORT uint64_t epio_get_cycle_count |
( |
epio_t * |
epio | ) |
|
Return the total number of cycles executed since last reset.
- Parameters
-
- Returns
- Total cycle count.
- See also
- epio_reset_cycle_count()
◆ epio_get_instr()
| EPIO_EXPORT uint16_t epio_get_instr |
( |
epio_t * |
epio, |
|
|
uint8_t |
block, |
|
|
uint8_t |
instr_num |
|
) |
| |
Read a PIO instruction from the instruction memory of a block.
- Parameters
-
| epio | The epio instance. |
| block | PIO block index (0 to NUM_PIO_BLOCKS-1). |
| instr_num | Instruction slot (0 to NUM_INSTRS_PER_BLOCK-1). |
- Returns
- The encoded 16-bit PIO instruction at that slot.
- See also
- epio_set_instr()
◆ epio_reset_cycle_count()
| EPIO_EXPORT void epio_reset_cycle_count |
( |
epio_t * |
epio | ) |
|
◆ epio_set_instr()
| EPIO_EXPORT void epio_set_instr |
( |
epio_t * |
epio, |
|
|
uint8_t |
block, |
|
|
uint8_t |
instr_num, |
|
|
uint16_t |
instr |
|
) |
| |
Write a PIO instruction into the instruction memory of a block.
- Parameters
-
| epio | The epio instance. |
| block | PIO block index (0 to NUM_PIO_BLOCKS-1). |
| instr_num | Instruction slot (0 to NUM_INSTRS_PER_BLOCK-1). |
| instr | Encoded 16-bit PIO instruction. |
- See also
- epio_get_instr()
◆ epio_step_cycles()
| EPIO_EXPORT void epio_step_cycles |
( |
epio_t * |
epio, |
|
|
uint32_t |
cycles |
|
) |
| |
Advance all enabled state machines by a number of clock cycles.
Each enabled SM is stepped exactly cycles clock cycles. SMs stalled on a FIFO condition or IRQ consume cycles but make no forward progress. The global cycle count is incremented by cycles after each call.
- Parameters
-
| epio | The epio instance. |
| cycles | Number of cycles to advance. |
- See also
- epio_get_cycle_count()