# CORDIC Hardware Implementations
## Purpose

* developing CORDIC architectures similar to DDR (Double Data Rate).

## Background
### General CORDIC Description

* General.1.A.pdf - Rotation as a complex number multiplication (in CORDIC FAQ)
* General.2.A.pdf - Rotation as a geometric interpretation (in Synthesis of Arithmetic Circuits examples)
* General.3.A.pdf - A set of CORDIC equations (in Andraka's paper )
* General.4.A.pdf - Unified CORDIC

### Software Simulations

* Software.1.A.pdf - Burkardt's MATLAB implementation
* Software.2.A.pdf - Burkardt's C++ implementation

### Fixed Point Software Implementations

* Fixed.1.A.pdf - Dr. Dobbs Journal implementation

### FPGA Hardware Implementations

* FPGA.1.A.pdf - Monash Univ VHDL implementation (architecture and precision)
* FPGA.2.A.pdf - Monash Univ VHDL implementation (VHDL detail )
* FPGA.2.B.pdf - Andraka's paper (FPGA related)

### Lookahead CORDIC

* Lookahead CORDIC Literature Note (pdf)

### Redundant CORDIC

* Redundant Adders (pdf)
* Redundant CORDIC Note 1 - Tagaki (pdf)
* Redundant CORDIC Note 2 - Ercegovac (pdf)
* Redundant CORDIC Note 3 - Timmermann - A.(pdf) - B.(pdf) - C.(pdf)
* Redundant CORDIC Note 4 - Booth Encoding (pdf)
* Redundant CORDIC Note 5 - Noll (pdf)

### Angle Recoding CORDIC

* AR CORDIC Note 1 - Hu (pdf)
* AR CORDIC Note 2 - Wu (pdf)
       0. Overview (pdf)
       1. Conventional CORDIC (pdf)
       2. AR (Angle Recoding) (pdf)
       3. MVR (Modified Vector Rotation) (pdf)
       4. EEAS (Extended Elementary Angle Set) (pdf)
       5. Generalized EEAS (Extended Elementary Angle Set) (pdf)
* AR CORDIC Note 3 - Swartzlander (pdf)

### Hybrid CORDIC

* Hybrid CORDIC Note 1 - Sine/Cosine Generator Algorithms (pdf)
* Hybrid CORDIC Note 2 - Sine/Cosine Generator Architecture (pdf)
* Hybrid CORDIC Note 3 - ROM free modified coarse fine approach (pdf)
* Hybrid CORDIC Note 4 - Hybrid CORDIC Alogorithms (pdf)

### Binary Angular Measurement

    Let's identify the source of the prevalent statement of "50 % improvement".
    An explanation using a uniform framework would be good.
* BAM.1.A.pdf - Angle Recoding CORDIC- Y. H. Hu
* BAM.2.A.pdf - Trellis-based Searching CORDIC - C. S. Wu
* BAM.3.A.pdf - Look-ahead CORDIC - C. C. Kao
* BAM.4.A.pdf - Redundant CORDIC - T. Vladimirova
* BAM.5.A.pdf - Adpative CORDIC - T. K. Rodrigues
* BAM.6.A.pdf - MSE Variance CORDIC - S. Y. Park
* BAM.7.A.pdf - Angle Approx Error & Datapath Rounding Error - C. Dick

### Scaling-free CORDIC
## Idea Sketch
### CORDIC as a Search Algorithm

* CORDIC as a Search Idea.3.A (pdf)
    5. Search (pdf)

### Quad Angle Tree Based CORDIC

* CORDIC Quad Tree Angles (pdf)
    6 Lookahead Idea (pdf)

### Minimizing Latency

* Latency Minimizing Idea.2.A (pdf)
    7. Backtrack (pdf)

### Maximizing Throughput

* Throughput Maximizing Idea.1.A (pdf)
    8. Serialize (pdf)

### Bit-Serial & Bit-Parallel Trade-offs

* Generalized Multi-Byte CORDIC Idea.4.A (pdf)
    9. Precision (pdf)
    Bit-serial Redundant CORDIC (pdf)

## Implementation Issues
### Implementation Technical Background

    - [ Understanding VLSI Design ]
    - [ Understanding Low Power Design ]
    - [ Understanding Arithmetic Circuits ]
    - [ Understanding FPGA Design ]

### Fixed Point Simulation

    -Octave
       3. Octave Codes (pdf)
    -SystemC
    -VHDL Simulation
       CORDIC Angle LUT ( scr.pdf, out.pdf)
       CORDIC ROM Generation and Initialization ( c6.rom.file.vhdl )
       CORDIC BEH Simulation ( cordic_beh.pdf )
       CORDIC RTL Simulation ( cordic_rtl.pdf )
       CORDIC testbench ( cordic_tb.vhdl )
    -VHDL Testcases

### Resource Sharing

       - Area, Speed, Power Trade-offs between architectures

### CORDIC Sensor Characteristics

* Accuracy
* Preceision
* Sensitivity
* Linearity
* Resoltion

## CORDIC Accuracy & Precision

CORDIC.AccPrec (pdf)

### Binary Angle Tree Approaches (C++, gnuplot)
#### C++ Codes

    CORDIC Source (pdf)
       Makefile (pdf)
       Core class (pdf)
       Angles class (pdf, pdf)
       GPData class (pdf)
       Figures class (pdf)
       Interfacing GHDL CORDIC simulation with C (pdf)
       Calling C++ cordic function from C (pdf)
    batch run bash file for Angles_tb (pdf)
       fig_basic (pdf, note)
       fig_tscale (pdf)
       fig_uscale (pdf)

#### Testbench Codes and Results

    cordic testbenches (pdf)
       cordic testbench 01 (percent error)
       cordic testbench 02 (path error)
       cordic testbench 03 (varying tree levels)
          fig_basic (pdf)
          fig_tscale (pdf)
          fig_uscale (pdf)
       cordic testbench 04 (coarse-fine)

#### CORDIC Accuracy Notes

       1. General (pdf)
       2. Statistical Analysis (pdf)
       3. Octave Fixed Point Simulation (pdf)
       4. Scaling K (pdf)
       batch run bash file for testbench 01 (pdf)
       batch run bash file for testbench 02 (pdf)
    Angles_wx using wxWidgets & wxGlade (pdf)

### General Angle Tree Approaches (C, R)
#### Search Space Approaches using C

| Tree type | Memory bound | Time bound |
| Binary Tree | code, output | pdf |
| Ternary Tree | code, output | pdf |
| Quaternary tree | code, output | pdf |
| Full Tree | code, output | pdf |

#### Parallel Search Space Approaches using C + MPI

| Tree type | Memory bound | Time bound |
| Binary Tree | code, output | pdf |
| Ternary Tree | code, output | pdf |
| Quaternary tree | code, output | pdf |
| Full Tree | code, output | pdf |

#### Parallel Search Space Approaches using C + OpenMP

| Tree type | Memory bound | Time bound |
| Binary Tree | code, output | pdf |
| Ternary Tree | code, output | pdf |
| Quaternary tree | code, output | pdf |
| Full Tree | code, output | pdf |

#### Statistical Analysis using R

| Tree Type | R Script | Output |
| Binary Tree | pdf | pdf |
| Ternary Tree | pdf | pdf |
| Quaternary | pdf | pdf |

#### Test Cases

1. Powers of 2 angles testcase (code, summary)
| Tree Type | log file | table | plot |
| Binary Tree | pdf | pdf | pdf |
| Ternary Tree | pdf | pdf | pdf |
| Quaternary | pdf | pdf | pdf |
2. Leaf and internal node angles testcase
3. Uniformly distributed angles testcase
4. Subtree angles testcase

## Haskell Implementation
### Functional Programming Approach

       Background (pdf)

## Prolog Implementation
### Binary Tree in Prolog

       Background (pdf)

## Computing Gaussian Function

* Scale Space Filtering (Gaussian Smoothing)
* Parallel CORDIC
* Neural Network (Computing Exponential Function)

## Related Links

See Burkardt's C++ Implementations

## Exercise
### Rotating Vector Plotting

* Using gnuplot_i package (pdf)
* CORDIC Animation: Java Swing Based CORDIC Simulator

### Symbolic Computation of CORDIC Equations

* Using Maxima / wxMaxima (pdf, matrix.pdf)

### Simulation in C, C++, Octave

* CORDIC Octave Simulation ( CORDIC.m.pdf)
* CORDIC C++ Simulation ( CORDIC_cpp.pdf)
* CORDIC C Simulation ( CORDIC.c.pdf, CORDIC_tb.c.pdf)
* CORDIC Fixed Point C Simulation ( CORDIC.fixed.c.pdf)

### Simulation using Multiple Precision Libraries (GMP, MPFR)

* CORDIC GMP Simulation ( cordic_gmp.pdf, normerror.pdf)

### SystemC Model

* SystemC Data Types (my_cnt.systemc, dtype.systemc)
* Fixed point Simulation (cordic.scfix)
* Generating VHDL ROM model (cordic.rom)

### VHDL Behavioral Model

* VHDL Behavioral Model and Testbench (cordic_beh in one file, cordic_beh.vhdl, cordic_tb.vhdl, cordic_pkg.vhdl)
* VHDL Data Conversion - some test pieces (test_conv.vhdl)

### VHDL Data Flow Model

* VHDL Data Flow Model and Testbench ( cordic_rtl in one file, CORDIC.rtl)
    c1.adder.rtl.vhdl, c2.addsub.vhdl, c3.bshift.vhdl, c4.dffreg.vhdl, c5.counter.vhdl, c6.rom.vhdl, c7.mux.vhdl, m1.disp.vhdl,
    cordic_rtl.vhdl, cordic_pkg.vhdl, cordic_tb.vhdl

### FPGA CORDIC Design Examples
## Old Versions
### Old CORDIC Background
##### Papers and Reports

* Background.1.A - CORDIC FAQ (1.A.pdf)
* Background.2.A,B - Andraka's paper (2.A.pdf, 2.B.pdf)
* Background.3.A - Unified CORDIC (3.A.pdf)
* Background.4.A - Synthesis of Arithmetic Circuits examples (4.A.pdf)

##### Software Simulations

* Burkardt's MATLAB implementation (Matlab.1.A) (pdf)
* Burkardt's C++ implementation (C++.1.A) (pdf)

##### Software Implementations

* Dr. Dobbs Journal implementation (fixed.1.A) (pdf)

##### Hardware Implementations

* Monash Univ VHDL implementation (VHDL.1.A.pdf, VHDL.2.A.pdf )
    Some Plots
       Threshold=0.0 (pdf)
       Threshold=0.001 (pdf)
       Quantization Effects (pdf)
       Percent Error (pdf)
       Residue Statistics (tex file:pdf, pdf)
    CORDIC.AccPrec (pdf)
    Angles Class Source (pdf)
    Angles_wx using wxWidgets & wxGlade (pdf)
go to [ Electrical_&_Computer_Engineering_Studies ]