CORDIC Based Sine and Cosine Generator Verilog Code

$3.00

Specifications:

  1. Parallel and pipelined CORDIC Based Sine and Cosine Generator
  2. 16-bit data width is used.
  3. 10-bits for fraction part.
  4. Two’s complement data format used.
  5. Total 14 stages are included.
  6. Total latency is 13 clock cycles.
  7. Any angle can be given.
  8. Maximum combinational delay is of a 16-bit adder/subtractor.

Sinusoidal signal generation is very important in implementation of many signal or image processing algorithms. For example in order to generate the atoms of Fourier dictionary sinusoidal signal generator is very useful. Sinusoidal signals can be generated either by numerically controlled oscillator (NCO) or by look-up-tables (LUT) or by co-ordinate rotation digital computer (CORDIC). Here, verilog code for CORDIC Based Sine and Cosine Generator is given.

There are certain limitations in generating a sinusoidal signal using NCO or LUT. Like sinusoidal frequency of any frequency can not be generated using NCO. LUT method consumes huge memory space. Thus CORDIC is a very powerful method to compute cosine or sinusoidal signals of any frequency.

The detail theory of CORDIC is discussed in the blog of CORDIC. Sine or cosine of an angle can be computed by CORDIC in rotation mode along the circular path. Initially, x_0=\frac{1}{k_n} and y_0 = 0. The required angle is given to z input as z_0 = \theta. After certain iterations the final output is produced as x_n = cos\theta, y_n = sin\theta and z_n = 0.

In the design of CORDIC Based Sine and Cosine Generator, 16-bit data width is used in which 10-bits are reserved for fraction and 6-bits are for integers. The two’s complement data representation is used. There are 14 stages in the CORDIC module. The angles are represented as 0010\_0000\_0000\_0000 which is equal to 45 degree. The two bits from MSB side decides the quadrant of the desired angle.

Note that CORDIC Based Sine and Cosine Generator introduces error in every iteration which is truncation error. As the iteration numbers go high, accuracy improves but latency increases. The change of quadrant is not shown in this design but the users are directed to incorporate it in order to get the correct result for every angle.

Reviews

There are no reviews yet.

Be the first to review “CORDIC Based Sine and Cosine Generator Verilog Code”

Your email address will not be published. Required fields are marked *

Shopping Basket