I am working on the PYNQ Z2 board. I am able to generate ip-core from MATLAB and overlay it to PYNQ, i am hoping that i can use the FPGA portion to accelerate some calculations in the future. this is the block diagram that i am testing with, it is essentially c = (a+b) * b
However I faced this problem where the data type is not detected in my notebook. Example if i set data type to be 32b fixed point (1 sign + 16 int + 15 fraction). i will obtain this result
and as (1+1)*1 should be 2.
Then with the help of this community i discovered that if i put 32769(1000000000000000(15 zeros), then it will work fine as shown below. where 32769 ==1 and 32770 ==2.
This error can be fixed if i use 32b uint. as seen below. However, if this is the case then i wont be able to use decimals and negative numbers, which would not be ideal.
Does anyone know how to configure data types so that it will be able to use fixed point format? other than creating a seperate python function for conversion as it would not be time efficient. Thank you in advance