KR20220107808A - A mixed-signal binarized neural network circuit device - Google Patents

A mixed-signal binarized neural network circuit device Download PDF

Info

Publication number
KR20220107808A
KR20220107808A KR1020210010941A KR20210010941A KR20220107808A KR 20220107808 A KR20220107808 A KR 20220107808A KR 1020210010941 A KR1020210010941 A KR 1020210010941A KR 20210010941 A KR20210010941 A KR 20210010941A KR 20220107808 A KR20220107808 A KR 20220107808A
Authority
KR
South Korea
Prior art keywords
neural network
network circuit
current
circuit device
mixed
Prior art date
Application number
KR1020210010941A
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 KR1020210010941A priority Critical patent/KR20220107808A/en
Publication of KR20220107808A publication Critical patent/KR20220107808A/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/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
    • 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
    • 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
    • G06N3/0454
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Molecular Biology (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Mathematical Physics (AREA)
  • General Health & Medical Sciences (AREA)
  • Neurology (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Logic Circuits (AREA)

Abstract

The present invention relates to a neural network circuit technology. More specifically, the present invention relates to a mixed signal binarization neural network circuit device that realizes an edge computing of a neural network by implementing a circuit that performs a core operation of a binarization neural network. Therefore, the present invention is capable of reducing a power consumption and an area.

Description

혼성신호 이진화 신경망 회로 장치{A MIXED-SIGNAL BINARIZED NEURAL NETWORK CIRCUIT DEVICE}Mixed-signal binarized neural network circuit device {A MIXED-SIGNAL BINARIZED NEURAL NETWORK CIRCUIT DEVICE}

본 발명은 신경망 회로 기술에 관한 것으로, 보다 상세하게는 이진화 신경망의 핵심 연산을 수행하는 회로를 구현하여 신경망의 엣지 컴퓨팅을 실현하는 혼성신호 이진화 신경망 회로 장치에 관한 것이다.The present invention relates to neural network circuit technology, and more particularly, to a mixed-signal binarized neural network circuit device that realizes edge computing of a neural network by implementing a circuit that performs a core operation of a binarized neural network.

인공 신경망(artificial neural network)은 연속적인 multiply-and-accumulate (MAC) 연산을 통하여 이루어진다.Artificial neural networks are built through successive multiply-and-accumulate (MAC) operations.

Figure pat00001
Figure pat00001

여기서 xi는 입력, wi는 가중치, b는 바이어스, y은 출력이다. 흔히 디지털 회로로 수행이 되는 이 수식의 연산을 아날로그회로로 수행하여 전력효율 및 동작속도 등을 높이고자 한다.where x i is the input, w i is the weight, b is the bias, and y is the output. The calculation of this formula, which is often performed with a digital circuit, is performed with an analog circuit to increase power efficiency and operating speed.

binary neural network (BNN: 이진신경망)은 신경망에서 입력과 출력 및 가중치를 0과 1 (또는 -1과 1)의 이진(binary)으로 하는 신경망이다. 이진신경망 (BNN)은 기계학습을 통해 인공지능 기능을 수행할 수 있는 신경망 알고리즘 중 하나이다. 이진신경망 (BNN) 알고리즘은 이진의 웨이트와 이진의 출력을 갖는 활성화 함수를 사용하여 메모리 사이즈, 연산 복잡도 그리고 파워 소모를 크게 줄임으로써 하드웨어에서 수행하기 적합하다.A binary neural network (BNN) is a neural network in which inputs, outputs, and weights are binary 0 and 1 (or -1 and 1) in a neural network. Binary Neural Network (BNN) is one of the neural network algorithms that can perform artificial intelligence functions through machine learning. Binary Neural Network (BNN) algorithm is suitable to perform in hardware by greatly reducing memory size, computational complexity and power consumption by using binary weight and activation function with binary output.

기존에는 신경망의 핵심 연산인 MAC을 병렬 연산에 유리한 GPU에서 수행하여 학습 속도를 빠르게 했지만 GPU는 파워 소모가 크고 집적도가 낮다는 문제점이 있다.In the past, MAC, which is the core operation of neural networks, was performed on a GPU that is advantageous for parallel operation to speed up the learning speed, but the GPU has a problem in that power consumption is large and the density is low.

한국공개특허 제10-2019-0094679호 (2019.08.14)Korean Patent Publication No. 10-2019-0094679 (2019.08.14)

본 발명은 기존의 문제점을 해결하기 위해 BNN의 핵심 연산을 칩에서 수행한다. 해당 회로의 전류 거울 뉴런은 전류 영역에서 MAC 연산을 수행하고 비교기를 사용하여 sign 활성화 함수를 연산한다. 본 회로는 인공지능 분야에서 많이 사용되고 있는 신경망을 설계했기 때문에 음성인식, Internet of Things (IoT), 영상처리, 자율주행 그리고 이미지 분류 등 다양한 분야에서 사용될 수 있는 중요 기술이다.The present invention performs the core operation of the BNN in a chip in order to solve the existing problems. The current mirror neurons in the circuit perform MAC operations in the current domain and use a comparator to compute the sign activation function. This circuit is an important technology that can be used in various fields such as voice recognition, Internet of Things (IoT), image processing, autonomous driving, and image classification because it has designed a neural network that is widely used in the field of artificial intelligence.

본 발명의 일 실시예는 이진화 신경망의 핵심 연산을 수행하는 회로를 구현하여 신경망의 엣지 컴퓨팅을 실현하고 GPU를 이용한 신경망 연산을 칩에서 수행하여 파워 소모와 면적을 줄일 수 있는 혼성신호 이진화 신경망 회로 장치를 제공하고자 한다.An embodiment of the present invention implements a circuit that performs a core operation of a binarized neural network to realize edge computing of a neural network, and performs a neural network operation using a GPU in a chip to reduce power consumption and area. would like to provide

특정 장치에서 인공지능 관련 기능을 수행할 때 신경망 학습을 클라우드에서 진행한 후 해당 정보를 통신하여 받을 경우 여러 가지 문제점이 발생한다. 신경망 학습에 필요한 연산을 데이터 센터 내에서 처리하기 때문에 데이터 센터와 장치 사이의 거리에 따라서 통신 지연이 발생하고 네트워크의 대역폭에 따라서 통신 속도가 영향을 받는다. 즉, 클라우드에서 신경망 학습을 빠르게 해도 장치와의 통신 과정에서 속도가 매우 감소할 수 있다.When performing artificial intelligence-related functions on a specific device, various problems occur when neural network learning is performed in the cloud and then the information is communicated to and received. Because the computation required for neural network learning is processed within the data center, communication delay occurs depending on the distance between the data center and the device, and the communication speed is affected by the bandwidth of the network. In other words, even if the neural network learning in the cloud is fast, the speed may be greatly reduced in the communication process with the device.

또한, 클라우드와 엣지 사이의 데이터 전송은 높은 보안성도 요구된다. 클라우드에서 신경망 학습할 경우 하드웨어 측면에서도 문제점이 생긴다. 데이터 센터에서는 범용적으로 이용되는 CPU와 GPU를 연산처리장치로 사용하는데 신경망 학습에 필요한 연산을 GPU에서 수행할 경우 속도는 빠르지만 파워 소모가 크고 집적도가 낮다는 문제점이 발생한다.In addition, high security is also required for data transmission between the cloud and the edge. When learning neural networks in the cloud, there are also problems in terms of hardware. In data centers, general-purpose CPUs and GPUs are used as arithmetic processing units, but when the computation required for neural network learning is performed on the GPU, the speed is high, but the power consumption is high and the degree of integration is low.

이 같은 문제점들을 해결하고자 신경망 연산을 엣지에서 수행한다. 또한, 신경망 알고리즘 중에서 연산에 사용되는 웨이트의 비트 사이즈를 1bit로 제한하여 학습하는 BNN 구조를 사용하여 메모리 사이즈와 파워 소모를 줄인다. BNN의 핵심 연산인 MAC 연산과 sign 활성화 함수를 수행하기 위해서 도1과 같은 회로를 구성한다.To solve these problems, neural network computation is performed at the edge. In addition, memory size and power consumption are reduced by using a BNN structure that learns by limiting the bit size of weights used in calculations to 1 bit among neural network algorithms. In order to perform the MAC operation and the sign activation function, which are the core operations of BNN, the circuit shown in FIG. 1 is configured.

본 발명의 회로가 동작하기 위해서는 신경망 연산에 필요한 파라미터들을 메모리에 저장해야 한다. 입력 데이터, 웨이트 그리고 바이어스 값들을 입력해주면 도 1과 같은 전류 거울 뉴런에서 MAC 연산을 수행한다. BNN에 적용되는 경우 도 6과 같이 MAC 연산에서 입력 값과 웨이트의 곱셈은 XNOR 게이트에서 수행한다. 바이어스 값은 디지털 신호의 경우 NMOS 거울의 폭을 스위치로 조절하여 반영하고 아날로그 신호의 경우 NMOS 거울의 게이트-소스 전압을 조절하여 인가한다. 입력과 웨이트를 곱한 값과 바이어스의 부호는 각각의 NMOS 거울과 연결된 전류 스위치를 조절하여 전류의 부호를 결정한다. 양의 전류 스위치는 다이오드 연결된 PMOS와 연결되고 음의 전류 스위치는 PMOS 거울과 연결된다. 이때 서로 다른 부호의 전류 차이가 드레인 노드 전압 vd를 결정한다. 최종적으로 비교기에서 레퍼런스 전압과 vd를 비교해서 sign 활성화 함수를 수행한다.In order for the circuit of the present invention to operate, parameters necessary for neural network operation must be stored in a memory. If input data, weight, and bias values are input, MAC operation is performed in the current mirror neuron as shown in FIG. 1 . When applied to BNN, multiplication of an input value and a weight in the MAC operation is performed by the XNOR gate as shown in FIG. 6 . The bias value is applied by adjusting the width of the NMOS mirror with a switch in the case of a digital signal and adjusting the gate-source voltage of the NMOS mirror in the case of an analog signal. The multiplied value of the input and the weight and the sign of the bias determine the sign of the current by adjusting the current switch connected to each NMOS mirror. The positive current switch is connected to the diode-connected PMOS and the negative current switch is connected to the PMOS mirror. At this time, the difference in currents of different signs determines the drain node voltage vd. Finally, the comparator compares the reference voltage and vd to perform the sign activation function.

개시된 기술은 다음의 효과를 가질 수 있다. 다만, 특정 실시예가 다음의 효과를 전부 포함하여야 한다거나 다음의 효과만을 포함하여야 한다는 의미는 아니므로, 개시된 기술의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.The disclosed technology may have the following effects. However, this does not mean that a specific embodiment should include all of the following effects or only the following effects, so the scope of the disclosed technology should not be construed as being limited thereby.

본 발명의 일 실시예에 따른 혼성신호 이진화 신경망 회로 장치는 이진화 신경망의 핵심 연산을 수행하는 회로를 구현하여 신경망의 엣지 컴퓨팅을 실현하고 GPU를 이용한 신경망 연산을 칩에서 수행하여 파워 소모와 면적을 줄일 수 있다.A mixed-signal binarized neural network circuit device according to an embodiment of the present invention realizes edge computing of a neural network by implementing a circuit that performs a core operation of a binarized neural network, and performs neural network computation using GPU in a chip to reduce power consumption and area can

도 1은 신경망 (Neural Network) 연산을 수행하는 전류 거울 뉴런 회로를 도시한 도면.
도 2는 가중치 크기를 디지털 값으로 조절하는 회로를 도시한 도면.
도 3은 가중치 크기를 아날로그 값 Vcontrol로 조절하는 회로를 도시한 도면.
도 4는 바이어스 크기를 디지털 값으로 조절하는 회로를 도시한 도면.
도 5는 게이트 전압을 조절하여 바이어스 크기를 조절하는 회로를 도시한 도면.
도 6은 BNN (이진신경망) 연산을 수행하는 전류 거울 뉴런 회로를 도시한 도면.
도 7은 도 6의 vd 노드에서 바라보는 RC 등가회로를 도시한 도면.
1 is a diagram illustrating a current mirror neuron circuit for performing a Neural Network operation.
Fig. 2 is a diagram showing a circuit for adjusting a weight size with a digital value;
Fig. 3 is a diagram showing a circuit for adjusting a weight size with an analog value V control .
Fig. 4 is a diagram showing a circuit for adjusting a bias magnitude with a digital value;
5 is a diagram illustrating a circuit for adjusting a bias magnitude by adjusting a gate voltage.
6 is a diagram illustrating a current mirror neuron circuit that performs a BNN (binary neural network) operation.
FIG. 7 is a diagram illustrating an RC equivalent circuit viewed from the vd node of FIG. 6 .

본 발명에 관한 설명은 구조적 내지 기능적 설명을 위한 실시예에 불과하므로, 본 발명의 권리범위는 본문에 설명된 실시예에 의하여 제한되는 것으로 해석되어서는 아니 된다. 즉, 실시예는 다양한 변경이 가능하고 여러 가지 형태를 가질 수 있으므로 본 발명의 권리범위는 기술적 사상을 실현할 수 있는 균등물들을 포함하는 것으로 이해되어야 한다. 또한, 본 발명에서 제시된 목적 또는 효과는 특정 실시예가 이를 전부 포함하여야 한다거나 그러한 효과만을 포함하여야 한다는 의미는 아니므로, 본 발명의 권리범위는 이에 의하여 제한되는 것으로 이해되어서는 아니 될 것이다.Since the description of the present invention is merely an embodiment for structural or functional description, the scope of the present invention should not be construed as being limited by the embodiment described in the text. That is, since the embodiment is capable of various changes and may have various forms, it should be understood that the scope of the present invention includes equivalents capable of realizing the technical idea. In addition, since the object or effect presented in the present invention does not mean that a specific embodiment should include all of them or only such effects, it should not be understood that the scope of the present invention is limited thereby.

한편, 본 출원에서 서술되는 용어의 의미는 다음과 같이 이해되어야 할 것이다.On the other hand, the meaning of the terms described in the present application should be understood as follows.

"제1", "제2" 등의 용어는 하나의 구성요소를 다른 구성요소로부터 구별하기 위한 것으로, 이들 용어들에 의해 권리범위가 한정되어서는 아니 된다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다.Terms such as “first” and “second” are for distinguishing one component from another, and the scope of rights should not be limited by these terms. For example, a first component may be termed a second component, and similarly, a second component may also be termed a first component.

어떤 구성요소가 다른 구성요소에 "연결되어"있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결될 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어"있다고 언급된 때에는 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. 한편, 구성요소들 간의 관계를 설명하는 다른 표현들, 즉 "~사이에"와 "바로 ~사이에" 또는 "~에 이웃하는"과 "~에 직접 이웃하는" 등도 마찬가지로 해석되어야 한다.When a component is referred to as being “connected” to another component, it may be directly connected to the other component, but it should be understood that other components may exist in between. On the other hand, when it is mentioned that a certain element is "directly connected" to another element, it should be understood that the other element does not exist in the middle. On the other hand, other expressions describing the relationship between elements, that is, "between" and "between" or "neighboring to" and "directly adjacent to", etc., should be interpreted similarly.

단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한 복수의 표현을 포함하는 것으로 이해되어야 하고, "포함하다"또는 "가지다" 등의 용어는 실시된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함을 지정하려는 것이며, 하나 또는 그 이상의 다른 특징이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The singular expression is to be understood to include the plural expression unless the context clearly dictates otherwise, and terms such as "comprises" or "have" refer to the embodied feature, number, step, action, component, part or these It is intended to indicate that a combination exists, and it should be understood that it does not preclude the possibility of the existence or addition of one or more other features or numbers, steps, operations, components, parts, or combinations thereof.

각 단계들에 있어 식별부호(예를 들어, a, b, c 등)는 설명의 편의를 위하여 사용되는 것으로 식별부호는 각 단계들의 순서를 설명하는 것이 아니며, 각 단계들은 문맥상 명백하게 특정 순서를 기재하지 않는 이상 명기된 순서와 다르게 일어날 수 있다. 즉, 각 단계들은 명기된 순서와 동일하게 일어날 수도 있고 실질적으로 동시에 수행될 수도 있으며 반대의 순서대로 수행될 수도 있다.Identifiers (eg, a, b, c, etc.) in each step are used for convenience of description, and the identification code does not describe the order of each step, and each step clearly indicates a specific order in context. Unless otherwise specified, it may occur in a different order from the specified order. That is, each step may occur in the same order as specified, may be performed substantially simultaneously, or may be performed in the reverse order.

여기서 사용되는 모든 용어들은 다르게 정의되지 않는 한, 본 발명이 속하는 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한 이상적이거나 과도하게 형식적인 의미를 지니는 것으로 해석될 수 없다.All terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs, unless otherwise defined. Terms defined in general used in the dictionary should be interpreted as having the meaning consistent with the context of the related art, and cannot be interpreted as having an ideal or excessively formal meaning unless explicitly defined in the present application.

인공 신경망(artificial neural network)은 연속적인 multiply-and-accumulate (MAC) 연산을 통하여 이루어진다. Artificial neural networks are built through successive multiply-and-accumulate (MAC) operations.

Figure pat00002
Figure pat00002

여기서 i번째 입력에 대하여 xi는 입력, wi는 가중치, b는 바이어스, y은 출력이다. 위와 같은 식을 전류거울로 구현하기 위하면 도 1에서와 같이 표현된다. 입력 xi에 대하여 입력전류거울의 비율(전류거울을 이루는 MOSFET의 크기 비율)로 가중치 wi를 곱하게 된 후 전류로 변환되어, 바이어스 b에 해당하는 전류를 모두 합산전류거울에서 합하게 된다. 이 같은 과정을 통하여 위 식의 연산은 전류거울 기반의 회로로 구현할 수 있다 (도 1). 전류를 더하는 방식에 있어서 양 입력전류 (+) 뿐만 아니라 음의 입력전류(-)를 처리하기 위하여, 입력전류에 가중치 wi를 곱하여 복사한 전류 wixi가 양인 경우 기준 전류에 합류시켜 더하고, 음인 경우 복사 전류 노드에서 차감하여 뺄셈이 되게 회로를 구성한다 (도 1).Here, for the i-th input, x i is the input, w i is the weight, b is the bias, and y is the output. In order to implement the above equation as a current mirror, it is expressed as in FIG. 1 . After multiplying the input x i by the weight w i by the ratio of the input current mirror (the ratio of the size of the MOSFET constituting the current mirror), it is converted into a current, and all currents corresponding to the bias b are summed in the summing current mirror. Through this process, the operation of the above equation can be implemented as a current mirror-based circuit (FIG. 1). In the method of adding current, in order to handle negative input current (-) as well as positive input current (+), multiply the input current by weight w i , and if the copied current w i x i is positive, add it to the reference current , configure the circuit to be subtracted by subtracting from the radiant current node when it is negative (FIG. 1).

가중치 wi는 전류거울의 전류 복사 비율로 아날로그 및 디지털의 방법에 의하여 다양하게 조절될 수 있다 (도 2와 도 3). 몇 가지 예로 전류복사 비율을 디지털 신호로 조절하거나, 전류거울의 복사단 트랜지스터에 가변저항을 연결하여 컨트롤 전압 (Vcontrol)을 조절함으로써 가중치를 조절하는 방식이 가능하다. 도 2에서 디지털신호 bn-1bn-2 ... b0은 sign-magnitude로 구성된 디지털컨트롤 시그널이며, bn-1은 sign bit이다.The weight w i is the current radiation ratio of the current mirror and can be variously adjusted by analog and digital methods ( FIGS. 2 and 3 ). In some examples, it is possible to adjust the current radiation ratio with a digital signal, or to adjust the weight by connecting a variable resistor to the radiation end transistor of the current mirror and adjusting the control voltage (Vcontrol). In FIG. 2, digital signals b n-1 b n-2 ... b 0 are digital control signals composed of sign-magnitude, and b n-1 is a sign bit.

바이어스 b는 이에 해당하는 전압 vb에 대하여 아날로그 및 디지털 방식으로 조절할 수 있게 된다. 도 4의 회로는 바이어스 크기를 디지털 값으로 조절하는 회로이다. 이때 n은 바이어스의 비트 수를 의미한다. 바이어스의 각 비트는 2n-1배의 폭을 가진 NMOS로 구현하여 해당 바이어스 값에 상응하는 전류를 흐르게 한다. 각각의 비트 크기를 반영한 트랜지스터들은 바이어스의 비트 값으로 조절되는 전류 스위치와 연결되어 실제 바이어스 값과 비례하는 전류를 흐르게 한다. 도 5의 회로는 게이트 전압을 아날로그 방식으로 조절하는 회로의 예이다. 도 5의 두 회로는 바이어스 트랜지스터의 게이트-소스 전압 vb를 변화시켜서 바이어스의 크기를 조절한다. 회로 (1)의 동작은 두 페이즈 (phase)로 나누어서 설명할 수 있다. 첫 번째 페이즈 (phase)에서는 첫 번째 스위치는 on, 두 번째 스위치는 off 상태를 만들어서 vrefp나 vrefn을 샘플링 커패시터 Cp와 연결하여 (vrefp or vrefn) Cp의 전하를 충전한다. 단편적인 예로 vrefp는 VDD, vrefn은 그라운드로 인가해줄 수 있다. 두 번째 페이즈 (phase)에서는 두 스위치를 반대로 동작시켜 Cp와 Cb를 연결하고 바이어스 입력 전압 vb를 변화시킨다. vb의 값은 두 커패시터의 용량, 입력 전압의 크기 그리고 동작 횟수를 통해서 조절할 수 있다. 도 5의 회로 (2)는 디지털 바이어스 값을 Digital-to-Analog Converter (DAC)를 이용해서 아날로그 전압 vb로 바꿔주는 방식을 사용한다. DAC를 통한 vb의 변화로 바이어스 트랜지스터의 전류를 조절한다. The bias b can be adjusted in analog and digital ways with respect to the corresponding voltage v b . The circuit of FIG. 4 is a circuit for adjusting the bias size to a digital value. In this case, n means the number of bits of bias. Each bit of bias is implemented as an NMOS with a width of 2 n-1 times, and a current corresponding to the corresponding bias value flows. Transistors reflecting each bit size are connected to a current switch controlled by the bit value of the bias to flow a current proportional to the actual bias value. The circuit of FIG. 5 is an example of a circuit for adjusting the gate voltage in an analog manner. The two circuits of FIG. 5 adjust the magnitude of the bias by changing the gate-source voltage v b of the bias transistor. The operation of the circuit (1) can be explained by dividing it into two phases. In the first phase, the first switch is on and the second switch is off, so that vrefp or vrefn is connected to the sampling capacitor C p (v refp or v refn ) to charge the charge of C p . As a fragmentary example, v refp may be applied to V DD , and v refn may be applied to the ground. In the second phase, the two switches are operated in reverse to connect C p and C b and change the bias input voltage v b . The value of v b can be adjusted through the capacity of the two capacitors, the magnitude of the input voltage, and the number of operations. The circuit (2) of FIG. 5 uses a method of converting a digital bias value into an analog voltage v b using a Digital-to-Analog Converter (DAC). The change in v b through the DAC regulates the current in the bias transistor.

이와 같은 MAC연산 수행을 위하여 전류 거울 형태로 구성된 아날로그 회로인 전류 거울 뉴런 회로를 구성한다 (도 1).In order to perform such MAC operation, a current mirror neuron circuit, which is an analog circuit configured in the form of a current mirror, is constructed (FIG. 1).

binary neural network은 신경망에서 입력과 출력을 0과 1의 이진(binary)으로 하는 신경망이다. Binary Neural Network (BNN) 알고리즘을 수행한다. BNN은 1bit 웨이트와 1bit 출력을 내는 활성화 함수를 사용하는 것이 특징이다. BNN의 핵심 연산인 multiply-and-accumulate (MAC) 연산은 A binary neural network is a neural network in which inputs and outputs are binary 0 and 1. Binary Neural Network (BNN) algorithm is performed. BNN is characterized by using an activation function that produces a 1-bit weight and 1-bit output. The core operation of BNN, the multiply-and-accumulate (MAC) operation, is

Figure pat00003
Figure pat00003

와 같은 수식으로 표현할 수 있으며, 여기서 wi는 웨이트, xi는 입력 값이다. BNN 알고리즘은 연산 과정에 비선형선을 부여하기 위해서 It can be expressed by the same formula as , where w i is the weight and x i is the input value. The BNN algorithm is used to give non-linearity to the computation process.

Figure pat00004
Figure pat00004

의 수식과 같은 sign 활성화 함수를 사용한다. 최종적으로 히든 레이어의 출력 노드 연산은 Use the sign activation function as in the formula of Finally, the output node operation of the hidden layer is

Figure pat00005
Figure pat00005

이고, 여기서 b는 바이어스이다. 이때 가중치 wi, 입력값 xi 그리고 출력값 y는 모두 이진값이다. 해당 프로세서는 전류 거울 뉴런을 사용해서 MAC 연산을 전류 영역에서 계산하고 래치형 전압 비교기를 이용해서 sign 활성화 함수를 수행한다., where b is the bias. In this case, the weight w i , the input value x i , and the output value y are all binary values. The processor uses a current mirror neuron to calculate the MAC operation in the current domain and performs a sign activation function using a latched voltage comparator.

도 6은 N×1 전류 거울 뉴런의 회로이다. 입력 노드는 최소 사이즈의 다이오드 연결된 NMOS를 포함한다. 해당 트랜지스터들은 노이즈와 미스매치를 고려하여 최소한의 입력 전류 ILSB가 흐른게 설계한다. 입력 NMOS들의 드레인은 가중치와 입력을 곱한 값으로 조절되는 전류 스위치와 연결된다. 이때 가중치와 입력 값은 모두 이진수이기 때문에 두 값의 곱을 XNOR 게이트로 수행할 수 있다. 바이어스의 부호는 XNOR회로에 연결된 전류 스위치를 조절하고 바이어스 크기를 디지털 비트 사이즈로 결정할 경우 NMOS 전류 거울의 비율을 이용한다. 전류 거울의 비율은 NMOS 거울의 폭으로 조절한다. 바이어스 크기를 아날로그 방식으로 결정할 경우 NMOS 거울의 게이트 전압 vb를 조절한다. 양의 스위치들을 통해 흐르는 전류는 다이오드 연결된 PMOS에 축적된다. PMOS 거울에 복사된 전류와 음의 스위치들을 통해 흐르는 전류의 차이가 드레인 노드 전압 vd를 결정한다. 최종적으로 vd와 레퍼런스 전압 vref를 비교기의 입력으로 받아서 sign 활성화 함수를 수행한다.6 is a circuit of an N×1 current mirror neuron. The input node includes a diode-connected NMOS of minimal size. The transistors are designed so that the minimum input current I LSB flows in consideration of noise and mismatch. The drains of the input NMOSs are connected to a current switch that is regulated by a weight multiplied by the input. In this case, since both the weight and the input value are binary numbers, the product of the two values can be performed as an XNOR gate. The sign of the bias adjusts the current switch connected to the XNOR circuit, and the ratio of the NMOS current mirror is used when the bias size is determined by the digital bit size. The ratio of the current mirror is controlled by the width of the NMOS mirror. If the bias magnitude is determined in an analog manner, the gate voltage v b of the NMOS mirror is adjusted. The current flowing through the positive switches accumulates in the diode-connected PMOS. The difference between the current radiated to the PMOS mirror and the current flowing through the negative switches determines the drain node voltage v d . Finally, the sign activation function is performed by receiving v d and the reference voltage v ref as inputs of the comparator.

도 7는 도 6의 vd 노드에서 바라보는 RC 등가회로를 나타낸다. 도 2의 등가회로에서 ro는 vd 노드에 연결되어있는 트랜지스터들의 출력 저항을 의미하고 Cp는 해당 노드에서의 기생 커패시터 성분이다. Idiff는 양의 전류와 음의 전류의 차이를 나타내고7 shows an RC equivalent circuit viewed from the v d node of FIG. 6 . In the equivalent circuit of FIG. 2 , ro is the output resistance of the transistors connected to the v d node, and C p is the parasitic capacitor component at the node. I diff represents the difference between positive and negative currents

Figure pat00006
Figure pat00006

의 수식으로 표현할 수 있다. 해당 수식은 MAC 연산의 출력에 ILSB를 곱한 값을 나타낸다. 도 7의 등가회로를 통해서 vd 노드에서의 시간에 따른 전압 변화를can be expressed by the formula of This formula represents the value obtained by multiplying the output of the MAC operation by I LSB . The voltage change with time at the v d node through the equivalent circuit of FIG.

Figure pat00007
Figure pat00007

와 같은 수식으로 유도할 수 있다. 위 수식에 포함되어있는 파라미터들을 적절하게 설계하여 전압의 변화량과 정착 시간을 조절할 수 있다.It can be derived by the same formula as By appropriately designing the parameters included in the above equation, the amount of change in voltage and settling time can be adjusted.

상기에서는 본 발명의 바람직한 실시예를 참조하여 설명하였지만, 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다.Although the above has been described with reference to preferred embodiments of the present invention, those skilled in the art can variously modify and change the present invention within the scope without departing from the spirit and scope of the present invention as set forth in the claims below. You will understand that it can be done.

100: 전류 거울 뉴런 회로100: current mirror neuron circuit

Claims (10)

신경망 회로를 전류를 기반으로 구현하는 혼성신호 이진화 신경망 회로 장치.
A mixed-signal binarized neural network circuit device that implements a neural network circuit based on electric current.
제1항에 있어서,
상기 신경망 회로의 곱셈덧셈기 (Multiply and Acculmulate)를 전류거울로 구현하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed-signal binarization neural network circuit device that implements the Multiply and Acculmulate of the neural network circuit as a current mirror.
제1항에 있어서,
상기 신경망 회로의 덧셈을 전류거울을 이용하여 전류를 더함으로써 구현하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A hybrid signal binarization neural network circuit device that implements the addition of the neural network circuit by adding a current using a current mirror.
제1항에 있어서,
상기 신경망 회로의 곱셈을 전류거울을 이용하여 전류를 증폭하는 방법으로 곱셈을 구현하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed signal binarization neural network circuit device for implementing multiplication by a method of amplifying a current using a current mirror for multiplication of the neural network circuit.
제1항에 있어서,
상기 신경망회로의 바이어스를 전류로 하여 바이어스 전류원을 기준 전류 혹은 복사 전류 방향에 인가하여 덧셈과 뺄셈을 구현하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A hybrid signal binarization neural network circuit device that implements addition and subtraction by applying a bias current source to a reference current or a radiation current direction using the bias of the neural network circuit as a current.
제1항에 있어서,
이진신경망을 구현하기 위하여 XNOR 게이트를 이용하여 전류거울의 입력을 조절하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed-signal binary neural network circuit device that controls the input of a current mirror by using an XNOR gate to implement a binary neural network.
제1항에 있어서,
바이어스를 조절하기 위하여 해당 전류원 역할을 하는 트랜지스터의 게이트(혹은 베이스) 전압을 조절하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed-signal binary neural network circuit device that adjusts the gate (or base) voltage of a transistor serving as a current source to adjust the bias.
제1항에 있어서,
바이어스를 조절하기 위하여 해당 전류원 역할을 하는 트랜지스터의 게이트(혹은 베이스)의 넓이 (width)를 조절하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed-signal binary neural network circuit device that adjusts the width of the gate (or base) of the transistor serving as the current source to adjust the bias.
제1항에 있어서,
가중치를 조절하기 위하여 해당 복사 전류 트랜지스터의 게이트(베이스) 또는 소스(이미터) 전압을 조절하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed-signal binarized neural network circuit device that adjusts the gate (base) or source (emitter) voltage of the corresponding radiant current transistor to adjust the weight.
제1항에 있어서,
바이어스를 조절하기 위하여 해당 전류원 역할을 하는 트랜지스터의 게이트(혹은 베이스)의 넓이 (width)를 조절하는 혼성신호 이진화 신경망 회로 장치.
According to claim 1,
A mixed-signal binary neural network circuit device that adjusts the width of the gate (or base) of the transistor serving as the current source to adjust the bias.
KR1020210010941A 2021-01-26 2021-01-26 A mixed-signal binarized neural network circuit device KR20220107808A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020210010941A KR20220107808A (en) 2021-01-26 2021-01-26 A mixed-signal binarized neural network circuit device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020210010941A KR20220107808A (en) 2021-01-26 2021-01-26 A mixed-signal binarized neural network circuit device

Publications (1)

Publication Number Publication Date
KR20220107808A true KR20220107808A (en) 2022-08-02

Family

ID=82845705

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210010941A KR20220107808A (en) 2021-01-26 2021-01-26 A mixed-signal binarized neural network circuit device

Country Status (1)

Country Link
KR (1) KR20220107808A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190094679A (en) 2018-02-05 2019-08-14 고려대학교 산학협력단 Artificial neural network device and operation method thereof

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20190094679A (en) 2018-02-05 2019-08-14 고려대학교 산학협력단 Artificial neural network device and operation method thereof

Similar Documents

Publication Publication Date Title
US11461621B2 (en) Methods and systems of implementing positive and negative neurons in a neural array-based flash memory
US10255205B1 (en) System and methods for mixed-signal computing
WO2018173472A1 (en) Neural network circuit
US11386321B2 (en) Neural network circuit
US20230359571A1 (en) System and methods for mixed-signal computing
US6876318B2 (en) Method for increasing rate at which a comparator in a metastable condition transitions to a steady state
Peymanfar et al. Design of a general propose neuro-fuzzy controller by using modified adaptive-network-based fuzzy inference system
US6876989B2 (en) Back-propagation neural network with enhanced neuron characteristics
US10853737B2 (en) Machine-learning classifier based on comparators for direct inference on analog sensor data
KR20220107808A (en) A mixed-signal binarized neural network circuit device
Szczęsny High speed and low sensitive current-mode CMOS perceptron
US10832014B1 (en) Multi-quadrant analog current-mode multipliers for artificial intelligence
US11100389B2 (en) Conversion of digital signals into spiking analog signals
US20170004398A1 (en) Boltzmann machine circuit and method for controlling circuit
Zhang et al. Reconfigurable multivalued memristor FPGA model for digital recognition
Scott et al. A flash-based current-mode IC to realize quantized neural networks
NL2024414B1 (en) An amplifier circuit to enable accurate measurement of small electrical signals
US20230412187A1 (en) Digitally enhanced digital-to-analog converter resolution
US5220306A (en) Digital signal comparator for comparing n-bit binary signals
Soleimani et al. Design of current-mode modular programmable analog CMOS FLC
Archana et al. Design of CMOS current mode and voltage mode Winner Take all circuit on 180nm technology
Youssefi et al. Tunable neuron with PWL approximation based on the minimum operator
Chen et al. CMOS PWM VLSI implementation of neural network
Rodriguez-Vazquez et al. Learning in neuro/fuzzy analog chips
EP4002094A1 (en) Computing element for in-memory computing