NEORV32 Software Framework Documentation
The NEORV32 RISC-V Processor
Loading...
Searching...
No Matches
neorv32_slink.c File Reference

Stream Link Interface HW driver source file. More...

#include <neorv32.h>

Functions

int neorv32_slink_available (void)
 
void neorv32_slink_setup (uint32_t irq_mask)
 
int neorv32_slink_get_rx_fifo_depth (void)
 
int neorv32_slink_get_tx_fifo_depth (void)
 
uint32_t neorv32_slink_get (void)
 
int 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_empty (void)
 
int neorv32_slink_rx_full (void)
 
int neorv32_slink_tx_empty (void)
 
int neorv32_slink_tx_full (void)
 

Detailed Description

Stream Link Interface HW driver source file.

Function Documentation

◆ neorv32_slink_available()

int neorv32_slink_available ( void )

Check if stream link interface was synthesized.

Returns
Zero if SLINK was not synthesized, non-zero if SLINK is available.

◆ neorv32_slink_check_last()

int neorv32_slink_check_last ( void )
inline

Check if last RX word has "end-of-stream" delimiter.

Note
This function must be called AFTER reading the actual data word using #neorv32_slink_put(void).
Returns
Zero if not end of stream, non-zero if end of stream.

◆ neorv32_slink_get()

uint32_t neorv32_slink_get ( void )
inline

Read data from RX link (non-blocking).

Returns
Data received from link.

◆ neorv32_slink_get_rx_fifo_depth()

int neorv32_slink_get_rx_fifo_depth ( void )

Get FIFO depth of RX link.

Returns
FIFO depth of RX link.

◆ neorv32_slink_get_src()

uint32_t neorv32_slink_get_src ( void )
inline

Get RX link routing source.

Note
This function must be called AFTER reading the actual data word using neorv32_slink_get(void).
Returns
4-bit source routing ID.

◆ neorv32_slink_get_tx_fifo_depth()

int neorv32_slink_get_tx_fifo_depth ( void )

Get FIFO depth of TX link.

Returns
FIFO depth of TX link.

◆ neorv32_slink_put()

void neorv32_slink_put ( uint32_t tx_data)
inline

Write data to TX link (non-blocking).

Parameters
[in]tx_dataData to send.

◆ neorv32_slink_put_last()

void neorv32_slink_put_last ( uint32_t tx_data)
inline

Write data to TX link (non-blocking) and set "last" (end-of-stream) delimiter.

Parameters
[in]tx_dataData to send.

◆ neorv32_slink_rx_empty()

int neorv32_slink_rx_empty ( void )

Check if RX FIFO is empty.

Returns
Zero if RX FIFO is not empty, non-zero if RX FIFO is empty.

◆ neorv32_slink_rx_full()

int neorv32_slink_rx_full ( void )

Check if RX FIFO is full.

Returns
Zero if RX FIFO is not full, non-zero if RX FIFO is full.

◆ neorv32_slink_set_dst()

void neorv32_slink_set_dst ( uint32_t dst)
inline

Set TX link routing destination.

Note
This function must be called BEFORE sending the actual data word using neorv32_slink_get(void).
Parameters
[in]dstRouting destination ID (4-bit, LSB-aligned).

◆ neorv32_slink_setup()

void neorv32_slink_setup ( uint32_t irq_mask)

Reset, enable and configure SLINK.

Parameters
[in]irq_maskInterrupt conditions (NEORV32_SLINK_CTRL_enum).

◆ neorv32_slink_tx_empty()

int neorv32_slink_tx_empty ( void )

Check if TX FIFO is empty.

Returns
Zero if RX FIFO is not empty, non-zero if RX FIFO is empty.

◆ neorv32_slink_tx_full()

int neorv32_slink_tx_full ( void )

Check if TX FIFO is full.

Returns
Zero if TX FIFO is not full, non-zero if TX FIFO is full.