Hi there,
I’m trying to get an (extremely basic) function to run on the PYNQ-Z2 board and I’m running into issues when moving from integers to floats. I am writing C++/HLS in Vivado HLS and using Vivado Design Suite to generate bitstreams.
The code is as follows
#define DATA_TYPE int
DATA_TYPE test(DATA_TYPE S, DATA_TYPE K, DATA_TYPE T, DATA_TYPE r, DATA_TYPE v) {
return (S * K) + T + r + v;
}
void mult(DATA_TYPE *pCall, DATA_TYPE S, DATA_TYPE K, DATA_TYPE T, DATA_TYPE r, DATA_TYPE v) {
*pCall = test(S, K, T, r, v);
}
And the HLS directives are
I am using the MMIO module inside Jupyter to read/write to memory, when using the code above this works fine. However, when changing “DATA_TYPE” from int to float, I receive an output of zero. Any ideas on why this would happen/steps to remedy would be much appreciated.
Cheers.
EDIT I’ve added bitstreams, tcl and hwh files along with the notebook to Google Drive, bitstreams etc. are zipped and labelled “integer” (correct output) and “float” (incorrect output).
https://drive.google.com/drive/folders/1-iyCcFJ8aFfSsacLm0aFKwG84c7laUuc?usp=sharing