KR20110085385A - A parallel multiplier accumulator using the booth encoding - Google Patents

A parallel multiplier accumulator using the booth encoding Download PDF

Info

Publication number
KR20110085385A
KR20110085385A KR1020100005152A KR20100005152A KR20110085385A KR 20110085385 A KR20110085385 A KR 20110085385A KR 1020100005152 A KR1020100005152 A KR 1020100005152A KR 20100005152 A KR20100005152 A KR 20100005152A KR 20110085385 A KR20110085385 A KR 20110085385A
Authority
KR
South Korea
Prior art keywords
carry
adder
sum
bits
result
Prior art date
Application number
KR1020100005152A
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 KR1020100005152A priority Critical patent/KR20110085385A/en
Publication of KR20110085385A publication Critical patent/KR20110085385A/en

Links

Images

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/50Adding; Subtracting
    • G06F7/505Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination
    • G06F7/506Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages
    • G06F7/508Adding; Subtracting in bit-parallel fashion, i.e. having a different digit-handling circuit for each denomination with simultaneous carry generation for, or propagation over, two or more stages using carry look-ahead circuits
    • 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/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/53Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel
    • G06F7/5306Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel with row wise addition of partial products
    • G06F7/5312Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel with row wise addition of partial products using carry save adders
    • 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/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/53Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel
    • G06F7/5324Multiplying only in parallel-parallel fashion, i.e. both operands being entered in parallel partitioned, i.e. using repetitively a smaller parallel parallel multiplier or using an array of such smaller multipliers
    • 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/52Multiplying; Dividing
    • G06F7/523Multiplying only
    • G06F7/533Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even
    • G06F7/5332Reduction of the number of iteration steps or stages, e.g. using the Booth algorithm, log-sum, odd-even by skipping over strings of zeroes or ones, e.g. using the Booth Algorithm

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

PURPOSE: A booth coding-based parallel MAC(Multiplier-Accumulator) is provided to previously create the output of lower bits and reduce the bit number of a final adder to improve the efficiency of pipelines. CONSTITUTION: A booth encoder is input the multiplier and multiplicand and creates partial multiplication with booth encoding. An accumulated adder adds all the partial multiplication, returns the upper bit of an operation result to a sum and carry form, and returns the lower bit of the operation result to the addition result form of sum and carry. A final adder adds the carry and sum of the upper bit of the operation result to output the upper bit of a final result.

Description

부스 부호화 기반 병렬방식 곱셈누적기 { A parallel multiplier accumulator using the Booth encoding }A parallel multiplier accumulator using the Booth encoding}

본 발명은 곱셈과 누적 덧셈 연산을 통합하고 하이브리드 형태의 CSA 구조로 구성하여 임계경로를 감소시킨 부스 부호화 기반 병렬방식 곱셈누적기에 관한 것이다.The present invention relates to a Booth Coding-based parallel multiplication accumulator that integrates multiplication and cumulative addition operations and configures a hybrid CSA structure to reduce a critical path.

특히, 본 발명은 부분곱의 연산결과의 상위비트를 합과 캐리 형태로 귀환시키고, 하위비트를 합과 캐리의 덧셈 결과 형태로 귀환시키는 부호화 기반 병렬방식 곱셈누적기에 관한 것이다.
In particular, the present invention relates to a coding based parallel multiplication accumulator for returning the upper bits of the result of the partial product operation in the form of sum and carry, and the lower bits in the form of the sum result of the sum and carry.

최근 멀티미디어 시스템 및 통신 분야가 급속도로 발전함에 따라서 디지털 신호처리, 영상처리, 그리고 3차원 신호처리 등과 같은 실시간 신호처리 및 대용량의 데이터 처리를 위한 디지털 시스템이 더욱 요구되고 있다. 특히 디지털 시스템의 연산기 중에서 곱셈기와 곱셈-누적기(multiplier-accumulator, MAC)는 디지털 신호처리를 위한 필수적인 요소이다.Recently, as the multimedia system and communication field are rapidly developed, a digital system for real time signal processing and large data processing such as digital signal processing, image processing, and 3D signal processing is required. In particular, multipliers and multiplier-accumulators (MACs) are essential elements for digital signal processing.

곱셈기를 이용한 곱셈-누적 연산은 디지털 신호처리 분야에서 필터링(filtering), 컨벌루션(convolution), 그리고 내적(inner product) 등을 비롯한 모든 연산의 기본이다. 멀티미디어에 대한 관심이 높아지고 수요가 늘어나면서 MPEG 혹은 JPEG2000 등과 같은 멀티미디어 신호처리 기술의 사용이 확대되고 있다. 이러한 표준 기술들은 이산 코사인 변환 (discrete cosine transform, DCT) 혹은 이산 웨이블릿 변환(discrete wavelet transform, DWT)과 같은 비선형 연산을 사용한다.Multiplication-cumulative operations using multipliers are the basis of all operations in the field of digital signal processing, including filtering, convolution, and inner products. With the increasing interest and demand for multimedia, the use of multimedia signal processing technologies such as MPEG or JPEG2000 is expanding. These standard techniques use nonlinear operations such as discrete cosine transform (DCT) or discrete wavelet transform (DWT).

비선형 함수의 계산은 기본적으로 곱셈과 덧셈을 반복적으로 수행하여 이루어지므로 덧셈과 곱셈의 연산시간이 전체 연산의 수행속도와 성능을 좌우한다. 디지털 시스템을 구성하는 기본적인 연산 블록들 중에서 곱셈기(multiplier)는 지연시간이 가장 길기 때문에 일반적으로 곱셈기에 의해 전체 시스템의 임계경로(Critical path)가 결정된다. 고속의 곱셈연산을 위해서 "Modified Radix-4 Booth Algorithm(MBA)"을 쓰는 것이 일반적이다. 그러나 곱셈 연산에 소요되는 긴 임계경로에 대한 문제를 완전히 해결할 수는 없다. Since the calculation of nonlinear functions is basically performed by repeatedly performing multiplication and addition, the operation time of addition and multiplication depends on the speed and performance of the entire operation. Since the multiplier has the longest delay among the basic operation blocks of the digital system, the multiplier generally determines the critical path of the entire system. It is common to use "Modified Radix-4 Booth Algorithm (MBA)" for fast multiplication. However, the problem of the long critical path of the multiplication operation cannot be completely solved.

고속 곱셈을 위한 곱셈기 구조는 배열 곱셈기(array multiplier)와 병렬 곱셈기(parallel multiplier)로 구분된다. 배열 곱셈기는 단위 셀의 구조가 규칙적이고 VLSI 구현이 쉽다는 장점을 가지고 있으나 계산 속도가 곱해지는 비트수에 따라 비례적으로 증가한다는 단점을 갖는다.  The multiplier structure for fast multiplication is divided into an array multiplier and a parallel multiplier. Array multipliers have the advantage that the unit cell structure is regular and easy to implement VLSI, but the disadvantage is that the computation speed increases proportionally with the number of bits multiplied.

병렬 곱셈기는 연산자의 비트수에 따른 곱셈 시간의 증가가 배열 곱셈기보다 작다는 장점을 갖는다. 따라서 어떤 분야에서 사용되느냐에 따라 다양한 형태의 하드웨어 구조가 제안되어 왔고, 응용 목적에 따라 적절하게 선택하여 사용하여야 한다. 예를 들어 파이프라인 방식의 병렬 곱셈기의 경우 디지털 신호처리 기반의 알고리듬을 구현하는데 적합하고, 트리구조의 병렬 곱셈기의 경우 마이크로프로세서나 범용 DSP 프로세서에 적합하다.Parallel multipliers have the advantage that the increase in multiplication time according to the number of bits of the operator is smaller than that of the array multiplier. Therefore, various types of hardware structures have been proposed depending on which field they are used in and should be appropriately selected and used according to the application purpose. For example, pipelined parallel multipliers are suitable for implementing digital signal processing algorithms, and tree-structured parallel multipliers are suitable for microprocessors and general-purpose DSP processors.

일반적으로 곱셈기에는 부스(Booth) 알고리듬과 전가산기의 배열, 또는 부스 알고리듬과 왈라스(Wallace) 트리를 이용한 방법이 많이 이용되고 있다. 이러한 곱셈기는 크게 부스(Booth) 인코더, 부분곱 압축 트리, 최종 덧셈기의 세부분으로 구성된다.  In general, a multiplier uses a booth algorithm and an array of full adders, or a booth algorithm and a wall tree. This multiplier is largely composed of Booth encoder, partial product compression tree and final adder.

