32- Bit

32
SUBMITTED BY XXXXXX XXXXXXXX XXXX XXXXXXXX FPGA Implementation of Base-N Logarithm for the Data with Random Decimal Point Positions UNDER THE GUIDELINES XXXXXX XXXXXXXX XXXX XXXXXXXX

description

Cordic Alogrithm

Transcript of 32- Bit

Page 1: 32-  Bit

SU B M I T T E D B YX X X X X X

X X X X X X X XX X X X

X X X X X X X X

FPGA Implementation of Base-N Logarithm for the Data with Random

Decimal Point Positions

U N D E R T H E G U I D E L I N E SX X X X X XX X X X X X X XX X X XX X X X X X X X

Page 2: 32-  Bit

Outline

Aim of the ProjectIntroduction ObjectiveLiterature surveyDesign MethodologyConclusion References

Page 3: 32-  Bit

AIM OF THE PROJECT

Aim :Logarithmic transformation is an important part of many digital signals processing system, especially in the fields of instruments design.

This project gives details on a simple way based on CORDIC algorithm and the idea of Data initialization to implement logarithmic transformation.

Page 4: 32-  Bit

INTRODUCTION

In domain of digital signal processing, logarithmic transformation is an indispensible part.

logarithmic transformation is not easy to achieve by using digital circuits.

The effective methods to compute the logarithmic values of data using digital circuits can be divided n two main types.

One is the look-up table based algorithms, the other is iterative methods.

Page 5: 32-  Bit

OBJECTIVE

look-up table based algorithms: faster and straightforward, but only useful for data with small bits.

iterative methods : latter is slower, but it does not rely on many memories and has relative high precision.

Objective: CORDIC algorithm just needs adders and shifters and provides relative high precision which makes it very suitable for hardware implementation

Page 6: 32-  Bit

LITERATURE SURVEY

H. Hassler and N. Takagi, “Function evaluation by table look-up and addition,” in Proc.12th Symp.on Computer Arithmetic, pp. 10–16, Jul.1995.

general approach decomposing a function into a sum of

functions each with a smaller input site than the

original. Hence we can map such functions with

essentially the same precision using small ROM tables

and adders.

Page 7: 32-  Bit

Contd..

Tso-Bing Juang, Shen-Fu Hsiao and Ming-Yu Tsai, "Para- CORDIC:Parallel CORDIC Rotation Algorithm," IEEE Transactions on Circuits and Systems, VOL 51, NO. 8, pp. 1515-1524, August. 2004.

In this paper, the parallel COrdinate Rotation DIgital Computer

(CORDIC) rotation algorithm in circular and hyperbolic coordinate is

proposed. The most critical path of the conventional CORDIC rotation lies

in the determination of rotation directions, which depends on the sign of

the remaining angle after each iteration.

Page 8: 32-  Bit

Contd..

D.R.LLAMCCA-OBREGON, C.P.AGURTO-RIOS, “Fixed

Point Implementation of Hyperbolic Cordic Alogrithm”

Latin American Applied Research- 2007.

A Fixed point Hyperbolic Cordic algorithm with expansion

scheme proposed by Hu et al,(1991) is presented.

Three Architecture :a low cost iterative, fully pipelined and bit

serial is proposed.

Page 9: 32-  Bit

Contd..

Shaowei Wang, Yuanyuan Shang, Hui Ding, Chen Wang and Junming Hu, "An FPGA Implementation of the Natural Logarithm Based on CORDIC Algorithm," Research Journal of Applied Sciences, Engineering and Technology 6(1): 119-122, 2013

This study introduces the basic principles of the mode of calculation of the hyperbolic systems by using the CORDIC algorithm, then analyses the Field-Programmable Gate Array (FPGA) CORDIC core processing unit in detail. The biggest advantage of the CORDIC algorithm is that its circuit structure is very simple, using only adder and shifter. It is very suitable for FPGA implementation. Based on the iterative algorithm, a FPGA implementation of the natural logarithmic function has been designed. The pipelined-FPGA architecture can achieve a high computational speed, for completing a computation only requires one clock cycle. The relative error values are below 10-4, which can satisfy the accuracy requirements.

Page 10: 32-  Bit

Contd..

Volder, J.E., 1959. The CORDIC trigonometric computing technique. IRE T. Electron. Comput., EC-8(3): 330-334..

In this paper, The COrdinate Rotation DIgital Computer

(CORDIC) rotation algorithm in circular and hyperbolic

coordinate is proposed.

Page 11: 32-  Bit

Contd..

R. Ranga Teja, P. Sudhakara Reddy, IEEE, Member. “Sine/Cosine Generator Using Pipelined CORDIC Processor”. IACSIT International Journal of Engineering and Technology, Vol.3, No.4, August 2011.

Here a developed of sine cosine generator, a common elementary trigonometric functions using one of the hardware efficient algorithm namely CORDIC. As the implemented design is a pipelined one, it is more efficient than bit serial approach and is more accurate and advantageous than bit serial architecture.

Page 12: 32-  Bit

Design Methodology

CORDIC IP core of Xilinx ISE software, plus the equivalent formula (1) for inverse hyperbolic tangent and natural logarithm, the natural logarithm results can be obtained(2).

Cordic IP Core with Data Initialization for ln r

function. 2

ln r

Page 13: 32-  Bit

Base N Logarithm Algorithm

Overall Designr=din

Page 14: 32-  Bit

Data Initialization

fixed-point 2’s complement numbers with an integer width of 2 bits. Q Format.

Q is a fixed point number format where the number of fractional bits (and optionally the number of integer bits) is specified.

