cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
joginder200109
Participant
Participant
677 Views
Registered: ‎01-09-2019

Fixed point to 2qn conversion

Jump to solution

Hi,

i am having a float variable which is converted to 32 bit fixed point using the Float point ip of xilinx.now i want to generate cos and sin values for that variable using cordic ip.but input of cordic ip is in the format of 2QN where as i am having data in 32 bit fixed point format.how can i convert the 32 bit fixed point variable to 2QN format.any help will be appreciated.

example:

my variable is .5 rad which is converted to 0x3f000000.now i want to use this value as input for cordic to get cos and sin of .5 rad

thank you

 

0 Kudos
Reply
1 Solution

Accepted Solutions
joginder200109
Participant
Participant
561 Views
Registered: ‎01-09-2019

i got the solution...from float i convereted to fixed point in the required format using floating ip which can be used directly for the cordic ip

View solution in original post

0 Kudos
Reply
4 Replies
tedbooth
Scholar
Scholar
633 Views
Registered: ‎03-28-2016

The "XQN" data format is described on page 31 of the CORDIC v6.0 Product Guide:

https://www.xilinx.com/support/documentation/ip_documentation/cordic/v6_0/pg105-cordic.pdf

You will need to simply convert your fixed point format to match the XQN format expected by your cordic IP.

Ted Booth | Tech. Lead FPGA Design Engineer | DesignLinx Solutions
https://www.designlinxhs.com
0 Kudos
Reply
joginder200109
Participant
Participant
626 Views
Registered: ‎01-09-2019

Can you provide any example of conversion to 2QN.I am not able to get any conversion algorithm

0 Kudos
Reply
joginder200109
Participant
Participant
562 Views
Registered: ‎01-09-2019

i got the solution...from float i convereted to fixed point in the required format using floating ip which can be used directly for the cordic ip

View solution in original post

0 Kudos
Reply
drjohnsmith
Teacher
Teacher
549 Views
Registered: ‎07-09-2009
As a general comment, floating point in an FPGA leads to very very big and probably slow designs.

in a CPU , the same hardware is re used multiple times to make a single floating point answer,

e.g. in C, you design a 32 step floating point cordic, you get a single adder.
In an FPGA , if you design 32 step floating point CORDIC, you end up with 32 floating point adders , 32 times the area / power


<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Reply