Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Intel Community
- FPGAs and Programmable Solutions
- FPGA Intellectual Property
- Simulation of Cordic sincos IP core: Wrong signals for negative input signals

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-13-2017
09:44 AM

926 Views

Simulation of Cordic sincos IP core: Wrong signals for negative input signals

Hi,

i have problems with the Cordic sincos IPcore (https://www.altera.com/en_US/pdfs/literature/ug/ug_cordic.pdf). When i do the simulation, for positive signals i get the right signals but for negative input signals i receive wrong output signals and some of them are out of range. Am i doing a mistake? Here is an example out of my simulation: Input angle: 1110010010000111111011010100 (-3.14159265) Output cosine: 001010011101010101001100000 (0,6523..) Output sine: 110011111001000010001100001 (-1,242..) Best regardsLink Copied

4 Replies

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-14-2017
11:37 AM

72 Views

I just read through the core description (https://www.altera.com/en_us/pdfs/literature/ug/ug_cordic.pdf). I can't figure out why you'd ever create a cordic (http://zipcpu.com/dsp/2017/08/30/cordic.html) that would use radians for its angles, given the serious problems with radian units discussed here.http://zipcpu.com/dsp/2017/06/15/no-pi-for-you.html (http://zipcpu.com/dsp/2017/06/15/no-pi-for-you.html)

Does this core really use radians? Dan
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-14-2017
02:50 PM

72 Views

Hey Musti87,

i see the problem, you made a simple mistake. You have to learn how to convert a positive binary representation into two's complement form and reverse. Then you will see that the simulation works fine :cool:
Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-14-2017
05:40 PM

72 Views

To save us from guessing you should tell all sincos configuration parameters.

Altera_Forum

Honored Contributor I

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

09-14-2017
06:59 PM

72 Views

I solved the problem, i just made a beginner failure. My problem was that i didnt know how to depict a negativ binary representation right.

For example the input value above representing -pi is wrong, the right representation for -pi is: 1001101101111000000100101100 (1 sign bit, two integer bits, 25 fractional bits) Therefore i wasn't able to evaluate the simulation right. So everything is working fine.Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

For more complete information about compiler optimizations, see our Optimization Notice.