왈라스 트리는 인코더로부터 나오는 부분곱들을 최대한 병렬형태로 더하기 위한 구조이므로 N 비트 (N-bit) 데이터의 곱셈의 수행시간은 O(log2N) 에 비례한다. 즉, CSA(Carry save adder)를 사용하여 N개의 입력 중에서 1의 개수를 카운트하여 출력으로 내보내면 출력 비트의 개수는 log2N개로 줄어드는 원리를 이용하는 것이다. 실제로는 다수의 비트수를 입력으로 사용하는 CSA를 구현하는데 많은 면적이 소요되므로 (3:2) 혹은 (7:3) 카운터를 다수 사용하여 파이프라인 단계마다 카운터의 개수를 감소시킨다.Since the wallis tree is a structure for adding partial products from the encoder in parallel as much as possible, the execution time of multiplication of N-bit data is proportional to O (log 2 N). In other words, if the count of 1 of the N inputs is counted and exported to the output using a carry save adder (CSA), the number of output bits is reduced to log 2 N. In practice, a large area is required to implement a CSA that uses a large number of bits as an input, so the number of counters is reduced in each pipeline stage by using a large number of (3: 2) or (7: 3) counters.

곱셈 과정은 일련의 부분곱 덧셈 과정을 반복적으로 수행하는 것이기 때문에 고속의 곱셈을 위해서는 부분 곱의 수를 줄여서 계산 단계를 감소시켜야 한다. 부분곱의 계산 단계를 감소시키기 위해서 주로 MBA 알고리즘이 적용되고 있고, 왈라스 트리를 적용하여 부분곱의 빠른 덧셈을 수행한다. MBA의 속도를 높이기 위해 병렬 곱셈구조가 많이 연구되어 왔다. 일반적으로 "Baugh-Wooley Algorithm(BWA)"에 기초한 MAC의 구조가 개발되어 왔고, 제안된 구조들은 다양한 디지털 필터링 연산에 도입되었다.Since the multiplication process performs a series of partial product addition processes repeatedly, it is necessary to reduce the computational step by reducing the number of partial products for fast multiplication. MBA algorithm is mainly applied to reduce the calculation step of the partial product, and the fast addition of the partial product is performed by applying the wallis tree. Parallel multiplication schemes have been studied to speed up the MBA. In general, the structure of MAC based on "Baugh-Wooley Algorithm (BWA)" has been developed, and the proposed structures have been introduced into various digital filtering operations.

범용적인 디지털 신호처리를 위해 가장 발달된 형태의 MAC 중에 하나가 Elguibaly에서 제안되었는데 부분곱을 압축하는 CSA 트리에 누적 연산을 결합한 구조이다. Elguibaly가 제안한 구조는 누적연산을 위한 별도의 덧셈기를 없애고 최종 덧셈기의 비트수를 감소시킴으로써 임계경로를 감소시켰다. 임계경로의 감소로 인하여 이전에 제안된 MAC에 비해서는 높은 성능을 갖지만 누적연산에 최종덧셈기의 결과를 사용하기 때문에 출력율의 향상을 위한 여지를 남겼다.
One of the most advanced MACs for general purpose digital signal processing has been proposed by Elguibaly, which combines cumulative operations with a CSA tree that compresses partial products. The structure proposed by Elguibaly reduces the critical path by eliminating the extra adder for the cumulative operation and reducing the number of bits in the final adder. Due to the reduction of the critical path, it has higher performance than the previously proposed MAC, but it leaves room for improvement of the output rate because the result of the final adder is used for the cumulative operation.

본 발명의 목적은 상술한 바와 같은 문제점을 해결하기 위한 것으로, 곱셈과 누적 덧셈 연산을 통합하고 하이브리드 형태의 CSA 구조로 구성하여 임계경로를 감소시킨 부스 부호화 기반 병렬방식 곱셈누적기를 제공하는 것이다.SUMMARY OF THE INVENTION An object of the present invention is to solve the problems described above, and to provide a booth coding-based parallel multiplication accumulator that integrates multiplication and cumulative addition operations and configures a hybrid CSA structure to reduce a critical path.

또, 본 발명의 목적은 부분곱의 연산결과의 상위비트를 합과 캐리 형태로 귀환시키고, 하위비트를 합과 캐리의 덧셈 결과 형태로 귀환시키는 부호화 기반 병렬방식 곱셈누적기를 제공하는 것이다.It is also an object of the present invention to provide an encoding-based parallel multiplication accumulator for returning the upper bits of the result of the partial product in sum and carry form, and the lower bits in the form of addition result of sum and carry.

특히, 본 발명의 목적은 부분곱들의 덧셈과 함께 누적연산을 포함하되, 1) 1의 보수 기반의 MBA 알고리즘를 이용하고, 2) 연산자의 밀도를 높이고자 부호비트를 위한 수정된 배열형태를 가지며, 3) 최종 덧셈기의 비트수를 줄이기 위해 CSA 트리 내에 CLA를 사용하는 곱셈누적기를 제공하는 것이다. 또한 파이프라인의 효율을 최적화시켜 출력율을 증가시키고자 최종 덧셈기의 출력이 아닌 합과 캐리 형태의 중간 연산결과들을 누적시킨다.
In particular, an object of the present invention includes cumulative operations with addition of partial products, 1) using a complement-based MBA algorithm of 1, 2) having a modified array form for sign bits to increase the density of operators, 3) It provides a multiplication accumulator that uses a CLA in the CSA tree to reduce the number of bits in the final adder. In order to increase the output rate by optimizing the efficiency of the pipeline, it accumulates intermediate results of sum and carry type, not the output of the final adder.

상기 목적을 달성하기 위해 본 발명은 부스 부호화 기반 병렬방식 곱셈누적기에 관한 것으로서, 승수와 피승수를 입력받아 부스 인코딩에 의해 부분곱을 생성하는 부스 부호화기; 상기 부분곱을 모두 더하는 연산을 하되, 연산한 결과(이하 연산결과)의 상위비트를 합과 캐리 형태로 귀환시키고, 상기 연산결과의 하위비트를 합과 캐리의 덧셈 결과 형태로 귀환시키는 누적덧셈기; 및 상기 연산결과의 상위비트의 캐리와 합을 더하여 최종결과의 상위비트를 출력하는 최종덧셈기를 포함하는 것을 특징으로 한다.In order to achieve the above object, the present invention relates to a parallel coding system based on booth encoding, comprising: a booth encoder receiving a multiplier and a multiplier and generating a partial product by booth encoding; A cumulative adder for performing an operation of adding all the partial products, returning the upper bits of the operation result (hereinafter operation result) to the sum and carry form, and returning the lower bits of the operation result to the sum and carry addition form; And a final adder for adding the carry and sum of the upper bits of the operation result and outputting the upper bits of the final result.

또, 본 발명은 부스 부호화 기반 병렬방식 곱셈누적기에 있어서, 최종결과의 하위비트는 상기 누적덧셈기의 연산결과의 하위비트로 출력되는 것을 특징으로 한다.Further, the present invention is characterized in that in the booth coding based parallel type multiplication accumulator, the lower bits of the final result are output as the lower bits of the operation result of the cumulative adder.

또, 본 발명은 부스 부호화 기반 병렬방식 곱셈누적기에 있어서, 상기 누적덧셈기는 첫 번째 부분곱과 귀환되는 덧셈결과의 누적연산, 중간 부분곱과 귀환되는 합의 누적연산, 및 마지막 부분곱과 귀환되는 캐리의 누적연산을 수행하는 회로로 구성되는 것을 특징으로 한다.In addition, the present invention, in the booth coding-based parallel multiplication accumulator, the cumulative adder is the cumulative operation of the addition result returned with the first sub-product, the cumulative operation of the sum of the sum returned with the middle partial product, and the carry carried back with the last partial product Characterized in that the circuit consists of a cumulative operation of.

또, 본 발명은 부스 부호화 기반 병렬방식 곱셈누적기에 있어서, 상기 누적덧셈기는 [수식 1]에 의해 CSA(Carry Save Adder) 트리의 회로로 구성되는 것을 특징으로 한다.In addition, the present invention is characterized in that in the booth coding-based parallel multiplication accumulator, the cumulative adder is composed of a circuit of a Carry Save Adder (CSA) tree by Equation 1.

