You are here
Home > Verilog >

# Verilog code for Sine Cos and Arctan Xilinx CORDIC IP core

Generation CORDIC IP core functions for the implementation of trigonometric functions such as sine, cos, and arctan in the Xilinx ISE 14.7. This article helps you to understand the steps to be followed to get a code from Xilinx IP core and run it.

The IP core model allows us to select the bit widths for the operation 16bit or 32bit and also the number of iterations. The larger the number of coarse iterations for the CORDIC algorithm, the more will the results accuracy.

These IP cores are so accurate and synthesizable codes. One can generate the RTL model and the design summary tables for the implemented CORDIC functions. These are more faster and efficient in the form of hardware complexity and speed optimization.

## 1. IP Core method for sine and cos function

Step 1: In the hierarchy panel, right-click and select New source

Step 2: Now select IP core, Enter the file name (for example ip_sin_cos ), then click next

Step 3: Look for the Math functions, in that select CORDIC, further select CORDIC 4.0. and click next.

Step 4: Then click on Finish.

Step 5: The CORDIC window will open. Select sin and cos. And click next

Step 6: Adjust the working bit width. Here I selected 16bit width

Step 7: Select the number of iterations. Or Work with coarse rotation.

## 2. IP Core method for arctan function

Repeat all the above-mentioned steps, and do the required selections for arctan as shown in the below screenshot. arctan function will be helpful for conversion from complex form to polar form. where we can have the magnitude and phase of a complex signal.

Feel free to ask if any doubts are there related to the above post.
For the manual written Verilog code for sine cos and arctan and also explained the CORDIC algorithm in detail (both rotational mode and vectoring mode of CORDIC operation) with relevant equations.