[go: up one dir, main page]

KR19990085924A - Trigonometric function generator and method - Google Patents

Trigonometric function generator and method Download PDF

Info

Publication number
KR19990085924A
KR19990085924A KR1019980018620A KR19980018620A KR19990085924A KR 19990085924 A KR19990085924 A KR 19990085924A KR 1019980018620 A KR1019980018620 A KR 1019980018620A KR 19980018620 A KR19980018620 A KR 19980018620A KR 19990085924 A KR19990085924 A KR 19990085924A
Authority
KR
South Korea
Prior art keywords
data
trigonometric function
stage
carry
register
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
KR1019980018620A
Other languages
Korean (ko)
Inventor
박인철
신명철
김선빈
최진규
Original Assignee
윤종용
삼성전자 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 윤종용, 삼성전자 주식회사 filed Critical 윤종용
Priority to KR1019980018620A priority Critical patent/KR19990085924A/en
Publication of KR19990085924A publication Critical patent/KR19990085924A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Complex Calculations (AREA)

Abstract

삼각함수 생성장치가, 입력 각도데이타를 상위 θM데이타 및 θL데이타로 분리하는 레지스터와, KcosθM및 KsinθM값을 테이블화하여 저장하며 θM데이타에 대응되는 데이타를 출력하는 메모리와, 이터레이션 회수에 대응되는 연산블럭을 구비하며 복수 블럭을 한 파이프라인 단계로 묶고 각 단계 마다 하나의 레지스터를 연결하는 구조로써 θL데이타에 의해 메모리의 출력 각도 데이타를 임의 싸이클의 한 입력에 대해 해당 단계의 연산을 수행한 후 레지스터에 저장하고 다음 싸이클에서 다음 단계로 전달하는 방식으로 삼각함수를 생성하는 파이프라인 구조의 코딕으로 구성된다.The trigonometric function generator includes a register for separating input angle data into upper θ M data and θ L data, a table storing Kcosθ M and Ksinθ M values, and outputting data corresponding to θ M data, It is composed of operation blocks corresponding to the number of times of conversion, and it combines multiple blocks into one pipeline stage and connects one register for each stage.The output angle data of the memory is output by the θ L data for one input of any cycle. It consists of a pipelined codec that generates a trigonometric function by performing the operation of, storing it in a register and passing it to the next step in the next cycle.

Description

삼각함수 생성장치 및 방법Trigonometric function generator and method

본 발명은 삼각함수 생성장치 및 방법에 관한 것으로, 특히 평면 좌표 상의 벡터를 회전 이동시켜 원하는 각도를 생성하고 이 벡터의 좌표로 사인 및 코사인 값을 생성기를 병렬 구성하여 삼각함수를 생성할 수 있는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for generating a trigonometric function, and in particular, an apparatus capable of generating a desired angle by rotating and moving a vector on plane coordinates and generating a trigonometric function by constructing sine and cosine values in parallel with the coordinates of the vector. And to a method.

일반적으로 삼각함수(Sinusoid)를 만들어내는 삼각함수 생성기는 이동통신 시스템에서 샘플링(sampling)단을 거친 입력 신호에 곱해질 캐리어(carrier )파형을 생성하는데 사용되고 있다. 여기서 상기 이동통신 시스템은 소프트웨어 라디오 시스템(Software radio system)이라고 가정하며, 상기 소프트웨어 라디오 시스템은 중간주파수 단의 신호를 디지탈 데이타로 변환하여 신호를 처리하는 통신 시스템을 의미한다. 이때 상기 입력신호의 속도가 50Msps(sample per second) 이상이 되므로, 상기 삼각함수 생성기도 그 속도에 맞게 50MHz 이상의 빠른 주파수로 동작하면서 2ns 이하에 한 번씩 사인(sine) 및 코사인(cosine) 함수 값을 생성하여야 한다.In general, a trigonometric generator for generating a triangular function (Sinusoid) is used to generate a carrier waveform to be multiplied by the input signal passed through the sampling stage in the mobile communication system. Herein, it is assumed that the mobile communication system is a software radio system, and the software radio system refers to a communication system that converts a signal of an intermediate frequency stage into digital data and processes the signal. At this time, since the speed of the input signal is 50Msps (sample per second) or more, the trigonometric function generator operates at a high frequency of 50MHz or more according to the speed, and the sine and cosine function values are applied once every 2ns or less. Must be created.

현재까지 발표된 삼각함수 값을 하드웨어로 구현하는 방법들을 살펴보면, 하기와 같이 세 종류로 나눌 수 있다. 상기 세 종류의 삼각함수 생성 방법은 코디네이트 로테이션 디지탈 컴퓨터 알고리즘을 이용하는 방법, 다항식 근사법을 이용한 방법, 롬(ROM table)을 이용한 방법 등이다. 그리고 상기 삼각함수를 생성하는 종래의 방법들은 이들 기본적인 세 방법의 변형이거나, 이들의 조합으로 이루어져 있다.Looking at the hardware implementation of the trigonometric values announced so far, it can be divided into three types as follows. The three types of trigonometric methods are a method using a coordinated rotation digital computer algorithm, a method using a polynomial approximation method, a method using a ROM table, and the like. The conventional methods for generating the trigonometric functions are variations of these three basic methods or consist of a combination thereof.

