KR20030078541A - Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit - Google Patents

Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit Download PDF

Info

Publication number
KR20030078541A
KR20030078541A KR1020020017653A KR20020017653A KR20030078541A KR 20030078541 A KR20030078541 A KR 20030078541A KR 1020020017653 A KR1020020017653 A KR 1020020017653A KR 20020017653 A KR20020017653 A KR 20020017653A KR 20030078541 A KR20030078541 A KR 20030078541A
Authority
KR
South Korea
Prior art keywords
input
bit
operator
guard
guard bit
Prior art date
Application number
KR1020020017653A
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 KR1020020017653A priority Critical patent/KR20030078541A/en
Publication of KR20030078541A publication Critical patent/KR20030078541A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/491Computations with decimal numbers radix 12 or 20.
    • G06F7/498Computations with decimal numbers radix 12 or 20. using counter-type accumulators
    • G06F7/4981Adding; Subtracting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/499Denomination or exception handling, e.g. rounding or overflow
    • G06F7/49905Exception handling
    • G06F7/4991Overflow or underflow

Abstract

PURPOSE: A device for simply operating a guard bit on a DSP(Digital Signal Processor) and a method for processing the guard bit on the same are provided to reduce cost by reducing a circuit for processing the guard bit of an operator and reducing the number of the used devices. CONSTITUTION: The operator(20) outputs an addition result of 'n' bit through an addition operation by receiving the first and the second input of the 'n' bit. An accumulator(30) of the 'n' bit accumulates the output of the operator(20). A guard bit processor(40) compares respective code bit by inputting the first and the second input upper than 'p', and the upper 'p' bit of the operator's output, and processes the guard bit by adding or subtracting 1 to a current guard bit value according to a comparison result.

Description

DSP에서 가드 비트 처리가 간단한 연산 장치 및 상기 연산 장치에서 가드 비트 처리 방법{Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit}Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit

본 발명은 DSP에서 연산 장치에 관한 것으로, 특히 연산 장치에서의 가드 비트(guard bit)의 처리가 간단한 연산 장치 및 상기 연산 장치에서 수행되는 가드 비트 처리 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to arithmetic units in a DSP, and more particularly, to arithmetic units with simple processing of guard bits in arithmetic units and a method of processing guard bits performed in the arithmetic units.

일반적으로, DSP에서 연산기는 가드 비트를 처리하기 위해 가드 비트 크기를 포함하는 크기로 구성된다. 고정 소수점(Fixed Point) DSP는 일반적으로 16-bit 또는 24-bit의 워드(word) 구조를 갖는다. 이 때, 일반적인 DSP의 특징인 MAC(Multiply and Accumulation) 동작을 수행하기 위해 멀티플라이어와 연산기의조합이 회로상에 존재한다. 이 때, 멀티플라이어는 입력이 워드 x 워드이며 출력은 2 x 워드인 하드웨어로 구성된다. 이러한 구조에서 DSP의 주된 응용처 중 하나인 필터를 설계함에 있어서 MAC 동작이 반복되며 이 MAC 동작의 반복 중에 일시적으로 오버플로우(overflow)가 발생할 수도 있다.In general, in a DSP, an operator consists of a size that includes the guard bit size to process the guard bit. Fixed Point DSPs typically have a 16-bit or 24-bit word structure. In this case, a combination of a multiplier and an operator exists on a circuit to perform a MAC (Multiply and Accumulation) operation, which is a characteristic of a general DSP. At this time, the multiplier consists of hardware whose input is word x word and the output is 2 x word. In this structure, the MAC operation is repeated in designing a filter, which is one of the main applications of the DSP, and a temporary overflow may occur during the repetition of the MAC operation.

일반적으로, MAC 동작은 다음 수학식 1과 같은 곱셈(multiply)과 누산(accumulation)을 반복한다.In general, the MAC operation repeats multiply and accumulation as shown in Equation 1 below.

P(32-bit)=X(16-bit) * Y(16-bit)P (32-bit) = X (16-bit) * Y (16-bit)

ACC(32-bit)=ACC'+P(32-bit)ACC (32-bit) = ACC '+ P (32-bit)

