#include "xf_utils_hw/pl_datamover.hpp"
template < int WDATA, int LATENCY, int OUTSTANDING, int BURSTLEN > void write4D ( hls::burst_maxi <ap_uint <64>>& descriptor_buffer, hls::stream <ap_axiu <WDATA, 0, 0, 0>>& w_data, hls::burst_maxi <ap_uint <WDATA>>& data )
datamover for write multiple 4D cuboids. It will read data from AXI stream, write access data to the address as descriptors demand. 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. |
| w_data | AXI Stream which data will be written to. |
| data | Buffer that contains data to be accessed |