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
- Intel® Quartus® Prime Software
- how to code tan, arctan, log functions in verilog?

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

Highlighted
##

Altera_Forum

Valued Contributor III

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

07-13-2016
04:44 AM

1,230 Views

how to code tan, arctan, log functions in verilog?

I need to use tan and arctan functions in verilog and generate a plot, one like in matlab.

Also , the code should be synthesizable. Can any one suggest how can I code such trigonometric functions in verilog? Awaiting help. Thanks, Susmitha
3 Replies

Highlighted
##

Altera_Forum

Valued Contributor III

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

07-13-2016
08:06 AM

91 Views

You should use the Cordic IP core in order to generate complex mathematical functions.

Try to instantiate and simulate the cordic core and configure it such a way that your math functions are generated.
Highlighted
##

Altera_Forum

Valued Contributor III

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

07-13-2016
04:50 PM

91 Views

Or just precompute the values you need to some resolution, and store them in a ROM lookup table using block RAM.

It all depends on what data format and resolution of computation you need (ie, 16b integer vs 32b floating point require dramatically different logic).
Highlighted
##

Altera_Forum

Valued Contributor III

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

07-14-2016
06:44 AM

91 Views

Thank you so much for the suggestions.

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