#include "xf_utils_hw/axi_to_stream.hpp"
template < int _BurstLen = 32, int _WAxi, typename _TStrm > void axiToCharStream ( ap_uint <_WAxi>* rbuf, hls::stream <_TStrm>& ostrm, hls::stream <bool>& e_ostrm, const int len, const int offset = 0 )
Loading char data from AXI master to stream.
This primitive relaxes the alignment requirement, and actually load data by 8-bit char. The 8-bit chars are packed as output stream wide word. The last word may contain invalid data in high-bits if enough char has already been packed.
The alignment width is assumed to be multiple of 8-bit char. The AXI master port width is power of two, and no less than 8.
+-----------------------------------------------------------------+
| DDR -> AXI_BUS -> FIFO -> stream |
| XXX1 XXX1234567812345_6781234567812345 XXX12345 1234 |
| ... ... 67812345 5678 |
| ... ... |
| 32XX 6780000321XXXXXX_XXXXXXXXXXXXXXXX 21XXXXXX 21XX |
+-----------------------------------------------------------------+
Parameters:
_BurstLen | burst length of AXI buffer, default is 32. |
_WAxi | width of AXI port, must be power of 2 and between 8 to 512. |
_TStrm | stream’s type. |
rbuf | input AXI port. |
ostrm | output stream. |
e_ostrm | end flag for output stream. |
len | number of char to load from AXI port. |
offset | offset from the beginning of the buffer, in number of char. |