#include "xf_utils_hw/pl_datamover.hpp"
template < int WDATA, int LATENCY, int OUTSTANDING, int BURSTLEN > void read4D ( hls::burst_maxi <ap_uint <64>>& descriptor_buffer, hls::burst_maxi <ap_uint <WDATA>>& data, hls::stream <ap_axiu <WDATA, 0, 0, 0>>& w_data )
datamover for reading multiple 4D cuboids. It will read the descriptors, access data as descriptors demand and feed data to AXI stream. Descriptors are stored in descriptor buffer, which starts with 64 bit integer which represent number of descriptors inside the buffer. It’s followed by one or multiple descritpors, each of which consists 9 x 64bits interger, cfg[0], cfg[1] .. cfg[8]. All descriptors will be processed one by one, from the first to the last. Each descriptor represent the access pattern of 4D cuboid, which could be treated like a 4-layer nested loop. Please take reference from design internal doc page for details of descriptor format.
Parameters:
| WDATA | Bit width of data element |
| LATENCY | MAXI port latency, should be the same with pragma setup |
| OUTSTANDING | MAXI port read/write outstanding, should be the same with pragma setup |
| BURSTLEN | MAXI port read/write burst length, should be the same with pragma setup |
| descriptor_buffer | Buffer that stores one or multiple descriptors. |
| data | Buffer that contains data to be accessed |
| w_data | AXI Stream which data will be written to. |