X,Y는 곱셈을 수행하는 두 인자이며, ACC는 이전 누산값 ACC'에 현재의 곱셈 결과 P를 가산한 결과이다. 이처럼, X,Y 두 인자를 곱하고, 곱셈 결과를 누산하기 위해 16x16 멀티플라이어와 32-bit 연산기(ALU)가 필요하다. 이 때, 연산기에서 가산된 결과는 항상 32-bit으로 되지 않고 일시적인 오버플로우가 발생될 수 있다. 이처럼, MAC 동작 중에 발생되는 오버플로우로 인한 계산의 오류를 방지하기 위해 연산기의 비트수를 확장시키며 이처럼 확장되는 비트를 가드 비트라 한다. 예컨대, 가드 비트로 4비트를 할당한다면, 정상적인 MAC 동작을 위해 32-bit 연산기에 가드 비트 처리를 위한 4-bit 가산기(adder)가 더 필요하게 된다. 한편, 가산기는 1-bit당 XOR 로직 2개, AND 로직 2개 및 OR 로직 1개가 필요하며, 결국 4-bit 가산기를 구성하기 위해서는 XOR 로직 8개, AND 로직 8개 및 OR 로직 4개가 필요하며 이로 인한 회로의 부담이 커지게 된다.X and Y are two factors for performing multiplication, and ACC is the result of adding the current multiplication result P to the previous accumulated value ACC '. As such, you need a 16x16 multiplier and a 32-bit operator (ALU) to multiply the X, Y two factors and accumulate the multiplication result. At this time, the result added by the operator is not always 32-bit, and a temporary overflow may occur. As such, the number of bits of the operator is extended to prevent a calculation error due to an overflow that occurs during MAC operation, and the extended bits are called guard bits. For example, if 4 bits are allocated as guard bits, then a 32-bit operator needs a 4-bit adder for guard bit processing for normal MAC operation. On the other hand, the adder requires two XOR logic, two AND logic, and one OR logic per 1-bit, and eventually, eight XOR logic, eight AND logic, and four OR logic are needed to construct a 4-bit adder. This increases the burden on the circuit.

많은 DSP에서 이러한 오버플로우를 방지하기 위해 연산기 및 어큐뮬레이터에 가드비트 처리를 위한 회로를 두며, 이 회로로 인해 데이터패스 셀(datapath cell)의 크기 증가를 초래한다.Many DSPs have circuits for guardbit processing in operators and accumulators to prevent this overflow, which leads to an increase in the size of the datapath cell.

본 발명이 이루고자 하는 제1기술적 과제는 DSP에서 가드 비트 처리가 간단한 연산 장치를 제공하는 데 있다.The first technical problem to be achieved by the present invention is to provide an arithmetic unit with a simple guard bit processing in a DSP.

본 발명이 이루고자 하는 제2기술적 과제는 상기 연산 장치에서 수행되는 가드 비트 처리 방법을 제공하는 데 있다.A second technical problem to be achieved by the present invention is to provide a guard bit processing method performed in the computing device.

본 발명이 이루고자 하는 제3기술적 과제는 상기 가드 비트 처리 방법을 컴퓨터에서 실행 가능한 프로그램 코드로 기록한 기록 매체를 제공하는 데 있다.A third technical problem to be achieved by the present invention is to provide a recording medium in which the guard bit processing method is recorded in a program code executable by a computer.

도 1은 본 발명에 따른 가드 비트 처리가 간단한 연산 장치를 개략적으로 나타내는 블록도이다.1 is a block diagram schematically showing an arithmetic unit with a simple guard bit process according to the present invention.

도 2는 도 1에 도시된 장치의 가드 비트 처리부에서 수행되는 가드 비트 처리 방법을 나타내는 일실시예의 흐름도를 나타낸다.FIG. 2 is a flowchart illustrating an example of a method of processing a guard bit performed by the guard bit processing unit of the apparatus illustrated in FIG. 1.