Example: when input data are in signed fraction format, the XIN and YIN inputs are expressed as fixed-point 2’s complement numbers with an integer width of 2 bits. “101000000000000000000000” represents the value -0.5.

Page 15: 32-  Bit

Decimal point position of din

Assuming the position of decimal point of din is between bit K and bit K-1,

Combing the identification method of CORDIC IP core for input data and previous parts, it can be concluded that the inputs for CORDIC IP core inevitably need re-combination.

Page 16: 32-  Bit

Locating the decimal point

din = 24’bit data.din Specific realization idea: locating the first bit of "1" bit by left to- right shifting on the original data dins, recording their position as n, and then take each shifted binary number as din_norm.

Page 17: 32-  Bit

CORDIC Algorithm

The CORDIC algorithm involves rotation of a vector ' v' on the XY-plane in circular, linear and hyperbolic coordinate systems depending on the function to be evaluated.

The conventional method of implementation of 2D vector rotation using Givens rotation transform is represented by the equations (1) and (2).

Page 18: 32-  Bit

Contd..

where ( xin ,yin) and (xout , yout) are the initial and final coordinates of the vector, respectively. The main principle of CORDIC algorithm is to implement every function in terms of addition/subtraction and shifting.

Page 19: 32-  Bit

CORDIC Algorithm used

The CORDIC algorithm in this design is used to get corresponding inverse hyperbolic tangent results.

When we have inputs Xin and Yin, the CORDIC algorithm movethe input vector (Xin, Yin) along the hyperbolic curve (Fig.5) until the Y component reaches zero. This generates the hyperbolic “angle,” Atanh(Yin/Xin). The hyperbolic angle represents the log of the areaunder the vector (Xin, Yin) and is unrelated to atrigonometric angle.

Page 20: 32-  Bit

Contd..

Natural logarithm values can be got by doubling the corresponding inverse hyperbolic tangent results .

Obtaining natural logarithmic value of original inputs.

This part provides a base change by multiplying a constant for the natural logarithmic results.

Page 21: 32-  Bit

Contd..

CORDIC ArchitectureTwo Modes Rotational and Vector Mode

Page 22: 32-  Bit

Contd..

Types of CORDIC Architecture 1. Sequential Architecture 2. Parallel Architecture 3. Pipelined Architecture

Page 23: 32-  Bit

Contd..

Pipelined CORDIC Algorithm The ideal architecture dependsupon the speed verses area tradeoff's in the intended application. This architecture is advantageous toserial architecture as it is fast and doesn't require alook up table. The numberof blocks is dependent on the accuracy demanded by the application in which CORDIC is employed. Pipeline CORDIC

processor

Page 24: 32-  Bit

Design with an Example

Data Initialization:

Base n logarithm value:

Page 25: 32-  Bit

Specification of the design and Input Format

Hyperbolic CORDIC Function in rotation mode.

Data Initialization block to calculate the decimal point position.

Data input is of 48 bit format. Of which first bit sign bit and 1 bit integer and remaining fractional bit.

Page 26: 32-  Bit

Work Completed

Implementation of Data Initialization in VHDL.

Page 27: 32-  Bit

Remaining Work

CORDIC Pipelined IP Core.Calculation of Log value for Base N .Integration of Functional Blocks.

Page 28: 32-  Bit

Conclusion

In this project, we have introduced N logarithmic values for the

data with random decimal point positions. The design has

parametric and hierarchical characteristic, by which the design

can be easily understood.

The realization of the process is relatively simple; designers only

need to determine the positions of decimal point of input data and

get correct corresponding logarithmic values

Page 29: 32-  Bit

References

[1] H. Hassler and N. Takagi, “Function evaluation by table look-up and addition,” in Proc.12th Symp.on Computer Arithmetic, pp. 10–16, Jul.1995

[2] D. DasSarma, D.W. Matula, “Measuring the Accumcy of ROM Reciprocal Tables”, IEEE 11th Symp.on Computer Arithmetic, pp.932-940, Aug.1994.

[3] M. Schulk, E. Swartzlander, Ezact Rounding of Certain Elementary Functions, Arith 11, Proceedings,pp.138-145,1993.

Page 30: 32-  Bit

Contd..

[4] I. Koren, "Computer arithmetic algorithms, 2nd edition," ISB 1- 68-108 pp2522 resources like BRAMs, embedded multipliers, etc. ISBN 1-56881-160-8, pp. 225-232.

[5] T. Fryza, “Application of user-defined floating-point formats,” SPA.conference.on Signal Processing Algorithms, Architectures, Arrangements, and Applications, pp.91–93, Sept. 2009.

D.R.LLAMCCA-OBREGON, C.P.AGURTO-RIOS, “Fixed Point Implementation of Hyperbolic Cordic Alogrithm” Latin American Applied Research- 2007.

Page 31: 32-  Bit

Contd..

Shaowei Wang, Yuanyuan Shang, Hui Ding, Chen Wang and Junming Hu, "An FPGA Implementation of the Natural Logarithm Based on CORDIC Algorithm," Research Journal of Applied Sciences, Engineering and Technology 6(1): 119-122, 2013.

Volder, J.E., 1959. The CORDIC trigonometric computing technique. IRE T. Electron. Comput., EC-8(3): 330-334..

R. Ranga Teja, P. Sudhakara Reddy, IEEE, Member. “Sine/Cosine Generator Using Pipelined CORDIC Processor”. IACSIT International Journal of Engineering and Technology, Vol.3, No.4, August 2011.

Page 32: 32-  Bit

Thank You