먼저 코디네이트 로테이션 디지탈 컴퓨터(Coordinate Rotaiton Digital computer: 이하 CORDIC라 칭한다) 알고리즘을 살펴본다. 상기 CORDIC은 기본적으로 평면좌표 상의 벡터를 일차변환을 이용해서 회전이동시켜 원하는 각도로 만들고, 그 벡터의 좌표로 사인 값과 코사인 값을 구하는 방법으로 방법으로, J. E. Volder[J. E. Volder, "The CORDIC Trigonometric Computing Technique", IRE Trans. on Electron. Computers EC-8, Sep.1959, pp. 330-334] 및 J. S. Walter [J. S. Walter, "A Unified Algorithm for Elementary Functions", Spring Joint Computer Conf. Proc. 38, 1971, pp.379-385.] 2.1 CORDIC(COordinate Rotation DIgital Computer) 등에 의해 제안되었다. 그러나 상기와 같은 CORDIC 알고리즘은 그 벡터의 회전이동을 한 번에 원하는 각도까지 하는 것이 아니라, 특수한 회전각을 선택하여 회전 이동의 계산을 간단히 하면서(adder와 shift가 한 쌍씩만 있으면 됨), 이런 회전 이동을 반복적으로 여러 번 수행하여 점점 원하는 각도에 접근시키는 것이다. 그러나 상기 CORDIC 알고리즘은 적은 하드웨어를 반복적으로 사용하여 기본소자들의 기본 함수의 값을 계산하는 것인데, 근본적으로 반복적인(iterative) 방법이기 때문에 빠른 속도를 내는 데 적합하지는 않다.First, we look at the Coordinate Rotaiton Digital computer (hereinafter referred to as CORDIC) algorithm. The CORDIC basically converts a vector on plane coordinates to a desired angle by using a linear transformation to obtain a sine value and a cosine value using the coordinates of the vector. J. E. Volder [J. E. Volder, "The CORDIC Trigonometric Computing Technique", IRE Trans. on Electron. Computers EC-8, Sep. 1959, pp. 330-334 and J. S. Walter [J. S. Walter, "A Unified Algorithm for Elementary Functions", Spring Joint Computer Conf. Proc. 38, 1971, pp. 379-385.] 2.1 CORDIC (Coordinate Rotation DIgital Computer). However, the above CORDIC algorithm does not rotate the vector to the desired angle at once, but selects a special rotation angle to simplify the calculation of the rotational movement (only one pair of adders and shifts are needed). You can do it many times repeatedly to get closer to the angle you want. However, the CORDIC algorithm is to calculate the value of the basic function of the basic elements by using a small amount of hardware iteratively, it is not suitable for high speed because it is essentially an iterative method.

두번째로 다항식 근사법을 살펴보면, 이것은 테일러 시리즈(Taylor series) 또는 라메즈 알고리즘(Remez algorithm) 등으로 얻어진 사인과 코사인 함수를 근사화하는 다항식을 가지고 구하는 방법으로써, J.H.Hart 등[J.F.Hart et al., Computer Approxiamtions, Jonh Wiley & Sons, 1968.] 등에 의해 제안되었다. 그러나 상기와 같은 방법으로 16비트 정도의 정밀도를 가지는 출력 값을 얻어내기 위해서는 약 10번의 곱셈과 덧셈이 필요하므로, 속도와 칩(chip) 면적 면에서의 오버헤드(overhead) 큰 문제점이 있다. 따라서 상기 다항식 대신에 유리식을 쓰면 곱셈과 덧셈의 횟수를 줄이고도 같은 정도의 정밀도를 갖게 할 수 있는데, 이는 더욱 시간이 많이 걸리는 나눗셈이 한 번 필요하게 된다.Secondly, the polynomial approximation method is a method of obtaining a polynomial that approximates the sine and cosine functions obtained by the Taylor series or the Remez algorithm. Approxiamtions, Jonh Wiley & Sons, 1968. However, in order to obtain an output value having a precision of about 16 bits by the above method, about 10 multiplications and additions are required, which causes a large overhead in terms of speed and chip area. Therefore, if the rational expression is used instead of the polynomial, the number of multiplications and additions can be reduced and the same precision can be obtained, which requires a more time-consuming division.

세번째로 롬 테이블을 이용하는 방법을 살펴보면, 상기 롬 테이블에 모든 함수 값을 저장하여 놓고 입력 값을 주소로 해서 롬의 내용을 읽어 출력해 주는 방식으로써, P.T.P.Tang [Table-Lookup Algorithms for Elementary Functions and Their Error Analysis", Proc. of 10thSymp. on Computer Arithmetic, 1991, pp.232-236] 등에 의해 제안된 방식이다. 상기 롬 테이블을 이용하는 방식은 미리 정확히 계산해 놓은 값을 읽는 것 뿐이므로 정확도가 높고 속도도 빠르지만, 매우 큰 면적을 차지하는 롬이 필요하다는 문제가 있다.The third method of using the ROM table is to store all the function values in the ROM table and read and output the contents of the ROM using the input values as addresses. PTPTang [Table-Lookup Algorithms for Elementary Functions and Their Error Analysis ", Proc. Of 10 th Symp. On Computer Arithmetic, 1991, pp.232-236], etc. The method using the ROM table only reads the value calculated in advance, so the accuracy is high and the speed is high. It is also fast, but there is a problem that a ROM that requires a very large area is required.

따라서 본 발명의 목적은 간단한 구조로 빠른 속도의 삼각함수를 생성할 수 있는 장치 및 방법을 제공함에 있다.Accordingly, an object of the present invention is to provide an apparatus and a method capable of generating a triangular function of high speed with a simple structure.

본 발명의 다른 목적은 CORDIC 알고리즘을 이용하는 병렬 구조의 생성기를 구현하여 빠른 속도로 삼각함수를 생성할 수 있는 장치 및 방법을 제공함에 있다.Another object of the present invention is to provide an apparatus and method capable of generating trigonometric functions at high speed by implementing a parallel structure generator using a CORDIC algorithm.

본 발명의 또 다른 목적은 롬 테이블을 이용하여 CORDIC 알고리즘에 필요한 각도의 가감산을 제거하며, 병렬 단 길이를 단축하여 간단한 구조로 삼각함수를 빠르게 생성할 수 있는 장치 및 방법을 제공함에 있다.It is still another object of the present invention to provide an apparatus and a method for quickly generating a trigonometric function with a simple structure by eliminating the addition and subtraction of an angle required for a CORDIC algorithm using a ROM table, and by shortening the parallel stage length.

상기 목적을 달성하기 위한 본 발명의 실시예에 따른 삼각함수 생성장치는, 입력 각도데이타를 상위 θM데이타 및 θL데이타로 분리하는 레지스터와, KcosθM및 KsinθM값을 테이블화하여 저장하며 상기 θM데이타에 대응되는 데이타를 출력하는 메모리와, 이터레이션 회수에 대응되는 연산블럭을 구비하며 복수 블럭을 한 파이프라인 단계로 묶고 각 단계 마다 하나의 레지스터를 연결하는 구조로써 상기 θL데이타에 의해 상기 메모리의 출력 각도 데이타를 임의 싸이클의 한 입력에 대해 해당 단계의 연산을 수행한 후 레지스터에 저장하고 다음 싸이클에서 다음 단계로 전달하는 방식으로 삼각함수를 생성하는 파이프라인 구조의 코딕으로 구성된 것을 특징으로 한다.The trigonometric function generating device according to the embodiment of the present invention for achieving the above object, the register to separate the input angle data into the upper θ M data and θ L data, and stores the Kcos θ M and Ksin θ M value table and an operation block corresponding to the memory, the iteration number of times for outputting the data corresponding to θ M data and enclosed in a multiple block pipeline stage by the θ L data as a structure for connecting one of the register at each stage The output angle data of the memory is composed of a codec of a pipeline structure that generates a trigonometric function by performing a step operation on an input of an arbitrary cycle, storing the result in a register, and transferring the next step in the next cycle. It is done.

도 1은 CORDIC 알고리즘을 설명하기 위한 도면1 is a diagram for explaining a CORDIC algorithm.

도 2는 간단한 하나의 연산블럭을 이용한 CORDIC 구현장치의 구성을 도시하는 도면2 is a diagram showing the configuration of a CORDIC implementation using a simple one operation block

도 3은 병렬 CORDIC의 전체적인 블럭 구성을 도시하는 도면3 is a diagram showing the overall block configuration of a parallel CORDIC;

본 발명의 실시예는 상기 CORDIC 알고리즘을 병렬(pipeline) 구조로 구현하여 빠른 속도로 삼각함수를 생성할 수 있는 장치 및 방법을 제공하는 것이다. 상기 병렬 구조로 구현하는 데 있어 문제가 되는 것은 각 단에서 쓰이는 덧셈의 캐리의 전달 속도인데 , 본 발명의 실시예에서는 롬테이블과 캐리 저장용 가산기(carry save adder)의 일종인 압축기(4-2 compressor)를 이용해서 마지막 단계 이외에는 캐리의 전달이 없도록 했다. 본 발명의 실시예에서 사용되는 롬 테이블은 앤트리(entry) 수가 아주 적은(32 정도) 것으로, 본래의 CORDIC 알고리즘에 필요했던 각도의 덧셈, 뺄셈을 하지 않아도 되는 것과 병렬 단(pipeline stage) 길이를 짧게 만들어 하드웨어를 절약하게 해 주는 두 가지 기능을 수행한다.An embodiment of the present invention is to provide an apparatus and method for generating a trigonometric function at a high speed by implementing the CORDIC algorithm in a pipeline (pipeline) structure. The problem in implementing the parallel structure is the transfer speed of the carry of the addition used in each stage. In the embodiment of the present invention, the compressor (4-2) is a kind of a ROM table and a carry save adder. Compressors were used to ensure no carry was passed except at the last stage. The ROM table used in the embodiment of the present invention has a very small number of entries (about 32), which eliminates the angle addition and subtraction required for the original CORDIC algorithm, and the parallel stage length. It performs two functions that make it short and saves hardware.

먼저 상기 CORDIC 알고리즘을 살펴본다.First, the CORDIC algorithm will be described.

도 1은 CORDIC 알고리즘을 설명하기 위한 도면이다.1 is a diagram for explaining a CORDIC algorithm.

도 2의 2a 및 2b는 하나의 연산블럭을 이용하여 CORDIC을 구현한 구성을 도시하고 있다. 상기 도 2의 2a를 참조하면, X레지스터211은 가산기219의 출력을 입력하며, Y레지스터213은 가산기221의 출력을 입력한다. 쉬프터215는 상기 Y레지스터213의 출력을 입력하여 쉬프트시키며, 쉬프터217은 상기 X레지스터211의 출력을 입력하여 쉬프트시킨다. 상기 가산기219는 상기 X레지스터211의 출력과 상기 쉬프터215의 출력을 가산 출력한다. 상기 가산기221은 상기 Y레지스터213의 출력과 상기 쉬프터217의 출력을 가산 출력한다. 상기 도 2의 2b를 참조하면, 레지스터232는 가산기234의 출력을 저장하며, 가산기234는 상기 레지스터232의 출력과 회전 이동 유무에 따라 αi를 가산 또는 감산하여 출력한다.2A and 2B of FIG. 2 show a configuration in which CORDIC is implemented using one operation block. Referring to 2a of FIG. 2, the X register 211 inputs the output of the adder 219 and the Y register 213 inputs the output of the adder 221. The shifter 215 inputs and shifts the output of the Y register 213, and the shifter 217 inputs and shifts the output of the X register 211. The adder 219 adds an output of the X register 211 and an output of the shifter 215. The adder 221 adds and outputs the output of the Y register 213 and the output of the shifter 217. Referring to 2b of FIG. 2, the register 232 stores the output of the adder 234, and the adder 234 adds or subtracts α i according to the output of the register 232 and the presence or absence of rotational movement.

우선, 임의의 벡터 P=(x,y)를 원점을 중심으로 각 α만큼 회전이동시키는 일차변환은 하기 <수학식 1>과 같이 나타낼 수 있다.First, a linear transformation of rotating an arbitrary vector P = (x, y) by an angle α about an origin can be expressed by Equation 1 below.

그런데 상기 <수학식 1>에서 α를 tan-1(2-1)라는 특수한 각으로 잡으면, 상기 <수학식 1>은 하기 <수학식 2>와 같이 나타난다.However, when α is set to a special angle of tan −1 (2 −1 ) in Equation 1, Equation 1 is expressed as Equation 2 below.

상기 <수학식 2>에서 2-i을 곱하는 것은 이진수에서는 실제로 곱셈을 수행하는 것이 아니라 i 비트 만큼 오른쪽으로 쉬프트하기만 하면 되므로, cosα를 곱하는 것을 제외하면 쉬프트 및 가산(shift & add) 연산만으로 계산할 수 있다. 즉 x"는 y를 i 비트 만큼 오른쪽으로 쉬프트한 것을 y에서 뺌으로써 구할 수 있고, y"는 x를 i 비트 만큼 오른쪽으로 쉬프트한 것을 y에 더함으로써 구할 수 있다.The <Equation 2> is multiplied with a binary number from 2 -i In fact, since you only need to shift to the right as well as to carry out the multiplication i bits, except for the cosα, which is multiplied by the shift and add (add & shift) calculated only operation Can be. That is, x " can be obtained by subtracting y from y by shifting to the right by i bits, and y " can be obtained by adding y to shifting x to the right by i bits.

상기 CORDIC 알고리즘은 상기 도 2의 2a 및 2b에 도시된 바와 같이, 이것을 이용해서 입력으로 각 θ가 주어지면 tan-1(2-0), tan-1(2-1),.... tan-1(2-n),을 적절하게 차례차례 더하거나 빼면서 (x,y)를 αi=tan-1(2-i) 또는 -αi씩 회전 이동시키는(단, cosαi를 곱하는 것은 하지 않음) 것이다. 그러면 tan-1(2-i)가 점점 0에 가까워지면서 도 1과 같이 회전 이동한 각도의 합은 θ에 점점 가까워지게 된다. 그러면 처음 벡터가 (x,y)=(1,0)으로 각도가 0이고 크기가 1이었다면, 마지막 벡터의 각도는 θ이고 크기는 1에서 cosαi를 계속 나눈 것이 된다. 그러니까 처음에 (x,y)를 (K = cosα0cosα1…cosαn,0) 로 놓으면, 마지막 벡터는 각도가 θ이고 크기는 1인 벡터 (cosθ, sinθ)가 되어 우리가 원하는 cosθ와 sinθ 값을 얻게 되는 것이다. 그리고 αi만큼 회전이동할 것인지 -αi만큼 할 것인지의 결정은 단순히 θi-1(θ에서 αi를 빼는 계산을 i-1번까지 한 결과)가 0보다 크면 αi를 빼고, 작으면 더하도록 결정하면 된다.The CORDIC algorithm uses tan -1 (2 -0 ), tan -1 (2 -1 ), .. tan if an angle θ is given as an input using this, as shown in 2a and 2b of FIG. Add or subtract -1 (2 -n ), sequentially or subtracting (x, y) by α i = tan -1 (2 -i ) or -α i (but not multiplying cosα i ) ) will be. Then, tan −1 (2 −i ) becomes closer to 0, and the sum of the angles rotated as shown in FIG. 1 becomes closer to θ. Then, if the first vector is (x, y) = (1,0) and the angle is 0 and the size is 1, then the last vector's angle is θ and the magnitude is 1 divided by cosα i . So release in the first (x, y) for (K = cosα 0 cosα 1 ... cosαn, 0), the final vector is the angle θ size of 1 vector is a (cosθ, sinθ) cosθ we want the sinθ value You will get And whether to move rotated by α ii by determination of whether to simply (a result of the calculation to subtract the α i from θ i-1 times) θ i-1, except that the α i is greater than zero and less more You can decide to.