[수식 1][Equation 1]

Figure pat00001
Figure pat00001

단, N은 비트수, Y는 승수,Where N is the number of bits, Y is the multiplier,

di는 승수를 베이스 4로 표시된 잉여부호 자리수(redundant sign digit),d i is a redundant sign digit with a multiplier of base 4,

ci와 si는 각각 연산결과의 상위비트의 캐리와 합,c i and s i are the carry and sum of the upper bits of the operation, respectively,

z는 연산결과의 하위비트의 캐리와 합의 덧셈 결과.z is the carry result and sum of the low order bits of the operation result.

또, 본 발명은 부스 부호화 기반 병렬방식 곱셈누적기에 있어서, 상기 회로는 2비트 캐리예측 가산기(CLA)를 사용하여 하위 비트의 캐리를 전파하고 하위 비트들에 대한 출력을 미리 생성하는 것을 특징으로 한다.Further, the present invention is characterized in that in the booth coding-based parallel multiplication accumulator, the circuit propagates the carry of the lower bits and generates the output for the lower bits in advance by using a 2-bit carry prediction adder (CLA). .

또, 본 발명은 부스 부호화 기반 병렬방식 곱셈누적기에 있어서, 상기 부스 부호화기와 상기 누적덧셈기로 구성된 제1 파이프라인 단계와, 최종덧셈기로 구성된 제2 파이프라인 단계를 포함하는 파이프라인 구조를 가지는 것을 특징으로 한다.
In addition, the present invention has a pipeline structure including a first pipeline step consisting of the booth encoder and the cumulative adder and a second pipeline step consisting of the final adder in a booth coding-based parallel type multiplication accumulator. It is done.

상술한 바와 같이, 본 발명에 따른 부스 부호화 기반 병렬방식 곱셈누적기에 의하면, 곱셈과 누적 덧셈 연산을 통합하고 하위비트들에 대한 출력을 미리 생성하여 최종덧셈기의 비트수를 줄임으로써 임계경로를 감소하여 파이프라인의 효율을 최적화시키고 출력율을 증가시킬 수 있는 효과가 얻어진다.As described above, according to the booth coding-based parallel multiplication accumulator according to the present invention, the critical path is reduced by integrating the multiplication and the cumulative addition operation, generating the output for the lower bits in advance, and reducing the number of bits in the final adder. The effect of optimizing the efficiency of the pipeline and increasing the output rate is obtained.

즉, 가장 큰 지연시간을 갖는 누적기 자체를 제거하고 누적기의 기능을 CSA에 포함시킴으로써 전체적인 성능을 향상시킨다. 또, CSA 트리는 1의 보수 기반의 MBA 알고리즘를 이용하고, 연산자의 밀도를 높이고자 부호비트를 위한 수정된 배열형태를 갖는다. 또한 최종 덧셈기의 비트수를 줄이기 위해서 CSA 트리 내에 2비트 CLA를 사용하여 하위 비트의 캐리를 전파하고 하위 비트들에 대한 출력을 미리 생성한다. 또한 파이프라인의 효율을 최적화시켜 출력율을 증가시키고자 최종 덧셈기의 출력이 아닌 합과 캐리 형태의 중간 연산결과들을 누적시킨다.
That is, the overall performance is improved by eliminating the accumulator itself with the largest latency and including the accumulator function in the CSA. In addition, the CSA tree uses a 1's complement-based MBA algorithm and has a modified array form for sign bits to increase the density of operators. Also, to reduce the number of bits in the final adder, two-bit CLAs are used in the CSA tree to propagate the carry of the lower bits and pre-generate the output for the lower bits. In order to increase the output rate by optimizing the efficiency of the pipeline, it accumulates intermediate results of sum and carry type, not the output of the final adder.

도 1은 종래기술에 따른 곱셈과 누적 연산과정을 흐름도이다.
도 2는 종래기술에 따른 곱셈누적기(MAC)의 하드웨어 구성도이다.
도 3은 본 발명의 일실시예에 따른 누적곱셈기의 연산과정을 설명하는 도면이다.
도 4는 본 발명의 일실시예에 따른 곱셈누적기(MAC)의 구성도이다.
도 5는 본 발명의 일실시예에 따라 CSA트리로 구성된 누적덧셈기의 회로 구성도이다.
도 6은 본 발명의 일실시예에 따른 CSA 구조의 특성을 요약한 표이다.
도 7은 본 발명의 일실시예에 따른 하드웨어 자원의 요소 성분들을 모두 카운팅한 후에 일반적인 구조와 16비트 구조에 대한 결과 표이다.
도 8은 본 발명의 일실시예에 따른 회로 요소의 게이트 수를 요약한 표이다.
도 9는 본 발명의 일실시예에 따른 합성에 의한 게이트 수를 표시한 표이다.
도 10은 본 발명의 일실시예에 따른 곱셈누적기(MAC)의 파이프라인된 구조 및 파이프라인 동작순서를 도시한 도면이다.
도 11은 본 발명의 일실시예에 따른 파이프라인 단계 및 성능분석을 표시한 표이다.
도 12는 본 발명의 일실시예에 따른 곱셈누적기(MAC)의 합성된 회로의 타이밍 분석 결과를 예시한 도면이다.
* 도면의 주요 부분에 대한 부호의 설명 *
10 : 곱셈누적기 20 : 부스 부호화기
30 : 누적덧셈기 31 : 반가산기
32 : 전가산기 33 : 2비트 CLA
40 : 최종덧셈기
1 is a flowchart illustrating a multiplication and accumulation process according to the prior art.
2 is a hardware configuration diagram of a multiplication accumulator (MAC) according to the prior art.
3 is a diagram illustrating a calculation process of a cumulative multiplier according to an embodiment of the present invention.
4 is a configuration diagram of a multiplication accumulator (MAC) according to an embodiment of the present invention.
5 is a circuit diagram illustrating an accumulator adder configured as a CSA tree according to an exemplary embodiment of the present invention.
6 is a table summarizing the characteristics of the CSA structure according to an embodiment of the present invention.
7 is a result table for a general structure and a 16-bit structure after counting all the component components of the hardware resource according to an embodiment of the present invention.
8 is a table summarizing the number of gates of a circuit element in accordance with one embodiment of the present invention.
9 is a table showing the number of gates by synthesis according to an embodiment of the present invention.
FIG. 10 is a diagram illustrating a pipelined structure and a pipeline operation sequence of a multiplier accumulator (MAC) according to an embodiment of the present invention.
11 is a table showing pipeline stages and performance analysis according to an embodiment of the present invention.
12 is a diagram illustrating a timing analysis result of a synthesized circuit of a multiply accumulator (MAC) according to an embodiment of the present invention.
Explanation of symbols on the main parts of the drawings
10: multiplication accumulator 20: booth encoder
30: cumulative adder 31: half adder
32: Full adder 33: 2-bit CLA
40: final adder

이하, 본 발명의 실시를 위한 구체적인 내용을 도면에 따라서 설명한다.DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail with reference to the drawings.

또한, 본 발명을 설명하는데 있어서 동일 부분은 동일 부호를 붙이고, 그 반복 설명은 생략한다.
In addition, in describing this invention, the same code | symbol is attached | subjected and the repeated description is abbreviate | omitted.

먼저, 일반적인 곱셈과 누적 연산과정 및 곱셈누적기(MAC)의 구조를 도 1과 도 2를 참조하여 설명한다.First, a general multiplication, cumulative operation process, and a structure of a multiplication accumulator (MAC) will be described with reference to FIGS. 1 and 2.

종래 기술에 따른 곱셈기는 크게 3개의 단계로 나눌 수 있다. 첫 번째는 피승수(X)와 승수(Y)로부터 부분곱들을 만들어내는 부스(Booth) 인코딩이고, 두 번째는 생성된 부분곱들을 모두 더하여 합과 캐리형태의 값으로 만드는 덧셈기 배열 혹은 부분곱 압축 과정이다. 그리고 마지막 단계는 합과 캐리를 더하고 최종적인 곱셈결과를 만드는 최종 덧셈이다.The multiplier according to the prior art can be divided into three stages. The first is a Booth encoding that produces partial products from multiplicands (X) and multipliers (Y). The second is an adder array or partial product compression process that adds all the generated partial products to sum and carry values. to be. The final step is the final addition that adds the sum and carry and produces the final multiplication result.

