Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15539 Discussions

im using sine function through megawizard, but instead getting the sine result im getting the data, the angle that we gave. does someone have a guide that can help us use the code correctly? thank you

sdavi29
Beginner
1,371 Views
0 Kudos
2 Replies
JOHI
New Contributor II
164 Views

Hello,

Please verify that your application is not working while you think it is not.

As a matter of fact lim(x->0) sin(x)=x, so for small angles the sine of an angle is the angle itself.

Do also note that calculations are in radians, not in degrees and that you are limited to -PI/PI or 0..PI/2 depending on your input parameter.

If you still fail, please provide reply and I will try to make an example (I am just in the middle of project with floating point calculations).

If you would like to use a lookup table, I provided an example where you can generate a .MIF using a .XLS spreadsheet (including VBA macro) and a demo project where the .mif is used to calculate a sine using the lookup table.

Best Regards,

Johi.

Reply