Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21595 Discussions

Computing Argument of a Complex Number

Altera_Forum
Honored Contributor II
1,721 Views

Hi, 

I have a complex input, both I & Q are 16 bit wide signed integers, and I want to compute its argument. 

I have read several solutions, CORDIC, LUT based ATAN, and Altera ATAN function. 

The latter seems to consume a huge amount of resources, and it's using floating point to the best of my knowledge... I've eliminated this one. 

 

My questions are: 

1) Should I convert to fixed point arithmetic? 

2) What is the best (and fastest in terms of implementation) solution to use?
0 Kudos
5 Replies
Altera_Forum
Honored Contributor II
608 Views

Puts are always the quickest. The values can either be loaded from a file or computed in the hdl itself. It will have the lowest latency too. But depending on the accuracy requirements it can eat a lot of ram. Fixed point will always be better than floating because of its integer based arithmatic.

0 Kudos
Altera_Forum
Honored Contributor II
608 Views

Please excuse my ignorance, but... what is "puts"? Or do you mean LUTs? 

I've just read the documentation of this core: 

http://opencores.org/project,cordic 

It does exactly what I want, converting rectangular to polar... seems like I tend to use it. What do you think?
0 Kudos
Altera_Forum
Honored Contributor II
608 Views

I meant puts. I was playing from my phone and got autocorrected. 

 

I'd it does what you want, go for it. Don't expect much support for anything from open cores though.
0 Kudos
Altera_Forum
Honored Contributor II
608 Views

Would you please explain more what do you mean by "puts"? 

CORDIC is giving good results, but it takes several clock cycles to compute.
0 Kudos
Altera_Forum
Honored Contributor II
608 Views

LUTS 

Silly phone again
0 Kudos
Reply