상기 제1과제를 이루기 위해, 본 발명에 따른 연산 장치는 n(>0)비트의 제1입력과 n비트의 제2입력을 받아들여 가산처리하여 n비트의 가산 결과를 출력하는 연산기, 연산기의 출력을 누산하는 n비트의 어큐뮬레이터 및 초기 가드비트값은 어큐뮬레이터의 상위 m비트의 값과 같고, 제1입력의 상위 p(<n)비트, 제2입력의 상위 p비트 및 연산기 출력의 상위 p비트를 입력하여 각각의 부호비트를 비교하고, 비교 결과에 따라 현재 가드 비트 값에 1을 가산 또는 감산하여 가드 비트 처리를 하는 m(<n)비트의 가드 비트 처리부를 포함하는 것이 바람직하다.In order to achieve the first task, the computing device according to the present invention receives an n (> 0) -bit first input and an n-bit second input, and adds the result of an arithmetic operator and an operator. The n-bit accumulator and initial guard bit value, which accumulates the output, is equal to the value of the upper m bits of the accumulator, the upper p (<n) bits of the first input, the upper p bits of the second input, and the upper p bits of the operator output. It is preferable to include a guard bit processing unit of m (<n) bits to compare the respective coded bits by inputting and to add or subtract 1 to the current guard bit value to perform guard bit processing.

상기 제2과제를 이루기 위해, n(>0)비트의 제1입력과 n비트의 제2입력을 받아들여 가산처리하여 n비트의 가산 결과를 출력하는 연산기, 연산기의 출력을 누산하는 n비트의 어큐뮬레이터 및 연산기의 가드 비트를 처리하는 m(<n)비트의 가드 비트 처리부를 포함하는 DSP에서의 연산 장치에서, 가드 비트 처리부에서 수행되는 본 발명에 따른 가드 비트 처리 방법은 m비트의 가드 비트의 초기값을 어큐뮬레이터의 상위 m비트와 같도록 초기화하는 (a)단계, 연산기에서 오버플로우가 발생되었는가를 판단하는 (b)단계, (b)단계에서 오버플로우가 발생되면 현재 가드 비트 값에 1을 가산하고, 오버플로우가 발생되지 않았다면 연산기에서 언더플로우가 발생되었는가를 판단하는 (c)단계 및 (c)단계에서 언더플로우가 발생되면 현재 가드 비트 값에 1을 감산하고, 언더플로우가 발생되지 않았다면 현재 가드 비트 값을 그대로 유지시키는 (d)단계를 포함하는 것이 바람직하다.In order to achieve the second task, an operator that receives and adds a first input of n (> 0) bits and a second input of n bits to output an n-bit addition result, and an n-bit accumulating the output of the operator. In an arithmetic unit in a DSP including an m (<n) bit guard bit processing unit for processing guard bits of an accumulator and an operator, the guard bit processing method according to the present invention performed in the guard bit processing unit is a In step (a), the initial value is initialized to be equal to the upper m bits of the accumulator, and in step (b) and (b), it is determined whether the overflow has occurred in the operator. If an overflow occurs in steps (c) and (c) of determining whether an underflow has occurred, if the overflow has not occurred, subtract 1 from the current guard bit value, and under And the inclusion of the step (d) that if the row is not generated as it maintains the current value of the guard bit are preferred.

이하, 본 발명에 따른 DSP에서 가드 비트 처리가 간단한 연산 장치 및 상기 연산 장치에서 가드 비트 처리 방법을 첨부한 도면들을 참조하여 다음과 같이 설명한다.Hereinafter, a description will be given of an arithmetic unit with a simple guard bit processing in a DSP according to the present invention and a method of processing a guard bit in the arithmetic apparatus as follows.

도 1은 본 발명에 따른 가드 비트 처리가 간단한 연산 장치를 개략적으로 나타내는 블록도로서, 연산기(20), 어큐뮬 레이터(30) 및 가드 비트 처리부(40)를 포함하여 구성된다. 설명의 편의를 위해, 도 1에는 MAC 동작을 위한 연산 장치를 나타내며 멀티플라이어(10)가 함께 도시된다. 또한, 연산기(20) 및 어큐뮬레이터(30)는 각각 32-비트 연산기 및 어큐뮬레이터이며, 멀티플라이어(10)는 16 x 16 데이터를 입력하여 32비트를 출력하는 것으로 한다.1 is a block diagram schematically illustrating an arithmetic unit with a simple guard bit process according to the present invention, and includes an operator 20, an accumulator 30, and a guard bit processor 40. For convenience of description, FIG. 1 shows a computing device for MAC operation and shows a multiplier 10 together. The operator 20 and the accumulator 30 are 32-bit calculators and accumulators, respectively, and the multiplier 10 inputs 16 x 16 data to output 32 bits.

