KR20180034853A - Apparatus and method test operating of convolutional neural network - Google Patents

Apparatus and method test operating of convolutional neural network Download PDF

Info

Publication number
KR20180034853A
KR20180034853A KR1020160124574A KR20160124574A KR20180034853A KR 20180034853 A KR20180034853 A KR 20180034853A KR 1020160124574 A KR1020160124574 A KR 1020160124574A KR 20160124574 A KR20160124574 A KR 20160124574A KR 20180034853 A KR20180034853 A KR 20180034853A
Authority
KR
South Korea
Prior art keywords
data
layer
convolution
input data
input
Prior art date
Application number
KR1020160124574A
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 KR1020160124574A priority Critical patent/KR20180034853A/en
Priority to US15/618,683 priority patent/US11449745B2/en
Priority to CN201710711678.4A priority patent/CN107871163B/en
Publication of KR20180034853A publication Critical patent/KR20180034853A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • 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/544Methods 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 for evaluating functions by calculation
    • G06F7/5443Sum of products
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • G06F17/153Multidimensional correlation or convolution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • 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/501Half or full adders, i.e. basic adder cells for one denomination
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/06Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
    • G06N3/063Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • G06N3/082Learning methods modifying the architecture, e.g. adding, deleting or silencing nodes or connections
    • G06N99/005
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2207/00Indexing scheme relating to methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F2207/38Indexing scheme relating to groups G06F7/38 - G06F7/575
    • G06F2207/48Indexing scheme relating to groups G06F7/48 - G06F7/575
    • G06F2207/4802Special implementations
    • G06F2207/4818Threshold devices
    • G06F2207/4824Neural networks

Abstract

According to the present invention, a convolutional neural network (CNN) apparatus includes an information processing unit including a register for storing weight data, at least one channel set for performing the operations of a feature extraction layer and a classification layer based on input data and the weight data, and a CNN control unit functionally connected to the information processing unit and the channel set. The CNN control unit can control the channel set to perform the operation of the feature extraction layer and to perform the operation of the classification layer when the operation of the feature extraction layer is completed. Accordingly, the present invention can perform a test operation with high speed and low power.

Description

합성곱 신경망의 연산 장치 및 방법{APPARATUS AND METHOD TEST OPERATING OF CONVOLUTIONAL NEURAL NETWORK}[0001] APPARATUS AND METHOD TEST OPERATING OF CONVOLUTIONAL NEURAL NETWORK [0002]

본 발명은 합성곱 신경망의 연산 장치 및 방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an apparatus and method for computing a composite-object neural network.