여기에 곱한 결과를 누적하여 최종결과를 얻는 과정이 추가된다. 따라서 총 네 가지 단계로 나누어진다. 이러한 연산 단계를 도 1에 나타내었다. 도 1은 앞서 설명한 곱셈-누적의 연산 단계를 나타낸 것으로 순서대로 1단계, 1단계, 3단계, 그리고 4단계에 해당한다. The process of accumulating the result of multiplication and obtaining the final result is added. Therefore, it is divided into four stages. This calculation step is shown in FIG. FIG. 1 illustrates the above-described multiplication-cumulative operation steps, which correspond to steps 1, 1, 3, and 4 in order.

또, 도 2는 종래기술에 따른 곱셈누적기(MAC)의 하드웨어 구성도이다.2 is a hardware configuration diagram of a multiplication accumulator (MAC) according to the prior art.

입력되는 승수, X와 피승수, Y를 곱하여 곱셈 연산을 수행하고 이를 이전 곱셈결과인 Z와 더하여 누적 연산을 수행한다. 여기서 N 비트의 크기를 갖고 2의 보수 체계를 사용하는 2진수, X를 [수학식 1]로 표현할 수 있다.A multiplication operation is performed by multiplying the input multiplier, X, multiplicand, and Y, and adding it to the previous multiplication result Z to perform a cumulative operation. Here, the binary number X having the size of N bits and using the two's complement system can be expressed by Equation 1.

[수학식 1][Equation 1]

Figure pat00002
Figure pat00002

[수학식 1]을 부스 알고리즘을 적용하기 위하여 베이스 4(Base-4) 형태의 잉여부호 자리수(redundant sign digit) 방식으로 나타내면 [수학식 2] 및 [수학식 3]과 같이 나타낼 수 있다.Equation 1 may be represented by Equation 2 and Equation 3 by applying a redundant sign digit method of Base-4 to apply the booth algorithm.

[수학식 2][Equation 2]

Figure pat00003
Figure pat00003

[수학식 3]&Quot; (3) "

Figure pat00004
Figure pat00004

[수학식 2]를 이용하면 곱셈은 [수학식 4]와 같이 표현된다. Using Equation 2, the multiplication is expressed as Equation 4.

[수학식 4]&Quot; (4) "

Figure pat00005
Figure pat00005

이러한 식들을 이용하면 앞서 설명한 곱셈-누적 연산의 결과는 [수학식 5]로 표현된다. Using these equations, the result of the multiplication-cumulative operation described above is expressed by [Equation 5].

[수학식 5][Equation 5]

Figure pat00006
Figure pat00006

[수학식 5]의 오른쪽에 있는 두 항들은 각각 독립적으로 연산된 후, 두 항의 결과에 대해 덧셈연산, 즉 누적 연산을 수행하여 최종적인 결과를 생성한다.After the two terms on the right side of Equation 5 are operated independently, the final result is generated by performing an addition operation, that is, a cumulative operation on the results of the two terms.

[수학식 5]로 구현된 곱셈누적기(MAC)의 구조를 표준 설계(standard design)라 한다.The structure of the multiplication accumulator (MAC) implemented by Equation 5 is called a standard design.

기본적으로 N-bit 길이의 데이터들을 곱하는 경우에는 N에 비례하는 수만큼의 부분곱들이 생성된다. 이들을 순차적으로 더하기 위하여 N에 비례하는 덧셈 수행시간이 소용된다.Basically, when multiplying data of N-bit length, the number of partial products proportional to N is generated. Addition time proportional to N is used to add them sequentially.

현재까지 고안된 곱셈기 중 가장 빠른 것으로 알려진 곱셈기의 구조는 부분곱들을 생성하는 부스(Booth) 인코딩을 사용하고 부분곱들을 더하는 덧셈기 배열에는 CSA(Carry Lookahead Adder) 기반의 왈리스(Wallace) 트리를 이용한다. 부스 인코딩 방법을 사용하면 왈리스 트리의 입력에 해당하는 부분곱의 수가 반으로 줄어들어 CSA 트리의 단계가 감소한다.The multiplier structure known to be the fastest among multipliers designed to date uses Booth encoding for generating partial products and Wallace tree based on the Carry Lookahead Adder (CSA) for an adder array for adding partial products. Using the booth encoding method, the number of partial products corresponding to the input of the Wallis tree is reduced by half, which reduces the level of the CSA tree.

또한 2의 보수 기반의 부호를 가진 데이터들에 대한 곱셈도 가능하다. 이러한 이유로 인하여 현재의 거의 모든 곱셈기들에서는 부스(Booth) 인코딩 방식을 사용하고 있으며 이보다 더 좋은 성능을 가지는 인코딩 방식을 찾아내기는 쉽지 않을 것으로 보인다.
It is also possible to multiply two's complement-based coded data. For this reason, almost all current multipliers use the Boot encoding scheme, and it is not easy to find an encoding scheme that performs better than this.

다음으로, 본 발명의 곱셈누적기(MAC)의 개념을 설명한다.Next, the concept of the multiplication accumulator (MAC) of the present invention will be described.

두 개의 N비트를 곱한 후에 2N 비트를 누적하는 연산을 고려한다면 임계경로는 2N 비트의 누적 연산에 의해서 결정된다. 도 1의 종래 설계에서 각 단계별로 파이프라인을 적용했다면 MAC의 성능을 향상하기 위해서는 마지막 누적기의 지연시간을 감소시켜야 한다.Considering an operation that accumulates 2N bits after multiplying two N bits, the critical path is determined by an accumulation operation of 2N bits. In the conventional design of FIG. 1, if the pipeline is applied at each stage, the delay time of the last accumulator should be reduced to improve the performance of the MAC.

본 발명에서 제안하고자 하는 곱셈누적기(MAC)는 가장 큰 지연시간을 갖는 누적기 자체를 제거하고 누적기의 기능을 CSA에 포함시킴으로써 전체적인 성능을 향상시킨다. 누적기가 제거된 상황이라면 임계경로는 곱셈기의 최종 덧셈기에 의해서 결정된다.The multiplication accumulator (MAC) proposed in the present invention improves the overall performance by eliminating the accumulator itself having the largest delay time and including the accumulator function in the CSA. If the accumulator is removed, the critical path is determined by the final adder of the multiplier.

최종 덧셈기의 성능을 향상시키는 근본적인 방법은 입력의 비트수를 축소시키는 것이다. 최종 덧셈기의 입력 비트수를 줄이기 위해서는 CSA가 다수의 부분곱들을 합과 캐리로 압축할 때 전체적인 성능을 감소시키지 않는 범위 내에서 합과 캐리의 하위 비트들을 미리 더하여 최종 덧셈기로 전달되는 합과 캐리의 비트수를 줄여야 한다.The fundamental way to improve the performance of the final adder is to reduce the number of bits in the input. In order to reduce the number of input bits of the final adder, the CSA compresses multiple partial products into sums and carry, and adds the lower bits of sum and carry in advance to the final adder so as not to reduce the overall performance. The number of bits should be reduced.

CSA 내에서 하위 비트들을 더하는데 2 비트 CLA를 사용한다. 또한 파이프라인을 적용할 경우에 출력율을 높이기 위해서 누적연산의 입력으로 최종 덧셈기의 출력이 아니라 최종 덧셈기의 입력에 해당하는 CSA의 합과 캐리를 사용한다. 이전 싸이클에서 출력된 CSA의 합과 캐리가 다음 싸이클에서 누적연산을 위한 CSA의 입력으로 사용된다. 합과 캐리가 모두 귀환되므로 표준 설계와 Elguibaly의 구조에 비해서 CSA에 입력되는 데이터량이 증가한다. 데이터량의 증가를 효율적으로 해결하고자 부호 비트를 위해 수정된 CSA 구조를 제안한다.
A 2-bit CLA is used to add the lower bits within the CSA. In addition, when the pipeline is applied, the sum and carry of the CSA corresponding to the input of the final adder is used instead of the output of the final adder to increase the output rate. The sum and carry of the CSA output from the previous cycle is used as the input of the CSA for the cumulative operation in the next cycle. Since both sums and carry are fed back, the amount of data entered into the CSA increases compared to the standard design and Elguibaly's structure. In order to efficiently solve the increase in data amount, we propose a modified CSA structure for the sign bit.

