UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
3,592 Views
Registered: ‎07-17-2014

error: 'AXI_STREAM_IN' was not declared in this scope

Jump to solution

when i use vivado hls(2016.2) to run c simulation, The following error occurred:

=====================================

../../../../top.h:10:53: error: 'AXI_STREAM_IN' was not declared in this scope
../../../../top.h:10:53: error: template argument 4 is invalid
../../../../top.h:10:21: error: template argument 1 is invalid
../../../../top.h:10:14: warning: 'typedef' was ignored in this declaration [enabled by default]
../../../../top.h:11:53: error: 'AXI_STREAM_OUT' was not declared in this scope
../../../../top.h:11:53: error: template argument 4 is invalid
../../../../top.h:11:21: error: template argument 1 is invalid
../../../../top.h:11:14: warning: 'typedef' was ignored in this declaration [enabled by default]
../../../../top.h:14:16: error: variable or field 'hls_sobel' declared void
../../../../top.h:14:16: error: 'AXI_STREAM_IN' was not declared in this scope
../../../../top.h:14:32: error: 'src_axi' was not declared in this scope
../../../../top.h:14:41: error: 'AXI_STREAM_OUT' was not declared in this scope
../../../../top.h:14:58: error: 'dst_axi' was not declared in this scope
../../../../top.h:14:67: error: expected primary-expression before 'int'
../../../../top.h:14:77: error: expected primary-expression before 'int'

======================================

 

The top.h file is as follow:

======================================

#ifndef _TOP_H_
#define _TOP_H_
#include"hls_video.h"

#define MAX_WIDTH 1920
#define MAX_HEIGHT 1080
#define INPUT_IMAGE "test_1080p.bmp"
#define OUTPUT_IMAGE "result_1080p.bmp"

typedef hls::stream<ap_axiu<24,1,1,1>> AXI_STREAM_IN;
typedef hls::stream<ap_axiu<24,1,1,1>> AXI_STREAM_OUT;
typedef hls::Mat<MAX_HEIGHT,MAX_WIDTH, HLS_8UC3> RGB_IMAGE;

void hls_sobel(AXI_STREAM_IN & src_axi, AXI_STREAM_OUT & dst_axi, int rows, int cols);

#endif

=========================

Does anyone know what is the cause of the error?

 

 

0 Kudos
1 Solution

Accepted Solutions
Teacher muzaffer
Teacher
6,416 Views
Registered: ‎03-31-2012

Re: error: 'AXI_STREAM_IN' was not declared in this scope

Jump to solution

@avcon_lee

 

>> typedef hls::stream<ap_axiu<24,1,1,1>> AXI_STREAM_IN;

 

change this (and similar lines) to:

 

typedef hls::stream< ap_axiu< 24,1,1,1 > > AXI_STREAM_IN; // note the added spaces.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
3 Replies
Teacher muzaffer
Teacher
6,417 Views
Registered: ‎03-31-2012

Re: error: 'AXI_STREAM_IN' was not declared in this scope

Jump to solution

@avcon_lee

 

>> typedef hls::stream<ap_axiu<24,1,1,1>> AXI_STREAM_IN;

 

change this (and similar lines) to:

 

typedef hls::stream< ap_axiu< 24,1,1,1 > > AXI_STREAM_IN; // note the added spaces.

- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
Explorer
Explorer
3,573 Views
Registered: ‎07-17-2014

Re: error: 'AXI_STREAM_IN' was not declared in this scope

Jump to solution
Thanks for your answer.
0 Kudos
150 Views
Registered: ‎09-18-2019

Re: error: 'AXI_STREAM_IN' was not declared in this scope

Jump to solution

I encountered the same error and your notice helped me

0 Kudos