여기서 본 발명의 실시예에 따른 병렬 구조의 CORDIC(pipelined CORDIC)의 동작을 살펴본다.Herein, the operation of a pipelined CORDIC having a parallel structure according to an embodiment of the present invention will be described.

상기한 바와 같이 본 발명의 실시예에 따른 삼각함수 생성기는 50MHz 이상의 주파수로 동작하면서 1사이클에 하나의 출력을 내줄 수 있어야 한다. 상기 CORDIC은 사용되는 연산 자체는 아주 간단한 쉬프트와 덧셈 뿐이지만, 이들로 이루어진 하나의 연산 블럭을 반복적으로 사용해야만 한다. 그리고 상기 CORDIC은 반복적인 방법(iteration)을 1회 수행할 때마다 출력 값의 정밀도가 1 비트 씩 늘어나는 특성이 있다. 즉, 출력의 비트 수만큼 이터레이션(iteration)을 반복해서 해야 하기 때문에 1싸이클에 출력을 하나씩 내 주는 것은 불가능하다.As described above, the trigonometric function generator according to the embodiment of the present invention should be able to give one output in one cycle while operating at a frequency of 50 MHz or more. The CORDIC uses only simple shifts and additions, but it must use a single block of operations repeatedly. In addition, the CORDIC is characterized in that the precision of the output value is increased by one bit each time the iteration is performed once. That is, iterating over the number of bits of the output must be repeated, so it is impossible to give one output per cycle.