다음으로, 표준 설계의 수식으로부터 본 발명의 연산방식을 위한 수식을 유도한다.Next, a formula for the calculation method of the present invention is derived from the formula of the standard design.

곱셈연산을 제안한 방식에 적합한 구조로 변형하고, 누적연산을 위해 귀환되는 값을 새롭게 정의하여 본 발명의 MAC을 위한 연산식으로 전개한다.The multiplication operation is transformed into a structure suitable for the proposed method, and newly defined values returned for the cumulative operation are developed into an expression for the MAC of the present invention.

먼저, [수학식 4]의 곱셈 연산을 풀어서 정리하면 [수학식 6]과 같다. First, solving the multiplication operation of [Equation 4] and summarized as in [Equation 6].

[수학식 6]&Quot; (6) "

Figure pat00007
Figure pat00007

식 [수학식 6]을 첫 번째 부분곱, 중간 부분곱의 합, 그리고 최종 부분곱으로 나누면 [수학식 7]과 같다. [수학식 7]과 같이 부분곱의 덧셈을 구분하는 것은 누적 연산을 위해 귀환되는 데이터가 세 가지이기 때문이다. 세 가지 데이터에는 CSA의 합, 캐리, 그리고 하위 비트들의 합과 캐리가 더해진 결과값이 포함된다.Equation 6 is divided by the first partial product, the sum of the middle partial products, and the final partial product. The division of the addition of the partial products, as shown in [Equation 7], is because there are three data returned for the cumulative operation. The three pieces of data include the sum of the CSA, the carry, and the sum of the low bits and the carry.

[수학식 7][Equation 7]

Figure pat00008
Figure pat00008

다음으로 [수학식 5]의 Z에 대해 제안한 개념을 도입하자. Z를 먼저 상위 비트와 하위 비트로 구분하여 정리하면 [수학식 8]과 같다. [수학식 8]의 첫 번째 항은 하위 비트에 해당하는데 합과 캐리의 덧셈 결과 형태로 귀환되는 값이고, 두 번째 항은 상위 비트에 해당하는데 합과 캐리 형태로 귀환되는 값이다.Next, we introduce the proposed concept of Z in Equation 5. If Z is first divided into upper bits and lower bits, it is as shown in [Equation 8]. The first term in [Equation 8] corresponds to the lower bit, which is returned in the form of the sum and carry addition, and the second term corresponds to the upper bit, which is returned in the sum and carry form.

[수학식 8][Equation 8]

Figure pat00009
Figure pat00009

[수학식 8]로부터 Z를 합과 캐리의 연산형태로 재분리하면 [수학식 9]와 같다. Recombining Z from Equation 8 into the sum and carry calculation form is shown in [Equation 9].

[수학식 9][Equation 9]

Figure pat00010
Figure pat00010

[수학식 7]과 식 [수학식 9]를 이용하면 [수학식 5]의 MAC 연산은 [수학식 10]으로 표현할 수 있다. Using [Equation 7] and [Equation 9], the MAC operation of [Equation 5] can be expressed as [Equation 10].

[수학식 10][Equation 10]

Figure pat00011
Figure pat00011

[수학식 10]을 비트 자리수에 맞추어 재정리하면 [수학식 11]과 같다.If Equation 10 is rearranged according to the number of bits, Equation 11 is used.

[수학식 11]에서 오른쪽의 첫 번째 항은 첫 번째 부분곱이 합과 캐리의 덧셈결과와 누적되는 연산이고, 두 번째 항은 중간 부분곱들이 귀환된 CSA의 합과 누적되는 연산이다. 마지막으로 세 번째 항은 마지막 부분곱이 CSA의 캐리와 누적되는 연산을 나타낸다. In Equation 11, the first term on the right is an operation in which the first sub product is accumulated with the sum and carry result, and the second term is an operation in which the middle sub product is accumulated with the sum of the returned CSAs. Finally, the third term represents the operation where the last partial product accumulates with the carry of the CSA.

[수학식 11][Equation 11]

Figure pat00012

Figure pat00012

다음으로, 본 발명의 일실시예에 따른 곱셈누적기(MAC)의 하드웨어 구조(VLSI 구조)를 도 3과 도4를 참조하여 설명한다.Next, a hardware structure (VLSI structure) of a multiply accumulator (MAC) according to an embodiment of the present invention will be described with reference to FIGS. 3 and 4.

앞서 설명한 MAC의 연산 과정을 정리하면 도 3과 같이 나타낼 수 있다.A summary of the operation process of the above-described MAC can be represented as shown in FIG.

도 3을 살펴보면 MAC 연산은 세 가지 단계로 구성된다. 도 1과 비교하면 누적 연산이 부분곱을 더하는 과정에 포함되었다는 차이점을 확인할 수 있다. 도 3에서 직접으로 나타나 있지는 않지만 또 한 가지 도 1의 방식과 큰 차이점은 세 번째 단계의 최종 덧셈과정이 늘 필요하지 않다는 점이다. 누적 연산이 세 번째 단계의 결과가 아니라 두 번째 단계의 결과를 이용하여 수행되므로 누적 연산의 최종 결과가 필요한 시점이 아니라면 세 번째 단계를 동작시킬 필요가 없다.Referring to FIG. 3, the MAC operation consists of three steps. Compared with FIG. 1, the difference that the cumulative operation is included in the process of adding the partial products can be confirmed. Although not shown directly in FIG. 3, another major difference from the scheme of FIG. 1 is that the final addition process of the third step is not always necessary. Since the cumulative operation is performed using the result of the second step rather than the result of the third step, it is not necessary to operate the third step unless the final result of the cumulative operation is required.

도 3의 과정을 만족하기 위한 MAC의 하드웨어 구조는 도 4와 같다.The hardware structure of the MAC for satisfying the process of FIG. 3 is shown in FIG. 4.

도 4에서 보는 바와 같이, 본 발명에 따른 부스 부호화 기반 병렬방식 곱셈누적기(10)는 승수와 피승수를 입력받아 부스 인코딩에 의해 부분곱을 생성하는 부스 부호화기(20); 부분곱을 모두 더하는 연산을 하되, 연산한 결과(이하 연산결과)의 상위비트를 합과 캐리 형태로 귀환시키고, 연산결과의 하위비트를 합과 캐리의 덧셈 결과 형태로 귀환시키는 누적덧셈기(30); 및 연산결과의 상위비트의 캐리와 합을 더하여 최종결과의 상위비트를 출력하는 최종덧셈기(40)로 구성된다. 또한, 최종결과의 하위비트는 상기 누적덧셈기의 연산결과의 하위비트로 출력된다.As shown in FIG. 4, the booth encoding-based parallel accumulator 10 according to the present invention includes a booth encoder 20 that receives a multiplier and a multiplicand and generates a partial product by booth encoding; A cumulative adder 30 which adds all the partial products, but returns the upper bits of the operation result (hereinafter operation result) in the sum and carry form, and returns the lower bits of the operation result in the sum and carry addition form; And a final adder 40 for adding the carry and sum of the upper bits of the operation result and outputting the upper bits of the final result. The lower bit of the final result is output as the lower bit of the operation result of the cumulative adder.

즉, MAC의 입력인 n 비트의 X와 Y는 부스 부호화기(20, Booth Encoder)를 거치면서 (n+1) 비트 부분곱의 형태로 변환된다. 누적덧셈기(30, CSA & Accumulator)에서 부분곱의 덧셈과 함께 누적 연산이 수행되고, 결과로 n 비트의 합(S)과 캐리(C) 그리고 합과 캐리의 하위 비트 덧셈결과인 Z(또는 P[n-1:0])가 생성된다. 이 세 가지 값은 귀환되어 다음 누적연산에 이용된다.That is, n bits of X and Y, which are inputs of the MAC, are converted into a (n + 1) bit partial product through a Booth Encoder (20). In the cumulative adder (30, CSA & Accumulator), a cumulative operation is performed with addition of a partial product, and as a result, the sum (S) and carry (C) of n bits, and Z (or P, the result of adding the lower bits of sum and carry) [n-1: 0]) is generated. These three values are returned and used for the next cumulative operation.