근래 각광을 받고 있는 딥 러닝 알고리듬(deep learning algorithm)은 단순한 계산이(덧셈, 곱셈) 많은 연산으로써, 빅 데이터(big data)를 분석하고 데이터 세트(data set) 안에 숨어있는 특징(feature)들을 찾아내는데 유용하게 사용될 수 있다. 딥 러닝 (deep learning)은 여러 비선형 변환기법의 조합을 통해 높은 수준의 추상화(abstractions, 다량의 데이터나 복잡한 자료들 속에서 핵심적인 내용 또는 기능을 요약하는 작업)를 시도하는 기계학습 (machine learning) 알고리즘의 집합으로 정의될 수 있다. Deep learning algorithms, which are in the limelight in recent years, are simple calculations (addition, multiplication) and many operations. They analyze big data and find hidden features in a data set. It can be used to help. Deep learning is a combination of multiple nonlinear transformation techniques that allows for a high level of abstraction (machine learning) that attempts to summarize key content or functions in large amounts of data or complex data, Can be defined as a set of algorithms.

    딥 러닝 알고리듬은 트레이닝(training)과 테스트(test)동작으로 나뉘어질 수 있다. 학습은 입력 데이터 세트(input dataset)에서 특징들을 학습하는 일련의 과정이 될 수 있다. 트레닝 과정은 가중치(weight), 특징(feature) 또는 커널(kernel)이라고 불리는 것들을 학습하게 될 수 있으며, 테스트는 학습된 파라미터들을 이용하여 진행될 수 있다. 딥 러닝 알고리듬에서 테스트는 트레이닝을 위한 입력 데이터 세트와는 다른 형식(예를들면, 이미지인 경우, 같은 종류의 피사체(예를들면 고양이, 자동차 등)의 앞모습, 뒷모습 등) 등의 입력을 적절하게 분류하는 등의 타스크(task)를 수행할 수 있다. The deep-running algorithm can be divided into training and test operations. Learning can be a series of processes that learn features from an input data set. The training process can learn what is called a weight, a feature or a kernel, and a test can be conducted using learned parameters. In the deep learning algorithm, the test is performed by inputting data in a format different from the input data set for training (for example, in the case of an image, a frontal view of the same type of object (e.g., a cat, a car, etc.) A task such as sorting can be performed.

딥 러닝 알고리듬은 심층 신경망(Deep Neural Network, DNN), 합성곱 신경망(Convolutional Neural Network, CNN), 순환 신경망(Recurrent Neural Network, RNN), 심층 신뢰 신경망 (Deep Belief Network, DBN) 등과 같은 다양한 형태의 알고리듬으로 구현할 수 있다. Deep learning algorithms are Deep Neural Network (DNN) Such as the Convolutional Neural Network (CNN), the Recurrent Neural Network (RNN), and the Deep Belief Network (DBN).

 

딥 러닝 알고리듬을 구현할 때, 컴퓨터의 순차적인 계산방식에서 단순한 계산이 대량 반복되는 방법으로 구현하면, 전력소모가 심하고, 수행시간이 길어질 수 있다. 병렬 계산에 최적화된 프로세서(예를들면 graphic processor unit, GPU)를 사용하는 방법은 성능면에서는 적합할 수 있지만, 전력소모가 매우 심할 수 있으며, 알고리즘이 변경될 때마다 병렬계산을 위한 코딩(software coding)이 어려워질 수 있다. 딥 러닝 알고리듬을 CPU나 GPU를 통해 수행하는 방법은 하드웨적인 구성으로 수행하는 방법에 비하여 동작 속도가 더 느리고 더 많은 전력을 소모할 수 있다.When implementing a deep running algorithm, a simple computation in a sequential calculation method of a computer may be performed in a large number of repetitive ways, resulting in a large power consumption and a long execution time. Using a processor optimized for parallel computing (eg, a graphics processor unit (GPU)) may be good for performance, but it can be very power intensive, and every time the algorithm changes, coding can be difficult. The method of executing the deep learning algorithm through a CPU or a GPU is slower in operation speed and consumes more power than a hardware configuration.

본 발명의 다양한 실시예들은 딥 러닝 알고리듬을 수행할 수 있는 장치 및 및 방법을 제안한다. Various embodiments of the present invention propose an apparatus and method that can perform a deep running algorithm.

본 발명의 다양한 실시예들은 트레이닝된 가중치 데이터들과 입력 데이터들을 컨볼루션 연산하는 CNN 알고리듬의 테스트 오퍼레이션 수행 장치 및 방법을 제안한다. Various embodiments of the present invention propose an apparatus and method for performing a test operation of a CNN algorithm for convoluting input data with training weight data.

본 발명의 다양한 실시예들은 저장하고, 컨볼루션 연산시 어드레스 맵을 이용하여 컨볼루션 연산을 위한 입력 데이터를 비 순차적으로 설정하여 연산 속도를 빠르게할 수 있는 장치 및 방법을 제안한다. Various embodiments of the present invention propose an apparatus and method for storing and storing input data for a convolution operation in an orderly manner using an address map in a convolution operation to speed up the operation speed.

본 발명의 다양한 실시예들은 CNN 연산 장치 및 방법은 컨벌루션 동작과 풀링 동작의 병렬성을 높이고 레이턴시(operation latency)를 줄이기 위하여, 미리 처리된 어드레스 맵을 구비하고 연산을 위한 입력데이터를 설정할 때 어드레스 맵을 참조하여 입력 데이터를 결정할 수 있는 장치 및 방법을 제안한다. In various embodiments of the present invention, a CNN computing device and method includes a preprocessed address map to increase the parallelism of the convolution and pulling operations and reduce the latency, and when setting input data for computation, To thereby determine input data.

본 발명의 다양한 실시예들에 따른 CNN 연산 장치 및 방법은 연산자(operand)가 0인 경우 연산 동작을 패스하여, 컨벌루션 동작과 풀링 동작의 수행시간을 감축할 수 있는 장치 및 방법을 제안한다. A CNN computing apparatus and method according to various embodiments of the present invention proposes an apparatus and method for passing a computation operation when an operand is 0 to reduce the execution time of a convolution operation and a pooling operation.

본 발명의 다양한 실시예들에 따른 CNN 연산 장치 및 방법은 컨벌루션 동작에 사용되는 가중치 데이터를 프리페치(pre-fetch)하여 컨벌루션 동작을 수행하여 컨볼루션 연산 시 메모리 로드 레이턴시(memory load latency)에 의한 지연(multiplication delay)을 감소시킬 수 있는 장치 및 방법을 제안한다. The CNN computing apparatus and method according to various embodiments of the present invention perform a convolution operation by pre-fetching weight data used in a convolution operation to perform a convolution operation by a memory load latency An apparatus and method for reducing the multiplication delay are proposed.

본 발명의 다양한 실시예들에 따른 CNN 연산 장치 및 방법은 컨벌루션 블록의 프로세서 앨리먼트들의 데이터 처리 방식에 기반하여 컨벌루션 동작 및 풀링 동작을 신속하게 수행할 수 있는 장치 및 방법을 제안한다. A CNN computing apparatus and method according to various embodiments of the present invention proposes an apparatus and method for rapidly performing a convolution operation and a pulling operation based on a data processing method of processor elements of a convolution block.

본 발명의 다양한 실시예에 따른 CNN 연산장치 및 방법은 클래시피케이션 레이어를 실행할 때 드롭 아웃 동작을 수행할 수 있는 장치 및 방법을 제안한다. A CNN computing apparatus and method according to various embodiments of the present invention proposes an apparatus and method for performing a dropout operation when executing a classification layer.

본 발명의 실시 예들에 따른 CNN 장치는 웨이트 데이터를 저장하는 레지스터를 포함하는 정보 처리부와, 특징 추출 레이어 및 클래시피케이션 레이어 오퍼레이션을 수행하는 적어도 하나의 채널 세트 및 정보 처리부 및 채널 세트에 기능적으로 연결되는 CNN 제어부를 포함할 수 있다. 상기 CNN 제어부는 상기 채널 세트가 특징 추출 레이어의 오퍼레이션을 수행하고, 특징 추출 레이어의 오퍼레이션이 완료되면 클래스피케이션 레이어 오퍼레이션을 수행하도록 제어할 수 있다.  A CNN apparatus according to embodiments of the present invention includes an information processing unit including a register for storing weight data, at least one channel set for performing a feature extraction layer and classification layer operation, and an information processing unit for functionally connecting Lt; / RTI > The CNN control unit may perform the operation of the feature extraction layer in the channel set, and perform the class-action layer operation when the operation of the feature extraction layer is completed.

본 발명의 실시 예들에 따른 CNN(convolutional neural network) 장치의 동작 방법은, 웨이트 데이터를 저장하는 레지스터를 포함하는 정보 처리부와, 컨벌루션 블록 및 풀링 블록을 포함하는 적어도 하나의 채널 세트를 포함하며, 상기 채널 세트의 컨벌루션 블록 및 풀링 블록을 활성화시켜 특징 추출 레이어의 오퍼레이션을 수행하는 과정과, 상기 특징 추출 레이어의 오퍼레이션이 완료되면 상기 채널 세트의 컨벌루션 블록을 활성화시켜 클래스피케이션 레이어 오퍼레이션을 수행하는 과정을 포함할 수 있다. An operation method of a CNN (convolutional neural network) apparatus according to embodiments of the present invention includes an information processing unit including a register for storing weight data, and at least one channel set including a convolution block and a pulling block, The method comprising the steps of: performing operations of a feature extraction layer by activating a convolution block and a pulling block of a channel set; and performing a class-action layer operation by activating a convolution block of the channel set when the operation of the feature extraction layer is completed .

본 발명의 다양한 실시예들은 CNN 알고리듬(Convolutional Neural Network algorithm)을 하드웨어(CNN architecture)로 구현하여 고속 및 저전력(high speed, low power)로 테스트 오퍼레이션을 실행할 수 있다. 본 발명의 다양한 실시예들에 따른 CNN accelerator는 저전력으로 동작할 수 있어 휴대ŠE 장치(portable device)에서도 딥 러닝 알고리듬을 수행할 수 있다. 본 발명의 실시예에 따른 CNN 아키텍쳐는 다양한 크기의 CNN 알고리듬(Convolution Neural Network algorithm)도 컨피겨레이션(configuration)을 통해 동작시킬 수 있다.Various embodiments of the present invention may implement a CNN (Convolutional Neural Network Algorithm) as a hardware (CNN architecture) to perform test operations at high speed and low power. The CNN accelerator according to various embodiments of the present invention can operate at low power and can perform a deep learning algorithm even in a portable device. The CNN architecture according to an embodiment of the present invention can operate a CNN (Convolution Neural Network) algorithm of various sizes through configuration.

본 발명의 실시예에 따른 CNN 아키텍쳐는 제로 패스(zero pass) 기능을 수행하여 컨벌루션 블록(PE, ADD의 computation block)에서 일반 계산동작과는 달리 간단하게 계산을 할 수 있으며, 이로인해 딥 러닝 알고리듬(deep learning algorithm)을 빠르게 수행할 수 있다. 본 발명의 실시예에 따른 CNN 아키텍쳐는 컨벌루션 블록에서 웨이트 파라미터를 프리 페치(weight parameter pre-fetch)함으로서 메모리로부터 웨이트 파라미터를 로드(load)하는 시간을 감소시킬 수 있으며, 이로인해 딥 러닝 알고리듬(deep learning algorithm)을 빠르게 수행할 수 있다.The CNN architecture according to an embodiment of the present invention performs a zero pass function to easily perform computation in a computation block of a convolution block (PE, ADD) unlike a general computation operation. Therefore, the deep learning algorithm (deep learning algorithm) can be performed quickly. The CNN architecture according to an embodiment of the present invention can reduce the time to load weight parameters from memory by pre-fetching the weight parameters in the convolution block, learning algorithm can be performed quickly.

도 1은 CNN 알고리듬의 피드포워드(CNN feedforward algorithm)의 구조를 도시하는 도면이다.
도 2는 CNN의 피드포워드 절차(feedforward path flow)를 설명하기 위한 도면이다.
도 3은 본 발명의 다양한 실시예들에 따른 CNN 장치의 동작 절차를 도시하는 도면이다.
도 4a 및 도 4b는 본 발명의 다양한 실시예에 따른 CNN 장치의 블록 구성을 도시하는 도면이다.
도 5는 본 발명의 다양한 실시예에 따른 CNN 시스템의 구성을 도시하는 도면이다.
도 6은 입력부(530)의 CI reg에 저장되는 입력 데이터 세트(CI reg input data set)의 구조를 도시하는 도면이다
도 7은 본 발명의 다양한 실시예에 따른 컨벌루션 블록의 구성을 도시하는 도면이다.
도 8a 및 도 8b는 본 발명의 다양한 실시예들에 따른 컨벌루션 블록의 프로세스 앨리먼트의 구성을 도시하는 도면이다.
도 9a - 도 9c는 컨벌루션 블록의 입력 데이터 세트, 웨이트 데이터 세트 및 출력 데이터 세트의 구조를 도시하는 도면이다.
도 10은 본 발명의 다양한 실시예에 따른 CNN 장치에서 풀링 오퍼레이션의 입력 데이터 구조를 도시하는 도면이다.
도 11은 본 발명의 다양한 실시예에 따른 CNN 장치에서 풀링 블록의 출력 데이터 및 액티베이션된 데이터의 구조를 도시하는 도면이다.
도 12는 본 발명의 다양한 실시예에 따른 CNN 장치에서 클래시피케이션 레이어에서 컨벌루션 블록의 입력 및 출력 데이터의 구조를 도시하는 도면이다.
도 13은 본 발명의 다양한 실시예에 따른 CNN 장치에서 레이어 출력 데이터의 구조를 도시하는 도면이다.
도 14는 본 발명의 다양한 실시예에 따른 CNN 시스템의 다른 구성을 도시하는 도면이다.
도 15a - 도 15c는 본 발명의 다양한 실시예에 따른 CNN 장치의 동작을 도시하는 흐름도이다.
도 16a 및 도 16b는 본 발명의 다양한 실시예들에 따른 CNN 장치의 컨벌루션 레이어 오퍼레이션의 동작을 도시하는 흐름도이다.
도 17a 및 도 17b는 본 발명의 다양한 실시예들에 따른 CNN 장치의 풀링 레이어 오퍼레이션의 동작을 도시하는 흐름도이다.
도 18은 본 발명의 다양한 실시예들에 따른 CNN 장치의 클래시피케이션 레이어의 출력 동작을 도시하는 흐름도이다.
1 is a diagram showing a structure of a CNN feedforward algorithm of a CNN algorithm.
2 is a diagram for explaining a feedforward path flow of CNN.
3 is a diagram illustrating an operational procedure of a CNN apparatus according to various embodiments of the present invention.
4A and 4B are block diagrams of a CNN apparatus according to various embodiments of the present invention.
5 is a diagram showing a configuration of a CNN system according to various embodiments of the present invention.
6 is a diagram showing a structure of an input data set (CI reg input data set) stored in the CI reg of the input unit 530
7 is a diagram showing a configuration of a convolution block according to various embodiments of the present invention.
8A and 8B are diagrams showing a configuration of a process element of a convolution block according to various embodiments of the present invention.
Figs. 9A to 9C are diagrams showing the structures of an input data set, a weight data set, and an output data set of a convolution block.
10 is a diagram showing an input data structure of a pulling operation in a CNN apparatus according to various embodiments of the present invention.
11 is a diagram showing the structure of output data and activated data of a pulling block in a CNN apparatus according to various embodiments of the present invention.
12 is a diagram illustrating a structure of input and output data of a convolution block in a classification layer in a CNN apparatus according to various embodiments of the present invention.
13 is a diagram showing a structure of layer output data in a CNN apparatus according to various embodiments of the present invention.
14 is a diagram showing another configuration of a CNN system according to various embodiments of the present invention.
15A-15C are flow charts illustrating operation of a CNN device in accordance with various embodiments of the present invention.
16A and 16B are flow charts illustrating the operation of the convolution layer operation of a CNN device in accordance with various embodiments of the present invention.
17A and 17B are flow charts illustrating the operation of a pulling layer operation of a CNN device in accordance with various embodiments of the present invention.
18 is a flow chart illustrating the output operation of the classification layer of the CNN device according to various embodiments of the present invention.

이하, 본 발명에 따른 바람직한 실시 예를 첨부한 도면을 참조하여 상세히 설명한다. 하기의 설명에서는 본 발명에 따른 동작을 이해하는데 필요한 부분만이 설명되며 그 이외 부분의 설명은 본 발명의 요지를 흩뜨리지 않도록 생략될 것이라는 것을 유의하여야 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the following description, only parts necessary for understanding the operation according to the present invention will be described, and the description of other parts will be omitted so as not to disturb the gist of the present invention.

근래 각광을 받고 있는 딥 러닝 알고리듬(deep learning algorithm)은 단순한 계산이(덧셈, 곱셈) 많은 연산으로써, 빅 데이터(big data)를 분석하고 데이터 세트(data set) 안에 숨어있는 특징(feature)들을 찾아내는데 유용하게 사용될 수 있다. 딥 러닝 알고리듬은 학습(training)과 테스트(test) 동작으로 나뉘어질 수 있다. 학습은 입력 데이터 세트(input dataset)에서 특징(feature)들을 학습하는 일련의 과정이 될 수 있다. 딥 러닝 알고리듬은 학습 과정에서 웨이트(weight), 특징(feature) 또는 커널(kernel)이라고 불리는 것들을 학습하고, 테스트 과정에서 학습된 파라미터들을 이용할 수 있다. 딥 러닝 알고리듬의 테스트 동작은 학습을 위한 입력 데이터 세트와 다른 입력 데이터 세트(예를들면 이미지 데이터인 경우, 같은 종류(예를들면 고양이, 자동차 등)의 다른 형식(예를들면 앞모습, 뒷모습 등)에 대하여 적절하게 분류하는 등의 타스크(task)를 수행할 수 있다. Deep learning algorithms, which are in the limelight in recent years, are simple calculations (addition, multiplication) and many operations. They analyze big data and find hidden features in a data set. It can be used to help. Deep learning algorithms can be divided into training and test operations. Learning can be a series of processes that learn features in an input dataset. The deep learning algorithm learns what is called a weight, a feature, or a kernel in the learning process and can use learned parameters in the testing process. The test operation of the deep learning algorithm is based on input data sets for learning and other input data sets (for example, different types of the same type (for example, cat, car, etc.) It is possible to perform a task such as appropriately classifying a plurality of objects.

딥 러닝 알고리듬은 컴퓨터의 순차적인 계산방식에 의해 단순한 계산이 반복되는 방법으로 구현되면 전력소모가 심하고, 수행시간이 길어질 수 있다. 병렬 계산에 최적화된 GPU(graphic processing unit)를 사용하면 성능측면에서는 적합하지만 여전히 전력소모가 심할 수 있으며, 알고리즘이 변경될 때마다 병렬계산을 위한 소프트웨어 코딩(software coding)이 어려울 수 있다. 딥 러닝 알고리듬을 하드웨어로 구현하면, CPU나 GPU를 통해서 딥 러닝 알고리듬을 수행하는 것 보다 처리 속도가 빠르고 적은 전력을 소모할 수 있다. 본 발명의 다양한 실시예뜰은 딥 러닝 알고리듬을 처리할 수 있는 하드웨어 아키텍쳐를 제안한다. Deep learning algorithms can be implemented in a way that simple computation is repeated by a sequential computation method of a computer, which consumes much power and can take a long time. Using a graphics processing unit (GPU) optimized for parallel computation is good for performance but can still be very power intensive and software coding for parallel computations can be difficult every time the algorithm changes. Implementing the deep-running algorithm in hardware can result in faster processing speed and lower power consumption than running a deep-running algorithm through a CPU or GPU. Various embodiments of the present invention propose a hardware architecture capable of processing deep running algorithms.

본 발명의 다양한 실시예들은 학습된 알고리듬의 웨이트 세트와 입력 데이터를 컨볼루션 연산하여 입 러닝 알고리듬을 실행할 수 있는 CNN 하드웨어 아키텍쳐의 구성 및 동작을 제공할 수 있다. Various embodiments of the present invention may provide a configuration and operation of a CNN hardware architecture capable of convolving input data with a set of weights of the learned algorithm to execute a puncturing algorithm.

일 실시예에 따르면, CNN 하드웨어 아키텍쳐는 입력 데이터를 순차적으로 입력하지 않고 미리 연산된 맵 데이터(pre-computed memory map)을 이용하여 입력 데이터를 입력시킬 수 있다. CNN 하드웨어 아키텍쳐는 입력 데이터를 순차적으로 가져오지 않고, 메모리 맵(memory map)을 참조하여 비 순차적으로 입력시키므로써, 컨벌루션 동작(convolution operation)과 풀링 동작(pooling operation)의 병렬성을 높이고 레이턴시(operation latency)를 줄일 수 있다. According to one embodiment, CNN hardware architecture can input input data using pre-computed memory map without sequentially inputting input data. The CNN hardware architecture improves the parallelism of the convolution and pooling operations by inputting the memory data in a non-sequential manner with reference to the memory map rather than sequentially fetching the input data. ) Can be reduced.

일 실시예에 따르면, CNN 하드웨어 아키텍쳐는 연산자(예를들면 입력데이터 또는 웨이트 데이터) 0이면 컨벌루션 연산 동작을 수행하지 않도록 제어하여(zero pass) 컨벌루션 동작과 풀링 동작의 수행 시간을 감소시킬 수 있다. According to one embodiment, the CNN hardware architecture may perform zero convolution operation and reduce the execution time of the convolution operation and the pulling operation when the operator (e.g., input data or weight data) is 0.

일 실시예에 따르면, CNN 하드웨어 아키텍쳐는 딥 러닝 알고리듬에서 사용되는 웨이트 데이터(weight parameter data)를 매번 메모리에서 로드하지 않고, 컨벌루션 동작을 수행하는 블록에서 레이어의 시작에서 종료까지 사용할 웨이트 데이터를 프리페치(pre-fetch)하여, 컨벌루션 연산 시간을 감소( 컨벌루션 연산 시 memory load latency에 의한 multiplication delay를 감소)시킬 수 있다. According to one embodiment, the CNN hardware architecture does not load the weight parameter data used in the deep learning algorithm every time in the memory, but pre-fetches the weight data to be used from the start to the end of the layer in the block performing the convolution operation. (pre-fetch) to reduce the convolution operation time (reduce the multiplication delay due to memory load latency in the convolution operation).

일 실시예에 따르면, CNN 아키텍쳐는 연결 레이어(Fully connected layer)에서 알고리듬을 성능을 향상시키기 위하여 드롭 아웃 방법(regularization method인 drop out method)을 사용할 수 있다. According to one embodiment, the CNN architecture may use a dropout method, a regularization method, to improve the performance of an algorithm in a fully connected layer.

이하, 도면들을 참조하여 본 발명의 실시 예들에 대해서 보다 구체적으로 설명하기로 한다.Hereinafter, embodiments of the present invention will be described in more detail with reference to the drawings.

도 1은 CNN 알고리듬의 피드포워드(CNN feedforward algorithm)의 구조를 도시하는 도면이다.1 is a diagram showing a structure of a CNN feedforward algorithm of a CNN algorithm.

도 1을 참조하면, CNN은 특징을 추출하는 파트(feature extraction part)(110)와 클래시피케이션 파트(classification part)(120)을 포함할 수 있다. 특징 추출부(110)는 컨벌루션 레이어(convolution layer)와 풀링 레이어(pooling layer)가 반복되는 구성을 가질 수 있다. 클래시피케이션 파트(120_는 적어도 하나의 연결 레이어(fully connected layer)를 포함할 수 있다. 특징 추출 파트(110)는 한 쌍의 컨벌루션 레이어와 풀링 레이어에 처리된 출력 데이터가 다음 쌍의 컨벌루션 레이어와 풀링 레이어의 입력 데이터로 되는 구조를 가질 수 있다. 예를들면, 외부의 입력 데이터(100)은 측징 추출 파트(110)의 첫번째 컨벌루션 레이어의 입력 데이터가 될 수 있으며, 컨벌루션 레이어에서 처리되어 출력되는 데이터는 첫번째 풀링 레이어의 입력 데이터가 될 수 있다. 그리고 첫번째 풀링 레이어에서 처리되는 출력 데이터는 다음 쌍인 두번째 컨벌루션 레이어의 입력 데이터가 될 수 있다. 컨벌루션 동작 및 풀링 동작은 호스트에 설정된 횟수(예를들면 N회) 동안 수행될 수 있으며, 마지막 쌍의 풀링 레이어 출력은 클래시피케이션 파트(120)의 입력 데이터가 될 수 있다.Referring to FIG. 1, the CNN may include a feature extraction part 110 and a classification part 120. The feature extraction unit 110 may have a configuration in which a convolution layer and a pooling layer are repeated. The feature extraction part 110 may include a pair of convolutional layers and output data processed in the pooling layer in the next pair of convolution layers < RTI ID = 0.0 > The external input data 100 may be input data of the first convolution layer of the measurement extraction part 110 and may be processed in the convolution layer and output The output data processed in the first pulling layer may be the input data of the second convolution layer in the next pair. The convolution operation and the pulling operation are performed by the number of times set in the host (for example, N times), and the pooling layer output of the last pair may be performed during the classification part 12 0) input data.

클래시피케이션 파트(120)은 적어도 하나의 연결 레이어(fully conned layer)를 포함할 수 있다. 클래시피 케이션 파트(120)은 미리 설정된 수의 연결 레이어 동작을 수행할 수 있으며, 클래시피케이션 파트(120)의 출력은 학습이 완료된다. 출력 데이터(training data)(130)가 될 수 있다. The classification part 120 may include at least one fully conned layer. The classification part 120 can perform a predetermined number of connection layer operations, and the output of the classification part 120 is completed. And may be training data 130.

도 2는 CNN의 피드포워드 절차(feedforward path flow)를 설명하기 위한 도면이다. 도 2는 CNN의 피드포워드 알고리듬(feedforward algorithm)을 설명하기 위하여, 한 쌍의 컨벌루션 레이어와 풀링 레이어에서 처리되는 데이터의 예를 도시하고 있다.2 is a diagram for explaining a feedforward path flow of CNN. Figure 2 shows an example of data processed in a pair of convolutional and pulling layers to illustrate the CNN's feedforward algorithm.

도 2를 참조하면, 가장 왼쪽의 Input data(Tensor)(210)는 복수 개의 채널들로 구성될 수 있으며, 도 2의 입력 데이터(210)은 3개의 채널(channel)로 구성된 예를 도시하고 있다. 입력 데이터(210)는 폭(width), 높이(height), 깊이(depth)로 표현될 수 있다. 도 2의 참조번호 210 내지 240은 1개의 채널 입력 데이터의 컨벌루션 동작 및 풀링 동작에 의해 처리된 데이터의 에를 도시하고 있으며, 다른 채널들의 데이터들도 동일한 방법으로 처리될 수 있다. 입력 데이터(200)는 컨볼루션 윈도우(convolution window)의 크기(size)에 맞추기 위하여 제로 패딩(zero padding)될 수 있다. 제로 패딩은 입력 데이터(210)의 테두리에 0을 삽입하는 것을 의미할 수 있다.Referring to FIG. 2, the leftmost input data (Tensor) 210 may be composed of a plurality of channels, and the input data 210 of FIG. 2 is composed of three channels . The input data 210 may be represented by a width, a height, and a depth. Reference numerals 210 to 240 in FIG. 2 denote the data processed by the convolution operation and the pulling operation of one channel input data, and data of other channels can be processed in the same manner. The input data 200 may be zero padded to fit the size of the convolution window. Zero padding may mean inserting a zeros into the border of the input data 210.

컨볼루션 레이어는 CxCxD의 크기를 갖는 2개의 웨이트 세트(weight set)(220)와 각각 입력데이터(210)와 컨벌루션 동작을 수행할 수 있다. 컨벌루션 동작은 입력 데이터의 깊이(input depth)와 웨이트 데이터의 깊이(weight depth)가 같은 데이터들끼리 계산하는 동작이 될 수 있다. 예를들면 컨벌루션은 입력데이터의 컨벌루션 윈도우(211) 위치에 해당하는 앨리먼트들(elements)과 동일한 위치에 있는 웨이트 앨리먼트들이 각각 곱해져서 모두 더해지는 동작이 될 수 있다. 컨벌루션 동작은 모든 깊이(depth)에 대해서 동일하게 수행될 수 있으며, 3개의 곱의 합을 더하면, 컨벌루션 레이어의 출력() (220) 중에서 참조번호 231에 해당하는 Z(0,0,0)에 위치하게 된다. 이와 관련된 수식은 도 2의 를 구하는 수식이 될 수 있다. 웨이트 세트(Weight set)는 필터(filter)라고 불리울 수 있으며, 필터의 개수만큼 출력 데이터의 깊이(output data depth가 결정될 수 있다. 이와 같은 방법은 컨벌루션 윈도우(211-213을 포함하는 모든 컨벌루션 윈도우들)에 대하여 동일하게 수행될 수 있다. 참조번호 239는 컨벌루션 동작을 수식으로 표현한 예를 도시하고 있다.The convolution layer may perform two convolution operations with the input data 210 and two weight sets 220 having the size of CxCxD. The convolution operation may be an operation of calculating data having the same input depth and weight depth of input data. For example, the convolution may be an operation in which the weight elements at the same position as the elements corresponding to the positions of the convolution window 211 of the input data are multiplied and added together. The convolution operation may be performed for all depths equally, and adding the sum of the three products yields Z (0,0,0) corresponding to reference numeral 231 in the output () 220 of the convolution layer . The mathematical expression related to this may be a formula for obtaining Fig. The weight set may be referred to as a filter and the output data depth may be determined by the number of filters as well as the number of filters. ). Reference numeral 239 denotes an example of expressing a convolution operation as an equation.

컨벌루션 동작이 수행되면, 도 2의 참조번호 230과 같은 출력 데이터들이 생성될 수 있따. 컨벌루션이 종료되면, 출력 데이터는 액티베이션 펑션(activation function) 중 한 개를 통해 액티베이션(activation) 값으로 계산될 수 있다. 참조번호 249는 액티베이션 펑션을 수식으로 표현한 예를 도시하고 있다. 액티베이션 출력 값은 풀링 레이어의 입력 데이터가 될 수 있다. 풀링 동작은 도 2의 참조번호 241 또는 242와 같은 풀링 윈도우(pooling window) 안에 들어오는 풀링 레이어 입력 데이터의 값들 중 최대 값 또는 평균 값을 구하여 참조번호 251 또는 252와 같이 하나의 값으로 압축할 수 있다. 참조번호 259는 풀링 동작을 수식으로 표현한 예를 도시하고 있다.When the convolution operation is performed, output data such as 230 in FIG. 2 may be generated. When the convolution is terminated, the output data may be computed as an activation value via one of the activation functions. Reference numeral 249 denotes an example of expressing the activation function as an expression. The activation output value may be the input data of the pooling layer. The pulling operation may be performed by obtaining a maximum value or an average value among the values of the pulling layer input data in the pooling window, such as 241 or 242 in FIG. 2, and compressing the value to a single value such as 251 or 252 . Reference numeral 259 shows an example in which the pulling operation is expressed by an equation.

동일 입력 데이터의 다른 채널 데이터들에 대해서도 도 2에 도시된 바와 같은 절차로 컨벌루션 동작 및 풀링 동작을 수행할 수 있다. 각 채널과 레이어 마다 웨이트 값이나 필터의 개수가 달라질 수 있다. 풀링 동작의 출력 데이터는 다음 레이어(다음 컨벌루션 레이어)의 입력 데이터가 될 수 있다. 이때 웨이트 세트(eight se)t의 개수, 즉 필터의 개수가 다음 레이어 입력 데이터의 채널 개수가 될 수 있다. The convolution operation and the pulling operation can be performed for other channel data of the same input data as shown in FIG. For each channel and layer, the weight value or the number of filters may vary. The output data of the pulling operation may be input data of the next layer (next convolution layer). At this time, the number of weight sets (eight se), that is, the number of filters, may be the number of channels of the next layer input data.

본 발명의 다양한 실시예들에 따른 CNN 장치는 도 1 및 도 2와 같은 CNN의 피드포워드 알고리듬을 수행할 수 있는 새로운 장치 및 방법을 제공할 수 있다.The CNN apparatus according to various embodiments of the present invention can provide a new apparatus and method for performing CNN's feed forward algorithm as shown in FIGS.

도 3은 본 발명의 다양한 실시예들에 따른 CNN 장치의 동작 절차를 도시하는 도면이다.3 is a diagram illustrating an operational procedure of a CNN apparatus according to various embodiments of the present invention.

도 3을 참조하면, CNN 장치는 초기화 동작(210)에서 CNN 알고리듬을 실행하기 위한 정보들을 수신하여 저장할 수 있다. 수신되는 정보들은 웨이트 데이터들이 될 수 있다. 또한 본 발명의 다양한 실시예들에 따른 CNN 장치는 레이어 컨피겨레이션 정보(layer configuration information), 어드레스 맵(address map for convolution input), 액티베이션 펑션 룩업 테이블(activation function LUT(look-up table)들 중의 적어도 하나를 더 수신하여 저장할 수 있다. 초기화 동작을 수행한 후, CNN 장치는 특징 추출 동작(320)을 수행할 수 있다. 특징 추출 동작(320)은 컨벌루션 동작 및 풀링 동작이 될 수 있다. 컨벌루션 동작 및 풀링 동작은 도 1 및 도 2에 도시된 바와 같은 방법 및 절차로 수행할 수 있다. 입력 데이터의 특징 추출 동작을 완료하면, CNN 장치는 클래시피케이션 동작(330)을 수행할 수 있다. 클래시피케이션 동작(330)은 도 1에 도시된 바와 같이 적어도 하나의 연결 레이어(fully connected layer)를 포함할 수 있다. 클래피시 케이션 동작을 완료하면, CNN 장치는 완료 동작(340)에서 출력 데이터를 시스템 외부로 출력할 수 있다. Referring to FIG. 3, the CNN device may receive and store information for executing the CNN algorithm in the initialization operation 210. The received information may be weight data. The CNN device according to various embodiments of the present invention may also include layer configuration information, an address map for convolution input, an activation function lookup table (LUT) After performing the initialization operation, the CNN device may perform a feature extraction operation 320. The feature extraction operation 320 may be a convolution operation and a pulling operation. Operation and pooling operations may be performed by methods and procedures as illustrated in Figures 1 and 2. Upon completion of the feature extraction operation of the input data, the CNN device may perform the classification operation 330. [ The classification operation 330 may include at least one fully connected layer as shown in Figure 1. Upon completion of the classification operation, In the medical operation unit 340 may output the output data to the external system.

도 4a는 본 발명의 다양한 실시예에 따른 CNN 장치의 블록 구성을 도시하는 도면이다.4A is a block diagram of a CNN apparatus according to various embodiments of the present invention.

도 4a를 참조하면, CNN 장치는 CNN 제어부(400), 정보 처리부(410) 및 채널 세트(420)을 포함할 수 있다. 채널 세트(420)은 하나 또는 둘 이상의 복수개로 구현될 수 있다. Referring to FIG. 4A, the CNN apparatus may include a CNN control unit 400, an information processing unit 410, and a channel set 420. The channel set 420 may be implemented in one or more than two.

CNN 제어부(400)는 특징 추출 레이어 및 클래시피케이션 레이어의 실행하고, 해당하는 레이어를 실행할 때 입력 데이터를 재구성하는 동작을 수행할 수 있다. CNN 제어부(400)는 아비터 및 MMU(arbiter/MMU)를 포함할 수 있다. The CNN control unit 400 can perform the operation of executing the feature extraction layer and the classification layer and reconstructing the input data when executing the corresponding layer. The CNN control unit 400 may include an arbiter and an arbiter / MMU (MMU).

정보 처리부(410)은 적어도 하나의 레지스터 및 적어도 하나의 카운터를 포함할 수 있다. 예를들면, 정보 처리부(410)은 컨볼루션 동작에서 사용될 수 있는 웨이트 데이터들을 저장하는 웨이트 레지스터를 포함할 수 있다. 예를들면, 정보 처리부(410)은 CNN 장치의 동작에 따라 연산되는 동작의 횟수를 갱신하는 카운터들을 포함할 수 있다. 정보 처리부(410)은 시스템 초기화시 호스트에서 전송되는 정보들을 각각 대응되는 레지스터에 저장할 수 있으며, CNN 장치의 동작에 따른 카운트 값을 갱신할 수 있다.The information processing unit 410 may include at least one register and at least one counter. For example, the information processing unit 410 may include a weight register that stores weight data that can be used in the convolution operation. For example, the information processing unit 410 may include counters for updating the number of operations calculated according to the operation of the CNN apparatus. The information processing unit 410 may store the information transmitted from the host in the corresponding registers when the system is initialized, and may update the count value according to the operation of the CNN apparatus.

채널 세트(420)는 복수개로 구성될 수 있다. 각각의 채널 세트(420)는 특징 추출 레이어 오퍼레이션 및 클래시피 케이션 오퍼레이션을 수행할 수 있다. 각각 대응되는 채널의 입력 데이터의 특징 추출 레이어 오퍼레션을 수행할 수 있으며, 특징 추출 레이어 오퍼레이션을 완료하면 클래시피케이션 레이어 오퍼레이션을 수행할 수 있다. The channel set 420 may be composed of a plurality of channels. Each set of channels 420 may perform a feature extraction layer operation and a classification operation. The feature extraction layer operation of the input data of the corresponding channel can be performed and the classification layer operation can be performed upon completion of the feature extraction layer operation.

각 채널 세트(420)는 입력부(430), 컨벌루션 블록(440), 풀링 블록(450) 및 출력부(460)을 포함할 수 있다. Each set of channels 420 may include an input 430, a convolution block 440, a pulling block 450, and an output 460.

입력부(430)는 CNN 제어부(400)에서 재구성되는 입력 데이터를 저장하는 입력 레지스터가 될 수 있다. 입력부(430)은 특징 추출 레이어의 컨볼루션 입력 데이터를 저장하는 CI 레지스터(convolution in put register, CI-reg) 및 연결 레이어 입력 데이터(fully connected input data)를 저장하는 FCI 레지스터(fully connected input register, FCI-reg)를 포함할 수 있다. The input unit 430 may be an input register for storing input data to be reconfigured in the CNN control unit 400. The input unit 430 includes a CI register (convolution in put register, CI-reg) for storing convolution input data of the feature extraction layer, and a fully connected input register (FCI register) FCI-reg).

컨벌루션 블록(440)은 입력부(430)에 저장된 입력 데이터와 정보 처리부(410)의 웨이트 데이터를 컨벌루션 연산할 수 있다. 컨벌루션 블록(540)은 입력 데이터와 동일한 ID의 웨이트 데이터들을 컨벌루션 연산할 수 있다.The convolution block 440 may perform convolutional computation of the input data stored in the input unit 430 and the weight data of the information processing unit 410. The convolution block 540 may perform a convolution operation on the weight data having the same ID as the input data.

풀링 블록(450)은 특정 추출 레이어에서 컨벌루션 연산된 데이터들에서 동일한 ID를 가지는 데이터들을 풀링 연산할 수 있다. 풀링 블록(550)은 연결 레이어에서 동작되지 않을 수 있다. The pulling block 450 may pool the data having the same ID in the convoluted data at a specific extraction layer. The pooling block 550 may not operate at the connection layer.

출력부(560)는 특징 추출 레이어에서 풀링 블록(550)에서 출력되는 데이터를 저장할 수 있으며, 연결 레이어에서 컨벌루션 블록(540)에서 출력되는 데이터를 저장할 수 있다. 출력부(560)는 LO 레지스터(layer output register, LO-reg) 및 액티베이션(activation) 블록을 포함할 수 있다.The output unit 560 may store data output from the pulling block 550 in the feature extraction layer and may store data output from the convolution block 540 in the connection layer. The output unit 560 may include an LO register (LO-reg) and an activation block.

위와 같은 구성을 가지는 CNN 장치에서 CNN 제어부(400)는 특징 추출 레이어를 최초 실행할 때, 외부 시스템에서 수신되는 데이터를 입력부(430)에 저장할 수 있다. CNN 제어부(400)는 두번째 이후의 특징 추출 레이어를 실행할 때 출력부(460)에 저장된 풀링 블록(450)의 출력 데이터를 재구성하여 상기 입력부(430)에 컨벌루션 입력 데이터로 저장할 수 있다. CNN 제어부(400)는 특징 추출 동작이 종료되면, 클래시피케이션 레이어를 실행할 수 있다. CNN 제어부(400)는 클래시피케이션 레이어에서 컨벌루션 레이어에서 연산된 출력 데이터를 재구성하여 입력부(430)에 연결 레이어의 입력 데이터로 저장할 수 있다. CNN 제어부(400)는 클레시피케이션 레이어 실행 종료시 결과 데이터를 상기 외부 시스템에 출력할 수 있다.In the CNN apparatus having the above configuration, the CNN control unit 400 may store the data received from the external system in the input unit 430 when the feature extraction layer is first executed. The CNN control unit 400 reconstructs the output data of the pulling block 450 stored in the output unit 460 and stores the reconstructed output data in the input unit 430 as the convolution input data. When the feature extraction operation is completed, the CNN control unit 400 can execute the classification layer. The CNN control unit 400 reconstructs the output data calculated in the convolution layer in the classification layer and stores the reconstructed output data in the input unit 430 as input data of the connection layer. The CNN control unit 400 can output the result data to the external system upon completion of execution of the recovery layer.

본 발명의 다양한 실시예들에 따른 CNN 장치는 웨이트 데이터를 저장하는 레지스터를 포함하는 정보 처리부(410)과, 특징 추출 레이어 및 클래시피케이션 레이어 오퍼레이션을 수행하는 적어도 하나의 채널 세트(420) 및 채널 세트가 특징 추출 레이어의 오퍼레이션을 수행을 제어하고, 특징 추출 레이어의 오퍼레이션이 완료되면 클래스피케이션 레이어 오퍼레이션을 수행하도록 제어하는 CNN 제어부(410)을 포함할 수 있다. 그리고 각 채널 세트(420)는 입력 데이터를 저장하는 입력부(430), 입력 데이터와 웨이트 데이터를 컨벌루션 연산하는 컨벌루션 블록(440), 컨벌루션 연산된 데이터를 풀링 연산하는 풀링 블록(450) 및 컨벌루션 연산 데이터 또는 풀링 연산 데이터를 저장하는 출력부(460)을 포함할 수 있다. 본 발명의 다양한 실시예들에 따른 CNN 장치는 특징 추출 레이어 오퍼레이션에서 상기 채널 세트(420)의 컨벌루션 블록(440) 및 풀링 블록(450)을 구동하여 컨벌루션 레이어 및 풀링 레이어 오퍼레이션을 수행할 수 있다. 본 발명의 다양한 실시예들에 따른 CNN 장치는 특징 추출 레이어 오퍼레이션을 종료하면 클래시피케이션 레이어 오퍼레이션을 수행할 수 있으며, 클래시피케이션 오퍼레이션에서는 채널 세트(420)의 컨벌루션 블록을 구동(풀링 블록(450)은 구동하지 않음)하여 연결 레이어 오퍼레이션을 수행할 수 있다. The CNN apparatus according to various embodiments of the present invention includes an information processing unit 410 including a register for storing weight data, at least one channel set 420 for performing a feature extraction layer and classification layer operation, The CNN control unit 410 controls the operation of the feature extraction layer to perform the operation, and performs the class-action layer operation when the operation of the feature extraction layer is completed. Each channel set 420 includes an input unit 430 for storing input data, a convolution block 440 for convoluting input data and weight data, a pulling block 450 for pulling up convolution computed data, Or an output unit 460 for storing pooling operation data. The CNN device according to various embodiments of the present invention may drive the convolution block 440 and the pulling block 450 of the channel set 420 in the feature extraction layer operation to perform the convolution layer and the pulling layer operations. The CNN apparatus according to various embodiments of the present invention may perform a classification layer operation upon completion of the feature extraction layer operation. In the classification operation, the CNN apparatus drives the convolution block of the channel set 420 ) Are not driven) to perform the link layer operation.

도 4b는 본 발명의 다양한 실시예에 따른 CNN 장치의 다른 구성의 블록도를 도시하는 도면이다.4B is a block diagram of another configuration of a CNN apparatus according to various embodiments of the present invention.

도 4b를 참조하면, CNN 장치는 CNN 제어부(405), 정보처리부(415), 특징 추출 레이어 블록(425) 및 클래시피케이션 블록(427)을 포함할 수 있다. 특징 추출 레이어 블록(425)은 하나 또는 둘 이상의 복수개로 구현될 수 있다. Referring to FIG. 4B, the CNN apparatus may include a CNN control unit 405, an information processing unit 415, a feature extraction layer block 425, and a classification block 427. The feature extraction layer block 425 may be implemented as one or more than two.

CNN 제어부(405)는 특징 추출 레이어 블록(425) 및 클래시피케이션 레이어 블록(427)의 동작을 제어하고, 해당하는 레이어를 실행할 때 입력 데이터를 재구성하는 동작을 수행할 수 있다. CNN 제어부(405)는 특징 추출 레이어 블록(425) 동작을 제어하고, 특징 추출 레이어 블록(425)의 동작이 완료되면 클래시피케이션 레이어 블록(427)의 동작을 제어할 수 있다. CNN 제어부(405)는 아비터 및 MMU(arbiter/MMU)를 포함할 수 있다. The CNN control unit 405 can control the operations of the feature extraction layer block 425 and the classification layer block 427 and perform the operation of reconstructing the input data when executing the corresponding layer. The CNN control unit 405 controls the operation of the feature extraction layer block 425 and controls the operation of the classification layer block 427 when the operation of the feature extraction layer block 425 is completed. The CNN control unit 405 may include an arbiter and an arbiter / MMU (MMU).

정보 처리부(410)은 적어도 하나의 레지스터 및 적어도 하나의 카운터를 포함할 수 있다. 예를들면, 정보 처리부(410)은 특징 추출 레이어 블록(425) 및 클래시피케이션 블록(427)의 컨볼루션 동작에서 사용될 수 있는 웨이트 데이터들을 저장하는 웨이트 레지스터를 포함할 수 있다. 예를들면, 정보 처리부(410)은 CNN 장치의 동작에 따라 연산되는 동작의 횟수를 갱신하는 카운터들을 포함할 수 있다. 정보 처리부(410)은 시스템 초기화시 호스트에서 전송되는 정보들을 각각 대응되는 레지스터에 저장할 수 있으며, CNN 장치의 동작에 따른 카운트 값을 갱신할 수 있다.The information processing unit 410 may include at least one register and at least one counter. For example, the information processing unit 410 may include a weight register that stores weight data that can be used in the convolution operation of the feature extraction layer block 425 and the classification block 427. For example, the information processing unit 410 may include counters for updating the number of operations calculated according to the operation of the CNN apparatus. The information processing unit 410 may store the information transmitted from the host in the corresponding registers when the system is initialized, and may update the count value according to the operation of the CNN apparatus.

특징 추출 레이어 블록(425)는 복수개로 구성될 수 있다. 각각의 특징 추출 레이어 블록(425)는 각각 대엉되는 채널 데이터의 특징 추출 레이어 오퍼레이션을 수행할 수 있다. 각 특징 추출 레이어 블록(425)는 입력부(435), 컨벌루션 블록(445), 풀링 블록(455) 및 출력부(465)을 포함할 수 있다. The feature extraction layer block 425 may be composed of a plurality of features. Each of the feature extraction layer blocks 425 can perform feature extraction layer operations of the ambiguous channel data. Each feature extraction layer block 425 may include an input 435, a convolution block 445, a pulling block 455 and an output 465.

클래시피케이션 레이어 블록(427)는 하나의 클래시피케이션 레이어 복수개로 블록을 가질 수 있다. 클래시피케이션 레이어 블록(427)는 특징 추출 레이어 오퍼레이션이 완료된 데이터들의 클래시피케이션 레이어 오퍼레이션을 수행할 수 있다. 징 추출 레이어 블록(427)는 입력부(437), 컨벌루션 블록(447), 및 출력부(467)을 포함할 수 있다. The classification layer block 427 may have a plurality of blocks in one classification layer. The classification layer block 427 can perform classification layer operation of the data on which the feature extraction layer operation is completed. The extraction layer block 427 may include an input section 437, a convolution block 447, and an output section 467.

위와 같은 구성을 가지는 CNN 장치에서 CNN 제어부(405)는 특징 추출 레이어를 최초 실행할 때, 외부 시스템에서 수신되는 데이터를 특징 추출 레이어 블록(425)의 입력부(435)에 저장할 수 있다. CNN 제어부(405)는 두번째 이후의 특징 추출 레이어를 실행할 때 출력부(465)에 저장된 풀링 블록(455)의 출력 데이터를 재구성하여 상기 입력부(435)에 컨벌루션 입력 데이터로 저장할 수 있다. CNN 제어부(400)는 특징 추출 동작이 종료되면, 클래시피케이션 레이어 블록(427)을 실행시킬 수 있다. 클래시피케이션 레이어 블록(427)은 컨벌루션 블록(447)에서 연산된 출력 데이터를 재구성하여 입력부(437)에 연결 레이어의 입력 데이터로 저장할 수 있다. CNN 제어부(405)는 클레시피케이션 레이어 실행 종료시 결과 데이터를 상기 외부 시스템에 출력할 수 있다.In the CNN apparatus having the above configuration, the CNN control unit 405 may store the data received from the external system in the input unit 435 of the feature extraction layer block 425 when the feature extraction layer is first executed. The CNN control unit 405 reconstructs the output data of the pulling block 455 stored in the output unit 465 and stores the reconstructed output data in the input unit 435 as the convolution input data when the second and subsequent feature extraction layers are executed. The CNN control unit 400 can execute the classification layer block 427 when the feature extraction operation is completed. The classification layer block 427 reconstructs the output data calculated by the convolution block 447 and stores it as input data of the connection layer in the input unit 437. The CNN control unit 405 can output the result data at the completion of the execution of the recovery layer to the external system.

도 5는 본 발명의 다양한 실시예에 따른 CNN 시스템의 구성을 도시하는 도면이다.5 is a diagram showing a configuration of a CNN system according to various embodiments of the present invention.

도 5를 참조하면, CNN 시스템은 CNN 제어부(500), 정보 처리부(510), 하나 또는 적어도 두개의 채널 세트(520), 메모리(590), 메모리 제어부(580), 렙퍼(wrapper)(570)을 포함할 수 있다. 각 채널 세트(520)은 입력부(530), 컨벌루션 블록(540), 풀링 블록(550), 출력부(560)을 포함할 수 있다. 이하의 설명에서 CNN 장치는 CNN 제어부(500), 정보 처리부(510), 입력부530), 컨벌루션 블록(540), 풀링 블록(550) 및 출력부(560)를 포함하는 장치가 될 수 있으며, CNN 시스템은 CNN 장치와 외부 장치(예를들면 메모리 및 메모리 제어부)를 포함하는 것을 의미할 수 있다. 또한 도 5에서 CNN 제어부(500), 정보 처리부(510), 하나 또는 적어도 두 개의 채널 세트(520)는 도 4a의 CNN 제어부(400), 정보 처리부(410), 채널 세트(420)와 동일할 수 있으며, 도 5의 채널 세트(520)의 입력부(530), 컨벌루션 블록(540), 풀링 블록(550), 출력부(560)는 도 4a의 채널 세트(420)의 입력부(430), 컨벌루션 블록(440), 풀링 블록(450), 출력부(460)과 동일한 구성 및 동작을 가질 수 잇다. 5, the CNN system includes a CNN control unit 500, an information processing unit 510, one or at least two channel sets 520, a memory 590, a memory control unit 580, a wrapper 570, . ≪ / RTI > Each channel set 520 may include an input 530, a convolution block 540, a pulling block 550, and an output 560. In the following description, the CNN apparatus may be a device including a CNN control unit 500, an information processing unit 510, an input unit 530, a convolution block 540, a pulling block 550 and an output unit 560, The system may be meant to include a CNN device and an external device (e.g., memory and memory controller). 5, the CNN control unit 500, the information processing unit 510 and one or at least two channel sets 520 are the same as the CNN control unit 400, the information processing unit 410, and the channel set 420 of FIG. And the input 530, convolution block 540, pulling block 550 and output 560 of the channel set 520 of FIG. 5 may correspond to the input 430 of the channel set 420 of FIG. 4A, The block 440, the pulling block 450, and the output 460.

