Hi,
I was looking at the the following IP Hierarchies tutorial :
https://pynq.readthedocs.io/en/v2.1/overlay_design_methodology/overlay_tutorial.html
and tried to run c-synthesis on the following .cpp file :
mult_constant.cpp :
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;
}
But got few compilation errors :
INFO: [HLS 200-10] Analyzing design file ‘mult_constant.cpp’ …
ERROR: [HLS 200-70] Compilation errors found: In file included from mult_constant.cpp:1:
mult_constant.cpp:1:9: error: unknown type name ‘ap_axiu’
typedef ap_axiu<32,1,1,1> stream_type;
^
mult_constant.cpp:1:16: error: expected unqualified-id
typedef ap_axiu<32,1,1,1> stream_type;
^
mult_constant.cpp:3:6: error: variable has incomplete type ‘void’
void mult_constant(stream_type* in_data, stream_type* out_data, ap_int<32> constant) {
^
mult_constant.cpp:3:20: error: use of undeclared identifier ‘stream_type’
void mult_constant(stream_type* in_data, stream_type* out_data, ap_int<32> constant) {
^
mult_constant.cpp:3:33: error: use of undeclared identifier ‘in_data’
void mult_constant(stream_type* in_data, stream_type* out_data, ap_int<32> constant) {
^
mult_constant.cpp:3:85: error: expected ‘;’ after top level declarator
void mult_constant(stream_type* in_data, stream_type* out_data, ap_int<32> constant) {
^
;
6 errors generated.
Failed during preprocessing.
while executing
“source C:/Users/kncyp/PYNQ_Z2/multiply_dma/vivado_hls/multiply_dma_prj/solution1/csynth.tcl”
invoked from within
“hls::main C:/Users/kncyp/PYNQ_Z2/multiply_dma/vivado_hls/multiply_dma_prj/solution1/csynth.tcl”
(“uplevel” body line 1)
invoked from within
“uplevel 1 hls::main {*}$args”
(procedure “hls_proc” line 5)
invoked from within
“hls_proc $argv”
Finished C synthesis.
Anyone knows how to resolve them ?