12 #include "IP_Driver.h" 23 void wait_ms(
int t_ms) {
27 for (
int j=0; j < t_ms; j++)
28 for (
int i=0; i<50000; i++)
45 AXIS_FIFO(
int base_address,
int size_in_k,
int depth) {
46 axis_fifo_core_ =
new IP_Driver(base_address, size_in_k);
49 full_threshold_ = depth;
55 delete axis_fifo_core_;
61 axis_fifo_core_ -> write(0x18,0xa5);
69 if (get_fifo_occupancy() <= empty_threshold_)
return -1;
70 data = axis_fifo_core_ -> read(0x20);
80 if (get_fifo_occupancy() < (size + empty_threshold_))
return -1;
82 for (
int j=0; j< 50; j++)
83 data[j] = axis_fifo_core_ -> read(0x20);
92 return axis_fifo_core_ -> read(0x1C);
99 if (axis_fifo_core_ -> read(0x1C) >= full_threshold_)
109 if (axis_fifo_core_ -> read(0x1C) <= empty_threshold_)
~AXIS_FIFO()
class deconstructor
Definition: Axis_FIFO.h:54
bool is_empty()
checks if FIFO is empty
Definition: Axis_FIFO.h:108
void reset()
resets the FIFO
Definition: Axis_FIFO.h:60
Generic IP Driver Class Class, that allows access to a AXI Lite IP core over the Zynq Memory Mapped I...
Definition: IP_Driver.h:14
int read_block_data(int data[], int size)
reads a block of data (32 bit/word) out of the FIFO
Definition: Axis_FIFO.h:79
int get_fifo_occupancy()
reads the number of available samples
Definition: Axis_FIFO.h:91
int read_single_data(int &data)
reads one data (1 sample, 32 bit) out of the FIFO
Definition: Axis_FIFO.h:68
Class for the.
Definition: Axis_FIFO.h:18
AXIS_FIFO(int base_address, int size_in_k, int depth)
class constructor
Definition: Axis_FIFO.h:45
bool is_full()
checks if FIFO is full
Definition: Axis_FIFO.h:98