그래서 본 발명 실시예에 따른 삼각함수 생성기는 롬 테이블과 파이프라인 구조를 이용해서, 하나의 입력이 들어가서 출력이 나올 때까지는 수 싸이클이 걸리지만 각각의 출력이 나오는 간격은 1싸이클이 될 수 있도록 했다.Thus, the trigonometric function generator according to the embodiment of the present invention uses a ROM table and a pipelined structure so that it takes several cycles until one input is input and the output is output, but each output interval is one cycle. .

상기 θ를 상위 몇 bit θM과 하위 θL로 나누어 θM으로는 미리 (x,y)=(KcosθM,KsinθM)의 값을 저장해 둔 롬 테이블을 액세스하여 그 값을 읽어오고, 여기서 얻어진 (X,Y)값을 파이프라인 구조의 CORDIC을 이용해서 θL만큼 회전시킨다. 상기 파이프라인 구조의 CORDIC은 CORDIC의 반복되는 이터레이션 회수 만큼의 연산 블럭들을 구성하며, 몇 블럭을 한 파이프라인 단계로 묶고 각 단계마다 레지스터가 하나씩 있는 구조로 이루어져 있다. 한 싸이클에 임의 한 입력에 대해 한 단계의 계산이 끝나면 레지스터에 저장해 두었다가, 다음 싸이클에는 상기 레지스터에 저장한 정보를 다음 단계로 넘겨 계산하고 계산이 끝난 단계에서는 새로운 다음 입력에 대한 계산을 수행하는 식으로 해서, 결과적으로 1 싸이클에 하나의 출력이 나올 수 있도록 하는 것이다.The θ is divided by the upper few bits θ M and the lower θ L, and the θ M is accessed by reading a ROM table storing a value of (x, y) = (Kcosθ M , Ksinθ M ) in advance, and reading the value. Rotate the (X, Y) value by θ L using the CORDIC of the pipeline structure. The CORDIC of the pipeline structure constitutes as many operation blocks as the number of repeated iterations of the CORDIC, and consists of a structure in which several blocks are grouped into one pipeline stage and one register is included in each stage. After calculating one step for a certain input in one cycle, it is stored in a register, and the next cycle calculates the information stored in the register to the next step and calculates the new next input at the end of the calculation. As a result, one output can be output per cycle.

