- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Anyone knows how to accelerate the Nios Math Functions such as Sine function other than using floating point custom instruction? Thanks, CarideeLink Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For things like that I normally inspect the library code to see if it's possible to offload into hardware. I think the way newlib computes sine and cosine is through lookup tables. There are other ways but I forget the math behind them, some use the Cordic algorithm for computing sine and cosine. Also if you only need a finite number of sine results a lookup table would probably work best. So if you had this: y = sin(a); and you know that you only have a finite input range for the variable 'a' you can just turn that into a lookup table. If you are familar with FFT and other similar algorithms that's what most people use.

Reply
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