Cordic Algorithm Using VHDL

About: Mitu Raj - Just a Hobbyst and Learner

Intro: Cordic Algorithm Using VHDL

##This is the most clicked, popular link in Google for VHDL implementation of CORDIC ALGORITHM to generate sine and cosine wave##

At present time, many hardware efficient algorithms exist, but these are not well known due to the dominance of software systems over the many years. CORDIC is such an algorithm which is nothing but a set of shift and add logics used for computing a wide range of functions including certain trigonometric, hyperbolic, linear and logarithmic functions. Thus by just using simple shifters and adders we can design a hardware with less complexity but power of DSP using cordic algorithm . This is the algorithm used in calculators etc.

Step 1: VHDL and Modelsim

Here the cordic algorithm is implemented using VHDL to generate a sine wave and cose wave . It can output sine and cosine of input angle at great precision. The code is synthesizable on FPGA. Modelsim is used to simulate the design and the test bench .

Step 2: VHDL Code for the Design and the Test Bench

---- Guidelines ----

Binary scaling technique is used to represent floating point numbers.

Please go thru the attached docs before you code.


Go thru
Simulating cordic_v4.vhd - The Design

-The input is angle in 32 bits + sign bit ; it can process any angle from 0 to +/-360 degree with input precision of 0.000000000233 degree. When giving input -> MSB is the sign bit and the rest 32 bits represent magnitude .

-The output of the design is its sine and cos value in 16 bits + sign bit .ie; with precision 0.00001526. Please note that the output is displayed in 2's compliment form if the respective sine or cos value is negative.

Simulating testb.vhd - Test Bench For The Design

(1) Input angles and pull reset ='0'. After two steps of simulation pull reset to '1' and " run all ".

(2) In simulation window set the radix of sin and cos signals as decimal and format > Analog ( automatic ).

(3) Zoom out to see the waveform properly.

Step 3: Files Attached

(1) cordic_v4.vhd - Design .

(2) testb.vhd - Test bench for the design .

(3) Document on how to force angle inputs and convert the binary results.

Step 4: Mini-Cordic IP Core - 16 Bit

Limitation of the above implementation is

- Slower because of doing computations in a single clock cycle.

Mini-Cordic IP Core - 16 Bit

- Pipelined combinational logic to multiple cycles.

- Faster - FPGA proven design synthesised upto 100 Mhz clock.

- More area optimised , Lesser hardware.

- Load and Status signals added.

- Suitable to be integrated with processors.

Only downside is lesser resolution compared to the previous one.

Files Attached:

1) mini cordic main vhdl file

2) mini cordic test bench

3) Mini Cordic IP Core manual

4) Doc on how to force angles and convert results

-----Designers-----

Mitu and Roshan

for enquiries, contact : iammituraj@gmail.com

###Total downloads : 77 as of till Aug-03-2018###

Share

    Recommendations

    • Audio Contest 2018

      Audio Contest 2018
    • Furniture Contest 2018

      Furniture Contest 2018
    • Fix It! Contest

      Fix It! Contest

    26 Discussions

    0
    None
    gfavia

    2 months ago

    how can I get the password?

    0
    None
    zazou54

    5 months ago on Step 3

    Hi !

    can I get password please of Cordic_V4 ?

    thaknk you !

    best regards

    1
    None
    AmCoderivrsak

    Answer 5 months ago

    Please contact in Mail

    1
    None
    gyss

    Question 5 months ago

    Hi. Can I get the password for the zip file ?

    1 more answer
    0
    None
    AmCodergyss

    Answer 5 months ago

    Please contact in Mail

    0
    None
    sandhiyakar

    7 months ago

    can i have the password please?

    0
    None
    KavehJ1

    7 months ago

    How can I obtain the password?

    0
    None
    DanielC842

    7 months ago

    hI. How can I get the password?

    0
    None
    PradyumanB

    8 months ago

    Password please.

    0
    None
    MoeF4

    10 months ago

    can I get the password for the zip file ?

    1 reply
    0
    None
    AmCoderMoeF4

    Reply 9 months ago

    hope you received in mail