그러나, 상기와 같은 파이프라인 구조의 CORDIC을 사용하더라도 (x,y)의 계산에서는 덧셈을 수행해야 하고 θ1의 계산에서는 비교 연산을 수행해야 하므로, 캐리의 전달에 필요한 시간 때문에 각각의 이터레이션에서 많은 시간을 소용하게 된다. 그래서 상기 (x,y)의 값을 계산할 때는 도중에 생성되는 값들은 캐리 저장 가산기의 일종인 4-2 압축기로 더해서 캐리의 전달을 제거하고, 마지막 단에서만 캐리 룩-어헤드 가산기(carry look-ahead adder)를 이용해서 빠르게 캐리가 전달되는 덧셈을 수행하도록 했다.However, even when using the CORDIC of the pipeline structure as described above, the addition must be performed in the calculation of (x, y) and the comparison operation must be performed in the calculation of θ 1 . It takes a lot of time. So, when calculating the value of (x, y), the values generated along the way are removed by 4-2 compressor which is a kind of carry storage adder to remove carry transfer and carry look-ahead adder only at the last stage. adder is used to quickly perform carry-adding.

그리고 상기 θ값의 계산을 살펴보면, 원래의 CORDIC에서는 매 이터레이션 마다 θ가 0보다 큰지 작은지를 비교해야 하지만, 파이프라인 구조의 CORDIC에서는 실제로는 비교를 하지 않는다. 상기 CORDIC 알고리즘의 성질 중에는 전체 이터레이션들 중 뒤의 2/3에 대해서는 i번째 CORDIC 이터레이션 방향이 앞의 1/3에 대한 회전 이동을 한 각도의 i-1번째 비트와 같다는 것이 있다. 만약 앞의 1/3의 이터레이션에 대한 계산을 롬 테이블에 저장한 값으로 대체한다면, 파이프라인안에서의 이터레이션 방향은 각도의 덧셈, 뺄셈 계산없이 단순히 처음 입력 각도의 하위 2/3 비트를 보고 1이면 +방향으로 결정되고 0이면 -방향으로 결정될 수 있다.In the calculation of the value of θ, in the original CORDIC, it is necessary to compare whether θ is greater than or less than zero for each iteration, but in the CORDIC of the pipeline structure, it is not actually compared. One of the properties of the CORDIC algorithm is that for the latter two-thirds of the entire iterations, the i-th CORDIC iteration direction is equal to the i-1 th bit of the angle at which the rotational movement of the preceding one-third is made. If you replace the previous one-third iteration with the value stored in the ROM table, the iteration direction in the pipeline simply looks at the lower two-thirds of the first input angle without adding or subtracting angles. 1 can be determined in the + direction and 0 can be determined in the-direction.

