Altera_Forum
Honored Contributor
8 years agoCordic sincos function: how to depict a fixed point number as std_logic_vector type
Hello,
i want to use the Cordic sincos IPcore (https://www.altera.com/en_us/pdfs/literature/ug/ug_cordic.pdf). The input is a std_logic_vector in the range of [-pi, pi] for signed configuration case. The input consists of: 1bit for sign, 2 bits representing the range, and the rest is the number of fractional bits. Now, my aim is to make sine calculations for theta from 0 to 360°. I want to start by -pi and increment by 1° = 0.017453292 for 360 times to reach one period. So to cut a long story short: - how can i convert the fixed point value into std_logic_vector type? - where do i know, where my fractional bits are beginning in the std_logic_vector representation? Thanks in advance and best regards!