SlideShare a Scribd company logo
Project on
    VHDL and Digital Circuit Design
(Implementation Of CORDIC Algorithm
 for trigonometric functions in VHDL)

       Submitted at : CEERI,Pilani


       Submitted By :Subeer Rangra
            08EBKCS059
CONTENTS

VHDL: History
VHDL: Basics
VHDL: Design Units
CORDIC Algorithm
•   Key Idea
•   Rotations
•   Iterations
•   Rotation Mode
•   Hardware
Result
Conclusion
VHDL: History

Was developed in the early 1980s for managing design
problems that involved large circuits and multiple teams of
engineers.
Funded by U.S. Department of Defense.
The first publicly available version was released in 1985.
In 1986 IEEE (Institute of Electrical and Electronics Engineers,
Inc.) was presented with a proposal to standardize the VHDL.
In 1987 standardization => IEEE 1076-1987
An improved version of the language was released in
1994 => IEEE standard1076-1993.
VHDL: Basics


VHDL stands for VHSIC Hardware Description
Language
Hardware description language used for modeling
digital systems.
It provides designing of digital systems at various
levels of abstraction.
Used to write text models that describe a logic circuit.
VHDL: Design Units



1. Entity declaration.
2. Architecture.
3. Configuration.
4. Package declaration.
5. Package body.
Entities


• A black box with interface
  definition.                            Inputs and Outputs

• Defines the inputs/outputs of a
                                     A
  component (define pins).
• A way to represent modularity in   B                        E
                                              Chip
  VHDL.                              C

• Similar to symbol in schematic.    D
• Entity declaration describes and
  initializes an entity.
Architectures

• Every entity has at least one architecture.
• One entity can have several architectures.
• Architectures can be written using these
  following methodologies..                     A   Chip
       – Dataflow
                                                B          E
       – Behavioral                                  X

       – Structural (component )                C    Y
• Architectures can describe design on
  many levels                                   D
       – Gate level
       – RTL (Register Transfer Level)
       – Behavioral level
Configurations


•   A configuration declaration is used to select one
    of the possibly many architecture bodies that an
    entity may have.
•   Configuration specifies the design entity used in
    place of each component instance (i.e. it plugs
    the chip into the chip socket and then the socket-
    chip assembly into the PCB).
•   To represent structure in that architecture body
    of an entity-architecture pair or by a
    configuration, which reside in library.
Packages
Packages contain information common to many
design units.
1.Package declaration
       – constant declarations
       – type and subtype declarations
       – function and procedure declarations
       – global signal declarations
       – file declarations
       – component declarations
2.Package body
       – is not necessary needed
       – function bodies
       – procedure bodies
CORDIC Algorithm
COordinate Rotation DIgital Computer

 CORDIC, which stands
 for COordinate Rotation Digital Computer, is an algorithm
 developed by Volder in the fifties which allows you to
 calculate trigonometric functions using simple shift and add
 operations. This is an advantage for hardware
 implementations were multipliers are normally resource
 demanding . The algorithm can be adapted to also compute
 fix/floating point multiply, divide, log, exponent and square
 root. The module computes fix point sin and cos values from
 a given angle.
CORDIC Algorithm
                  Key Idea

• If we have a computationally efficient way of
  rotating a vector, we can evaluate cos & sin
• At each step, accumulate corresponding x and y
  increments
• After a number of iterations, x and y increments
  converge to desired function values
Rotations
Rotate the vector OE (i) with end point at (x (i), y (i)) by                                 (i)


x (i+1) = x (i) cos       (i)–   y (i) sin    (i)   = (x (i) – y (i) tan         (i))/(1   + tan2      (i))1/2


y (i+1) = y (i) cos       (i)   + x (i) sin         (i)   = (y (i) + x (i) tan     (i))/(1    + tan2      (i)   ) 1/2
z (i+1) = z (i) +   (i)


Goal: eliminate the divisions by (1 + tan2                            (i)) 1/2   and choose         (i)   so that tan   (i)

is a power of 2

Take the transformation x (i+1) = x (i) cos                           (i)–  y (i) sin      (i)

                        y (i+1) = y (i) cos                            (i) + x (i) sin       (i)



Rearrange as                            x (i+1) = cos • ( x - y tan )
                                        y (i+1) = cos • ( x + y tan )