그러나 상기 롬 테이블의 하나의 엔트리는 그다지 넓이가 넓지 않지만 주소의 비트 수가 하나 늘 때마다 엔트리 수가 2배씩 늘어나고, 4-2 압축기는 한 단이 넓은 면적을 차지하지만 입력 비트 수가 하나 늘 때마다 단 수는 선형적으로 증가한다. 그래서 θM과 θL을 각각 몇 비트로 할 것인가가 면적을 최소화하는 데 중요한데, 입력이 16비트라면 θM이 대략 전체의 1/3보다 약간 클 때 면적이 최소화되므로 문제될 것이 없다.However, one entry in the ROM table is not very wide, but each time the number of bits in the address increases, the number of entries doubles, and the 4-2 compressor occupies a large area, but each time the number of input bits increases. Increases linearly. Therefore, how many bits each of θ M and θ L is important for minimizing the area. If the input is 16 bits, there is no problem because the area is minimized when θ M is slightly larger than approximately 1/3 of the total.

상기와 같은 파이프라인 구조의 CORDIC을 이용하면 완전히 롬 테이블로 구현하는 것 보다 훨씬 작은 롬과 몇 단의 덧셈기와 레지스터만으로 50MHz 이상으로 동작하면서 1 싸이클에 하나씩 출력을 내주는 삼각함수 생성기를 만들 수 있다.By using the CORDIC of the pipeline structure as above, it is possible to make a trigonometric function generator that outputs one output per cycle while operating at 50MHz or more with only a few ROMs and a few stage adders and registers, rather than a complete ROM table. .

도 3은 본 발명의 실시 예에 따라 롬 테이블과 파이프라인 구조의 CORDIC을 이용해서 설계한 삼각함수 생성기를 실제로 RTL(Register Transfer Level) 수준에서 모델링(C++ language modeling )하여 구현한 예를 도시하고 있으며, 이런 삼각함수 생성기를 시뮬레이션(simulation)하여 에러 분석(error analysis)을 한다.FIG. 3 illustrates an example in which a trigonometric generator designed using CORDIC of a ROM table and a pipeline structure is actually modeled at the register transfer level (RTL) level (C ++ language modeling) according to an embodiment of the present invention. Then, this trigonometric generator is simulated to perform error analysis.

상기 도 3을 참조하면, 현재 입력과 출력으로 요구되는 비트 수와 같은 기본적인 사양도 확실히 정해지지 않은 상황이지만, 우선 입력으로 들어오는 각도가 16비트이고, 출력 사인 및 코사인 함수도 16비트라고 가정하여 회로를 구현했다. 이때 사양들이 달라지면 롬 테이블316의 크기와 파이프라인 구조를 갖는 CORDIC 단계320 및 324의 수들이 달라질 뿐 아니라, 전체적인 구조까지 변경될 가능성이 있다.Referring to FIG. 3, although the basic specifications such as the number of bits required for the current input and output are not clearly determined, first, the circuit is assumed assuming that the input angle is 16 bits and the output sine and cosine functions are 16 bits. Implemented. If the specifications are different, the size of the ROM table 316 and the number of CORDIC stages 320 and 324 having the pipeline structure are not only changed, but the overall structure may be changed.

상기와 같이 구현된 삼각함수 생성기는 레지스터312에 도시된 바와 같이 16비트의 각도중 상위 5비트로 롬 테이블316을 액세스하고, 하위 11비트들 이용하여 11회의 CORDIC 이터레이션의 방향을 결정하였다. 상기 파이프라인 단계를 보면, 첫 단계에서 롬 테이블을 액세스하고, 2~4 단계에서 각각 한 단계에 4회씩의 CORDIC 이터레이션을 수행한다. 마지막 5 단계에서는 캐리가 전달되는 덧셈을 하게 된다. 그리고, 출력은 16비트이지만 마지막 비트까지 정확하게 구하기 위해 중간의 계산들은 21-비트 precision에서 수행한다. 이렇게 해서 두 개의 25엔트리× 21 비트의 롬 테이블과 21 비트 4-2 압축기 11쌍, 레지스터 6단, 그리고 마지막에 캐리와 가산(carry & sum)을 더하기 위한 16-비트 캐리-선택 가산기(bit carry-select adder)가 두개 들어가는 회로로 파이프라인 구조의 CORDIC을 이용한 삼각함수 생성기를 구현했다.The trigonometric function generator implemented as described above accesses the ROM table 316 with the upper 5 bits of the 16-bit angle as shown in the register 312, and determines the direction of 11 times of CORDIC iteration using the lower 11 bits. In the pipeline stage, the ROM table is accessed in the first stage and four CORDIC iterations are performed in each stage in stages 2-4. In the last five steps, the carry is added. The output is 16 bits, but the intermediate calculations are performed at 21-bit precision to get the last bit correctly. This allows two 25 entry × 21 bit ROM tables, 11 pairs of 21 bit 4-2 compressors, 6 registers, and a 16-bit carry-select adder to add carry and sum at the end. As a circuit containing two carry-select adders, a trigonometric generator using pipelined CORDIC is implemented.

