Forum Discussion
Altera_Forum
Honored Contributor
15 years agoproblem in cos funtion
sir/mam,
i have used ieee math_real ,now k1 : bwlmulti port map (a1,f,q1); qout <= cos (q1); here shows an error that "cos can't have such operand in this context". plz help me out of problem.:cry:3 Replies
- Altera_Forum
Honored Contributor
For a start, its best to use fixed point rather than floating point.
There are two main methods for cos function: Use a lookup table. Use the CORDIC algorithm. There are many implementations of this. Or have a look here: http://en.wikipedia.org/wiki/cordic - Altera_Forum
Honored Contributor
If I need tackle cos operation, how can I do it
- Altera_Forum
Honored Contributor
You cannot use the math_real package for synthesis.
In addition, you cannot use real types for synthesis. They are only suitable for simulation.