만일 MAC의 최종 결과가 필요하다면 합(S)과 캐리(C)를 최종덧셈기(40, Final Adder)에서 합하여 P[2n-1:n]을 생성하고 이미 생성된 P[n-1:0]과 함께 최종 결과를 구성한다.
If the final result of the MAC is needed, the sum (S) and the carry (C) are summed in the final adder (40, Final Adder) to generate P [2n-1: n], and the already generated P [n-1: 0] Together with the final result.

다음으로, 본 발명에 따른 곱셈누적기(MAC)의 동작을 수행할 수 있는 하이브리드 형태의 CSA 구조를 도 5를 참조하여 설명한다.Next, a hybrid type CSA structure capable of performing an operation of a multiply accumulator (MAC) according to the present invention will be described with reference to FIG. 5.

제안한 CSA는 [수학식 11]을 바탕으로 구성하였다. 도 5에서 Si는 부호 확장을 간략하게 하기 위한 보상값이고 Ni는 부스(Booth) 인코딩 시 사용했던 1의 보수를 2의 보수로 보상하는 값이다. S[i]와 C[i]는 각각 합과 캐리의 i번째 비트에 해당하고 S[i]와 C[i]는 누적연산을 위해 귀환된 합과 캐리의 i번째 비트이다.The proposed CSA is constructed based on [Equation 11]. In FIG. 5, S i is a compensation value for simplifying sign extension and N i is a value that compensates for 1's complement used as 2's complement. S [i] and C [i] correspond to the i-th bit of sum and carry, respectively, and S [i] and C [i] represent the sum of i and carry-th bit of carry.

Z[i]는 각각 부분곱의 하위 비트들이 미리 더해진 합에 해당하고 Z[i]는 이전 결과이다. 또한 Pj[i]는 j번째 부분곱의 i번째 비트에 해당한다. 도 5는 4ㅧ4 비트 MAC 연산에 대한 CSA 트리의 구조이다. 승수가 8비트이므로 부스 부호화기(20)로부터 총 2개의 부분곱(P0[3:0], P1[3:0])이 생성된다. [수학식 11]에서 d0Y와 dN/2-12N-2Y는 각각 P0[3:0], P1[3:0]에 해당한다Z [i] corresponds to the sum to which the low order bits of the partial product are added in advance, and Z [i] is the previous result. P j [i] also corresponds to the i th bit of the j th sub product. 5 is a structure of a CSA tree for 4 ㅧ 4 bit MAC operations. Since the multiplier is 8 bits, a total of two partial products P 0 [3: 0] and P 1 [3: 0] are generated from the booth encoder 20. In Equation 11, d 0 Y and d N / 2-1 2 N-2 Y correspond to P 0 [3: 0] and P 1 [3: 0], respectively.

CSA는 2개의 부분곱을 위해 최소 2개의 전가산기(32, full adder, FA) 열이 필요하다. 그리고 누적 연산을 위해 한 단계의 열을 더 사용하여 총 3단의 전가산기 열이 사용된다. nㅧn 비트의 MAC 연산이라면 CSA는 (n/2+1)의 크기이다. 도면에서 정사각형의 심볼은 전가산기(32)를 나타내고 회색으로 칠해진 정사각형 심볼은 반가산기(31, HA, half adder)이다. 또한 5비트를 입력으로 갖는 직사각형 심볼은 캐리 입력을 갖는 2비트 CLA(33)이다.  The CSA requires at least two full adder (32) columns for two partial products. In addition, a total of three stages of full adder rows are used, using one more column for the cumulative operation. For n ㅧ n bits of MAC operation, CSA is (n / 2 + 1). In the figure, the square symbol represents the full adder 32 and the gray symbol drawn in gray is the half adder 31. Also, a rectangular symbol having 5 bits as input is a 2-bit CLA 33 having a carry input.

CSA에서 임계경로는 2비트 CLA(33)에 의해서 결정된다. 2비트 CLA(33)를 사용하지 않고 전가산기(32)를 사용하여 CSA를 구성할 수도 있다. 그러나 CLA(33)를 사용하여 먼저 생성되는 부분곱의 하위비트들을 미리 처리하지 않으면 최종 덧셈기의 비트수가 증가하여 곱셈기 혹은 MAC의 성능이 저하된다.  The critical path in the CSA is determined by the 2-bit CLA 33. The full adder 32 may be used to configure the CSA without using the 2-bit CLA 33. However, if the lower bits of the partial product generated first using the CLA 33 are not processed beforehand, the number of bits of the final adder increases and the performance of the multiplier or the MAC is degraded.

즉, 곱셈 혹은 덧셈의 특성 상 상위 비트들이 계산되기 전에 하위비트들은 미리 출력될 수 있기 때문에 상위 비트들과 달리 하위비트들은 2비트 CLA를 이용하여 합과 캐리까지 더한 후에 출력을 만들어 내는 것이다. 따라서 누적 연산에 사용되는 비트의 개수를 줄여줌으로써 CSA의 크기를 최소화시킬 수 있다. 그렇지 않다면 CSA의 구조에서 덧셈기의 가로열이 한 단계 늘어나게 된다.That is, because the lower bits can be output before the upper bits are calculated due to the property of multiplication or addition, unlike the upper bits, the lower bits add the sum and carry using the 2-bit CLA to produce the output. Therefore, the size of the CSA can be minimized by reducing the number of bits used for the accumulation operation. Otherwise, the row of adders in the structure of the CSA is increased by one step.

도 6은 앞서 설명된 CSA 구조의 특성을 요약하였다. 수 체계는 1의 보수를 이용하였고, 부호 확장을 하지 않으면서 수정된 방식을 사용하였다. 가장 큰 차이점은 누적을 위해 귀환시키는 데이터의 종류이다. 그리고 최종 덧셈기의 입력이 n비트로 가장 작다.
6 summarizes the properties of the CSA structure described above. The number system uses 1's complement and uses a modified method without sign extension. The biggest difference is the kind of data that is returned for accumulation. And the input of the final adder is the smallest with n bits.

다음으로, 본 발명에 따른 곱셈누적기(10)를 구현하고 분석한 후에 곱셈누적기(10)와 기존의 연구들을 비교하여 장점을 살펴본다. 먼저, 구현한 하드웨어가 사용하는 자원량을 이론 및 실험적으로 분석한다. 다음으로 Sakurai의 APL(alpha power law)를 간락화시켜 구현된 하드웨어의 지연시간을 모델링하고 분석한다.Next, after implementing and analyzing the multiplication accumulator 10 according to the present invention, the advantages are compared by comparing the multiplication accumulator 10 and existing studies. First, theoretically and experimentally analyze the amount of resources used by the implemented hardware. Next, Sakurai's APL (alpha power law) is simplified to model and analyze the latency of the implemented hardware.

도 7에 앞서 언급된 세 가지 구조를 분석하여 하드웨어 자원을 비교하였다. 하드웨어 자원을 계산하는데 있어서 부스 부호화기(20)의 자원은 제외하였고, 그것은 모든 설계에 대해서 동일한 것을 사용한다고 가정하였다.The hardware structure is compared by analyzing the three structures mentioned above in FIG. In calculating the hardware resources, the resources of the booth encoder 20 were excluded, and it was assumed that they used the same for all designs.

도 7의 하드웨어 자원은 요소 성분들을 모두 카운팅한 후에 일반적인 구조와 16비트 구조에 대한 결과를 나타냈다. 16비트에 대한 하드웨어 자원은 TSMC의 90nm CMOS HVT 표준 셀 라이브러리(standard cell library)를 이용하였다. 회로 요소 성분들을 최적화된 형태로 합성하여 각각의 게이트수를 구하고, 계산된 하드웨어 자원의 수에 곱하여 결과를 생성하였다. 합성을 통해 얻어진 회로 요소들의 게이트 수를 도 8에 나타내었다. The hardware resource of FIG. 7 shows the results for the general structure and the 16-bit structure after counting all the component components. Hardware resources for 16 bits were taken from TSMC's 90nm CMOS HVT standard cell library. The circuit elements were synthesized in an optimized form to obtain the number of gates and multiplied by the calculated number of hardware resources to generate a result. The gate numbers of the circuit elements obtained through the synthesis are shown in FIG. 8.

