cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
kikibillel52
Visitor
Visitor
611 Views
Registered: ‎08-13-2019

need to subtract two numbers/signals, those have different data types -floating-point and fixed-point data types-

Hello,

i need to subtracte two signal, those have different data types: "first_signal: floating-point data type" ;   "second_signal: fixed-point data type".

i am going to prepare a vhdl code to calculate the subtraction of these two inputs. i would like to hear from you and get some suggestion, like what i need to avoid or to take into consideration.

I am very glad to hear from you and thanks in advance.

 

0 Kudos
8 Replies
drjohnsmith
Teacher
Teacher
580 Views
Registered: ‎07-09-2009

How are u handling floating point .

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
kikibillel52
Visitor
Visitor
564 Views
Registered: ‎08-13-2019

good morning drjohsmith

thank you very much for your comment.

so, i have two system doing the same function (multiplication), one is prepared in vhdl code and using no floating-point library (just fixed-point data type). The second system is implemented in cyclone V with ARM proccessor, and the floating point library is available (i will use the single precision - 32 bits). 32 bits precision equivalent to 7 decimal digits.

So, the both systems doing the same operation, have the same results with different data type.

Do you have any suggestions that i can follow to do this kind of comparison and thanks in advance.

LG, Billel 

0 Kudos
drjohnsmith
Teacher
Teacher
551 Views
Registered: ‎07-09-2009

can I ask how your using a cyclone V on a Xilinx Part ?

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
kikibillel52
Visitor
Visitor
541 Views
Registered: ‎08-13-2019

that what is available now, my Problem is how do this comparison between two different data types, not how to use Cyclone V, that is not my fucus, it can be also XILINX, and getting the same output data type (Floating point).
Thanks in advance.
0 Kudos
drjohnsmith
Teacher
Teacher
534 Views
Registered: ‎07-09-2009

Just a reminder this is a forum run by Xilinx for Xilxin support,

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
kikibillel52
Visitor
Visitor
522 Views
Registered: ‎08-13-2019

thanks for your advice.

if you have any suggestions regarding the issue, i would like to hear from you.

 

0 Kudos
u4223374
Advisor
Advisor
509 Views
Registered: ‎04-26-2015

Buy a Xilinx chip? That would make it easy. Xilinx has their Floating Point IP core, and Xilinx's Vivado HLS can easily accept both fixed-point and floating-point values, do maths on them, and spit out a result.

 

At the highest level, the easiest approach here is probably to get the fixed-point values into the PS, convert them to floating-point (easy), and then do the comparison in C code. It'll be easier to get the PS to handle fixed-point than getting the PL to handle floating-point. By far the hardest part is likely to be getting the values into the PS - and you won't get much help for that here, since it'll be manufacturer-specific and everyone here just knows how to do it with Xilinx chips.

0 Kudos
kikibillel52
Visitor
Visitor
501 Views
Registered: ‎08-13-2019

thanks a lot for your suggestions. a very helpful.

0 Kudos