상기와 같은 사양으로 모델링된 회로에 0<q<p/2 범위의 각도 q를 16비트로 나타낸 것을 모두 입력으로 넣어서 시뮬레이션한 결과, 시뮬레이션에서 구해진 값들과 정확한 함수 값을 16비트로 반올림 한 값이 일치할 확률은 92.8%였고, 정확한 값에 대한 최대 오차는 0.082 ulp(unit in the last position)였다. 즉, 최대 오차가 1 ulp를 넘지 않으므로 정확한 16 비트 결과와 다르게 나오는 7.2%의 경우라 하더라도 기껏해야 맨 마지막 자리 하나만 들릴 뿐이다.In the circuit modeled with the above specification, the simulation shows that the angle q in the range of 0 <q <p / 2 in 16 bits is inputted, and the values obtained by the simulation and the value rounded to the correct function value to 16 bits may be identical. The probability was 92.8% and the maximum error for the correct value was 0.082 ulp (unit in the last position). In other words, the maximum error does not exceed 1 ulp, so at most 7.2% of the time, unlike the exact 16-bit result, only the last digit is heard.

상술한 바와 같이 롬테이블 및 파이프라인 구조의 CORDIC을 이용하여 삼각함수 생성장치를 구현하며, 상기 롬테이블을 이용하여 엔트리 수를 작게하여 CORDIC에서 필요로 하는 각도의 덧셈 및 뺄셈을 감축하고 파이프라인 길이를 짧게 하여 간단구조의 삼각함수 발생기를 구현할 수 있는 이점이 있다.As described above, a trigonometric function generator is implemented by using CORDIC of a ROM table and a pipeline structure, and the number of entries is reduced by using the ROM table to reduce addition and subtraction of angles required by CORDIC, and to reduce pipeline length. By shortening there is an advantage that can implement a trigonometric generator of a simple structure.

Claims (4)

삼각함수 생성장치에 있어서,In the trigonometric function generator, 입력 각도데이타를 상위 θM데이타 및 θL데이타로 분리하는 레지스터와,A register that separates the input angle data into upper θ M data and θ L data, KcosθM및 KsinθM값을 테이블화하여 저장하며, 상기 θM데이타에 대응되는 데이타를 출력하는 메모리와,A memory for tabulating and storing Kcosθ M and Ksinθ M values, and outputting data corresponding to the θ M data; 이터레이션 회수에 대응되는 연산블럭을 구비하며, 복수 블럭을 한 파이프라인 단계로 묶고 각 단계 마다 하나의 레지스터를 연결하는 구조로써, 상기 θL데이타에 의해 상기 메모리의 출력 각도 데이타를 임의 싸이클의 한 입력에 대해 해당 단계의 연산을 수행한 후 레지스터에 저장하고 다음 싸이클에서 다음 단계로 전달하는 방식으로 삼각함수를 생성하는 파이프라인 구조의 코딕으로 구성된 것을 특징으로 하는 삼각함수 생성장치.Comprising an operation block corresponding to the number of iterations, a structure that binds a plurality of blocks in one pipeline stage and connects one register at each stage, and the output angle data of the memory by one of the θ L data A trigonometric function generator comprising a pipeline structure codic that generates trigonometric functions by performing operations of the corresponding stages on the input and storing them in registers and passing them to the next stage in the next cycle. 제1항에 있어서, 상기 파이프 라인 구조의 코딕이 연산시 도중에 생성되는 값들을 캐리저장 가산기에 저장하여 캐리 전달을 제거하고, 최종단에서 캐리 룩-어헤드 가산기를 이용하여 캐리를 신속하게 전달하는 덧셈을 수행하는 수단을 더 구비한 것을 특징으로 하는 삼각함수 생성장치.The method according to claim 1, wherein the codec of the pipeline structure stores the values generated during the operation in a carry storage adder to remove carry transfer, and at the last stage, the carry is quickly transferred using a carry look-ahead adder. A trigonometric function generator further comprising means for performing addition. KcosθM및 KsinθM값을 테이블화하여 저장하는 메모리와, 이터레이션 회수에 대응되는 연산블럭을 구비하며 복수 블럭을 한 파이프라인 단계로 묶고 각 단계 마다 하나의 레지스터를 연결하는 파이프라인 구조의 코딕을 구비하는 삼각함수 생성장치에 있어서,The codec of the pipeline structure is provided with a memory that stores the Kcosθ M and Ksinθ M values in a table, and an operation block corresponding to the number of iterations, which combines multiple blocks into one pipeline stage and connects one register to each stage. In the trigonometric function generator provided, 입력 각도데이타를 상위 θM데이타 및 θL데이타로 분리하는 과정과,Separating input angle data into upper θ M data and θ L data, 상기 θM데이타에 대응되는 데이타를 상기 메모리에서 출력하는 과정과,,Outputting data corresponding to the θ M data from the memory; 상기 메모리의 출력 각도 데이타를 상기 θL데이타에 의해 임의 싸이클의 한 입력에 대해 해당 단계의 연산을 수행한 후 레지스터에 저장하고 다음 싸이클에서 다음 단계로 전달하는 방식으로 삼각함수를 생성하는 과정으로 이루어짐을 특징으로 하는 삼각함수 생성방법.The triangular function is generated by outputting the output angle data of the memory to the input of any cycle by the θ L data and storing it in a register and transferring it to the next step in the next cycle. Trigonometric function generation method characterized in that. 제3항에 있어서, 상기 삼각함수를 생성하는 과정이 연산시 도중에 생성되는 값들을 캐리저장 가산기에 저장하여 캐리 전달을 제거하고, 최종단에서 캐리 룩-어헤드 가산기를 이용하여 캐리를 신속하게 전달하는 덧셈을 수행하는 과정을 더 구비함을 특징으로 하는 삼각함수 생성방법.4. The method of claim 3, wherein the generating of the trigonometric function stores carry values by storing the values generated during the operation in a carry storage adder, and quickly carries the carry using a carry look-ahead adder at the final stage. A trigonometric function generation method characterized by further comprising the process of performing the addition.
KR1019980018620A 1998-05-22 1998-05-22 Trigonometric function generator and method Withdrawn KR19990085924A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980018620A KR19990085924A (en) 1998-05-22 1998-05-22 Trigonometric function generator and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980018620A KR19990085924A (en) 1998-05-22 1998-05-22 Trigonometric function generator and method