도 8에서 각 게이트수는 2입력 NAND 게이트를 기준으로 한다. 도 8에서 몇 가지 요소의 게이트수를 살펴보자. HA의 게이트수는 3.2이고 FA의 게이트수는 6.7이므로 FA는 HA의 약 두 배의 크기이다. 2비트 CLA의 게이트수는 7개이므로 FA의 게이트수보다 조금 크다. 즉, 제안한 CSA 구조에서 부분곱의 하위비트들을 미리 더하는데 2비트 CLA를 사용한다고 해도 하드웨어 자원이 크게 증가하는 것은 아니라는 것을 예측할 수 있다.  In FIG. 8, the number of gates is based on two input NAND gates. Let's look at the number of gates of some elements in FIG. Since the number of gates of HA is 3.2 and the number of FA gates is 6.7, FA is about twice the size of HA. Since the number of gates of a 2-bit CLA is seven, it is slightly larger than that of FA. That is, even if the 2-bit CLA is used to pre-add the sub-bits of the partial product in the proposed CSA structure, it can be predicted that the hardware resources do not increase significantly.

다음으로, 합성에 의한 게이트 수 (Gate count by synthesis)에 대하여 설명한다.Next, gate count by synthesis will be described.

HDL(hardware description language)을 이용하여 Elguibaly와 제안한 MAC을 RTL(register transfer level)로 구현하였다. 시놉시스(Synopsys)의 디자인 컴파일러(design complier)를 이용하여 설계된 회로를 합성하였고, 그 결과로 생성된 넷리스트(netlist)의 게이트수를 측정하여 도 9에 요약하였다.Elguibaly and the proposed MAC are implemented in RTL (register transfer level) using hardware description language (HDL). A circuit designed using Synopsys' design complier was synthesized, and the gate count of the resulting netlist was measured and summarized in FIG. 9.

도 9의 회로는 16비트 MAC을 구현한 것이다. CMOS 공정에 따른 회로의 특성을 파악하기 위해 현재 디지털 반도체를 제작하는데 가장 많이 사용되는 네 가지 공정(0.25μm, 0.18μm, 0.13μm, 90nm)의 라이브러리를 이용하였다.The circuit of Figure 9 implements a 16-bit MAC. To characterize the circuits according to the CMOS process, we used four libraries (0.25μm, 0.18μm, 0.13μm, 90nm) which are the most used to manufacture digital semiconductors.

미세 공정을 적용할수록 게이트 수가 감소하는 것을 볼 수 있고, 도 7의 결과와 마찬가지로 제안한 구조의 게이트 수가 조금 더 작다는 것을 확인할 수 있다. 비록 동일한 제약조건(constraint)을 적용하여 합성하였지만, 다른 회로들과 함께 큰 회로의 일부분으로 사용될 경우에는 전체 회로의 타이밍 및 전기적인 상황에 따라서 게이트 수는 변할 수 있음을 염두에 두어야 한다.As the micro process is applied, the gate number decreases, and as in the result of FIG. 7, the gate number of the proposed structure is slightly smaller. Although synthesized using the same constraints, it should be borne in mind that when used as part of a larger circuit with other circuits, the number of gates may vary depending on the timing and electrical conditions of the overall circuit.

도 9의 결과는 순차회로를 제외한 조합회로에 대한 결과이고, 전체 게이트 수는 부스 부호화기(20, Booth Encoder), 누적덧셈기(30, CSA), 그리고 최종덧셈기(40, Final Adder)의 합이다.
The result of FIG. 9 is a result of a combination circuit except a sequential circuit, and the total number of gates is the sum of the booth encoder 20 (Boot Encoder), the accumulator adder 30 (CSA), and the final adder 40 (final adder).

마지막으로, 본 발명의 일실시예에 따른 파이프라인 단계를 제시하고 이를 바탕으로 성능을 분석한다. Finally, the pipeline stage according to an embodiment of the present invention is presented and performance is analyzed based on this.

앞서서 얻어진 지연 모델링을 바탕으로 하여 파이프라인 단계를 결정한다. 도 10a에서 보는 바와 같이, 부스 부호화과 CSA 동작에 해당하는 1단계와 2단계를 파이프라인 단계1로 정하고, 최종 덧셈기에 해당하는 3단계를 파이프라인 단계2로 정한다. 이러한 경우에 파이프라인 단계는 도 11a과 같이 정리할 수 있고, 이 결과에 의해서 클록 주파수가 결정된다.The pipeline stage is determined based on the delay modeling obtained earlier. As shown in FIG. 10A, stages 1 and 2 corresponding to the booth encoding and the CSA operation are designated as pipeline stage 1, and stage 3 corresponding to the final adder is defined as pipeline stage 2. In this case, the pipeline stage can be arranged as shown in FIG. 11A, and the clock frequency is determined by the result.

제안한 구조는 최종 덧셈기의 결과가 아니라 CSA의 최종 출력을 귀환시켜 누적연산을 수행하기 때문에 도 10과 같은 파이프라인 경로를 갖는다. 또, 파이프라인에 의한 성능분석 결과는 도 11b와 같다.The proposed structure has a pipeline path as shown in FIG. 10 because the cumulative operation is performed by returning the final output of the CSA, not the result of the final adder. In addition, the results of performance analysis by the pipeline is shown in FIG.

0.25, 0.18, 0.13, 및 0.90um 공정을 이용해서 합성한 후에 STA(static timing analysis) 결과를 추출하여 도 12에 그래프로 나타내었다. 이 결과는 실제 칩을 만들 경우에 물리적인 합성(physical synthesis) 및 P&R(place & route) 과정을 위한 중요한 분석 자료이다.After synthesis using 0.25, 0.18, 0.13, and 0.90um processes, the result of static timing analysis (STA) was extracted and graphically shown in FIG. 12. These results are important analytical data for physical synthesis and P & R (P & R) processes in the real world of chips.

90um공정에서는 표준 셀들의 드라이빙 포스(driving force)가 다양해졌기 때문에 설계된 회로의 데이터패스 및 구조가 규칙적으로 구조적일수록 디자인 컴파일러(design compiler)는 더욱 세밀하고 정밀한 합성과 최적화를 수행할 수 있다. 왜냐하면 컴파일러(design compiler)가 제한조건(constraint)의 요구 조건을 바탕으로 좋은 회로를 생성하기 위해 다양한 셀들을 매핑(mapping)하고 STA를 진행하는 과정을 반복하기가 용이해지기 때문이다. 250nm에서는 슬랙(slack)의 차이가 20%이상이다. 일반적으로 백엔드(back-end) 과정에서 사용되는 EDA 도구(tool) 간 상관(correlation)이 5%이하라고 가정할 때 +2ns 이상의 타이밍 마진을 확보한다면 이후의 물리적 합성 및 P&R 과정에서는 더 이상 최적화가 필요하지 않고 흔히 발생하는 라우팅 밀집(routing congestion)을 쉽게 극복할 수 있다.   In the 90um process, the driving force of the standard cells has been varied, so the more systematic the datapath and structure of the designed circuit is, the more detailed and precise synthesis and optimization can be performed by the design compiler. This is because it is easy for a design compiler to repeat the process of mapping various cells and proceeding with an STA in order to generate a good circuit based on a constraint requirement. At 250nm, the difference in slack is more than 20%. In general, assuming that the correlation between EDA tools used in the back-end is less than 5%, a timing margin of +2 ns or more can be achieved. It is easy to overcome routing congestion that is not needed and that occurs frequently.

합성이후에 STA 결과를 종합해보면 제안한 구조는 매우 구조적이고 규칙적이라는 결론을 내릴 수 있다.
After synthesizing the STA results, we can conclude that the proposed structure is very structural and regular.

이상, 본 발명자에 의해서 이루어진 발명을 상기 실시 예에 따라 구체적으로 설명하였지만, 본 발명은 상기 실시 예에 한정되는 것은 아니고, 그 요지를 이탈하지 않는 범위에서 여러 가지로 변경 가능한 것은 물론이다.
As mentioned above, although the invention made by this inventor was demonstrated concretely according to the said Example, this invention is not limited to the said Example and can be variously changed in the range which does not deviate from the summary.

본 발명은 곱셈과 누적 덧셈 연산을 통합하고 하이브리드 형태의 CSA 구조로 구성하여 임계경로를 감소시킨 부스 부호화 기반 병렬방식 곱셈누적기를 개발하는 데 적용이 가능하다. 특히, 본 발명은 디지털 신호처리, 영상처리, 그리고 3차원 신호처리 등과 같은 실시간 신호처리 및 대용량의 데이터 처리를 위한 디지털 시스템의 연산기 중에서 곱셈기와 곱셈누적기(multiplier-accumulator, MAC)를 개발하는 데 유용하다.
The present invention is applicable to the development of a booth coding-based parallel multiplication accumulator that reduces the critical path by integrating multiplication and cumulative addition and constructing a hybrid CSA structure. In particular, the present invention is to develop a multiplier-accumulator (MAC) among arithmetic operators of a digital system for real-time signal processing and large-capacity data processing such as digital signal processing, image processing, and three-dimensional signal processing. useful.