도 1을 참조하여, 연산기(20)는 멀티플라이어(10)에서 출력되는 32 비트의 데이터를 제1입력으로, 어큐뮬레이터(30)에서 출력되는 32 비트의 데이터를 제2입력으로서 받아들이고, 입력된 제1 및 제2입력을 가산처리하여 32 비트의 가산 결과를 출력한다.Referring to FIG. 1, the operator 20 receives 32 bits of data output from the multiplier 10 as a first input and 32 bits of data output from the accumulator 30 as a second input. The first and second inputs are added to output a 32-bit addition result.

어큐뮬레이터(30)는 연산기(20)의 32 비트 출력을 누산한다.Accumulator 30 accumulates the 32-bit output of operator 20.

가드 비트 처리부(40)는 예컨대, 4비트의 가산 비트를 가지며 초기 가드 비트값은 어큐뮬레이터(30)의 상위 4비트의 값으로 설정한다. 가드 비트 처리부(40)는 제1입력, 제2입력 및 어큐뮬레이터(30)에서 부호비트를 포함하는 상위 p(<32, 이하 p=4인 것으로 가정함)비트를 입력하여 비교하고, 비교 결과에 따라 현재의 가드비 트값에 1을 가산 또는 감산하여 가드 비트 처리를 한다.The guard bit processing unit 40 has, for example, four bits of addition bits, and the initial guard bit value is set to the value of the upper four bits of the accumulator 30. The guard bit processor 40 compares the first input, the second input, and the accumulator 30 by inputting an upper p (<32, assuming p = 4) bit including the sign bit, and comparing the result. Therefore, guard bit processing is performed by adding or subtracting 1 to the current guard bit value.

즉, 가드 비트 처리부(40)는 제1입력, 제2입력 및 어큐뮬레이터(30)의 상위 p비트를 비교함에 의해 연산기(20)에서 오버플로우 또는 언더플로우가 발생되었는가의 여부를 판단할 수 있다. 그리고, 만약, 연산기(20)에서 오버플로우가 발생되면 현재의 가드비트값에 1을 가산하고, 언더플로우가 발생되면 현재의 가드비트값에 1을 감산하는 가드 비트 처리를 한다. 즉, 오버플로우가 발생한 경우는 상위비트로의 캐리(carry)가 발생된 경우이므로 1을 가산하고, 언더플로우가 발생한 경우는 하위비트로의 캐리가 발생한 경우이므로 1을 감산한다.That is, the guard bit processing unit 40 may determine whether an overflow or underflow has occurred in the operator 20 by comparing the upper p bits of the first input, the second input, and the accumulator 30. If an overflow occurs in the operator 20, 1 is added to the current guard bit value, and if an overflow occurs, a guard bit process is performed to subtract 1 from the current guard bit value. That is, if an overflow occurs, a carry to an upper bit is generated, so 1 is added. If an underflow occurs, a carry is performed to a lower bit, so 1 is subtracted.

도 2는 도 1에 도시된 장치의 가드 비트 처리부(40)에서 수행되는 가드 비트 처리 방법을 나타내는 일실시예의 흐름도를 나타낸다.FIG. 2 is a flowchart illustrating an example of a method of processing a guard bit performed by the guard bit processing unit 40 of the apparatus illustrated in FIG. 1.

