All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class byucc.jhdl.modgen.Cordicl

java.lang.Object
   |
   +----byucc.jhdl.base.Nameable
           |
           +----byucc.jhdl.base.Node
                   |
                   +----byucc.jhdl.base.Cell
                           |
                           +----byucc.jhdl.base.Structural
                                   |
                                   +----byucc.jhdl.Logic.Logic
                                           |
                                           +----byucc.jhdl.modgen.Cordicl

public class Cordicl
extends Logic

General Description

This builds a generic width CORDIC unit. The CORDIC is parameterized with respect to wordsize, number of iterations, pipeline depth, and CORDIC function.

For an introduction to CORDIC processors, see Andraka, Ray. A survey of CORDIC algorithms for FPGA based computers.

Implementation

All Technologies

CORDIC units can have a maximum wordsize of 32 bits, and a maximum number of iterations = 31. All the input x,y,z and output x,y,z must be the same wordsize.

Selecting Cordic function and angle type

The function of the CORDIC is selected by passing predefined constants from the Cordic class to the constructor. These constants are listed below.

Pipelining

Pipelining is enabled by setting the registered parameter true and selecting a pipe_depth. The pipe_depth of the CORDIC determines how many stages of the CORDIC are paired with a pipeline register.
In order to determine the latency of the pipe, find the number of stages in the CORDIC and divide that number by the pipe_depth. If there is a remainder, add 1. The short pipe stage resulting from a remainder in this computation is always placed at the inputs of the CORDIC.
The number of stages in the CORDIC is equal to the number of iterations:

Operand Format

Linear CORDIC processors have no growth factor associated with their computation on x,y operands, unlike other CORDICs. Input words, however, are signed, so the msb must be left as a sign bit.

Calculating CORDIC size

To find the CLB count for a CORDIC processor, take the wordsize of the operands, divide by two and add the remainder. Add one to that number, multiply by three. This is the number of CLBs per stage in the CORDIC. Multiply by the number of iterations in the CORDIC.
In summary:
Number of CLBs = (((wordsize/2)+(wordsize%2)+1)* 3)* number of stages

Author:
Jeremy Anderson

Variable Index

 o cell_interface
 o cellname
 o ROTATIONAL
 o UNIFIED
 o VECTOR

Constructor Index

 o Cordicl(Node, int, boolean, int, int, Wire, Wire, Wire, Wire, Wire, Wire, Wire, Wire)
Constructor for CORDIC unit

Method Index

 o clock()
 o compute(int, int, int, int, int, int, int)
Compute implements the behavior of the CORDIC for behavioral modelling of the circuit
 o defaultSimulationModelIsBehavioral()
The default simulation model is behavioral.
 o getCellName()
 o propagate()

Variables

 o cell_interface
 public static CellInterface cell_interface[]
 o cellname
 public static final String cellname
 o UNIFIED
 public static final int UNIFIED
 o ROTATIONAL
 public static final int ROTATIONAL
 o VECTOR
 public static final int VECTOR

Constructors

 o Cordicl
 public Cordicl(Node parent,
                int cordicmode,
                boolean registered,
                int num_iter,
                int pipe_depth,
                Wire clk_en,
                Wire vec,
                Wire xin,
                Wire yin,
                Wire zin,
                Wire xout,
                Wire yout,
                Wire zout)
Constructor for CORDIC unit

Parameters:
parent - Parent of this circuit
cordicmode - Cordic.UNIFIED,Cordic.ROTATIONAL, or Cordic.VECTOR. UNIFIED will do both modes of operation, with the control signal passed on the vec wire (1 for vector mode, 0 for rotational mode). Vector mode will do z0-y0/x0 (ratios <1), Rotational mode does y0+x0*z0.
registered - True to add registers to the CORDIC
num_iter - Number of iterations to build. The maximum is wordsize-1
pipe_depth - Number of iterations per pipeline register. 1 for fully pipelined. This parameter has no meaning if registered = false.
clk_en - Clock enable wire for the registers.
vec - Control wire for Unified mode CORDIC
xin - X input
yin - Y input
zin - Angle input
xout - X output
yout - Y output
zout - Angle output

Methods

 o getCellName
 public String getCellName()
Overrides:
getCellName in class Cell
 o defaultSimulationModelIsBehavioral
 public boolean defaultSimulationModelIsBehavioral()
The default simulation model is behavioral.

Overrides:
defaultSimulationModelIsBehavioral in class Structural
 o compute
 public static int[] compute(int width,
                             int num_iterations,
                             int cordicmode,
                             int x,
                             int y,
                             int z,
                             int v)
Compute implements the behavior of the CORDIC for behavioral modelling of the circuit

Parameters:
width - Wordsize of the CORDIC
num_iterations - Number of iterations
cordicmode - Cordic.UNIFIED, Cordic.ROTATIONAL, or Cordic.VECTOR. See constructor for details.
x - X input.
y - Y input.
z - Angle input.
v - Control signal for unified mode.
Returns:
Array of integers containing the output x,y, and angle of the CORDIC.
 o propagate
 public void propagate()
Overrides:
propagate in class Structural
 o clock
 public void clock()
Overrides:
clock in class Structural

All Packages  Class Hierarchy  This Package  Previous  Next  Index