메모리(590)는 딥 러닝 알고리듬을 수행할 데이터들을 저장할 수 있다. 메모리 제어부(580)은 메모리(590)의 리드 및 라이트 동작을 제어할 수 있으며, CNN 장치에 입력 데이터를 제공할 수 있다. 메모리 제어부(580)는 외부 시스템(예를들면 호스트)와 데이터 통신을 할 수 있다. 랩퍼(570)는 CNN 장치와 메모리 제어부(580)의 데이터 인터페이스 동작을 수행할 수 있다. 예를들면, 시스템 초기화시 메모리 제어부(580)는 호스트로부터 딥러닝 알고리듬을 수행하기 위한 정보(예를들면, 웨이트 데이터, 어드레스 맵, 레이어 컨피겨레이션 정보, 룩업 테이블 및/또는 드롭아웃 정보)를 수신할 수 있으며, 랩퍼(570)를 통해 정보 처리부(510)의 대응되는 레지스터에 저장할 수 있다. 또한 CNN 제어부(500)은 정보 처리부(510)에 저장된 정보(예를들면 어드레스 맵)를 랩퍼(570)을 통해 수신할 수 있다. The memory 590 may store data to perform the deep-running algorithm. The memory control unit 580 can control the read and write operations of the memory 590 and can provide input data to the CNN apparatus. The memory control unit 580 can perform data communication with an external system (e.g., a host). The wrapper 570 can perform a data interface operation between the CNN apparatus and the memory control unit 580. For example, when the system is initialized, the memory control unit 580 stores information (e.g., weight data, address map, layer configuration information, lookup table, and / or dropout information) for executing the deep learning algorithm And stored in a corresponding register of the information processing unit 510 through the wrapper 570. [ In addition, the CNN control unit 500 can receive information (for example, an address map) stored in the information processing unit 510 through the wrapper 570.

CNN 제어부(500)는 아비터 및 MMU를 포함할 수 있다. 정보처리부(510)는 복수의 레지스터들 및 카운터들을 포함할 수 있다. 정보 처리부(510)는 어드레스 맵 레지스터(CI re-map address map, address map for convolution input)(511), 웨이트 레지스터(weight register)(512), 레이어 컨피겨레이션 레지스터(layer configuration register, L_cfg reg)(513) 및 액티베이션 룩업 테이블(activation function LUT(look-up table)(514), 드롭 아웃 발생기(drop out generator)(515)를 포함할 수 있다. 정보 처리부의 어드레스 맵 레지스터(511), 웨이트 레지스터(512), 레이어 컨피겨레이션 레지스터(513) 액티베이션 룩업 테이블(514) 및 드롭아웃 발생기(515)는 시스템 초기화시 외부의 시스템(예를들면 호스트)을 통해 대응되는 데이터를 수신하여 저장할 수 있다. The CNN control unit 500 may include an arbiter and an MMU. The information processing unit 510 may include a plurality of registers and counters. The information processing unit 510 includes an address map register (CI re-map address map) 511, a weight register 512, a layer configuration register (L_cfgreg) A lookup table 513 and an activation function look-up table 514 and a drop out generator 515. The address map register 511 of the information processing unit, The layer configuration register 513, the activation lookup table 514, and the drop-out generator 515 may receive and store corresponding data through an external system (e.g., a host) at system initialization.

입력부(530)는 CNN 제어부(400)에서 재구성되는 입력 데이터를 저장하는 입력 레지스터가 될 수 있다. 입력부(430)은 특징 추출 레이어의 컨볼루션 입력 데이터를 저장하는 CI 레지스터(CI-reg) 및/또는 연결 레이어 입력 데이터를 저장하는 FCI 레지스터(FCI-reg)를 포함할 수 있다. 컨벌루션 블록(540)은 PE 제어부(process element controller, PE controller)(543), 복수의 프로세스 앨리먼트들(545), 복수의 가산기들(547) 및 어큐물레이터(accumulator)(549)를 포함할 수 있다. 풀링 블록(550)은 풀링 연산부(553) 및 풀링 입력 레지스터(555)를 포함할 수 있다. 출력부(560)는 레이어 출력 레지스터(LO-reg) 및 액티베이션 블록(560)을 포함할 수 있다. CNN 장치는 복수의 채널 세트(channel hardware set)(520)들을 구비할 수 있으며, 각 채널 세트(520)는 입력부(530), 컨벌루션 블록(540), 풀링 블록(550) 및 출력부(560)들을 포함할 수 있다. The input unit 530 may be an input register for storing input data reconfigured in the CNN control unit 400. [ The input unit 430 may include a CI register (CI-reg) for storing the convolution input data of the feature extraction layer and / or an FCI register (FCI-reg) for storing connection layer input data. The convolution block 540 may include a PE controller 543, a plurality of process elements 545, a plurality of adders 547 and an accumulator 549 have. The pulling block 550 may include a pulling operation unit 553 and a pulling input register 555. Output portion 560 may include a layer output register (LO-reg) and an activation block 560. The CNN device may have a plurality of channel hardware sets 520 and each channel set 520 may include an input 530, a convolution block 540, a pulling block 550, and an output 560. [ Lt; / RTI >

본 발명의 다양한 실시예들에 사용되는 약어(abbreviation)들은 하기의 <표 1>과 같다. Abbreviations used in various embodiments of the present invention are shown in Table 1 below.

abbreviationabbreviation stand forstand for CNN accelCNN accel convolutional neural network acceleratorconvolutional neural network accelerator CH setCH set channel hardware setchannel hardware set regreg registerregister IDID identificationidentification CICI convolutional input전형 L cfgL cfg layer configuration층 구성 CI idCI id convolution input IDconvolution input ID CO idCO id convolution output IDconvolution output ID PI idPI id pooling input IDpooling input ID PO idPO id pooling output IDpooling output ID L idL id layer IDlayer ID PEPE process element공정 요소 PE ctrlPE ctrl process element controller공정 요소 제어기 K idK id kernel DIkernel DI PI regPI reg pooling input registerpooling 입력 레지스터

정보 처리부(510)는 CH 세트의 각 구성들에서 사용되는 정보들을 저장하는 레지스터 및 카운터를 포함할 수 있다. 정보 처리부(510)는 입력 레지스터를 구성하는 어드레스 맵 레지스터, 학습된 웨이트(trained weight)를 위한 register, 각 레이어들의 컨피겨레이션 정보들을 저장하는 레지스터들 및 각각의 동작(operation)에서 사용될 카운터들을 포함할 수 있다. 먼저 본 발명의 다양한 실시예들에 따른 정보처리부(510)의 레지스터들을 설명하고, 이후 카운터들을 설명하기로 한다.The information processing unit 510 may include a register and a counter for storing information used in each configuration of the CH set. The information processing unit 510 includes an address map register constituting an input register, a register for trained weight, registers for storing configuration information of each layer, and counters to be used in each operation can do. First, the registers of the information processing unit 510 according to various embodiments of the present invention will be described, and then the counters will be described.

먼저 레지스터들을 설명한다. First, we explain the registers.

웨이트 레지스터(512)는 학습된 웨이트 데이터 set(trained weight data set)들을 저장하는 레지스터가 될 수 있다. 학습은 입력 데이터 세트에서 특징(feature)들을 학습하는 일련의 과정이 될 수 있으며, 학습 과정에서 입력 데이터와 웨이트 데이터들을 컨벌루션 연산하여 특징을 학습할 수 있다. 컨벌루션 블록(540)은 웨이트 레지스터(512)에 저장된 weight set과 입력 데이터를 컨벌루션 연산(convolution operation)할 수 있으며, 입력 데이터와 웨이트 데이터의 깊이(input depth and weight depth)가 같은 것들끼리 계산될 수 있다. The weight register 512 may be a register for storing trained weight data sets. Learning can be a series of processes for learning features in an input data set. In learning, input data and weight data can be convoluted to learn features. The convolution block 540 may perform a convolution operation on the weight set and the input data stored in the weight register 512 and may calculate the input data and the weight data having the same depth and weight depth have.

어드레스 맵 레지스터(CI re-map address map block)(511)는 시스템 초기화 시점(initialization state)에서 host로부터 전송되는 어드레스 맵(address map for convolution input)을 수신하여 저장할 수 있다. 어드레스 맵은 레이어 별로 존재할 수 있다. 어드레스 맵은 LO reg와 CI reg의 어드레스를 매핑하는 맵이 될 수 있다. CNN 제어부(500)의 아비터(arbiter)는 인터페이스 랩퍼(57)을 통해 입력부(530)의 CI reg addr에 해당하는 input addr를 출력하고, 어드레스 맵을 참조하여 input addr에 해당하는 LO reg의 데이터를 CI reg addr이 가리키는 CI reg에 저장할 수 있다. CI reg addr에 대하는 input addr이 없으면, CNN 제어부(500)는 제로 플래그(zero flag, ZF)를 세트(예를들면 ZF=1)할 수 있다. 제로 플래그가 세트된 어드레스이면, CNN 제어부(500)은 제로 패딩된 입력 데이터를 CI reg에 저장할 수 있다. The CI re-map address map block 511 may receive and store an address map for the convolution input transmitted from the host in an initialization state. The address map may exist for each layer. The address map may be a map that maps addresses of the LO reg and the CI reg. The arbiter of the CNN control unit 500 outputs the input addr corresponding to the CI reg addr of the input unit 530 through the interface wrapper 57 and refers to the address map to obtain the data of the LO reg corresponding to the input addr It can be stored in the CI reg pointed to by CI reg addr. If there is no input addr for the CI reg addr, the CNN control unit 500 can set a zero flag (ZF) to ZF = 1, for example. If the zero flag is the set address, the CNN control unit 500 can store the zero padded input data in the CI reg.

호스트는 어드레스 맵 레지스터(511)의 어드레스 맵을 하기 <수학식 1> 및 <수학식 2>에 의해 어드레스 맵을 계산할 수 있다. <수학식 1>은 입력 어드레스와 제로 패드 입력 어드레스의 맵(input address to zero padded input address map)을 계산하는 수학식이 될 수 있다. 입력 어드레스는 0부터 W*H*D-1이 될 수 있다. <수학식 2>는 제로 패디드 입력 어드레스와 컨벌루션 입력 데이터의 어드레스 맵(zero padded input address to convolutiona input data address map)을 계산하는 수학식이 될 수 있다. CI reg 어드레스로부터 제로 패딩 레지스터 어드레스(ZP reg addresss)를 계산할 수 있다. The host can calculate the address map of the address map register 511 by using the following equations (1) and (2). Equation (1) may be a mathematical expression for calculating an input address to a zero pad input address map. The input address can be from 0 to W * H * D-1. Equation (2) may be a formula for calculating a zero padded input address and a zero padded input address to convolutional input data address map. From the CI reg address, a zero padding register address (ZP reg addresses) can be calculated.

    

Figure pat00001
Figure pat00001

Figure pat00002
Figure pat00002

L_cfg reg(513)는 해당하는 레이어의 컨피겨레이션 정보를 저장하는 레지스터일 수 있다. CNN 제어부(500)는 해당 Layer의 L_cfg reg 에 들어있는 정보를 확인하여, CI reg를 구성할 수 있다. Arbiter는 입력 데이터의 CO id, PO id, LO id를 L cfg reg로부터 CI reg에 저장할 수 있다. L-cfg reg 의 정보는 하기 <표 2>의 layer configuration table과 같은 정보들이 될 수 있다.The L_cfg reg 513 may be a register for storing configuration information of a corresponding layer. The CNN control unit 500 can confirm the information contained in the L_cfg reg of the corresponding layer and configure the CI reg. The Arbiter can store the CO id, PO id, and LO id of the input data in the CI reg from L cfg reg. The information of the L-cfg reg can be the same information as the layer configuration table of Table 2 below.

    

namename descriptiondescription Input data width/ height/depth/channelInput data width / height / depth / channel W / H / D / CHW / H / D / CH Input data zero pad sizeInput data zero pad size Zx, ZyZx, Zy Zero padded width/height/sizeZero padded width / height / size W+2*Zx / H+2*Zy / (W+2*Zx)*(H+2*Zy)W + 2 * Zx / H + 2 * Zy / (W + 2 * Zx) * (H + 2 * Zy) Conv layer width/heightConv layer width / height

Figure pat00003
/
Figure pat00004
Figure pat00003
/
Figure pat00004
Conv layer zero pad sizeConv layer zero pad size
Figure pat00005
/
Figure pat00006
Figure pat00005
/
Figure pat00006
Conv window size/stride sizeConv window size / stride size Cx / Cy /
Figure pat00007
/
Figure pat00008
Cx / Cy /
Figure pat00007
/
Figure pat00008
Conv layer kernelConv layer kernel KK Conv output matrix sizeConv output matrix size ((W-Cx+2Zx)/Sx)+1 / ((W-Cy+2Zy)/Sy)+1((W-Cx + 2Zx) / Sx) +1 / ((W-Cy + 2Zy) / Sy) +1 Pool layer width/heightPool layer width / height
Figure pat00009
/
Figure pat00010
Figure pat00009
/
Figure pat00010
Pool layer zero pad sizePool layer zero pad size
Figure pat00011
/
Figure pat00012
Figure pat00011
/
Figure pat00012
Pool window size/stride sizePool window size / stride size Px / Py /
Figure pat00013
/
Figure pat00014
Px / Py /
Figure pat00013
/
Figure pat00014
Input dataset layer 수Input dataset layer number L numL num Channel 당 input data 수Number of input data per channel W*H*DW * H * D CI data count maxCI data count max Cx*Cy*DCx * Cy * D PI data count maxPI data count max Px*PyPx * Py LO data count maxLO data count max
Figure pat00015
Figure pat00015

    

액티베이션 룩업 테이블(514)의 출력 값은 액티베이션 펑션(activation function)을 수행하기 위한 데이터들을 저장하는 레지스터가 될 수 있다. LO reg의 data들은 액티베이션 펑션을 수행하여 저장될 수 있다. 액티베이션 펑션은 룩업 테이블을 참조하거, 직접 펑션을 수행하여 계산될 수 있다. The output value of the activation lookup table 514 may be a register that stores data for performing an activation function. The data of the LO reg can be stored by performing an activation function. The activation function can be calculated by referring to the lookup table or performing a direct function.

드롭아웃 발생기(515)는 드롭 아웃 신호(Drop out signal)를 생성할 수 있다. 컨벌루션 블록(540)의 프로세스 앨리먼트들(545)는 드롭 아웃 발생기(515)의 파라미터(parameter) 값을 통해 결정될 수 있다.The dropout generator 515 may generate a dropout signal. The process elements 545 of the convolution block 540 may be determined through a parameter value of the dropout generator 515. [

정보 처리부(510)은 위와 같은 레지스터들 이외에 하기와 같은 카운터들을 포함할 수 있다. The information processing unit 510 may include the following counters in addition to the above registers.

channel count(501)의 max는 입력 데이터 세트의 채널 수가 될 수 있다. channel count(501)는 입력 데이터의 한 채널이 CH set 1개로 입력될 때마다 1씩 증가하는 카운터가 될 수 있다. 입력 데이터의 채널 수가 CH set보다 많으면, channel count 값이 max에 도달할 때까지 클래시피케이션 레이를 시작하지 않을 수 있다. 예를들면, 입력 데이터의 채널 수가 5이고 CH set가 3인 경우, channel count의 max는 5가 될 수 있다. 그리고 3개의 CH set들은 각각 병렬로 3개 채널들의 입력 데이터들의 특징을 추출할 수 있으며, 3개 채널들의 입력 데이터들에 특징을 추출하면, channel count는 3이 될 수 있으며, 3개의 CH set들 중에서 2개의 CH set들을 2개 채널들의 입력 데이터들의 특징을 추출할 수 있다. 이런 경우, channel count(501)의 카운트 값이 5가 될 때까지 CNN 장치는 클래시피케이션 레이어를 수행하지 않을 수 있다. The max of the channel count 501 may be the number of channels of the input data set. The channel count 501 may be a counter that is incremented by one each time one channel of input data is input as one CH set. If the number of input data channels is greater than CH set, the classification layer may not be started until the channel count value reaches max. For example, if the number of input data channels is 5 and the CH set is 3, the max of the channel count can be 5. In addition, if three CH sets can extract the characteristics of the input data of three channels in parallel, and if the characteristics are extracted from the input data of three channels, the channel count can be 3, and the three CH sets Two CH sets can be extracted from the characteristics of the input data of the two channels. In this case, the CNN device may not perform the classification layer until the count value of the channel count 501 becomes 5.

Start layer count/end layer count(502)는 레이어의 시작 및 종료 상태를 확인하기 위한 카운터가 될 수 있다. Start layer count의 max는 (입력 데이터 세트의 레이어 수 - 1)이 될 수 있다. Start layer count는 현재 수행되고 있는 레이어의 연산이 모두 끝날 때마다 1씩 증가시킬 수 있으며, CNN 장치는 start layer count의 값을 확인하여 현재 레이어의 상태(state)를 알 수 있다. end layer count의 max는 입력 데이터 세트의 레이어 수가 될 수 있다. end layer count는 새로운 레이어가 시작될 때마다 1씩 증가시킬 수 있으며, 현재 레이어의 상태를 나타낼 수 있다. The start layer count / end layer count 502 may be a counter for checking the start and end states of the layer. The max of the start layer count can be (number of layers of the input data set - 1). The start layer count can be incremented by 1 each time the operation of the current layer is completed, and the CNN device can know the state of the current layer by checking the value of the start layer count. The max of the end layer count can be the number of layers in the input data set. The end layer count can be incremented by 1 each time a new layer starts, and can indicate the current state of the layer.

CI data count/LI data count(503)의 max는 Cx*Cy*D가 될 수 있다. 컨벌루션 블록540)의 가산부(ADD block)(547)에서 같은 CO id에 해당하는 데이터들을 가산할 때 마다 CI data count값을 1씩 증가시킬 수 있다. 이 카운트 값은 컨벌루션 입력 앨리먼트(convolution input element)들이 모두 더해졌는지를 체크할 수 있는 값이 될 수 있다. 어큐물레이터(ACC block)(549)는 현재 데이터의 CO id에 해당하는 CI data count값이 max가 되지 않았으면, 가산부(547)의 마지막 ADD block layer로 데이터 세트를 입력시킬 수 있다. 연결 레이어(FC layer)에서는 CO id의 역할을 K_id가 수행할 수 있다. The max of CI data count / LI data count 503 may be Cx * Cy * D. The CI data count value may be incremented by one each time data corresponding to the same CO id is added in the ADD block 547 of the convolution block 540. [ This count value can be a value that can be checked to see if all the convolution input elements have been added. The ACC block 549 can input the data set to the last ADD block layer of the adder 547 if the CI data count value corresponding to the CO id of the current data is not max. In the connection layer (FC layer), the role of CO id can be performed by K_id.

PI data count(506)의 max는 Px*Py가 될 수 있다. Pooling 블록(550)은 데이터 세트의 PO id 값을 확인하여 해당 PI data count 값을 1 증가시킬 수 있다. PI data count 값이 max 값에 도달하면, 풀링 블록(550)은 데이터 세트를 LO reg로 출력할 수 있다. The max of the PI data count 506 may be Px * Py. Pooling block 550 may check the PO id value of the data set and increment the corresponding PI data count value by one. When the PI data count value reaches the max value, the pooling block 550 may output the data set to the LO reg.

LO data count(504)의 max는 하기 <수학식 3>에 의해 결정될 수 있다. LO data count(504)는 LO reg로 들어오는 data set의 L_id를 확인되면 해당 LO data count를 1증가시킬 수 있다. LO data count(504)는 해당 레이어의 출력(output)이 모두 계산되었는지 여부를 나타낼 수 있다. The max of the LO data count 504 may be determined by Equation (3) below. The LO data count 504 can increase the corresponding LO data count by 1 if the L_id of the data set coming in the LO reg is confirmed. The LO data count 504 may indicate whether all outputs of the layer have been calculated.

Kernel count(507)의 max는 K가 될 수 있다. Kernel count(507)는 LO reg로 입력되는 데이터 세트의 K_id가 확인되면 해당 Kernel count 값을 1 증가시킬 수 있다. Kernel count(507)는 해당 layer의 출력이 모두 계산되었는지를 나타낼 수 있다. The max of the kernel count 507 can be K. The Kernel count 507 can increase the Kernel count value by 1 when the K_id of the data set input to the LO reg is confirmed. The kernel count 507 may indicate whether all outputs of the layer are calculated.

정보 처리부(510)는 채널 세트들에서 사용되는 정보들을 저장할 수 있다. 하기 <표 3>은 정보 처리부(510)의 정보들을 사용하는 구성들을 표시하고 있다.The information processing unit 510 may store information used in the channel sets. Table 3 below shows the configurations using the information of the information processing unit 510.

    

CNN 제어부CNN control section Convolution blockConvolution block
polling

polling

LO reg

LO reg
arbitorarbitor MMUMMU PE제어부PE controller PEPE ADD,ACCADD, ACC CI re-map
Address map
CI re-map
Address map
L cfg regL cfg reg Weight regWeight reg Channel cntChannel cnt Start layer cnt
End layer cnt
Start layer cnt
End layer cnt
CI data cntCI data cnt LI data cntLI data cnt LO data cntLO data cnt Drop out genDrop out gene K id cntK id cnt PI data cntPI data cnt Kenter cntKenter cnt

도 5와 같은 구성을 가지는 CNN 장치는 CNN 가속 장치(CNN accelator)가 될 수 있으며, 특징 러닝 파트(feature learning part, feature extraction part)와 클래시피케이션 파트(classification part)를 모두 수행할 수 있다. 채널 세트(CH set)(521-52N)들은 사용하게 될 입력 데이터의 채널 수에 따라 적절하게 설계할 수 있다. 예를들면, 입력 데이터가 RGB image data의 경우, 채널 수는 3이 될 수 있으며, 채널 세트는 3개로 구성할 수 있다. The CNN apparatus having the configuration as shown in FIG. 5 may be a CNN accelerator, and may perform both a feature learning part (feature extraction part) and a classification part. The channel sets (CH sets) 521-52N can be appropriately designed according to the number of input data channels to be used. For example, if the input data is RGB image data, the number of channels can be three, and the number of channel sets can be three.

채널 세트(521-52N)는 각각 해당 채널의 입력 데이터를 수신하여 특징 추출 동작 및 클래시피케이션 동작을 수행할 수 있다. 채널 세트(521-52N)들은 입력부(530), 컨벌루션 블록(540), 풀링 블록(550) 및 출력부(560)을 포함할 수 있다. 채널 세트(521-52N)들은 먼저 입력부(530), 컨벌루션 블록(540) 및 출력부(560)의 동작에 기반하여 특징 추출 동작을 수행할 수 있다. 두 번째로 특징 추출 동작을 완료한 후, 채널 세트(521-52N)들 중에서 선택된 채널 세트는 클래피시케이션 동작을 수행할 수 있다. 상기 선택된 채널 센트는 입력부(530), 컨벌루션 블록(540) 및 출력부(560)의 동작에 기반하여 클래시피케이션 동작을 수행할 수 있다. Each of the channel sets 521 to 52N receives the input data of the corresponding channel, and performs the feature extraction operation and the classification operation. The channel sets 521-52N may include an input 530, a convolution block 540, a pulling block 550 and an output 560. The channel sets 521-52N may first perform a feature extraction operation based on the operation of the input unit 530, the convolution block 540, and the output unit 560. [ Second, after completing the feature extraction operation, the set of channels selected from the channel sets 521-52N may perform a classification operation. The selected channel cent may perform a classification operation based on operations of the input unit 530, the convolution block 540, and the output unit 560.

채널 세트(521-52N)들은 CNN 알고리듬의 연산(computation)을 담당할 수 있다. CNN 알고리듬의 연산은 컨벌루션, 풀링, 가산(Convolution, pooling element wise multiply, addition) 등이 될 수 있다. 정보 처리부(deep learning accelerator controller(Top Ctrl))(510)는 채널 세트(521-52N)의 동작 블록들에서 사용되는 정보를 저장할 수 있다. 정보 처리부(510)는 입력부(530)에 입력 데이터를 구성하기 위한 어드레스 맵 레지스터(re-map address map register)(511)와 학습된 웨이트(trained weight)를 위한 저장하는 웨이트 레지스터(512), 각 레이어들의 컨피겨레이션 정보(configuration information)을 저장하는 L-cfg 레지스터(513) 등을 구비할 수 있으며, 각각의 동작(operation)에서 사용될 수 카운터들을 포함할 수 있다. The channel sets 521-52N may be responsible for the computation of the CNN algorithm. The operations of the CNN algorithm may be convolution, pooling, addition (pooling element wise multiply, addition). The deep learning accelerator controller (Top Ctrl) 510 may store information used in the operation blocks of the channel sets 521-52N. The information processing unit 510 includes an address map register 511 for constructing input data in the input unit 530 and a weight register 512 for storing the learned weight for trained weight, An L-cfg register 513 for storing configuration information of layers, and the like, and may include counters that can be used in each operation.

채널 세트(521-52N)의 입력 데이터는 16 또는 36 포인트 데이터가 될 수 있으며, 또한 가변 또는 고정 데이터 포맷(16 or 32 floating or fixed point format)을 가질 수 있다. 입력 데이터의 포맷에 따라 채널 세트(521-52N)의 컨벌루션 블록(540)의 구성이 달라질 수 있다. 컨벌루션 블록(540)의 프로세서 앨리먼트(545)의 수 및 가산기(547)의 수도 리소스(resource) 및 입력 데이터에 기반하여 적절하게 선택될 수 있다. 입력부(530)에 입력 데이터가 저장되면, 컨벌루션 블록(540)은 바로 연산을 시작할 수 있다. The input data of channel sets 521-52N may be 16 or 36 point data and may also have a variable or fixed data format (16 or 32 floating or fixed point format). The configuration of the convolution block 540 of the channel sets 521-52N may be changed according to the format of the input data. The number of processor elements 545 of the convolution block 540 and the water resource of the adder 547 and the input data. If the input data is stored in the input unit 530, the convolution block 540 can immediately start the operation.

CNN 장치는 특징 추출 레이어의 동작을 수행할 수 있으며, 특징 추출 레이어의 동작을 완료한 후 클래시피케이션 레이어의 동작을 수행할 수 있다. The CNN device can perform the operation of the feature extraction layer and can perform the operation of the classification layer after completing the operation of the feature extraction layer.

먼저 특징 추출 레이어의 동작을 살펴본다.First, the operation of the feature extraction layer will be described.

CNN제어부(500)는 컨벌루션 블록(540)의 제한된 프로세서 앨리먼트들을 이용하여 각 레이어의 계산을 효율적으로 수행하기 위해서 입력 데이터를 구성하는 기능을 수행할 수 있다. 즉, CNN 제어부(500)는 입력부(530)의 CI reg(convolution input data register)를 구성하는 역할을 할 수 있다. CNN 제어부(500)는 해당 레이어의 Lcfg reg (513)에 저장된 정보를 확인하여 입력부(530)의 CI reg를 구성할 수 있다. 특징 추출 레이어에서, CNN 제어부(500)는 입력 데이터의 채널당 하나의 채널 세트(520)를 배정하고, 배정된 채널 세트(520)에 입력 데이터를 분배할 수 있다. 입력 데이터의 채널들이 채널 세트(520)의 수 보다 많으면, 채널 세트(520)의 계산이 모두 종료된 후에 입력 데이터의 채널 데이터들에 대한 채널 세트(520)를 배정하여 계산할 수 있다. 예를들어 채널 세트(520)의 수가 3(N=3)이고, 입력 데이터의 채널 수가 5개이면, CNN 제어부(500)는 먼저 3개 채널의 입력 데이터들을 각각 3개의 채널 세트들에 배정하여 계산하고, 3개 채널들의 입력 데이터들에 대한 계산이 종료되면 3개의 채널 세트들 중에서 2개의 채널 세트들에 입력 데이터를 배정하여 입력 데이터를 계산할 수 있다. The CNN control unit 500 can perform the function of constructing the input data to efficiently perform calculation of each layer using the limited processor elements of the convolution block 540. [ That is, the CNN control unit 500 may function as a CI reg (convolution input data register) of the input unit 530. The CNN control unit 500 can confirm the information stored in the Lcfg reg 513 of the corresponding layer and configure the CI reg of the input unit 530. In the feature extraction layer, the CNN control unit 500 may allocate one channel set 520 per channel of input data and distribute the input data to the assigned channel set 520. If the number of channels of the input data is greater than the number of the channel sets 520, the channel set 520 for the channel data of the input data may be allocated and calculated after the calculation of the channel set 520 is completed. For example, if the number of channel sets 520 is 3 (N = 3) and the number of channels of input data is 5, the CNN control unit 500 assigns input data of three channels to three channel sets first When the calculation of the input data of the three channels is completed, the input data can be calculated by assigning the input data to the two channel sets out of the three channel sets.

CI reg 는 외부 인터페이스를 통해 입력되는 새로운 입력 데이터를 저장할 수 있으며, 또한 이전 레이어의 출력 데이터를 입력 데이터로 저장할 수 있다. CNN 제어부(500)는 첫 번째 특징 추출 레이어에서 랩퍼(570)을 통해 외부 시스템으로부터 입력되는 데이터를 CI reg에 입력 데이터로 저장할 수 있다. 그리고 두 번째 특징 추출 레이어에서 마지막 특징 추출 레이어에서, CNN 제어부(500)는 이전 특징 추출 레이어에 계산되어 출력되는 데이터를 입력 데이터로 저장할 수 있다. 도 6은 입력부(530)의 CI reg에 저장되는 입력 데이터 세트(CI reg input data set)의 구조를 도시하는 도면이다. 입력 데이터 세트는 입력 데이터(i.data), 제로 플래그(ZF), CO id, PO id, L id 등을 포함할 수 있다. The CI reg can store new input data input through an external interface, and can also store output data of a previous layer as input data. The CNN control unit 500 may store data input from the external system through the wrapper 570 in the first feature extraction layer as input data in the CI reg. And, in the last feature extraction layer in the second feature extraction layer, the CNN control unit 500 can store the data that is calculated and outputted in the previous feature extraction layer as input data. 6 is a diagram showing the structure of an input data set (CI reg input data set) stored in the CI reg of the input unit 530. As shown in FIG. The input data set may include input data (i.data), zero flag (ZF), CO id, PO id, L id, and the like.

CNN 제어부(500)의 아비터는 CI reg에 입력 데이터를 저장할 때, 입력 데이터의 값이 0이면 제로 플래그(zero flag, ZF)를 세트(예를들면, zero flag bit를 1로 masking)할 수 있다. 상기 입력 데이터의 제로 플래그 비트가 세트되면, 컨벌루션 블록(540) 및 풀링 블록(550)은 제로 플래그 비트에 기반하여 연산 동작을 신속하게 수행할 수 있다. 예를들면, 곱셈 연산인 경우 연산 동작없이 0를 출력하고, 가산인 경우 다른 값(operand value)을 바로 출력하여 연산 시간(operation latency)를 줄일 수 있다. The arbiter of the CNN control unit 500 may set a zero flag ZF when the input data value is 0 when the input data is stored in the CI reg, for example, by zeroing the zero flag bit to 1 . When the zero flag bit of the input data is set, the convolution block 540 and the pulling block 550 can quickly perform the arithmetic operation based on the zero flag bit. For example, in the case of a multiplication operation, 0 is output without a calculation operation, and in the case of addition, another value (operand value) is directly output to reduce an operation latency.

특징 추출 레이어의 계산이 종료되면, CNN 제어부(500)는 채널 세트(520)들 중에서 하나의 채널 세트를 선택하고, 선택된 채널 세트에 입력 데이터의 전체를 입력하여 연산 동작을 수행할 수 있다. 클래시피케이션 레이어의 연산은 컨벌루션 연산 동작이 될 수 있으며, 풀링 동작은 생략될 수 있다. When the calculation of the feature extraction layer is completed, the CNN control unit 500 can select one channel set among the channel sets 520 and input the entire input data to the selected channel set, thereby performing a calculation operation. The operation of the classification layer may be a convolution operation, and the pulling operation may be omitted.

상기 CNN 제어부(500)는 상기 입력부(530)dml CI reg에 입력 데이터를 저장할 때, 현재의 레이어 상태(layer state)를 고려할 수 있다. CNN 제어부(500)는 입력 데이터를 재구성하여 CI reg에 저장할 ‹š, L cfg reg(513)에서 해당 레이어의 컨피겨레이션(layer configuration)을 확인한 후, 어드레스 맵 레지스터(convolutional Input re-map address map) (511)을 통해 출력부(560)의 LO reg 어드레스를 결정하고, 해당 어드레스 위치의 LO 데이터를 입력부(530)의 CI reg에 입력 데이터로 저장할 수 있다. 어드레스 맵 레지스터(511) 및 L cfg reg(513)는 초기 상태(Initialization state)에서 호스트로부터 전송되는 어드레스 맵(CI re-map address map) 정보 및 레이어 컨피겨레이션 정보를 각각 렙퍼(wrapper)(570을 통해 수신하여 저장할 수 있다. 어드레스 맵 레지스터(511)는 레이어 당 각각 존재하는 어드레스 맵(CI re-map addr map)들을 저장할 수 있다. L cfg reg(513)의 레이어 컨피겨레이션 정보는 상기 <표 3>의 레이어 컨피겨레이션 테이블이 될 수 있다. The CNN control unit 500 may consider the current layer state when storing the input data in the dml CI reg of the input unit 530. [ The CNN control unit 500 reconfigures the input data and stores it in the CI reg. After confirming the layer configuration of the corresponding layer in the L cfg reg 513, the CNN control unit 500 generates an address map register (convolutional input re- ) 511 to determine the LO reg address of the output unit 560 and store the LO data at the corresponding address position in the CI reg of the input unit 530 as input data. The address map register 511 and the L cfg reg 513 store the CI re-map address map information and the layer configuration information transmitted from the host in an initialization state into a wrapper 570 The address map register 511 may store address maps (CI re-map addr maps) existing for each layer. The layer configuration information of the L cfg reg 513 is stored in the < Table 3> can be a layer configuration table.

CNN 제어부(500)의 아비터는 도 6과 같은 구조를 가지는 입력 데이터를 CI reg의 마지막 어드레스까지 저장하면, 다시 맨 처음부터 이미 처리한 CI reg의 영역에 계속해서 저장할 수 있다. CI reg의 크기는 외부 인터페이스의 대역폭(external Interface bandwidth)과 CNN 장치의 대역폭(deep learning accelerator hardware의 bandwidth)을 고려하여 결정할 수 있다. 아비터는 L-cfg reg로부터 CO id, PO id, LO id 를 읽어서 도 6과 같은 구조의 입력 데이터를 구성할 수 있다. 또한 아비터는 컨벌루션 블록(540)의 프로세스 앨리먼트 PE들이 입력 데이터들을 계산할 때, 해당하는 입력 데이터의 제로 플래그 ZF를 제공하여 레이턴시를 줄일 수 있다. The arbiter of the CNN control unit 500 can store the input data having the structure as shown in FIG. 6 up to the last address of the CI reg, and then continue to store the CI reg area already processed from the beginning. The size of the CI reg can be determined considering the external interface bandwidth of the external interface and the bandwidth of the CNN device (bandwidth of the deep learning accelerator hardware). The arbiter reads the CO id, PO id, and LO id from the L-cfg reg to construct the input data of the structure shown in FIG. Also, the arbiter may reduce the latency by providing the zero flag ZF of the corresponding input data when the process element PEs of the convolution block 540 calculate the input data.

CNN 장치는 특징 추출 레이어에서 컨벌루션 연산된 데이터를 이용하여 풀링 동작을 수행할 수 있다. 컨벌루션 출력을 이용하여 풀링 동작을 수행할 때, 풀링 입력(pooling input(convolution output))의 전체를 기다렸다가 풀링 동작을 수행하는 방법은 많은 시간을 소모할 수 있다. CNN 장치(채널 세트)는 두 개 이상의 풀링 입력(pooling input(convolution output))만 존재하면 두 값을 이용해 미리 풀링 동작(pooling operation)을 수행하면 전체 feature layer계산을 더 빨리 완료할 수 있다. 본 발명의 다양한 실시예들에 따른 CNN 장치(채널 세트)는 두개 이상의 풀링 입력들이 존재하면, 컨벌루션 동작의 완료 여부에 상관없이 풀링 동작을 수행할 수 있다. 이를 위하여, 본 발명의 다양한 실시예들에 따른 CNN 장치(채널 세트)는 하나의 풀링 입력에 관여하는 컨벌루션 입력 연산자(onvolution input operand)에 해당하는 입력 데이터들을 먼저 계산할 수 있다. The CNN apparatus can perform the pulling operation using the convolution computed data in the feature extraction layer. When performing the pulling operation using the convolution output, a method of waiting for the entire pooling input (convolution output) and performing the pulling operation may take a lot of time. If a CNN device (channel set) has two or more pooling inputs (a convolution output), performing a pooling operation in advance with two values can complete the entire feature layer calculation more quickly. A CNN device (channel set) according to various embodiments of the present invention may perform a pulling operation regardless of whether or not the convolution operation is completed, if at least two pulling inputs are present. To this end, a CNN device (channel set) according to various embodiments of the present invention may first calculate input data corresponding to an onvolution input operand involved in one pulling input.

필요한 입력 데이터를 먼저 계산하기 위하여, CNN 제어부(500)의 아비터는 정보 처리부(510)의 어드레스 맵 레지스터(511)의 CI re-map addr map을 참조하여 필요한 입력 데이터를 출력부(560)의 LO reg에서 리드하여 CI_reg에 입력 데이터로 저장할 수 있다. 어드레스 맵 레지스터(511)의 CI re-map addr map은 상기한 바와 같이 초기 상태에서 호스트로부터 계산된 값을 수신하여 저장할 수 있으며, 어드래스 맵은 각 layer마다 각각 존재할 수 있다. 어드레스 맵을 구성하는 방법은 상기 <수학식 1> 및 <수학식 2>를 참조할 수 있다. The arbiter of the CNN control unit 500 refers to the CI re-map addr map of the address map register 511 of the information processing unit 510 and outputs necessary input data to the LO unit 560 of the output unit 560 You can read from reg and save it as input data in CI_reg. The CI re-map addr map of the address map register 511 can receive and store the values calculated from the host in the initial state as described above, and the arbitration map can exist for each layer. The address map may be constructed by referring to Equation (1) and Equation (2).

CNN 제어부(500)의 아비터는 랩퍼(570)을 통해 CI reg의 입력 어드레스를 어드레스 맵 레지스터에 출력하고, 어드레스 맵 레지스터(511)에서 리드되는 값을 해당 CI reg의 어드레스가 가리키는 CI reg에 저장할 수 있다. CNN 제어부(500)는 CIreg의 어드레스에 해당하는 입력 어드레스가 없으면, 제로 플래그 ZF를 1로 설정할 수 있다. 제로 플래그 ZF가 1로 설정되는 어드레스는 제로 패딩(CNN의 data pre-processing의 zero padding)에 해당될 수 있다. 예를들면, The arbiter of the CNN control unit 500 outputs the input address of the CI reg to the address map register through the wrapper 570 and stores the value read from the address map register 511 in the CI reg indicated by the address of the corresponding CI reg have. The CNN control unit 500 can set the zero flag ZF to 1 if there is no input address corresponding to the address of CIreg. An address where the zero flag ZF is set to one may correspond to zero padding (zero padding of CNN's data pre-processing). For example,

예를들면, 입력 데이터, 컨벌루션 파라미터, 풀 파라미터가 하기와 같은 조건을 가지면, 하기 <표 4>와 같은 맵으로 표현될 수 있다. For example, if the input data, the convolution parameter, and the full parameter have the following conditions, they can be represented by a map as shown in Table 4 below.

input data; W=3, H=3, D=3, CH=3. input data; W = 3, H = 3, D = 3, CH = 3.

first layer parameter convolution: Cx=Cy=D=3, Zx=Zy=Sx=Sy=1, K=2First layer parameter convolution: Cx = Cy = D = 3, Zx = Zy = Sx = Sy = 1, K = 2

first layer parameter pool; Px=Py=2, Sx=Sy=1first layer parameter pool; Px = Py = 2, Sx = Sy = 1

    

CI reg addrCI reg addr ZP reg addrZP reg addr input addrinput addr 00 00 1One 1One 22 22 33 55 44 66 00 55 77 66 1010 77 1111 33 88 1212 44 99 2525 1010 2626 1111 2727 1212 3030 1313 3131 99 1414 3232 1010 1515 3535 1616 3636 1212 1717 3737 1313 1818 5050 -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-

입력부(530)의 CI reg에 입력 데이터가 저장되면, 컨벌루션 블록(540)은 컨벌루션 동작을 수행할 수 있다. 컨벌루션 블록(540)은 PE 제어부(543), 복수의 프로세스 앨리먼트부(process element block, PE부)(545), 복수의 가산기들(ADD block)(547) 및 어큐물레이터(accumulator(ACC))(547)을 포함할 수 있다. 컨벌루션 블록(540)은 CI reg에 저장된 입력 데이터와 Weight reg(512)에 저장된 웨이트 데이터를 수신할 수 있으며, 컨벌루션 연산된 출력 데이터를 풀링 블록(550)에 출력할 수 있다. When the input data is stored in the CI reg of the input unit 530, the convolution block 540 may perform a convolution operation. The convolution block 540 includes a PE control unit 543, a plurality of process element blocks (PE units) 545, a plurality of adders (ADD blocks) 547, and an accumulator (ACC) (547). The convolution block 540 may receive the input data stored in the CI reg and the weight data stored in the weight reg 512 and may output the convolution computed output data to the pulling block 550.

도 7은 본 발명의 다양한 실시예에 따른 컨벌루션 블록의 구성을 도시하는 도면이다. 도 8a 및 도 8b는 본 발명의 다양한 실시예들에 따른 컨벌루션 블록의 프로세스 앨리먼트의 구성을 도시하는 도면이다. 도 9a ? 도 9c는 컨벌루션 블록의 입력 데이터 세트, 웨이트 데이터 세트 및 출력 데이터 세트의 구조를 도시하는 도면이다. 7 is a diagram showing a configuration of a convolution block according to various embodiments of the present invention. 8A and 8B are diagrams showing a configuration of a process element of a convolution block according to various embodiments of the present invention. 9a? 9C is a diagram showing a structure of an input data set, a weight data set, and an output data set of a convolution block.

도 7을 참조하면, 컨벌루션 블록(convolution block)(540)은 PE 제어부(543), 복수의 프로세스 앨리먼트들을 구성되는 PE부(545) 복수의 가산기들로 구성되는 가산부(547) 및 어큐물레이터(549)를 포함할 수 있다. 7, a convolution block 540 includes a PE control unit 543, a PE unit 545 constituting a plurality of process elements, an addition unit 547 including a plurality of adders, 549 &lt; / RTI &gt;

PE부(545)의 각 PE들은 각각 입력되는 입력 데이터 및 웨이트 데이터를 곱셈 연산(multiply)하는 동작을 수행할 수 있다. PE 제어부(543)는 PE부(545)가 컨벌루션의 곱셉 연산을 수행할 수 있도록 CI reg 및 weight reg(512)로부터 각각 입력 데이터 및 웨이트 데이터를 PE(545에 입력시킬 수 있다. PE 제어부(543)는 weight reg(512)에서 웨이트 데이터를 프리페치(pre-fetch)하여 웨이트 데이터를 리드하는 시간을 절약할 수 있다. 본 발명의 다양한 실시예들에 따른 CNN 장치의 PE 제어부(543)은 start layer cnt / end layer cnt(502)를 참조하여 weight reg(512)에서 웨이트 데이터를 프리페치할 수 있다. 예를들면, start layer counter가 1이고, end layer counter가 3이면, PE 제어부(543)은 weight reg(512)에서 layer 1 - layer 3의 웨이트 데이터 세트를 프리페치할 수 있다. PE 제어부(543)는 프리페치한 웨이트 데이트 세트 중에서 입력 데이터의 L_id 에 해당하는 웨이트 데이터를 PE부(545)에 입력시킬 수 있다. Each of the PEs of the PE unit 545 may perform an operation of multiplying input data and weight data, which are input, respectively. The PE control unit 543 can input the input data and the weight data respectively to the PE 545 from the CI reg and the weight reg 512 so that the PE unit 545 can perform the multiply operation of the convolution. May save time to read weight data by pre-fetching weight data in a weight reg 512. The PE control unit 543 of the CNN apparatus according to various embodiments of the present invention may start For example, if the start layer counter is 1 and the end layer counter is 3, the PE control unit 543 may prefetch the weight data in the weight reg 512 by referring to the layer cnt / end layer cnt 502. For example, May prefetch the weight data set of layer 1 - layer 3 in the weight reg 512. The PE control unit 543 transmits weight data corresponding to the L_id of the input data among the prefetched weight data sets to the PE unit 545 .

PE 제어부(543)는 CI reg의 입력 데이터와 해당 layer의 weight reg(512)의 웨이트 데이터를 각각 계산 할 준비가 된 PE부(545)에 입력시킬 수 있다. 입력 데이터 및 웨이트 데이터를 입력하는 각 PE부(545)의 곱셈 연산(multiply operation)은 각각 다른 동작 시간을 가질 수 있다. CI reg에 하나 이상의 입력 데이터가 존재하고, PE부(545)에서 계산할 수 있는 PE가 있으면, PE 제어부(543)는 해당하는 입력 데이터 및 웨이트 데이터를 PE부(545)에서 준비된 PE에 입력시킬 수 있다. PE부(545)가 준비상태가 되면(이전 입력 데이터 및 웨이트 데이터의 곱셈 계산이 끝나면), PE 제어부(543)는 해당 PE에 다음 입력 데이터 및 웨이트 데이터를 입력하고, CI reg와 Weight reg(512)의 리드 포인터(read pointer)를 1 증가시킬 수 있다. 또한 웨이트 데이터가 0이면, PE 제어부(543)는 제로 플래그 ZF를 1로 설정할 수 있다. The PE control unit 543 can input the input data of the CI reg and the weight data of the weight reg 512 of the corresponding layer to the PE unit 545 which is ready for calculation. The multiply operations of each PE unit 545 that inputs input data and weight data may have different operation times. If there is more than one input data in the CI reg and there is a PE that can be calculated by the PE unit 545, the PE control unit 543 can input the corresponding input data and weight data to the prepared PE in the PE unit 545 have. The PE control unit 543 inputs the next input data and weight data to the corresponding PE and outputs the CI reg and the weight reg 512 Can be increased by one. If the weight data is 0, the PE control unit 543 can set the zero flag ZF to 1.

PE 제어부(543)는 곱셈 연산이 종료된 PE에 CI reg의 도 6과 같은 구조를 가지는 입력 데이터를 입력시킬 수 있으며, 컨볼루션 블록(543)는 CO id를 가진 입력 데이터들의 연산동작을 처리할 수 있다. 즉, 컨볼루션 블록(540)의 출력은 같은 CO id를 가진 입력 데이터들의 곱셈 결과값들이 모두 더한 것이 될 수 있다. PE 제어부(543)는 L cfg reg(513)의 레이어 컨피겨레이션 정보를 확인하여 웨이트 데이터를 생성 및 PE부(545)에 입력시킬 수 있다. PE 제어부(543)는 start~end layer count(502)의 값을 및 해당 L cfg reg(513)의 레이어 컨피겨레이션 정보를 확인한 후, weight reg(512)에서 해당하는 웨이트 데이터 세트를 프리페치하여 웨이트 데이터의 리드 시간을 감축할 수 있다. K_id 는 웨이트 세트 번호(weight set number)를 나타내며, 각 채널 세트(520)가 다음 레이어의 동작(layer operation)의 수행 여부를 판단하는 데에 사용될 수 있다. The PE control unit 543 can input the input data having the structure of the CI reg of FIG. 6 to the PE for which the multiplication operation has been completed, and the convolution block 543 processes the operation operation of the input data having the CO id . That is, the output of the convolution block 540 may be the sum of the multiplication result of the input data having the same CO id. The PE control unit 543 can check the layer configuration information of the L cfg reg 513 and input the generated weight data to the PE unit 545. [ The PE control unit 543 confirms the value of the start to end layer count 502 and the layer configuration information of the corresponding L cfg reg 513 and then prefetches the corresponding weight data set in the weight reg 512 The lead time of the weight data can be reduced. K_id represents a weight set number, and each channel set 520 can be used to determine whether to perform a layer operation of the next layer.

PE부(545)는 PE 제어부(543)에 의해 입력되는 입력 데이터 및 웨이트 데이터를 곱셈 연산할 수 있다. 가산부(547)는 PE부(545)에서 출력되는 컨벌루션 곱셈 동작의 결과값을 가산할 수 있다. 어큐물레이터(549)는 모든 컨벌루션 곱셈의 결과 값이 더해지도록 가산된 가산부(547)의 출력을 누적할 수 있다. 어큐물레이터(549)는 모든 각 컨벌루현 곱셈 결과 값이 누적되면, 누적된 결과 값을 풀링 블록(550)의 출력할 수 있다.The PE unit 545 can multiply input data and weight data input by the PE control unit 543. The addition unit 547 may add the result of the convolution operation output from the PE unit 545. [ The accumulator 549 may accumulate the output of the adder 547 added so that the results of all convolutional multiplications are added. The accumulator 549 may output the accumulation result to the pooling block 550 when all the convolution multiplication results are accumulated.

도 8a를 참조하면, 컨벌루션 블록(540)은 도 9a의 911과 같은 입력 데이터 세트 및 913과 같은 웨이트 데이터 세트를 입력하여 컨벌루션 레이어 오퍼레이션을 수행할 수 있다. 입력 데이터 세트는 입력 데이터, 제로 플래그 ZF, CO id(convolution output ID, PI id(pooling input ID)), PO id(pooling output id) L id(layer)을 포함하는 데이터 세트가 될 수 있다. 웨이트 데이터 세트는 웨이트 데이터, 제로 플래그 ZF 및 K id(kernel id)를 포함하는 데이터 세트가 될 수 있다. 곱셈기(810)는 도 9a의 911의 입력 데이터 및 도 9a의 913의 웨이트 데이터를 곱셈할 수 있다. 논리합 게이트(820)은 도 9a의 911과 같은 구조를 가지는 입력 데이터 세트에 포함된 제로 플래그 및 도 9a의 913과 같은 구조를 가지는 웨이트 데이터 세트에 포함된 제로 플래그를 논리합 연산할 수 있다. 선택기(830)는 곱셈기(810)의 출력을 제1 입력하고 접지(제로)신호를 제2 입력하며, 게이트(820)의 출력에 의해 제1 입력 또는 제2 입력을 선택하여 출력할 수 있다. PE부(545)의 각 PE들은 입력 데이터의 포인트 수에 대응되는 곰셈기(810)을 포함할 수 있다. 예를들면, PE는 16bit or 32bit / floating or fixed point multiplier가 될 수 있다. 각 PE들은 PE 제어부(543)의 제어 하에 도 9a에 도시된 바와 같은 입력 데이터 및 웨이트 데이터를 입력할 수 있으며, 곱셈기(810)은 입력된 두 데이터들을 컨벌루션 곱셈할 수 있다. 곱셈기(810)의 출력은 선택기(830)의 제1 입력이 될 수 있다. 게이트(820)는 도 9a의 911과 같은 입력 데이터 및 도 9a의 913과 같은 웨이트 데이터에 포함된 제로 플래그 ZF를 논리합 연산할 수 있다. 따라서 선택기(830)는 입력 데이터 또는 웨이트 데이터에 포함된 제로 플래그 신호들 중에서 어느 하나라도 제로 플래그 ZF가 세트된 상태이면, 제2 입력을 선택 출력할 수 있다. 즉, 선택기(830)는 입력 데이터 및 웨이트 데이터의 제로 플래그 ZF가 모두 세트되지 않은 경우, 상기 곱셈기(810)의 출력을 선택할 수 있다. 선택기(830)을 출력하는 PE의 출력 데이터 세트 구조는 도 9a의 915와 같은 구조를 가질 수 있다. PE의 출력 데이터 세트(result data set)는 결과 데이터(result), 제로 플래그 ZF, CO id, PO id, L id, K id로 구성되는 데이터 세트가 돌 수 있다.Referring to FIG. 8A, convolution block 540 may perform convolution layer operations by inputting a set of input data such as 911 of FIG. 9A and a weight data set such as 913. The input data set may be a data set comprising input data, a zero flag ZF, a COID (convolution output ID), a PI id (pooling input ID), and a PO id (pooling output id) L id (layer). The weight data set may be a data set comprising weight data, zero flags ZF and Kid (kernel id). The multiplier 810 may multiply the input data of 911 of FIG. 9A and the weight data of 913 of FIG. 9A. The OR gate 820 can perform the logical sum operation on the zero flag included in the input data set having the structure like 911 of FIG. 9A and the zero flag included in the weight data set having the structure like 913 of FIG. 9A. The selector 830 inputs a first input of an output of the multiplier 810 and a second input of a ground (zero) signal. The selector 830 selects and outputs the first input or the second input by the output of the gate 820. Each PE of the PE portion 545 may include a bead generator 810 corresponding to the number of points of the input data. For example, a PE can be a 16bit or 32bit / floating or fixed point multiplier. Each PE can input the input data and the weight data as shown in FIG. 9A under the control of the PE control unit 543, and the multiplier 810 can perform convolutional multiplication of the two input data. The output of the multiplier 810 may be the first input of the selector 830. The gate 820 can perform the logical sum operation on the input data such as 911 in Fig. 9A and the zero flag ZF included in the weight data as 913 in Fig. 9A. Therefore, the selector 830 can selectively output the second input if any one of the zero flag signals included in the input data or the weight data is set to the zero flag ZF. That is, the selector 830 can select the output of the multiplier 810 if the zero flag ZF of the input data and weight data is not all set. The output data set structure of the PE outputting the selector 830 may have the structure as shown in 915 of FIG. 9A. The PE's result data set may be a data set consisting of the result data, the zero flag ZF, CO id, PO id, L id, K id.

도 8b를 참조하면, PE부(545)의 각 PE들은 클래시피케이션 레이어의 연결 레이어 오퍼레이션(fully connected layer operation)에서 드롭 아웃 신호에 의해 제로 데이터를 출력할 수 있다. 곱셈기(810)은 입력된 두 데이터(입력 데이터 및 웨이트 데이터)들을 컨벌루션 곱셈할 수 있다. 게이트(840)는 도 9a의 911과 같은 입력 데이터 세트 및 도 9a의 913과 같은 웨이트 데이터 세트에 포함된 제로 플래그 ZF와 드롭 아웃 신호를 논리합 연산할 수 있다. 드롭 아웃 신호는 클래시피케이션 동작에서 설정된 PE들의 동작을 드롭하기 위한 신호가 될 수 있으며, 정보 처리부(510)의 드롭 아웃 발생기(515)의 출력을 참조할 수 있다. 따라서 선택기(830)는 입력 데이터 또는 웨이트 데이터에 포함된 제로 플래그 신호들 중에서 어느 하나라도 제로 플래그 ZF가 세트된 상태이거나, 또는 드롭 아웃 신호가 세트 상태이면, 제2 입력을 선택 출력할 수 있다. 즉, 선택기(830)는 입력 데이터 및 웨이트 데이터의 제로 플래그 ZF가 모두 세트되지 않은 경우 및 드롭 아웃 신호가 세트되지 않은 상태이면, 상기 곱셈기(810)의 출력을 선택할 수 있다. Referring to FIG. 8B, each PE of the PE unit 545 can output zero data by a dropout signal in a fully connected layer operation of a classification layer. The multiplier 810 may multiply the input data (input data and weight data) by convolution. The gate 840 may perform an OR operation on the input data set such as 911 of FIG. 9A and the zero flag ZF included in the weight data set as 913 of FIG. 9A and the dropout signal. The dropout signal may be a signal for dropping the operation of the PEs set in the classification operation, and may refer to the output of the dropout generator 515 of the information processing unit 510. Therefore, the selector 830 can selectively output the second input if either the zero flag ZF is set in the input data or the zero flag signal included in the weight data, or the dropout signal is set. That is, the selector 830 can select the output of the multiplier 810 when neither the zero flag ZF of the input data and the weight data is set, and the dropout signal is not set.

본 발명의 다양한 실시예에 따른 CNN 장치는 입력 데이터 또는 웨이트 데이터의 제로 플래그 ZF가 1이면, 연산된 결과 값(result data packet)의 ZF를 0으로 설정하여 다음 단계로 넘겨줄 수 있다. CNN 일고리듬의 데이터(operand data)가 0인 경우가 많기 때문에, 컨벌루션 블록(540)은 ZF만 확인하고 계산을 하지 않을 수 있으며, 이로인해 컨벌루션 계산속도를 향상시킬 수 있다. 또한 컨벌루션 블록(540)은 드롭 아웃 신호가 세트된 상태이면, 컨벌루션 연산 동작을 수행하지 않을 수 있다. The CNN apparatus according to various embodiments of the present invention may set the ZF of the result data packet to 0 and pass it to the next step if the ZF flag ZF of the input data or weight data is 1. Since the CNN neuron's operand data is often zero, the convolution block 540 may only check ZF and not perform calculations, thereby improving the speed of convolution calculation. Also, the convolution block 540 may not perform the convolution operation if the dropout signal is set.

PE부(545)의 각 PE들은 도 9a의 915와 같은 구조를 가지는 출력 데이터(result data packet)의 K id에 도 9a의 913과 같은 웨이트 데이터의 K id를 삽입할 수 있다. PE부(545)의 각 PE들에서 계산된 출력 데이터는 가산부(547)로 전송될 수 있다. 최소 2개 이상의 PE 결과 값이 가산부(547)의 하나의 가산기에 전송될 수 있다. 각 데이터(operand data set)의 특징(feature) 값들 중 필요한 값들은 결과 데이터(result data set)로 저장되어 가산부(547)에 전송될 수 있다. Each PE of the PE unit 545 may insert the K id of the weight data as 913 of FIG. 9A into the K id of the result data packet having the structure of 915 of FIG. 9A. The output data calculated at each of the PEs of the PE unit 545 may be transmitted to the adding unit 547. [ At least two PE result values may be sent to one adder of the adder 547. [ The necessary values among the feature values of the operand data sets may be stored as result data sets and transmitted to the adder 547. [

가산부(547)는 복수의 가산기(예를들면, 16bit or 32bit / floating or fixed point adder)들로 구성될 수 있다. 가산부(547)는 PE부(545)의 PE들에서 계산된 2개 이상의 곱셈 결과 값을 입력하여 가산하는 동작을 수행할 수 있다. 예를들면, 가산부(547)의 각 가산기들은 PE부(545)에서 출력되는 도 9b의 931과 같은 제1 결과 데이터 세트 및 933과 같은 제2 결과 데이터 세트들을 가산하여 935와 같은 가산 결과 데이터를 출력할 수 있다. 도 9b의 931 및 933과 같은 제1 및 제2 결과 데이터 세트의 구조는 도 9a의 915와 같은 데이터 세트 구조와 동일할 수 있다. 이때 가산기의 입력데이터(operand(PE result data), 예를들면 931과 같은 PE 결과 값 A)의 제로 플래그 세트(ZF=1) 상태이면, 제로 플래그가 세트되지 않은 다른 입력 데이터(operand, 933과 같은 PE 결과 값 B)를 그대로 가산 결과값으로 출력할 수 있다. 도 9b의 931 및 933과 같은 두 데이터(operand)의 제로 플래그 모두 세트 상태이면, 가산기는 935와 같은 결과 값(result data set)에 특징 정보(feature bit값)들을 저장하고 다음 블록(ADD or ACC)으로 출력할 수 있다. The adder 547 may be composed of a plurality of adders (for example, 16 bits or 32 bits / floating or fixed point adders). The addition unit 547 can perform an operation of inputting and adding two or more multiplication result values calculated by the PEs of the PE unit 545. For example, each adder of the adder 547 adds the first result data set, such as 931 of FIG. 9B and the second result data sets, such as 933, output from the PE unit 545, Can be output. The structure of the first and second result data sets, such as 931 and 933 of FIG. 9B, may be the same as the data set structure 915 of FIG. 9A. At this time, if the zero flag set (ZF = 1) state of the adder input data (PE result data, for example, PE result data A 931) The same PE result value B) can be directly output as an addition result value. 9B and 933, the adder stores feature information (feature bit values) in a result data set such as 935, and the next block (ADD or ACC ).

가산부(547)의 각 가산기들은 같은 CO id에 해당하는 데이터들을 가산할 수 있다. 즉, 가산부(547)의 가산기들에 입력되는 데이터(PE 출력 데이터)들은 931 및 933과 같은 구조를 가질 수 있으며, 가산기들은 PE 출력 데이터들 중에서 CO id가 같은 두 데이터들을 입력하여 가산할 수 있다. 이때 두 데이터(operand)의 CO id가 같지 않으면, 가산기들은 가산 동작을 수행하지 않고 두 데이터들을 그대로 넘겨줄 수 있다. Each adder of the adder 547 can add data corresponding to the same CO id. That is, the data (PE output data) input to the adders of the adder 547 may have the same structure as 931 and 933, and the adders can input and add two data having the same CO id among the PE output data have. At this time, if the CO id of the two data operands is not the same, the adders can pass the two data as they are without performing the add operation.

같은 CO id끼리 가산 동작을 수행할 때 마다 컨벌루션 블록(540)은 정보 처리부(510)의 CO id에 해당하는 CI data count(503)을 1증가시킬 수 있다. CI data count는 Cx*Cy*D까지 증가할 수 있다. (정보 처리부의 각 카운트들에 대한 정보는 상기 <표 2>에 표시되어 있으며, 각 카운터들의 최대값은 L-cfg reg에 저장될 수 있다. 가산부(547)의 각 가산기들은 두 개의 입력을 가산할 수 있다. 따라서 가산기들은 다단의 가산기(ADD block layer)들로 구성되어 첫 단의 가산기들은 PE부(545)에서 출력되는 두 개의 데이터들을 입력하여 가산하고, 2번째 단 이후의 가산기들은 이전 단의 두개 가산기들에서 출력되는 데이터들을 가산할 수 있는 구조를 가질 수 있다. 그러므로 ADD block layer를 지나면 지날 수록 ADD operand로 받을 수 있는 최대 개수가 증가할 수 있으며, 가산기들은 이 중에서 CO id가 같은 것들끼리만 더해주고, 다른 것들은 모두 다음 ADD block layer로 넘겨줄 수 있다.The convolution block 540 increments the CI data count 503 corresponding to the CO id of the information processing unit 510 by one every time the same CO id operation is performed. CI data count can be increased to Cx * Cy * D. (The information on each count of the information processing unit is shown in Table 2, and the maximum value of each counter can be stored in L-cfg reg. Each adder of the adder 547 adds two inputs ADD block layers. The adders of the first stage receive and add the two data output from the PE 545, and the adders after the second stage are shifted Therefore, the maximum number of ADD operands that can be received increases with the passage of the ADD block layer, and the adders have the same CO id You can add them to each other and pass all the others to the next ADD block layer.

어큐물레이터(549)는 도 9c의 951 -955와 같은 가산부(547)의 마지막 가산기 레이어의 출력을 누적할 수 있다. 어큐물레이터(549)는 가산부(547)에서 출력되는 데이터의 CO id를 확인하고, CO id 해당하는 CI data count(503)의 값이 max (해당 layer의 Cx*Cy*D)에 도달하면, 도 9c의 961과 같은 해당 데이터를 풀링 블록(550)의 PI reg(555)에 저장할 수 있다. 어큐물레이터(549)는 해당 CI data count(503)의 값이 max값이 아니면, 도 9c의 963과 같은 해당 데이터를 다시 가산부(547)의 마지막 Add layer로 입력시킬 수 있다. 마지막 Add layer는 어큐물레이터(549)로부터 데이터가 입력되었음을 확인하고 가산 동작을 수행할 수 있다. CI data count가 max에 도달하지 않았다는 것은 해당 CO id를 가진 입력 데이터가 아직 계산 중이거나, 입력부(530)의 CI_reg에서 전송이 되지 않았다는 것을 의미할 수 있다. 어큐물레이터(549)에서 풀링 블록(550)으로 result data를 넘겨줄 때, CO id는 더 이상 사용하지 않으므로, 도 9c의 961과 같이 CO id는 제거할 수 있다. The accumulator 549 may accumulate the output of the last adder layer of the adder 547, such as 951-955 in Figure 9c. The accumulator 549 checks the CO id of the data output from the adder 547. When the value of the CI data count 503 corresponding to CO id reaches max (Cx * Cy * D of the corresponding layer) , The corresponding data such as 961 in FIG. 9C may be stored in the PI reg 555 of the pulling block 550. If the value of the corresponding CI data count 503 is not the max value, the accumulator 549 can input the corresponding data as 963 in FIG. 9C to the last Add layer of the adder 547 again. The last Add layer can confirm that the data has been input from the accumulator 549 and perform the add operation. The fact that the CI data count has not reached max may mean that the input data with the corresponding CO id is still being calculated or not transmitted in the CI_reg of the input unit 530. When the result data is passed from the accumulator 549 to the pooling block 550, the CO id is no longer used, so that CO id can be removed as shown at 961 in FIG. 9C.

도 10은 본 발명의 다양한 실시예에 따른 CNN 장치에서 풀링 오퍼레이션의 입력 데이터 구조를 도시하는 도면이다. 풀링 오퍼레이션의 입력 데이터는 도 9c의 961과 같은 컨벌루션 블록의 출력 데이터가 될 수 있다. 도 11은 본 발명의 다양한 실시예에 따른 CNN 장치에서 풀링 블록의 출력 데이터 및 액티베이션된 데이터의 구조를 도시하는 도면이다.10 is a diagram showing an input data structure of a pulling operation in a CNN apparatus according to various embodiments of the present invention. The input data of the pulling operation may be the output data of the convolution block such as 961 of FIG. 9C. 11 is a diagram showing the structure of output data and activated data of a pulling block in a CNN apparatus according to various embodiments of the present invention.

도 10과 같은 컨벌루션 연산된 결과 데이터들은 풀링 블록(550)의 풀링 입력 레지스터(pooling input register block, 이하 PI reg라 칭함)에 순서대로 저장될 수 있다. 풀링 실행부(553)는 PI reg(555)에 2개 이상의 데이터(컨벌루션 연산된 data)가 저장되면, PO id를 확인하여 동일한 PO id를 가지는 데이터들의 풀링 오퍼레이션(pooling operation))을 수행할 수 있다. 풀링 블록(550)는 풀링 오퍼레이션을 수행할 할 값이 모두 들어오지 않아도, 같은 PO id를 가진 결과 값이 2개 이상이면(즉, PI reg에 같은 PO id를 가지는 값이 두개 이상이면) 바로 풀링 오퍼레이션을 수행할 수 있으며, 이로인해 레이턴시(pooling operation latency)를 줄일 수 있다.The convolution result data as shown in FIG. 10 may be sequentially stored in a pooling input register block (hereinafter referred to as PI reg) of the pulling block 550. When two or more pieces of data (convoluted data) are stored in the PI reg 555, the pulling execution unit 553 can perform a pooling operation of data having the same PO id by checking the PO id have. If there are two or more result values having the same PO id (that is, if there are two or more values having the same PO id in the PI reg), the pooling block 550 may perform a pooling operation , Which can reduce the latency of the pooling operation.

Pooling operation을 수행할 때, 풀링 블록(550)는 PO id값을 확인하여 해당 PI data count(506)의 값을 1 증가시킬 수 있다. PI data count의 max값은 상기 <표 2>에 나타낸 바와 같이 Px*Py가 될 수 있다. 풀링 블록(550)의 풀링 오퍼레이션은 두 입력들 중에서 최대값을 가지는 입력을 선택하거나 또는 두 입력들의 평균 값을 구하는 방법을 사용할 수 있다. 최대 값을 선택하는 방법(max pooling)인 경우, 풀링 블록(550)는 2개의 데이터들만 있으면 큰 값을 선택하여 다시 PI reg(555)에 저장하고 작은 값은 버릴 수 있다. 평균 값을 구하는 방법(average pooling)인 경우, 풀링 블록은 2개의 값의 평균을 계산하여 다시 PI reg(555)에 저장할 수 있다.When performing the pooling operation, the pooling block 550 may increase the value of the PI data count 506 by 1 by checking the PO id value. The max value of the PI data count may be Px * Py as shown in Table 2 above. The pulling operation of the pulling block 550 may use an input having a maximum value among the two inputs or a method of obtaining an average value of the two inputs. In the case of a max pooling method, the pooling block 550 may select a larger value and store it again in the PI reg 555 and discard the smaller value if only two data are available. In the case of average pooling, the pooling block may average the two values and store them again in the PI reg (555).

풀링 블록(550)은 도 10과 같은 구조를 가지는 풀링 입력 데이터에서 제로 플래그 ZF를 활용하여 빠르게 풀링 오퍼레이션을 수행할 수 있다. 풀링 오퍼레이션을 수행한 후, 풀링 블록(550)은 해당 PO id의 PI data count(506)의 값을 확인하며, PI data conut(506)의 값이 max값(Px*Py)에 도달하면 풀링 오퍼페이션의 결과 값을 출력부(560)의 LO reg에 출력할 수 있다. 풀링 블록(550)은 풀링 오퍼레이션 결과 값을 출력부(560)의 LO reg에 출력할 때 POid의 순서에 맞게 출력할 수 있으며, 전송할 데이터 구조에서 PO id는 더 이상 필요 없으므로 도 10의 1111과 같이 제거할 수 있다. POid의 PI data count(506)의 값이 max값에 도달하지 않았을 경우, 풀링 블록(550)은 풀링 오퍼레이션의 결과 값을 다시 PI reg(555)에 저장하고, 동일한 PO id의 data가 들어올 때까지 대기할 수 있다.The pulling block 550 can perform the quick pulling operation by utilizing the zero flag ZF in the pooling input data having the structure as shown in FIG. After performing the pooling operation, the pooling block 550 checks the value of the PI data count 506 of the corresponding PO id, and when the value of the PI data conut 506 reaches the max value (Px * Py) The output value of the output unit 560 can be output to the LO reg of the output unit 560. The pulling block 550 can output the pooling operation result value to the LO reg of the output unit 560 in accordance with the order of the POid. Since the PO id is no longer needed in the data structure to be transmitted, Can be removed. If the value of the PI data count 506 of POid has not reached the max value, the pooling block 550 stores the result of the pooling operation again in the PI reg 555, and until the data of the same PO id is received You can wait.

풀링 블록(550)에서 풀링 오퍼레이션이 종료된 데이터들은 출력부(560)의 레이어 출력 레지스터(layer output register, 이하 LO reg라 칭함)에 저장될 수 있다. The data for which the pulling operation has been completed in the pulling block 550 may be stored in a layer output register (hereinafter referred to as LO reg) of the output unit 560.

LO reg의 데이터들은 액티베이션 펑션을 수행하여 저장될 수 있다. 액티베이션 펑션은 정보처리부(514)의 룩업 테이블(activation function LUT)(514)을 참조하거나, 직접 액티베이션 펑션을 수행하여 계산될 수 있다. 출력부(560)는 LO reg에 저장되는 도 11의 1111과 같은 데이터의 Lid를 확인하고, 결과값이 들어올 때마다 정보 처리부(510)의 해당하는 LO data count(514)를 1 증가시킬 수 있다. LO data count(504)의 카운트 값이 최대값이 되면, 해당 값들은 다음 레이어의 입력 데이터로 사용될 수 있다. CNN 제어부(500)은 LO data count(504)의 카운트 값이 최대값이 되면, end layer count(502)의 값을 1증가시키고, 출력부(560)의 LO reg의 값을 입력부(530)의 CI reg에 입력 데이터로 저장할 수 있다. 그리고 컨벌루션 블록(540)의 PE 제어부(543)은 end layer count를 확인하고, CI reg에 저장된 입력 데이터를 프리페치할 수 있으며, 또한 정보 처리부(510)의 웨이트 레지스터(512)에서 해당하는 레이어의 웨이트 데이터(weight data set)를 프리페치할 수 있다. 그러나 커널(현재 layer output의 kernel, 다음 layer input의 depth와 같음)은 모두 계산이 되지 않았기 때문에, 컨벌루션 블록(540)의 PE 제어부(543)은 start layer count가 가리키고 있는 웨이트 데이터의 프리페치 값을 제거할 수 없다. 커널 값은 Kid와 정보 처리부(510)의 Kernel count(507)에 의해 확인할 수 있다. LO data count(504)의 최대값은 상기 <표 2>의 레이어 컨피겨레이션 테이블에 표시된 바와 같이 결정할 수 있다. LO data count가 최대값이 아니면, CNN 장치는 아직 계산되지 않은 같은 L id를 가진 결과값이 출력될 때까지 대기할 수 있다. The data of the LO reg can be stored by performing an activation function. The activation function may be calculated by referring to an activation function LUT 514 of the information processing unit 514 or by performing a direct activation function. The output unit 560 may check the Lid of the same data as 1111 of FIG. 11 stored in the LO reg and increase the corresponding LO data count 514 of the information processing unit 510 by 1 every time a result value is received . When the count value of the LO data count 504 reaches the maximum value, the values can be used as input data of the next layer. The CNN control unit 500 increments the value of the end layer count 502 by 1 and sets the value of the LO reg of the output unit 560 to the input value of the input unit 530 when the count value of the LO data count 504 reaches the maximum value It can be saved as input data in CI reg. The PE control unit 543 of the convolution block 540 may check the end layer count and prefetch the input data stored in the CI reg and may also prefetch the input data stored in the weight register 512 of the information processing unit 510 The weight data set can be pre-fetched. However, since all of the kernels (the kernel of the current layer output and the depth of the next layer input) are not calculated, the PE control unit 543 of the convolution block 540 sets the prefetch value of the weight data indicated by the start layer count It can not be removed. The kernel value can be confirmed by Kid and the kernel count 507 of the information processing unit 510. The maximum value of the LO data count 504 can be determined as shown in the layer configuration table in Table 2 above. If the LO data count is not the maximum value, the CNN device can wait until the result with the same L id that has not yet been calculated is output.

채널 세트(520)는 LO reg에 입력되는 데이터의 Kid를 확인하고 Kernel count를 1증가킬 수 있다. K id에 해당하는 Kernel count가 최대값이면, 채널 세트(520)는 더 이상 start layer가 가리키는 layer의 정보는 사용하지 않아도 되므로, start layer가 가리키는 웨이트 데이터를 해제(release)할 수 있다. CNN 제어부(500)의 MMU는 L cfg reg(513)에서 이미 설정된 다음 layer의 컨피겨레이션 값을 참조하여 채널 세트(520)의 동작을 제어할 수 있다. 다음 레이어의 컨피겨레이션을 분석한 결과에 기반하여 CNN 제어부(500)는 아직 계산해야할 layer가 남았으면 어드레스 맵 레지스터(511)에 출력부(560)의 LO reg의 data를 입력하여 다음 입력 데이터를 설정하고, 설정된 입력 데이터를 입력부(520)의 CI reg에 저장할 수 있다. The channel set 520 may check the Kid of the data input to the LO reg and increase the Kernel count by one. If the Kernel count corresponding to K id is the maximum value, the channel set 520 can release the weight data pointed to by the start layer since it no longer needs to use the information of the layer indicated by the start layer. The MMU of the CNN control unit 500 can control the operation of the channel set 520 by referring to the configuration value of the next layer already set in the L cfg reg 513. Based on the result of analyzing the configuration of the next layer, if the layer to be calculated remains, the CNN control unit 500 inputs the data of the LO reg of the output unit 560 to the address map register 511, And stores the set input data in the CI reg of the input unit 520.

LO data count(504)와 Kernel count(507)의 카운트 값이 최대값이 되었다는 것은 컨벌루션 블록(540) 및 풀링 블록(550)에 현재 start layer 및 end layer에 해당하는 어떤 데이터도 남아있지 않음을 의미할 수 있다. 그러므로 CNN 제어부(500) 및 채널 세트(520)는 각각의 경우에 맞춰 start layer를 증가시키고 웨이트 데이터를 해제하고, end layer를 증가시키고 CI reg에 입력 데이터를 저장할 수 있다. The fact that the count values of the LO data count 504 and the kernel count 507 are the maximum values means that no data corresponding to the current start layer and the end layer remains in the convolution block 540 and the pulling block 550 can do. Therefore, the CNN control unit 500 and the channel set 520 can increase the start layer, cancel the weight data, increase the end layer, and store the input data in the CI reg in each case.

그러나 CNN 제어부(500)는 kernel count(507) 및 channel count(501)의 카운트 값이 최대 값이면, CNN 제어부(500)는 특징 추출 레이어의 오퍼레이션을 종료하고 클래피시케이션의 오퍼레이션을 수행할 수 있다. 즉, 클래시피케이션 레이어(classification layer(FC layer))는 kernel count 및 Channel count의 값을 확인하여, 모든 입력 채널들의 계산이 종료되면 시작될 수 있다. 만일, channel count값이 max에 도달하지 않았으면, 다른 채널의 입력 데이터들이 모두 학습될 때까지 대기할 수 있다. 예를들면, CNN 장치가 3개의 채널 세트들을 구비하고, 5개의 채널 데이터들을 학습하는 경우, channel count는 5가 될 수 있다. 이런 경우, 채널 세트들은 3개의 채널 데이터들을 동시에 학습할 수 있다. 이때 3개 채널 데이터들의 학습이 종료되면, channel count 값은 3이 될 수 있으며, 최대값인 5가 될 때까지 특징 추출 레이어의 오퍼레이션을 수행할 수 있다. 즉, 채널 세트의 특징 추출 오퍼레이션이 종료되어도 다음 채널 데이터의 특징 추출 오퍼레이션이 종료되지 않았으면 다른 채널 데이터들의 특징 추출 오퍼레이션이 종료될 때까지(예를들면 (예를들면 3개의 채널 데이터들을 학습한 후 다음 2채널 데이터들이 학습될 때까지, channel count가 5가 될 때까지) 대기할 수 있다.However, if the count values of the kernel count 507 and the channel count 501 are the maximum values, the CNN control unit 500 can terminate the operation of the feature extraction layer and perform the operation of the classification . That is, the classification layer (FC layer) can be started when the calculation of all the input channels is completed by checking the values of the kernel count and the channel count. If the channel count value has not reached max, it can wait until all the input data of the other channel is learned. For example, if the CNN device has three channel sets and learns five channel data, the channel count may be five. In this case, the channel sets can simultaneously learn three channel data. At this time, when the learning of the three channel data ends, the channel count value may be 3 and the operation of the feature extraction layer may be performed until the maximum value is 5. That is, if the feature extraction operation of the channel set is terminated but the feature extraction operation of the next channel data is not terminated, until the feature extraction operation of the other channel data is terminated (for example, Until the next two channel data is learned, until the channel count becomes 5).

도 12는 본 발명의 다양한 실시예에 따른 CNN 장치에서 클래시피케이션 레이어에서 컨벌루션 블록의 입력 및 출력 데이터의 구조를 도시하는 도면이다. 도 13은 본 발명의 다양한 실시예에 따른 CNN 장치에서 레이어 출력 데이터의 구조를 도시하는 도면이다. 클래시피케이션 레이어는 도 1에 도시된 바와 같이 적어도 하나의 연결 레이어 (fully Connected layer(이하 FC layer라 칭함))를 포함할 수 있다.12 is a diagram illustrating a structure of input and output data of a convolution block in a classification layer in a CNN apparatus according to various embodiments of the present invention. 13 is a diagram showing a structure of layer output data in a CNN apparatus according to various embodiments of the present invention. The classification layer may include at least one fully connected layer (hereinafter referred to as FC layer) as shown in FIG.

클래시피케이션 레이어 오퍼레이션에서 CNN 제어부(500)의 아비터는 FC layer를 위한 L-cfg(513) 를 참고하여 입력부(530)의 FCI reg(Fully connected input register)에 도 12와 같은 구조를 가지는 입력 데이터를 저장할 수 있다. 예를들면, Cx=Cy=1, Sx=Sy=1 이면 FC와 동일한 윈도우(window)를 가질 수 있다. FC 레이어의 입력 데이터는 이전의 특징 추출 레이어의 모든 채널 세트의 출력이 될 수 있다. FC 레이어는 모든 특징 추출 레이어의 출력을 계산하기 위하여 하나의 채널 세트에 입력시킬 수 있다. 예를들면, 특징 추출 레이어에서3개 채널 데이터들의 특징을 추출한 경우, FC 레이어에서는 하나의 채널 세트에 3개의 채널 데이터에 특징 추출 레이어의 출력 값들을 입력시킬 수 있다. FC 레이어의 입력 데이터는 입력부(530)에 순차적으로 입력시킬 수 있다. 즉, 특징 추출 레이어의 입력 데이터는 어드레스 맵 레지스터(511)을 참조하여 재구성(remapping)한 후 입력부(530)에 입력하는데 반하여, FC 레이어의 입력 데이터는 순차적으로 입력부(530)에 입력시킬 수 있다. 웨이트 데이터의 수는 채널 세트(520)의 수만큼 등분하여 입력시킬 수 있다. 전체 웨이트 데이터(weight element)의 수는 (입력 데이터 x 출력 데이터)의 수가 될 수 있다. FC 레이어의 K id는 출력 데이터의 수만큼 존재할 수 있다. 각 채널 세트(520)에 Kernel count의 최대 값은 (출력 데이터의 수/CH set)가 될 수 있다. In the classification layer operation, the arbiter of the CNN control unit 500 refers to the L-cfg 513 for the FC layer and inputs the input data having the structure shown in FIG. 12 to the FCI reg (Fully connected input register) of the input unit 530 Can be stored. For example, if Cx = Cy = 1 and Sx = Sy = 1, the same window as the FC can be obtained. The input data of the FC layer may be the output of all channel sets of the previous feature extraction layer. The FC layer can be input to a set of channels to calculate the output of all feature extraction layers. For example, when characteristics of three channel data are extracted from the feature extraction layer, the output values of the feature extraction layer can be input to three channel data in one channel set in the FC layer. The input data of the FC layer can be input to the input unit 530 sequentially. That is, the input data of the feature extraction layer is remapped by referring to the address map register 511, and then inputted to the input unit 530, while the input data of the FC layer can be sequentially input to the input unit 530 . The number of weight data can be input equally by the number of channel sets 520. The total number of weight elements may be (input data x output data). The K id of the FC layer can exist as many as the number of output data. The maximum value of the kernel count in each channel set 520 may be (number of output data / CH set).

FC 레이어에서 컨벌루션 블록(540)은 특징 추출 레이어와는 다르게 CO id의 기능을 K id를 이용하여 수행할 수 있다. PE부(545)는 입력 데이터와 웨이트 데이터를 곱셈 연산하고, 가산부(547)은 곱셈 연산된 데이터들 중에서 같은 K id를 가지는 데이터들을 가산할 수 있다. 가산부(547)는 K id를 확인하고, LI data count(503)의 카운트 값을 증가시킬 수 있다. 어큐물레이터(549)는 입력 데이터의 K id에 해당하는 LI data count(503)의 값이 레이어의 입력 데이터의 수와 같아지면 출력부(550)의 LO reg에 데이터를 저장할 수 있다. FC 레이어에서 풀링 블록(550)은 상기한 바와 같이 동작하지 않을 수 있다. 출력부(500)은 LO reg에 데이터를 저장할 때 K id의 순서에 맞게 저장할 수 있으며, 저장되는 데이터의 K id는 제거될 수 있다. In the FC layer, the convolution block 540 can perform the function of CO id using K id, unlike the feature extraction layer. The PE unit 545 multiplies the input data by the weight data, and the adding unit 547 adds the data having the same K id among the multiplied data. The adding unit 547 can identify the K id and increase the count value of the LI data count 503. [ The accumulator 549 may store the data in the LO reg of the output unit 550 when the value of the LI data count 503 corresponding to the K id of the input data is equal to the number of input data of the layer. In the FC layer, the pooling block 550 may not operate as described above. The output unit 500 can store the data in the LO reg in the order of K id, and the K id of the stored data can be removed.

컨벌루션 블록(540)에서 PE부(545)의 각 PE들은 도 8b와 같은 구성을 가질 수 있다. 곱셈기(810)는 도 12의 1211과 같은 입력 데이터 및 도 12의 1213과 같은 웨이트 데이터를 곱셈할 수 있다. 논리합 게이트(840)은 도 12의 1211과 같은 구조를 가지는 입력 데이터에 포함된 제로 플래그 및 도 12의 1213과 같은 구조를 가지는 웨이트 데이터에 포함된 제로 플래그를 논리합 연산할 수 있다. 선택기(830)는 곱셈기(810)의 출력을 제1 입력하고 접지(제로)신호를 제2 입력하며, 게이트(840)의 출력에 의해 제1 입력 또는 제2 입력을 선택하여 출력할 수 있다. 선택기(830)는 입력 데이터 또는 웨이트 데이터에 포함된 제로 플래그 신호들 중에서 어느 하나라도 제로 플래그 ZF가 세트된 상태이면, 제2 입력을 선택 출력할 수 있다. 즉, 선택기(830)는 입력 데이터 및 웨이트 데이터의 제로 플래그 ZF가 모두 세트되지 않은 경우, 상기 곱셈기(810)의 출력을 선택할 수 있다. 선택기(830)을 출력하는 PE의 출력 데이터 구조는 도 12의 1215와 같은 구조를 가질 수 있다. Each PE of the PE unit 545 in the convolution block 540 may have a configuration as shown in FIG. 8B. The multiplier 810 may multiply the input data such as 1211 in FIG. 12 and the weight data such as 1213 in FIG. The OR gate 840 can perform a logical sum operation on the zero flag included in the input data having the structure as in 1211 of FIG. 12 and the zero flag included in the weight data having the structure as 1213 of FIG. The selector 830 may input a first input of the multiplier 810 and a second input of the ground (zero) signal, and may select and output the first input or the second input by the output of the gate 840. The selector 830 can selectively output the second input if any one of the zero flag signals included in the input data or the weight data is set to the zero flag ZF. That is, the selector 830 can select the output of the multiplier 810 if the zero flag ZF of the input data and weight data is not all set. The output data structure of the PE outputting the selector 830 may have a structure as shown in 1215 of FIG.

CNN 장치는 클래피시케이션 레이어에서 딥 러닝 알고리듬(deep learning algorithm)의 성능을 향상시키기 위한 regularization method중의 하나인 Drop out동작을 수행할 수 있다. 드롭 아웃 기능은 복수의 PE들 중에서 설정된 수의 PE 들의 연산 동작을 드롭아웃시키는 것을 의미할 수 있다. 본 발명의 다양한 실시예에서, 컨벌루션 블록(540)은 컨벌루션 곱셈 연산을 수행하는 PE에 드롭아웃 신호를 인가할 수 있으며, 드롭 아웃 신호를 입력하는 PE는 두 입력 데이터의 연산 동작을 드롭아웃시킬 수 있다. 즉, 드롭아웃 신호를 수신하는 PE는 입력 데이터(operand)가 마치 0인 것처럼(예를들면 ZF=1) 계산하여 결과값을 전송할 수 있다. 드롭 아웃 신호는 정보 처리부(510)의 드롭아웃 발생기(515)에서 생성될 수 있다. PE부(545)의 각 PE가 선정될 확률을 드롭아웃 발생기(515)의 파라미터(parameter)값을 통해 결정될 수 있다. 드롭아웃신호가 입력되면, 해당 PE의 게이트(840)은 드롭아웃 신호를 선택기(830)의 선택신호로 인가할 수 있다. 그러면, 선택기(830)는 그라운드 데이터(제로 데이터)를 선택하여 출력할 수 있다. PE부(545)의 각 PE들은 입력 데이터의 ZF가 세트되거나, 웨이트 데이터의 ZF가 세트되거나 드롭아웃신호가 입력되면 제로 데이터를 선택하여 출력하며, 입력 데이터 및 웨이트 데이터의 ZF가 세트되지 않고, 드롭아웃신호가 입력되지 않은 경우에는 곱셈기(810)의 출력을 선택할 수 있다. The CNN device can perform a drop out operation, which is one of the regularization methods for improving the performance of the deep learning algorithm in the classification layer. The drop-out function may mean dropout of the operation of a set number of PEs among a plurality of PEs. In various embodiments of the present invention, the convolution block 540 may apply a dropout signal to the PE performing the convolutional multiply operation, and the PE inputting the dropout signal may drop out the operation of the two input data have. That is, the PE receiving the dropout signal can calculate the input data (operand) as if it were zero (for example, ZF = 1) and transmit the result value. The dropout signal may be generated in the dropout generator 515 of the information processing unit 510. The probability that each PE of the PE unit 545 is selected may be determined through a parameter value of the drop-out generator 515. [ When the dropout signal is inputted, the gate 840 of the PE can apply the dropout signal to the selector 830 as a selection signal. Then, the selector 830 can select and output the ground data (zero data). Each PE of the PE unit 545 selects and outputs zero data when the ZF of the input data is set, the ZF of the weight data is set or the dropout signal is input, the ZF of the input data and the weight data is not set, When the dropout signal is not inputted, the output of the multiplier 810 can be selected.

컨벌루션 블록(540)에서 출력되는 도 12와 같은 데이터가 출력되면, 출력부(560)의 액티베이션 펑션 오퍼레이션을 수행할 수 있다. 출력부(560)는 컨벌루션 블록(540)의 출력 데이터가 입력될 때마다 L id에 해당하는 LO data count(504) 값을 1증가시킬 수 있다. 그리고 CNN 제어부(500)의 아비터는 LO data count(504)의 값이 최대값layer output 개수)에 도달했을 때 이를 리드할 수 있다. LO data count(504)의 값이 최대 값이 아니면, 출력부(560)는 L id를 가진 데이터가 입력될 때까지 대기할 수 있다. 아비터로 출력될 때, L id는 더 이상 필요 없으므로 제거될 수 있다. 마지막 FC 레이어인 경우에는 Z_F도 제거될 수 있다. 출력부(560)의 LO reg의 출력 데이터 구조는 도 13과 같은 데이터가 될 수 있다. CNN 제어부(500)의 아비터는 각 채널 세트에서 수행된 도 13과 같은 클래시피케이션 레이어의 결과값들을 순서대로 모아서 interface wrapper(570)을 통해 호스트로 출력할 수 있다. When the data as shown in FIG. 12 outputted from the convolution block 540 is outputted, the activation function operation of the output unit 560 can be performed. The output unit 560 may increase the value of the LO data count 504 corresponding to L id by 1 each time the output data of the convolution block 540 is input. And the arbiter of the CNN control unit 500 can read the LO data count 504 when the value of the LO data count 504 reaches the maximum value layer output number). If the value of the LO data count 504 is not the maximum value, the output unit 560 can wait until the data having the L id is input. When output to the arbiter, L id is no longer needed and can be removed. In the case of the last FC layer, Z_F can also be removed. The output data structure of the LO reg of the output unit 560 may be data as shown in FIG. The arbiter of the CNN control unit 500 may collect the result values of the classification layer shown in FIG. 13 performed in each channel set in order and output it to the host through the interface wrapper 570.

도 14는 본 발명의 다양한 실시예에 따른 CNN 시스템의 다른 구성을 도시하는 도면이다.14 is a diagram showing another configuration of a CNN system according to various embodiments of the present invention.

도 14를 참조하면, CNN 시스템은 CNN 제어부(500), 정보 처리부(510), 입력부530), 컨벌루션 블록(540), 풀링 블록(550), 출력부(560), 메모리(1400), 메모리 제어부(1410), PCIe 루트 포인트(PCIe root point)(1420) 및 인터페이스(interface(PCIe) end poing)(1430)을 포함할 수 있다. 14, a CNN system includes a CNN control unit 500, an information processing unit 510, an input unit 530, a convolution block 540, a pulling block 550, an output unit 560, a memory 1400, A PCIe root point 1420, and an interface (PCIe) end poing 1430, as shown in FIG.

메모리(1400)는 딥 러닝 알고리듬을 수행할 데이터들을 저장할 수 있다. 메모리 제어부(580)은 메모리(590)의 리드 및 라이트 동작을 제어할 수 있으며, CNN 장치에 입력 데이터를 제공할 수 있다. 메모리 제어부(1410)는 메모리(1400)의 동작을 제어할 수 있다. 또한 메모리 제어부(1410)는 호스트 장치의 제어부가 될 수 있다. 호스트 장치는 전자장치가 될 수 있다. PCIe 루트 포인트(1420) 및 인터페이스(1430)는 PCIe(peripheral component interconnect express)의 규격을 만족하는 인터페이싱 동작을 수행할 수 있다. PCIe는 입출력을 위한 직렬 구조의 인터페이스로서, 높은 시스템 버스 대역폭, 적은 I/O 핀 수, 적은 물리적 면적, 버스 장치들의 성능 확장성, 상세한 오류 검출 및 보고 구조 등을 가지는 인터페이스가 될 수 있다. PCIe 루트 포인트(1420) 및 인터페이스(1430)는 메모리 제어부(1610)과 CNN 장치 간의 인터페이스 기능을 제공할 수 있다. 예를들면 CNN 장치와 메모리 제어부(580)의 데이터 인터페이스 동작을 수행할 수 있다. 예를들면, 는, 시스템 초기화시 메모리 제어부(580)는 호스트로부터 딥러닝 알고리듬을 수행하기 위한 정보(예를들면, 웨이트 데이터, 어드레스 맵, 레이어 컨피겨레이션 정보, 룩업 테이블 및/또는 드롭아웃 정보)를 PCIe 루트 포인트(1420) 및 인터페이스(1430)를 통해 CNN 장치에 제공할 수 있다. 또한 CNN 장치는 채널 데이터들의 학습 결과를 PCIe 루트 포인트(1420) 및 인터페이스(1430)를 통해 메모리 제어부(1610)에 제공할 수 있다. Memory 1400 may store data for performing a deep-running algorithm. The memory control unit 580 can control the read and write operations of the memory 590 and can provide input data to the CNN apparatus. The memory control unit 1410 can control the operation of the memory 1400. [ The memory control unit 1410 may be a control unit of the host device. The host device may be an electronic device. The PCIe root point 1420 and the interface 1430 may perform an interfacing operation satisfying the specification of peripheral component interconnect express (PCIe). PCIe is a serial interface for input and output and can be an interface with high system bus bandwidth, fewer I / O pins, less physical area, performance scalability of bus devices, detailed error detection and reporting structure. The PCIe root point 1420 and the interface 1430 may provide an interface function between the memory controller 1610 and the CNN device. For example, the data interface operation of the CNN device and the memory control unit 580 can be performed. For example, when the system is initialized, the memory controller 580 stores information (e.g., weight data, address map, layer configuration information, lookup table and / or dropout information May be provided to the CNN device via the PCIe root point 1420 and interface 1430. The CNN device may also provide the learning results of the channel data to the memory controller 1610 via the PCIe root point 1420 and interface 1430.

CNN 장치는 CNN 제어부(500), 정보 처리부(510), 입력부530), 컨벌루션 블록(540), 풀링 블록(550) 및 출력부(560)를 포함할 수 있다. CNN 장치의 구성 및 동작은 상기 도 5의 구성 및 동작과 동일할 수 있다. The CNN apparatus may include a CNN control unit 500, an information processing unit 510, an input unit 530, a convolution block 540, a pooling block 550, and an output unit 560. The configuration and operation of the CNN apparatus may be the same as the configuration and operation of FIG.

본 발명의 다양한 실시예 들에 따른 CNN 장치는 도 3에 도시된 바와 같이 초기화 동작을 수행한 후, 모든 채널들의 입력 데이터들에 대한 특징 추출 레이어 오퍼레이션(feature extraction layer operation)을 수행하고, 특징 추출 레이어 오퍼레이션이 완료되면 클래시피케이션 레이어 오퍼레이션을 수행하며, 클래시피케이션 레이어 오퍼레이션을 완료하면 학습된 결과 값을 호스트에 전송할 수 있다. The CNN apparatus according to various embodiments of the present invention performs an initialization operation as shown in FIG. 3, performs a feature extraction layer operation on input data of all channels, When the layer operation is completed, the operation of the classification layer is performed. When the operation of the classification layer is completed, the learned result value can be transmitted to the host.

도 15a - 도 15c는 본 발명의 다양한 실시예에 따른 CNN 장치의 동작을 도시하는 흐름도이다. 도 15a - 도 15c는 CNN 장치의 CNN 제어부(500)의 동작이 될 수 있다.15A-15C are flow charts illustrating operation of a CNN device in accordance with various embodiments of the present invention. 15A to 15C can be operations of the CNN control unit 500 of the CNN apparatus.

도 15a - 도 15c를 참조하면, 1511 단계에서 CNN 장치의 동작이 시작될 수 있다. CNN 장치의 동작이 시작되면, CNN 장치는 1513 단계에서 호스트 초기화 동작을 수행할 수 있다. 호스트 초기화 동작에서 호스트는 CNN 장치에 특징 추출 레이어 및 컨피겨레이션 레이어 오퍼레이션에서 사용될 정보(초기화 정보)들을 CNN 장치에 전송할 수 있으며, CNN 장치는 수신되는 초기화 정보들을 정보 처리부(510)의 각 레지스터들에 저장할 수 있다. 초기화 동작에서 정보 처리부(510)은 웨이트 레지스터(512)에 웨이트 데이터 세트들을 저장하고, 어드레스 맵 레지스터(511)에 CI re-map address map 정보를 저장하고, L cfg에 레이어 컨피겨레이션 정보를 저장하고, 액티베이션 펑션 레지스터(514)에 액티베이션 펑션 룩업 테이블을 저장할 수 있다. Referring to FIGS. 15A to 15C, operation of the CNN apparatus can be started in step 1511. FIG. When the operation of the CNN apparatus is started, the CNN apparatus can perform the host initialization operation in step 1513. [ In the host initialization operation, the host may transmit information (initialization information) to be used in the feature extraction layer and configuration layer operation to the CNN device, and the CNN device may transmit the initialization information to the respective registers Lt; / RTI &gt; In the initialization operation, the information processing unit 510 stores the weight data sets in the weight register 512, stores the CI re-map address map information in the address map register 511, stores the layer configuration information in the L cfg And store the activation function look-up table in the activation function register 514.

초기화 동작 수행 후, CNN 장치는 1515 단계에서 특징 추출 레이어의 오퍼레이션을 시작하고, 1517 단계에서 CNN 제어부(500)의 아비터의 동작을 시작시킬 수 있다. CNN 장치는 1519 단계에서 데이터 채널을 사용 가능한 채널 세트(520)에 매핑할 수 있다. CNN 장치는 1521 단계에서 channel count(501)을 설정할 수 있다. channel count는 (CH count + 채널 세트의 수)로 설정될 수 있다. 채널 카운트를 설정한 후, CNN 장치는 1523 단계에서 CNN 제어부(500)의 MMU 동작을 시작시키고, 특징 추출 레이어 오퍼레이션을 시작할 수 있다. After performing the initialization operation, the CNN apparatus starts the operation of the feature extraction layer in step 1515, and may start the operation of the arbiter of the CNN control unit 500 in step 1517. [ The CNN device may map the data channel to the available channel set 520 in step 1519. [ The CNN apparatus can set the channel count (501) in step 1521. The channel count can be set to (CH count + number of channel sets). After setting the channel count, the CNN apparatus can start the MMU operation of the CNN control unit 500 in step 1523 and start the feature extraction layer operation.

특징 추출 레이어가 시작되면, CNN 장치는 1531 단계에서 L cfg reg(513)을 참조하여 레이어 컨피겨레이션을 확인하고, 16533 단계에서 start layer count/end layer count(502)의 카운트 값을 설정할 수 있다. start layer count/end layer count(502)의 카운트 값은 컨벌루션 블록(540)으로 전달되어 컨벌루션 블록이 웨이트 레지스터(512)에 저장된 시작 및 종료 레이어 카운트 값에 대응되는 웨이트 데이터 세트를 프리페치하도록 할 수 있다. CNN 장치는 1535 단계에서 어드레스 맵(511)의 정보를 참조하여 LO reg와 CI reg의 어드레스를 매핑({addr, input addr} map of start, end layer count)할 수 있다. When the feature extraction layer is started, the CNN apparatus confirms the layer configuration by referring to the L cfg reg 513 in step 1531 and sets the count value of the start layer count / end layer count 502 in step 16533 . the count value of the start layer count / end layer count 502 is passed to the convolution block 540 to cause the convolution block to prefetch a set of weight data corresponding to the start and end layer count values stored in the weight register 512 have. The CNN apparatus can map (addr, input addr) map of start and end layer counts of the addresses of the LO reg and the CI reg by referring to the information of the address map 511 in step 1535.

이후 CNN 장치는 1537 단계에서 특징 추출 레이어의 입력 데이터를 검사할 수 있다. 특징 추출 레이어는 도 1에 도시된 바와 같이 컨벌루션 레이어와 풀링 레이어의 쌍으로 이루어질 수 있으며, 복수 개의 특징 추출 레이어 오퍼레이션에 의해 입력 데이터를 학습할 수 있다. 이때 입력 데이터가 첫번째 특징 추출 레이어의 입력 데이터(convolution input layer의 입력 데이터)이면, CNN 장치는 1537 단계에서 이를 인식하고 1539 단계에서 외부 시스템에서 입력되는 데이터를 재구성하여 입력부(530)의 CI reg에 저장할 수 있다. 이때 CI reg의 어드레스는 다음과 같이 결정될 수 있으며, 입력 데이터가 0이면 제로 플래스 ZF를 세트할 수 있다.The CNN device can then check the input data of the feature extraction layer in step 1537. The feature extraction layer may be a pair of a convolution layer and a pooling layer as shown in FIG. 1, and the input data may be learned by a plurality of feature extraction layer operations. At this time, if the input data is the input data of the first feature extraction layer (input data of the convolution input layer), the CNN device recognizes this in step 1537, reconstructs the data input from the external system in step 1539, Can be stored. At this time, the address of the CI reg can be determined as follows. If the input data is 0, zero-rate ZF can be set.

CIreg[addr] = {LO reg[Input addr], Z_F, L-cfg reg[L-cnt*]}CIreg [addr] = {LO reg [Input addr], Z_F, L-cfg reg [L-cnt *]}

L-cfg reg[L-cnt*] = {CO_id, PO_id, L_id}L-cfg reg [L-cnt *] = {CO_id, PO_id, L_id}

if(LO reg[Input addr] == 0) Z_F =1if (LO reg [Input addr] == 0) Z_F = 1

CNN 장치는 이전 특징 추출 레이어의 결과 값을 재구성하여 다음 특징 추출 레이어의 입력 데이터로 인가할 수 있다. 따라서 입력 데이터가 두 번째 특징 추출 레이어 이후의 입력 데이터(convolution internal layer의 입력 데이터)이면, CNN 장치는 1537 단계에서 이를 인식하고 1541 단계에서 이전 특징 추출 레이어의 결과 값을 재구성하여 입력부(530)의 CI reg에 저장할 수 있다. 이때 CI reg의 어드레스는 다음과 같이 결정될 수 있으며, 입력 데이터가 0이면 제로 플래스 ZF를 세트할 수 있다.The CNN device can reconstruct the result value of the previous feature extraction layer and apply it as the input data of the next feature extraction layer. Accordingly, if the input data is input data after the second feature extraction layer (input data of the convolution internal layer), the CNN device recognizes this in step 1537, reconstructs the result value of the previous feature extraction layer in step 1541, CI reg. At this time, the address of the CI reg can be determined as follows. If the input data is 0, zero-rate ZF can be set.

CIreg[addr] = {LO reg[Input addr], Z_F, L-cfg reg[L-cnt*]}CIreg [addr] = {LO reg [Input addr], Z_F, L-cfg reg [L-cnt *]}

L-cfg reg[L-cnt*] = {CO_id, PO_id, L_id}L-cfg reg [L-cnt *] = {CO_id, PO_id, L_id}

if(LO reg[Input addr] == 0) Z_F =1if (LO reg [Input addr] == 0) Z_F = 1

입력부(530)에 저장되는 입력 데이터의 구조는 도 6과 같은 구조를 가질 수 있다. 이후 CNN 장치는 1543 단계에서 입력부(530)에 저장된 입력 데이터 및 정보 처리부(510)에서 프리페치된 웨이트 데이터를 컨벌루션 연산하며, 1545 단계에서 컨벌루션 연산 결과 값을 풀링 연산할 수 있다. 본 발명의 다양한 실시예들에 따른 컨벌루션 연산 동작은 도 16a 및 도 16b와 같은 방법으로 수행될 수 있으며, 본 발명의 다양한 실시예들에 따른 풀링 연산 동작은 도 17a 및 도 17b와 같은 방법으로 수행될 수 있다. The structure of the input data stored in the input unit 530 may have a structure as shown in FIG. In step 1543, the CNN apparatus performs a convolution operation on the input data stored in the input unit 530 and the weight data prefetched in the information processing unit 510. In step 1545, the CNN apparatus may perform a pulling operation on the convolution operation result value. The convolution operation according to various embodiments of the present invention can be performed in the same manner as in FIGS. 16A and 16B, and the pooling operation according to various embodiments of the present invention is performed by the method shown in FIGS. 17A and 17B .

풀링 연산을 수행한 후, CNN 장치는 1547 단계에서 현재 처리된 특징 추출 레이어가 마지막 특징 추출 레이어인가를 검사할 수 있다. 마지막 특징 추출 레이어(internal layer)가 아니면, CNN 장치는 다음 특징 추출 레이어가 있는 것으로 판단하고 1531 단계로 되돌아가 다음 특징 추출 레이어의 연산 동작을 수행할 수 있다. 그리고 마지막 특징 추출 레이어(output layer)이면, CNN 장치는 1547 단계에서 이를 인식하고 1551 단계에서 모든 채널 데이터들의 특징 추출 레이어 오퍼레이션을 완료하였는가 검사할 수 있다. 예를들면, CNN 장치가 3개의 채널 세트들을 구비하고, 5개 채널들의 입력 데이터들을 처리할 수 있다. CNN 장치는 3개 채널의 입력 데이터들의 특징 추출 레이어 오퍼레이션을 수행하고, 3개 채널들의 입력데이터의 특징 추출 레이어 오퍼레이션이 종료되면 연속하여 2개 채널의 입력 데이터들의 특징 추출 레이어 오퍼레이션을 수행할 수 있다. 따라서 채널 세트의 특징 추출 오프레이션이 종료되었지만 모든 채널들의 입력 데이터들에 특징 추출 레이어 오퍼레이션이 완료되지 않았으면, CNN 장치는 1551 단계에서 이를 인식하고, 1517 단계로 되돌아가 다른 채널들의 입력 데이터들에 대한 특징 추출 레이어 오퍼레션을 수행할 수 있다.After performing the pulling operation, the CNN apparatus can check in step 1547 whether the currently processed feature extraction layer is the last feature extraction layer. If the CNN apparatus is not the last feature extraction layer, the CNN apparatus determines that there is a next feature extraction layer, and returns to step 1531 to perform a calculation operation of the next feature extraction layer. If it is the last feature extraction layer, the CNN device recognizes this in step 1547 and checks in step 1551 whether the feature extraction layer operation of all channel data is completed. For example, a CNN device may have three channel sets and process the input data of five channels. The CNN apparatus performs the feature extraction layer operation of the input data of three channels and performs the feature extraction layer operation of the input data of the two channels successively when the feature extraction layer operation of the input data of the three channels is completed . Accordingly, if the feature extraction and excitation of the channel set is terminated but the feature extraction layer operation is not completed in the input data of all the channels, the CNN apparatus recognizes this in step 1551, and returns to step 1517 to input data It is possible to perform a feature extraction layer operation for the feature extraction function.

그러나 모든 채널의 입력 데이터들에 대한 특징 추출 오퍼레이션을 완료하면, CNN 장치는 1551 단계에서 이를 인식하고, 1553 단계에 클래시피케이션 레이어 오퍼레이션을 시작할 수 있다. 클래시피케이션 레이어 오퍼레이션은 하나의 채널 세트를 통해 수행될 수 있다.( All LO reg data from Feature Extraction layer SHOULD input to one HW CH set for classification). 클래시피케이션 레이어 오퍼레이션이 시작되면, CNN 장치는 1555 단계에서 L cfg reg(513)에서 레이어 컨피겨레이션 정보를 리드하고, strat layer count/end layer count(502)를 설정할 수 있다. However, upon completion of the feature extraction operation on the input data of all the channels, the CNN device recognizes this in step 1551 and may start the operation of the classification layer in step 1553. [ The classification layer operation can be performed through a set of channels (All LO reg data from Feature Extraction layer SHOULD input to one HW CH set for classification). When the operation of the classification layer is started, the CNN device can read the layer configuration information in the L cfg reg 513 in step 1555 and set the strat layer count / end layer count 502.

이후 CNN 장치는 1557 단계에서 FC 레이어(fully connected layer)를 검사할 수 있다. 첫 번째 FC 레이어(FC input layer)인 경우의 입력 데이터는 특징 추출 레이어 오퍼레이션의 최종 결과 값이 될 수 있으며, 두 번째 이후의 FC 레이어(FC internal layer)는 이전 FC 레이어 오퍼레이션의 결과 값이 될 수 있다. 첫 번째 FC 레이어이면, CNN 장치는 1557 단계에서 이를 인식하고, 1559 단계에서 입력 데이터를 다음과 같이 재구성하여 입력부(530)에 저장할 수 있다. 이때 입력 데이터가 0 데이터이면 제로 플래그 ZF를 세트할 수 있다. The CNN device may then check the FC layer (fully connected layer) in step 1557. The input data for the first FC layer can be the final result of the feature extraction layer operation and the FC internal layer after the second can be the result of the previous FC layer operation. have. If it is the first FC layer, the CNN device recognizes this in step 1557, and in step 1559, reconstructs the input data as follows and stores it in the input part 530. At this time, if the input data is 0 data, the zero flag ZF can be set.

CIreg[addr] = {All LO reg[Input addr], Z_F, L-cfg reg[L-cnt*]}CIreg [addr] = {All LO reg [Input addr], Z_F, L-cfg reg [L-cnt *]}

L-cfg reg[L-cnt*] = {L_id}L-cfg reg [L-cnt *] = {L_id}

if(LO reg[Input addr] == 0) Z_F =1if (LO reg [Input addr] == 0) Z_F = 1

또한 두 번째 이후의 FC 레이어이면, CNN 장치는 1557 단계에서 이를 인식하고, 1561 단계에서 입력 데이터를 다음과 같이 재구성하여 입력부(530)에 저장할 수 있다. 이때 입력 데이터가 0 데이터이면 제로 플래그 ZF를 세트할 수 있다. If it is the second or later FC layer, the CNN device recognizes this in step 1557, and in step 1561, reconstructs the input data as follows and stores it in the input part 530. At this time, if the input data is 0 data, the zero flag ZF can be set.

CIreg[addr] = {LO reg[Input addr], Z_F, L-cfg reg[L-cnt*]}CIreg [addr] = {LO reg [Input addr], Z_F, L-cfg reg [L-cnt *]}

L-cfg reg[L-cnt*] = {L_id}L-cfg reg [L-cnt *] = {L_id}

if(LO reg[Input addr] == 0) Z_F =1if (LO reg [Input addr] == 0) Z_F = 1

입력부(530)에 저장되는 입력 데이터의 구조는 도 12의 1211와 같은 구조를 가질 수 있다. 입력 재구성한 후, CNN 장치는 1563 단계에서 입력 데이터의 컨볼루션 연산 오퍼레이션을 할 수 있다. 컨벌루션 연산 오퍼레이션은 도 16a 및 도 16b와 같은 방법으로 수행할 수 있다. 클래시피케이션 레이어 오퍼레이션은 풀링 연산을 하지 않을 수 있다. 따라서 컨벌루션 연산 오퍼레이션이 완료되면, CNN 장치는 1565 단계에서 컨벌루션 연산 결과 값을 출력부(560)의 LO reg에 저장할 수 있다. The structure of the input data stored in the input unit 530 may have a structure as shown in 1211 of FIG. After the input is reconfigured, the CNN device may perform the convolution operation operation of the input data in step 1563. The convolution operation may be performed in the same manner as in Figs. 16A and 16B. Classification layer operations may not perform pooling operations. Accordingly, when the convolution operation operation is completed, the CNN apparatus can store the result of the convolution operation in the LO reg of the output unit 560 in step 1565.

FC 레이어 오퍼레이션을 수행한 후, CNN 장치는 1567 단계에서 현재 수행된 FC 레이어가 인터널 레이어인가 또는 출력 레이어인가를 검사할 수 있다. CNN 장치는 start layer count, end layer count, kernel count 등을 참조하여 FC output layer 여부를 확인할 수 있다. CNN 장치는 현재 처리된 FC 레이어가 인터널 레이어이면 1555 단계로 되돌아가 다음 FC 레이어의 오퍼레이션을 수행하며, 출력 레이어(output layer)이면 1569 단계에서 CNN 장치의 동작을 종료하고 학습된 결과 값을 호스트 장치에 전송할 수 있다. After performing the FC layer operation, the CNN apparatus can check in step 1567 whether the currently performed FC layer is an internal layer or an output layer. The CNN device can check the FC output layer by referring to the start layer count, the end layer count, and the kernel count. If the current processed FC layer is the internal layer, the CNN apparatus returns to step 1555 to perform the operation of the next FC layer. If the current layer is an output layer, the CNN apparatus terminates the operation of the CNN apparatus in step 1569, Device.

도 16a 및 도 16b는 본 발명의 다양한 실시예들에 따른 CNN 장치의 컨벌루션 레이어 오퍼레이션의 동작을 도시하는 흐름도이다.16A and 16B are flow charts illustrating the operation of the convolution layer operation of a CNN device in accordance with various embodiments of the present invention.

도 16a 및 도 16b를 참조하면, 컨벌루션 레이어 오퍼레이션은 특징 추출 레이어와 클래시피케이션 레이어에서 다른 방법으로 수행될 수 있다. CNN 장치는 1611 단계에서 컨벌루션 레이어 오퍼레이션을 시작할 수 있다. CNN장치는 1613 단계에서 입력 데이터와 컨벌루션 연산할 웨이트 데이터를 프리페치할 수 있다. 컨벌루션 블록(540)의 PE 제어부(543)은 startlayer count/end layer count(5020)에 해당하는 웨이트 데이터를 웨이트 레지스터(512)에 프리페치할 수 있다. CNN 장치는 1615 단계에서 도 6(도 9a의 911)과 같이 ZF, CO id, PO id 및 L id를 포함하는 입력 데이터 세트를 구성할 수 있으며, 1617 단계에서 도 9a의 913과 같이 웨이트 데이터에 ZF 및 K id를 포함하는 웨이트 데이터 세트를 구성할 수 있다. 또한 클래시피케이션 레이어인 경우, 입력 데이터 세트는 도 12의 1211과 같은 구조를 가질 수 있으며, 웨이트 데이터 세트는 도 12의 1213과 같은 구조를 가질 수 있다. 입력 데이터는 컨벌루션 블록(540)의 제1 입력(PE input A = CIreg[addr])이 될 수 있으며, 웨이트 데이터 세트는 컨벌루션 블록(540)의 제2 입력(PE input B = {Weight reg[addr], Z_F, K_id[L-cnt]})이 될 수 있다. CNN 장치는 1619 단계에서 준비된 PE(컨벌루션 연산을 할 수 있는 PE, 빈 PE)가 있는가 검사하며, 준비된 PE가 없으면 1621 단계에서 PE가 준비될 때까지 대기할 수 있다. 준비된 PE 가 있으면, CNN 장치는 1619 단계에서 이를 인식하고, 1623 단계에서 준비된 PE에 입력 데이터 및 웨이트 데이터를 입력시킬 수 있다. 16A and 16B, the convolution layer operation may be performed in a different manner in the feature extraction layer and the classification layer. The CNN device may start the convolution layer operation in step 1611. [ The CNN apparatus can prefetch the weight data to be convoluted with the input data in step 1613. [ The PE control unit 543 of the convolution block 540 may prefetch the weight data corresponding to the startlayer count / end layer count 5020 to the weight register 512. [ In step 1615, the CNN apparatus may configure an input data set including ZF, CO id, PO id, and L id as shown in FIG. 6 (911 in FIG. 9A). In step 1617, RTI ID = 0.0 &gt; ZF &lt; / RTI &gt; and Kid. In the case of the classification layer, the input data set may have the same structure as 1211 in FIG. 12, and the weight data set may have the same structure as 1213 in FIG. The input data may be the first input (PE input A = CIreg [addr]) of the convolution block 540 and the weight data set may be the second input of the convolution block 540 ], Z_F, K_id [L-cnt]}. The CNN apparatus checks whether there is a prepared PE (convolutional operation PE, empty PE) prepared in step 1619. If there is no prepared PE, the CNN apparatus can wait until the prepared PE is prepared in step 1621. If there is a prepared PE, the CNN device recognizes this in step 1619, and can input the input data and the weight data to the PE prepared in step 1623.

컨벌루션 블록(540)은 특징 추출 레이어 및 클래시피케이션 레이어에서 모두 동작될 수 있다. 현재 실행 중인 오퍼레이션이 특징 추출 레이어 오퍼레이션이면, CNN 장치는 1631 단계에서 이를 인식하고, 1633 단계에서 입력 데이터 또는 웨이트 데이터의 제로 플래그 ZF를 분석할 수 있다. 이때 제로 플래그 ZF가 세트된 상태이면, CNN장치는 1633단계에서 이를 인식하고, 1637 단계에서 컨벌루션 곱셈 연산을 수행하지 않고 제로 데이터를 출력할 수 있다. 또한 제로 플래그 ZF가 리세트 상태이면, CNN 장치는 1633 단계에서 이를 인식하고 1635 단계에서 컨벌루션 곱셈 연산을 수행할 수 있다. 예를들면, 컨벌루션 곱셈 연산은 도 8a와 같은 구조를 가지는 PE를 통해 수행할 수 있다. PE의 동작을 살펴보면, 곱셈기(810)은 입력 데이터와 웨이트 데이터를 곱셈 연산하며, 선택기(830)은 곰셈기(810)의 출력과 제로 데이터를 입력할 수 있다. 이때 선택기(830)은 입력 데이터 또는 웨이트 데이터의 ZF가 세트된 상태이면 제로 데이터를 선택 출력하고, 입력 데이터 및 웨이트 데이터의 ZF가 모두 리세트 상태일때에만 곱셈기(810)의 출력을 선택할 수 있다. 이후 CNN 장치는 1641 단계에서 특징 추출 레이어의 컨벌루션 곱셈 연산의 결과 데이터 세트를 생성(Conv: {Result, Z_F, CO_id, PO_id, L_id, K_id})할 수 있다. 특징 추출 레이어의 컨벌루션 곱셈 결과 데이터 세트는 도 9a의 915와 같은 구조를 가질 수 있다. The convolution block 540 may be operated on both the feature extraction layer and the classification layer. If the currently executing operation is a feature extraction layer operation, the CNN device recognizes this in step 1631 and analyzes the zero flag ZF of the input data or weight data in step 1633. At this time, if the zero flag ZF is set, the CNN device recognizes this in step 1633, and can output zero data without performing the convolution multiply operation in step 1637. If the zero flag ZF is in the reset state, the CNN device recognizes the zero flag ZF in step 1633 and may perform the convolution multiply operation in step 1635. [ For example, the convolution multiplication operation can be performed through a PE having a structure as shown in FIG. 8A. In operation of the PE, the multiplier 810 multiplies the input data with the weight data, and the selector 830 can input the output of the combiner 810 and the zero data. At this time, the selector 830 selects and outputs the zero data if the ZF of the input data or the weight data is set, and can select the output of the multiplier 810 only when both the ZF of the input data and the weight data are in the reset state. In step 1641, the CNN apparatus can generate a result data set of the convolution multiplication operation of the feature extraction layer (Conv: {Result, Z_F, CO_id, PO_id, L_id, K_id}). The convolution multiplication result data set of the feature extraction layer may have a structure as shown in 915 of FIG. 9A.

또한 현재 실행 중인 오퍼레이션이 클래시피케이션 레이어 오퍼레이션이면, CNN 장치는 1631 단계에서 이를 인식하고, 1639 단계에서 드롭 아웃인가 검사할 수 있다. 드롭 아웃은 드롭아웃 발생기(515)에 의해 결정될 수 있다. 예를들면, CNN 장치는 PE부(545)의 PE들 중에서 50%의 PE들을 드롭아웃시킬 수 있다. 이때 드롭 아웃이면, CNN 장치는 1639 단계에서 이를 인식하고, 1637 단계에서 컨벌루션 곱셈 연산을 수행하지 않고 제로 데이터를 출력할 수 있다. 그리고 드롭 아웃이 아니면, CNN 장치는 1633 단계로 진행하여 입력 데이터 또는 웨이트 데이터의 제로 플래그 ZF를 분석할 수 있다. 이때 제로 플래그 ZF가 세트된 상태이면, CNN장치는 1633단계에서 이를 인식하고, 1637 단계에서 컨벌루션 곱셈 연산을 수행하지 않고 제로 데이터를 출력할 수 있다. 또한 제로 플래그 ZF가 리세트 상태이면, CNN 장치는 1633 단계에서 이를 인식하고 1635 단계에서 컨벌루션 곱셈 연산을 수행할 수 있다. 예를들면, 컨벌루션 곱셈 연산은 도 8b와 같은 구조를 가지는 PE를 통해 수행할 수 있다. PE의 동작을 살펴보면, 곱셈기(810)은 입력 데이터와 웨이트 데이터를 곱셈 연산하며, 선택기(830)은 곰셈기(810)의 출력과 제로 데이터를 입력할 수 있다. 이때 선택기(830)은 드롭 아웃 신호가 입력되거나 입력 데이터 또는 웨이트 데이터의 ZF가 세트된 상태이면 제로 데이터를 선택 출력하고, 드롭아웃 신호가 입력되지 않으며 입력 데이터 및 웨이트 데이터의 ZF가 모두 리세트 상태일 때에만 곱셈기(810)의 출력을 선택할 수 있다. 이후 CNN 장치는 1641 단계에서 클래시피케이션 레이어의 컨벌루션 곱셈 연산의 결과 데이터 세트를 생성(FC :: {Result, Z_F, L_id, K_id})할 수 있다. 클래시피케이션 레이어의 컨벌루션 곱셈 결과 데이터 세트는 도 12의 1215와 같은 구조를 가질 수 있다.If the operation currently being executed is a classification layer operation, the CNN device recognizes the operation in step 1631 and may check the dropout in step 1639. The dropout may be determined by the dropout generator 515. For example, the CNN device may drop out 50% of the PEs out of the PEs in the PE portion 545. If it is a drop-out, the CNN device recognizes this in step 1639, and can output zero data without performing a convolutional multiply operation in step 1637. If not, the CNN apparatus proceeds to step 1633 to analyze the zero flag ZF of the input data or weight data. At this time, if the zero flag ZF is set, the CNN device recognizes this in step 1633, and can output zero data without performing the convolution multiply operation in step 1637. If the zero flag ZF is in the reset state, the CNN device recognizes the zero flag ZF in step 1633 and may perform the convolution multiply operation in step 1635. [ For example, the convolution multiplication operation can be performed through a PE having a structure as shown in FIG. 8B. In operation of the PE, the multiplier 810 multiplies the input data with the weight data, and the selector 830 can input the output of the combiner 810 and the zero data. At this time, the selector 830 selects and outputs the zero data when the dropout signal is inputted, or when ZF of the input data or weight data is set, and when the ZF of the input data and the weight data is both reset The output of the multiplier 810 can be selected. Then, the CNN device can generate a result data set (FC :: {Result, Z_F, L_id, K_id}) of the convolution multiply operation of the classification layer in step 1641. The convolution multiplication result data set of the classification layer may have the same structure as 1215 of FIG.

특징 추출 레이어 오퍼레이션이면, CNN 장치는 1643 단계에서 이를 인식하고, PE들(PE A PE B)에서 출력되는 도 9a의 915와 같은 컨벌루션 곱셈 연산 결과 데이터 세트에서 PO id를 분석하여 가산 동작을 수행할 수 있다. 이를 위하여 CNN 장치는 1645 단계에서 PE A의 CO id와 PE B의 PO id가 동일함을 인식하면, 1649 단계에서 PE A 및 PE B의 출력을 가산하고, 1641 단계에서 CI data count를 1 증가시킬 수 있다. 그러나 PE A의 CO id와 PE B의 PO id가 다르면, CNN 장치는 1645 단계에서 이를 인식하고, 1647 단계에서 가산 동작을 바이패스시킬 수 있다. 이후 CNN 장치는 1653 단계에서 마지막 가산인가 검사하고, 마지막 가산이 아니면 1645 단계로 되돌아가 가산 동작을 계속 수행할 수 있다. 1653 단계에서 마지막 가산임을 인식하면, CNN 장치는 1655 단계에서 어큐물레이팅된 값이 CI data count(503)의 최대값(CI data cnt[CO id] == MAX)인가 검사할 수 있다. 이‹š 최대값이 아니면(예를들면, 도 9c의 963과 같은 데이터 세트) 상기 1645 단계로 되돌아가 가산 동작을 계속 수행하고, 최대값이면 1657 단계에서 CO id를 제거하고 그 결과값(예를들면 도 9c의 961과 같은 데이터)를 풀링 블록(550)의 PI reg에 저장할 수 있다. 이후 CNN 장치는 1659 단계에서 컨벌루션 레이어의 연산이 종료하고, 1661 단계에서 풀링 레이어 오퍼레이션을 시작할 수 있다. If it is a feature extraction layer operation, the CNN apparatus recognizes this in step 1643 and analyzes the PO id in the convolution multiplication operation result data set 915 of FIG. 9A outputted from the PEs (PE A PE B) . If it is determined that the CO id of PE A is equal to the PO id of PE B in step 1645, the CNN apparatus adds the outputs of PE A and PE B in step 1649 and increases the CI data count by 1 in step 1641 . However, if the CO id of PE A differs from the PO id of PE B, the CNN device may recognize this in step 1645 and bypass the addition operation in step 1647. Thereafter, the CNN apparatus checks in step 1653 whether it is the final addition, and if not, it returns to step 1645 and continues the addition operation. If it is determined in step 1653 that the last addition is performed, the CNN apparatus can check whether the accumulated value in step 1655 is the maximum value (CI data cnt [CO id] == MAX) of the CI data count 503. If the maximum value is not the maximum value (for example, the data set as 963 in FIG. 9C), the process returns to step 1645 to continue the addition operation. If the maximum value is present, the CO ID is removed in step 1657, For example, data such as 961 in FIG. 9C) in the PI reg of the pulling block 550. After that, the CNN apparatus ends the calculation of the convolution layer in step 1659, and may start the pooling layer operation in step 1661. [

클래시피케이션 레이어 오퍼레이션이면, CNN 장치는 1643 단계에서 이를 인식하고, PE들(PE A PE B)에서 출력되는 도 12의 1215와 같은 컨벌루션 곱셈 연산 결과 데이터 세트에서 K id를 분석하여 가산 동작을 수행할 수 있다. 이를 위하여 CNN 장치는 1671 단계에서 PE A의 CO id와 PE B의 K id가 동일함을 인식하면, 1675 단계에서 PE A 및 PE B의 출력을 가산하고, 1677 단계에서 LI data count를 1 증가시킬 수 있다. 그러나 PE A의 K id와 PE B의 K id가 다르면, CNN 장치는 1671 단계에서 이를 인식하고, 1643 단계에서 가산 동작을 바이패스시킬 수 있다. 이후 CNN 장치는 1679 단계에서 마지막 가산인가 검사하고, 마지막 가산이 아니면 1671 단계로 되돌아가 가산 동작을 계속 수행할 수 있다. 1679 단계에서 마지막 가산임을 인식하면, CNN 장치는 1655 단계에서 어큐물레이팅된 값이 LI data count(503)의 최대값(LI data cnt[K id] == MAX)인가 검사할 수 있다. 이‹š 최대값이 아니면 상기 1671 단계로 되돌아가 가산 동작을 계속 수행하고, 최대값이면 1683 단계에서 그 결과값을 출력부(560)의 LO reg에 저장할 수 있다. 이후 CNN 장치는 1685 단계에서 컨벌루션 레이어의 연산이 종료하고, 1687 단계에서 출력부 (560)의 오퍼레이션을 시작(FC LO reg block start)할 수 있다. FC LO reg block start는 도 18과 같은 방법으로 수행될 수 있다.If it is a classification layer operation, the CNN device recognizes this in step 1643 and analyzes the K id in the convolution multiplication operation result data set 1215 of FIG. 12 outputted from the PEs PE A PE B to perform an addition operation can do. If it is determined that the CO id of PE A is equal to the K id of PE B in step 1671, the CNN apparatus adds the outputs of PE A and PE B in step 1675 and increases the LI data count by 1 in step 1677 . However, if the K id of the PE A is different from the K id of the PE B, the CNN device recognizes this in step 1671 and bypasses the addition operation in step 1643. Thereafter, the CNN apparatus checks whether the final addition is performed in step 1679. If not, the CNN apparatus returns to step 1671 and continues the addition operation. If it is determined in step 1679 that the last addition is performed, the CNN apparatus can check whether the accumulated value in step 1655 is the maximum value (LI data cnt [K id] == MAX) of the LI data count 503. If the maximum value is not the maximum value, the process returns to step 1671 and the addition operation is continued. If the maximum value is obtained, the result is stored in the LO reg of the output unit 560 in step 1683. After that, the CNN apparatus ends the operation of the convolution layer in step 1685 and starts the operation of the output unit 560 in step 1687 (FC LO reg block start). The FC LO reg block start can be performed in the same manner as in FIG.

도 17a 및 도 17b는 본 발명의 다양한 실시예들에 따른 CNN 장치의 풀링 레이어 오퍼레이션의 동작을 도시하는 흐름도이다.17A and 17B are flow charts illustrating the operation of a pulling layer operation of a CNN device in accordance with various embodiments of the present invention.

도 17a 및 도 17b를 참조하면, CNN장치는 1711 단계에서 특징 추출 레이어의 풀링 연산 오퍼레이션을 시작할 수 있다. PI reg에 저장되는 데이터 세트는 도 10과 같은 구조를 가질 수 있다. 풀링 오퍼레이션이 시작되면, CNN 장치는 PI reg에서 같은 PO id를 가지는 데이터를 검색할 수 있다. 이때 데이터들의 PO id가 동일하지 않으면 1715 단계로 진행하여 대기할 수 있다. PO id가 동일하면(예를들면 PO id(A)== PO id(B)), CNN 장치는 1713 단계에서 이를 인식하고, 1717 단계에서 풀링 오퍼레이션을 수행할 수 있다. 이때 풀링 오퍼레이션은 두 데이터들 중에 큰 값을 가지는 데이터를 선택하거나 또는 두 데이터들의 평균 값을 구하는 방법이 될 수 있다. 풀링 오퍼레이션을 수행한 후, CNN 장치는 1721 단계에서 PI data count(506)값이 최대값인가 검사할 수 있다. PI data count(506)값이 최대값이 아니면, CNN 장치는 1723 단계에서 풀링 연산 값을 PI reg에 저장하고 1713 단계로 진행할 수 있다. PI data count(506)값이 최대값이면, CNN 장치는 1725 단계에서 풀링 연산된 데이터 세트에서 PO id를 제거하고, 1727 단계에서 액티베이션 펑션 LUT(514)를 참조하여 풀링 연산된 데이터의 액티베이션 펑션을 수행한 후, 출력부(560)의 LO reg에 저장할 수 있다. Referring to FIGS. 17A and 17B, in step 1711, the CNN apparatus can start the pooling operation of the feature extraction layer. The data set stored in the PI reg can have the structure shown in FIG. When the pooling operation is started, the CNN device can retrieve data having the same PO id in the PI reg. At this time, if the PO id of the data is not the same, the process can proceed to step 1715 and wait. If the PO id is the same (for example, PO id (A) == PO id (B)), the CNN device recognizes this in step 1713 and can perform the pooling operation in step 1717. At this time, the pulling operation may be a method of selecting data having a large value among two data or obtaining an average value of two data. After performing the pulling operation, the CNN apparatus can check in step 1721 whether the PI data count 506 is the maximum value. If the PI data count 506 is not the maximum value, the CNN apparatus stores the pooling operation value in the PI reg in step 1723 and proceeds to step 1713. [ If the value of the PI data count 506 is the maximum value, the CNN apparatus removes the PO id from the pooled operation data set in step 1725, and refers to the activation function LUT 514 in step 1727 to set the activation function of the pooled operation data And may be stored in the LO reg of the output unit 560.

CNN 장치는 1731 단계에서 L id에 대응되는 LO data count(504)의 값을 1 증가시키고, 1733 단계에서 LO data count(504)의 값이 최대값인가 검사할 수 있다. 이때 LO data count(504)의 값이 최대값이 아니면, CNN 장치는 1741 단계에서 풀링 연산 결과 값이 수신될 ‹š까지 대기할 수 있다(Wait for another Pooling result data set which including L id and K id). LO data count(504)의 값이 최대값이면, CNN 장치는 1735 단계에서 kernel count(507)의 값을 증가시키고, 1737 단계에서 kernel count(507)의 값이 최대값인가 검사할 수 있다. kernel count(507)의 값이 최대값이 아니면, CNN 장치는 1739 단계에서 end layer count 값을 증가시킨 후 1741 단계로 진행할 수 있다.The CNN apparatus increases the value of the LO data count 504 corresponding to L id by 1 in step 1731 and checks whether the value of the LO data count 504 is the maximum value in step 1733. At this time, if the value of the LO data count 504 is not the maximum value, the CNN apparatus can wait until the pooling operation result value is received in step 1741 (Wait for another pooling result data set which including L id and K id ). If the value of the LO data count 504 is the maximum value, the CNN apparatus increases the value of the kernel count 507 in step 1735 and checks whether the value of the kernel count 507 is the maximum value in step 1737. If the value of the kernel count 507 is not the maximum value, the CNN apparatus increases the end layer count value in step 1739 and proceeds to step 1741.

kernel count(507)의 값이 최대값이면, CNN 장치는 1743 단계에서 입력 데이터를 해제(Input data release at the MMU, MMU:: CI reg(start layer) release)하고, 1745 단계에서 웨이트 데이터를 해제(Weight data release at the PE Ctrl, PE Ctrl :: Weight(start layer) release)할 수 있다. 이후 CNN 장치는 1747 단계에서 start layer count(502)를 증가하고, LO reg에 결과 데이터를 저장(result data store LO reg, store address is based on PO id). 이후 CNN 장치는 1751 단계에서 풀링 오퍼레이션을 종료할 수 있다.If the value of the kernel count 507 is the maximum value, the CNN device releases the input data at step 1743 (MMU, MMU :: CI reg (start layer release)) and releases the weight data at step 1745 (Weight data release at the PE Ctrl, PE Ctrl :: Weight (start layer) release). In step 1747, the CNN device increments the start layer count 502 and stores the result data in the LO reg (result data store LO reg, store address is PO id). The CNN device may then terminate the pooling operation at step 1751.

도 18은 본 발명의 다양한 실시예들에 따른 CNN 장치의 클래시피케이션 레이어의 출력 동작을 도시하는 흐름도이다.18 is a flow chart illustrating the output operation of the classification layer of the CNN device according to various embodiments of the present invention.

도 18을 참조하면, CNN 장치는 1811 단계에서 FC 레이어의 출력 오퍼레이션을 시작(LO reg block start)하면, 1813 단계에서 컨벌루션 연산 결과 데이터의 수신을 대기할 수 있다. 컨벌루션 블록으로부터 데이터가 수신되면, CNN 장치는 1815 단계에서 LO data count를 1 증가시키고, 1817 단계에서 LO data count가 최대 값(LO data cnt == MAX(#of FC layer output))인가 검사할 수 있다. 이때 LO data count 값이 최대 값이 아니면, CNN 장치는 1813 단계로 되돌아가 다음 입력을 대기할 수 있다. LO data count 값이 최대 값이면, CNN 장치는 1817 단계에서 이를 인식하고 1819 단계에서 출력 동작을 종료(FC LO reg block end)하고, CNN 제어부(500)의 MMU의 동작을 시킬 수 있다. Referring to FIG. 18, in step 1811, the CNN apparatus may start the output operation of the FC layer (LO reg block start). In step 1813, the CNN apparatus may wait for receiving the convolution operation result data. When data is received from the convolution block, the CNN increases the LO data count by 1 in step 1815 and checks in step 1817 whether the LO data count is the maximum value (LO data cnt == MAX (#of FC layer output)) have. If the LO data count value is not the maximum value, the CNN apparatus returns to step 1813 and waits for the next input. If the value of the LO data count is the maximum value, the CNN device recognizes this in step 1817 and terminates the output operation (FC LO reg block end) in step 1819 and enables the operation of the MMU of the CNN control part 500.

본 발명의 다양한 실시예들에 따른 CNN 장치(deep learning processor accelerator)는 뉴로모픽 알고리듬의 병렬 처리(neuromorphic algorithm의 parallel processing)에 적합할 수 있으며, 이를 이용하여 다른 딥 러닝 알고리듬을 수행하기에 적합할 수 있다. 또한 본 발명의 다양한 실시예들에 따른 CNN 장치는 이미지 인식, 분류 및 분석(image recognition, classification, analysis)을 수행하는 프로세서에 이용될 수 있다. CNN devices according to various embodiments of the present invention may be suitable for parallel processing of neuromorphic algorithms (parallel processing of neuromorphic algorithms) and are suitable for performing other deep running algorithms can do. The CNN apparatus according to various embodiments of the present invention may also be used in a processor that performs image recognition, classification, and analysis.

본 발명의 다양한 실시예들에 따른 CNN 장치는 CNN 알고리듬(convolutional neural network algorithm)을 고속 및 저전력(high speed, low power)로 하드웨어 장치에서 동작시킬 수 있으며, 휴대용 전자장치(portable device)에서도 사용할 수 있다. CNN 장치는 다양한 크기의 CNN 알고리듬도 컨피겨레이션을 통해 동작시킬 수 있다. CNN 장치는 제로 패스(Zero pass) 기능을 가질 수 있으며, 컨벌루션 연산 블록(PE, ADD의 computation block)에서 고속으로 연산할 수 있다. CNN 장치는 컨벌루션 연산 블록에서 웨이트 데이터를 프리페치할 수 있으며, 이로인해 메모리의 로드 시간을 감소시킬 수 있어 딥 러닝 알고리듬의 처리 속도를 향상시킬 수 있다. A CNN device according to various embodiments of the present invention can operate a CNN algorithm (convolutional neural network algorithm) at high speed and low power in a hardware device and can also be used in a portable device have. CNN devices can operate CNN algorithms of various sizes through configuration. The CNN device can have a zero pass function and can operate at a high speed in a convolution computation block (PE, ADD computation block). The CNN device can prefetch the weight data in the convolution operation block, which can reduce the load time of the memory and improve the processing speed of the deep learning algorithm.

한편, 본 발명의 상세한 설명에서는 구체적인 실시 예에 관해 설명하였으나, 본 발명의 범위에서 벗어나지 않는 한도 내에서 여러 가지 변형이 가능함은 물론이다. 그러므로, 본 발명의 범위는 설명된 실시 예에 국한되어 정해져서는 안되며 후술하는 특허청구의 범위뿐만 아니라 이 특허청구의 범위와 균등한 것들에 의해 정해져야 한다.While the invention has been shown and described with reference to certain preferred embodiments thereof, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. Therefore, the scope of the present invention should not be limited by the described embodiments, but should be determined by the scope of the appended claims, as well as the appended claims.

Claims (30)

웨이트 데이터를 저장하는 레지스터를 포함하는 정보 처리부;
입력 데이터 및 웨이트 데이터에 기반하여 특징 추출 레이어 및 클래시피케이션 레이어 오퍼레이션을 수행하는 적어도 하나의 채널 세트; 및
정보 처리부 및 채널 세트에 기능적으로 연결되는 CNN 제어부를 포함하며,
상기 CNN 제어부는 상기 채널 세트가 특징 추출 레이어의 오퍼레이션을 수행하고, 특징 추출 레이어의 오퍼레이션이 완료되면 클래스피케이션 레이어 오퍼레이션을 수행하도록 제어하는 합성 곱 신경망 연산 장치.
An information processing unit including a register for storing weight data;
At least one set of channels for performing a feature extraction layer and a classification layer operation based on input data and weight data; And
And a CNN control unit operatively connected to the information processing unit and the channel set,
Wherein the CNN control unit performs operation of the feature extraction layer when the channel set is set, and controls operation of the classpacific layer when the operation of the feature extraction layer is completed.
제1항에 있어서,
상기 채널 세트는
입력 데이터를 저장하는 입력부;
상기 입력 데이터와 웨이트 데이터를 컨벌루션 연산하는 컨벌루션 블록;
상기 컨벌루션 연산된 데이터를 풀링 연산하는 풀링 블록; 및
상기 컨벌루션 연산 데이터 또는 풀링 연산 데이터를 저장하는 출력부를 포함하는 합성곱 신경망 연산 장치.
The method according to claim 1,
The channel set
An input unit for storing input data;
A convolution block for convoluting the input data and the weight data;
A pooling block for pooling the convoluted data; And
And an output section for storing the convolution operation data or the pooling operation data.
제2항에 있어서,
CNN 제어부는
상기 특징 추출 레이어 오퍼레이션에서 상기 채널 세트의 컨벌루션 블록 및 풀링 블록을 구동하여 컨벌루션 레이어 및 풀링 레이어 오퍼레이션을 수행하도록 제어하는 합성곱 신경망 연산 장치.
3. The method of claim 2,
The CNN control unit
And controls the convolution block and the pulling block of the channel set to perform a convolution layer and a pulling layer operation in the feature extraction layer operation.
제3항에 있어서,
CNN 제어부는
상기 특징 추출 레이어 오퍼레이션을 종료하면 클래시피케이션 레이어 오퍼레이션을 수행하며,
클래시피케이션 오퍼레이션에서 상기 채널 세트의 컨벌루션 블록을 구동하여 연결 레이어 오퍼레이션을 수행하도록 제어하는 합성곱 신경망 연산 장치.
The method of claim 3,
The CNN control unit
Upon completion of the feature extraction layer operation, a classification layer operation is performed,
And performs a connection layer operation by driving a convolution block of the channel set in a classification operation.
제4항에 있어서,
상기 컨벌루션 블록은
입력 데이터 및 가중 데이터를 수신하여 곱셈 연산을 하는 복수의 프로세스 앨리먼트들;
상기 프로세스 앨리먼트들에서 계산된 동일한 ID의 결과 값들을 가산하는 복수의 가산기들;
상기 가산기들에서 출력되는 동일 ID들의 가산 결과 값들을 누적하며, 최대치에 도달하면 풀링 연산부에 출력하는 어큐물레이터; 및
상기 입력부의 입력 데이터 및 상기 웨이트 레지스터의 웨이트 데이터를 상기 프로세서 앨리먼트들 중에서 준비된 프로세스 앨리먼트에 각각 입력시키는 프로세스 앨리먼트 제어부를 포함하는 합성곱 신경망 연산 장치.
5. The method of claim 4,
The convolution block
A plurality of process elements for receiving input data and weight data and performing a multiplication operation;
A plurality of adders for adding the result values of the same ID calculated in said process elements;
An accumulator for accumulating summed result values of the same IDs output from the adders, and outputting the summed result values to a pooling operation unit when a maximum value is reached; And
And a process element control section for inputting the input data of the input section and the weight data of the weight register to the process elements prepared in the processor elements, respectively.
제5항에 있어서,
프로세스 앨리먼트 제어부는
시작 및 종료 레이어 카운트 값을 확인하여 상기 웨이트 레지스터에서 대응되는 웨이트 데이터들을 프리페치하며,
입력 데이터와 프리페치한 해당 레이어의 웨이트 데이터를 각각 계산할 준비가 된 상기 프로세스 앨리먼트에 입력시키는 합성곱 신경망 연산 장치.
6. The method of claim 5,
The process element control unit
Fetching the corresponding weight data in the weight register by checking the start and end layer count values,
And inputs the weight data of the layer prefetched with the input data to the process element ready for calculation.
제3항에 있어서,
상기 풀링 블록은
상기 컨벌루션 블록에서 컨벌루션 연산을 수행하는 중에 두 개 이상의 컨벌루션 출력 값들이 존재하면 상기 컨벌루션 출력 값들을 풀링 연산하여 상기 출력부에 저장하는 합성곱 신경망 연산 장치.
The method of claim 3,
The pulling block
Wherein when there are two or more convolution output values during a convolution operation in the convolution block, the convolution output values are pooled and stored in the output unit.
제4항에 있어서,
상기 정보 처리부는 레이어 별로 구비되는 어드레스 맵을 저장하는 어드레스 맵 레지스터를 더 구비하며,
상기 CNN 제어부는 상기 출력 레지스터에 저장되는 데이터의 현재 레이어 컨피겨레이션을 확인하고, 상기 어드레스맵 레지스터의 데이터를 억세스하여 상기 입력부에 출력하는 합성곱 신경망 연산 장치.
5. The method of claim 4,
The information processing unit may further include an address map register for storing an address map provided for each layer,
Wherein the CNN control unit confirms a current layer configuration of data stored in the output register, and accesses data of the address map register and outputs the data to the input unit.
제8항에 있어서,
상기 어드레스 맵은 초기화 시점에서 외부 시스템으로 수신되는 합성곱 신경망 연산 장치.
9. The method of claim 8,
Wherein the address map is received at an initialization time point to an external system.
제4항에 있어서,
상기 CNN 제어부는
입력 데이터가 0이면 제로플래그를 세팅하고 제로 패딩된 입력 데이터를 상기 입력부에 저장하며,
상기 컨벌루션 블록은
상기 제로플래그가 세트된 입력 데이터의 컨벌루션 곱셈 연산을 생략하는 합성곱 신경망 연산 장치.
5. The method of claim 4,
The CNN control unit
If the input data is 0, a zero flag is set and zero padded input data is stored in the input unit,
The convolution block
And the convolution multiply operation of the input data in which the zero flag is set is omitted.
제10항에 있어서,
상기 컨벌루션 실행부의 프로세서 앨리먼트들은
상기 입력 데이터 및 웨이트 데이터를 곱셈 연산하는 곱셈기;
상기 입력 데이터 및 웨이트 데이터들을 논리 연산하는 연산기; 및
상기 연산기의 출력에 의해 상기 곱셈기의 출력 또는 제로 데이터를 선택 출력하는 선택기를 포함하며,
상기 선택기는 상기 입력 데이터 또는 웨이트 데이터가 제로 플래그이면 상기 제로 데이터를 선택하는 합성곱 신경망 연산 장치.
11. The method of claim 10,
The processor elements of the convolution unit
A multiplier for multiplying the input data and the weight data;
A calculator for logically computing the input data and the weight data; And
And a selector for selectively outputting the output of the multiplier or the zero data by the output of the operator,
And the selector selects the zero data if the input data or weight data is a zero flag.
제11항에 있어서,
프로세스 앨리먼트 제어부는
상기 웨이트 데이터가 0이면 상기 제로 플래그를 세트하여 상기 프로세스 앨리먼트에 입력시키는 합성곱 신경망 연산 장치.
12. The method of claim 11,
The process element control unit
And if the weight data is 0, sets the zero flag and inputs the zero flag to the process element.
제4항에 있어서,
상기 CNN 제어부는
채널 데이터의 특징 추출을 완료한 후 채널 카운트 값을 검사하며, 상기 채널 카운트 값이 최대값이 아니면 남은 채널들의 입력 데이터를 상기 채널 세트에 배정하여 특징 추출 동작을 수행하는 합성곱 신경망 연산 장치,
5. The method of claim 4,
The CNN control unit
A composite neural network computation device for performing a feature extraction operation by inserting input data of remaining channels into the channel set when the channel count value is not a maximum value after completion of feature extraction of channel data,
제4항에 있어서,
상기 CNN 제어부는
클래시피케이션 레이어의 첫번째 연결 레이어 오퍼레이션을 실행할 때 특징 추출 레이어오프레이션에서 연산된 모든 채널들의 결과 데이터를 하나의 채널 세트에 입력시키는 합성곱 신경망 연산 장치.
5. The method of claim 4,
The CNN control unit
A resultant data of all the channels calculated in the feature extraction layer offset is input to one channel set when the first link layer operation of the classification layer is performed.
제14항에 있어서,
정보처리부는
드롭 아웃 신호를 발생하는 드롭아웃신호 발생기를 포함하며,
상기 컨벌루션 블록은
상기 드롭아웃신호가 발생되면, 입력 데이터를 제로 데이터로 처리하는 합성곱 신경망 연산 장치.
15. The method of claim 14,
The information processing unit
And a dropout signal generator for generating a dropout signal,
The convolution block
And when the dropout signal is generated, processes the input data as zero data.
제15항에 있어서,
상기 CNN 제어부는
입력 데이터가 0이면 제로플래그를 세팅하며,
상기 컨벌루션 블록은
상기 입력 데이터 및 웨이트 데이터를 컨벌루션 곱셈 연산하는 복수의 프로그레스 앨리먼트들을 포함하며, 상기 프로세스 앨리먼트는 상기 제로플래그가 세트된 입력 데이터, 제로 플래그가 세트된 웨이트 데이터 또는 드롭 아웃 신호가 입력되면 컨벌루션 곱셈 연산을 생략하는 합성곱 신경망 연산 장치.
16. The method of claim 15,
The CNN control unit
If the input data is 0, a zero flag is set,
The convolution block
And a plurality of progress elements for performing a convolutional multiply operation on the input data and the weight data, wherein the process element performs a convolution multiply operation when the input data in which the zero flag is set, the weight data in which the zero flag is set, To the neural network.
웨이트 데이터를 저장하는 레지스터를 포함하는 정보 처리부와 컨벌루션 블록 및 풀링 블록을 포함하는 적어도 하나의 채널 세트를 포함하며,
상기 채널 세트의 컨벌루션 블록 및 풀링 블록을 활성화시켜 특징 추출 레이어의 오퍼레이션을 수행하는 과정과,
상기 특징 추출 레이어의 오퍼레이션이 완료되면 상기 채널 세트의 컨벌루션 블록을 활성화시켜 클래스피케이션 레이어 오퍼레이션을 수행하는 과정을 포함하는 합성곱 신경망 연산 장치의 동작 방법.
An information processing unit including a register for storing weight data, and at least one channel set including a convolution block and a pooling block,
Performing operations of a feature extraction layer by activating a convolution block and a pulling block of the channel set;
And when the operation of the feature extraction layer is completed, activating a convolution block of the channel set to perform a class-occupation layer operation.
제17항에 있어서,
상기 특징 추출 레이어 오퍼레이션을 수행하는 과정은
입력 데이터를 저장하는 과정;
상기 입력 데이터와 웨이트 데이터를 컨벌루션 연산하는 과정;
상기 컨벌루션 연산된 데이터를 풀링 연산하는 과정; 및
상기 풀링 연산 데이터를 출력하는 과정을 포함하는 합성곱 신경망 연산 장치의 동작 방법.
18. The method of claim 17,
The process of performing the feature extraction layer operation
Storing input data;
Performing a convolution operation on the input data and the weight data;
Performing a pooling operation on the convoluted data; And
And outputting the pulling operation data.
제18항에 있어서,
상기 컨벌루션 연산 과정은
입력 데이터 및 가중 데이터를 곱셈 연산하는 과정;
상기 곱셈 연산된 결과 값들 중에서 동일한 ID의 결과 값들을 가산하는 과정;
상기 동일 ID들의 가산 결과 값들을 누적하는 과정을 포함하는합성곱 신경망 연산 장치의 동작 방법.
19. The method of claim 18,
The convolution operation process
A step of multiplying the input data and the weighted data;
Adding result values of the same ID among the multiplication result values;
And accumulating summed result values of the same IDs.
제19항에 있어서,
상기 컨벌루션 연산 과정은
시작 및 종료 레이어 카운트 값을 확인하여 상기 웨이트 레지스터에서 대응되는 웨이트 데이터들을 프리페치하는 과정을 더 포함하는 합성곱 신경망 연산 장치의 동작 방법.
20. The method of claim 19,
The convolution operation process
Further comprising the step of prefetching the corresponding weight data in the weight register by checking the start and end layer count values.
제18항에 있어서,
상기 풀링 연산 과정은
상기 컨벌루션 과정에서 두 개 이상의 컨벌루션 연산 출력 값들이 존재하면 상기 컨벌루션 출력 값들을 풀링 연산하는 합성곱 신경망 연산 장치의 동작 방법.
19. The method of claim 18,
The pooling operation process
And if there are two or more convolution operation output values in the convolution process, performing the pulling operation on the convolution output values.
제21항에 있어서,
상기 풀링 연산 과정은
두개의 컨벌루션 연산 출력 값들 중에서 최대값을 선택하는 합성곱 신경망 연산 장치의 동작 방법.
22. The method of claim 21,
The pooling operation process
And selecting a maximum value among the two convolution operation output values.
제21항에 있어서,
상기 풀링 연산 과정은
두개의 컨벌루션 연산 출력 값들의 평균 값을 계산하는 합성곱 신경망 연산 장치의 동작 방법.
22. The method of claim 21,
The pooling operation process
And calculating an average value of the two convolution operation output values.
제18항에 있어서,
상기 정보 처리부는 레이어 별로 구비되는 어드레스 맵을 저장하는 어드레스 맵 레지스터를 더 구비하며,
상기 입력 데이터를 저장하는 과정은
상기 폴링 연산 출력 데이터의 레이어 컨피겨레이션을 확인하고, 상기 확인된 레이어 컨피겨레이션에 따른 어드레스맵 레지스터의 어드레스에 매핑하여 상기 폴링 연산 출력 데이터를 입력 데이터로 저장하는 합성곱 신경망 연산 장치의 동작 방법.
19. The method of claim 18,
The information processing unit may further include an address map register for storing an address map provided for each layer,
The process of storing the input data
An operation method of a composite neural network computation apparatus for checking the layer configuration of the polling operation output data and mapping the polling operation output data to an address of an address map register according to the confirmed layer configuration and storing the polling operation output data as input data .
제24항에 있어서,
상기 어드레스 맵은 초기화 시점에서 외부 시스템으로 수신하는 과정을 더 포함하는 합성곱 신경망 연산 장치의 동작 방법..
25. The method of claim 24,
And receiving the address map at an initialization time point to an external system.
제18항에 있어서,
상기 입력 데이터를 저장하는 과정은
입력 데이터가 0이면 제로플래그를 세팅하고,’
상기 컨벌루션 연산 과정은
상기 제로플래그가 세트된 입력 데이터의 곱셈 연산을 생략하는 합성곱 신경망 연산 장치의 동작 방법.
19. The method of claim 18,
The process of storing the input data
If the input data is 0, the zero flag is set,
The convolution operation process
And the multiplication operation of the input data in which the zero flag is set is omitted.
제26항에 있어서,
상기 컨벌루션 연산 과정은
상기 입력 데이터 및 웨이트 데이터를 곱셈 연산하는 곱셈기를 포함하며,
상기 입력 데이터 및 웨이트 데이터의 제로 플래그를 분석하는 과정;
상기 입력 데이터 또는 웨이트 데이터의 제로 플래그가 세트 상태이면 제로 데이터를 출력하는 과정; 및
상기 입력 데이터 및 웨이트 데이터의 제로 플래그가 리세트 상태이면 상기 곱셈기를 출력하는 과정을 포함하는 합성곱 신경망 연산 장치의 동작 방법.
27. The method of claim 26,
The convolution operation process
And a multiplier for multiplying the input data and the weight data,
Analyzing a zero flag of the input data and the weight data;
Outputting zero data if the zero flag of the input data or weight data is set; And
And outputting the multiplier if the zero flag of the input data and the weight data is in a reset state.
제22항에 있어서
상기 특징 추출 오퍼레이션을 수행하는 과정은
채널 데이터의 특징 추출을 완료한 채널 카운트 값을 검사하는 과정; 및
상기 채널 카운트 값이 최대 값이 아니면 남은 채널들의 입력 데이터를 상기 채널 세트에 배정하여 상기 특징 추출 오퍼레이션을 수행하는 단계를 더 포함하는 합성곱 신경망 연산 장치의 동작 방법.
The method of claim 22, wherein
The process of performing the feature extraction operation
A step of checking a channel count value for which feature extraction of channel data is completed; And
And performing the feature extraction operation by assigning input data of remaining channels to the channel set if the channel count value is not a maximum value.
제18항에 있어서,
클래시피케이션 레이어의 오퍼레이션을 수행하는 과정은
특징 추출 레이어에서 추출된 모든 채널의 결과 데이터를 하나의 채널 세트에 입력하는과정;
상기 입력 데이터와 웨이트 데이터를 컨벌루션 연산하는 과정; 및
상기 컨벌루션 연산 데이터를 출력하는 과정을 포함하는 합성곱 신경망 연산 장치의 동작 방법.
19. The method of claim 18,
The process of performing the operation of the classification layer
Inputting result data of all channels extracted from the feature extraction layer to one channel set;
Performing a convolution operation on the input data and the weight data; And
And outputting the convolution operation data.
제29항에 있어서,
정보처리부는
드롭 아웃 신호를 발생하는 드롭아웃신호 발생기를 포함하며,
상기 컨벌루션 연산 과정은
상기 입력 데이터 및 웨이트 데이터를 컨벌루션 곱셈 연산하는 복수의 프로그레스 앨리먼트들을 포함하며,
상기 프로세스 앨리먼트는 상기 제로플래그가 세트된 입력 데이터, 제로 플래그가 세트된 웨이트 데이터 또는 드롭 아웃 신호가 입력되면 컨벌루션 곱셈 연산을 생략하는 합성곱 신경망 연산 장치의 동작 방법.

30. The method of claim 29,
The information processing unit
And a dropout signal generator for generating a dropout signal,
The convolution operation process
And a plurality of progressive elements for performing a convolutional multiply operation on the input data and the weight data,
Wherein the process element skips a convolutional multiply operation when input data in which the zero flag is set, weight data in which a zero flag is set, or a dropout signal is input.

KR1020160124574A 2016-09-28 2016-09-28 Apparatus and method test operating of convolutional neural network KR20180034853A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
KR1020160124574A KR20180034853A (en) 2016-09-28 2016-09-28 Apparatus and method test operating of convolutional neural network
US15/618,683 US11449745B2 (en) 2016-09-28 2017-06-09 Operation apparatus and method for convolutional neural network
CN201710711678.4A CN107871163B (en) 2016-09-28 2017-08-18 Operation device and method for convolutional neural network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160124574A KR20180034853A (en) 2016-09-28 2016-09-28 Apparatus and method test operating of convolutional neural network

Publications (1)

Publication Number Publication Date
KR20180034853A true KR20180034853A (en) 2018-04-05

Family

ID=61687304

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160124574A KR20180034853A (en) 2016-09-28 2016-09-28 Apparatus and method test operating of convolutional neural network

Country Status (3)

Country Link
US (1) US11449745B2 (en)
KR (1) KR20180034853A (en)
CN (1) CN107871163B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101974495B1 (en) * 2018-08-21 2019-05-03 한국과학기술정보연구원 Apparatus for predicting traffic information, method thereof and recoding medium for predicting traffic information
KR20200050892A (en) * 2018-11-02 2020-05-12 주식회사 에이아이인사이트 Deep Learning Architecture System for Automatic Interpretation of Medical Video
WO2020091516A3 (en) * 2018-11-02 2020-06-25 주식회사 에이아이인사이트 Deep learning architecture system for automatic medical image reading
KR20220009483A (en) * 2019-06-18 2022-01-24 주식회사 퓨리오사에이아이 Method and apparatus for processing convolutional operation of neural network processor
KR102371451B1 (en) * 2021-05-27 2022-03-07 충남대학교 산학협력단 Parallel multiplication apparatus using multi-port memory
KR20220132780A (en) * 2021-03-24 2022-10-04 한국과학기술연구원 Real time frame to spike train converter for neuromorphic system

Families Citing this family (45)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10387740B2 (en) * 2016-10-10 2019-08-20 Gyrfalcon Technology Inc. Object detection and recognition apparatus based on CNN based integrated circuits
US10402628B2 (en) * 2016-10-10 2019-09-03 Gyrfalcon Technology Inc. Image classification systems based on CNN based IC and light-weight classifier
US10366328B2 (en) * 2017-09-19 2019-07-30 Gyrfalcon Technology Inc. Approximating fully-connected layers with multiple arrays of 3x3 convolutional filter kernels in a CNN based integrated circuit
US10366302B2 (en) * 2016-10-10 2019-07-30 Gyrfalcon Technology Inc. Hierarchical category classification scheme using multiple sets of fully-connected networks with a CNN based integrated circuit as feature extractor
US10360470B2 (en) * 2016-10-10 2019-07-23 Gyrfalcon Technology Inc. Implementation of MobileNet in a CNN based digital integrated circuit
US10339445B2 (en) * 2016-10-10 2019-07-02 Gyrfalcon Technology Inc. Implementation of ResNet in a CNN based digital integrated circuit
KR102499396B1 (en) * 2017-03-03 2023-02-13 삼성전자 주식회사 Neural network device and operating method of neural network device
GB201704373D0 (en) * 2017-03-20 2017-05-03 Rolls-Royce Ltd Surface defect detection
CN106897714B (en) * 2017-03-23 2020-01-14 北京大学深圳研究生院 Video motion detection method based on convolutional neural network
EP3620992A1 (en) * 2017-04-06 2020-03-11 Shanghai Cambricon Information Technology Co., Ltd Neural network processor and neural network computation method
US11551067B2 (en) * 2017-04-06 2023-01-10 Shanghai Cambricon Information Technology Co., Ltd Neural network processor and neural network computation method
US11429848B2 (en) * 2017-10-17 2022-08-30 Xilinx, Inc. Host-directed multi-layer neural network processing via per-layer work requests
US10452540B2 (en) 2017-10-20 2019-10-22 International Business Machines Corporation Memory-mapped interface for message passing computing systems
US11182668B2 (en) 2017-11-06 2021-11-23 Imagination Technologies Limited Neural network architecture using convolution engine filter weight buffers
US10621489B2 (en) * 2018-03-30 2020-04-14 International Business Machines Corporation Massively parallel neural inference computing elements
CN110321997B (en) * 2018-03-31 2021-10-19 赛灵思公司 High-parallelism computing platform, system and computing implementation method
CN108664993B (en) * 2018-04-08 2022-01-11 浙江工业大学 Dense weight connection convolutional neural network image classification method
US10558430B2 (en) * 2018-04-17 2020-02-11 Fotonation Limited Neural network engine
US11645493B2 (en) 2018-05-04 2023-05-09 Microsoft Technology Licensing, Llc Flow for quantized neural networks
JP7240657B2 (en) * 2018-05-15 2023-03-16 Tokyo Artisan Intelligence株式会社 Neural network circuit device, neural network, neural network processing method, and neural network execution program
CN110490295B (en) * 2018-05-15 2022-04-05 华为技术有限公司 Data processing method and processing device
CN108805267B (en) * 2018-05-28 2021-09-10 重庆大学 Data processing method for hardware acceleration of convolutional neural network
CN109102065B (en) * 2018-06-28 2022-03-11 广东工业大学 Convolutional neural network accelerator based on PSoC
US11836971B2 (en) * 2018-08-23 2023-12-05 Samsung Electronics Co., Ltd. Method and device with convolution neural network processing
US11281974B2 (en) * 2018-10-25 2022-03-22 GM Global Technology Operations LLC Activation zero-bypass and weight pruning in neural networks for vehicle perception systems
EP3889844A4 (en) * 2018-12-29 2021-12-29 Huawei Technologies Co., Ltd. Neural network system and data processing technology
CN113597621A (en) * 2018-12-29 2021-11-02 华为技术有限公司 Computing resource allocation technique and neural network system
WO2020172494A1 (en) 2019-02-22 2020-08-27 Neureality Ltd. Directed and interconnected grid dataflow architecture
US11604958B2 (en) 2019-03-13 2023-03-14 Samsung Electronics Co., Ltd. Method and apparatus for processing computation of zero value in processing of layers in neural network
CN110070178B (en) * 2019-04-25 2021-05-14 北京交通大学 Convolutional neural network computing device and method
US20200387776A1 (en) * 2019-06-04 2020-12-10 XNOR.ai, Inc. Butterfly transform layer
CN112149047A (en) * 2019-06-27 2020-12-29 深圳市中兴微电子技术有限公司 Data processing method and device, storage medium and electronic device
US11222092B2 (en) 2019-07-16 2022-01-11 Facebook Technologies, Llc Optimization for deconvolution
US11468147B1 (en) * 2019-07-22 2022-10-11 Habana Labs Ltd. Activation function approximation in deep neural networks using rectified-linear-unit function
JP2023510446A (en) * 2019-11-14 2023-03-14 インテル コーポレイション Adaptively encode video frames using content and network analysis
KR20210077352A (en) * 2019-12-17 2021-06-25 에스케이하이닉스 주식회사 Data Processing System and accelerating DEVICE therefor
CN111260050B (en) * 2020-01-19 2023-03-07 中国电子科技集团公司信息科学研究院 Method and device for controlling convolutional neural network to process data
TWI733334B (en) 2020-02-15 2021-07-11 財團法人工業技術研究院 Convolutional neural-network calculating apparatus and operation methods thereof
US20210312258A1 (en) * 2020-04-01 2021-10-07 Sony Corporation Computing temporal convolution networks in real time
CN112052881B (en) * 2020-08-14 2022-07-29 河海大学 Hyperspectral image classification model device based on multi-scale near-end feature splicing
CN111985645A (en) * 2020-08-28 2020-11-24 北京市商汤科技开发有限公司 Neural network training method and device, electronic equipment and storage medium
WO2022061867A1 (en) * 2020-09-28 2022-03-31 深圳市大疆创新科技有限公司 Data processing method and apparatus, and computer-readable storage medium
KR20220063026A (en) * 2020-11-09 2022-05-17 충북대학교 산학협력단 Convolutional Neural Network based on Channel-specific Convolution for High-Speed Object Recognition of 3D LiDAR
CN114089911B (en) * 2021-09-07 2024-01-05 上海新氦类脑智能科技有限公司 Block segmentation and splicing processing method, device, equipment and medium based on data multiplexing
CN114648107A (en) * 2022-03-10 2022-06-21 北京宏景智驾科技有限公司 Method and circuit for improving efficiency of calculation of neural network input image point cloud convolution layer

Family Cites Families (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB8627490D0 (en) 1986-11-18 1986-12-17 British Petroleum Co Plc Coordination
US5909562A (en) 1997-05-01 1999-06-01 Hewlett-Packard Co. Backup FIFO in-line storage
KR100640579B1 (en) 2004-01-05 2006-10-31 삼성전자주식회사 Embedded MCU for high speed testing by memory emulation module and test method thereof
US7522600B1 (en) 2004-08-30 2009-04-21 Juniper Networks, Inc. Transport of control and data traffic for multicast virtual private networks
CN100559362C (en) 2007-10-30 2009-11-11 北京时代民芯科技有限公司 A kind of external memory interface
CN101266463A (en) 2008-04-29 2008-09-17 江南大学 Fuzzy controller based on FPGA
JP5856434B2 (en) * 2011-10-25 2016-02-09 ルネサスエレクトロニクス株式会社 Bus connection circuit, semiconductor device, and operation method of bus connection circuit
KR20130090147A (en) 2012-02-03 2013-08-13 안병익 Neural network computing apparatus and system, and method thereof
US10192062B2 (en) * 2014-06-20 2019-01-29 Cypress Semiconductor Corporation Encryption for XIP and MMIO external memories
US10169618B2 (en) 2014-06-20 2019-01-01 Cypress Semiconductor Corporation Encryption method for execute-in-place memories
US9411726B2 (en) * 2014-09-30 2016-08-09 Samsung Electronics Co., Ltd. Low power computation architecture
KR102276339B1 (en) 2014-12-09 2021-07-12 삼성전자주식회사 Apparatus and method for training convolutional neural network for approximation of convolutional neural network
US10049322B2 (en) * 2015-05-21 2018-08-14 Google Llc Prefetching weights for use in a neural network processor
US10192162B2 (en) * 2015-05-21 2019-01-29 Google Llc Vector computation unit in a neural network processor
CN104915322B (en) 2015-06-09 2018-05-01 中国人民解放军国防科学技术大学 A kind of hardware-accelerated method of convolutional neural networks
US20160379109A1 (en) * 2015-06-29 2016-12-29 Microsoft Technology Licensing, Llc Convolutional neural networks on hardware accelerators
US11244225B2 (en) * 2015-07-10 2022-02-08 Samsung Electronics Co., Ltd. Neural network processor configurable using macro instructions
CN105488565A (en) 2015-11-17 2016-04-13 中国科学院计算技术研究所 Calculation apparatus and method for accelerator chip accelerating deep neural network algorithm
CN105681628B (en) 2016-01-05 2018-12-07 西安交通大学 A kind of convolutional network arithmetic element and restructural convolutional neural networks processor and the method for realizing image denoising processing
CN105678379B (en) 2016-01-12 2020-08-07 腾讯科技(深圳)有限公司 CNN processing method and device
US9847974B2 (en) * 2016-04-28 2017-12-19 Xerox Corporation Image document processing in a client-server system including privacy-preserving text recognition
US10120649B2 (en) * 2016-07-29 2018-11-06 Microunity Systems Engineering, Inc. Processor and method for outer product accumulate operations
US11367246B2 (en) * 2016-08-19 2022-06-21 Movidius Ltd. Operations using sparse volumetric data

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101974495B1 (en) * 2018-08-21 2019-05-03 한국과학기술정보연구원 Apparatus for predicting traffic information, method thereof and recoding medium for predicting traffic information
KR20200050892A (en) * 2018-11-02 2020-05-12 주식회사 에이아이인사이트 Deep Learning Architecture System for Automatic Interpretation of Medical Video
WO2020091516A3 (en) * 2018-11-02 2020-06-25 주식회사 에이아이인사이트 Deep learning architecture system for automatic medical image reading
KR20220009483A (en) * 2019-06-18 2022-01-24 주식회사 퓨리오사에이아이 Method and apparatus for processing convolutional operation of neural network processor
KR20220132780A (en) * 2021-03-24 2022-10-04 한국과학기술연구원 Real time frame to spike train converter for neuromorphic system
KR102371451B1 (en) * 2021-05-27 2022-03-07 충남대학교 산학협력단 Parallel multiplication apparatus using multi-port memory

Also Published As

Publication number Publication date
US20180089562A1 (en) 2018-03-29
CN107871163B (en) 2022-05-24
CN107871163A (en) 2018-04-03
US11449745B2 (en) 2022-09-20

Similar Documents

Publication Publication Date Title
KR20180034853A (en) Apparatus and method test operating of convolutional neural network
CN104915322B (en) A kind of hardware-accelerated method of convolutional neural networks
JP7329533B2 (en) Method and accelerator apparatus for accelerating operations
JP6857286B2 (en) Improved performance of neural network arrays
JP2021521516A (en) Accelerators and systems for accelerating operations
CN109543830B (en) Splitting accumulator for convolutional neural network accelerator
CN110325963A (en) The multi-functional unit for programmable hardware node for Processing with Neural Network
CN108564169A (en) Hardware processing element, neural network unit and computer usable medium
US11314842B1 (en) Hardware implementation of mathematical functions
WO2021249192A1 (en) Image processing method and apparatus, machine vision device, electronic device and computer-readable storage medium
US20240104019A1 (en) Enhancing memory utilization and throughput in executing a computational graph
KR20190089685A (en) Method and apparatus for processing data
WO2023236319A1 (en) Convolutional neural network deployment and optimization method for microcontroller
CN117751366A (en) Neural network accelerator and data processing method thereof
JP2023519565A (en) Sparsity-Based Feature Reordering for Improved Memory-Compact Transfer During Machine Learning Jobs
CN114677548A (en) Neural network image classification system and method based on resistive random access memory
CN110377874B (en) Convolution operation method and system
US11669736B2 (en) Executing neural networks on electronic devices
CN112348182A (en) Neural network maxout layer computing device
JP2023519564A (en) Similarity-Based Feature Reordering to Improve Memory Compression Transfer During Machine Learning Jobs
Jiang et al. Optimizing small channel 3D convolution on GPU with tensor core
CN113554164A (en) Neural network model optimization method, neural network model data processing method, neural network model optimization device, neural network model data processing device and storage medium
KR20220110460A (en) Method and apparatus for analyzing data using artificial neural network model
CN114925780A (en) Optimization and acceleration method of lightweight CNN classifier based on FPGA
CN110716751A (en) High-parallelism computing platform, system and computing implementation method

Legal Events

Date Code Title Description
A201 Request for examination