HI there,
I have a simple fixed-point adder written in HLS. I exported it as an IP core with Axi-lite interface. After completing the design in IP integrator i have written an SDK C++ app.
But the functions that are generated for sending inputs show me that, i need to send u32 Data. But my design is for fixed point.
Can i not send any other datatype like signed or float to IP core other than u32 data.? It looks to me very strange.
Can someone tell me how to deal with it?
How do i send my fixed point data types to fixed point IP core?
fixed point .... you decide
* if you mean fixed point binary or fixed point decimal
* if it is signed or not
* how many integer bits/digits you use
* and how many fractional bits/digits you use.
data_t and u32 are both 32-bit numbers, also standard float type, by the way. You can send any 32-bit entity as u32 parameter, using common C type casting methods.
if it already is in fixed_binary then you don´t need a conversion to binary.
It is just a problem of definition. But 32 bits will be 32 bits.
***
example:
Unsigned integer 8 bits: let´s say the decimal value is "5" --> 0b 0000 0101
now multiply it with decimal 7 and get decimal 35 = 0b 0010 0011
***
now say you define the value as 6.2 unsigned fixed binary.
then decimal "5" is represented as 0b 0001 01|00
now multiply it with decimal 7 and get decimal 35 = 0b 1000 11|00
now focus on the binary value 0b 0001 0100 (formerly seen as decimal "5", but now see it as usual integer binary) then it represents the decimal value "20"
now multiply it with decimal 7 and get the decimal value of 140 = 0b 1000 1100
Did you recognize that the binary values (input and result) remain the same ... and the difference is only in your mind, because you decided it to be 6.2 fixed binary?