도 1 및 도 2를 참조하여, 먼저, 가드 비트 처리부(40)는 4비트의 가드비트의 초기값을 어큐뮬레이터(30)의 상위 4비트와 같도록 초기화한다. 그런 다음, 가드 비트 처리부(40)는 제1입력, 제2입력 및 어큐뮬레이터(30)에서 부호비트를 포함하는 상위 p트를 입력하여 상기 제1입력 및 제2입력의 각 부호비트와 어큐뮬레이터의 부호비트를 비교하여 오버플로우가 발생되었는가 또는 언더플로우가 발생되었는가의 여부를 판단한다(제100 및 제110단계).Referring to FIGS. 1 and 2, first, the guard bit processing unit 40 initializes the initial value of the guard bit of 4 bits to be equal to the upper 4 bits of the accumulator 30. Then, the guard bit processing unit 40 inputs the upper bits including the sign bits from the first input, the second input, and the accumulator 30, and codes each of the sign bits of the first input and the second input and the accumulator. By comparing the bits, it is determined whether an overflow has occurred or whether an underflow has occurred (steps 100 and 110).

만약, 오버플로우가 발생되었다면 가드 비트 처리부(40)는 현재의 가드 비트 값(EACC)에 1을 가산하고(제120단계), 언더플로우가 발생되었다면 현재의 가드 비트 값(EACC)에 1을 감산하고(제130단계)한다. 전술된 바와 같이, 연산기(20)에서 오버플로우가 발생한 경우는 상위비트로의 캐리(carry)가 발생된 경우이므로 1을 가산하고, 언더플로우가 발생한 경우는 하위비트로의 캐리가 발생한 경우이므로 1을 감산하는 것이다. 또한, 오버플로우도 언더플로우도 발생되지 않았다면 현재의 가드 비트 값(EACC)을 그대로 유지한다(제140단계).If an overflow occurs, the guard bit processing unit 40 adds 1 to the current guard bit value EACC (step 120), and if an overflow occurs, subtracts 1 from the current guard bit value EACC. (Step 130). As described above, when an overflow occurs in the operator 20, a carry to a higher bit is generated, and thus 1 is added. When an underflow occurs, a carry is performed to a lower bit, so 1 is subtracted. It is. In addition, if neither an overflow nor an underflow occurs, the current guard bit value EACC is maintained as it is (step 140).

한편, 오버플로우가 발생되는 경우는 양수와 양수를 가산했는데 가산 결과가 음수가 되거나 또는 양수에서 음수를 감산했는데 감산 결과가 음수인 경우이며, 이 때, 양수와 음수의 여부는 부호비트를 확인하여 알 수 있다. 즉, 가드 비트 처리부(40)는 제1입력, 제2입력 및 연산기(20)에서 출력되는 데이터의 부호비트를 비교하여, 제1입력 및 제2입력이 모두 양수일 때, 연산기(20)에서 제1입력과 제2입력을 가산한 결과가 음수인 경우 연산기(20)에서 오버플로우가 발생된 것으로 판단한다. 또한, 제1입력이 양수이고 상기 제2입력이 음수일 때, 제1입력에서 제2입력을 감산한 결과가 음수인 경우에도 가드 비트 처리부(40)는 연산기에서 오버플로우가 발생되었다고 판단한다.On the other hand, if overflow occurs, positive and positive numbers are added, but the addition result is negative, or negative numbers are subtracted from the positive number, but the subtraction result is negative. Able to know. That is, the guard bit processing unit 40 compares the sign bits of the data output from the first input, the second input, and the operator 20, and when the first input and the second input are both positive numbers, If the result of adding the first input and the second input is negative, it is determined that the overflow occurs in the calculator 20. In addition, when the first input is positive and the second input is negative, even when the result of subtracting the second input from the first input is negative, the guard bit processor 40 determines that an overflow has occurred in the calculator.

