NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
|
Stream Link Interface HW driver header file. More...
#include <stdint.h>
Go to the source code of this file.
Data Structures | |
struct | neorv32_slink_t |
Functions | |
Prototypes | |
int | neorv32_slink_available (void) |
void | neorv32_slink_setup (uint32_t rx_irq, uint32_t tx_irq) |
void | neorv32_slink_rx_clear (void) |
void | neorv32_slink_tx_clear (void) |
int | neorv32_slink_get_rx_fifo_depth (void) |
int | neorv32_slink_get_tx_fifo_depth (void) |
uint32_t | neorv32_slink_get (void) |
uint32_t | neorv32_slink_check_last (void) |
void | neorv32_slink_set_dst (uint32_t dst) |
uint32_t | neorv32_slink_get_src (void) |
void | neorv32_slink_put (uint32_t tx_data) |
void | neorv32_slink_put_last (uint32_t tx_data) |
int | neorv32_slink_rx_status (void) |
int | neorv32_slink_tx_status (void) |
IO Device: Stream Link Interface (SLINK) | |
#define | NEORV32_SLINK ((neorv32_slink_t*) (NEORV32_SLINK_BASE)) |
enum | NEORV32_SLINK_CTRL_enum { SLINK_CTRL_EN = 0 , SLINK_CTRL_RX_CLR = 1 , SLINK_CTRL_TX_CLR = 2 , SLINK_CTRL_RX_LAST = 4 , SLINK_CTRL_RX_EMPTY = 8 , SLINK_CTRL_RX_HALF = 9 , SLINK_CTRL_RX_FULL = 10 , SLINK_CTRL_TX_EMPTY = 11 , SLINK_CTRL_TX_HALF = 12 , SLINK_CTRL_TX_FULL = 13 , SLINK_CTRL_IRQ_RX_NEMPTY = 16 , SLINK_CTRL_IRQ_RX_HALF = 17 , SLINK_CTRL_IRQ_RX_FULL = 18 , SLINK_CTRL_IRQ_TX_EMPTY = 19 , SLINK_CTRL_IRQ_TX_NHALF = 20 , SLINK_CTRL_IRQ_TX_NFULL = 21 , SLINK_CTRL_RX_FIFO_LSB = 24 , SLINK_CTRL_RX_FIFO_MSB = 27 , SLINK_CTRL_TX_FIFO_LSB = 28 , SLINK_CTRL_TX_FIFO_MSB = 31 } |
enum | NEORV32_SLINK_ROUTE_enum { SLINK_ROUTE_DST_LSB = 0 , SLINK_ROUTE_DST_MSB = 3 , SLINK_ROUTE_SRC_LSB = 4 , SLINK_ROUTE_SRC_MSB = 7 } |
enum | NEORV32_SLINK_STATUS_enum { SLINK_FIFO_EMPTY = 0 , SLINK_FIFO_HALF = 1 , SLINK_FIFO_FULL = 2 } |
Stream Link Interface HW driver header file.
#define NEORV32_SLINK ((neorv32_slink_t*) (NEORV32_SLINK_BASE)) |
SLINK module hardware access (neorv32_slink_t)
SLINK control register bits
ROUTE register bits
SLINK module hardware access (neorv32_slink_t)
Enumerator | |
---|---|
SLINK_FIFO_EMPTY | FIFO is empty |
SLINK_FIFO_HALF | FIFO is at least half full |
SLINK_FIFO_FULL | FIFO is full |
int neorv32_slink_available | ( | void | ) |
Check if stream link interface was synthesized.
|
inline |
Check if last RX word has "end-of-stream" delimiter.
|
inline |
Read data from RX link (non-blocking)
int neorv32_slink_get_rx_fifo_depth | ( | void | ) |
Get FIFO depth of RX link.
|
inline |
Get RX link routing source
int neorv32_slink_get_tx_fifo_depth | ( | void | ) |
Get FIFO depth of TX link.
|
inline |
Write data to TX link (non-blocking)
[in] | tx_data | Data to send to link. |
|
inline |
Write data to TX link (non-blocking) and set "last" (end-of-stream) delimiter.
[in] | tx_data | Data to send to link. |
void neorv32_slink_rx_clear | ( | void | ) |
Clear RX FIFO.
int neorv32_slink_rx_status | ( | void | ) |
Get RX link FIFO status.
|
inline |
Set TX link routing destination
[in] | dst | Routing destination ID (4-bit, LSB-aligned). |
void neorv32_slink_setup | ( | uint32_t | rx_irq, |
uint32_t | tx_irq ) |
Reset, enable and configure SLINK.
[in] | rx_irq | Configure RX interrupt conditions (NEORV32_SLINK_CTRL_enum). |
[in] | tx_irq | Configure TX interrupt conditions (NEORV32_SLINK_CTRL_enum). |
void neorv32_slink_tx_clear | ( | void | ) |
Clear TX FIFO.
int neorv32_slink_tx_status | ( | void | ) |
Get TX link FIFO status.