Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16606 Discussions

cos() function in Verilog

Altera_Forum
Honored Contributor II
1,415 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
508 Views

Use a look up table, or CORDIC

0 Kudos
Altera_Forum
Honored Contributor II
508 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
508 Views

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

0 Kudos
Reply