또한, 언더플로우가 발생되는 경우는 음수와 음수를 가산했는데 가산 결과가양수가 되거나 또는 음수에서 양수를 감산했는데 감산 결과가 양수인 경우이다. 즉, 가드 비트 처리부(40)는 제1입력, 제2입력 및 연산기(20)에서 출력되는 데이터의 부호비트를 비교하여, 제1입력 및 제2입력이 모두 음수일 때, 연산기(20)에서 제1입력과 제2입력을 가산한 결과가 양수인 경우 연산기(20)에서 언더플로우가 발생된 것으로 판단한다. 또한, 제1입력이 음수이고 제2입력이 양수일 때, 제1입력에서 제2입력을 감산한 결과가 양수인 경우에도 가드 비트 처리부(40)는 연산기에서 언더플로우가 발생되었다고 판단한다.In addition, when an underflow occurs, negative and negative numbers are added, but the addition result is positive, or the positive result is subtracted from negative numbers, but the subtraction result is positive. That is, the guard bit processing unit 40 compares the sign bits of the data output from the first input, the second input, and the operator 20, and when the first input and the second input are both negative, If the result of adding the first input and the second input is a positive number, the operator 20 determines that an underflow has occurred. In addition, when the first input is negative and the second input is positive, even when the result of subtracting the second input from the first input is positive, the guard bit processor 40 determines that an underflow has occurred in the calculator.

이상에서 설명된 바와 같이, 본 발명에 따른 가드 비트 처리부(40)는 연산기에서 오버플로우 또는 언더플로우가 발생되었는가의 여부에 따라 현재의 가드 비트에 1을 가산 또는 감산하는 간단한 동작으로 연산기의 가드 비트를 처리한다. 즉, 연산기의 가드 비트를 처리하기 위해 종래에는 다수의 논리 소자들이 필요하였으나, 본 발명에서는 하나의 가산기 및 감산기만을 필요하므로 연산기의 가드 비트 처리를 위한 회로의 크기를 줄이며, 이용되는 소자의 수가 크게 줄어듦으로 비용절감의 효과를 얻을 수 있다.As described above, the guard bit processing unit 40 according to the present invention is a simple operation of adding or subtracting 1 to the current guard bit according to whether an overflow or an underflow occurs in the operator. To process That is, a plurality of logic elements are conventionally required to process the guard bits of the operator. However, since only one adder and a subtractor are required in the present invention, the circuit size for the guard bit processing of the operator is reduced, and the number of elements used is large. Reduction can result in cost savings.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플라피디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터네을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상 도면과 명세서에서 최적 실시예들이 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.The best embodiments have been disclosed in the drawings and specification above. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not used to limit the scope of the present invention as defined in the meaning or claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible from this. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.

상술한 바와 같이, 본 발명에 따른 DSP에서 가드 비트 처리가 간단한 연산 장치 및 상기 연산 장치에서의 가드 비트 처리 방법에 따르면, 연산기에서 오버플로우 또는 언더플로우가 발생되었는가의 여부에 따라 현재의 가드 비트에 1을 가산 또는 감산하는 간단한 동작으로 연산기의 가드 비트를 처리한다. 즉, 연산기의 가드 비트 처리를 위해 하나의 가산기 및 감산기만이 필요하므로, 연산기의 가드 비트 처리를 위한 회로의 크기를 줄이며, 이용되는 소자의 수가 크게 줄어듦으로 비용절감의 효과를 얻을 수 있다.As described above, according to the arithmetic unit with simple guard bit processing in the DSP according to the present invention and the guard bit processing method in the arithmetic unit, according to whether or not overflow or underflow has occurred in the arithmetic unit, A simple operation that adds or subtracts one to handle the guard bits of the operator. That is, since only one adder and a subtractor are needed for the guard bit processing of the operator, the size of the circuit for guard bit processing of the operator is reduced, and the number of elements used can be greatly reduced, thereby achieving cost reduction.

Claims (6)