Publications (1)

Publication Number Publication Date
KR19990085924A true KR19990085924A (en) 1999-12-15

Family

ID=65891240

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980018620A Withdrawn KR19990085924A (en) 1998-05-22 1998-05-22 Trigonometric function generator and method

Country Status (1)

Country Link
KR (1) KR19990085924A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7668689B2 (en) 2006-12-05 2010-02-23 Toshiba Kikai Kabushiki Kaisha Velocity detection apparatus
US8289013B2 (en) 2005-08-22 2012-10-16 Toshiba Kikai Kabushiki Kaisha Speed detector and servomotor
US8401817B2 (en) 2008-05-22 2013-03-19 Toshiba Kikai Kabushi Kaisha Velocity detection device and servomotor
KR101455086B1 (en) * 2012-02-16 2014-10-28 삼성탈레스 주식회사 High speed trigonometric calculating method using trigonometric function table
KR101509499B1 (en) * 2012-02-16 2015-04-07 삼성탈레스 주식회사 High speed trigonometric calculating apparatus using field programmable gate array
KR20170008998A (en) * 2015-07-15 2017-01-25 엘지전자 주식회사 Method for generating a sinusoidal function and method for synthesizing a direct digital frequency
CN117573069A (en) * 2023-11-23 2024-02-20 北京国科天迅科技股份有限公司 CORDIC algorithm chip

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8289013B2 (en) 2005-08-22 2012-10-16 Toshiba Kikai Kabushiki Kaisha Speed detector and servomotor
US7668689B2 (en) 2006-12-05 2010-02-23 Toshiba Kikai Kabushiki Kaisha Velocity detection apparatus
KR100959215B1 (en) * 2006-12-05 2010-05-19 도시바 기카이 가부시키가이샤 Speed detection device
US8401817B2 (en) 2008-05-22 2013-03-19 Toshiba Kikai Kabushi Kaisha Velocity detection device and servomotor
KR101455086B1 (en) * 2012-02-16 2014-10-28 삼성탈레스 주식회사 High speed trigonometric calculating method using trigonometric function table
KR101509499B1 (en) * 2012-02-16 2015-04-07 삼성탈레스 주식회사 High speed trigonometric calculating apparatus using field programmable gate array
KR20170008998A (en) * 2015-07-15 2017-01-25 엘지전자 주식회사 Method for generating a sinusoidal function and method for synthesizing a direct digital frequency
CN117573069A (en) * 2023-11-23 2024-02-20 北京国科天迅科技股份有限公司 CORDIC algorithm chip
CN117573069B (en) * 2023-11-23 2024-04-19 北京国科天迅科技股份有限公司 CORDIC algorithm chip

Similar Documents

Publication Publication Date Title
US5737253A (en) Method and apparatus for direct digital frequency synthesizer
US5991788A (en) Method for configuring an FPGA for large FFTs and other vector rotation computations
EP2304546A1 (en) Sine/cosine generator
US4945505A (en) Cordic apparatus and method for approximating the magnitude and phase of a complex number
Heikalabad et al. Midpoint memory: a special memory structure for data-oriented models implementation
EP0264256A2 (en) Apparatus and method for approximating the magnitude of a complex number
EP0744054A1 (en) High speed function generating apparatus and method
Lakshmi et al. VLSI architecture for parallel radix-4 CORDIC
KR19990085924A (en) Trigonometric function generator and method
Deng et al. High-speed parameterisable Hough transform using reconfigurable hardware
CN117573069B (en) CORDIC algorithm chip
Verma et al. Pipelined CORDIC Architecture Based DDFS Design and Implementation
US4604723A (en) Bit-slice adder circuit
EP0365226A2 (en) Cordic apparatus and method for approximating the magnitude and phase of a complex number
Minallah et al. Real time FFT processor implementation
EP0116438B1 (en) Binary digital processor
Hertz et al. A methodology for parabolic synthesis of unary functions for hardware implementation
Sravya et al. Hardware posit numeration system primarily based on arithmetic operations
Poczekajlo et al. Modified CORDIC Algorithm for Givens Rotator
Jimeno et al. Reconfigurable computing for tool-path computation
Pujari et al. Design and FPGA Implementation of pre-computation based radix-4 hyperbolic CORDIC for Direct Digital Synthesis
Chen et al. Architecture for CORDIC algorithm realization without ROM lookup tables
Villalba et al. Radix-4 vectoring CORDIC algorithm and architectures
JP3613466B2 (en) Data arithmetic processing apparatus and data arithmetic processing program
Chen et al. High-resolution architecture for CORDIC algorithm realization

Legal Events

Date Code Title Description
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 19980522

PG1501 Laying open of application
PC1203 Withdrawal of no request for examination
WITN Application deemed withdrawn, e.g. because no request for examination was filed or no examination fee was paid