KR102665969B1 - In memory computing(imc) circuir, neural network device including imc circuit and operating method of imc circuit - Google Patents
In memory computing(imc) circuir, neural network device including imc circuit and operating method of imc circuit Download PDFInfo
- Publication number
- KR102665969B1 KR102665969B1 KR1020230093290A KR20230093290A KR102665969B1 KR 102665969 B1 KR102665969 B1 KR 102665969B1 KR 1020230093290 A KR1020230093290 A KR 1020230093290A KR 20230093290 A KR20230093290 A KR 20230093290A KR 102665969 B1 KR102665969 B1 KR 102665969B1
- Authority
- KR
- South Korea
- Prior art keywords
- memory
- transistor
- circuit
- input
- bit cell
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C11/00—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
- G11C11/21—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
- G11C11/34—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices
- G11C11/40—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors
- G11C11/41—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming static cells with positive feedback, i.e. cells not needing refreshing or charge regeneration, e.g. bistable multivibrator or Schmitt trigger
- G11C11/413—Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing, timing or power reduction
- G11C11/417—Auxiliary circuits, e.g. for addressing, decoding, driving, writing, sensing, timing or power reduction for memory cells of the field-effect type
- G11C11/419—Read-write [R-W] circuits
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F7/00—Methods or arrangements for processing data by operating upon the order or content of the data handled
- G06F7/38—Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
- G06F7/48—Methods 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/544—Methods 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/5443—Sum of products
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/06—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons
- G06N3/063—Physical realisation, i.e. hardware implementation of neural networks, neurons or parts of neurons using electronic means
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C11/00—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
- G11C11/21—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements
- G11C11/34—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices
- G11C11/40—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors
- G11C11/41—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming static cells with positive feedback, i.e. cells not needing refreshing or charge regeneration, e.g. bistable multivibrator or Schmitt trigger
- G11C11/412—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using electric elements using semiconductor devices using transistors forming static cells with positive feedback, i.e. cells not needing refreshing or charge regeneration, e.g. bistable multivibrator or Schmitt trigger using field-effect transistors only
-
- G—PHYSICS
- G11—INFORMATION STORAGE
- G11C—STATIC STORES
- G11C11/00—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor
- G11C11/54—Digital stores characterised by the use of particular electric or magnetic storage elements; Storage elements therefor using elements simulating biological cells, e.g. neuron
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Computing Systems (AREA)
- Molecular Biology (AREA)
- General Health & Medical Sciences (AREA)
- Neurology (AREA)
- General Engineering & Computer Science (AREA)
- Pure & Applied Mathematics (AREA)
- Computational Mathematics (AREA)
- Artificial Intelligence (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Evolutionary Computation (AREA)
- Mathematical Optimization (AREA)
- Mathematical Analysis (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Memory System (AREA)
Abstract
인메모리 컴퓨팅(IMC)을 포함하는 장치 및 방법이 제공된다. 인메모리 컴퓨팅(IMC) 회로는 인메모리 컴퓨팅(IMC) 회로는 각각의 비트 셀을 포함하는 메모리 뱅크들을 포함하는 정적 랜덤 액세스 메모리(SRAM) 비트 셀 회로를 포함하고, 각 메모리 뱅크에 대해 정적 랜덤 액세스 메모리의 동일한 워드 라인으로 그룹화되는 비트 셀, 각각의 비트 셀들에 대응하는 연산 결과에 대응하는 신호를 출력하도록 구성된 연산자들, 및 복수의 메모리 뱅크들 사이에서 MAC(Multi-accumulate) 연산을 위해 대상 메모리 뱅크에 속하는 각각의 비트 셀들에 대응하는 연산 결과를 가산기로 전송하도록 구성된 게이트 논리 회로를 포함한다.Apparatus and methods including in-memory computing (IMC) are provided. The in-memory computing (IMC) circuit includes a static random access memory (SRAM) bit cell circuit including memory banks each containing a bit cell, and for each memory bank a static random access Bit cells grouped into the same word line of memory, operators configured to output signals corresponding to operation results corresponding to each bit cell, and a target memory for multi-accumulate (MAC) operation among a plurality of memory banks. It includes a gate logic circuit configured to transmit an operation result corresponding to each bit cell belonging to the bank to an adder.
Description
아래의 실시예들은 IMC(IN MEMORY COMPUTING) 회로, IMC 회로를 포함하는 뉴럴 네트워크 장치, 및 IMC 회로의 동작 방법에 관한 것이다.The following embodiments relate to an IN MEMORY COMPUTING (IMC) circuit, a neural network device including an IMC circuit, and a method of operating the IMC circuit.
많은 응용 분야에서 예를 들어, 정확도, 속도, 및/또는 에너지 효율성과 같은 고성능을 제공하기 위해 머신 러닝(machine learning) 및/또는 딥 러닝(deep learning)으로 학습된 다양한 형태의 신경망들(neural network; NN)이 사용될 수 있다. 신경망들의 기계 학습을 가능하게 하는 알고리즘들은 연산량이 매우 많지만, 예를 들어, 두 벡터들을 내적하고 그 값들을 누적 합산하는 MAC(Multiplication and Accumulation) 연산과 같은 복잡하지 않은 연산들의 처리에 의해 수행될 수 있다. MAC 연산과 같은 복잡하지 않은 연산은 인-메모리 컴퓨팅(IN MEMORY COMPUTING)을 통해 구현될 수 있다. Various types of neural networks trained with machine learning and/or deep learning to provide high performance, for example, accuracy, speed, and/or energy efficiency, in many application areas. ; NN) can be used. Algorithms that enable machine learning of neural networks have a very large computational load, but can be performed by processing simple operations, such as the MAC (Multiplication and Accumulation) operation, for example, dot product of two vectors and cumulative sum of their values. there is. Non-complex operations such as MAC operations can be implemented through IN MEMORY COMPUTING.
일 실시예에 따르면, 인-메모리 컴퓨팅(In-Memory Computing) 회로는 복수의 메모리 뱅크들(memory banks); 및 상기 메모리 뱅크들 각각의 논리 연산 결과를 수신하는 논리 게이트를 포함하고, 상기 메모리 뱅크들 각각은 가중치를 저장하는 비트 셀; 및 입력값을 수신하는 연산기를 포함하고, 상기 연산기는 상기 비트 셀에 연결되어 상기 입력값을 수신한 상기 연산기가 상기 입력값과 상기 가중치 간의 논리 연산 결과를 출력한다. According to one embodiment, an in-memory computing circuit includes a plurality of memory banks; and a logic gate that receives a logical operation result of each of the memory banks, where each of the memory banks includes a bit cell that stores a weight. and an operator that receives an input value, where the operator is connected to the bit cell and receives the input value and outputs a result of a logical operation between the input value and the weight.
상기 메모리 뱅크들 각각의 논리 연산 결과는 상기 입력값과 상기 가중치에 대한 NAND 연산값일 수 있다. The logical operation result of each of the memory banks may be a NAND operation value for the input value and the weight.
상기 논리 게이트는 NAND 게이트일 수 있다. The logic gate may be a NAND gate.
상기 논리 게이트는 상기 메모리 뱅크들 중 선택된 하나의 메모리 뱅크의 입력값과 가중치 간의 곱셈 결과를 출력할 수 있다. The logic gate may output a result of multiplication between an input value of one selected memory bank among the memory banks and a weight.
상기 메모리 뱅크들 중 선택되지 않은 메모리 뱅크들 각각은 0의 입력값을 수신할 수 있다. Each of the unselected memory banks among the memory banks may receive an input value of 0.
상기 인-메모리 컴퓨팅 회로는 상기 논리 게이트에 연결된 가산기를 더 포함할 수 있다. The in-memory computing circuit may further include an adder coupled to the logic gate.
상기 연산기는 비트 와이즈(bit-wise) 곱 연산의 결과에 해당하는 신호를 출력하는 복수의 트랜지스터들을 포함할 수 있다. The operator may include a plurality of transistors that output signals corresponding to the result of a bit-wise multiplication operation.
상기 연산기는 제1 트랜지스터 및 제2 트랜지스터를 포함하는 2개의 트랜지스터(2T) 회로를 포함하고, 상기 입력값은 상기 제1 트랜지스터의 제1 게이트 단자 및 상기 제2 트랜지스터의 제2 게이트 단자에 인가되고, 상기 제1 게이트 단자를 거친 상기 제1 트랜지스터의 출력값은 상기 제2 게이트 단자를 거친 상기 제2 트랜지스터의 출력값과 연결됨으로써 상기 논리 연산 결과를 출력할 수 있다. The operator includes a two transistor (2T) circuit including a first transistor and a second transistor, and the input value is applied to the first gate terminal of the first transistor and the second gate terminal of the second transistor, , the output value of the first transistor that passes through the first gate terminal is connected to the output value of the second transistor that passes through the second gate terminal, thereby outputting the logic operation result.
상기 비트 셀에 저장된 상기 가중치에 기초한 값이 상기 제1 트랜지스터의 드레인 단자에 인가되고, 상기 제1 트랜지스터의 소스 단자는 상기 제2 트랜지스터의 드레인 단자를 통해 상기 논리 게이트의 입력 단자에 연결될 수 있다. A value based on the weight stored in the bit cell is applied to the drain terminal of the first transistor, and the source terminal of the first transistor may be connected to the input terminal of the logic gate through the drain terminal of the second transistor.
상기 제1 트랜지스터는 NMOS 트랜지스터를 포함하고, 상기 제2 트랜지스터는 PMOS 트랜지스터를 포함할 수 있다. The first transistor may include an NMOS transistor, and the second transistor may include a PMOS transistor.
상기 연산기는 트랜스미션 게이트(transmission gate) 및 제3 트랜지스터를 포함하는 3개의 트랜지스터(3T) 회로를 포함하고, 상기 입력값은 상기 트랜스미션 게이트의 엔이에블(enable) 단자 및 상기 제3 트랜지스터의 제3 게이트 단자에 인가되고, 상기 트랜스미션 게이트의 출력값과 상기 제3 게이트 단자를 거친 상기 제3 트랜지스터의 출력값 각각은 상기 논리 게이트의 입력에 연결되어 상기 논리 연산 결과를 출력될 수 있다. The operator includes a three transistor (3T) circuit including a transmission gate and a third transistor, and the input value is input from an enable terminal of the transmission gate and a third transistor of the third transistor. It is applied to the gate terminal, and each of the output value of the transmission gate and the output value of the third transistor that passes through the third gate terminal is connected to the input of the logic gate to output the logic operation result.
상기 논리 게이트는 상기 입력값이 상기 연산기로 인가되는지 여부에 따라, 상기 비트 셀에 해당하는 상기 논리 연산 결과를 상기 가산기로 전달할 수 있다. The logic gate may transfer the result of the logic operation corresponding to the bit cell to the adder depending on whether the input value is applied to the operator.
상기 인-메모리 컴퓨팅 회로는 모바일 디바이스, 모바일 컴퓨팅 디바이스, 모바일 폰, 스마트폰, 개인용 디지털 어시스턴트(personal digital assistant), 고정 로케이션 단말, 태블릿 컴퓨터, 컴퓨터, 웨어러블(wearable) 디바이스, 랩탑 컴퓨터, 서버, 뮤직 플레이어, 비디오 플레이어, 엔터테인먼트 유닛, 네비게이션 디바이스, 통신 디바이스, 내비게이션 디바이스, GPS 장치, 텔레비전, 튜너, 자동차, 차량 부품, 항공 전자 시스템, 드론, 멀티콥터 및 의료 기기로 구성된 그룹에서 선택된 적어도 하나의 디바이스에 통합될 수 있다. The in-memory computing circuit may be used in a mobile device, mobile computing device, mobile phone, smartphone, personal digital assistant, fixed location terminal, tablet computer, computer, wearable device, laptop computer, server, music device, etc. to at least one device selected from the group consisting of players, video players, entertainment units, navigation devices, communication devices, navigation devices, GPS devices, televisions, tuners, automobiles, vehicle parts, avionics systems, drones, multicopters, and medical devices. can be integrated.
일 실시예에 따르면, 인-메모리 컴퓨팅 회로를 포함하는 뉴럴 네트워크 장치는 인-메모리 컴퓨팅 회로들을 포함하는 어레이 회로(array circuit); 및 클럭 신호에 따라, 상기 뉴럴 네트워크 장치의 입력 신호에 해당하는 제2 값들을 상기 인-메모리 컴퓨팅 회로들 각각에 입력하고, 상기 인-메모리 컴퓨팅 회로들을 제어하는 컨트롤러를 포함하고, 상기 인-메모리 컴퓨팅 회로들 각각은 복수의 메모리 뱅크들을 포함하고, 상기 메모리 뱅크들 각각은 가중치를 저장하는 비트 셀과 입력값을 수신하는 연산기; 및 상기 메모리 뱅크들 각각의 상기 논리 연산 결과를 수신하는 논리 게이트를 포함하며, 상기 연산기는 상기 비트 셀에 연결되어 상기 입력값을 수신한 상기 연산기가 상기 입력값과 상기 가중치 간의 논리 연산 결과를 출력한다. According to one embodiment, a neural network device including in-memory computing circuitry includes an array circuit including in-memory computing circuits; and a controller that inputs second values corresponding to the input signal of the neural network device to each of the in-memory computing circuits according to a clock signal and controls the in-memory computing circuits, wherein the in-memory Each of the computing circuits includes a plurality of memory banks, each of the memory banks comprising a bit cell for storing weights and an operator for receiving an input value; and a logic gate that receives the result of the logical operation of each of the memory banks, wherein the operator is connected to the bit cell and receives the input value, and outputs the result of the logical operation between the input value and the weight. do.
상기 메모리 뱅크들 각각의 논리 연산 결과는 상기 입력값과 상기 가중치에 대한 NAND 연산값일 수 있다. The logical operation result of each of the memory banks may be a NAND operation value for the input value and the weight.
상기 논리 게이트는 NAND 게이트일 수 있다. The logic gate may be a NAND gate.
상기 컨트롤러는 상기 입력값을 포함하는 입력 피처맵(input feature map)을 저장하는 IFM(input feature map) 버퍼(buffer); 상기 입력값이 상기 복수의 IMC 회로들에 인가되는지 여부를 제어하는 제어 회로; 및 상기 가중치를 읽거나 쓰는 RW(read write) 회로 중 적어도 하나를 포함할 수 있다. The controller includes an input feature map (IFM) buffer that stores an input feature map including the input value; a control circuit that controls whether the input value is applied to the plurality of IMC circuits; and a read write (RW) circuit that reads or writes the weight.
일 실시예에 따르면, 인-메모리 컴퓨팅 장치는 각각의 비트 셀 유닛을 각각 포함하는 메모리 뱅크들; 상기 각각의 비트 셀 유닛의 연산기들의 출력들을 수신하는 논리 게이트; 및 MAC 연산의 적어도 일부를 수행하기 위해 상기 논리 게이트의 출력을 수신하는 가산기를 포함하고, 상기 각각의 비트 셀 유닛은 비트 셀 및 연산기를 포함하고, 비트 셀들 중 어느 것도 동일한 연산기를 공유하지 않는다. According to one embodiment, an in-memory computing device includes memory banks each including respective bit cell units; a logic gate receiving outputs of operators of each bit cell unit; and an adder that receives the output of the logic gate to perform at least a portion of a MAC operation, wherein each bit cell unit includes a bit cell and an operator, none of the bit cells sharing the same operator.
상기 각각의 비트 셀 유닛의 출력은 상기 논리 게이트에 연결되고, 상기 비트 셀들 각각은 각각의 저장된 값을 저장하며, 상기 비트 셀 유닛들은 상기 비트 셀 유닛들에 각각의 입력값을 제공하는 각각의 입력 라인에 연결되고, 상기 인-메모리 컴퓨팅 장치는 상기 비트 셀 유닛들에 제공되는 입력값들이, 상기 비트 셀 유닛들 중 어느 하나가 해당 연산기에 의해 상기 저장된 값에 대해 수행될 연산의 대상이 되도록 선택할 수 있다. An output of each bit cell unit is connected to the logic gate, each of the bit cells stores a respective stored value, and the bit cell units each have an input that provides a respective input value to the bit cell units. connected to a line, and the in-memory computing device allows input values provided to the bit cell units to select which one of the bit cell units will be the target of an operation to be performed on the stored value by a corresponding operator. You can.
상기 연산의 대상이 아닌 상기 비트 셀 유닛들의 상기 저장된 값들은 상기 논리 게이트의 출력에 영향을 주지 않을 수 있다.The stored values of the bit cell units that are not the target of the operation may not affect the output of the logic gate.
도 1은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로에서 동작들이 수행될 수 있는 뉴럴 네트워크의 일 예시를 도시한 도면이다.
도 2a 내지 도 2d는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로 구조를 도시한 도면이다.
도 3은 일 실시예에 따라 4개의 메모리 뱅크들을 포함하는 인-메모리 컴퓨팅(IMC) 회로의 동작을 설명하기 위한 도면이다.
도 4는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 블록도이다.
도 5a 및 도 5b는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 연산기가 2개의 트랜지스터들로 구성된 경우의 동작을 설명하기 위한 도면이다.
도 6a 및 도 6b은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로가 메모리 뱅크를 선택하는 방법을 설명하기 위한 도면이다.
도 7은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 연산기가 3개의 트랜지스터들로 구성된 경우의 동작을 설명하기 위한 도면이다.
도 8은 다른 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 연산기가 3개의 트랜지스터들로 구성된 경우의 동작을 설명하기 위한 도면이다.
도 9는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로를 포함하는 뉴럴 네트워크 장치의 블록도이다.
도 10은 일 실시예에 따른 뉴럴 네트워크 장치를 포함하는 전자 시스템의 블록도이다.
도 11은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 동작 방법을 나타낸 흐름도이다.1 is a diagram illustrating an example of a neural network in which operations can be performed in an in-memory computing (IMC) circuit according to an embodiment.
2A to 2D are diagrams illustrating an in-memory computing (IMC) circuit structure according to an embodiment.
FIG. 3 is a diagram for explaining the operation of an in-memory computing (IMC) circuit including four memory banks, according to an embodiment.
Figure 4 is a block diagram of an in-memory computing (IMC) circuit according to one embodiment.
FIGS. 5A and 5B are diagrams for explaining an operation when an operator of an in-memory computing (IMC) circuit is composed of two transistors, according to an embodiment.
6A and 6B are diagrams to explain how an in-memory computing (IMC) circuit selects a memory bank, according to an embodiment.
FIG. 7 is a diagram illustrating the operation of an in-memory computing (IMC) circuit when the operator is composed of three transistors, according to an embodiment.
FIG. 8 is a diagram for explaining the operation of an in-memory computing (IMC) circuit when the operator is composed of three transistors according to another embodiment.
Figure 9 is a block diagram of a neural network device including an in-memory computing (IMC) circuit according to one embodiment.
Figure 10 is a block diagram of an electronic system including a neural network device according to one embodiment.
Figure 11 is a flowchart showing a method of operating an in-memory computing (IMC) circuit according to an embodiment.
실시예들에 대한 특정한 구조적 또는 기능적 설명들은 단지 예시를 위한 목적으로 개시된 것으로서, 다양한 형태로 변경되어 구현될 수 있다. 따라서, 실제 구현되는 형태는 개시된 특정 실시예로만 한정되는 것이 아니며, 본 명세서의 범위는 실시예들로 설명한 기술적 사상에 포함되는 변경, 균등물, 또는 대체물을 포함한다.Specific structural or functional descriptions of the embodiments are disclosed for illustrative purposes only and may be changed and implemented in various forms. Accordingly, the actual implementation form is not limited to the specific disclosed embodiments, and the scope of the present specification includes changes, equivalents, or substitutes included in the technical idea described in the embodiments.
제1 또는 제2 등의 용어를 다양한 구성요소들을 설명하는데 사용될 수 있지만, 이런 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 해석되어야 한다. 예를 들어, 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소는 제1 구성요소로도 명명될 수 있다.Terms such as first or second may be used to describe various components, but these terms should be interpreted only for the purpose of distinguishing one component from another component. For example, a first component may be named a second component, and similarly, the second component may also be named a first component.
어떤 구성요소가 다른 구성요소에 "연결되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다.When a component is referred to as being “connected” to another component, it should be understood that it may be directly connected or connected to the other component, but that other components may exist in between.
단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 명세서에서, "포함하다" 또는 "가지다" 등의 용어는 설명된 특징, 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것이 존재함으로 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부분품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.Singular expressions include plural expressions unless the context clearly dictates otherwise. In this specification, terms such as "comprise" or "have" are intended to designate the presence of the described features, numbers, steps, operations, components, parts, or combinations thereof, but are not intended to indicate the presence of one or more other features or numbers, It should be understood that this does not exclude in advance the possibility of the presence or addition of steps, operations, components, parts, or combinations thereof.
다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 해당 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가진다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 갖는 것으로 해석되어야 하며, 본 명세서에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by a person of ordinary skill in the art. Terms as defined in commonly used dictionaries should be interpreted as having meanings consistent with the meanings they have in the context of the related technology, and unless clearly defined in this specification, should not be interpreted in an idealized or overly formal sense. No.
이하, 실시예들을 첨부된 도면들을 참조하여 상세하게 설명한다. 첨부 도면을 참조하여 설명함에 있어, 도면 부호에 관계없이 동일한 구성 요소는 동일한 참조 부호를 부여하고, 이에 대한 중복되는 설명은 생략하기로 한다.Hereinafter, embodiments will be described in detail with reference to the attached drawings. In the description with reference to the accompanying drawings, identical components will be assigned the same reference numerals regardless of the reference numerals, and overlapping descriptions thereof will be omitted.
도 1은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로에서 동작들이 수행될 수 있는 뉴럴 네트워크의 일 예시를 도시한 도면이다. 도 1을 참조하면, 대응하는 인-메모리 컴퓨팅 회로에 의해 동작이 수행될 수 있는 뉴럴 네트워크(110)가 도시된다. 1 is a diagram illustrating an example of a neural network in which operations can be performed in an in-memory computing (IMC) circuit according to an embodiment. 1, a
인-메모리 컴퓨팅(In-Memory Computing; IMC)은 폰-노이만 아키텍처에서 발생하는 연산부(예: 프로세서)와 메모리 사이의 빈번한 데이터 이동으로 인한 성능과 전력 한계점을 돌파하기 위해 데이터가 저장된 메모리 내부에서 직접 연산을 수행하도록 하는 컴퓨팅 아키텍쳐에 해당할 수 있다. 인-메모리 컴퓨팅(IMC) 회로는 연산을 어떤 도메인에서 수행할 지에 따라 아날로그(analog) 인-메모리 컴퓨팅(IMC) 회로와 디지털(digital) 인-메모리 컴퓨팅(IMC) 회로로 나눌 수 있다. 아날로그(analog) 인-메모리 컴퓨팅(IMC) 회로는 예를 들어, 전류, 전하, 시간 등과 같은 아날로그 도메인에서 연산을 수행할 수 있다. 디지털(digital) 인-메모리 컴퓨팅(IMC) 회로는 논리 회로를 사용하여 디지털 도메인에서 연산을 수행할 수 있다. 아래의 실시예들은 디지털 인- 메모리 컴퓨팅 회로에 대해 설명한다. In-Memory Computing (IMC) is a method of computing data directly inside the memory where data is stored in order to overcome the performance and power limitations caused by frequent data movement between the computational unit (e.g. processor) and memory that occurs in the von-Neumann architecture. It may correspond to a computing architecture that allows calculations to be performed. In-memory computing (IMC) circuits can be divided into analog in-memory computing (IMC) circuits and digital in-memory computing (IMC) circuits, depending on the domain in which the calculation is performed. Analog in-memory computing (IMC) circuits can perform operations in the analog domain, for example, current, charge, time, etc. Digital in-memory computing (IMC) circuits can use logic circuits to perform operations in the digital domain. The embodiments below describe a digital in-memory computing circuit.
인-메모리 컴퓨팅(IMC) 회로는 다수의 곱셈에 대한 덧셈을 한 번에 수행해 주는 매트릭스(Matrix) 연산, 및/또는 MAC(Multiplication and Accumulation) 연산을 가속화할 수 있으며, 이는 인공 지능(Artificial Intelligence; AI)의 학습 및 추론에 매우 일반적이다. 뉴럴 네트워크(110)의 학습 또는 추론을 위한 MAC 연산은 메모리 어레이를 통해 수행될 수 있으며, 메모리 어레이는 인-메모리 컴퓨팅(IMC) 회로 중 메모리 소자의 비트 셀들을 포함한다. 이하, 설명의 편의를 위하여, 뉴럴 네트워크(110)가 완전 연결 레이어들(fully connected layers)로 구성된 경우를 일 예로 들어 설명하지만, 반드시 이에 한정되지는 않는다. 뉴럴 네트워크(110)는 컨볼루션 레이어들로 구성된 컨볼루션 뉴럴 네트워크일 수 있다. 인-메모리 컴퓨팅(IMC) 회로는 비트 셀들을 포함하는 메모리 어레이에 의한 연산 기능을 통해 해당 MAC 연산을 수행함으로써 뉴럴 네트워크(110)의 기계 학습 및 추론을 가능하게 할 수 있다. In-memory computing (IMC) circuits can accelerate matrix operations that perform addition to multiple multiplications at once, and/or MAC (Multiplication and Accumulation) operations, which are used for artificial intelligence (Artificial Intelligence). It is very common in learning and inference in AI. The MAC operation for learning or inference of the
뉴럴 네트워크(110)는 예를 들어, 2개 이상의 히든 레이어들을 포함하는 심층 신경망(Deep Neural Network; DNN) 또는 n-계층 뉴럴 네트워크일 수 있다. 뉴럴 네트워크(110)는 예를 들어, 입력 레이어(Layer 1), 2개의 히든 레이어들(Layer 2 및 Layer 3) 및 출력 레이어(Layer 4)를 포함하는 심층 신경망(DNN)일 수 있으며, 반드시 이에 한정되지는 않는다. 뉴럴 네트워크(110)가 DNN 아키텍처로 구현된 경우 유효한 정보를 처리할 수 있는 보다 많은 레이어들을 포함하므로, 뉴럴 네트워크(110)는 싱글 레이어를 갖는 뉴럴 네트워크보다 복잡한 데이터 집합들을 처리할 수 있다. 한편, 뉴럴 네트워크(110)는 4개의 레이어들을 포함하는 것으로 도시되어 있으나, 이는 예시에 불과할 뿐 뉴럴 네트워크(110)는 더 적거나 많은 레이어들을 포함하거나, 더 적거나 많은 채널들을 포함할 수 있다. 뉴럴 네트워크(110)는 도 1에 도시된 것과는 다른, 다양한 구조의 레이어들을 포함할 수 있다.The
뉴럴 네트워크(110)에 포함된 레이어들 각각은 복수의 노드들(115)을 포함할 수 있다. 노드(node)는 '뉴런(neuron)', '프로세싱 엘리먼트(Processing element, PE)', '유닛(unit)', '채널(channel)' 또는 이와 유사한 용어들로 알려진, 복수의 인공 노드(artificial node)들에 해당될 수 있다. 뉴럴 네트워크(110)는 예를 들어, 입력 레이어가 3개의 노드들을 포함하고, 히든 레이어들 각각이 5개의 노드들을 포함하며, 출력 레이어가 3개의 출력 노드들을 포함할 수 있으나, 반드시 이에 한정되지는 않는다. 도 1의 예시는 일 실시예에 해당하며, 뉴럴 네트워크(110)에 포함된 레이어들 각각은 다양한 개수의 노드들을 포함할 수 있다. 뉴럴 네트워크(110)의 레이어들 각각에 포함된 노드들(115)은 서로 연결되어 데이터를 처리할 수 있다. 예를 들어, 하나의 노드는 다른 노드(들)로부터 데이터를 수신하여 연산할 수 있고, 연산 결과를 또 다른 노드들로 출력할 수 있다.Each of the layers included in the
한 레이어의 복수의 노드들(115)은 다른 레이어의 노드들과 연결선을 통해 연결되며, 연결선에는 가중치(weight; w)가 설정될 수 있다. 예를 들어, 한 노드의 연산 수행 결과(o1)는 해당 노드에 연결된 이전 레이어의 다른 노드들로부터 전파되는 입력 데이터(예: i1, i2, i3, i4, i5) 및 해당 노드의 연결선들의 가중치들(w11, w21, w31, w41, w51)에 기초하여 결정될 수 있다. A plurality of
예를 들어, L개의 출력 값들 중 l번째 출력 o l 은 하기 수학식 1과 같이 표현될 수 있다. 여기서, L는 1 이상의 정수이고, l는 1 이상 L 이하의 정수일 수 있다. For example, the lth output o l among the L output values can be expressed as
수학식 1에서, i k 는 P개의 입력들 중 k번째 입력을 나타내고, w kl 은 k번째 입력 및 l번째 출력 간에 설정된 가중치를 나타낼 수 있다. 여기서, P는 1이상의 정수이고, k는 1이상 P 이하의 정수를 나타낼 수 있다. In
다시 말해, 뉴럴 네트워크(110)에서 노드들(115) 간의 입, 출력은 입력(i) 및 가중치(w) 간의 가중합으로 나타낼 수 있다. 가중합은 복수의 입력들 및 복수의 가중치들 간의 곱셈 연산 및 반복적인 덧셈 연산으로써, 'MAC(Multiplication and Accumulation) 연산'이라고도 나타낼 수 있다. MAC 연산이 연산 기능이 추가된 메모리를 이용하여 수행되는 점에서, MAC 연산이 수행되는 회로를 '인-메모리 컴퓨팅(IMC) 회로'로 지칭할 수도 있다. In other words, input and output between
뉴럴 네트워크(110)는 예를 들어, 입력 데이터(예: i1, i2, i3, i4, i5)를 기초로 레이어들에서의 가중합 연산을 수행하고, 연산 수행 결과(예: o1, o2, o3, o4, o5)를 기초로 출력 데이터(예: u1, u2, u3)를 생성할 수 있다.For example, the
도 2a, 도 2b, 도 2c, 및 도 2 d는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로를 포함하는 IMC 매크로의 예시적인 구조를 나타낸 도면이다. 도 2a를 참조하면, 일 실시예에 따른 IMC 매크로(200)는 쓰기 워드 라인 드라이버(WWL(Write Word Line) driver)(210), 인-메모리 컴퓨팅(IMC) 회로(220), 가산기(Adder)(230), 누적 연산기(240), 입력-드라이버(input driver)(또는 읽기 워드 라인 드라이버(RWL(Read Word Liner) driver)(250), 메모리 컨트롤러(control unit)(260), 및 쓰기 비트 라인 드라이버(WBL(Write Bit Line) driver)(270)를 포함할 수 있다. IMC 매크로(200)는 예를 들어, 도 2a에 도시된 것과 같은 64kb SRAM IMC 매크로일 수 있으나, 반드시 이에 한정되지는 않는다. 2A, 2B, 2C, and 2D are diagrams illustrating an example structure of an IMC macro including an in-memory computing (IMC) circuit according to an embodiment. Referring to FIG. 2A, the
아래에 기술되는 바와 같이, IMC 회로(예를 들어, IMC 회로(220))는 비트 셀 회로(예를 들어, SRAM 비트 셀 회로(225))를 포함할 수 있고, 각각의 비트 셀 회로는 비트 셀 유닛(예를 들어, 비트 셀 유닛(223a-223d))을 가질 수 있다. 각각의 비트 셀 회로의 비트 셀 유닛은 IMC 회로의 각각의 메모리 뱅크에 포함될 수 있다(예를 들어, 비트 셀 유닛(223a-223d)은 각각 뱅크 0-3에 포함될 수 있다). 각각의 비트 셀 유닛은 비트 셀 및 오퍼레이터를 포함할 수 있다(예를 들어, 비트 셀 유닛(223a)은 비트 셀(221) 및 오퍼레이터(222)를 포함할 수 있다). IMC 회로의 비트 셀 회로는 또한 각각의 게이트 논리 회로를 가질 수 있다(예를 들어, SRAM 비트 셀 회로(225)는 대응하는 게이트 논리 회로(227)를 가질 수 있다). 비트 셀 회로의 비트 셀 유닛은 비트 셀 회로에 대응하는 게이트 논리 회로에 각각 연결될 수 있다(예를 들어, 비트 셀 유닛(223a-223d)은 게이트 논리 회로(227)에 연결될 수 있음).As described below, an IMC circuit (e.g., IMC circuit 220) may include a bit cell circuit (e.g., SRAM bit cell circuit 225), each bit cell circuit having a bit cell circuit. It may have cell units (e.g., bit
전술한 바와 같이, 인-메모리 컴퓨팅(IMC) 회로(220)는 각각의 메모리 뱅크에 배열된 각각의 연산자를 갖는 비트 셀(예를 들어, 비트 셀(221))을 포함하는 게이트 로직 회로(227) 및 연산기들(예: 연산기들(222))를 포함할 수 있다. 연산기들은 각각의 비트 셀에 대한 연산의 연산 결과에 대응하는 신호를 출력한다. 예를 들어, 도 2c는 Bank0에 각각 비트 셀(221-0 내지 221-3)을 갖는 4개의 SRAM 비트 셀 회로를 도시한다. 즉, 비트 셀 회로는 메모리 뱅크 뱅크0, 메모리 뱅크 뱅크1, 메모리 뱅크 뱅크2, 및 메모리 뱅크 뱅크3와 같은 4개의 메모리 뱅크들 각각에 포함될 수 있다. 동일한 메모리 뱅크(예를 들어, 뱅크0)에 대응하는 비트 셀 유닛은 동일한 입력값을 수신할 수 있다. As described above, the in-memory computing (IMC)
전술한 바와 같이, 예를 들어, SRAM 비트 셀 회로(225)에서, 하나의 메모리 뱅크에 대응하는 하나의 비트 셀(221)과 (하나의 비트 셀(221)에 대응하는 연산 결과를 출력하는) 하나의 연산기(222)는 비트 셀의 기본 연산 단위라는 점에서 '비트 셀 유닛'(223)이라 지칭될 수 있다. 하나의 비트 셀(221)은 예를 들어, 비트 값을 저장하기 위한 8T(8-transistor) SRAM 셀 구조를 가질 수 있다. 하나의 연산기(222)는 예를 들어, 연산을 수행하기 위한 2개의 트랜지스터(2T) 회로를 포함할 수 있다. 비트 셀 유닛(223)은 예를 들어, 8T(8-transistor) SRAM 셀 구조를 갖는 비트 셀들(221)에 2개의 트랜지스터(2T) 회로의 연산기들(222)이 결합된 10개의 트랜지스터(10T)들로 구성된 SRAM 셀 구조를 가질 수 있다. 연산기(들)(222)는 예를 들어, 일반 로직 곱셈기(Multiplier)일 수도 있고, 또는 패스 트랜지스터 로직(Pass Transistor Logic)일 수도 있다. 게이트 로직 회로(227)는 복수의 메모리 뱅크들(memory banks)에 대응하는 비트 셀들(221) 중 MAC(Multiplication and Accumulation) 연산을 위한 대상(target) 메모리 뱅크에 속한 비트 셀들 각각에 대응하는 연산 결과를 가산기(230)로 전달한다. As described above, for example, in the SRAM
이하, 설명의 편의를 위하여, '읽기 워드 라인(RWL) 및 쓰기 워드 라인(WWL)'을 '워드 라인(WL)'으로 간략화하여 표현하고, '쓰기 워드 라인 드라이버(WWL driver) 및 읽기 워드 라인 드라이버(RWL driver)'를 '워드 라인 드라이버(WL driver)'로 간략화하여 표현할 수 있다. '쓰기 비트 라인(Write Bit Line; WBL)' 또한 '비트 라인(BL)'으로 간략화하여 표현할 수 있다. Hereinafter, for convenience of explanation, 'read word line (RWL) and write word line (WWL)' are simplified and expressed as 'word line (WL)', and 'write word line driver (WWL driver) and read word line'. ‘Driver (RWL driver)’ can be simplified and expressed as ‘word line driver (WL driver)’. ‘Write Bit Line (WBL)’ can also be simplified and expressed as ‘bit line (BL)’.
IMC 매크로(200)는 모든 데이터를 '0' 및/또는 '1'과 같은 디지털 논리 값으로 표현하는 디지털 연산을 수행할 수 있으며, 입력 데이터(201), 가중치(203), 및 출력 데이터(205)는 바이너리 포맷(binary format)을 가질 수 있다. 예를 들어, 입력 데이터(201)와 가중치(203)는 활성화 함수(fact)dp 의해 출력 데이터(205)로 변환될 수 있다. 도 2a 내지 도 2d는 디지털 논리 회로로 구현될 수 있다.The
읽기 워드 라인(RWL)은 입력 데이터(201)가 인가되는 경로와 동일하여, 입력 드라이버(250)는 읽기 워드 라인 드라이버(RWL driver)에 해당할 수 있다. 입력 드라이버(250)는 인-메모리 컴퓨팅(IMC) 회로(220)의 연산(예: 곱셈 연산 또는 컨볼루션 연산)이 수행될 입력 데이터(201)를 (예를 들어, 외부 연산자)에게 전달할 수 있다. 읽기 워드 라인(RWL) 신호는 입력 데이터(201)의 입력 값에 기초하여 결정될 수 있다. 입력 데이터(201)는 멀티 비트(multi bit) 또는 싱글 비트(single bit) 디지털 데이터일 수 있다. The read word line (RWL) is the same as the path through which the
입력 드라이버(250)를 통해 읽어온 입력 데이터(201)는 인코딩(Encoding; ENC) 블록(255)을 거쳐 IMC 회로(220)의 입력 신호로 변환될 수 있다. 인코딩 블록(255)은 변환한 입력 신호와 함께, 복수의 메모리 뱅크들 중 MAC 연산을 위한 대상(target) 메모리 뱅크를 선택하는 신호를 IMC 회로(220)에 제공할 수 있다. 입력 드라이버(250)의 동작에 대하여는 도 2b를 참조하여 구체적으로 설명한다. 또한, 메모리 뱅크들에서 연산이 수행되는 과정은 아래의 도 2c를 참조하여 설명하고, 쓰기 비트 라인(WBL) 드라이버(270)가 읽어온 데이터(예: 가중치 값 또는 입력 값)를 메모리 뱅크들(비트 셀들)에 기록(write)하는 과정은 아래의 도 2d를 참조하여 보다 구체적으로 설명한다.The
도 2b를 참조하면, 일 실시예에 따른 입력 드라이버(250)가 읽어온 입력 데이터가 인코딩 블록(255)을 통해 IMC 회로(220)로 입력되는 과정의 일례가 도시된다. 예를 들어, IMC 매크로(200)가 도 2a에 도시된 것과 같은 64kb SRAM IMC 매크로인 경우, 입력 드라이버(250)는 IN[63:0]과 같이 64개의 입력 데이터를 읽어올 수 있다. 이때, 64개의 입력 데이터 각각은 4비트로 구성될 수 있다. 입력 드라이버(250)는 4비트로 구성된 입력 데이터(201)(예: "0011 0100 1010")를 한 비트씩 순차적으로 인코딩 블록(255)로 입력할 수 있다. 인코딩 블록(255)은 입력 데이터(201)(예: "0011 0100 1010")를 2비트의 제어 신호(예: "00" 또는 "10")에 따라 4개의 메모리 뱅크들 중 어느 하나의 메모리 뱅크로 전달할 수 있다. 이때, 4개의 메모리 뱅크들 각각은 대응하는 비트 셀들에 해당할 수 있다. Referring to FIG. 2B, an example of a process in which input data read by the
예를 들어, 첫번째 메모리 뱅크(bank 0)가 연산기로 사용될 경우, IMC 매크로(200)는 2-비트의 제어 신호("00")를 인코딩 블록(255)에 인가할 수 있다. 2-비트의 제어 신호("00")가 인코딩 블록(255)에 인가됨에 따라, 인코딩 블록(255)은 입력 데이터(예: "0011 0100 1010")를 첫번째 메모리 뱅크(bank 0)에 연결된 제1 출력(예: O0)을 통해 비트 셀 유닛들에 순차적으로 제공할 수 있다. For example, when the first memory bank (bank 0) is used as an operator, the
두번째 메모리 뱅크(bank 1)가 연산기로 사용될 경우, IMC 매크로(200)는 인코딩 블록(255)에 2-비트의 제어 신호("01")를 인가할 수 있으며, 인코딩 블록(255)은 제2 메모리 뱅크(Bank1)에 연결된 제2 출력(O1)을 통해 제2 메모리 뱅크(Bank1)의 비트 셀 유닛들에 동일한 입력 데이터를 제공할 수 있다.When the second memory bank (bank 1) is used as an operator, the
세번째 메모리 뱅크(bank 2)가 연산기로 사용될 경우, IMC 매크로(200)는 제어 신호("10")를 인코딩 블록(255)에 인가할 수 있고, 인코딩 블록(255)은 제3 메모리 뱅크(Bank2)에 연결된 제3 출력(O2)을 통해 제3 메모리 뱅크(Bank2)의 비트 셀 유닛들에 동일한 입력 데이터를 제공할 수 있다. When the third memory bank (bank 2) is used as an operator, the
네번째 메모리 뱅크(bank 3)가 연산기로 사용될 경우, IMC 매크로(200)는 제어 신호("11")를 인코딩 블록(255)에 인가할 수 있고, 인코딩 블록(255)은 입력 데이터를 제4 메모리 뱅크(Bank3)에 연결된 제4 출력(O3)을 통해 제4 메모리 뱅크(Bank3)로 출력할 수 있다. 각각의 경우에, 인코딩 블록(255)의 어느 출력(예를 들어, O0)이 제어 신호에 의해 활성화되어 입력 데이터를 대응하는 타겟/선택된 메모리 뱅크(예를 들어, Bank0)에 제공되던, 인코딩 블록(255)은 다른 출력들(예를 들어, O1, O2 및 O3)이 "0"을 다른(선택되지 않은/타겟이 아닌) 메모리 뱅크로 출력하도록 할 수 있다. 이러한 방식으로 IMC 매크로의 게이트 논리 회로의 출력은 (입력 비트와 선택된 메모리 뱅크의 비트 셀에 있는 비트에서 연산되므로) 선택된 메모리 뱅크의 연산자의 각 연산 출력에만 의존할 수 있다.When the fourth memory bank (bank 3) is used as an operator, the
도 2c를 참조하면, 일 실시예에 따라 입력 드라이버(250)가 읽어온 입력 데이터(201)가 SRAM 비트 셀 회로(225)의 메모리 뱅크들로 전달됨에 따라 각 메모리 뱅크에서 연산이 수행되는 과정을 설명하기 위한 도면이 도시된다. 예를 들어, 도 2b를 참조하여 설명한 바와 같이, 인코딩 블록(255)에 제어 신호("00")가 인가됨에 따라, 인코딩 블록(255)은 입력 데이터(예: "0011 0100 1011")를 IMC 회로(220)의 첫번째 메모리 뱅크(bank 0)에 대응하는 비트 셀 유닛들(221-0, 221-1, 221-2, 221-3)에 비트 단위로 순차적으로 제공할 수 있다. 이때, 인코딩 블록(255)는 첫번째 메모리 뱅크(bank 0)를 제외한 나머지 메모리 뱅크들(예: bank 1, bank 2, bank 3)에는 '0'을 제공할 수 있다. 첫번째 메모리 뱅크(bank 0)의 비트 셀 유닛들 각각은 인코딩 블록(255)에서 순차적으로 제공되는 입력 데이터의 값들과 각 비트 셀들(221-0, 221-1, 221-2, 221-3)에 저장된 가중치 값(예를 들어, 임의의 "0" 또는 "1"을 포함하는 가중치(w0, w1, w2, w3) 간의 연산(예: 곱셈 연산) 결과를 출력할 수 있다. Referring to FIG. 2C, according to one embodiment, the
예를 들어, 비트 셀에 저장된 가중치 값 w0이 "0"이면, 비트 셀 유닛에 연결된 게이트 로직 회로(227)는 입력 데이터(예를 들어, "0011 0100 1010")와 w0("0")을 비트 단위로 곱한 결과 "0000 0000 0000"을 출력할 수 있다. Bank0 이외의 나머지 메모리 뱅크들의 가중치 내용은 이러한 연산을 위한 게이트 로직 회로(227)의 출력에 영향을 주지 않는데, 이는 나머지 메모리 뱅크들은 각각의 곱셈 연산 중에 모두 인코딩 블록(255)으로부터 "0"을 수신하기 때문이다. 가중치 값 w0 = 1인 경우, 비트 셀 유닛(221-0)에 연결된 로직 회로(227)는 연산 결과로써 입력 데이터(예: "0011 0100 1011")와 "1" 간의 곱셈 연산 결과인 "0011 0100 1011"를 출력할 수 있다. 다시, Bank0 이외의 메모리 뱅크의 가중치 값은 이들 메모리 뱅크들이 각각의 곱셈 연산 중에 모두 인코딩 블록(255)으로부터 "0"을 수신하기 때문에 이들 연산에 대한 게이트 논리 회로(227)의 출력에 영향을 주지 않는다. For example, if the weight value w 0 stored in the bit cell is “0”, the
도 2d를 참조하면, 일 실시예에 따른 쓰기 비트 라인(WBL) 드라이버(270)가 읽어온 데이터(예: 가중치 값 또는 입력 값)를 메모리 뱅크들(비트 셀들)(예: 첫번째 메모리 뱅크(bank 0))에 쓰는(write) 과정을 설명하기 위한 도면이 도시된다. 쓰기 워드 라인(WWL) 드라이버(210)는 인-메모리 컴퓨팅(IMC) 회로(220)에 데이터를 기록하기 위해 메모리 뱅크들(및 그에 따른 비트 셀들)을 선택할 수 있다. 예를 들어, 첫번째 메모리 뱅크(bank 0)에 데이터를 기록하고자 하는 경우, 쓰기 워드 라인(WWL) 드라이버(210)는 쓰기 워드 라인(WWL)[3:0]에 "1000"를 적용(인가)하여 첫번째 메모리 뱅크(bank 0)를 선택할 수 있다. 네번째 메모리 뱅크(bank 3)에 데이터를 기록하고자 하는 경우, 쓰기 워드 라인(WWL) 드라이버(210)는 쓰기 워드 라인(WWL)[3:0]에 "0001"를 적용하여 네번째 메모리 뱅크(bank 3)를 선택할 수 있다. 또한, 쓰기 비트 라인(WBL) 드라이버(270)는 쓰기 워드 라인(WWL) 드라이버(210)에 의해 선택된 비트 셀들에 저장할 데이터(예: 가중치 값)를 제공할 수 있다. 도 2a에 도시된 WBL[255:0]은 비트 셀들에 데이터를 기록(write)하는 경로에 해당할 수 있다. 도 2a에 도시된 것과 같은 64 x 64 연산기에서는 256 비트의 데이터가 각각 4 비트의 가중치(예를 들어, w0, w1, w2, w3)를 갖는 64개의 행들(rows)에 동시에 기록될 수 있다. 구조에 따라서, 64 비트의 데이터를 열(column) 방향으로 동시에 기록할 수도 있다. 256 비트의 입력(저장용)이 (주기 당 한 열씩) 각 열에 연속적으로 데이터를 전달할 때, 전체 연산기의 데이터를 총 64 싸이클 동안 기록할 수 있다. 쓰기 비트 라인(WBL) 드라이버(270)가 쓰기 동작을 수행하는 경우, 읽기 워드 라인(RWL)에는 전부 '0'이 입력될 수 있다. Referring to FIG. 2D, the write bit line (WBL)
입력 드라이버(250)는 예를 들어, 프로세서(예: 도 10의 프로세서(1010) 참조)와 같은 외부 모듈로부터 입력 데이터(201)를 수신할 수도 있고, 또는 IFM(input feature map) 버퍼(buffer)(예: 도 9의 IFM 버퍼(931) 참조)에 저장된 입력 피처맵(input feature map)으로부터 입력 데이터(201)를 읽어올 수도 있다. 입력 데이터의 소스는 중요하지 않으며, 임의의 소스가 사용될 수 있다. The
예를 들어, 도 2a에 도시된 입력 데이터(201)의 입력 값이 멀티 비트인 경우, 입력 드라이버(250)는 멀티 비트 값들을 비트 자리(bit position) 별로 순차적으로 인-메모리 컴퓨팅(IMC) 회로(220)에 전달할 수 있다. 예를 들어, IMC 매크로(200)가 뉴럴 네트워크 연산을 위해 동작하는 경우, 입력 드라이버(250)는 읽기 워드 라인 드라이버(RWL driver)와 같이 동작할 수 있다. 이하, 입력 드라이버(250)와 읽기 워드 라인 드라이버(RWL driver)는 서로 동일한 의미로 이해될 수 있다. For example, when the input value of the
이 경우, 입력 드라이버(250)는 읽기 워드 라인들(예: RWL0, RWL1 내지 RWLM-1)에 신경망의 각 레이어들의 M개 노드들로부터 수신된 입력 값들을 인가할 수 있다. 이때, RWLm과 IN[m]은 같은 노드에 해당할 수 있다. In this case, the
예를 들어, m번째 노드에서의 입력 값이 RWLm에 인가될 수 있고, RWLm에 인가되는 입력 값은 멀티 비트이거나 싱글 비트일 수 있다. 여기서, m은 0 이상 M-1 이하의 정수이고, M은 1 이상의 정수일 수 있다. 예를 들어, RWLm에 인가되는 입력 값이 멀티 비트인 경우, 전술한 바와 같이 순차적으로 비트 자리 별 비트 값이 인-메모리 컴퓨팅(IMC) 회로(220)로 전달될 수 있다. 입력 드라이버(250)는 전술한 노드들로부터 수신된 M개의 입력 값들을 개별적으로 M개의 비트 셀들로 전달할 수 있다. 후술하겠으나, M개의 비트 셀들 각각은 다른 비트 셀들에 대해 병렬적으로 곱 연산을 수행하므로, 각 비트 라인 별로 M개의 곱 연산들이 병렬적으로 수행될 수 있다.For example, the input value from the mth node may be applied to RWLm, and the input value applied to RWLm may be multi-bit or single bit. Here, m is an integer from 0 to M-1, and M may be an integer from 1 to 1. For example, when the input value applied to RWLm is multi-bit, the bit value for each bit position may be sequentially transmitted to the in-memory computing (IMC)
또는, 가중치(203)가 멀티 비트인 경우, 가중치(203)를 표현하기 위한 비트 개수 만큼의 출력 라인들이 그룹핑될 수 있다. 그룹핑된 출력 라인들을 '출력 라인 그룹'이라고 부를 수 있다. 예를 들어, 가중치(203)가 X 비트인 경우, X개의 출력 라인들이 그룹핑될 수 있고, IMC 매크로(200)는 그룹핑된 X개의 출력 라인들에 의해 입력 데이터(201)의 입력값과 X 비트의 가중치(203) 간의 곱셈을 합산한 결과를 출력할 수 있다. 여기서, X는 2이상의 정수일 수 있다. Alternatively, when the
SRAM 비트 셀 회로(225)는 멀티 비트의 가중치를 표현하기 위해 여러 개의 비트 셀들로 구성될 수 있다. 이때, 입력은 멀티 비트의 가중치와의 곱을 위해서 동시에 각 비트 셀들로 인가될 수 있다. 예시적으로 한 그룹으로 묶인 X개의 출력 라인들 중 제1 출력 라인은 가중치의 LSB(least significant bit)에 대응하는 가중치 비트 값과 입력 비트 값 간의 곱셈 결과를 출력할 수 있다. 유사하게, 제x 출력 라인은 LSB로부터 x-1번째 비트 자리의 가중치 비트 값과 입력 비트 값 간의 곱셈 결과를 출력할 수 있다. 여기서, x는 2이상 X 이하의 정수일 수 있다. 이 경우, 누적 연산기(240)는 같은 출력 라인 그룹의 출력 라인에 대응하는 비트 자리를 일정 비트(예: 한 비트) 씩 쉬프트(shift)한 결과를 해당 출력 라인에서 출력된 합산 결과에 적용하고, 비트 자리를 쉬프트한 값들을 누적함으로써 최종 MAC 연산 결과를 출력할 수 있다. 누적 연산기(240)는 예를 들어, 쉬프터(shifter)과 애더(adder)로 구현될 수도 있고, 또는 별도의 누산기(accumulator)에 의해 구현될 수도 있으며, 반드시 이에 한정되지는 않는다. The SRAM
비트 셀 들 각각은 예를 들어, 가중치(203) 값(예: 제1 값)을 저장할 수 있다. 복수의 비트 셀들을 포함하는 인-메모리 컴퓨팅(IMC) 회로(220)의 구조 및 동작은 아래의 도 3 내지 도 4를 통해 보다 구체적으로 설명한다. Each of the bit cells may store, for example, a
인-메모리 컴퓨팅(IMC) 회로(220)는 입력 드라이버(250)를 통해 전달받은 입력 데이터(201)의 값과 비트 셀에 저장된 가중치(203) 간의 곱 연산을 수행할 수 있다. 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로(220)은 비트 셀(들), 연산기(들)(222) 및 게이트 로직 회로가 연결된 구조를 통해 비트 셀들 각각에 대응하는 연산 결과(예: 비트 와이즈(bit-wise) 곱 연산 결과)에 대응하는 신호를 출력할 수 있다. 예를 들어, 아래의 도 3에서 설명하는 바와 같이, 전반적인 연산 효과로서, 인-메모리 컴퓨팅(IMC) 회로(220)는 비트 셀들 각각에 저장된 가중치(203) 값(예: 제1 값)과 워드 라인을 통해 메모리 뱅크들에 대응하는 비트 셀들의 입력 신호로 인가되는 입력값(예: 제2 값) 간의 곱 연산 결과에 해당하는 신호들에 대한 AND 논리 연산의 결과 값을 가산기(230)로 전달할 수 있다. The in-memory computing (IMC)
연산기(222)는 예를 들어, 트랜지스터 개수를 최소화한 패스 트랜지스터 로직의 형태일 수 있다.For example, the
가산기(230)는 하나 이상의 인-메모리 컴퓨팅(IMC) 회로(220)의 출력 단에 연결될 수 있다. 인-메모리 컴퓨팅(IMC) 회로(220)의 출력 단은 출력 라인에 대응할 수 있다. 하나의 출력 라인에 하나 이상의 인-메모리 컴퓨팅(IMC) 회로(220)의 출력 단이 연결될 수 있다. 가산기(230)는 하나 이상의 인-메모리 컴퓨팅(IMC) 회로(220)에서 출력된 신호를 가산할 수 있다. 가산기(230)는 같은 출력 라인에 연결된 복수의 인-메모리 컴퓨팅(IMC) 회로(220)들의 곱셈 결과를 합산할 수 있다. 가산기(230)는 예를 들어, 전가산기(full adder), 반가산기(half adder), 및/또는 플립-플롭(flip-flop)으로 구현될 수 있다. 가산기(230)는 예를 들어, 가산기 트리 회로(adder tree circuit)와 같은 디지털 가산기에 해당할 수 있으며, 반드시 이에 한정되지는 않는다.
또한, 전술한 바와 같이, 인-메모리 컴퓨팅(IMC) 회로(220)의 출력 결과가 전체적으로, AND 논리 연산의 결과 값이므로, 가산기(230)는 각 인-메모리 컴퓨팅(IMC) 회로(220)의 출력 결과를 반전시키는 인버터(inverter)를 포함하여 구현될 수도 있다. 이 경우, 가산기(230)는 인-메모리 컴퓨팅(IMC) 회로(220)의 출력 결과를 반전시킨 값을 합산할 수 있다. 가산기(230)는 비트 셀들 각각에 대응하는 곱셈 결과를 합산한 결과를 누적 연산기(240)에 전달할 수 있다. 가산기(230)는 인-메모리 컴퓨팅(IMC) 회로(220)의 각 출력 라인마다 배치될 수 있다. In addition, as described above, since the output result of the in-memory computing (IMC)
누적 연산기(240)는 하나 이상의 인-메모리 컴퓨팅(IMC) 회로(220)의 곱 연산 결과를 합산하는 가산기(230)의 출력을 저장하고, 합산 결과를 누적할 수 있다. 누적 연산기(240)는 가산기(230)에서 비트 셀들 각각에 대응하는 곱셈 결과를 합산하고, 합산한 결과를 최종적으로 결합하여 MAC 연산 결과(예를 들어, Q0[13:0] ~ Q63[13:0])로써 출력할 수 있다. The
예를 들어, 입력 드라이버(250)가 멀티 비트로 된 입력 데이터(201)를 수신한 경우, 워드 라인 드라이버(210)는 쓰기 워드 라인들(write word lines)(예를 들어, WWL0[3:0] ~ WWL63[3:0])을 통해 입력 데이터(201)의 비트 자리 별 비트 값을 인-메모리 컴퓨팅(IMC) 회로(220)에게 순차적으로 전달할 수 있다. 이에 따라, 인-메모리 컴퓨팅(IMC) 회로(220) 또한 해당하는 비트 자리의 곱 연산 결과를 출력할 수 있다. 가산기(230)는 해당하는 비트 자리의 곱 연산 결과 값들을 합산한 결과를 누적 연산기(240)에 전달할 수 있다. For example, when the
누적 연산기(240)는 해당하는 비트 자리의 합산 결과를 비트 시프팅(bit shift)하여 합산할 수 있다. 누적 연산기(240)는 다음 비트 자리의 합산 결과를 해당하는 비트 시프팅된 합산 결과에 결합함으로써 곱 연산 결과들을 비트 자리에 따라 누적할 수 있다. 후술하겠으나, 입력 드라이버(250)가 싱글 비트로 된 입력 데이터를 수신한 경우 비트 시프팅이 필요 없으므로, 누적 연산기(240)는 가산기(230)의 합산 결과를 바로 출력하거나, 또는 출력 레지스터(output register)(미도시)에 저장할 수 있다. The
출력 레지스터는 누적 연산기(240)로부터 출력되는 최종 곱 연산 결과(예: 곱셈 누적 결과)를 저장할 수 있다. 누적 연산기(240)는 쉬프트 연산과 합 연산 뿐만 아니라. 누적 연산 또한 수행한다는 점에서 "Shift & adder + accumulaor"(240)라고 부를 수도 있다. 출력 레지스터에 저장된 최종 곱셈 누적 결과(예: MAC 연산 결과)는 예를 들어, 전자 시스템의 프로세서(예: 도 10의 프로세서(1010) 참조)에 의해 판독되어 다른 연산을 위해 사용될 수 있다. 예를 들어, IMC 매크로(200)가 한 번에 뉴럴 네트워크의 일부 레이어에 대응하는 MAC 연산을 수행하는 경우, 출력 레지스터에 저장된 MAC 연산 결과는 다음 레이어에서 수행되는 연산을 위해 워드 라인 드라이버(210)로 전달될 수도 있다. IMC 매크로(200)의 워드 라인 드라이버(210)는 다음 레이어에 대응하는 가중치 집합이 설정된 비트 셀(들)을 선택하여 곱 연산을 수행할 수 있다.The output register may store the final multiplication operation result (eg, multiplication accumulation result) output from the
쓰기 비트 라인 드라이버(WBL driver)(270)는 인-메모리 컴퓨팅(IMC) 회로(220)에 포함된 하나 이상의 비트 셀의 데이터를 쓸 수 있다. 쓰기 비트라인 드라이버(WBL driver)(270)는 '쓰기 회로'로 간략화하여 표현할 수 있다. 이하, '쓰기 비트라인 드라이버'와 '쓰기 회로'는 서로 혼용될 수 있다. The write bit line driver (WBL driver) 270 can write data of one or more bit cells included in the in-memory computing (IMC)
하나 이상의 비트 셀의 데이터는 예를 들어 MAC 연산에서 입력 값에 곱해질 가중치(203) 값을 포함할 수 있다. 쓰기 비트라인 드라이버(270)는 비트 라인(예: WBL, WBLB)을 통해 인-메모리 컴퓨팅(IMC) 회로(220)의 비트 셀에 액세스(access)할 수 있다. 인-메모리 컴퓨팅(IMC) 회로(220)가 복수의 비트 셀들을 포함하는 경우, 쓰기 비트라인 드라이버(270)는 복수의 워드 라인들(RWL) 중 활성화(activation)된 워드 라인에 연결된 비트 셀에 액세스할 수 있다. 쓰기 비트라인 드라이버(270)는 액세스한 비트 셀에 가중치를 설정(쓰기)하거나, 비트셀에 설정된 가중치를 읽어올 수 있다. The data of one or more bit cells may include a
메모리 컨트롤러(260)는 워드 라인 드라이버(210), 하나 이상의 인-메모리 컴퓨팅(IMC) 회로(220), 누적 연산기(240)(예를 들어, 누적 연산기<0> ~ 누적 연산기<63>), 가산기(230), 입력 드라이버(250) 및/또는 출력 레지스터를 제어할 수 있다.The
IMC 매크로(200)는 예를 들어, 뉴럴 네트워크 장치, 인 메모리 컴퓨팅 회로, MAC 연산 회로 및/또는 장치로 구현될 수 있으며, 반드시 이에 한정되지는 않는다. IMC 매크로(200)는 워드 라인을 통해 입력 값을 수신하고, 10T SRAM 비트 셀에 저장된 가중치와 입력 값 간의 곱셈 결과에 대응하는 신호를 비트 라인을 통해 출력할 수 있다. The
도 3은 일 실시예에 따른 인 메모리 컴퓨팅(IMC) 회로의 구조를 설명하기 위한 도면이다. 도 3을 참조하면, 일 실시예에 따른 인 메모리 컴퓨팅(IMC) 회로(220)는 SRAM 비트셀 회로(225) 및 게이트 로직 회로(340)를 포함할 수 있다. FIG. 3 is a diagram for explaining the structure of an in-memory computing (IMC) circuit according to an embodiment. Referring to FIG. 3, an in-memory computing (IMC)
SRAM 비트셀 회로(225)는 복수의 메모리 뱅크들(memory banks) 각각에 대응하는 복수 개의 비트 셀 유닛(223)을 포함할 수 있다. 비트 셀 유닛(223)은 하나의 비트 셀(310) 및 입력된 비트와 하나의 비트 셀(310)에 저장된 값 간의 연산 결과에 해당하는 신호를 출력하는 연산기(320)를 포함할 수 있다. 연산기(320)는 도 2를 통해 전술한 연산기(222)에 해당할 수 있다. _비트 셀(310)은 2개의 인버터들(311,313) 및 2개의 트랜스미션 게이트들(315,317)로 구성된 워드 라인 트랜지스터를 포함할 수 있다. 여기서, '트랜스미션 게이트'는 NMOS 트랜지스터와 PMOS 트랜지스터가 병렬로 연결된 양방향 스위치로서 외부에서 적용하는 로직 레벨에 의해 제어될 수 있다. 예를 들어, 트랜스미션 게이트(315,317)의 인에이블(enable; E) 단자에 '1'이 인가되는 경우, 트랜스미션 게이트(315,317)는 '닫힌(Closed)' 스위치의 역할을 수행할 수 있다. 이와 달리, 트랜스미션 게이트(315,317)의 인에이블 단자에 '0'이 인가되는 경우, 트랜스미션 게이트(315,317)는 '열린(Opened)' 스위치의 역할을 수행할 수 있다. 인버터들(311, 313) 및 트랜스미션 게이트들(315, 317) 각각은 2개의 트랜지스터들로 구성될 수 있다.The SRAM
연산기(320)는 복수의 트랜지스터들(예: 제1 트랜지스터(321), 제2 트랜지스터(323))을 포함할 수 있다. 복수의 트랜지스터들(예: 제1 트랜지스터(321), 제2 트랜지스터(323))은 비트 셀(310)에 저장된 제1 값과 입력 드라이버(250)를 통해 비트 셀(310)에 입력 신호로 인가되는 제2 값 간의 비트 와이즈(bit-wise) 곱 연산 결과에 해당하는 신호를 출력할 수 있다. The
연산기(320)는 도 3, 도 5 및/또는 도 6에 도시된 것과 같이 2개의 트랜지스터들(2T)로 구성될 수도 있고, 또는 도 7 및/또는 도 8에 도시된 것과 같이 3개의 트랜지스터들(3T)로 구성될 수도 있다.
예를 들어, 도 3에 도시된 것과 같이, 연산기(320)가 2개의 트랜지스터들로 구성된 경우, 비트 셀 유닛(223)이 10개의 트랜지스터들(2 x 2 + 2 x 2 + 2 = 10)로 구성된다는 점에서 SRAM 비트셀 회로(225)는 '10T SRAM 셀' 구조 또는 '10T' 구조라고 부를 수 있다. For example, as shown in FIG. 3, when the
SRAM 비트셀 회로(225)의 비트 셀 유닛들(310) 중 동일한 메모리 뱅크에 해당하는 비트 셀 유닛들에는 동일한 입력값이 인가될 수 있다. '메모리 뱅크'는 전체 메모리 영역을 복수 개의 블록들로 나눈 경우, 하나의 블록에 해당할 수 있다. 메모리 뱅크는 메모리 영역을 나타내는 동일한 번지가 여러 쌍 존재하고, 64bit 단위의 입/출력이 발생하는 경우에 하나의 데이터 패스를 공유하는 묶음인 채널(channel) 안에서 하나 또는 그 이상의 메모리의 논리적 묶음에 해당할 수 있다. 메모리 뱅크는 반드시 여러 쌍 또는 세트로 사용될 수 있다. 메모리 뱅크는 예를 들어, 애더 트리(adder Tree)와 같은 가산기(230)를 공유하는 메모리 그룹에 해당할 수 있다. 비트 셀(310)들은 예를 들어, 4개의 메모리 뱅크들에 대응할 수 있다. The same input value may be applied to
연산기(320)들 각각은 복수의 메모리 뱅크들 중 해당 메모리 뱅크에 대응하는 비트 셀들 각각에 저장된 제1 값과 워드 라인을 통해 해당 메모리 뱅크의 입력 신호로 인가되는 제2 값 간의 비트 와이즈(bit-wise) 곱 연산 결과에 해당하는 신호를 출력하는 복수의 트랜지스터들(예: 321, 323)을 포함할 수 있다. 연산기(320)들 각각은 비트 셀(310)들 각각에 대응할 수 있다. Each of the
게이트 로직 회로(gate logic circuit)(340)는 복수의 메모리 뱅크들 중 MAC(Multiplication and Accumulation)을 위한 대상(target) 메모리 뱅크에 속한 비트 셀들 각각에 대응하는 연산 결과를 가산기(230)로 전달할 수 있다. 게이트 로직 회로(340)는 연산기(320)들 각각에 제2 값이 인가되는지에 따라 해당 메모리 뱅크에 속한 비트 셀들 각각에 대응하는 연산 결과를 가산기(230)로 전달할 수 있다. 게이트 로직 회로(340)는 예를 들어, NAND 게이트, NOR 게이트, XOR 게이트, XNOR 게이트, AND 게이트, 및 OR 게이트 중 어느 하나를 포함할 수 있으며, 반드시 이에 한정되지는 않는다. 예를 들어, 게이트 로직 회로(340)가 NAND 게이트 이외에 NOR 게이트, XOR 게이트, XNOR 게이트, AND 게이트, 및 OR 게이트를 포함하는 경우, 게이트 로직 회로(340)의 구조는 해당하는 게이트의 논리 연산에 부합하는 형태로 변경될 수 있다. The
인 메모리 컴퓨팅(IMC) 회로(220)에서 SRAM 비트셀 회로(225)의 레이아웃(layout)의 크기와 라우팅(routing)의 복잡도는 SRAM IMC 회로의 전력 효율, 및/또는 면적 효율에 큰 영향을 줄 수 있다. In the in-memory computing (IMC)
또한, 메모리의 면적 효율(DM)은 아래의 수학식 2와 같이 구할 수 있다. Additionally, the area efficiency (D M ) of the memory can be obtained as shown in
여기서, WE는 multi-bit을 위한 메모리 용량에 해당할 수 있다. 예를 들어, 8bit을 표현하기 위해서는 WE는 8이고 되고, 4bit을 표현하기 위해서는 WE는 4가 될 수 있다. Here, WE may correspond to memory capacity for multi-bit. For example, to express 8 bits, WE can be 8, and to express 4 bits, WE can be 4.
면적 밀도는 수학식 3에 따라 메모리의 면적(Area)을 감소시키거나 메모리 뱅크(Bank)의 개수를 증가시킴으로써 개선할 수 있다. 메모리의 면적은 예를 들어, 비트 셀들, 가산기(230) 및/또는 주변 제어 라인들이 차지하는 면적에 해당할 수 있다. Area density can be improved by reducing the area of the memory or increasing the number of memory banks according to
마찬가지 원리로, 인 메모리 컴퓨팅(IMC) 회로(220)에 포함된 트랜지스터(들)의 개수를 줄이거나, 메모리셀을 구성하는 트렌지스터(들)의 개수를 줄이거나, 메모리 뱅크들의 개수를 증가시킴으로써 인 메모리 컴퓨팅(IMC) 회로(220)의 면적을 감소시킬 수 있다. In the same principle, by reducing the number of transistor(s) included in the in-memory computing (IMC)
일 실시예에서는 SRAM의 비트 셀들을 복수의 메모리 뱅크들에 대응하도록 구성하고, 작은 개수(예: 2개 또는 3개)의 트랜지스터들로 구성된 연산기(320) 및 게이트 로직 회로(340)에 의해 복수의 메모리 뱅크들 중 대상(target) 메모리 뱅크에 대응하는 연산 결과가 가산기(230)로 전달되도록 함으로써 인 메모리 컴퓨팅(IMC) 회로의 제어 라인의 개수를 감소시켜 저전압의 쓰기(Write) 동작이 가능하게 하는 한편, 인 메모리 컴퓨팅(IMC) 회로의 면적 효율 또한 향상시킬 수 있다. 여기서, '대상 메모리 뱅크'는 복수의 메모리 뱅크들 중 해당 메모리 뱅크에 속한 셀들 각각에 대응하는 연산 결과가 MAC 연산에 사용되는 경우에 해당 메모리 뱅크를 지칭하는 용어일 수 있다. In one embodiment, the bit cells of the SRAM are configured to correspond to a plurality of memory banks, and the plurality of memory banks are configured by an
인-메모리 컴퓨팅(IMC) 회로(220)의 비트 셀들을 복수 개의 메모리 뱅크들로 구성하는 방법은 아래의 도 4를 참조하여 보다 구체적으로 설명한다. A method of configuring the bit cells of the in-memory computing (IMC)
도 4는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 블록도이다. 도 4를 참조하면, 복수의 메모리 뱅크들(예를 들어, Bank0 내지 Bankn)에 대응하는 SRAM 비트셀들(415)(예: 도 2의 비트 셀들(221))과 SRAM 비트셀들(415)에 대응하는 연산기들(420)(예: 도 2의 연산기들(222))을 포함하는 SRAM 비트셀 회로(225) 및 가산기(440)(예: 애더 트리)를 포함하는 인-메모리 컴퓨팅(IMC) 회로의 구조를 나타낸 도면(400)이 도시된다. 4 is a block diagram of an in-memory computing (IMC) circuit according to one embodiment. Referring to FIG. 4, SRAM bit cells 415 (e.g.,
4개의 메모리 뱅크들 별로 SRAM 비트 셀 회로(410)의 비트 셀들(415) 중 동일한 메모리 뱅크에 해당하는 비트 셀들에는 입력 드라이버가 읽어온 SRAM의 동일한 워드 라인(예: IN<0: n-1> <0> , .. , IN<0: n-1> <63>)의 값이 인가될 수 있다. 여기서, n은 예를 들어, 64일 수 있으나, 반드시 이에 한정되지는 않는다. Among the
IMC 회로(220)의 SRAM 비트 셀 회로(225)는 연산기들(420)로 입력되는 외부 입력 신호 값과 SRAM 비트 셀들(415)에 저장된 값 사이의 연산 결과에 해당하는 신호를 출력하는 연산기들(420)을 포함할 수 있다. IMC 회로(220)는 MAC 연산을 위한 대상 메모리 뱅크에 속하는 각 SRAM 비트 셀들(415)에 대응하는 연산 결과가 가산기(440)로 전달되도록 연산을 수행하는 연산기들(420)의 입력을 조절할 수 있다(즉, 목표가 아닌 연산 결과는 연산 결과에 기여하지 않는다). The SRAM
연산기들(420) 각각의 출력은 게이트 로직 회로(430)의 로직 연산(예: NAND 로직 연산)을 거쳐 애더 트리와 같은 가산기(440)로 전달될 수 있다. The output of each of the
인-메모리 컴퓨팅(IMC) 회로(220)는 MAC 연산을 위한 대상 메모리 뱅크에 속한 비트 셀들에 대응하는 연산 결과가 대상 메모리 뱅크의 비트 셀 값과 입력 비트 값에 따라 '1' 또는 0'이 되도록 하고, 대상 메모리 뱅크를 제외한 나머지 메모리 뱅크들에 속한 비트 셀들에 대응하는 연산 결과가 '0'이 되도록 할 수 있다. 이렇게 함으로써 대상 메모리 뱅크에 대응하는 연산 결과를 MAC 연산에 사용할 수 있고, 대상 메모리 뱅크가 아닌 메모리 뱅크들은 연산 결과에 영향을 주지 않는다. The in-memory computing (IMC)
일 실시예에서는 SRAM 비트셀들(415)을 복수의 메모리 뱅크들로 구성함으로써 연산기(들)(420)를 제어하는 제어 라인들의 개수를 줄여 인-메모리 컴퓨팅(IMC) 회로(220)의 구현 면적을 감소시키고, 이를 통해 인-메모리 컴퓨팅(IMC) 회로(220)의 면적 효율을 향상시킬 수 있다. In one embodiment, the number of control lines that control the operator(s) 420 is reduced by configuring the
또한, 일 실시예에서는 연산기(들)(420)에 의해 곱 연산을 위한 트랜지스터의 개수를 줄임으로써 인-메모리 컴퓨팅(IMC) 회로(220)를 구성하는 전체 트랜지스터들의 개수를 감소시킬 수 있다. Additionally, in one embodiment, the total number of transistors constituting the in-memory computing (IMC)
인-메모리 컴퓨팅(IMC) 회로(220)는 SRAM 비트셀 회로(225), 게이트 로직 회로(430), 및 가산기(440) 각각에 인가되는 전원을 부분적으로 분리하여 SRAM 비트셀 회로(225), 게이트 로직 회로(430), 및/또는 가산기(440) 각각에 상이한 전압이 인가되도록 할 수 있다. The in-memory computing (IMC)
도 5a 및 도 5b는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 연산기가 2개의 트랜지스터들로 구성된 경우의 동작을 설명하기 위한 도면이다. 도 5a를 참조하면, 일 실시예에 따른 SRAM 비트셀 회로(225) 및 게이트 로직 회로(예: NAND 게이트)(430)를 포함하는 인-메모리 컴퓨팅(IMC) 회로의 구조를 나타낸 도면(500)이 도시된다. FIGS. 5A and 5B are diagrams for explaining an operation when an operator of an in-memory computing (IMC) circuit is composed of two transistors, according to an embodiment. Referring to FIG. 5A, a diagram 500 showing the structure of an in-memory computing (IMC) circuit including an
SRAM 비트셀 회로(225)는 각각의 비트 셀 유닛에 대해, 8개의 트랜지스터들(8T)로 구성된 비트 셀(310)과 2개의 트랜지스터들(2T)로 구성된 연산기(320) 및 게이트 로직 회로(430)를 결합하여 구현된 곱셈 셀일 수 있다. SRAM 비트셀 회로(225)는 예를 들어, 4비트의 입력 신호들(IN0, IN1, IN2, IN3) 각각에 연결된 4개의 메모리 뱅크들(Bank0, Bank1, Bank2, Bank3) 각각에 대응하는 비트 셀(310)들 및 비트 셀(310)들 각각에 대응하는 연산기(320)들을 포함할 수 있다.The SRAM
연산기(320)는 제1 트랜지스터(N1)(321) 및 제2 트랜지스터(P1)(323)를 포함하는 2개의 트랜지스터(2T) 회로로 구성될 수 있다. 제1 트랜지스터(321)는 예를 들어, NMOS 트랜지스터에 해당할 수 있으며, 반드시 이에 한정되지는 않는다. 또한, 제2 트랜지스터(323)는 PMOS 트랜지스터에 해당할 수 있으며, 반드시 이에 한정되지는 않는다. The
예를 들어, 대상 메모리 뱅크(예: 메모리 뱅크 0(Bank0))의 입력 신호에 해당하는 제2 값(예: 입력 신호 IN0)은 메모리 뱅크 0에 대응하는 비트 셀(310)의 읽기 워드 라인(RWL)을 통해 제1 트랜지스터(321)의 제1 게이트 단자 및 제2 트랜지스터(323)의 제2 게이트 단자에 인가될 수 있다. 제1 트랜지스터(321)의 드레인 단자에는 대상 메모리 뱅크인 메모리 뱅크 0에 속한 비트 셀(310)에 저장된 가중치(W)의 역전된 가중치(Inverted Weight)() 값이 인가될 수 있다. 제1 트랜지스터(321)의 소스 단자는 제2 트랜지스터(323)의 드레인 단자를 거쳐 게이트 로직 회로(430)의 입력 단자에 연결될 수 있다. For example, the second value (e.g., input signal IN 0 ) corresponding to the input signal of the target memory bank (e.g., memory bank 0 (Bank 0 )) is the read word of the
제1 트랜지스터(321)의 제1 게이트 단자를 거친 제1 트랜지스터(321)의 출력값은 제2 트랜지스터(323)의 제2 게이트 단자를 거친 제2 트랜지스터(323)의 출력값과 연결됨으로써 비트 와이즈 곱 연산 결과에 해당하는 신호(예를 들어, O1)로 출력될 수 있다. The output value of the
도 5b를 참조하면, 도 5a에 도시된 인-메모리 컴퓨팅(IMC) 회로에서 메모리 뱅크 0(Bank0)가 대상 메모리 뱅크인 경우의 SRAM 비트셀 회로(225)의 동작을 나타낸 진리표(truth table)(530)가 도시된다. Referring to FIG. 5B, a truth table showing the operation of the
도 5a의 열(column)의 헤딩은 도 5a의 회로에서 동일한 포인트/라인들에 대응할 수 있다. The headings of the columns in FIG. 5A may correspond to the same points/lines in the circuit of FIG. 5A.
일례로, 메모리 뱅크 0(Bank0)에 대응하는 입력 신호 IN0는 '1'이고, 메모리 뱅크 1(Bank1), 메모리 뱅크 2(Bank2), 및 메모리 뱅크 3(Bank3) 각각에 대응하는 입력 신호 IN1, IN2, IN3는 '0' 일 수 있다. 또한, 메모리 뱅크 0(Bank0)의 비트 셀(310)에 저장된 가중치(W)가 '1'이라면, 역전된 가중치()는 '0'일 수 있다. For example, the input signal IN 0 corresponding to memory bank 0 (Bank 0 ) is '1', and corresponds to memory bank 1 (Bank 1 ), memory bank 2 (Bank 2 ), and memory bank 3 (Bank 3 ), respectively. The input signals IN 1, IN 2, and IN 3 may be '0'. In addition, if the weight (W) stored in the
이때, '1'인 입력 신호 IN0가 제1 트랜지스터(321)(메모리 뱅크 0(Bank0)의 NMOS 트랜지스터)의 게이트 단자에 인가되면, 제1 트랜지스터(321)의 게이트 단자와 소스 단자 사이에 전위차가 발생하므로 채널이 형성되어 제1 트랜지스터(321)가 'ON' 될 수 있다. 제1 트랜지스터(321)가 'ON' 되면, 제1 트랜지스터(321)의 드레인 단자에 연결된 역전된 가중치() = '0'가 메모리 뱅크 0(Bank0)에 대응하는 비트 셀(310)의 출력 값(O0)으로 출력될 수 있다. 또한, '1'인 입력 신호 IN0가 메모리 뱅크 0(Bank0)의 PMOS 트랜지스터인 제2 트랜지스터(323)의 게이트 단자에 인가되면, 제2 트랜지스터(323)의 제2 게이트 단자와 소스 단자 사이에 전위차가 발생하지 않으므로 채널이 형성되지 않아 제2 트랜지스터(323)가 'OFF' 될 수 있다. At this time, when the input signal IN 0 of '1' is applied to the gate terminal of the first transistor 321 (NMOS transistor of memory bank 0 (Bank 0 )), between the gate terminal and the source terminal of the
이때, 대상이 아닌 메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3 각각에 대응하는 입력 신호 IN1, IN2, IN3, 가 '0' 이라면, 전술한 것과 마찬가지로 방식으로 메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3에 대응하는 비트셀들의 연산기들(320)의 출력 값(O1,)은 '1'이 될 수 있다. 따라서, NAND 게이트(430)의 출력은 출력 O0에 의존하게 된다. 각 메모리 뱅크들에 대응하는 비트셀들의 출력값들 중 메모리 뱅크 0에 대응하는 비트 셀(310)의 연산기들(320)의 출력 값(O0)이 '0'이므로, NAND 게이트(430)의 출력 값(O)은 '1'이 될 수 있다. At this time, if the input signals IN 1, IN 2 , and IN 3 corresponding to each of the
또는, 메모리 뱅크 0에 대응하는 입력 신호 IN0가 '0'이고, 메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3 각각에 대응하는 입력 신호 IN1, IN2, IN3, 가 '0'일 수 있다. 또한, 메모리 뱅크 0의 비트 셀(310)에 저장된 가중치(W)가 '0'이라면, 역전된 가중치()는 '1'일 수 있다. Alternatively, the input signal IN 0 corresponding to
제1 트랜지스터(321)(메모리 뱅크 0의 NMOS 트랜지스터)의 게이트 단자에 '0'인 입력 신호 IN0가 인가되면, 제1 트랜지스터(321)의 게이트 단자와 소스 단자 사이에 전위차가 발생하지 않으므로 제1 트랜지스터(321)의 단자에 채널이 형성되지 않아 제1 트랜지스터(321)가 'OFF' 될 수 있다. 또한, '0'인 입력 신호 IN0가 제2 트랜지스터(323)( 메모리 뱅크 0의 PMOS 트랜지스터)의 게이트 단자에 인가되면, 제2 트랜지스터(323)의 제2 게이트 단자와 소스 단자 사이에 발생한 전위차에 의해 채널이 형성되므로 제2 트랜지스터(323)가 'ON' 될 수 있다. 제2 트랜지스터(323)가 'ON' 되면, 메모리 뱅크 0에 해당하는 비트 셀(310)의 연산기(320)의 출력값(O0) 으로 제2 트랜지스터(323)의 소스 단자에 인가된 Vdd 전압에 해당하는 '1'이 출력될 수 있다. When the input signal IN 0 of '0' is applied to the gate terminal of the first transistor 321 (NMOS transistor of memory bank 0), a potential difference does not occur between the gate terminal and the source terminal of the
메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3 각각에 대응하는 입력 신호 IN1, IN2, IN3, 가 '0' 인 경우, 전술한 것과 마찬가지로 방식으로 메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3 각각에 대응하는 비트셀들의 출력 값들(O1)은 '1'이 될 수 있다. 각 메모리 뱅크들에 대응하는 비트셀들의 출력값들이 모두 '1'인 경우, NAND 게이트(430)의 출력 값(O)은 '0'이 될 수 있고, 그 결과, AND 로직 연산을 수행한 것과 같은 결과를 얻을 수 있다. When the input signals IN 1, IN 2, and IN 3 corresponding to each of
도 5a에서 입력 신호 I0에 연결된 메모리 뱅크 0에 대응하는 연산기(320)에 인가되는 입력 신호 IN0 와 비트 셀(310)에 저장된 가중치(W) 간의 곱 연산은 비트 셀(310)에 저장된 가중치(W)의 역전된 가중치(Inverted Weight)()와 입력 신호 IN0를 입력으로 하는 패스 트랜지스터 로직(Pass transistor logic) 구조를 통해 수행될 수 있다. 여기서, '패스 트랜지스터 로직'은 기본 입력을 사용하여 게이트 단자, 소스 단자, 및 드레인 단자를 구동함으로써 로직을 구현하기 위한 트랜지스터를 줄이는 데 이용될 수 있다. 보완적인 CMOS 로직에서는 기본 입력이 게이트 단자를 구동할 수 있다. 여기서, 기본 입력은 예를 들어, 입력, 반전 입력, VDD, 및 GND에 해당할 수 있다 In Figure 5a, the product operation between the input signal IN 0 applied to the
전술한 것과 같이 도 5a는 NMOS 패스 트랜지스터를 사용하는 인-메모리 컴퓨팅(IMC) 회로에 의해 AND 기능이 구현되는 일 예를 도시한다. NMOS 패스 트랜지스터에서 게이트 입력이 높으면 왼쪽 NMOS 트랜지스터, 다시 말해 제1 트랜지스터(321)가 켜지고, 소스 입력이 출력에 복사될 수 있다. 이와 달리, NMOS 패스 트랜지스터에서 게이트 입력이 낮으면, 오른쪽 NMOS 패스 트랜지스터, 다시 말해 제2 트랜지스터(323)가 켜지고, 출력에 '0'을 전달할 수 있다. As described above, Figure 5A shows an example of an AND function being implemented by an in-memory computing (IMC) circuit using NMOS pass transistors. When the gate input in the NMOS pass transistor is high, the left NMOS transistor, that is, the
도 5b에 도시된 진리표(530)는 전술한 동작의 검증을 위한 AND 게이트의 진리표에 해당할 수 있다. The truth table 530 shown in FIG. 5B may correspond to the truth table of the AND gate for verification of the above-described operation.
이때, MAC 연산을 위해 사용되는 메모리 뱅크에 대응하는 비트 셀들의 읽기 워드 라인(RWL)을 통해 입력 신호 '1'이 인가되어 해당 메모리 뱅크에 속한 비트 셀들의 연산 결과가 가산기(예: 도 4의 가산기(440))로 전달됨으로써 해당 메모리 뱅크가 선택된 것과 같이 처리될 수 있다. 이와 달리, MAC 연산을 위해 사용되지 않는 메모리 뱅크에 대응하는 비트 셀들의 읽기 워드 라인(RWL)에는 입력 신호 '0'이 인가되어 해당 메모리 뱅크에 속한 비트 셀들의 연산 결과가 전달되지 않음으로써 해당 메모리 뱅크가 선택되지 않은 것과 같이 처리될 수 있다. At this time, the input signal '1' is applied through the read word line (RWL) of the bit cells corresponding to the memory bank used for MAC operation, and the operation results of the bit cells belonging to the corresponding memory bank are transmitted to the adder (e.g., in FIG. 4). By being transmitted to the
일 실시예에서는 입력 신호 IN0를 읽기 위한 별도의 읽기 워드 라인(RWL) 제어 신호가 없어도 바로 2개의 트랜지스터들로 구성된 게이트 로직 회로(430)(예: NAND 게이트)를 이용하여 비트 와이즈 곱 연산을 수행하므로, 인터페이스의 제어 라인의 개수는 비트 셀(310) 당 4개(예: WBL(Write Bit Line), WWL(Write Word Line), WWBL(Write Bit line inverted), 및 RWL(Read Word Line))로 감소될 수 있다.In one embodiment, a bitwise product operation is performed using the gate logic circuit 430 (e.g., NAND gate) consisting of two transistors even without a separate read word line (RWL) control signal to read the input signal IN 0. Therefore, the number of control lines of the interface is 4 per bit cell 310 (e.g., Write Bit Line (WBL), Write Word Line (WWL), Write Bit line inverted (WWBL), and Read Word Line (RWL). ) can be reduced to
따라서, 인-메모리 컴퓨팅(IMC) 회로를 구성하는 총 트랜지스터들의 개수는 4 뱅크 x (SRAM 비트 셀(8T) + 연산기(2T)) + 게이트 로직 회로(8 T) = 4 X 10T + 8T = 48T이고, 총 제어 라인들의 개수는 4 뱅크 X 4 = 16 개가 될 수 있다. 도 5에서 입력 신호 IN0에 연결된 메모리 뱅크 0에 대응하는 비트 셀(310)의 곱 연산의 출력 값(O0)은 다른 비트 셀들의 곱 연산의 출력 값들(O1)과 함께 NAND 게이트(430)로 전달될 수 있다. NAND 게이트(430)는 진리표(530)에서와 같이 4개의 비트 셀들의 출력 값들(O0 및 O1)에 대해 NAND 로직 연산을 수행한 결과(O)를 가산기(230)의 입력으로 전달함으로써 MAC 연산을 수행할 수 있다. Therefore, the total number of transistors constituting the in-memory computing (IMC) circuit is 4 banks x (SRAM bit cell (8T) + operator (2T)) + gate logic circuit (8 T) = 4 , and the total number of control lines can be 4 banks x 4 = 16. In FIG. 5, the output value (O0) of the product operation of the
도 6a 및 도 6b는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로가 메모리 뱅크를 선택하는 방법을 설명하기 위한 도면이다. 도 6a를 참조하면, 일 실시예에 따라 인-메모리 컴퓨팅(IMC) 회로의 메모리 뱅크 0(Bank0)(610)가 대상 메모리 뱅크로 선택되고, 인-메모리 컴퓨팅(IMC) 회로의 메모리 뱅크 1(Bank1) (630)이 대상 메모리 뱅크로 선택되지 않은 경우가 도시된다. 도 6b는 도 6a의 인-메모리 컴퓨팅(IMC) 회로의 입력 값 및 출력 값을 갖는 진리표(650)를 도시한다. 도 6A에서, VDD는 전원 전압(power supply voltage)을 나타낼 수 있다. FIGS. 6A and 6B are diagrams to explain how an in-memory computing (IMC) circuit selects a memory bank according to an embodiment. Referring to FIG. 6A, according to one embodiment, memory bank 0 (Bank 0 ) 610 of the in-memory computing (IMC) circuit is selected as the target memory bank, and
도 6a에 도시된 바와 같이, 대상 메모리 뱅크로 선택된 메모리 뱅크 0(610)의 비트 셀에 저장된 가중치(W)가 '0'이고, 워드 라인을 통해 메모리 뱅크 0의 입력 신호(IN0)로 인가되는 값이 '1'인 경우, 메모리 뱅크 0에 대응하는 출력(O0) 값이 '1'이 될 수 있다. 메모리 뱅크 0에 대응하는 비트 셀의 출력(O0) 값(예: NAND 게이트로 입력되는 비트 셀의 (O0,O1) 중 어느 하나임)이 '1'인 경우, NAND 게이트의 출력 값(O)은 '0'이 되므로 가산기(230)에서의 MAC 연산에 영향을 주지 않는다. As shown in Figure 6a, the weight (W) stored in the bit cell of memory bank 0 (610) selected as the target memory bank is '0', and is applied as the input signal (IN 0 ) of
즉, 다른 메모리 뱅크들(예: 메모리 뱅크 1, 메모리 뱅크 2, 메모리 뱅크 3)의 해당 비트 셀 단위가 "0"의 입력을 가질 때, 각각의 비트 셀 연산자는 모두 NAND 게이트에 "1"을 출력한다. 따라서 NAND 게이트의 출력은 메모리 뱅크 0(610)의 비트 셀 유닛들의 출력에 의해서 결정될 수 있다. 다른 메모리 뱅크들(예: 메모리 뱅크 1, 메모리 뱅크 2, 메모리 뱅크 3)의 가중치는 NAND 게이트의 출력에 영향을 줄 수 없다. 다시 말해, 메모리 뱅크 0의 비트 셀 유닛만이 "1"의 입력을 가지기 때문에, 메모리 뱅크 0의 비트 셀 유닛은 4개의 비트 셀 유닛들 중에서 가중치 W가 NAND 게이트의 출력에 영향을 미칠 수 있는 유일한 비트 셀 유닛이 될 수 있다. That is, when the corresponding bit cell units of other memory banks (e.g.,
메모리 뱅크 0(610)에 대응하는 비트 셀에 저장된 가중치(W)가 '1'이고, 워드 라인을 통해 메모리 뱅크 0(610)의 입력 신호(IN0)로 인가되는 값이 '1'인 경우, 메모리 뱅크 0에 대응하는 출력(O0) 값이 '0'이 될 수 있다. 각 메모리 뱅크들에 대응하는 비트셀들의 출력값들(O0, O1) 중 어느 하나인 메모리 뱅크 0에 대응하는 비트 셀의 출력(O0) 값이 '0'인 경우, NAND 게이트의 출력 값(O)은 '1'이 되므로 가산기(230)에서의 MAC 연산에 영향을 줄 수 있다. 이와 같이, 입력 신호 '1'이 인가되는 메모리 뱅크에 대응하는 출력이 가산기(230)에서의 MAC 연산에 영향을 주므로, 일 실시예에서는 별도의 제어 신호가 없이도 RWL(Read Word Line)를 통한 입력 신호의 인가를 통해 대상 메모리 뱅크(예: 메모리 뱅크 0)가 MAC 연산을 위해 선택된 것처럼 작용하도록 할 수 있다. When the weight (W) stored in the bit cell corresponding to memory bank 0 (610) is '1' and the value applied to the input signal (IN 0 ) of memory bank 0 (610) through the word line is '1'. , the output (O 0 ) value corresponding to
또는 예를 들어, 도면(600)과 같이 메모리 뱅크 1에 대응하는 비트 셀에 저장된 가중치(W)가 '1'이고, 워드 라인을 통해 메모리 뱅크 1의 입력 신호(IN3)로 인가되는 값이 '0'인 경우, 메모리 뱅크 1에 대응하는 출력(O1) 값이 (예를 들어, 높은 레벨의 하이 값을 가지는) '1'이 되므로 가산기(230)에서의 MAC 연산은 NAND 게이트의 출력에 영향을 받지 않을 수 있다. Or, for example, as shown in the figure 600, the weight (W) stored in the bit cell corresponding to
요약하면, 각각의 메모리 뱅크의 비트 셀 그룹 중에서, 각각의 비트 셀은 그 자신의 각각의 연산기(예를 들어, 비트 곱셈기)를 갖는다. 동작 대상이 아닌 메모리 뱅크의 비트 셀 유닛에는 "비활성화" 또는 "제어" 입력 신호("0")가 공급될 수 있다. 이러한 신호는 실제 입력 데이터 신호가 아니라 메모리 뱅크의 타겟팅/선택 회로에 의해 제공될 수 있다. 실제 입력되는 데이터 신호는 현재 동작 대상인 메모리 뱅크의 비트 셀 유닛에 공급될 수 있다. 데이터 입력이 "0"이면 연산 결과/출력은 "0"이지만, 데이터 입력이 "1"이면 연산 결과는 대상 비트 셀에 저장된 값(예: 가중치 비트)에 따라 달라질 수 있다. 대상 비트 셀에 저장된 가중치 비트 값이 "1"이면 연산 결과는 "1"이 되고, 대상 비트 셀에 저장된 가중치 비트 값이 "0"이면 연산 결과는 "0"이 될 수 있다. In summary, among the bit cell groups of each memory bank, each bit cell has its own respective operator (eg, bit multiplier). A “deactivation” or “control” input signal (“0”) may be supplied to bit cell units of a memory bank that are not subject to operation. These signals may be provided by the memory bank's targeting/selection circuitry rather than actual input data signals. The actual input data signal may be supplied to the bit cell unit of the memory bank that is currently the target of operation. If the data input is "0", the operation result/output is "0", but if the data input is "1", the operation result may vary depending on the value (e.g. weight bit) stored in the target bit cell. If the weight bit value stored in the target bit cell is “1”, the operation result may be “1”, and if the weight bit value stored in the target bit cell is “0”, the operation result may be “0”.
도 7은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 연산기가 3개의 트랜지스터들로 구성된 경우의 동작을 설명하기 위한 도면이다. 도 7을 참조하면, 일 실시예에 따라 입력 신호들(I0, I1, I2, I3) 각각에 연결된 4개의 메모리 뱅크들 각각에 대응하는 비트 셀(310) 및 비트 셀들 각각에 대응하는 연산기(710)를 포함하는 SRAM 비트 셀 회로 및 게이트 로직 회로(430)(예: NAND 게이트)를 포함하는 인-메모리 컴퓨팅(IMC) 회로의 구조를 나타낸 도면(700)이 도시된다.FIG. 7 is a diagram illustrating the operation of an in-memory computing (IMC) circuit when the operator is composed of three transistors, according to an embodiment. Referring to FIG. 7, according to one embodiment, a
연산기(710)는 트랜스미션 게이트(transmission gate)(711) 및 제3 트랜지스터(713)를 포함하는 3개의 트랜지스터(3T) 회로로 구성될 수 있다. 제3 트랜지스터(713)는 예를 들어, PMOS 트랜지스터에 해당할 수 있으며, 반드시 이에 한정되지는 않는다. The
대상 메모리 뱅크(예: 메모리 뱅크 0)의 입력 신호에 해당하는 제2 값(예: 입력 신호 I0)은 메모리 뱅크 0에 대응하는 비트 셀의 읽기 워드 라인(RWL)을 통해 트랜스미션 게이트(711)의 엔이에블(enable; E) 단자와 제3 트랜지스터(713)의 게이트 단자('제3 게이트 단자')에 인가될 수 있다. A second value (e.g., input signal I 0 ) corresponding to the input signal of the target memory bank (e.g., memory bank 0) is transmitted to the
또한, 트랜스미션 게이트(711)의 입력(In) 단자에는 대상 메모리 뱅크인 메모리 뱅크 0에 속한 비트 셀(310)에 저장된 가중치(W)의 역전된 가중치(Inverted Weight)()가 인가될 수 있다. 비트 셀(310)의 역전된 입력(Inverted input)()은 트랜스미션 게이트(711)의 인에이블 바() 단자 및 제3 트랜지스터(713)의 소스 단자와 연결될 수 있다. In addition, the input (In) terminal of the
트랜스미션 게이트(711)의 출력값과 제3 트랜지스터(713)의 제3 게이트 단자를 거친 제3 트랜지스터(713)의 출력값 각각은 NAND 게이트(430)의 입력과 연결되어 비트 와이즈 곱 연산 결과에 해당하는 신호로 출력될 수 있다. The output value of the
예를 들어, 표(730)에 기재된 것과 같이, 메모리 뱅크 0의 비트 셀(310)에 저장된 가중치(W)가 '1'이고, 메모리 뱅크 0에 대응하는 입력 신호 I0가 '1'이며, 메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3 각각에 대응하는 입력 신호 I1, I2, I3, 가 '0'일 수 있다.For example, as shown in table 730, the weight (W) stored in the
이때, '1'인 입력 신호 I0가 트랜스미션 게이트(711)의 인에이블 단자에 인가되면, 트랜스미션 게이트(711)는 '단힌(Closed)' 스위치의 역할을 수행하므로, 트랜스미션 게이트(711)의 입력 단자에 연결된 역전된 가중치() 값인 '0'이 트랜스미션 게이트(711)의 출력(Out) 단자로 출력될 수 있다. 또한, 제3 트랜지스터(713)의 게이트 단자에 입력 신호 I0 = '1'이 인가됨에 따라 제3 트랜지스터(713)의 소스 단자에 연결된 역전된 입력() = '0'이 제3 트랜지스터(713)의 출력값으로 출력될 수 있다. At this time, when the input signal I 0 of '1' is applied to the enable terminal of the
트랜스미션 게이트(711)에서 출력된 출력 값('0')과 제3 트랜지스터(713)의 출력값('0')이 모두 '0'이므로 메모리 뱅크 0에 대응하는 비트 셀(310)의 출력 값(O0)으로 '0'이 출력될 수 있다. 각 메모리 뱅크들에 대응하는 비트셀들의 출력값들 중 메모리 뱅크 0에 대응하는 연산기(710)의 출력 값(O0)이 '0'이므로, NAND 게이트(430)의 출력 값(O)은 '1'이 될 수 있다. Since both the output value ('0') output from the
도 7에 도시된 인-메모리 컴퓨팅(IMC) 회로 구조에서 입력 신호가 '1'인 경우, 비트 셀에 저장된 데이터() 값이 스위치로 동작하는 트랜스미션 게이트(711)를 통해 전달되므로 도 5에 도시된 인-메모리 컴퓨팅(IMC) 회로 구조에 비해 저전압으로 동작이 가능할 수 있다. In the in-memory computing (IMC) circuit structure shown in FIG. 7, when the input signal is '1', the data stored in the bit cell ( ) Since the value is transmitted through the
또한, 도 7에 도시된 인-메모리 컴퓨팅(IMC) 회로의 단위(unit) 비트 셀을 구성하는 총 트랜지스터들의 개수는 4 뱅크 x (SRAM 비트 셀(8T) + 연산기(3T)) + 게이트 로직 회로(430)(8T NAND 게이트) = 4 X 11T + 8T = 52T이고, 총 제어 라인들의 개수는 4 뱅크 X 5개(예: WBL, WWL, WWLB, RWL, RWLB(Read Word Line inverted)) = 20 개가 될 수 있다. Additionally, the total number of transistors constituting a unit bit cell of the in-memory computing (IMC) circuit shown in FIG. 7 is 4 bank x (SRAM bit cell (8T) + operator (3T)) + gate logic circuit. (430)(8T NAND gate) = 4 It could be a dog.
도 8은 다른 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 연산기가 3개의 트랜지스터들로 구성된 경우의 동작을 설명하기 위한 도면이다. 도 8을 참조하면, 일 실시예에 따라 입력 신호들(I0, I1, I2, I3) 각각에 연결된 4개의 메모리 뱅크들 각각에 대응하는 비트 셀(310) 및 비트 셀(310)들 각각에 대응하는 연산기(810)를 포함하는 SRAM 비트 셀 회로 및 게이트 로직 회로(430)를 포함하는 인-메모리 컴퓨팅(IMC) 회로의 구조를 나타낸 도면(800)이 도시된다. FIG. 8 is a diagram for explaining the operation of an in-memory computing (IMC) circuit when the operator is composed of three transistors according to another embodiment. Referring to FIG. 8, according to one embodiment, a
연산기(810)는 NMOS 트랜지스터와 PMOS 트랜지스터가 병렬로 연결된 트랜스미션 게이트(811) 및 제4 트랜지스터(813)를 포함하는 3개의 트랜지스터(3T) 회로로 구성될 수 있다. 트랜스미션 게이트(811)는 각 트랜지스터의 게이트에 인가되는 입력 I에 의해 스위치 온 또는 오프될 수 있다. 제4 트랜지스터(813)는 예를 들어, PMOS 트랜지스터에 해당할 수 있으며, 반드시 이에 한정되지는 않는다. The
대상 메모리 뱅크(예: 메모리 뱅크 0)의 입력 신호에 해당하는 제2 값(예: 입력 신호 I0)은 메모리 뱅크 0에 대응하는 비트 셀의 읽기 워드 라인(RWL)을 통해 트랜스미션 게이트(811)의 엔이에블(E) 단자와 제4 트랜지스터(813)의 게이트 단자('제4 게이트 단자')에 인가될 수 있다. A second value (e.g., input signal I 0 ) corresponding to the input signal of the target memory bank (e.g., memory bank 0) is transmitted to the
또한, 트랜스미션 게이트(811)의 입력(In) 단자에는 대상 메모리 뱅크인 메모리 뱅크 0에 속한 비트 셀(310)에 저장된 가중치(W)의 역전된 가중치(Inverted Weight)()가 인가될 수 있다. 비트 셀(310)의 역전된 입력(Inverted input)()은 트랜스미션 게이트(811)의 인에이블 바() 단자에 연결될 수 있다. In addition, the input (In) terminal of the
제4 트랜지스터(813)의 소스 단자는 Vdd와 연결되고, 제4 트랜지스터(813)의 드레인 단자는 비트 셀(310)에 저장된 가중치(W)의 역전된 가중치()와 연결될 수 있다. The source terminal of the
트랜스미션 게이트(811)의 출력값과 제4 트랜지스터(813)의 제4 게이트 단자를 거친 제4 트랜지스터(813)의 출력값 각각은 NAND 게이트(430)의 입력과 연결되어 비트 와이즈 곱 연산 결과에 해당하는 신호로 출력될 수 있다. The output value of the
예를 들어, 표(830)에 기재된 것과 같이, 메모리 뱅크 0의 비트 셀(310)에 저장된 가중치(W)가 '1'이고, 메모리 뱅크 0에 대응하는 입력 신호 I0가 '1'이며, 메모리 뱅크 1, 메모리 뱅크 2, 및 메모리 뱅크 3 각각에 대응하는 입력 신호 I1, I2, I3, 가 '0'일 수 있다.For example, as shown in table 830, the weight (W) stored in the
이때, '1'인 입력 신호 I0가 트랜스미션 게이트(811)의 인에이블(E) 단자에 인가되면, 트랜스미션 게이트(811)는 '단힌(Closed)' 스위치의 역할을 수행하므로, 트랜스미션 게이트(811)의 입력 단자에 연결된 역전된 가중치() 값인 '0'이 트랜스미션 게이트(811)의 출력(Out) 단자로 출력될 수 있다. 또한, 제4 트랜지스터(813)의 게이트 단자에 입력 신호 I0 = '1'이 인가되면, 제4 트랜지스터(813)의 게이트 단자('제4 게이트 단자')와 소스 단자 사이에 전위차가 발생하지 않으므로 채널이 형성되지 않아 제4 트랜지스터(813)가 'OFF' 될 수 있다. 이에 따라 제4 트랜지스터(813)의 출력 값은 '0'이 될 수 있다. At this time, when the input signal I 0 of '1' is applied to the enable (E) terminal of the
트랜스미션 게이트(811)에서 출력된 출력 값('0')과 제4 트랜지스터(813)의 출력값('0')이 모두 '0'이므로 메모리 뱅크 0에 대응하는 비트 셀(310)의 연산기(810)의 출력 값(O0)으로 '0'이 출력될 수 있다. 각 메모리 뱅크들에 대응하는 비트셀들의 출력값들 중 메모리 뱅크 0에 대응하는 비트 셀(310)의 연산기(810)의 출력 값(O0)이 '0'이므로, NAND 게이트(430)의 출력 값(O)은 '1'이 될 수 있다. Since the output value ('0') output from the
도 9는 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로를 포함하는 뉴럴 네트워크 장치의 블록도이다. 도 9를 참조하면, 일 실시예에 따른 뉴럴 네트워크 장치(900)는 어레이 회로(910) 및 컨트롤러(930)를 포함한다. Figure 9 is a block diagram of a neural network device including an in-memory computing (IMC) circuit according to one embodiment. Referring to FIG. 9, the
어레이 회로(910)는 인-메모리 컴퓨팅(IMC) 회로들(915)을 포함한다. 인-메모리 컴퓨팅(IMC) 회로들(915) 각각은 복수의 메모리 뱅크들 중 해당 메모리 뱅크에 대응하는 비트 셀들 각각에 저장된 제1 값과. 제2 값 간의 연산 결과에 해당하는 신호를 출력하는 연산기들이 비트 셀들 각각에 대응하여 구비된다. 인-메모리 컴퓨팅(IMC) 회로들(915) 각각은 연산기들을 포함하는 SRAM 비트셀 회로, 및 게이트 로직 회로를 포함할 수 있다. 인-메모리 컴퓨팅(IMC) 회로들(915) 각각은 도 2 내지 도 8을 통해 전술한 인-메모리 컴퓨팅(IMC) 회로에 해당할 수 있다.
SRAM 비트셀 회로는 복수의 메모리 뱅크들에 대응하는 비트 셀들을 포함하고, 비트 셀들은 메모리 뱅크 별로 SRAM의 워드 라인과 연결될 수 있다.The SRAM bit cell circuit includes bit cells corresponding to a plurality of memory banks, and the bit cells may be connected to a word line of the SRAM for each memory bank.
연산기들은 비트 셀들 각각에 대응하는 연산 결과에 해당하는 신호를 출력할 수 있다. 연산기들은 복수의 메모리 뱅크들 중 해당 메모리 뱅크에 대응하는 비트 셀들 각각에 저장된 제1 값과 워드 라인을 통해 해당 메모리 뱅크의 입력 신호로 인가되는 제2 값 간의 비트 와이즈(bit-wise) 곱 연산 결과에 해당하는 신호를 출력하는 복수의 트랜지스터들을 포함할 수 있다. 연산기들 각각은 2개의 트랜지스터(2T) 회로로 구성될 수도 있고, 또는 3개의 트랜지스터(3T) 회로로 구성될 수도 있다. Operators may output signals corresponding to operation results corresponding to each bit cell. The operators calculate the result of a bit-wise multiplication between the first value stored in each of the bit cells corresponding to the corresponding memory bank among the plurality of memory banks and the second value applied as the input signal of the corresponding memory bank through the word line. It may include a plurality of transistors that output signals corresponding to . Each of the operators may be composed of two transistor (2T) circuits, or three transistor (3T) circuits.
예를 들어, 연산기들 각각은 제1 트랜지스터 및 제2 트랜지스터를 포함하는 2개의 트랜지스터(2T) 회로로 구성될 수 있다. 이 경우, 해당 메모리 뱅크의 입력 신호에 해당하는 제2 값은 제1 트랜지스터의 제1 게이트 단자 및 상기 제2 트랜지스터의 제2 게이트 단자에 인가될 수 있다. 또한, 제1 게이트 단자를 거친 제1 트랜지스터의 출력값은 제2 게이트 단자를 거친 제2 트랜지스터의 출력값과 연결됨으로써 비트 와이즈 곱 연산 결과에 해당하는 신호로 출력될 수 있다. For example, each of the calculators may be composed of a two transistor (2T) circuit including a first transistor and a second transistor. In this case, the second value corresponding to the input signal of the corresponding memory bank may be applied to the first gate terminal of the first transistor and the second gate terminal of the second transistor. Additionally, the output value of the first transistor that passes through the first gate terminal can be connected to the output value of the second transistor that passes through the second gate terminal, thereby outputting a signal corresponding to the result of the bitwise product operation.
또는, 연산기들 각각은 트랜스미션 게이트(transmission gate) 및 제3 트랜지스터를 포함하는 3개의 트랜지스터(3T) 회로로 구성될 수 있다. 이 경우, 해당 메모리 뱅크의 입력 신호에 해당하는 제2 값은 트랜스미션 게이트의 엔이에블(enable) 단자 및 제3 트랜지스터의 제3 게이트 단자에 인가될 수 있다. 트랜스미션 게이트의 출력값은 제3 게이트 단자를 거친 제3 트랜지스터의 출력값과 연결되어 비트 와이즈 곱 연산 결과에 해당하는 신호로 출력될 수 있다. Alternatively, each of the operators may be composed of a three transistor (3T) circuit including a transmission gate and a third transistor. In this case, the second value corresponding to the input signal of the corresponding memory bank may be applied to the enable terminal of the transmission gate and the third gate terminal of the third transistor. The output value of the transmission gate may be connected to the output value of the third transistor through the third gate terminal and output as a signal corresponding to the result of the bitwise multiplication operation.
게이트 로직 회로(또는 로직 게이트들)는 MAC 연산을 위해 대상 메모리 뱅크에 속하는 비트 셀들 각각에 대응하는 연산 결과를 가산기로 전달할 수 있다. 인 메모리 컴퓨팅(IMC) 회로들(915) 각각은 도 3 내지 도 8을 통해 전술한 인 메모리 컴퓨팅(IMC) 회로에 해당할 수 있다. The gate logic circuit (or logic gates) may transfer the operation result corresponding to each bit cell belonging to the target memory bank to an adder for MAC operation. Each of the in-memory computing (IMC) circuits 915 may correspond to the in-memory computing (IMC) circuit described above with reference to FIGS. 3 to 8 .
컨트롤러(930)는 클럭 신호에 따라, 뉴럴 네트워크 장치(900)의 입력 신호에 해당하는 제2 값들을 인-메모리 컴퓨팅(IMC) 회로들(915) 각각에 입력하고, 인-메모리 컴퓨팅(IMC) 회로들(915) 각각을 제어할 수 있다. The
컨트롤러(930)는 예를 들어, 제2 값들을 포함하는 입력 피처맵(input feature map)을 저장하는 IFM(input feature map) 버퍼(buffer)(931), 인-메모리 컴퓨팅(IMC) 회로들(915) 각각에 대한 제2 값들의 인가 여부를 제어하는 제어 회로(933), 및 제1 값들을 읽거나 쓰는 RW(read write) 회로(935) 중 적어도 하나를 포함할 수 있다. The
제어 회로(933)는 연산기들에 포함된 복수의 트랜지스터들에 대한 제2 값의 인가 여부를 제어함으로써 게이트 로직 회로가 해당 메모리 뱅크에 속한 비트 셀들 각각에 대응하는 연산 결과를 가산기로 전달하도록 할 수 있다. The
IMC 장치는 가중치, 입력 데이터/맵 등과 같은 신경망 데이터를 참조하여 위에서 설명되었지만, IMC 장치는 임의의 특정 유형의 데이터에 제한되지 않는다. 다시 말해, 처리하는 데 사용되는 데이터 유형에 관계없이 회로와 장치는 새롭고 유익할 수 있다. 신경망 데이터 처리는 많은 잠재적 응용 프로그램 중 하나일 뿐입니다.Although the IMC device is described above with reference to neural network data such as weights, input data/maps, etc., the IMC device is not limited to any particular type of data. In other words, circuits and devices can be novel and beneficial, regardless of the type of data they are used to process. Neural network data processing is just one of many potential applications.
도 10은 일 실시예에 따른 뉴럴 네트워크 장치를 포함하는 전자 시스템의 블록도이다. 도 10을 참조하면, 일 실시예에 따른 전자 시스템(1000)은 뉴럴 네트워크(예: 도 1의 뉴럴 네트워크(110))를 기초로 입력 데이터를 실시간으로 분석하여 유효한 정보를 추출하고, 추출된 정보를 기초로 상황 판단을 하거나, 전자 시스템(1000)이 탑재되는 전자 디바이스의 구성들을 제어할 수 있다. 예컨대 전자 시스템(1000)은 드론(drone), 첨단 운전자 보조 시스템(Advanced Drivers Assistance System; ADAS) 등과 같은 로봇 장치, 스마트 TV, 스마트폰, 의료 디바이스, 모바일 디바이스, 영상 표시 디바이스, 계측 디바이스, IoT 디바이스 등에 적용될 수 있으며, 이 외에도 다양한 종류의 전자 디바이스들 중 적어도 하나에 탑재될 수 있다. Figure 10 is a block diagram of an electronic system including a neural network device according to one embodiment. Referring to FIG. 10, the
전자 시스템(1000)는 프로세서(1010), RAM(Random Access Memory)(1020), 뉴럴 네트워크 장치(1030), 메모리(1040), 센서 모듈(1050) 및 송수신 모듈(1060)을 포함할 수 있다. 전자 시스템(1000)은 입출력 모듈, 보안 모듈, 전력 제어 장치 등을 더 포함할 수 있다. 전자 시스템(1000)의 하드웨어 구성들 중 일부는 적어도 하나의 반도체 칩에 탑재될 수 있다. The
프로세서(1010)는 전자 시스템(1000)의 전반적인 동작을 제어한다. 프로세서(1010)는 하나의 프로세서 코어(Single Core)를 포함하거나, 복수의 프로세서 코어들(Multi-Core)을 포함할 수 있다. 프로세서(1010)는 메모리(1040)에 저장된 프로그램들 및/또는 데이터를 처리 또는 실행할 수 있다. 일부 실시예에 있어서, 프로세서(1010)는 메모리(1040)에 저장된 프로그램들을 실행함으로써, 뉴럴 네트워크 장치(1030)의 기능을 제어할 수 있다. 프로세서(1010)는 CPU(Central Processing Unit), GPU(Graphics Processing Unit), AP(Application Processor) 등으로 구현될 수 있다.The
RAM(1020)은 프로그램들, 데이터, 또는 명령들(instructions)을 일시적으로 저장할 수 있다. 예컨대 메모리(1040)에 저장된 프로그램들 및/또는 데이터는 프로세서(1010)의 제어 또는 부팅 코드에 따라 RAM(1020)에 일시적으로 저장될 수 있다. RAM(1020)은 예를 들어, DRAM(Dynamic RAM) 또는 SRAM(Static RAM) 등의 메모리로 구현될 수 있다.
뉴럴 네트워크 장치(1030)는 수신되는 입력 데이터를 기초로 뉴럴 네트워크의 연산을 수행하고, 수행 결과를 기초로 다양한 정보 신호를 생성할 수 있다. 뉴럴 네트워크는 예를 들어, CNN(Convolution Neural Network), RNN(Recurrent Neural Network), FNN(Fuzzy Neural Networks), Deep Belief Networks, Restricted Boltzman Machines 등을 포함할 수 있으나 반드시 이에 한정되지는 않는다. 뉴럴 네트워크 장치(1030)는 예를 들어, 뉴럴 네트워크 전용의 하드웨어 가속기 자체 및/또는 이를 포함하는 장치일 수도 있고, 또는 도 9를 통해 전술한 뉴럴 네트워크 장치(900)에 해당할 수 있다. The
뉴럴 네트워크 장치(1030)는 인-메모리 컴퓨팅(IMC) 회로의 SRAM 비트셀 회로들이 동일한 입력 데이터를 공유 및/또는 처리하도록 제어하고, SRAM 비트셀 회로들로부터 출력되는 연산 결과들 중 적어도 일부를 선별할 수 있다. The
여기서, '정보 신호'는 예를 들어, 음성 인식 신호, 사물 인식 신호, 영상 인식 신호, 생체 정보 인식 신호 등과 같은 다양한 종류의 인식 신호 중 하나를 포함할 수 있다. 예를 들어, 뉴럴 네트워크 장치(1030)는 비디오 스트림에 포함되는 프레임 데이터를 입력 데이터로서 수신하고, 프레임 데이터로부터 프레임 데이터가 나타내는 이미지에 포함된 사물에 대한 인식 신호를 생성할 수 있다. 뉴럴 네트워크 장치(1030)는 전자 시스템(1000)이 탑재된 전자 시스템의 종류 또는 기능에 따라 다양한 종류의 입력 데이터를 수신할 수 있고, 입력 데이터에 따른 인식 신호를 생성할 수 있다.Here, the 'information signal' may include one of various types of recognition signals, such as, for example, a voice recognition signal, an object recognition signal, an image recognition signal, a biometric information recognition signal, etc. For example, the
메모리(1040)는 데이터를 저장하기 위한 저장 장소로서, OS(Operating System), 각종 프로그램들, 및 각종 데이터를 저장할 수 있다. 실시예에 있어서, 메모리(1040)는 뉴럴 네트워크 장치(1030)의 연산 수행 과정에서 생성되는 중간 결과들을 저장할 수 있다. The
메모리(1040)는 휘발성 메모리 또는 비휘발성 메모리 중 적어도 하나를 포함할 수 있다. 비휘발성 메모리는 예를 들어, ROM(Read Only Memory), PROM(Programmable Read Only Memory), EPROM(Erasable Programmable Read Only Memory), EEPROM(Electrically Erasable Programmable Read Only Memory), 플래시 메모리(flash memory) 등을 포함할 수 있으며, 반드시 이에 한정되지는 않는다. 휘발성 메모리는 예를 들어, DRAM(Dynamic RAM), SRAM(Static RAM), SDRAM, PRAM(Phase Change Memory RAM), MRAM(Magnetoresistive RAM), RRAM(Resistive RAM), 및/또는 FRAM(Ferroelectric RAM) 등을 포함할 수 있으며, 반드시 이에 한정되지는 않는다. 실시예에 따라서, 메모리(1040)는 HDD(Hard Disk Drive), SSD(Solid State Driver), CF(Compact Flash) 카드, SD(Secure Digital) 카드, Micro-SD, Mini-SD, Xd 픽처 카드(extreme Digital Picture Card) 또는 메모리 스틱(Memory Stick) 중 적어도 하나를 포함할 수 있다. The
센서 모듈(1050)은 전자 시스템(1000)이 탑재되는 전자 기기 주변의 정보를 수집할 수 있다. 센서 모듈(1050)은 전자 시스템(1000)의 외부로부터 신호(예컨대 영상 신호, 음성 신호, 자기 신호, 생체 신호, 터치 신호 등)를 센싱 또는 수신하고, 센싱 또는 수신된 신호를 데이터로 변환할 수 있다. 센서 모듈(1050)은 센싱 장치, 예컨대 마이크, 촬상 장치, 이미지 센서, 라이더(LIDAR; light detection and ranging) 센서, 초음파 센서, 적외선 센서, 바이오 센서, 및 터치 센서 등 다양한 종류의 센싱 장치 중 적어도 하나를 포함할 수 있다. The
센서 모듈(1050)은 변환된 데이터를 뉴럴 네트워크 장치(1030)에 입력 데이터로서 제공할 수 있다. 예를 들어, 센서 모듈(1050)은 이미지 센서를 포함할 수 있으며, 전자 시스템(1000)의 외부 환경을 촬영하여 비디오 스트림을 생성하고, 비디오 스트림의 연속하는 데이터 프레임을 뉴럴 네트워크 장치(1030)에 입력 데이터로서 순서대로 제공할 수 있다. 그러나 이에 제한되는 것은 아니며 센서 모듈(1050)은 다양한 종류의 데이터를 뉴럴 네트워크 장치(1030)에 제공할 수 있다. The
송수신 모듈(1060)은 외부 디바이스와 통신할 수 있는 다양한 유선 또는 무선 인터페이스를 구비할 수 있다. 예컨대 송수신 모듈(1060)은 유선 근거리통신망(Local Area Network; LAN), Wi-fi(Wireless Fidelity)와 같은 무선 근거리 통신망 (Wireless Local Area Network; WLAN), 블루투스(Bluetooth)와 같은 무선 개인 통신망(Wireless Personal Area Network; WPAN), 무선 USB (Wireless Universal Serial Bus), Zigbee, NFC (Near Field Communication), RFID (Radio-frequency identification), PLC(Power Line communication), 또는 3G (3rd Generation), 4G(4th Generation), LTE (Long Term Evolution) 등 이동 통신망(mobile cellular network)에 접속 가능한 통신 인터페이스 등을 포함할 수 있다.The transmitting/
도 11은 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로의 동작 방법을 나타낸 흐름도이다. 이하 실시예에서 각 동작들은 순차적으로 수행될 수도 있으나, 반드시 순차적으로 수행되는 것은 아니다. 예를 들어, 각 동작들의 순서가 변경될 수도 있으며, 적어도 두 동작들이 병렬적으로 수행될 수도 있다.Figure 11 is a flowchart showing a method of operating an in-memory computing (IMC) circuit according to an embodiment. In the following embodiments, each operation may be performed sequentially, but is not necessarily performed sequentially. For example, the order of each operation may be changed, and at least two operations may be performed in parallel.
도 11을 참조하면, 일 실시예에 따른 인-메모리 컴퓨팅(IMC) 회로는 단계(1110) 내지 단계(1140)을 통해 비트 셀들 각각에 대응하는 연산 결과를 가산기로 전달하여 MAC 연산을 수행할 수 있다. 인-메모리 컴퓨팅(IMC) 회로는 SRAM 비트셀 회로 및 게이트 로직 회로를 포함할 수 있다. SRAM 비트셀 회로는 예를 들어, 복수의 메모리 뱅크들에 대응하는 비트 셀들과 비트 셀들 각각에 대응하는 연산 결과에 해당하는 신호를 출력하는 연산기들을 포함할 수 있다. 이때, 비트 셀들은 메모리 뱅크 별로 SRAM의 워드 라인과 연결될 수 있다. 인-메모리 컴퓨팅(IMC) 회로는 예를 들어, 도 2 내지 도 9를 통해 전술한 인-메모리 컴퓨팅(IMC) 회로에 해당할 수 있으며, 반드시 이에 한정되지는 않는다. Referring to FIG. 11, an in-memory computing (IMC) circuit according to an embodiment may perform a MAC operation by transferring the operation result corresponding to each bit cell to an adder through steps 1110 to 1140. there is. In-memory computing (IMC) circuitry may include SRAM bitcell circuitry and gate logic circuitry. For example, the SRAM bit cell circuit may include bit cells corresponding to a plurality of memory banks and operators that output signals corresponding to operation results corresponding to each of the bit cells. At this time, the bit cells may be connected to the word line of the SRAM for each memory bank. For example, the in-memory computing (IMC) circuit may correspond to the in-memory computing (IMC) circuit described above with reference to FIGS. 2 to 9, but is not necessarily limited thereto.
단계(1110)에서, 인-메모리 컴퓨팅(IMC) 회로는 SRAM 비트셀 회로의 복수의 메모리 뱅크들에 대응하는 비트 셀들 각각에 제1 값을 저장한다. 인-메모리 컴퓨팅(IMC) 회로는 RW(read write) 회로를 이용하여 비트 셀들 각각에 제1 값을 저장할 수 있다. At step 1110, the in-memory computing (IMC) circuit stores a first value in each of the bit cells corresponding to the plurality of memory banks of the SRAM bitcell circuit. An in-memory computing (IMC) circuit can store a first value in each bit cell using a read write (RW) circuit.
단계(1120)에서, 인-메모리 컴퓨팅(IMC) 회로는 SRAM(static random access memory)의 워드 라인을 통해 복수의 메모리 뱅크들 중 MAC 연산을 위한 대상 메모리 뱅크의 입력 신호로 제2 값을 인가한다. 이때, 제2 값은 인-메모리 컴퓨팅(IMC) 회로가 예를 들어, 입력 드라이버(input driver)를 통해 IFM(input feature map) 버퍼(buffer)에 저장된 입력 피처맵(input feature map)으로부터 읽어온 것일 수 있으며, 반드시 이에 한정되지는 않는다. In step 1120, the in-memory computing (IMC) circuit applies a second value as an input signal to a target memory bank for MAC operation among a plurality of memory banks through the word line of static random access memory (SRAM). . At this time, the second value is read by the in-memory computing (IMC) circuit from, for example, an input feature map stored in an input feature map (IFM) buffer through an input driver. It may be, but is not necessarily limited to this.
단계(1130)에서, 인-메모리 컴퓨팅(IMC) 회로는 연산기들에 의해 비트 셀들 각각에 대응하며, 제1 값과 제2 값 간의 곱 연산 결과에 해당하는 신호를 출력한다. 연산기들은 곱 연산 결과에 해당하는 신호를 출력하는 복수의 트랜지스터들을 포함할 수 있다. 인-메모리 컴퓨팅(IMC) 회로는 복수의 메모리 뱅크들 중 해당 메모리 뱅크에 대응하는 비트 셀들 각각에 저장된 제1 값과 워드 라인을 통해 해당 메모리 뱅크의 입력 신호로 인가되는 제2 값 간의 비트 와이즈(bit-wise) 곱 연산 결과에 해당하는 신호를 연산기들을 통해 출력할 수 있다. In step 1130, the in-memory computing (IMC) circuit corresponds to each of the bit cells by operators and outputs a signal corresponding to the result of a multiplication operation between the first value and the second value. The operators may include a plurality of transistors that output signals corresponding to the results of the multiplication operation. The in-memory computing (IMC) circuit uses a bit wise ( A signal corresponding to the bit-wise) product operation result can be output through operators.
단계(1140)에서, 인-메모리 컴퓨팅(IMC) 회로는 가산기가 연산 결과에 대한 합 연산을 수행하도록, 게이트 로직 회로를 통해 대상 메모리 뱅크에 속한 비트 셀들 각각에 대응하는 연산 결과를 가산기로 전달한다. 가산기는 예를 들어, 도 도 2의 가산기(230), 도 3의 가산기(230) 및/또는 도 4의 가산기(230)에 해당할 수 있다. 이후, 가산기는 단계(1140)를 통해 전달받은 연산 결과에 대한 합 연산을 수행하고, 합 연산 결과를 누적 연산기에 저장할 수 있다. 누적 연산기는 예를 들어, 도 2a 내지 도 2d, 또는 도 3의 누적 연산기(240)에 해당할 수 있다. In step 1140, the in-memory computing (IMC) circuit transfers the operation result corresponding to each of the bit cells belonging to the target memory bank to the adder through the gate logic circuit so that the adder performs a sum operation on the operation result. . The adder may correspond to, for example, the
도 1 내지 도 11에 기술된 신경망, 신경망 장치, 전자 시스템, IMC 매크로, IMC 회로, IMC 장치, 메모리, 저장 장치, 및 구성 요소들을 하으뒈어 구성 요소들에 의해 구성되거나, 또는 하드웨어 구성 요소를 나타낼 수 있다. 예를 들어, 실시예들에서 설명된 장치, 방법 및 구성요소는, 예를 들어, 프로세서, 콘트롤러, ALU(arithmetic logic unit), 디지털 신호 프로세서(digital signal processor), 마이크로컴퓨터, FPGA(field programmable gate array), PLU(programmable logic unit), 마이크로프로세서, 또는 명령(instruction)을 실행하고 응답할 수 있는 다른 어떠한 장치와 같이, 범용 컴퓨터 또는 특수 목적 컴퓨터를 이용하여 구현될 수 있다. 처리 장치는 운영 체제(OS) 및 상기 운영 체제 상에서 수행되는 소프트웨어 애플리케이션을 수행할 수 있다. 또한, 처리 장치는 소프트웨어의 실행에 응답하여, 데이터를 접근, 저장, 조작, 처리 및 생성할 수도 있다. 이해의 편의를 위하여, 처리 장치는 하나가 사용되는 것으로 설명된 경우도 있지만, 해당 기술분야에서 통상의 지식을 가진 자는, 처리 장치가 복수 개의 처리 요소(processing element) 및/또는 복수 유형의 처리 요소를 포함할 수 있음을 알 수 있다. 예를 들어, 처리 장치는 복수 개의 프로세서 또는 하나의 프로세서 및 하나의 컨트롤러를 포함할 수 있다. 또한, 병렬 프로세서(parallel processor)와 같은, 다른 처리 구성(processing configuration)도 가능하다.The neural network, neural network device, electronic system, IMC macro, IMC circuit, IMC device, memory, storage device, and components described in FIGS. 1 to 11 are collectively composed of components or represent hardware components. You can. For example, the devices, methods, and components described in the embodiments may include, for example, a processor, a controller, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, and a field programmable gate (FPGA). It may be implemented using a general-purpose computer or a special-purpose computer, such as an array, programmable logic unit (PLU), microprocessor, or any other device capable of executing and responding to instructions. The processing device may execute an operating system (OS) and software applications running on the operating system. Additionally, a processing device may access, store, manipulate, process, and generate data in response to the execution of software. For ease of understanding, a single processing device may be described as being used; however, those skilled in the art will understand that a processing device includes multiple processing elements and/or multiple types of processing elements. It can be seen that it may include. For example, a processing device may include multiple processors or one processor and one controller. Additionally, other processing configurations, such as parallel processors, are possible.
소프트웨어는 컴퓨터 프로그램(computer program), 코드(code), 명령(instruction), 또는 이들 중 하나 이상의 조합을 포함할 수 있으며, 원하는 대로 동작하도록 처리 장치를 구성하거나 독립적으로 또는 결합적으로(collectively) 처리 장치를 명령할 수 있다. 소프트웨어 및/또는 데이터는, 처리 장치에 의하여 해석되거나 처리 장치에 명령 또는 데이터를 제공하기 위하여, 어떤 유형의 기계, 구성요소(component), 물리적 장치, 가상 장치(virtual equipment), 컴퓨터 저장 매체 또는 장치, 또는 전송되는 신호 파(signal wave)에 영구적으로, 또는 일시적으로 구체화(embody)될 수 있다. 소프트웨어는 네트워크로 연결된 컴퓨터 시스템 상에 분산되어서, 분산된 방법으로 저장되거나 실행될 수도 있다. 소프트웨어 및 데이터는 컴퓨터 판독 가능 기록 매체에 저장될 수 있다.Software may include a computer program, code, instructions, or a combination of one or more of these, which may configure a processing unit to operate as desired, or may be processed independently or collectively. You can command the device. Software and/or data may be used on any type of machine, component, physical device, virtual equipment, computer storage medium or device to be interpreted by or to provide instructions or data to a processing device. , or may be permanently or temporarily embodied in a transmitted signal wave. Software may be distributed over networked computer systems and stored or executed in a distributed manner. Software and data may be stored on a computer-readable recording medium.
실시예에 따른 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터 판독 가능 매체에 기록될 수 있다. 컴퓨터 판독 가능 매체는 프로그램 명령, 데이터 파일, 데이터 구조 등을 단독으로 또는 조합하여 포함할 수 있으며 매체에 기록되는 프로그램 명령은 실시예를 위하여 특별히 설계되고 구성된 것들이거나 컴퓨터 소프트웨어 당업자에게 공지되어 사용 가능한 것일 수도 있다. 컴퓨터 판독 가능 기록 매체의 예에는 하드 디스크, 플로피 디스크 및 자기 테이프와 같은 자기 매체(magnetic media), CD-ROM, DVD와 같은 광기록 매체(optical media), 플롭티컬 디스크(floptical disk)와 같은 자기-광 매체(magneto-optical media), 및 롬(ROM), 램(RAM), 플래시 메모리 등과 같은 프로그램 명령을 저장하고 수행하도록 특별히 구성된 하드웨어 장치가 포함된다. 프로그램 명령의 예에는 컴파일러에 의해 만들어지는 것과 같은 기계어 코드뿐만 아니라 인터프리터 등을 사용해서 컴퓨터에 의해서 실행될 수 있는 고급 언어 코드를 포함한다. The method according to the embodiment may be implemented in the form of program instructions that can be executed through various computer means and recorded on a computer-readable medium. A computer-readable medium may include program instructions, data files, data structures, etc., singly or in combination, and the program instructions recorded on the medium may be specially designed and constructed for the embodiment or may be known and available to those skilled in the art of computer software. It may be possible. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tapes, optical media such as CD-ROMs and DVDs, and magnetic media such as floptical disks. -Includes optical media (magneto-optical media) and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, etc. Examples of program instructions include machine language code, such as that produced by a compiler, as well as high-level language code that can be executed by a computer using an interpreter, etc.
위에서 설명한 하드웨어 장치는 실시예의 동작을 수행하기 위해 하나 또는 복수의 소프트웨어 모듈로서 작동하도록 구성될 수 있으며, 그 역도 마찬가지이다.The hardware devices described above may be configured to operate as one or multiple software modules to perform the operations of the embodiments, and vice versa.
이상과 같이 실시예들이 비록 한정된 도면에 의해 설명되었으나, 해당 기술분야에서 통상의 지식을 가진 자라면 이를 기초로 다양한 기술적 수정 및 변형을 적용할 수 있다. 예를 들어, 설명된 기술들이 설명된 방법과 다른 순서로 수행되거나, 및/또는 설명된 시스템, 구조, 장치, 회로 등의 구성요소들이 설명된 방법과 다른 형태로 결합 또는 조합되거나, 다른 구성요소 또는 균등물에 의하여 대치되거나 치환되더라도 적절한 결과가 달성될 수 있다. 그러므로, 다른 구현들, 다른 실시예들 및 특허청구범위와 균등한 것들도 후술하는 특허청구범위의 범위에 속한다.As described above, although the embodiments have been described with limited drawings, those skilled in the art can apply various technical modifications and variations based on this. For example, the described techniques are performed in a different order than the described method, and/or components of the described system, structure, device, circuit, etc. are combined or combined in a different form than the described method, or other components are used. Alternatively, appropriate results may be achieved even if substituted or substituted by an equivalent. Therefore, other implementations, other embodiments, and equivalents of the claims also fall within the scope of the claims described below.
200: IMC 매크로
210: 쓰기 워드 라인 드라이버(WWL(Write Word Line) driver)
220: 인-메모리 컴퓨팅(IMC) 회로
230: 가산기
240: 누적 연산기
250: 입력-드라이버(input driver)(또는 읽기 워드 라인 드라이버(RWL(Read Word Liner) driver)
260: 메모리 컨트롤러
270: 쓰기 비트 라인 드라이버(WBL(Write Bit Line) driver)200: IMC macro
210: Write Word Line (WWL) driver
220: In-memory computing (IMC) circuit
230: adder
240: Accumulative operator
250: input driver (or read word line driver (RWL) driver)
260: memory controller
270: Write Bit Line (WBL) driver
Claims (20)
복수의 메모리 뱅크들(memory banks); 및
상기 메모리 뱅크들 각각의 논리 연산 결과를 수신하는 논리 게이트
를 포함하고,
상기 메모리 뱅크들 각각은
가중치를 저장하는 비트 셀; 및
입력값을 수신하는 연산기
를 포함하고,
상기 연산기는
제1 트랜지스터 및 제2 트랜지스터를 포함하는 2개의 트랜지스터(2T) 회로를 포함하고,
상기 입력값은 상기 제1 트랜지스터의 제1 게이트 단자 및 상기 제2 트랜지스터의 제2 게이트 단자에 인가되며, 상기 제1 게이트 단자를 거친 상기 제1 트랜지스터의 출력값은 상기 제2 게이트 단자를 거친 상기 제2 트랜지스터의 출력값과 연결됨으로써 상기 비트 셀에 연결되어 상기 입력값을 수신한 상기 연산기가 상기 입력값과 상기 가중치 간의 논리 연산 결과를 출력하는, 인-메모리 컴퓨팅 회로.In an in-memory computing circuit,
a plurality of memory banks; and
A logic gate that receives the logical operation results of each of the memory banks
Including,
Each of the memory banks is
Bit cells that store weights; and
Operator that receives input values
Including,
The calculator is
comprising a two transistor (2T) circuit including a first transistor and a second transistor,
The input value is applied to the first gate terminal of the first transistor and the second gate terminal of the second transistor, and the output value of the first transistor that passes through the first gate terminal is the second gate terminal of the second transistor. 2 An in-memory computing circuit in which the operator, which is connected to the bit cell and receives the input value by being connected to the output value of a transistor, outputs a result of a logical operation between the input value and the weight.
상기 메모리 뱅크들 각각의 논리 연산 결과는 상기 입력값과 상기 가중치에 대한 NAND 연산값인, 인-메모리 컴퓨팅 회로.According to paragraph 1,
An in-memory computing circuit, wherein the logical operation result of each of the memory banks is a NAND operation value for the input value and the weight.
상기 논리 게이트는 NAND 게이트인, 인-메모리 컴퓨팅 회로.According to paragraph 1,
An in-memory computing circuit, wherein the logic gate is a NAND gate.
상기 논리 게이트는
상기 메모리 뱅크들 중 선택된 하나의 메모리 뱅크의 입력값과 가중치 간의 곱셈 결과를 출력하는, 인-메모리 컴퓨팅 회로.According to paragraph 1,
The logic gate is
An in-memory computing circuit that outputs a multiplication result between an input value of one selected memory bank among the memory banks and a weight.
상기 메모리 뱅크들 중 선택되지 않은 메모리 뱅크들 각각은 0의 입력값을 수신하는, 인-메모리 컴퓨팅 회로.According to paragraph 4,
An in-memory computing circuit, wherein each of the unselected memory banks receives an input value of 0.
상기 논리 게이트에 연결된 가산기
를 더 포함하는, 인-메모리 컴퓨팅 회로.According to paragraph 1,
Adder connected to the logic gate
An in-memory computing circuit further comprising:
상기 연산기는
비트 와이즈(bit-wise) 곱 연산의 결과에 해당하는 신호를 출력하는 복수의 트랜지스터들
을 포함하는, 인-메모리 컴퓨팅 회로.According to paragraph 1,
The calculator is
A plurality of transistors that output a signal corresponding to the result of a bit-wise product operation
In-memory computing circuitry comprising:
상기 비트 셀에 저장된 상기 가중치에 기초한 값이 상기 제1 트랜지스터의 드레인 단자에 인가되고,
상기 제1 트랜지스터의 소스 단자는
상기 제2 트랜지스터의 드레인 단자를 통해 상기 논리 게이트의 입력 단자에 연결되는, 인-메모리 컴퓨팅 회로.According to paragraph 1,
A value based on the weight stored in the bit cell is applied to the drain terminal of the first transistor,
The source terminal of the first transistor is
An in-memory computing circuit connected to the input terminal of the logic gate through the drain terminal of the second transistor.
상기 제1 트랜지스터는 NMOS 트랜지스터를 포함하고,
상기 제2 트랜지스터는 PMOS 트랜지스터를 포함하는, 인-메모리 컴퓨팅 회로.According to paragraph 1,
The first transistor includes an NMOS transistor,
In-memory computing circuit, wherein the second transistor includes a PMOS transistor.
복수의 메모리 뱅크들(memory banks); 및
상기 메모리 뱅크들 각각의 논리 연산 결과를 수신하는 논리 게이트
를 포함하고,
상기 메모리 뱅크들 각각은
가중치를 저장하는 비트 셀; 및
입력값을 수신하는 연산기
를 포함하고,
상기 연산기는
트랜스미션 게이트(transmission gate) 및 제3 트랜지스터를 포함하는 3개의 트랜지스터(3T) 회로를 포함하고,
상기 입력값은 상기 트랜스미션 게이트의 엔이에블(enable) 단자 및 상기 제3 트랜지스터의 제3 게이트 단자에 인가되고,
상기 트랜스미션 게이트의 출력값과 상기 제3 게이트 단자를 거친 상기 제3 트랜지스터의 출력값 각각은 상기 논리 게이트의 입력에 연결됨으로써 상기 비트 셀에 연결되어 상기 입력값을 수신한 상기 연산기가 상기 입력값과 상기 가중치 간의 논리 연산 결과를 출력되는, 인-메모리 컴퓨팅 회로.In an in-memory computing circuit,
a plurality of memory banks; and
A logic gate that receives the logical operation results of each of the memory banks
Including,
Each of the memory banks is
Bit cells that store weights; and
Operator that receives input values
Including,
The calculator is
It includes a three transistor (3T) circuit including a transmission gate and a third transistor,
The input value is applied to an enable terminal of the transmission gate and a third gate terminal of the third transistor,
The output value of the transmission gate and the output value of the third transistor that passed through the third gate terminal are each connected to the input of the logic gate and thus connected to the bit cell, so that the operator receiving the input value calculates the input value and the weight. An in-memory computing circuit that outputs the results of logical operations between nodes.
상기 논리 게이트는
상기 입력값이 상기 연산기로 인가되는지 여부에 따라, 상기 비트 셀에 해당하는 상기 논리 연산 결과를 상기 가산기로 전달하는, 인-메모리 컴퓨팅 회로.According to clause 6,
The logic gate is
An in-memory computing circuit that transfers the logical operation result corresponding to the bit cell to the adder, depending on whether the input value is applied to the operator.
상기 인-메모리 컴퓨팅 회로는,
모바일 디바이스, 모바일 컴퓨팅 디바이스, 모바일 폰, 스마트폰, 개인용 디지털 어시스턴트(personal digital assistant), 고정 로케이션 단말, 태블릿 컴퓨터, 컴퓨터, 웨어러블(wearable) 디바이스, 랩탑 컴퓨터, 서버, 뮤직 플레이어, 비디오 플레이어, 엔터테인먼트 유닛, 네비게이션 디바이스, 통신 디바이스, 내비게이션 디바이스, GPS 장치, 텔레비전, 튜너, 자동차, 차량 부품, 항공 전자 시스템, 드론, 멀티콥터 및 의료 기기로 구성된 그룹에서 선택된 적어도 하나의 디바이스에 통합되는, 인-메모리 컴퓨팅 회로.According to claim 1,
The in-memory computing circuit,
Mobile device, mobile computing device, mobile phone, smartphone, personal digital assistant, fixed location terminal, tablet computer, computer, wearable device, laptop computer, server, music player, video player, entertainment unit , in-memory computing, integrated into at least one device selected from the group consisting of navigation devices, communication devices, navigation devices, GPS devices, televisions, tuners, automobiles, vehicle components, avionics systems, drones, multicopters, and medical devices. Circuit.
인-메모리 컴퓨팅 회로들을 포함하는 어레이 회로(array circuit); 및
클럭 신호에 따라, 상기 뉴럴 네트워크 장치의 입력 신호에 해당하는 제2 값들을 상기 인-메모리 컴퓨팅 회로들 각각에 입력하고, 상기 인-메모리 컴퓨팅 회로들을 제어하는 컨트롤러
를 포함하고,
상기 인-메모리 컴퓨팅 회로들 각각은
복수의 메모리 뱅크들을 포함하고,
상기 메모리 뱅크들 각각은
가중치를 저장하는 비트 셀과 입력값을 수신하는 연산기; 및
상기 메모리 뱅크들 각각의 논리 연산 결과를 수신하는 논리 게이트
를 포함하며,
상기 연산기는
제1 트랜지스터 및 제2 트랜지스터를 포함하는 2개의 트랜지스터(2T) 회로를 포함하고,
상기 연산기가 수신한 입력값은 상기 제1 트랜지스터의 제1 게이트 단자 및 상기 제2 트랜지스터의 제2 게이트 단자에 인가되며, 상기 제1 게이트 단자를 거친 상기 제1 트랜지스터의 출력값은 상기 제2 게이트 단자를 거친 상기 제2 트랜지스터의 출력값과 연결됨으로써 상기 비트 셀에 연결되어 상기 입력값을 수신한 상기 연산기가 상기 입력값과 상기 가중치 간의 논리 연산 결과를 출력하는, 뉴럴 네트워크 장치.In a neural network device including in-memory computing circuitry,
an array circuit including in-memory computing circuits; and
A controller that inputs second values corresponding to the input signal of the neural network device to each of the in-memory computing circuits according to a clock signal and controls the in-memory computing circuits.
Including,
Each of the in-memory computing circuits
comprising a plurality of memory banks,
Each of the memory banks is
A bit cell that stores weights and an operator that receives input values; and
A logic gate that receives the logical operation results of each of the memory banks
Includes,
The calculator is
comprising a two transistor (2T) circuit including a first transistor and a second transistor,
The input value received by the operator is applied to the first gate terminal of the first transistor and the second gate terminal of the second transistor, and the output value of the first transistor after passing through the first gate terminal is applied to the second gate terminal. A neural network device in which the operator, which is connected to the bit cell and receives the input value by being connected to the output value of the second transistor that has passed through, outputs a result of a logical operation between the input value and the weight.
상기 메모리 뱅크들 각각의 논리 연산 결과는 상기 입력값과 상기 가중치에 대한 NAND 연산값인, 뉴럴 네트워크 장치.According to clause 14,
A neural network device wherein the logical operation result of each of the memory banks is a NAND operation value for the input value and the weight.
상기 논리 게이트는 NAND 게이트인, 뉴럴 네트워크 장치.According to clause 14,
A neural network device, wherein the logic gate is a NAND gate.
상기 컨트롤러는
상기 입력값을 포함하는 입력 피처맵(input feature map)을 저장하는 IFM(input feature map) 버퍼(buffer);
상기 입력값이 상기 복수의 IMC 회로들에 인가되는지 여부를 제어하는 제어 회로; 및
상기 가중치를 읽거나 쓰는 RW(read write) 회로
중 적어도 하나를 포함하는, 뉴럴 네트워크 장치.According to clause 14,
The controller is
an input feature map (IFM) buffer that stores an input feature map including the input values;
a control circuit that controls whether the input value is applied to the plurality of IMC circuits; and
RW (read write) circuit that reads or writes the weights
A neural network device comprising at least one of the following:
각각의 비트 셀 유닛을 각각 포함하는 메모리 뱅크들;
상기 각각의 비트 셀 유닛의 연산기들의 출력들을 수신하는 논리 게이트; 및
MAC 연산의 적어도 일부를 수행하기 위해 상기 논리 게이트의 출력을 수신하는 가산기
를 포함하고,
상기 각각의 비트 셀 유닛은
비트 셀 및 연산기를 포함하고, 비트 셀들 중 어느 것도 동일한 연산기를 공유하지 않고,
상기 연산기는
제1 트랜지스터 및 제2 트랜지스터를 포함하는 2개의 트랜지스터(2T) 회로를 포함하고,
상기 연산기가 수신한 입력값은 상기 제1 트랜지스터의 제1 게이트 단자 및 상기 제2 트랜지스터의 제2 게이트 단자에 인가되며, 상기 제1 게이트 단자를 거친 상기 제1 트랜지스터의 출력값은 상기 제2 게이트 단자를 거친 상기 제2 트랜지스터의 출력값과 연결됨으로써 상기 비트 셀에 연결되어 상기 입력값을 수신한 상기 연산기가 상기 입력값과 가중치 간의 논리 연산 결과를 출력하는, 인-메모리 컴퓨팅 장치.An in-memory computing device, comprising:
memory banks each containing a respective bit cell unit;
a logic gate receiving outputs of operators of each bit cell unit; and
An adder that receives the output of the logic gate to perform at least a portion of the MAC operation.
Including,
Each bit cell unit is
comprising a bit cell and an operator, none of the bit cells sharing the same operator,
The calculator is
comprising a two transistor (2T) circuit including a first transistor and a second transistor,
The input value received by the operator is applied to the first gate terminal of the first transistor and the second gate terminal of the second transistor, and the output value of the first transistor after passing through the first gate terminal is applied to the second gate terminal. An in-memory computing device in which the operator, which is connected to the bit cell and receives the input value by being connected to the output value of the second transistor that has passed through, outputs a result of a logical operation between the input value and the weight.
상기 각각의 비트 셀 유닛의 출력은 상기 논리 게이트에 연결되고,
상기 비트 셀들 각각은 각각의 저장된 값을 저장하며,
상기 비트 셀 유닛들은 상기 비트 셀 유닛들에 각각의 입력값을 제공하는 각각의 입력 라인에 연결되고,
상기 인-메모리 컴퓨팅 장치는
상기 비트 셀 유닛들에 제공되는 입력값들이, 상기 비트 셀 유닛들 중 어느 하나가 해당 연산기에 의해 상기 저장된 값에 대해 수행될 연산의 대상이 되도록 선택하는, 인-메모리 컴퓨팅 장치.According to clause 18,
The output of each bit cell unit is connected to the logic gate,
Each of the bit cells stores a respective stored value,
The bit cell units are connected to respective input lines that provide respective input values to the bit cell units,
The in-memory computing device is
An in-memory computing device wherein input values provided to the bit cell units select one of the bit cell units to be the target of an operation to be performed on the stored value by a corresponding operator.
상기 연산의 대상이 아닌 상기 비트 셀 유닛들의 상기 저장된 값들은 상기 논리 게이트의 출력에 영향을 주지 않는, 인-메모리 컴퓨팅 장치.According to clause 19,
The stored values of the bit cell units that are not the target of the operation do not affect the output of the logic gate.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| EP23187531.1A EP4332751A1 (en) | 2022-08-30 | 2023-07-25 | Apparatus and method with in-memory computing (imc) |
| JP2023137663A JP2024035145A (en) | 2022-08-30 | 2023-08-28 | IMC circuit, neural network device including IMC circuit, and method of operating IMC circuit |
Applications Claiming Priority (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR20220109261 | 2022-08-30 | ||
| KR1020220109261 | 2022-08-30 | ||
| US18/351,039 | 2023-07-12 | ||
| US18/351,039 US20240069867A1 (en) | 2022-08-30 | 2023-07-12 | Apparatus and method with in-memory computing (imc) |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| KR20240031021A KR20240031021A (en) | 2024-03-07 |
| KR102665969B1 true KR102665969B1 (en) | 2024-05-17 |
Family
ID=90271830
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| KR1020230093290A Active KR102665969B1 (en) | 2022-08-30 | 2023-07-18 | In memory computing(imc) circuir, neural network device including imc circuit and operating method of imc circuit |
Country Status (1)
| Country | Link |
|---|---|
| KR (1) | KR102665969B1 (en) |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220244916A1 (en) * | 2021-01-29 | 2022-08-04 | Taiwan Semiconductor Manufacturing Company, Ltd. | Compute in memory |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP3671748A1 (en) * | 2018-12-21 | 2020-06-24 | IMEC vzw | In-memory computing for machine learning |
-
2023
- 2023-07-18 KR KR1020230093290A patent/KR102665969B1/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220244916A1 (en) * | 2021-01-29 | 2022-08-04 | Taiwan Semiconductor Manufacturing Company, Ltd. | Compute in memory |
Also Published As
| Publication number | Publication date |
|---|---|
| KR20240031021A (en) | 2024-03-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11361216B2 (en) | Neural network circuits having non-volatile synapse arrays | |
| TWI714806B (en) | Dpu architecture | |
| Kang et al. | A 19.4-nJ/decision, 364-K decisions/s, in-memory random forest multi-class inference accelerator | |
| TWI718336B (en) | System for dpu operations | |
| TWI713047B (en) | Circuits and micro-architecture for a dram-based processing unit | |
| US11620504B2 (en) | Neuromorphic device based on memory | |
| US20240069867A1 (en) | Apparatus and method with in-memory computing (imc) | |
| CN114121086A (en) | Bayesian networks in memory | |
| KR20230005345A (en) | Memory devices to train neural networks | |
| Song et al. | BRAHMS: Beyond conventional RRAM-based neural network accelerators using hybrid analog memory system | |
| KR20210119805A (en) | Neuromorphic device and method of using the same | |
| Angizi et al. | Pisa: A binary-weight processing-in-sensor accelerator for edge image processing | |
| CN118445105B (en) | Debugging operations for AI operations | |
| KR102885449B1 (en) | Neural network device including convolution SRAM and diagonal accumulation SRAM | |
| KR102665969B1 (en) | In memory computing(imc) circuir, neural network device including imc circuit and operating method of imc circuit | |
| KR102868994B1 (en) | Neural network apparatus and operating method of the same | |
| KR20240025827A (en) | In memory computing(imc) processor and operating method of imc processor | |
| US12210952B2 (en) | Reorganizable data processing array for neural network computing | |
| US20240111828A1 (en) | In memory computing processor and method thereof with direction-based processing | |
| EP4332751A1 (en) | Apparatus and method with in-memory computing (imc) | |
| KR20240011596A (en) | Memory device for in memory computin and method thereof | |
| CN117636956A (en) | In-memory computing (IMC) circuits and devices, and neural network devices | |
| KR20240040918A (en) | Computational memory device and method using the same | |
| JP2022163000A (en) | Multi-bit cell, multi-bit operation apparatus, and method thereof | |
| US20240086153A1 (en) | Multi-bit accumulator and in-memory computing processor with same |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PA0109 | Patent application |
St.27 status event code: A-0-1-A10-A12-nap-PA0109 |
|
| P11-X000 | Amendment of application requested |
St.27 status event code: A-2-2-P10-P11-nap-X000 |
|
| P13-X000 | Application amended |
St.27 status event code: A-2-2-P10-P13-nap-X000 |
|
| PA0201 | Request for examination |
St.27 status event code: A-1-2-D10-D11-exm-PA0201 |
|
| PA0302 | Request for accelerated examination |
St.27 status event code: A-1-2-D10-D17-exm-PA0302 St.27 status event code: A-1-2-D10-D16-exm-PA0302 |
|
| D13-X000 | Search requested |
St.27 status event code: A-1-2-D10-D13-srh-X000 |
|
| D14-X000 | Search report completed |
St.27 status event code: A-1-2-D10-D14-srh-X000 |
|
| PE0902 | Notice of grounds for rejection |
St.27 status event code: A-1-2-D10-D21-exm-PE0902 |
|
| E13-X000 | Pre-grant limitation requested |
St.27 status event code: A-2-3-E10-E13-lim-X000 |
|
| P11-X000 | Amendment of application requested |
St.27 status event code: A-2-2-P10-P11-nap-X000 |
|
| P13-X000 | Application amended |
St.27 status event code: A-2-2-P10-P13-nap-X000 |
|
| PG1501 | Laying open of application |
St.27 status event code: A-1-1-Q10-Q12-nap-PG1501 |
|
| E701 | Decision to grant or registration of patent right | ||
| PE0701 | Decision of registration |
St.27 status event code: A-1-2-D10-D22-exm-PE0701 |
|
| PR0701 | Registration of establishment |
St.27 status event code: A-2-4-F10-F11-exm-PR0701 |
|
| PR1002 | Payment of registration fee |
St.27 status event code: A-2-2-U10-U11-oth-PR1002 Fee payment year number: 1 |
|
| PG1601 | Publication of registration |
St.27 status event code: A-4-4-Q10-Q13-nap-PG1601 |