n(>0)비트의 제1입력과 n비트의 제2입력을 받아들여 가산처리하여 n비트의가산 결과를 출력하는 연산기;an operator which receives the first input of n (> 0) bits and the second input of n bits and adds the result to output an n-bit addition result; 상기 연산기의 출력을 누산하는 n비트의 어큐뮬레이터; 및An n-bit accumulator that accumulates the output of the operator; And 초기 가드비트값은 상기 어큐뮬레이터의 상위 m비트의 값과 같고, 상기 제1입력의 상위 p(<n)비트, 상기 제2입력의 상위 p비트 및 상기 연산기 출력의 상위 p비트를 입력하여 각각의 부호비트를 비교하고, 비교 결과에 따라 현재 가드 비트 값에 1을 가산 또는 감산하여 가드 비트 처리를 하는 m(<n)비트의 가드 비트 처리부를 포함하는 것을 특징으로 하는 연산 장치.The initial guard bit value is equal to the value of the upper m bits of the accumulator, and inputs the upper p (<n) bits of the first input, the upper p bits of the second input, and the upper p bits of the operator output, respectively. And a m (<n) bit guard bit processing unit for comparing the code bits and adding or subtracting 1 to the current guard bit value and performing guard bit processing according to the comparison result. 제1항에 있어서, 상기 가드 비트 처리부는The method of claim 1, wherein the guard bit processing unit 상기 비교 결과에 따라 상기 연산기에서 오버플로우가 발생되면 상기 현재 가드 비트 값에 1을 가산하고, 언더플로우가 발생되면 상기 현재 가드 비트 값에 1을 감산하는 것을 특징으로 하는 연산 장치.And if the overflow occurs in the operator according to the comparison result, 1 is added to the current guard bit value, and if an underflow occurs, 1 is subtracted from the current guard bit value. n(>0)비트의 제1입력과 n비트의 제2입력을 받아들여 가산처리하여 n비트의 가산 결과를 출력하는 연산기, 상기 연산기의 출력을 누산하는 n비트의 어큐뮬레이터 및 상기 연산기의 가드 비트를 처리하는 m(<n)비트의 가드 비트 처리부를 포함하는 DSP에서의 연산 장치에서, 상기 가드 비트 처리부에서 수행되는 가드 비트 처리 방법에 있어서,An operator that accepts and adds an n (> 0) bit first input and an n bit second input to output an n-bit addition result, an n-bit accumulator that accumulates the output of the operator, and a guard bit of the operator In the arithmetic unit in the DSP including a m (<n) bit guard bit processing unit for processing, in the guard bit processing method performed in the guard bit processing unit, (a)상기 m비트의 가드 비트의 초기값을 상기 어큐뮬레이터의 상위 m비트와 같도록 초기화하는 단계;(a) initializing an initial value of the m-bit guard bit to be equal to an upper m-bit of the accumulator; (b)상기 연산기에서 오버플로우가 발생되었는가를 판단하는 단계;(b) determining whether an overflow occurs in the calculator; (c)상기 (b)단계에서 오버플로우가 발생되면 현재 가드 비트 값에 1을 가산하고, 오버플로우가 발생되지 않았다면 상기 연산기에서 언더플로우가 발생되었는가를 판단하는 단계; 및(c) adding an 1 to a current guard bit value when an overflow occurs in step (b), and determining whether an underflow occurs in the operator if an overflow does not occur; And (d)상기 (c)단계에서 언더플로우가 발생되면 상기 현재 가드 비트 값에 1을 감산하고, 언더플로우가 발생되지 않았다면 상기 현재 가드 비트 값을 그대로 유지시키는 단계를 포함하는 것을 특징으로 하는 가드 비트 처리 방법.(d) subtracting 1 from the current guard bit value when an underflow occurs in step (c), and maintaining the current guard bit value as it is if no underflow occurs. Treatment method. 제3항에 있어서, 상기 (c)단계에서The method of claim 3, wherein in step (c) 상기 가드 비트 처리부는 상기 제1입력과 상기 제2입력의 부호비트와 상기 연산기에서 출력되는 부호비트를 비교하여,The guard bit processing unit compares the sign bits of the first input and the second input with the sign bits output from the operator, 상기 제1입력 및 상기 제2입력이 모두 양수일 때, 상기 연산기에서 상기 제1입력과 상기 제2입력을 가산한 결과가 음수인 경우, 상기 제1입력이 양수이고 상기 제2입력이 음수일 때, 상기 제1입력에서 상기 제2입력을 감산한 결과가 음수인 경우, 상기 연산기에서 오버플로우가 발생되었다고 판단하는 것을 특징으로 하는 가드비트 처리 방법.When both the first input and the second input are positive, when the result of adding the first input and the second input in the calculator is negative, when the first input is positive and the second input is negative And if the result of subtracting the second input from the first input is a negative number, the operator determines that an overflow has occurred. 제3항에 있어서, 상기 (d)단계에서The method of claim 3, wherein in step (d) 상기 가드 비트 처리부는 상기 제1입력과 상기 제2입력의 부호비트와 상기 연산기에서 출력되는 부호비트를 비교하여,The guard bit processing unit compares the sign bits of the first input and the second input with the sign bits output from the operator, 상기 제1입력 및 상기 제2입력이 모두 음수일 때, 상기 연산기에서 상기 제1입력과 상기 제2입력을 가산한 결과가 양수인 경우, 상기 제1입력이 음수이고 상기 제2입력이 양수일 때, 상기 제1입력에서 상기 제2입력을 감산한 결과가 양수인 경우, 상기 연산기에서 언더플로우가 발생되었다고 판단하는 것을 특징으로 하는 가드비트 처리 방법.When both the first input and the second input are negative, when the result of adding the first input and the second input in the calculator is positive, when the first input is negative and the second input is positive, And if the result of subtracting the second input from the first input is positive, the operator determines that an underflow has occurred. 제3항 내지 제5항의 방법을 컴퓨터에서 실행 가능한 프로그램 코드로 기록한 기로 매체.A cross media having recorded the method of claim 3 to 5 as program code executable on a computer.
KR1020020017653A 2002-03-30 2002-03-30 Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit KR20030078541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020020017653A KR20030078541A (en) 2002-03-30 2002-03-30 Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020020017653A KR20030078541A (en) 2002-03-30 2002-03-30 Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit

