stipcores library
Collection of Software Drivers for Hardware IP Cores for the Panoradio SDR
Public Member Functions | List of all members
AXIS_FIFO Class Reference

Class for the. More...

#include <Axis_FIFO.h>

Public Member Functions

 AXIS_FIFO (int base_address, int size_in_k, int depth)
 class constructor More...
 
 ~AXIS_FIFO ()
 class deconstructor
 
void reset ()
 resets the FIFO
 
int read_single_data (int &data)
 reads one data (1 sample, 32 bit) out of the FIFO More...
 
int read_block_data (int data[], int size)
 reads a block of data (32 bit/word) out of the FIFO More...
 
int get_fifo_occupancy ()
 reads the number of available samples More...
 
bool is_full ()
 checks if FIFO is full More...
 
bool is_empty ()
 checks if FIFO is empty More...
 

Detailed Description

Class for the.

Constructor & Destructor Documentation

AXIS_FIFO::AXIS_FIFO ( int  base_address,
int  size_in_k,
int  depth 
)
inline

class constructor

Parameters
base_adressaddress of the spi core (from Vivado), e.g. 0x44C00000
size_in_ksize of the required adress space in k (from Vivado)
depthsize of the FIFO in samples (from Vivado)

Member Function Documentation

int AXIS_FIFO::get_fifo_occupancy ( )
inline

reads the number of available samples

Returns
fifo occupancy
bool AXIS_FIFO::is_empty ( )
inline

checks if FIFO is empty

Returns
true: FIFO empty, false: FIFO not empty
bool AXIS_FIFO::is_full ( )
inline

checks if FIFO is full

Returns
true: FIFO full, false: FIFO not full
int AXIS_FIFO::read_block_data ( int  data[],
int  size 
)
inline

reads a block of data (32 bit/word) out of the FIFO

Parameters
data[]array, that will contain the data
sizesize of the block to be read (=size of data[])
Returns
error code: 0: no error, -1: FIFO does not contain "size" samples
int AXIS_FIFO::read_single_data ( int &  data)
inline

reads one data (1 sample, 32 bit) out of the FIFO

Parameters
dataone data sample from the FIFO
Returns
error code: 0: no error, -1: FIFO is empty

The documentation for this class was generated from the following file: