Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

cos() function in Verilog

Altera_Forum
Honored Contributor II
2,098 Views

Maybe this question is stupid, but how would people take care of, say, cos(42) and log2(3) in Verilog? Thanks.

0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
1,191 Views

Use a look up table, or CORDIC

0 Kudos
Altera_Forum
Honored Contributor II
1,191 Views

If you have ample resources available (if area is not your top concern right now), you can also use ALTFP_SINCOS and ALTFP_LOG megafunctions.

0 Kudos
Altera_Forum
Honored Contributor II
1,191 Views

Well, use CORDIC to calculate cos() is straight forward. But what is the procedure to do log2(3) in CORDIC?

0 Kudos
Reply