I am implementing a really simple multiplier IP in Vitis HLS 2020.2. I am following step by step the tutorial on the PYNQ documentation (Overlay Tutorial — Python productivity for Zynq (Pynq) v1.0)
I basically copy-pasted the code of the multiplier from the documentation, the code is the following (pretty straight forward):
#include <ap_int.h>
#include <ap_axi_sdata.h>
typedef ap_axiu<32,1,1,1> stream_type;
void mult_constant(stream_type* in_data, stream_type* out_data, ap_int<32> constant) {
#pragma HLS INTERFACE s_axilite register port=constant
#pragma HLS INTERFACE ap_ctrl_none port=return
#pragma HLS INTERFACE axis port=in_data
#pragma HLS INTERFACE axis port=out_data
out_data->data = in_data->data * constant;
out_data->dest = in_data->dest;
out_data->id = in_data->id;
out_data->keep = in_data->keep;
out_data->last = in_data->last;
out_data->strb = in_data->strb;
out_data->user = in_data->user;
}
The main problem is that when I synthesize my code, my streams are synthesized with tdata equal to 8, which is obviously wrong.
Any idea of what is going on? I also read the documentation of Vitis HLS, and the typedef is correct (at least as far as i know), and the code is basically copy pasted from the PYNQ documentation.