But we can choose the rotation angles, 1, 2, …,                                          m
So choose,                            -1 -m
                               m = tan 2

so that                                             tan        m   = 2-m
Thus the tan m factors are derived from simple shifts as 2-m corresponds to
linear binary shift.
Whereas a real rotation does not change the length R(i) of the vector, a
pseudorotation step increases its length to:
R(i+1) = R(i) (1 + tan2       (i))1/2


The coordinates of the new end point E (i+1) after pseudorotation is derived
by multiplying the coordinates of E(i+1) by the expansion factor
x (i+1) = x (i) – y (i) tan       (i)


y (i+1) = y (i) + x (i) tan       (i)   [Pseudorotation]
z (i+1) = z (i) + (i)
Now the ith step, calculating (xi+1, yi+1) from (xi, yi)
can be written
                      xi+1 = Ki ( xi - yi di 2-i )
                      yi+1 = Ki ( yi - xi di 2-i )

                                                            1
Where              Ki = cos(        tan-1 2-i )   =
                                                      ( 1 + 2-2i )
And                di =       1

which is determined by the direction of the necessary correction
Now the product,    Ki = ( ( 1 + 2-2i )-1     0.6073
is a constant depending on the number of iterations
Basic CORDIC Iterations


Pick     (i)   such that tan     (i)   = di 2 –i, di Î {–1, 1}
x(i+1) = x(i) – di y(i)2–i
y (i+1) = y (i) + di x(i)2–I [CORDIC iteration]
z (i+1) = z (i) – di tan–1 2–i
If we always pseudo rotate by the same set of angles
(with + or – signs), then the expansion factor K is a
constant that can be pre-computed

                                                                 e (i) = tan –1 2-i
e (i) = tan –1 2-i

Example: pseudo rotation for 30 degrees
30.0    45.0 – 26.6 + 14.0 – 7.1 + 3.6 + 1.8 – 0.9
+ 0.4 – 0.2 + 0.1 = 30.1
CORDIC Rotation Mode


CORDIC calculations can be made in two ways
• Rotation mode
• Vector mode
   Here we use the rotation mode
        An input vector is rotated by a specified angle
        Angle accumulator is initialized with an angle
        This angle is reduced to zero
             An (x,y) pair
        The equations are:      xi+1 = xi - yi di 2-i
                                yi+1 = yi + xi di 2-i
                                zi+1 = zi - di tan-1( 2-i )

           and                  di = -1 if zi < 0
                                     +1 otherwise
The results are:       xn = Kn ( x0 cos z0 - y0 sin z0 )
                       yn = Kn ( x0 sin z0 + y0 cos z0 )
                       Zn = 0
                       Kn =     ( 1 + 2-2i )

                   Set x0 = 1 and y0 = 0 the indicial values of x & y
                    And get the values ofcos(z0) and sin(z0)



Note
    Kn is a constant - dependent only on the number of iterations
    The algorithm would normally be run for a fixed number of iterations
    A result with a known accuracy bound
    Note that the whole calculation requires shifts , add/ subtracts only
CORDIC Hardware(Basic)
CORDIC Hardware
Serial CORDIC Module in HDL Designer
Result

CORDIC algorithm for finding the values
trigonometric function sine and cosine ,was
successfully simulated .

On taking input value of z as the angle which is
to be calculated , and initializing the value of K
as 0.607252935008881256….for 10 iterations.
x as 1 and y as 0,we get the answer for the
value of cos(z) and vice versa for sin(z).
Conclusion


CORDIC is not the fastest way to perform multiplications
or to compute logarithms and exponentials but, since
the same algorithm allows the computation of most
mathematical functions using very simple basic
operations, it is attractive for hardware
implementations.
Thank You

More Related Content

What's hot

Decimation in Time
Decimation in TimeDecimation in Time
Decimation in Time
SURAJ KUMAR SAINI
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
Sarang Joshi
 
Discreate time system and z transform
Discreate time system and z transformDiscreate time system and z transform
Discreate time system and z transform
VIKAS KUMAR MANJHI
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
hamza haseeb
 
Circular Convolution
Circular ConvolutionCircular Convolution
Circular Convolution
Sarang Joshi
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
Amairullah Khan Lodhi
 
Nyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelNyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channel
PriyangaKR1
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
Abhishek Choksi
 
Convolutional Codes And Their Decoding
Convolutional Codes And Their DecodingConvolutional Codes And Their Decoding
Convolutional Codes And Their Decoding
Kakali Saharia
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
Rediet Moges
 
Digital signal processing part2
Digital signal processing part2Digital signal processing part2
Digital signal processing part2
Vaagdevi College of Engineering
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
UR11EC098
 
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and SystemsDSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
Amr E. Mohamed
 
MUX and Demux.ppt
MUX and Demux.pptMUX and Demux.ppt
MUX and Demux.ppt
SalmanHameed26
 
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsDSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
Amr E. Mohamed
 
Digital Communication: Channel Coding
Digital Communication: Channel CodingDigital Communication: Channel Coding
Digital Communication: Channel Coding
Dr. Sanjay M. Gulhane
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
PeriyanayagiS
 
Chapter3 - Fourier Series Representation of Periodic Signals
Chapter3 - Fourier Series Representation of Periodic SignalsChapter3 - Fourier Series Representation of Periodic Signals
Chapter3 - Fourier Series Representation of Periodic Signals
Attaporn Ninsuwan
 
Gram-Schmidt procedure and constellations
Gram-Schmidt procedure and constellationsGram-Schmidt procedure and constellations
Gram-Schmidt procedure and constellations
RohitK71
 
convolution
convolutionconvolution
convolution
AbhishekLalkiya
 

What's hot (20)

Decimation in Time
Decimation in TimeDecimation in Time
Decimation in Time
 
Computing DFT using Matrix method
Computing DFT using Matrix methodComputing DFT using Matrix method
Computing DFT using Matrix method
 
Discreate time system and z transform
Discreate time system and z transformDiscreate time system and z transform
Discreate time system and z transform
 
Travelling salesman problem
Travelling salesman problemTravelling salesman problem
Travelling salesman problem
 
Circular Convolution
Circular ConvolutionCircular Convolution
Circular Convolution
 
Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual Digital Signal Processing Lab Manual
Digital Signal Processing Lab Manual
 
Nyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channelNyquist criterion for distortion less baseband binary channel
Nyquist criterion for distortion less baseband binary channel
 
Discrete Fourier Transform
Discrete Fourier TransformDiscrete Fourier Transform
Discrete Fourier Transform
 
Convolutional Codes And Their Decoding
Convolutional Codes And Their DecodingConvolutional Codes And Their Decoding
Convolutional Codes And Their Decoding
 
Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03Digital Signal Processing[ECEG-3171]-Ch1_L03
Digital Signal Processing[ECEG-3171]-Ch1_L03
 
Digital signal processing part2
Digital signal processing part2Digital signal processing part2
Digital signal processing part2
 
Digital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE studentsDigital Signal Processing Lab Manual ECE students
Digital Signal Processing Lab Manual ECE students
 
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and SystemsDSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
DSP_FOEHU - Lec 02 - Frequency Domain Analysis of Signals and Systems
 
MUX and Demux.ppt
MUX and Demux.pptMUX and Demux.ppt
MUX and Demux.ppt
 
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and SystemsDSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
DSP_FOEHU - MATLAB 01 - Discrete Time Signals and Systems
 
Digital Communication: Channel Coding
Digital Communication: Channel CodingDigital Communication: Channel Coding
Digital Communication: Channel Coding
 
Finite word length effects
Finite word length effectsFinite word length effects
Finite word length effects
 
Chapter3 - Fourier Series Representation of Periodic Signals
Chapter3 - Fourier Series Representation of Periodic SignalsChapter3 - Fourier Series Representation of Periodic Signals
Chapter3 - Fourier Series Representation of Periodic Signals
 
Gram-Schmidt procedure and constellations
Gram-Schmidt procedure and constellationsGram-Schmidt procedure and constellations
Gram-Schmidt procedure and constellations
 
convolution
convolutionconvolution
convolution
 

Similar to VHDL and Cordic Algorithim

CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
RajJain516913
 
Teknik Simulasi
Teknik SimulasiTeknik Simulasi
Teknik Simulasi
Rezzy Caraka
 
Primitives
PrimitivesPrimitives
Computer graphics
Computer graphicsComputer graphics
Computer graphics
Bala Murali
 
Ch01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluitonCh01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluiton
shin
 
An Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of PointsAn Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of PointsKasun Ranga Wijeweera
 
Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1
aravindangc
 
Fast dct algorithm using winograd’s method
Fast dct algorithm using winograd’s methodFast dct algorithm using winograd’s method
Fast dct algorithm using winograd’s methodIAEME Publication
 
raster algorithm.pdf
raster algorithm.pdfraster algorithm.pdf
raster algorithm.pdf
Mattupallipardhu
 
Open GL T0074 56 sm4
Open GL T0074 56 sm4Open GL T0074 56 sm4
Open GL T0074 56 sm4Roziq Bahtiar
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-online
lifebreath
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cgharinipriya1994
 
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Madhumita Tamhane
 
Line drawing Algorithm DDA in computer Graphics.pdf
Line drawing Algorithm DDA in computer Graphics.pdfLine drawing Algorithm DDA in computer Graphics.pdf
Line drawing Algorithm DDA in computer Graphics.pdf
RAJARATNAS
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
Prabin Gautam
 
Transformations in Computer Graphics
Transformations in Computer GraphicsTransformations in Computer Graphics
Transformations in Computer Graphics
JatenderKhatri
 
An Introduction to Coding Theory
An Introduction to Coding TheoryAn Introduction to Coding Theory
An Introduction to Coding Theory
AlexanderWei11
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
Vaagdevi College of Engineering
 
The convenience yield implied by quadratic volatility smiles presentation [...
The convenience yield implied by quadratic volatility smiles   presentation [...The convenience yield implied by quadratic volatility smiles   presentation [...
The convenience yield implied by quadratic volatility smiles presentation [...yigalbt
 

Similar to VHDL and Cordic Algorithim (20)

CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdfCD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
CD504 CGM_Lab Manual_004e08d3838702ed11fc6d03cc82f7be.pdf
 
Teknik Simulasi
Teknik SimulasiTeknik Simulasi
Teknik Simulasi
 
Cgm Lab Manual
Cgm Lab ManualCgm Lab Manual
Cgm Lab Manual
 
Primitives
PrimitivesPrimitives
Primitives
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
Ch01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluitonCh01 basic concepts_nosoluiton
Ch01 basic concepts_nosoluiton
 
An Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of PointsAn Efficient Convex Hull Algorithm for a Planer Set of Points
An Efficient Convex Hull Algorithm for a Planer Set of Points
 
Computer Graphics Unit 1
Computer Graphics Unit 1Computer Graphics Unit 1
Computer Graphics Unit 1
 
Fast dct algorithm using winograd’s method
Fast dct algorithm using winograd’s methodFast dct algorithm using winograd’s method
Fast dct algorithm using winograd’s method
 
raster algorithm.pdf
raster algorithm.pdfraster algorithm.pdf
raster algorithm.pdf
 
Open GL T0074 56 sm4
Open GL T0074 56 sm4Open GL T0074 56 sm4
Open GL T0074 56 sm4
 
Lecture 9-online
Lecture 9-onlineLecture 9-online
Lecture 9-online
 
Geometric transformation cg
Geometric transformation cgGeometric transformation cg
Geometric transformation cg
 
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
Convolution codes - Coding/Decoding Tree codes and Trellis codes for multiple...
 
Line drawing Algorithm DDA in computer Graphics.pdf
Line drawing Algorithm DDA in computer Graphics.pdfLine drawing Algorithm DDA in computer Graphics.pdf
Line drawing Algorithm DDA in computer Graphics.pdf
 
Computer graphics 2
Computer graphics 2Computer graphics 2
Computer graphics 2
 
Transformations in Computer Graphics
Transformations in Computer GraphicsTransformations in Computer Graphics
Transformations in Computer Graphics
 
An Introduction to Coding Theory
An Introduction to Coding TheoryAn Introduction to Coding Theory
An Introduction to Coding Theory
 
Digital logic design part1
Digital logic design part1Digital logic design part1
Digital logic design part1
 
The convenience yield implied by quadratic volatility smiles presentation [...
The convenience yield implied by quadratic volatility smiles   presentation [...The convenience yield implied by quadratic volatility smiles   presentation [...
The convenience yield implied by quadratic volatility smiles presentation [...
 

Recently uploaded

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
Tamralipta Mahavidyalaya
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
EugeneSaldivar
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Po-Chuan Chen
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
Celine George
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
joachimlavalley1
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
camakaiclarkmusic
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
BhavyaRajput3
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
Atul Kumar Singh
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 

Recently uploaded (20)

Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...TESDA TM1 REVIEWER  FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
TESDA TM1 REVIEWER FOR NATIONAL ASSESSMENT WRITTEN AND ORAL QUESTIONS WITH A...
 
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdfAdversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
Adversarial Attention Modeling for Multi-dimensional Emotion Regression.pdf
 
Model Attribute Check Company Auto Property
Model Attribute  Check Company Auto PropertyModel Attribute  Check Company Auto Property
Model Attribute Check Company Auto Property
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Additional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdfAdditional Benefits for Employee Website.pdf
Additional Benefits for Employee Website.pdf
 
CACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdfCACJapan - GROUP Presentation 1- Wk 4.pdf
CACJapan - GROUP Presentation 1- Wk 4.pdf
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCECLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
CLASS 11 CBSE B.St Project AIDS TO TRADE - INSURANCE
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
Language Across the Curriculm LAC B.Ed.
Language Across the  Curriculm LAC B.Ed.Language Across the  Curriculm LAC B.Ed.
Language Across the Curriculm LAC B.Ed.
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 

VHDL and Cordic Algorithim

  • 1. Project on VHDL and Digital Circuit Design (Implementation Of CORDIC Algorithm for trigonometric functions in VHDL) Submitted at : CEERI,Pilani Submitted By :Subeer Rangra 08EBKCS059
  • 2. CONTENTS VHDL: History VHDL: Basics VHDL: Design Units CORDIC Algorithm • Key Idea • Rotations • Iterations • Rotation Mode • Hardware Result Conclusion
  • 3. VHDL: History Was developed in the early 1980s for managing design problems that involved large circuits and multiple teams of engineers. Funded by U.S. Department of Defense. The first publicly available version was released in 1985. In 1986 IEEE (Institute of Electrical and Electronics Engineers, Inc.) was presented with a proposal to standardize the VHDL. In 1987 standardization => IEEE 1076-1987 An improved version of the language was released in 1994 => IEEE standard1076-1993.
  • 4. VHDL: Basics VHDL stands for VHSIC Hardware Description Language Hardware description language used for modeling digital systems. It provides designing of digital systems at various levels of abstraction. Used to write text models that describe a logic circuit.
  • 5. VHDL: Design Units 1. Entity declaration. 2. Architecture. 3. Configuration. 4. Package declaration. 5. Package body.
  • 6. Entities • A black box with interface definition. Inputs and Outputs • Defines the inputs/outputs of a A component (define pins). • A way to represent modularity in B E Chip VHDL. C • Similar to symbol in schematic. D • Entity declaration describes and initializes an entity.
  • 7. Architectures • Every entity has at least one architecture. • One entity can have several architectures. • Architectures can be written using these following methodologies.. A Chip – Dataflow B E – Behavioral X – Structural (component ) C Y • Architectures can describe design on many levels D – Gate level – RTL (Register Transfer Level) – Behavioral level
  • 8. Configurations • A configuration declaration is used to select one of the possibly many architecture bodies that an entity may have. • Configuration specifies the design entity used in place of each component instance (i.e. it plugs the chip into the chip socket and then the socket- chip assembly into the PCB). • To represent structure in that architecture body of an entity-architecture pair or by a configuration, which reside in library.
  • 9. Packages Packages contain information common to many design units. 1.Package declaration – constant declarations – type and subtype declarations – function and procedure declarations – global signal declarations – file declarations – component declarations 2.Package body – is not necessary needed – function bodies – procedure bodies
  • 10. CORDIC Algorithm COordinate Rotation DIgital Computer CORDIC, which stands for COordinate Rotation Digital Computer, is an algorithm developed by Volder in the fifties which allows you to calculate trigonometric functions using simple shift and add operations. This is an advantage for hardware implementations were multipliers are normally resource demanding . The algorithm can be adapted to also compute fix/floating point multiply, divide, log, exponent and square root. The module computes fix point sin and cos values from a given angle.
  • 11. CORDIC Algorithm Key Idea • If we have a computationally efficient way of rotating a vector, we can evaluate cos & sin • At each step, accumulate corresponding x and y increments • After a number of iterations, x and y increments converge to desired function values
  • 13. Rotate the vector OE (i) with end point at (x (i), y (i)) by (i) x (i+1) = x (i) cos (i)– y (i) sin (i) = (x (i) – y (i) tan (i))/(1 + tan2 (i))1/2 y (i+1) = y (i) cos (i) + x (i) sin (i) = (y (i) + x (i) tan (i))/(1 + tan2 (i) ) 1/2 z (i+1) = z (i) + (i) Goal: eliminate the divisions by (1 + tan2 (i)) 1/2 and choose (i) so that tan (i) is a power of 2 Take the transformation x (i+1) = x (i) cos (i)– y (i) sin (i) y (i+1) = y (i) cos (i) + x (i) sin (i) Rearrange as x (i+1) = cos • ( x - y tan ) y (i+1) = cos • ( x + y tan ) But we can choose the rotation angles, 1, 2, …, m So choose, -1 -m m = tan 2 so that tan m = 2-m Thus the tan m factors are derived from simple shifts as 2-m corresponds to linear binary shift.
  • 14. Whereas a real rotation does not change the length R(i) of the vector, a pseudorotation step increases its length to: R(i+1) = R(i) (1 + tan2 (i))1/2 The coordinates of the new end point E (i+1) after pseudorotation is derived by multiplying the coordinates of E(i+1) by the expansion factor x (i+1) = x (i) – y (i) tan (i) y (i+1) = y (i) + x (i) tan (i) [Pseudorotation] z (i+1) = z (i) + (i) Now the ith step, calculating (xi+1, yi+1) from (xi, yi) can be written xi+1 = Ki ( xi - yi di 2-i ) yi+1 = Ki ( yi - xi di 2-i ) 1 Where Ki = cos( tan-1 2-i ) = ( 1 + 2-2i ) And di = 1 which is determined by the direction of the necessary correction Now the product, Ki = ( ( 1 + 2-2i )-1 0.6073 is a constant depending on the number of iterations
  • 15. Basic CORDIC Iterations Pick (i) such that tan (i) = di 2 –i, di Î {–1, 1} x(i+1) = x(i) – di y(i)2–i y (i+1) = y (i) + di x(i)2–I [CORDIC iteration] z (i+1) = z (i) – di tan–1 2–i If we always pseudo rotate by the same set of angles (with + or – signs), then the expansion factor K is a constant that can be pre-computed e (i) = tan –1 2-i
  • 16. e (i) = tan –1 2-i Example: pseudo rotation for 30 degrees 30.0 45.0 – 26.6 + 14.0 – 7.1 + 3.6 + 1.8 – 0.9 + 0.4 – 0.2 + 0.1 = 30.1
  • 17. CORDIC Rotation Mode CORDIC calculations can be made in two ways • Rotation mode • Vector mode Here we use the rotation mode An input vector is rotated by a specified angle Angle accumulator is initialized with an angle This angle is reduced to zero An (x,y) pair The equations are: xi+1 = xi - yi di 2-i yi+1 = yi + xi di 2-i zi+1 = zi - di tan-1( 2-i ) and di = -1 if zi < 0 +1 otherwise
  • 18. The results are: xn = Kn ( x0 cos z0 - y0 sin z0 ) yn = Kn ( x0 sin z0 + y0 cos z0 ) Zn = 0 Kn = ( 1 + 2-2i ) Set x0 = 1 and y0 = 0 the indicial values of x & y  And get the values ofcos(z0) and sin(z0) Note Kn is a constant - dependent only on the number of iterations The algorithm would normally be run for a fixed number of iterations A result with a known accuracy bound Note that the whole calculation requires shifts , add/ subtracts only
  • 20. CORDIC Hardware Serial CORDIC Module in HDL Designer
  • 21. Result CORDIC algorithm for finding the values trigonometric function sine and cosine ,was successfully simulated . On taking input value of z as the angle which is to be calculated , and initializing the value of K as 0.607252935008881256….for 10 iterations. x as 1 and y as 0,we get the answer for the value of cos(z) and vice versa for sin(z).
  • 22. Conclusion CORDIC is not the fastest way to perform multiplications or to compute logarithms and exponentials but, since the same algorithm allows the computation of most mathematical functions using very simple basic operations, it is attractive for hardware implementations.