Claims (6)

승수와 피승수를 입력받아 부스 인코딩에 의해 부분곱을 생성하는 부스 부호화기;
상기 부분곱을 모두 더하는 연산을 하되, 연산한 결과(이하 연산결과)의 상위비트를 합과 캐리 형태로 귀환시키고, 상기 연산결과의 하위비트를 합과 캐리의 덧셈 결과 형태로 귀환시키는 누적덧셈기; 및
상기 연산결과의 상위비트의 캐리와 합을 더하여 최종결과의 상위비트를 출력하는 최종덧셈기를 포함하는 것을 특징으로 하는 부스 부호화 기반 병렬방식 곱셈누적기.
A booth encoder that receives a multiplier and a multiplicand and generates a partial product by booth encoding;
A cumulative adder for performing an operation of adding all the partial products, returning the upper bits of the operation result (hereinafter operation result) to the sum and carry form, and returning the lower bits of the operation result to the sum and carry addition form; And
And a final adder for adding the carry and sum of the upper bits of the operation result and outputting the upper bits of the final result.
제1항에 있어서,
최종결과의 하위비트는 상기 누적덧셈기의 연산결과의 하위비트로 출력되는 것을 특징으로 하는 부스 부호화 기반 병렬방식 곱셈누적기.
The method of claim 1,
And a lower bit of the final result is output as a lower bit of the operation result of the cumulative adder.
제1항에 있어서,
상기 누적덧셈기는 첫 번째 부분곱과 귀환되는 덧셈결과의 누적연산, 중간 부분곱과 귀환되는 합의 누적연산, 및 마지막 부분곱과 귀환되는 캐리의 누적연산을 수행하는 회로로 구성되는 것을 특징으로 하는 부스 부호화 기반 병렬방식 곱셈누적기.
The method of claim 1,
The cumulative adder is a booth comprising a circuit for performing a cumulative operation of the first partial product and the return result returned, a cumulative operation of the middle partial product and the returned sum, and a cumulative operation of the last sub-product and the returned carry. Coding-based parallel multiplication accumulator.
제1항에 있어서,
상기 누적덧셈기는 [수식 1]에 의해 CSA(Carry Save Adder) 트리의 회로로 구성되는 것을 특징으로 하는 부스 부호화 기반 병렬방식 곱셈누적기.
[수식 1]
Figure pat00013

단, N은 비트수, Y는 승수,
di는 승수를 베이스 4로 표시된 잉여부호 자리수(redundant sign digit),
ci와 si는 각각 연산결과의 상위비트의 캐리와 합,
z는 연산결과의 하위비트의 캐리와 합의 덧셈 결과.
The method of claim 1,
The cumulative adder is a Booth Coding based parallel multiplication accumulator, characterized in that consisting of a circuit of the Carry Save Adder (CSA) tree by [Equation 1].
[Equation 1]
Figure pat00013

Where N is the number of bits, Y is the multiplier,
d i is a redundant sign digit with a multiplier of base 4,
c i and s i are the carry and sum of the upper bits of the operation, respectively,
z is the carry result and sum of the low order bits of the operation result.
제4항에 있어서,
상기 회로는 2비트 캐리예측 가산기(CLA)를 사용하여 하위 비트의 캐리를 전파하고 하위 비트들에 대한 출력을 미리 생성하는 것을 특징으로 하는 부스 부호화 기반 병렬방식 곱셈누적기.
The method of claim 4, wherein
The circuitry uses a 2-bit carry prediction adder (CLA) to propagate the carry of the lower bits and to pre-generate the output for the lower bits.
제1항 내지 제5항 중 어느 한 항에 있어서,
상기 부스 부호화기와 상기 누적덧셈기로 구성된 제1 파이프라인 단계와, 최종덧셈기로 구성된 제2 파이프라인 단계를 포함하는 파이프라인 구조를 가지는 것을 특징으로 하는 부스 부호화 기반 병렬방식 곱셈누적기.
The method according to any one of claims 1 to 5,
And a pipeline structure comprising a first pipeline stage consisting of the booth encoder and the accumulator adder and a second pipeline stage comprised of the final adder.
KR1020100005152A 2010-01-20 2010-01-20 A parallel multiplier accumulator using the booth encoding KR20110085385A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100005152A KR20110085385A (en) 2010-01-20 2010-01-20 A parallel multiplier accumulator using the booth encoding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100005152A KR20110085385A (en) 2010-01-20 2010-01-20 A parallel multiplier accumulator using the booth encoding

Publications (1)

Publication Number Publication Date
KR20110085385A true KR20110085385A (en) 2011-07-27

Family

ID=44922189

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100005152A KR20110085385A (en) 2010-01-20 2010-01-20 A parallel multiplier accumulator using the booth encoding

Country Status (1)

Country Link
KR (1) KR20110085385A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101974779B1 (en) * 2018-04-16 2019-05-02 고려대학교 세종산학협력단 Pipelined squarer for unsigned integers of up to 16 bits
KR20190136600A (en) * 2018-05-31 2019-12-10 삼성전자주식회사 Memory device and operating method thereof
CN113031912A (en) * 2019-12-24 2021-06-25 上海寒武纪信息科技有限公司 Multiplier, data processing method, device and chip

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101974779B1 (en) * 2018-04-16 2019-05-02 고려대학교 세종산학협력단 Pipelined squarer for unsigned integers of up to 16 bits
KR20190136600A (en) * 2018-05-31 2019-12-10 삼성전자주식회사 Memory device and operating method thereof
CN113031912A (en) * 2019-12-24 2021-06-25 上海寒武纪信息科技有限公司 Multiplier, data processing method, device and chip

Similar Documents

Publication Publication Date Title
Seo et al. A new VLSI architecture of parallel multiplier–accumulator based on Radix-2 modified Booth algorithm
Samimi et al. Res-DNN: A residue number system-based DNN accelerator unit
Zhuo et al. High performance linear algebra operations on reconfigurable systems
KR20210006919A (en) Neural network processing elements
Shieh et al. Word-based Montgomery modular multiplication algorithm for low-latency scalable architectures
Belghadr et al. FIR filter realization via deferred end-around carry modular addition
Ullah et al. Factored radix-8 systolic array for tensor processing
KR20110085385A (en) A parallel multiplier accumulator using the booth encoding
Basha et al. Design and Implementation of Radix-4 Based High Speed Multiplier for ALU's Using Minimal Partial Products
Kulkarni et al. MAC unit optimization for area power and timing constraints
Jha et al. Performance analysis of single-precision floating-point MAC for deep learning
Ramesh et al. Efficient implementation of 16-bit multiplier-accumulator using radix-2 modified booth algorithm and SPST adder using Verilog
da Rosa et al. Energy-Efficient VLSI Squarer Unit with Optimized Radix-2 m Multiplication Logic
Kumar et al. An efficient arithmetic sum-of-product (SOP) based multiplication approach for FIR filters and DFT
Ramya et al. Implementation of High Speed FFT using Reversible Logic Gates for Wireless DSP Applications
Rathore et al. Implementation and Design of Xilinx based Booth multiplier
Kharade et al. DESIGN, IMPLEMENTATION, AND ANALYSIS OF 4 X 4-BIT VEDIC MULTIPLIER USING MGDI TECHNIQUE AT 90NM
Samanth et al. A novel approach to develop low power MACs for 2D image filtering
Mishra et al. MEGA-MAC: A Merged Accumulation based Approximate MAC Unit for Error Resilient Applications
Mohanty Design and implementation of faster and low power multipliers
Balachandar et al. Design of a Vedic Multiplier based 64-bit Multiplier Accumulator Unit
Yedukondalu et al. Implementation of 16-Bit Multiplier-Accumulator Using Modified Booth Algorithm
Khan et al. Review of GRPF Strengthen Column
Adhikari et al. Performance Evaluation and Implementation of Parallel Multipliers
Krishna et al. Convolution Using Delay Efficient Improved Hybrid Multiplier

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application