Publications (1)

Publication Number Publication Date
KR20030078541A true KR20030078541A (en) 2003-10-08

Family

ID=32377333

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020020017653A KR20030078541A (en) 2002-03-30 2002-03-30 Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit

Country Status (1)

Country Link
KR (1) KR20030078541A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170037518A (en) * 2015-09-25 2017-04-04 에이알엠 리미티드 Apparatus and method for floating-point multiplication

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20170037518A (en) * 2015-09-25 2017-04-04 에이알엠 리미티드 Apparatus and method for floating-point multiplication

Similar Documents

Publication Publication Date Title
US4727508A (en) Circuit for adding and/or subtracting numbers in logarithmic representation
US4682302A (en) Logarithmic arithmetic logic unit
EP0483864B1 (en) Hardware arrangement for floating-point addition and subtraction
US6601077B1 (en) DSP unit for multi-level global accumulation
US7188133B2 (en) Floating point number storage method and floating point arithmetic device
JPH0727453B2 (en) Floating point number processor
JP3313560B2 (en) Floating point processor
US6182100B1 (en) Method and system for performing a logarithmic estimation within a data processing system
US4941119A (en) Method and apparatus for predicting an overflow in an integer multiply
WO2005010746A1 (en) Arithmetic unit for addition or subtraction with preliminary saturation detection
US20050055185A1 (en) Random carry-in for floating-point operations
JP4273071B2 (en) Divide and square root calculator
CN112835551B (en) Data processing method for processing unit, electronic device, and computer-readable storage medium
EP4064036A1 (en) Floating-point number multiplication computation method and apparatus, and arithmetical logic unit
JP2001222410A (en) Divider
US5153850A (en) Method and apparatus for modifying two&#39;s complement multiplier to perform unsigned magnitude multiplication
KR20030078541A (en) Arithmetic unit for processing guard bits simply in DSP and guard bits processing method in the Arithmetic unit
US20080071852A1 (en) Method to perform a subtraction of two operands in a binary arithmetic unit plus arithmetic unit to perform such a method
CN112783470A (en) Device and method for executing floating point logarithm operation
US6109777A (en) Division with limited carry-propagation in quotient accumulation
JPH0511980A (en) Overflow detecting method and circuit
KR100309520B1 (en) Multiplication methods and multiplication circuits with round-off capability
US7051062B2 (en) Apparatus and method for adding multiple-bit binary-strings
US6044391A (en) Method of generating the sticky-bit from the input operands
JPH09128213A (en) Block floating processing system/method

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination