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!

Re: A question about reading data from an external file

I normally use the standard "C" functions (ie fread/fwrite, fscanf/fprintf) and those are not happy with the ap_int types. Better to read things in using regular ints and cast them across later. In your case, something like this might work:

Re: A question about reading data from an external file

Thank you. Yes, it can work. But if the data type is ap_int<72>, this means it cannot be indicated by normal int. In this case, what should I do? Bye the way, I try to define a float variable to receive data from external file and convert it ap_int. Do you have any other more effective method?

From this point of view, I don't think Vivado HLS support reading file efficiently and effectively.