KR20210093126A - Processing-In-Memory(PIM) system and operating method of the PIM system - Google Patents

Processing-In-Memory(PIM) system and operating method of the PIM system Download PDF

Info

Publication number
KR20210093126A
KR20210093126A KR1020200006903A KR20200006903A KR20210093126A KR 20210093126 A KR20210093126 A KR 20210093126A KR 1020200006903 A KR1020200006903 A KR 1020200006903A KR 20200006903 A KR20200006903 A KR 20200006903A KR 20210093126 A KR20210093126 A KR 20210093126A
Authority
KR
South Korea
Prior art keywords
mac
data
pim
operator
output
Prior art date
Application number
KR1020200006903A
Other languages
Korean (ko)
Inventor
송청기
Original Assignee
에스케이하이닉스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 에스케이하이닉스 주식회사 filed Critical 에스케이하이닉스 주식회사
Priority to KR1020200006903A priority Critical patent/KR20210093126A/en
Priority to TW109131494A priority patent/TW202141290A/en
Priority to US17/027,276 priority patent/US11513733B2/en
Priority to CN202110012256.4A priority patent/CN113157248A/en
Priority to US17/143,886 priority patent/US11315611B2/en
Priority to US17/143,941 priority patent/US20210210125A1/en
Priority to US17/143,984 priority patent/US11847451B2/en
Priority to US17/144,530 priority patent/US11500629B2/en
Priority to US17/146,101 priority patent/US11663000B2/en
Priority to US17/147,278 priority patent/US11635911B2/en
Priority to US17/148,473 priority patent/US11720354B2/en
Priority to US17/148,451 priority patent/US11385837B2/en
Priority to US17/175,497 priority patent/US11586438B2/en
Priority to US17/175,446 priority patent/US11817884B2/en
Priority to US17/175,477 priority patent/US11579870B2/en
Priority to US17/188,951 priority patent/US11909421B2/en
Priority to US17/225,915 priority patent/US20210224039A1/en
Publication of KR20210093126A publication Critical patent/KR20210093126A/en
Priority to US17/491,954 priority patent/US11704052B2/en
Priority to US17/491,893 priority patent/US11908541B2/en
Priority to US17/694,220 priority patent/US20220197596A1/en
Priority to US17/703,744 priority patent/US20220229633A1/en
Priority to US17/724,253 priority patent/US11907680B2/en
Priority to US17/726,303 priority patent/US11829760B2/en
Priority to US17/750,922 priority patent/US20220283806A1/en
Priority to US17/889,071 priority patent/US11816362B2/en
Priority to US17/889,134 priority patent/US11822823B2/en
Priority to US17/894,014 priority patent/US20220405019A1/en
Priority to US17/962,334 priority patent/US20230033179A1/en
Priority to US18/114,140 priority patent/US20230244442A1/en
Priority to US18/118,634 priority patent/US20230221883A1/en
Priority to US18/334,659 priority patent/US20230325186A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/76Architectures of general purpose stored program computers
    • G06F15/78Architectures of general purpose stored program computers comprising a single central processing unit
    • G06F15/7807System on chip, i.e. computer system on a single chip; System in package, i.e. computer system on one or more chips in a single package
    • G06F15/7821Tightly coupled to memory, e.g. computational memory, smart memory, processor in memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/3004Arrangements for executing specific machine instructions to perform operations on memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/30003Arrangements for executing specific machine instructions
    • G06F9/30076Arrangements for executing specific machine instructions to perform miscellaneous control operations, e.g. NOP
    • G06F9/30079Pipeline control instructions, e.g. multicycle NOP

Abstract

A PIM system includes a PIM device and a PIM controller. The PIM device includes: a first storage area; a second storage area; and an MAC operator which receives first data and second data from the first storage area and the second storage area, respectively, and performs a multiply-accumulate addition (MAC) operation. The PIM controller is configured to control a memory mode operation and a MAC mode operation of the PIM device. The PIM controller is configured to generate and transmit a memory command signal to the PIM device in the memory mode, and transmit first to fifth MAC command signals to the PIM device in the MAC mode. The present invention provides a PIM system configured to perform the MAC operation in a deterministic manner and an operating method thereof.

Description

프로세싱-인-메모리 시스템 및 그 동작 방법{Processing-In-Memory(PIM) system and operating method of the PIM system}Processing-In-Memory (PIM) system and operating method of the PIM system

본 개시의 여러 실시예들은, 프로세싱-인-메모리(Processing-In-Memory; 이하 PIM) 시스템에 관한 것으로서, 특히 PIM 장치 및 PIM 컨트롤러를 포함하는 PIM 시스템 및 그 동작 방법에 관한 것이다.Various embodiments of the present disclosure relate to a Processing-In-Memory (PIM) system, and more particularly, to a PIM system including a PIM device and a PIM controller, and an operating method thereof.

최근 정보기술(IT) 산업 뿐만 아니라, 금융, 의료 등 산업 전반에 걸쳐 인공지능에 대한 관심이 급증하고 있다. 이에 따라 다양한 분야에서 인공 지능, 보다 정확하게는 딥 러닝(deep learning)의 도입을 고려하고 시제품화하고 있다. 일반적으로 딥 러닝은, 기존 신경망(neural networks)의 계층 수를 증가시킨 심층 신경망(deep neural networks, DNNs) 또는 심층망(deep networks)을 효과적으로 학습하여 패턴인식(pattern recognition)이나 추론(inference)에 활용하는 기술을 통칭한다.Recently, interest in artificial intelligence is rapidly increasing not only in the information technology (IT) industry, but also in the financial and medical industries. Accordingly, the introduction of artificial intelligence, more precisely, deep learning, is being considered and prototyped in various fields. In general, deep learning is used for pattern recognition or inference by effectively learning deep neural networks (DNNs) or deep networks that have increased the number of layers of existing neural networks. referred to as the technology used.

딥 러닝에 대한 이와 같은 광범위한 관심의 배경과 원인들 중 하나는 연산을 수행하는 프로세서(processor)의 성능 향상일 수 있다. 인공 지능의 성능을 향상시키기 위해서는 신경망(neural network)의 층을 많게는 수백 개 쌓아 학습을 시킨다. 이와 같은 추세는 최근 몇 년간 계속 되었으며, 이로 인해 실제로 연산을 하는 하드웨어에 요구되는 연산량이 기하급수적으로 증가하였다. 더욱이 메모리와 프로세서가 분리되는 기존의 하드웨어 시스템의 경우, 메모리와 프로세서 사이의 데이터 통신양의 제약으로 인공 지능 하드웨어 성능 향상을 저해하고 있다. 이를 해결하기 위해, 최근에는 반도체 칩 자체에서 프로세서와 메모리가 일체화된 PIM 장치가 신경망 컴퓨팅 장치(computing device)로서 사용되고 있는 추세다. PIM 장치는 PIM 장치 내부에서 직접 연산 동작을 수행하므로, 신경망 내에서의 데이터 처리 속도를 향상시킨다.One of the backgrounds and causes of such widespread interest in deep learning may be an improvement in the performance of a processor that performs computations. In order to improve the performance of artificial intelligence, learning is done by stacking up to hundreds of layers of neural networks. This trend has continued in recent years, and as a result, the amount of computation required for the hardware that actually performs the computation has increased exponentially. Moreover, in the case of the existing hardware system in which the memory and the processor are separated, the improvement of the artificial intelligence hardware performance is hindered by the limitation of the amount of data communication between the memory and the processor. In order to solve this problem, a PIM device in which a processor and a memory are integrated in a semiconductor chip itself has recently been used as a neural network computing device. Since the PIM device directly performs a calculation operation inside the PIM device, the data processing speed in the neural network is improved.

본 출원이 해결하고자 하는 과제는, PIM 장치의 곱셈-누적 가산(multiplying-accumulating; 이하 MAC) 연산이 PIM 컨트롤러에 의해 수행되도록 구성되고, 더욱이 MAC 연산이 확정적(deterministic) 방식으로 이루어지도록 할 수 있는 PIM 시스템 및 그 동작 방법을 제공하는 것이다.The problem to be solved by the present application is that the multiplying-accumulating (hereinafter MAC) operation of the PIM device is configured to be performed by the PIM controller, and furthermore, the MAC operation can be performed in a deterministic manner. To provide a PIM system and an operating method thereof.

본 개시의 일 예에 따른 PIM 시스템은, PIM 장치 및 PIM 컨트롤러를 포함한다. 상기 PIM 장치는, 제1 저장영역과, 제2 저장영역과, 그리고 상기 제1 저장영역 및 제2 저장영역으로부터 각각 제1 데이터 및 제2 데이터를 전송받아 곱셈-누적 가산(MAC) 연산을 수행하는 MAC 오퍼레이터를 포함한다. 상기 PIM 컨트롤러는, 상기 PIM 장치의 메모리 모드 동작 및 MAC 모드 동작을 제어하되, 상기 메모리 모드에서는 메모리 커맨드 신호를 생성하여 상기 PIM 장치로 전송하고, 상기 MAC 모드에서는 제1 내지 제5 MAC 커맨드 신호를 상기 PIM 장치로 전송하도록 구성된다.A PIM system according to an example of the present disclosure includes a PIM device and a PIM controller. The PIM device receives first data and second data from a first storage area, a second storage area, and the first and second storage areas, respectively, and performs a multiply-accumulate addition (MAC) operation MAC operator that does The PIM controller controls a memory mode operation and a MAC mode operation of the PIM device, and generates and transmits a memory command signal to the PIM device in the memory mode, and receives first to fifth MAC command signals in the MAC mode and transmit to the PIM device.

본 개시의 일 예에 따른 PIM 시스템은, PIM 장치 및 PIM 컨트롤러를 포함한다. 상기 PIM 장치는, 저장영역과, 글로벌 버퍼와, 그리고 상기 저장영역 및 글로벌 버퍼로부터 각각 제1 데이터 및 제2 데이터를 전송받아 MAC 연산을 수행하는 MAC 오퍼레이터를 포함한다. 상기 PIM 컨트롤러는, 상기 PIM 장치의 메모리 모드 동작 및 MAC 모드 동작을 제어하되, 상기 메모리 모드에서는 메모리 커맨드 신호를 생성하여 상기 PIM 장치로 전송하고, 상기 MAC 모드에서는 제1 내지 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하도록 구성된다.A PIM system according to an example of the present disclosure includes a PIM device and a PIM controller. The PIM device includes a storage area, a global buffer, and a MAC operator that receives first data and second data from the storage area and the global buffer, respectively, and performs a MAC operation. The PIM controller controls a memory mode operation and a MAC mode operation of the PIM device, and generates and transmits a memory command signal to the PIM device in the memory mode, and receives first to fourth MAC command signals in the MAC mode and transmit to the PIM device.

본 개시의 일 예에 따른 PIM 시스템의 동작 방법은, MAC 연산을 수행하는 PIM 장치와, 상기 PIM 장치의 MAC 연산 동작을 제어하는 PIM 컨트롤러를 포함하는 PIM 시스템의 동작방법에 있어서, 상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 PIM 장치의 제1 저장장치로부터 MAC 연산을 위한 MXN(M, N은 1보다 큰 자연수)의 웨이트 매트릭스의 R행(R은 "1"로 초기 세팅됨) 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계와, 상기 PIM 컨트롤러로부터 제2 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 PIM 장치의 제2 저장장치로부터 MAC 연산을 위한 NX1의 벡터 매트릭스의 제1열 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계와, 상기 PIM 컨트롤러로부터 제3 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 R행 원소들에 대한 입력 래치가 수행되도록 하는 단계와, 상기 PIM 컨트롤러로부터 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 벡터 매트릭스의 제1열 원소들에 대한 입력 래치가 수행되도록 하는 단계와, 상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들과 상기 벡터 매트릭스의 제1열 원소들의 매트릭스 곱셈 연산을 수행하는 단계와, 상기 PIM 컨트롤러로부터 제5 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 매트릭스 곱셈 연산 결과인 결과 데이터에 대한 출력 래치가 수행되도록 하는 단계와, 상기 PIM 컨트롤러로부터 제6 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 출력 래치된 결과 데이터가 상기 MAC 오퍼레이터로부터 출력되도록 하는 단계와, 그리고 상기 R을 +1 증가시킨 후 상기 R이 마지막 행보다 같거나 작은 경우 상기 단계들을 반복하여 수행하는 단계를 포함한다.A method of operating a PIM system according to an example of the present disclosure is a method of operating a PIM system including a PIM device for performing a MAC operation and a PIM controller for controlling a MAC operation operation of the PIM device. A first MAC command signal is transmitted to the PIM device, and from the first storage device of the PIM device, an R row (R is “1”) of a weight matrix of MXN (M, N is a natural number greater than 1) for MAC operation. initially set) elements are input to a MAC operator of the PIM device, and transmitting a second MAC command signal from the PIM controller to the PIM device, and NX1 for MAC operation from a second storage device of the PIM device allowing the elements of the first column of the vector matrix to be input to the MAC operator of the PIM device, and sending a third MAC command signal from the PIM controller to the PIM device, so that the R row of the weight matrix in the MAC operator performing input latching on elements, and transmitting a fourth MAC command signal from the PIM controller to the PIM device, so that the input latching of the first column elements of the vector matrix is performed in the MAC operator performing a matrix multiplication operation of elements in the R-th row of the weight matrix and elements in the first column of the vector matrix in the MAC operator; and sending a fifth MAC command signal from the PIM controller to the PIM. transmitting to the device so that output latching is performed on the result data, which is the result of the matrix multiplication operation, in the MAC operator; and transmitting a sixth MAC command signal from the PIM controller to the PIM device, in the MAC operator allowing the output latched result data to be output from the MAC operator, and when R is less than or equal to the last row after increasing R by +1, the step It includes the step of repeatedly performing the steps.

본 개시의 일 예에 따른 PIM 시스템의 동작 방법은, MAC 연산을 수행하는 PIM 장치와, 상기 PIM 장치의 MAC 연산 동작을 제어하는 PIM 컨트롤러를 포함하는 PIM 시스템의 동작방법에 있어서, 상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 PIM 장치의 저장장치로부터 MAC 연산을 위한 MXN(M, N은 1보다 큰 자연수)의 웨이트 매트릭스의 R행(R은 "1"로 초기 세팅됨) 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계와, 상기 PIM 장치의 글로벌 버퍼로부터 MAC 연산을 위한 NX1의 벡터 매트릭스의 제1열 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계와, 상기 PIM 컨트롤러로부터 제2 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들 및 상기 벡터 매트릭스의 제1열 원소들에 대한 입력 래치가 수행되도록 하는 단계와, 상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들과 상기 벡터 매트릭스의 제1열 원소들의 매트릭스 곱셈 연산을 수행하는 단계와, 상기 PIM 컨트롤러로부터 제3 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 매트릭스 곱셈 연산 결과인 결과 데이터에 대한 출력 래치가 수행되도록 하는 단계와, 상기 PIM 컨트롤러로부터 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 출력 래치된 결과 데이터가 상기 MAC 오퍼레이터로부터 출력되도록 하는 단계와, 그리고 상기 R을 +1 증가시킨 후 상기 R이 마지막 행보다 같거나 작은 경우 상기 단계들을 반복하여 수행하는 단계를 포함한다.A method of operating a PIM system according to an example of the present disclosure is a method of operating a PIM system including a PIM device for performing a MAC operation and a PIM controller for controlling a MAC operation operation of the PIM device. A first MAC command signal is transmitted to the PIM device, and the R row (R is “1” initially set to “1”) of a weight matrix of MXN (M, N are natural numbers greater than 1) for MAC operation from the storage device of the PIM device. allowing elements to be input to the MAC operator of the PIM device, and allowing the first column elements of the vector matrix of NX1 for MAC operation to be input from the global buffer of the PIM device to the MAC operator of the PIM device; , by transmitting a second MAC command signal from the PIM controller to the PIM device, so that an input latch for the elements of the Rth row of the weight matrix and the elements of the first column of the vector matrix is performed in the MAC operator performing a matrix multiplication operation of elements in the R-th row of the weight matrix and elements in the first column of the vector matrix in the MAC operator; and sending a third MAC command signal from the PIM controller to the PIM device. sending an output latch on the result data that is the result of the matrix multiplication operation in the MAC operator; and transmitting a fourth MAC command signal from the PIM controller to the PIM device, so that the MAC operator allowing output latched result data to be output from the MAC operator, and repeating the above steps when R is equal to or smaller than the last row after increasing R by +1.

여러 실시예들에 따르면, PIM 장치의 MAC 연산이 PIM 컨트롤러에 의해 수행되고, 특히 MAC 연산이 확정적 방식으로 수행되도록 구성되는 PIM 시스템 및 그 동작 방법을 제공할 수 있다는 이점이 제공된다.According to various embodiments, it is possible to provide a PIM system and a method of operating the same, wherein the MAC operation of the PIM device is performed by the PIM controller, and in particular, the MAC operation is configured to be performed in a deterministic manner.

도 1은 본 개시의 일 예에 따른 PIM 시스템을 나타내 보인 블록도이다.
도 2는 본 개시의 일 예에 따른 PIM 시스템에서 PIM 컨트롤러의 MAC 커맨드 발생기로부터 출력되는 MAC 커맨드를 설명하기 위해 나타내 보인 도면이다.
도 3은 본 개시의 일 예에 따른 PIM 시스템에서 PIM 장치의 MAC 오퍼레이터 구성의 일 예를 나타내 보인 블록도이다.
도 4는 본 개시의 일 예에 따른 PIM 시스템에서 수행되는 MAC 연산의 일 예를 나타내 보인 도면이다.
도 5는 본 개시의 일 예에 따른 PIM 시스템에서 도 4의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 플로챠트이다.
도 6 내지 도 12는 본 개시의 일 예에 따른 PIM 시스템에서 도 4의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 도면들이다.
도 13은 본 개시의 일 예에 따른 PIM 시스템에서 수행되는 MAC 연산의 다른 예를 나타내 보인 도면이다.
도 14는 본 개시의 일 예에 따른 PIM 시스템에서 도 13의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 플로챠트이다.
도 15는 본 개시의 일 예에 따른 PIM 시스템에서 도 14의 MAC 연산을 수행하기 위한 MAC 오퍼레이터 구성의 일 예를 나타내 보인 도면이다.
도 16은 본 개시의 일 예에 따른 PIM 시스템에서 수행되는 MAC 연산의 또 다른 예를 나타내 보인 도면이다.
도 17은 본 개시의 일 예에 따른 PIM 시스템에서 도 16의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 플로챠트이다.
도 18는 본 개시의 일 예에 따른 PIM 시스템에서 도 16의 MAC 연산을 수행하기 위한 MAC 오퍼레이터 구성의 일 예를 나타내 보인 도면이다.
도 19는 본 개시의 다른 예에 다른 PIM 시스템을 나타내 보인 도면이다.
도 20은 본 개시의 다른 예에 따른 PIM 시스템에서 PIM 컨트롤러의 MAC 커맨드 발생기로부터 출력되는 MAC 커맨드를 설명하기 위해 나타내 보인 도면이다.
도 21은 본 개시의 다른 예에 따른 PIM 시스템에서 도 4의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 플로챠트이다.
도 22 내지 도 25는 본 개시의 다른 예에 따른 PIM 시스템에서 도 4의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 도면들이다.
도 26은 본 개시의 다른 예에 따른 PIM 시스템에서 도 13의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 플로챠트이다.
도 27은 본 개시의 다른 예에 따른 PIM 시스템에서 도 16의 MAC 연산을 수행하는 과정을 설명하기 위해 나타내 보인 플로챠트이다.
도 28은 본 개시의 또 다른 예에 다른 PIM 시스템을 나타내 보인 블록도이다.
도 29는 본 개시의 또 다른 예에 다른 PIM 시스템을 나타내 보인 블록도이다.
1 is a block diagram illustrating a PIM system according to an example of the present disclosure.
2 is a diagram illustrating a MAC command output from a MAC command generator of a PIM controller in a PIM system according to an example of the present disclosure.
3 is a block diagram illustrating an example of a configuration of a MAC operator of a PIM device in a PIM system according to an example of the present disclosure.
4 is a diagram illustrating an example of a MAC operation performed in a PIM system according to an example of the present disclosure.
5 is a flowchart illustrating a process of performing the MAC operation of FIG. 4 in the PIM system according to an example of the present disclosure.
6 to 12 are diagrams illustrating a process of performing the MAC operation of FIG. 4 in the PIM system according to an example of the present disclosure.
13 is a diagram illustrating another example of a MAC operation performed in a PIM system according to an example of the present disclosure.
14 is a flowchart illustrating a process of performing the MAC operation of FIG. 13 in the PIM system according to an example of the present disclosure.
15 is a diagram illustrating an example of a MAC operator configuration for performing the MAC operation of FIG. 14 in a PIM system according to an example of the present disclosure.
16 is a diagram illustrating another example of a MAC operation performed in a PIM system according to an example of the present disclosure.
17 is a flowchart illustrating a process of performing the MAC operation of FIG. 16 in the PIM system according to an example of the present disclosure.
18 is a diagram illustrating an example of a MAC operator configuration for performing the MAC operation of FIG. 16 in a PIM system according to an example of the present disclosure.
19 is a diagram illustrating a PIM system according to another example of the present disclosure.
20 is a diagram illustrating a MAC command output from a MAC command generator of a PIM controller in a PIM system according to another example of the present disclosure.
21 is a flowchart illustrating a process of performing the MAC operation of FIG. 4 in a PIM system according to another example of the present disclosure.
22 to 25 are diagrams illustrating a process of performing the MAC operation of FIG. 4 in a PIM system according to another example of the present disclosure.
26 is a flowchart illustrating a process of performing the MAC operation of FIG. 13 in a PIM system according to another example of the present disclosure.
27 is a flowchart illustrating a process of performing the MAC operation of FIG. 16 in a PIM system according to another example of the present disclosure.
28 is a block diagram illustrating another PIM system according to another example of the present disclosure.
29 is a block diagram illustrating another PIM system according to another example of the present disclosure.

본 출원의 예의 기재에서 "제1" 및 "제2"와 같은 기재는 요소를 구분하기 위한 것이며, 부재 자체를 한정하거나 특정한 순서를 의미하는 것으로 사용된 것은 아니다. 어느 한 구성 요소가 다른 구성 요소에 "연결되어 있다"거나 "접속되어 있다"의 기재는, 다른 구성 요소에 전기적 또는 기계적으로 직접 연결되어 있거나 또는 접속되어 있을 수 있으며, 또는, 중간에 다른 별도의 구성 요소들이 개재되어 연결 관계 또는 접속 관계를 구성할 수도 있다. "기 설정된"이라는 용어는 프로세스나 알고리즘에서 매개변수를 사용할 때 매개변수의 수치가 미리 결정되어 있음을 의미한다. 매개변수의 수치는 실시예에 따라서 프로세스나 알고리즘이 시작할 때 설정되거나 프로세스나 알고리즘이 수행되는 구간 동안 설정될 수 있다. "로직하이레벨" 및 "로직로우레벨"은 신호들의 로직레벨들을 설명하기 위해 사용된다. "로직하이레벨"을 갖는 신호는 "로직로우레벨"을 갖는 신호와 구별된다. 예를 들어, 제1 전압을 갖는 신호가 "로직하이레벨"에 대응할 때 제2 전압을 갖는 신호는 "로직로우레벨"에 대응할 수 있다. 일 실시예에 따라 "로직하이레벨"은 "로직로우레벨"보다 큰 전압으로 설정될 수 있다. 한편, 신호들의 로직레벨들은 실시예에 따라서 다른 로직레벨 또는 반대의 로직레벨로 설정될 수 있다. 예를 들어, 로직하이레벨을 갖는 신호는 실시예에 따라서 로직로우레벨을 갖도록 설정될 수 있고, 로직로우레벨을 갖는 신호는 실시예에 따라서 로직하이레벨을 갖도록 설정될 수 있다.In the description of examples of the present application, descriptions such as "first" and "second" are for distinguishing elements, and are not used to limit the members themselves or to mean a specific order. A description that one component is “connected” or “connected” to another component may be directly or electrically connected to another component or may be connected to another component, or another separate component in the middle. Components may be interposed to form a connection relationship or a connection relationship. The term "preset" means that when a parameter is used in a process or algorithm, the value of the parameter is predetermined. The value of the parameter may be set when a process or algorithm is started or set during a period during which the process or algorithm is performed, according to an embodiment. “Logic high level” and “logic low level” are used to describe the logic levels of signals. A signal having a “logic high level” is distinguished from a signal having a “logic low level”. For example, when the signal having the first voltage corresponds to the “logic high level”, the signal having the second voltage may correspond to the “logic low level”. According to an embodiment, the “logic high level” may be set to a voltage greater than the “logic low level”. Meanwhile, the logic levels of the signals may be set to different logic levels or opposite logic levels according to embodiments. For example, a signal having a logic high level may be set to have a logic low level according to an embodiment, and a signal having a logic low level may be set to have a logic high level according to an embodiment.

이하, 실시예를 통하여 본 발명을 더욱 상세히 설명하기로 한다. 이들 실시예는 단지 본 발명을 예시하기 위한 것이며, 본 발명의 권리 보호 범위가 이들 실시예에 의해 제한되는 것은 아니다.Hereinafter, the present invention will be described in more detail through examples. These examples are only for illustrating the present invention, and the scope of protection of the rights of the present invention is not limited by these examples.

도 1에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)의 블록도가 개략적으로 도시되어 있다. 도 1에 나타낸 바와 같이, PIM 시스템(10)은, PIM 장치(100) 및 PIM 컨트롤러(200)를 포함하여 구성된다. PIM 장치(100)는, 제1 메모리 뱅크(BANK0)(111)와, 제2 메모리 뱅크(BANK1)(112)와, MAC 오퍼레이터(MAC OPERATOR)(120)와, 인터페이스(I/F)(131)와, 그리고 데이터 입출력 패드(DQ)(132)를 포함하여 구성될 수 있다. PIM 장치(100)의 제1 메모리 뱅크(111), 제2 메모리 뱅크(BANK1), 및 MAC 오퍼레이터(120)는 하나의 MAC 유닛(MAC UNIT)을 구성한다. 다른 예에서, PIM 장치(100)는 복수의 MAC 유닛들을 포함할 수 있다. 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)는 데이터가 저장되는 영역으로, 예컨대 디램(DRAM)을 구성하는 메모리 영역 단위일 수 있다. 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)는, 독립적으로 활성화(active)될 수 있는 단위이며, PIM 장치(100) 내의 데이터 입출력 라인과 동일한 데이터 버스 폭(data bus width)을 가질 수 있다. 일 예에서 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)는, 다른 메모리 뱅크가 액세스되는 동안 활성화 동작이 병행하여 진행되는 인터리빙(interleaving) 방식으로 동작할 수 있다. 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)는, 복수의 로우들(rows) 및 컬럼들(columns)의 교차점들 각각에 메모리 단위 셀이 배치되어 구성되는 적어도 하나의 메모리 셀 어레이를 포함할 수 있다.1 schematically shows a block diagram of a PIM system 10 according to a first embodiment of the present disclosure. As shown in FIG. 1 , the PIM system 10 includes a PIM device 100 and a PIM controller 200 . The PIM device 100 includes a first memory bank (BANK0) 111 , a second memory bank (BANK1 ) 112 , a MAC operator (MAC OPERATOR) 120 , and an interface (I/F) 131 . ) and a data input/output pad (DQ) 132 . The first memory bank 111 , the second memory bank BANK1 , and the MAC operator 120 of the PIM device 100 constitute one MAC unit (MAC UNIT). In another example, the PIM device 100 may include a plurality of MAC units. The first memory bank 111 and the second memory bank 112 are areas in which data is stored, and may be, for example, a unit of a memory area constituting a DRAM. The first memory bank 111 and the second memory bank 112 are units that can be independently activated, and have the same data bus width as the data input/output line in the PIM device 100 . can In one example, the first memory bank 111 and the second memory bank 112 may operate in an interleaving manner in which activation operations are performed in parallel while other memory banks are being accessed. The first memory bank 111 and the second memory bank 112 include at least one memory cell array configured by disposing memory unit cells at intersections of a plurality of rows and columns, respectively. may include

도면에 나타내지는 않았지만, 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)에 인접한 영역에는 코어(core)가 배치될 수 있다. 코어는, X-디코더들(XDEC) 및 Y-디코더들/입출력회로들(YDEC/IO)을 포함할 수 있다. X-디코더(XDEC)는, 워드라인 디코더 또는 로우 디코더로 명명되기도 한다. X-디코더(XDEC)는, PIM 컨트롤러(200)로부터 전송되는 로우 어드레스(ADD_R)를 수신하고, 수신된 로우 어드레스(ADD_R)를 디코딩하여 선택된 메모리 뱅크의 선택된 로우를 인에이블시킨다. Y-디코더들/입출력회로들(YDEC/IO) 각각은, Y-디코더(YDEC) 및 입출력회로(IO)를 포함할 수 있다. Y-디코더(YDEC)는, 비트라인 디코더 또는 컬럼 디코더로 명명되기도 한다. Y-디코더(YDEC)는, PIM 컨트롤러(200)로부터 전송되는 컬럼 어드레스(ADDR_C)를 수신하고, 수신된 컬럼 어드레스(ADDR_C)를 디코딩하여 선택된 메모리 뱅크 내에서 선택된 로우의 컬럼들 중 선택된 컬럼들을 인에이블시킨다. 입출력회로(IO)는, 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)에 대한 리드 동작에서 리드 데이터를 감지 증폭하기 위한 입출력 센스앰프(IO sense amp)를 포함할 수 있다. 또한 입출력회로(IO)는, 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)에 대한 라이트 동작에서 라이트 데이터를 드라이빙하기 위한 라이트 드라이버(write driver)를 포함할 수 있다.Although not shown in the drawing, a core may be disposed in an area adjacent to the first memory bank 111 and the second memory bank 112 . The core may include X-decoders XDEC and Y-decoders/input/output circuits YDEC/IO. The X-decoder (XDEC) is also called a word line decoder or a row decoder. The X-decoder XDEC receives the row address ADD_R transmitted from the PIM controller 200 and decodes the received row address ADD_R to enable the selected row of the selected memory bank. Each of the Y-decoders/input/output circuits YDEC/IO may include a Y-decoder YDEC and an input/output circuit IO. The Y-decoder (YDEC) is also called a bitline decoder or a column decoder. The Y-decoder YDEC receives the column address ADDR_C transmitted from the PIM controller 200 , decodes the received column address ADDR_C, and reads selected columns among columns of a selected row in the selected memory bank enable The input/output circuit IO may include an input/output sense amplifier for sensing and amplifying read data in a read operation for the first memory bank 111 and the second memory bank 112 . Also, the input/output circuit IO may include a write driver for driving write data in a write operation for the first memory bank 111 and the second memory bank 112 .

PIM 장치(100)의 인터페이스(131)는, PIM 컨트롤러(200)로부터 메모리 커맨드(M_CMD), MAC 커맨드들(MAC_CMDs), 뱅크선택신호(BS), 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 수신받는다. 인터페이스(131)는, 수신된 메모리 커맨드(M_CMD)를 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)와 함께 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)로 전송한다. 인터페이스(131)는, 수신된 MAC 커맨드들(MAC_CMDs)을 제1 메모리 뱅크(111), 제2 메모리 뱅크(112), 및 MAC 오퍼레이터(120)로 전송한다. 이때 인터페이스(131)는, 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)로 함께 전송시킬 수도 있다. PIM 장치(100)의 데이터 입출력 패드(132)는, PIM 장치(100) 내의 제1 및 제2 메모리 뱅크(111, 112) 및 MAC 오퍼레이터(120)와 PIM 장치(100)의 외부 사이의 데이터 통신 터미널로 기능한다. 여기서 PIM 장치(100)의 외부는, PIM 시스템(10)을 구성하는 PIM 컨트롤러(200)이거나, 또는 PIM 시스템(10) 외부의 호스트일 수 있다. 이에 따라 호스트 또는 PIM 컨트롤러(200)로부터 전송되는 데이터는, 데이터 입출력 패드(132)를 통해 PIM 장치(100) 내부로 입력될 수 있다. 또한 PIM 장치(100) 내의 데이터는 데이터 입출력 패드(132)를 통해 PIM 장치(100) 외부로 전송될 수 있다.The interface 131 of the PIM device 100 receives a memory command M_CMD, MAC commands MAC_CMDs, a bank selection signal BS, and row/column addresses ADDR_R/ADDR_C from the PIM controller 200 . receive The interface 131 transmits the received memory command M_CMD to the first memory bank 111 or the second memory bank 112 together with the bank select signal BS and the row/column addresses ADDR_R/ADDR_C. . The interface 131 transmits the received MAC commands MAC_CMDs to the first memory bank 111 , the second memory bank 112 , and the MAC operator 120 . In this case, the interface 131 may transmit the bank selection signal BS and the row/column addresses ADDR_R/ADDR_C to the first memory bank 111 and the second memory bank 112 together. The data input/output pad 132 of the PIM device 100 communicates data between the first and second memory banks 111 and 112 in the PIM device 100 and the MAC operator 120 and the outside of the PIM device 100 . It functions as a terminal. Here, the outside of the PIM device 100 may be the PIM controller 200 constituting the PIM system 10 or a host outside the PIM system 10 . Accordingly, data transmitted from the host or the PIM controller 200 may be input into the PIM device 100 through the data input/output pad 132 . Also, data in the PIM device 100 may be transmitted to the outside of the PIM device 100 through the data input/output pad 132 .

PIM 컨트롤러(200)는, PIM 장치(100)의 동작을 제어한다. 일 예에서 PIM 컨트롤러(200)는, PIM 장치(100)의 메모리 모드 동작을 제어하거나, 또는 MAC 모드 동작을 제어할 수 있다. PIM 컨트롤러(200)가 PIM 장치(100)를 메모리 모드로 동작되도록 제어하는 경우, PIM 장치(100)에서 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)에 대한 데이터 리드 동작 및 데이터 라이트 동작이 수행될 수 있다. PIM 컨트롤러(200)가 PIM 장치(100)를 MAC 모드로 동작되도록 제어하는 경우, PIM 장치(100)에서 MAC 오퍼레이터(120)에 의한 MAC 연산 동작이 수행될 수 있다. PIM 컨트롤러(200)가 PIM 장치(100)를 MAC 모드로 동작되도록 제어하는 경우, PIM 장치(100)에서 MAC 연산을 위해 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)에 데이터를 라이트하고 리드하는 동작이 수행될 수도 있다.The PIM controller 200 controls the operation of the PIM device 100 . In an example, the PIM controller 200 may control the memory mode operation of the PIM device 100 or may control the MAC mode operation. When the PIM controller 200 controls the PIM device 100 to operate in the memory mode, the PIM device 100 reads data and writes data to the first and second memory banks 111 and 112 . An action may be performed. When the PIM controller 200 controls the PIM device 100 to operate in the MAC mode, a MAC operation operation by the MAC operator 120 may be performed in the PIM device 100 . When the PIM controller 200 controls the PIM device 100 to operate in the MAC mode, the PIM device 100 writes data to the first memory bank 111 and the second memory bank 112 for MAC operation. and a lead operation may be performed.

PIM 컨트롤러(200)는, 커맨드 큐(210), 스케줄러(220), 메모리 커맨드 발생기(230), MAC 커맨드 발생기(240), 및 어드레스 발생기(250)를 포함하여 구성될 수 있다. 커맨드 큐(210)는, PIM 시스템(10)의 외부, 예컨대 호스트로부터 전송되는 커맨드(CMD)를 전송받아 저장한다. 커맨드 큐(210)는, 커맨드(CMD)를 저장할 때마다 커맨드(CMD)의 저장 상태에 관한 정보를 스케줄러(220)로 전송할 수 있다. 커맨드 큐(210)에 저장되는 커맨드(CMD)는, 스케줄러(220)에 의해 정해진 순서대로 메모리 커맨드 발생기(230) 또는 MAC 커맨드 발생기(240)로 전송된다. 커맨드 큐(210)로부터 출력되는 커맨드(CMD)가 PIM 장치(100)의 메모리 모드 동작을 요청하는 커맨드인 경우, 커맨드 큐(210)는 커맨드(CMD)를 메모리 커맨드 발생기(230)로 전송한다. 반면에 커맨드 큐(210)로부터 출력되는 커맨드(CMD)가 PIM 장치(100)의 MAC 모드 동작을 요청하는 커맨드인 경우, 커맨드 큐(210)는 커맨드(CMD)를 MAC 커맨드 발생기(240)로 전송한다. 커맨드(CMD)가 어떤 모드 동작을 요청하는지에 대한 정보는 스케줄러(220)로부터 제공될 수 있다.The PIM controller 200 may include a command queue 210 , a scheduler 220 , a memory command generator 230 , a MAC command generator 240 , and an address generator 250 . The command queue 210 receives and stores a command CMD transmitted from the outside of the PIM system 10 , for example, a host. The command queue 210 may transmit information about the storage state of the command CMD to the scheduler 220 whenever the command CMD is stored. The commands CMD stored in the command queue 210 are transmitted to the memory command generator 230 or the MAC command generator 240 in an order determined by the scheduler 220 . When the command CMD output from the command queue 210 is a command for requesting the memory mode operation of the PIM device 100 , the command queue 210 transmits the command CMD to the memory command generator 230 . On the other hand, when the command CMD output from the command queue 210 is a command for requesting the MAC mode operation of the PIM device 100 , the command queue 210 transmits the command CMD to the MAC command generator 240 . do. Information on which mode operation the command CMD requests may be provided from the scheduler 220 .

스케줄러(220)는, 커맨드 큐(210)에 저장되어 있는 커맨드(CMD)가 커맨드 큐(210)로부터 출력되는 타이밍을 조절한다. 이를 위해, 스케줄러(220)는, 커맨드 큐(210)로부터 전송되는 커맨드(CMD) 저장 상태에 관한 정보를 분석하여, 적절한 순서대로 커맨드(CMD)가 처리되도록 커맨드(CMD) 처리 순서를 재조정한다. 스케줄러(220)는, 커맨드 큐(210)로부터 출력되는 커맨드(CMD)가 PIM 장치(100)의 메모리 모드 동작을 요청하는 것인지, 아니면 MAC 모드 동작을 요청하는 것인지에 대한 정보를 커맨드 큐(210)에 전송할 수 있다. 이를 위해 스케줄러(220)는 모드 선택기(221)를 포함할 수 있다. 모드 선택기(221)는, 커맨드 큐(210)에 저장되어 있는 커맨드(CMD)가 PIM 장치(100)의 메모리 모드 동작을 요청하는 커맨드인지, 아니면 MAC 모드 동작을 요청하는 커맨드인지에 관한 모드 선택 신호를 커맨드 큐(210)에 전송할 수 있다.The scheduler 220 adjusts the timing at which the command CMD stored in the command queue 210 is output from the command queue 210 . To this end, the scheduler 220 analyzes information about the storage state of the command CMD transmitted from the command queue 210 , and readjusts the command CMD processing order so that the commands CMD are processed in an appropriate order. The scheduler 220 transmits information about whether the command CMD output from the command queue 210 requests the memory mode operation or the MAC mode operation of the PIM device 100 to the command queue 210 . can be transmitted To this end, the scheduler 220 may include a mode selector 221 . The mode selector 221 is a mode selection signal regarding whether the command CMD stored in the command queue 210 is a command for requesting a memory mode operation of the PIM device 100 or a command for requesting a MAC mode operation. may be transmitted to the command queue 210 .

메모리 커맨드 발생기(230)는, 커맨드 큐(210)로부터 PIM 장치(100)의 메모리 모드 동작을 요청하는 커맨드(CMD)를 전송받는다. 메모리 커맨드 발생기(230)는, 전송된 커맨드(CMD)를 디코딩하여 메모리 커맨드(M_CMD)를 생성하여 출력한다. 메모리 커맨드 발생기(230)로부터 출력되는 메모리 커맨드(M_CMD)는 PIM 장치(100)로 전송된다. 일 예에서 메모리 커맨드(M_CMD)는, 메모리 리드 커맨드 및 메모리 라이트 커맨드를 포함할 수 있다. 메모리 커맨드 발생기(230)로부터 메모리 리드 커맨드가 출력되는 경우, PIM 장치(100)는 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)에 대한 데이터 리드 동작을 수행한다. PIM 장치(100)에서 리드된 데이터는, 데이터 입출력 라인(132)을 통해 PIM 장치(100) 외부로 전송된다. PIM 장치(100)로부터 출력되는 리드 데이터는, PIM 컨트롤러(200)를 통해 호스트로 전송될 수 있다. 메모리 커맨드 발생기(230)로부터 메모리 라이트 커맨드가 출력되는 경우, PIM 장치(100)는 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)에 대한 데이터 라이트 동작을 수행한다. 이때 PIM 장치(100)에 라이트할 데이터는, 호스트로부터 PIM 컨트롤러(200)를 통해 PIM 장치(100)로 전송된다. PIM 장치(100)로 전송된 라이트 데이터는, 데이터 입출력 라인(132)을 통해 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)에 전송된다.The memory command generator 230 receives a command CMD for requesting the memory mode operation of the PIM device 100 from the command queue 210 . The memory command generator 230 decodes the transmitted command CMD to generate and output the memory command M_CMD. The memory command M_CMD output from the memory command generator 230 is transmitted to the PIM device 100 . In an example, the memory command M_CMD may include a memory read command and a memory write command. When a memory read command is output from the memory command generator 230 , the PIM device 100 performs a data read operation on the first memory bank 111 or the second memory bank 112 . Data read from the PIM device 100 is transmitted to the outside of the PIM device 100 through the data input/output line 132 . The read data output from the PIM device 100 may be transmitted to the host through the PIM controller 200 . When a memory write command is output from the memory command generator 230 , the PIM device 100 performs a data write operation on the first memory bank 111 or the second memory bank 112 . In this case, data to be written to the PIM device 100 is transmitted from the host to the PIM device 100 through the PIM controller 200 . The write data transmitted to the PIM device 100 is transmitted to the first memory bank 111 or the second memory bank 112 through the data input/output line 132 .

MAC 커맨드 발생기(240)는, 커맨드 큐(210)로부터 PIM 장치(100)의 MAC 모드 동작을 요청하는 커맨드(CMD)를 전송받는다. MAC 커맨드 발생기(240)는, 전송된 커맨드(CMD)를 디코딩하여 MAC 커맨드들(MAC_CMDs)를 생성하여 출력한다. MAC 커맨드 발생기(240)로부터 출력되는 MAC 커맨드들(MAC_CMDs)는 PIM 장치(100)로 전송된다. MAC 커맨드 발생기(240)로부터 전송되는 MAC 커맨드들(MAC_CMDs)에 의해, PIM 장치(100)의 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)에 대한 데이터 리드 동작과, MAC 오퍼레이터(120)의 MAC 연산 동작이 제어된다. MAC 커맨드들(MAC_CMDs) 및 그에 따른 PIM 장치(100)의 MAC 모드 동작에 대해서는 아래에서 도 2를 참조하여 보다 상세하게 설명하기로 한다. 어드레스 발생기(250)는, 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112) 중 하나의 뱅크를 선택하는 뱅크선택신호(BS)를 생성하여 PIM 장치(100)로 전송한다. 또한 어드레스 발생기(250)는, 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112)의 액세스할 영역을 지정하는 로우 어드레스(ADDR_R) 및 컬럼 어드레스(ADDR/C)를 생성하여 PIM 장치(100)로 전송한다.The MAC command generator 240 receives a command CMD for requesting the MAC mode operation of the PIM device 100 from the command queue 210 . The MAC command generator 240 decodes the transmitted command CMD to generate and output MAC commands MAC_CMDs. MAC commands MAC_CMDs output from the MAC command generator 240 are transmitted to the PIM device 100 . The data read operation for the first memory bank 111 and the second memory bank 112 of the PIM device 100 and the MAC operator 120 by the MAC commands MAC_CMDs transmitted from the MAC command generator 240 ) of the MAC operation is controlled. The MAC commands (MAC_CMDs) and the MAC mode operation of the PIM device 100 will be described in more detail with reference to FIG. The address generator 250 generates a bank selection signal BS for selecting one of the first memory bank 111 and the second memory bank 112 and transmits the generated bank selection signal BS to the PIM device 100 . In addition, the address generator 250 generates a row address ADDR_R and a column address ADDR/C designating regions to be accessed of the first memory bank 111 and the second memory bank 112 to generate the PIM device 100 . ) is sent to

도 2에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 PIM 컨트롤러(200)를 구성하는 MAC 커맨드 발생기(240)로부터 발생되는 MAC 커맨드들(MAC_CMDs)이 도시되어 있다. 도 2에 나타낸 바와 같이, MAC 커맨드들(MAC_CMDs)은, 제1 내지 제6 MAC 커맨드 신호를 포함할 수 있다. 일 예에서 제1 MAC 커맨드 신호는, 제1 MAC 리드 신호(MAC_RD_BK0)일 수 있다. 제2 MAC 커맨드 신호는, 제2 MAC 리드 신호(MAC_RD_BK1)일 수 있다. 제3 MAC 커맨드 신호는, 제1 MAC 입력 래치 신호(MAC_L1)일 수 있다. 제4 MAC 커맨드 신호는, 제2 MAC 입력 래치 신호(MAC_L2)일 수 있다. 제5 MAC 커맨드 신호는, MAC 출력 래치 신호(MAC_L3)일 수 있다. 그리고 제6 MAC 커맨드 신호는, MAC 래치 리셋 신호(MAC_L_RST)일 수 있다.FIG. 2 shows MAC commands MAC_CMDs generated from the MAC command generator 240 constituting the PIM controller 200 in the PIM system 10 according to the first embodiment of the present disclosure. As shown in FIG. 2 , the MAC commands MAC_CMDs may include first to sixth MAC command signals. In an example, the first MAC command signal may be a first MAC read signal MAC_RD_BK0. The second MAC command signal may be a second MAC read signal MAC_RD_BK1. The third MAC command signal may be the first MAC input latch signal MAC_L1. The fourth MAC command signal may be a second MAC input latch signal MAC_L2. The fifth MAC command signal may be a MAC output latch signal MAC_L3. In addition, the sixth MAC command signal may be a MAC latch reset signal MAC_L_RST.

제1 MAC 리드 신호(MAC_RD_BK0)는, 제1 메모리 뱅크(111)로부터 제1 데이터, 예컨대 웨이트 데이터를 리드하여 MAC 오퍼레이터(120)로 전송하는 동작을 제어한다. 제2 MAC 리드 신호(MAC_RD_BK1)는, 제2 메모리 뱅크(112)로부터 제2 데이터, 예컨대 벡터 데이터를 리드하여 MAC 오퍼레이터(120)로 전송하는 동작을 제어한다. 제1 MAC 입력 래치 신호(MAC_L1)는, 제1 메모리 뱅크(111)로부터 MAC 오퍼레이터(120)로 전송되는 웨이트 데이터에 대한 입력 래치 동작을 제어한다. 제2 MAC 입력 래치 신호(MAC_L2)는, 제2 메모리 뱅크(112)로부터 MAC 오퍼레이터(120)로 전송되는 벡터 데이터에 대한 입력 래치 동작을 제어한다. 웨이트 데이터 및 벡터 데이터에 대한 입력 래치 동작이 이루어지면, MAC 오퍼레이터(120)는 MAC 연산을 수행하고, 연산 결과인 MAC 결과 데이터를 생성한다. MAC 출력 래치 신호(MAC_L3)는, MAC 오퍼레이터(120) 내에서 생성되는 MAC 결과 데이터에 대한 출력 래치 동작을 제어한다. 그리고 MAC 래치 리셋 신호(MAC_L_RST)는, MAC 오퍼레이터(120) 내에서 생성되는 MAC 결과 데이터의 출력 동작과, MAC 오퍼레이터(120) 내에서의 출력 래치에 대한 리셋 동작을 제어한다.The first MAC read signal MAC_RD_BK0 controls an operation of reading first data, for example, weight data, from the first memory bank 111 and transmitting the read data to the MAC operator 120 . The second MAC read signal MAC_RD_BK1 controls an operation of reading second data, for example, vector data, from the second memory bank 112 and transmitting the read signal to the MAC operator 120 . The first MAC input latch signal MAC_L1 controls an input latch operation for weight data transmitted from the first memory bank 111 to the MAC operator 120 . The second MAC input latch signal MAC_L2 controls an input latch operation for vector data transmitted from the second memory bank 112 to the MAC operator 120 . When an input latch operation is performed on the weight data and the vector data, the MAC operator 120 performs a MAC operation and generates MAC result data as a result of the operation. The MAC output latch signal MAC_L3 controls an output latch operation for MAC result data generated in the MAC operator 120 . In addition, the MAC latch reset signal MAC_L_RST controls an output operation of the MAC result data generated in the MAC operator 120 and a reset operation of the output latch in the MAC operator 120 .

본 예에 따른 PIM 시스템(10)는, 확정적(deterministic) MAC 연산 동작을 수행하도록 구성된다. 본 개시에서 사용되는 용어 "확정적(deterministic) MAC 연산 동작"은, PIM 시스템(10) 내에서 수행되는 MAC 연산 동작이 사전에 정해져서 고정되어 있는 시간 동안 이루어지는 것으로 정의될 수 있다. 이에 따라 PIM 컨트롤러(200)로부터 PIM 장치(100)로 전송되는 MAC 커맨드들(MAC_CMDs) 각각은 정해진 시간 간격으로 순차적으로 생성된다. 따라서 PIM 컨트롤러(200)는, PIM 장치(100)로 MAC 연산 동작을 제어하는 MAC 커맨드들(MAC_CMDs) 각각의 생성을 위해, PIM 장치(100)로부터 별도의 동작 완료 신호를 PIM 컨트롤러(200)에 전송할 것을 요구하지 않는다. 일 예에서 확정적 MAC 연산 동작을 위해, PIM 장치(100) 내에서 MAC 커맨드들(MAC_CMDs) 각각에 의해 수행되는 MAC 연산 동작들 각각이 이루어지는 레이턴시(latency)가 고정적으로 설정될 수 있다. 그리고 PIM 컨트롤러(200)로부터 출력되는 MAC 커맨드들(MAC_CMDs) 각각은 설정된 레이턴시 간격으로 순차적으로 생성될 수 있다.The PIM system 10 according to the present example is configured to perform a deterministic MAC operation operation. The term "deterministic MAC operation operation" used in the present disclosure may be defined as that the MAC operation operation performed in the PIM system 10 is predetermined and performed during a fixed time. Accordingly, each of the MAC commands MAC_CMDs transmitted from the PIM controller 200 to the PIM device 100 is sequentially generated at predetermined time intervals. Therefore, the PIM controller 200 transmits a separate operation completion signal from the PIM device 100 to the PIM controller 200 to generate each of the MAC commands (MAC_CMDs) for controlling the MAC operation by the PIM device 100 . do not ask to send In an example, for the deterministic MAC operation, a latency for each of the MAC operation operations performed by each of the MAC commands MAC_CMDs in the PIM device 100 may be fixedly set. In addition, each of the MAC commands MAC_CMDs output from the PIM controller 200 may be sequentially generated at a set latency interval.

도 3에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 PIM 장치(100)를 구성하는 MAC 오퍼레이터(120)의 일 예가 도시되어 있다. 도 3을 참조하면, MAC 오퍼레이터(120)는, 데이터 입력부(121)와, MAC 회로(122)와, 그리고 데이터 출력부(123)를 포함하여 구성될 수 있다. 데이터 입력부(121)는, 제1 입력 래치(121-1) 및 제2 입력 래치(121-2)를 포함하여 구성될 수 있다. MAC 회로(122)는, 곱셈 로직(122-1) 및 가산 로직(122-2)을 포함하여 구성될 수 있다. 데이터 출력부(123)는, 출력 래치(123-1), 전달 게이트(123-2), 지연회로(123-3), 및 인버터(123-4)를 포함하여 구성될 수 있다. 일 예에서 제1 입력 래치(121-1), 제2 입력 래치(121-2), 및 출력 래치(123-1)는 플립 플랍으로 구성될 수 있다.3 shows an example of the MAC operator 120 configuring the PIM device 100 in the PIM system 10 according to the first embodiment of the present disclosure. Referring to FIG. 3 , the MAC operator 120 may include a data input unit 121 , a MAC circuit 122 , and a data output unit 123 . The data input unit 121 may include a first input latch 121-1 and a second input latch 121-2. The MAC circuit 122 may include a multiplication logic 122-1 and an addition logic 122-2. The data output unit 123 may include an output latch 123-1, a transfer gate 123-2, a delay circuit 123-3, and an inverter 123-4. In an example, the first input latch 121-1, the second input latch 121-2, and the output latch 123-1 may be configured as flip-flops.

MAC 오퍼레이터(120)의 데이터 입력부(121)는, 데이터 전송 라인을 통해 제1 메모리 뱅크(111)로부터 전송되는 제1 데이터(DA1)를 제1 MAC 입력 래치 신호(MAC_L1)에 동기시켜 MAC 회로(122)에 입력시킨다. 또한 데이터 입력부(121)는, 데이터 전송 라인을 통해 제2 메모리 뱅크(112)로부터 전송되는 제2 데이터(DA2)를 제2 MAC 입력 래치 신호(MAC_L1)에 동기시켜 MAC 회로(122)에 입력시킨다. PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)로부터 제1 MAC 입력 래치 신호(MAC_L1) 및 제2 MAC 입력 래치 신호(MAC_L2)가 일정한 시간 간격을 두고 순차적으로 PIM 장치(100)의 MAC 오퍼레이터(120)로 입력되므로, MAC 오퍼레이터(120) 내에서 제1 데이터(DA1)가 MAC 회로(122)로 먼저 입력되고, 이어서 제2 데이터(DA2)가 MAC 회로(122)로 입력된다.The data input unit 121 of the MAC operator 120 synchronizes the first data DA1 transmitted from the first memory bank 111 through the data transmission line with the first MAC input latch signal MAC_L1 to the MAC circuit ( 122) is entered. In addition, the data input unit 121 synchronizes the second data DA2 transmitted from the second memory bank 112 through the data transmission line to the second MAC input latch signal MAC_L1 to be input to the MAC circuit 122 . . The MAC operator 120 of the PIM device 100 sequentially receives the first MAC input latch signal MAC_L1 and the second MAC input latch signal MAC_L2 from the MAC command generator 240 of the PIM controller 200 at regular time intervals. ), the first data DA1 is first input to the MAC circuit 122 in the MAC operator 120 , and then the second data DA2 is input to the MAC circuit 122 .

MAC 회로(122)는, 데이터 입력부(121)를 통해 입력되는 제1 데이터(DA1) 및 제2 데이터(DA2)에 대한 MAC 연산을 수행한다. MAC 회로(122)의 곱셈 로직(122-1)은, 복수의 곱셈기들(122-11)을 포함할 수 있다. 곱셈기들(122-11) 각각은 제1 입력 래치(121-1) 및 제2 입력 래치(121-2)를 통해 각각 입력되는 제1 데이터(DA1) 및 제2 데이터(DA2)에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 출력시킨다. 제1 데이터(DA1)를 구성하는 비트값들은, 곱셈기들(122-11) 각각에 나누어져서 입력된다. 마찬가지로 제2 데이터(DA2)를 구성하는 비트값들 또한, 곱셈기들(122-11) 각각에 나누어져서 입력된다. 예컨대 제1 데이터(DA1) 및 제2 데이터(DA2)가 각각 N비트의 바이너리 스트림으로 구성되는 경우, M개의 곱셈기들(122-11) 각각에는 (N/M)비트의 제1 데이터(DA1) 및 제2 데이터(DA2)가 입력될 수 있다.The MAC circuit 122 performs a MAC operation on the first data DA1 and the second data DA2 input through the data input unit 121 . The multiplication logic 122-1 of the MAC circuit 122 may include a plurality of multipliers 122-11. Each of the multipliers 122-11 performs multiplication operations on the first data DA1 and the second data DA2 inputted through the first input latch 121-1 and the second input latch 121-2, respectively. , and output the resulting data. Bit values constituting the first data DA1 are divided and input to each of the multipliers 122 - 11 . Similarly, bit values constituting the second data DA2 are also divided and input to each of the multipliers 122 - 11 . For example, when each of the first data DA1 and the second data DA2 is configured as an N-bit binary stream, each of the M multipliers 122-11 includes (N/M)-bit first data DA1. and second data DA2 may be input.

MAC 회로(122)의 가산 로직(122-2)은 복수의 가산기들(122-21)을 포함할 수 있다. 도면에 나타내지는 않았지만, 복수의 가산기들(122-21)은, 복수의 스테이지들(stages)을 갖는 트리(tree) 구조로 배치될 수 있다. 첫번째 스테이지의 가산기들(122-21) 각각은, 곱셈 로직(122-1)의 곱셈기들(122-11) 중 2개의 곱셈기들(122-11)로부터 곱셈 결과 데이터를 입력받고, 가산 연산을 수행한 후 그 결과 데이터를 출력시킨다. 두번째 스테이지의 가산기들(122-21) 각각은, 첫번째 스테이지의 가산기들(122-21) 중 2개의 가산기들(122-21)로부터 가산 결과 데이터를 입력받고, 가산 연산을 수행한 후 그 결과 데이터를 출력시킨다. 마지막 스테이지의 가산기(122-21)는, 이전 스테이지의 2개의 가산기들(122-21)로부터 가산 결과 데이터를 입력받고, 가산 연산을 수행한 후 그 결과 데이터를 출력시킨다. 도면에 나타내지는 않았지만, 가산 로직(122-2)은, 마지막 스테이지의 가산기(122-21)로부터 출력되는 MAC 결과 데이터(DA_MAC)와, 데이터 출력부(123)의 출력 래치(123-1)에 저장되어 있던 이전의 MAC 결과 데이터(DA_MAC)를 누적 가산하기 위한 가산기를 더 포함할 수 있다.The addition logic 122 - 2 of the MAC circuit 122 may include a plurality of adders 122 - 21 . Although not shown in the drawing, the plurality of adders 122-21 may be arranged in a tree structure having a plurality of stages. Each of the adders 122-21 of the first stage receives multiplication result data from two multipliers 122-11 among the multipliers 122-11 of the multiplication logic 122-1, and performs an addition operation. After that, the result data is output. Each of the adders 122-21 of the second stage receives addition result data from two adders 122-21 among the adders 122-21 of the first stage, performs an addition operation, and then performs the result data outputs The adder 122-21 of the last stage receives addition result data from the two adders 122-21 of the previous stage, performs an addition operation, and outputs the result data. Although not shown in the figure, the addition logic 122-2 is applied to the MAC result data DA_MAC output from the last stage adder 122-21 and the output latch 123-1 of the data output unit 123. It may further include an adder for cumulatively adding the previously stored MAC result data DA_MAC.

데이터 출력부(123)는, MAC 회로(122)로부터 출력되는 MAC 결과 데이터(DA_MAC)를 데이터 전송 라인으로 출력시킨다. 구체적으로 데이터 출력부(123)의 출력 래치(123-1)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 MAC 회로(122)로부터 출력되는 MAC 결과 데이터(DA_MAC)를 래치하여 출력시킨다. 출력 래치(123-1)로부터 출력되는 MAC 결과 데이터(DA_MAC)는, 누적 가산 연산을 위해 MAC 회로(122)로 피드백 될 수 있다. 또한 MAC 결과 데이터(DA_MAC)는 데이터 전송 라인으로의 출력을 위해 전달 게이트(123-2)에 입력될 수 있다. 출력 래치(123-1)는, 래치 리셋 신호(LATCH_RST)가 입력되면 초기화되며, 이에 따라 출력 래치(123-1)에 래치되어 있던 모든 데이터가 제거된다. 일 예에서 래치 리셋 신호(LATCH_RST)는, MAC 래치 리셋 신호(MAC_L_RST)의 발생에 의해 활성화되어 출력 래치(123-1)에 입력될 수 있다.The data output unit 123 outputs the MAC result data DA_MAC output from the MAC circuit 122 to the data transmission line. Specifically, the output latch 123 - 1 of the data output unit 123 latches and outputs the MAC result data DA_MAC output from the MAC circuit 122 in synchronization with the MAC output latch signal MAC_L3 . The MAC result data DA_MAC output from the output latch 123 - 1 may be fed back to the MAC circuit 122 for a cumulative addition operation. Also, the MAC result data DA_MAC may be input to the transfer gate 123 - 2 for output to the data transmission line. The output latch 123-1 is initialized when the latch reset signal LATCH_RST is input, and thus all data latched in the output latch 123-1 is removed. In an example, the latch reset signal LATCH_RST may be activated by the generation of the MAC latch reset signal MAC_L_RST to be input to the output latch 123 - 1 .

PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)으로부터 MAC 오퍼레이터(120)의 데이터 출력부(123)로 전송되는 MAC 래치 리셋 신호(MAC_L_RST)는, 데이터 출력부(123)의 전달 게이트(123-2), 지연회로(123-3), 및 인버터(123-4)에 입력된다. 인버터(123-4)는, MAC 래치 리셋 신호(MAC_L_RST)의 로직레벨을 반전버퍼링하여 전달 게이트(123-2)에 입력시킨다. 전달 게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 응답하여 출력 래치(123-1)로부터 전송되는 MAC 결과 데이터(DA_MAC)를 데이터 전송 라인으로 출력시킨다. 지연회로(123-3)는, 입력되는 MAC 래치 리셋 신호(MAC_L_RST)를 일정 시점 지연시킨 후에 래치제어신호(PINSTB)로서 출력시킨다.The MAC latch reset signal MAC_L_RST transmitted from the MAC command generator 240 of the PIM controller 200 to the data output unit 123 of the MAC operator 120 is a transfer gate 123 - 2 of the data output unit 123 . ), the delay circuit 123-3, and the inverter 123-4. The inverter 123-4 inverts the logic level of the MAC latch reset signal MAC_L_RST to input the inverted buffer to the transfer gate 123-2. The transfer gate 123-2 outputs the MAC result data DA_MAC transmitted from the output latch 123-1 to the data transmission line in response to the MAC latch reset signal MAC_L_RST. The delay circuit 123-3 delays the input MAC latch reset signal MAC_L_RST by a predetermined time point and then outputs it as the latch control signal PINSTB.

도 4에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 수행되는 MAC 연산의 일 예가 나타나 있다. 도 4에 나타낸 바와 같이, PIM 시스템(10)에 의해 수행되는 MAC 연산은 매트릭스 연산을 통해 이루어진다. 구체적으로, PIM 장치(100)는, PIM 컨트롤러(200)의 제어에 의해 M행 및 N열(MXN)(M, N은 자연수), 예컨대 8행 및 8열(8X8)의 웨이트 매트릭스(WEIGHT MATRIX)와 N행 및 1열(NX1), 예컨대 8행 및 1열(8X1)의 벡터 매트릭스(VECTOR MATRIX)에 대한 매트릭스 곱셈 연산을 수행한다. 웨이트 매트릭스를 구성하는 원소들(W0.1, …, W7.7)은, 제1 메모리 뱅크(111)로부터 MAC 오퍼레이터(120)로 입력되는 제1 데이터(DA1)에 해당한다. 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)은, 제2 메모리 뱅크(112)로부터 MAC 오퍼레이터(120)로 입력되는 제2 데이터(DA2)에 해당한다. 웨이트 매트릭스를 구성하는 원소들(W0.1, …, W7.7) 각각과, 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0) 각각은, 복수의 비트값들을 갖는 바이너리 스트림(binary stream)으로 구성될 수 있다. 웨이트 매트릭스를 구성하는 원소들(W0.1, …, W7.7) 각각의 비트 수는, 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0) 각각의 비트 수와 동일하다.4 shows an example of a MAC operation performed in the PIM system 10 according to the first embodiment of the present disclosure. As shown in FIG. 4 , the MAC operation performed by the PIM system 10 is performed through a matrix operation. Specifically, the PIM device 100, under the control of the PIM controller 200, M rows and N columns (MXN) (M and N are natural numbers), for example, a weight matrix of 8 rows and 8 columns (8X8) (WEIGHT MATRIX) ) and a vector matrix (VECTOR MATRIX) of N rows and 1 column (NX1), for example, 8 rows and 1 column (8X1). The elements W0.1, ..., and W7.7 constituting the weight matrix correspond to the first data DA1 input from the first memory bank 111 to the MAC operator 120 . The elements X0.0, ..., X7.0 constituting the vector matrix correspond to the second data DA2 input from the second memory bank 112 to the MAC operator 120 . Each of the elements (W0.1, ..., W7.7) constituting the weight matrix and each of the elements (X0.0, ..., X7.0) constituting the vector matrix are binary streams having a plurality of bit values. (binary stream) can be composed. The number of bits of each of the elements (W0.1, ..., W7.7) constituting the weight matrix is the same as the number of bits of each of the elements (X0.0, ..., X7.0) constituting the vector matrix.

이와 같은 웨이트 매트릭스 및 벡터 매트릭스의 곱셈 연산은, 다층 퍼셉트론(Multi-Layer Perceptron; 이하 MLP) 방식의 신경망 구조에 부합될 수 있다. 일반적으로 딥 러닝을 수행하기 위한 MLP 방식의 신경망은, 입력층(input layer), 복수, 예컨대 적어도 3개 이상의 은닉층들(hidden layers), 및 출력층(output layer)을 포함한다. 도 4에 나타낸 웨이트 매트릭스와 벡터 매트릭스의 곱셈 연산, 즉 MAC 연산은, 은닉층들 중 하나의 은닉층에서의 연산에 해당한다. 첫번째 은닉층의 경우, 입력되는 벡터 데이터를 사용하여 MAC 연산을 수행한다. 그러나 두번째 은닉층부터 마지막 은닉층에 이르기까지 은닉층에서의 MAC 연산은 그 이전의 은닉층에서의 연산 결과를 벡터 데이터로 사용하여 수행한다.Such a multiplication operation of a weight matrix and a vector matrix may conform to the structure of a multi-layer perceptron (MLP) neural network. In general, an MLP neural network for performing deep learning includes an input layer, a plurality of, for example, at least three or more hidden layers, and an output layer. The multiplication operation of the weight matrix and the vector matrix shown in FIG. 4 , that is, the MAC operation corresponds to an operation in one of the hidden layers. For the first hidden layer, MAC operation is performed using input vector data. However, MAC operation in the hidden layer from the second hidden layer to the last hidden layer is performed using the operation result of the previous hidden layer as vector data.

도 5에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 도 4를 참조하여 설명한 MAC 연산 과정을 수행하는 과정을 나타내는 플로챠트가 도시되어 있다. 그리고 도 6 내지 도 12에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 도 4의 MAC 연산을 수행하는 과정들을 설명하기 위한 블록도들이 도시되어 있다. 도 6 내지 도 12와 함께 도 5를 참조하면, MAC 연산을 수행하기 전에, 단계 301에서, 제1 데이터, 즉 웨이트 데이터를 제1 메모리 뱅크(111)에 라이트(write)한다. 이에 따라 PIM 장치(100)의 제1 메모리 뱅크(111)에는 웨이트 데이터가 저장된다. 본 예에서는 웨이트 데이터가 도 4의 웨이트 매트릭스를 구성하는 원소들(W0.0, …, W7.7)인 것으로 전제한다.FIG. 5 is a flowchart illustrating a process of performing the MAC operation process described with reference to FIG. 4 in the PIM system 10 according to the first embodiment of the present disclosure. 6 to 12 are block diagrams for explaining processes of performing the MAC operation of FIG. 4 in the PIM system 10 according to the first embodiment of the present disclosure. Referring to FIG. 5 together with FIGS. 6 to 12 , before performing the MAC operation, first data, that is, weight data, is written to the first memory bank 111 in step 301 . Accordingly, weight data is stored in the first memory bank 111 of the PIM device 100 . In this example, it is assumed that the weight data are elements (W0.0, ..., W7.7) constituting the weight matrix of FIG. 4 .

단계 302에서, 인퍼런스(inference) 요청이 있는지를 판단한다. 인퍼런스 요청은, PIM 시스템(10)의 외부에서 PIM 컨트롤러(200)로 전송될 수 있다. 일 예에서 인퍼런스 요청이 없는 경우, PIM 시스템(10)은 인퍼런스 요청이 전송될 때까지 대기 상태를 유지할 수 있다. 다른 예에서, 인퍼런스 요청이 없는 경우, PIM 시스템(10)은 인퍼런스 요청이 전송될 때까지 MAC 연산 동작 외의 다른 동작, 예컨대 데이터 리드/라이트와 같은 메모리 모드의 동작을 수행할 수도 있다. 본 예에서 인퍼런스 요청과 함께 제2 데이터, 즉 벡터 데이터가 함께 전송되는 것을 전제한다. 또한 본 예에서 벡터 데이터는 도 4의 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)인 것으로 전제한다. 단계 302에서 인퍼런스 요청이 전송되는 경우, 단계 303에서 PIM 컨트롤러(200)는, 인퍼런스 요청과 함께 전송되는 벡터 데이터를 제2 메모리 뱅크(112)에 라이트한다. 이에 따라 PIM 장치(100)의 제2 메모리 뱅크(112)에는 벡터 데이터가 저장된다.In step 302, it is determined whether there is an inference request. The inference request may be transmitted from the outside of the PIM system 10 to the PIM controller 200 . In one example, if there is no inference request, the PIM system 10 may maintain a standby state until the inference request is transmitted. In another example, if there is no inference request, the PIM system 10 may perform an operation other than the MAC operation operation, for example, a memory mode operation such as data read/write, until the inference request is transmitted. . In this example, it is assumed that the second data, ie, vector data, is transmitted together with the inference request. Also, in this example, it is assumed that the vector data are elements (X0.0, ..., X7.0) constituting the vector matrix of FIG. 4 . When the inference request is transmitted in step 302 , in step 303 , the PIM controller 200 writes the vector data transmitted along with the inference request to the second memory bank 112 . Accordingly, vector data is stored in the second memory bank 112 of the PIM device 100 .

단계 304에서, 도 6에 나타낸 바와 같이, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제1 MAC 리드 신호(MAC_RD_BK0)를 생성하여 PIM 장치(100)로 전송한다. 이때 PIM 컨트롤러(200)의 어드레스 발생기(250)는 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(100)로 전송한다. 뱅크선택신호(BS)는, 제1 메모리 뱅크(111) 및 제2 메모리 뱅크(112) 중에서 제1 메모리 뱅크(111)를 지정한다. 이에 따라 제1 MAC 리드 신호(MAC_RD_BK0)는 PIM 장치(100)의 제1 메모리 뱅크(111)에 대한 데이터 리드 동작을 제어한다. 제1 메모리 뱅크(111)는, 제1 MAC 리드 신호(MAC_RD_BK0)에 응답하여, 로우/컬럼 어드레스(ADDR_R/ADDR_C)에 의해 지정된 영역에 저장되어 있는 웨이트 데이터 중 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)을 MAC 오퍼레이터(120)에 전송한다. 일 예에서 제1 메모리 뱅크(111)로부터 MAC 오퍼레이터(120)로의 데이터 전송은, PIM 장치(100) 내에서의 데이터 전송 경로를 제공하는 글로벌 입출력(Global Input/Output; 이하 GIO) 라인을 통해 이루어질 수 있다. 다른 예에서 제1 메모리 뱅크(111)로부터 MAC 오퍼레이터(120)로의 데이터 전송은, 제1 메모리 뱅크(111)와 MAC 오퍼레이터(120) 사이의 데이터 전송만을 위한 제1 뱅크 입출력(Bank Input/Output; 이하 BIO) 라인을 통해 이루어질 수 있다.In step 304 , as shown in FIG. 6 , the MAC command generator 240 of the PIM controller 200 generates a first MAC read signal MAC_RD_BK0 and transmits it to the PIM device 100 . At this time, the address generator 250 of the PIM controller 200 generates a bank selection signal BS and row/column addresses ADDR_R/ADDR_C and transmits them to the PIM device 100 . The bank selection signal BS designates the first memory bank 111 among the first memory bank 111 and the second memory bank 112 . Accordingly, the first MAC read signal MAC_RD_BK0 controls a data read operation for the first memory bank 111 of the PIM device 100 . The first memory bank 111, in response to the first MAC read signal MAC_RD_BK0, is an element in the first row of the weight matrix among the weight data stored in the area designated by the row/column addresses ADDR_R/ADDR_C The values W0.0, ..., W0.7 are transmitted to the MAC operator 120 . In one example, data transmission from the first memory bank 111 to the MAC operator 120 is performed through a global input/output (GIO) line that provides a data transmission path within the PIM device 100 . can In another example, data transmission from the first memory bank 111 to the MAC operator 120 includes a first bank input/output (Bank Input/Output) for only data transmission between the first memory bank 111 and the MAC operator 120 ; Hereinafter, BIO) line may be used.

단계 305에서, 도 7에 나타낸 바와 같이, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제2 MAC 리드 신호(MAC_RD_BK1)를 생성하여 PIM 장치(100)로 전송한다. 이때 PIM 컨트롤러(200)의 어드레스 발생기(250)는, 제2 메모리 뱅크(112)를 지정하는 뱅크선택신호(BS)와, 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(100)로 전송한다. 제2 MAC 리드 신호(MAC_RD_BK1)는 PIM 장치(100)의 제2 메모리 뱅크(112)에 대한 데이터 리드 동작을 제어한다. 제2 메모리 뱅크(112)는, 제2 MAC 리드 신호(MAC_RD_BK10)에 응답하여, 로우/컬럼 어드레스(ADDR_R/ADDR_C)에 의해 지정된 영역에 저장되어 있는 벡터 데이터, 즉 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0)을 MAC 오퍼레이터(120)에 전송한다. 일 예에서 제2 메모리 뱅크(112)로부터 MAC 오퍼레이터(120)로의 데이터 전송은, PIM 장치(100) 내에서의 GIO 라인을 통해 이루어질 수 있다. 다른 예에서 제2 메모리 뱅크(112)로부터 MAC 오퍼레이터(120)로의 데이터 전송은, 제2 메모리 뱅크(112)와 MAC 오퍼레이터(120) 사이의 데이터 전송만을 위한 제2 BIO 라인을 통해 이루어질 수 있다. In step 305 , as shown in FIG. 7 , the MAC command generator 240 of the PIM controller 200 generates a second MAC read signal MAC_RD_BK1 and transmits it to the PIM device 100 . At this time, the address generator 250 of the PIM controller 200 generates a bank selection signal BS designating the second memory bank 112 and row/column addresses ADDR_R/ADDR_C to the PIM device 100 . send. The second MAC read signal MAC_RD_BK1 controls a data read operation for the second memory bank 112 of the PIM device 100 . In response to the second MAC read signal MAC_RD_BK10, the second memory bank 112 stores vector data stored in the area designated by the row/column addresses ADDR_R/ADDR_C, that is, the element in the first column of the vector matrix. (X0.0, ..., X7.0) is transmitted to the MAC operator (120). In one example, data transmission from the second memory bank 112 to the MAC operator 120 may be performed through a GIO line in the PIM device 100 . In another example, data transfer from the second memory bank 112 to the MAC operator 120 may be performed through a second BIO line for only data transfer between the second memory bank 112 and the MAC operator 120 .

단계 306에서, 도 8에 나타낸 바와 같이, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제1 MAC 입력 래치 신호(MAC_L1)를 생성하여 PIM 장치(100)로 전송한다. 제1 MAC 입력 래치 신호(MAC_L1)는 PIM 장치(100)의 MAC 오퍼레이터(120)에 대한 제1 데이터의 입력 래치 동작을 제어한다. 이 입력 래치 동작에 의해, 도 10에 나타낸 바와 같이, MAC 오퍼레이터(120)의 MAC 회로(122)로 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)이 입력된다. MAC 회로(122)는, 웨이트 매트릭스의 열 수와 동일한 개수, 즉 8개의 곱셈기들(122-11)을 포함한다. 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7) 각각은 곱셈기들(122-11) 각각에 입력된다.In step 306 , as shown in FIG. 8 , the MAC command generator 240 of the PIM controller 200 generates a first MAC input latch signal MAC_L1 and transmits it to the PIM device 100 . The first MAC input latch signal MAC_L1 controls an input latch operation of the first data to the MAC operator 120 of the PIM device 100 . By this input latch operation, the elements W0.0, ..., W0.7 in the first row of the weight matrix are input to the MAC circuit 122 of the MAC operator 120 as shown in FIG. 10 . . The MAC circuit 122 includes a number equal to the number of columns of the weight matrix, ie, eight multipliers 122-11. Each of the elements W0.0, ..., W0.7 in the first row of the weight matrix is input to each of the multipliers 122-11.

단계 307에서, 도 9에 나타낸 바와 같이, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제2 MAC 입력 래치 신호(MAC_L2)를 생성하여 PIM 장치(100)로 전송한다. 제2 MAC 입력 래치 신호(MAC_L2)는 PIM 장치(100)의 MAC 오퍼레이터(120)에 대한 제2 데이터의 입력 래치 동작을 제어한다. 이 입력 래치 동작에 의해, 도 10에 나타낸 바와 같이, MAC 오퍼레이터(120)의 MAC 회로(122)로 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0)이 입력된다. 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0) 각각은 곱셈기들(122-11) 각각에 입력된다.In step 307 , as shown in FIG. 9 , the MAC command generator 240 of the PIM controller 200 generates a second MAC input latch signal MAC_L2 and transmits it to the PIM device 100 . The second MAC input latch signal MAC_L2 controls an input latch operation of the second data to the MAC operator 120 of the PIM device 100 . By this input latch operation, the elements X0.0, ..., X7.0 in the first column of the vector matrix are input to the MAC circuit 122 of the MAC operator 120 as shown in FIG. 10 . Each of the elements X0.0, ..., X7.0 in the first column of the vector matrix is input to each of the multipliers 122-11.

단계 308에서, MAC 오퍼레이터(120)의 MAC 회로(122)는, 입력되는 웨이트 매트릭스의 제R행 및 벡터 매트릭스의 제1열에 대한 MAC 연산을 수행한다. 초기값으로 R=1이 설정되며, 이에 따라 웨이트 매트릭스의 제1행 및 벡터 매트릭스의 제1열에 대한 MAC 연산이 수행된다. 구체적으로 곱셈 로직(122-1)의 곱셈기들(122-11) 각각은, 입력되는 데이터에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 가산 로직(122-2)에 입력시킨다. 가산 로직(122-2)은, 1단 스테이지에 배치되는 4개의 가산기들(122-21A)과, 2단 스테이지에 배치되는 2개의 가산기들(122-21B)과, 그리고 3단 스테이지에 배치되는 가산기(122-21C)를 포함한다.In step 308, the MAC circuit 122 of the MAC operator 120 performs a MAC operation on the R-th row of the input weight matrix and the first column of the vector matrix. R=1 is set as an initial value, and MAC operation is performed on the first row of the weight matrix and the first column of the vector matrix. Specifically, each of the multipliers 122-11 of the multiplication logic 122-1 performs a multiplication operation on input data, and inputs the result data to the addition logic 122-2. The addition logic 122-2 includes four adders 122-21A disposed in the first stage, two adders 122-21B disposed in the second stage, and the third stage. Adders 122-21C are included.

1단 스테이지의 가산기들(122-21A) 각각은, 곱셈기들(122-11) 중 2개의 곱셈기들(122-11)로부터 출력 데이터를 입력받아 가산하여 출력시킨다. 2단 스테이지의 가산기들(122-21B) 각각은, 1단 스테이지의 가산기들(122-21A) 중 2개의 가산기들(122-21A)의 출력 데이터를 입력받아 가산하여 출력시킨다. 3단 스테이지의 가산기(122-21C)는, 2단 스테이지의 가산기들(122-21B)의 출력 데이터를 입력받아 가산하여 출력시킨다. 가산 로직(122-2)로부터 출력되는 출력 데이터는, 웨이트 매트릭스의 제1행과 벡터 매트릭스와의 MAC 연산 결과 데이터이다. 이에 따라 출력 데이터는, 도 4에 나타낸 MAC 결과 데이터들로 원소들(MAC0.0, …, MAC7.0)이 구성되는 8행 및 1열의 MAC 결과 매트릭스의 제1행 및 제1열의 원소(MAC0.0)를 구성한다. 가산 로직(122-2)으로부터 출력되는 출력 데이터(MAC0.0)는, 도 3을 참조하여 설명한 바와 같이, MAC 오퍼레이터(120)의 데이터 출력부(123) 내에 배치되는 출력 래치(123-1)로 입력된다.Each of the adders 122-21A of the first stage receives output data from two multipliers 122-11 among the multipliers 122-11, adds them, and outputs the received data. Each of the adders 122-21B of the second stage receives, adds, and outputs the output data of the two adders 122-21A among the adders 122-21A of the first stage. The adder 122-21C of the third stage receives, adds, and outputs the output data of the adders 122-21B of the second stage. The output data output from the addition logic 122-2 is MAC operation result data of the first row of the weight matrix and the vector matrix. Accordingly, the output data is the element (MAC0) in the first row and first column of the MAC result matrix of 8 rows and 1 column in which the elements MAC0.0, ..., MAC7.0 are composed of the MAC result data shown in FIG. .0) is configured. The output data MAC0.0 output from the addition logic 122-2 is an output latch 123-1 disposed in the data output unit 123 of the MAC operator 120, as described with reference to FIG. 3 . is entered as

단계 309에서, 도 11에 나타낸 바와 같이, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, MAC 출력 래치 신호(MAC_L3)를 생성하여 PIM 장치(100)로 전송한다. MAC 출력 래치 신호(MAC_L3)는 PIM 장치(100)의 MAC 오퍼레이터(120)에서의 MAC 결과 데이터(MAC0.0)의 출력 래치 동작을 제어한다. 이 출력 래치 동작에 의해, 도 3을 참조하여 설명한 바와 같이, MAC 오퍼레이터(120)의 MAC 회로(122)로부터 입력되는 MAC 결과 데이터(MAC0.0)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력된다. 출력 래치(123-1)로부터 출력되는 MAC 결과 데이터(MAC0.0)는 데이터 출력부(123)의 전달게이트(123-2)로 입력된다.In step 309 , as shown in FIG. 11 , the MAC command generator 240 of the PIM controller 200 generates a MAC output latch signal MAC_L3 and transmits it to the PIM device 100 . The MAC output latch signal MAC_L3 controls an output latch operation of the MAC result data MAC0.0 in the MAC operator 120 of the PIM device 100 . By this output latch operation, as described with reference to FIG. 3 , the MAC result data MAC0.0 input from the MAC circuit 122 of the MAC operator 120 is synchronized with the MAC output latch signal MAC_L3. output from the output latch 123-1. The MAC result data MAC0.0 output from the output latch 123-1 is input to the transfer gate 123-2 of the data output unit 123.

단계 310에서, 도 12에 나타낸 바와 같이, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, MAC 래치 리셋 신호(MAC_L_RST)를 생성하여 PIM 장치(100)로 전송한다. MAC 래치 리셋 신호(MAC_L_RST)는 PIM 장치(100)의 MAC 오퍼레이터(120)에서의 MAC 결과 데이터(MAC0.0)의 출력 동작과 출력 래치의 리셋 동작을 제어한다. 도 3을 참조하여 설명한 바와 같이, MAC 오퍼레이터(120)의 데이터 출력부(123)의 출력 래치(123-1)로부터 MAC 결과 데이터(MAC0.0)를 입력받은 전달게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 동기되어 MAC 결과 데이터(MAC0.0)를 출력시킨다. 일 예에서 MAC 오퍼레이터(120)로부터 출력되는 MAC 결과 데이터(MAC0.0)는, PIM 장치(100) 내에서 제1 BIO 라인 또는 제2 BIO 라인을 통해 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)에 저장될 수 있다.In step 310 , as shown in FIG. 12 , the MAC command generator 240 of the PIM controller 200 generates a MAC latch reset signal MAC_L_RST and transmits it to the PIM device 100 . The MAC latch reset signal MAC_L_RST controls the output operation of the MAC result data MAC0.0 and the reset operation of the output latch by the MAC operator 120 of the PIM device 100 . As described with reference to FIG. 3 , the transfer gate 123-2 receiving the MAC result data MAC0.0 from the output latch 123-1 of the data output unit 123 of the MAC operator 120, The MAC result data MAC0.0 is output in synchronization with the MAC latch reset signal MAC_L_RST. In one example, the MAC result data MAC0.0 output from the MAC operator 120 is the first memory bank 111 or the second memory through the first BIO line or the second BIO line in the PIM device 100 . It may be stored in the bank 112 .

단계 311에서, MAC 연산이 수행된 웨이트 매트릭스의 행 수인 "R"을 하나 증가시킨다. 지금까지 웨이트 매트릭스의 제1행 내지 제8행 중 제1행에 대한 MAC 연산이 수행됨에 따라, 단계 311에서 웨이트 매트릭스의 행 수는 제1행에서 제2행으로 변경된다. 단계 312에서는 단계 311에 의해 변경된 웨이트 매트릭스의 행 수가 웨이트 매트릭스의 마지막 행, 즉 제8행보다 큰지의 여부를 판단한다. 단계 311에 의해 변경된 웨이트 매트릭스의 행 수가 제2행이므로, 단계 312에서의 판단은 단계 311에 의해 변경된 웨이트 매트릭스의 행 수가 제8행보다 작은 것으로 판단하여, 단계 304의 과정을 다시 수행한다.In step 311, "R" which is the number of rows of the weight matrix on which the MAC operation is performed is increased by one. As the MAC operation is performed on the first row among the first to eighth rows of the weight matrix so far, the number of rows of the weight matrix is changed from the first row to the second row in step 311 . In step 312, it is determined whether the number of rows of the weight matrix changed by step 311 is greater than the last row, that is, the eighth row of the weight matrix. Since the number of rows of the weight matrix changed by step 311 is the second row, the determination in step 312 determines that the number of rows of the weight matrix changed by step 311 is smaller than the eighth row, and the process of step 304 is performed again.

단계 312로부터 피드백되면, MAC 연산이 이루어지는 웨이트 매트릭스의 행 수가 다른 점을 제외하고는 위에서 설명한 바와 동일한 단계 304 내지 단계 310의 과정이 수행된다. 즉 단계 311에서 웨이트 매트릭스의 행 수가 제2행으로 증가됨에 따라, 웨이트 매트릭스의 제1행 대신 제2행과 벡터 매트릭스의 MAC 연산이 이루어진다는 점에서만 차이가 있다. 단계 312에서 피드백되어 단계 304 내지 단계 311를 수행하는 과정은, 웨이트 매트릭스의 모든 행 수, 즉 제1행 내지 제8행과 벡터 매트릭스의 MAC 연산이 종료될 때까지 이루어진다. 웨이트 매트릭스의 제8행에 대한 MAC 연산이 종료되어, 단계 311에서 웨이트 매트릭스의 행 수가 제8행에서 제9행으로 변경되면, 단계 312의 판단에서 웨이트 매트릭스의 행 수인 제9행이 마지막 행인 제8행보다 크므로, MAC 연산 동작을 종료한다.When fed back from step 312, the same processes of steps 304 to 310 as described above are performed except that the number of rows of the weight matrix on which the MAC operation is performed is different. That is, as the number of rows of the weight matrix is increased to the second row in step 311, there is a difference only in that the MAC operation of the second row and the vector matrix is performed instead of the first row of the weight matrix. The process of performing steps 304 to 311 after being fed back in step 312 is performed until the number of all rows of the weight matrix, that is, the MAC operation of the first to eighth rows and the vector matrix is finished. When the MAC operation on the 8th row of the weight matrix is completed and the number of rows of the weight matrix is changed from the 8th row to the 9th row in step 311, the ninth row, which is the number of rows of the weight matrix, is the last row in the judgment of step 312. Since it is greater than 8 lines, the MAC operation is terminated.

도 13에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 수행되는 연산의 다른 예가 나타나 있다. 도 13에 나타낸 바와 같이, PIM 시스템(10)에 의해 수행되는 연산은, MAC 연산된 MAC 결과 매트릭스(MAC RESULT MATRIX)와 바이어스 매트릭스(BIAS MATRIX)의 덧셈 연산을 더 포함한다. 구체적으로, 도 4를 참조하여 설명한 바와 같이, PIM 장치(100)는, PIM 컨트롤러(200)의 제어에 의해, 예컨대 8행 및 8열(8X8)의 웨이트 매트릭스(WEIGHT MATRIX)와 예컨대 8행 및 1열(8X1)의 벡터 매트릭스(VECTOR MATRIX)에 대한 매트릭스 곱셈 연산을 수행한다. 웨이트 매트릭스와 벡터 매트리스의 매트릭스 곱셈 연산 결과, 8개의 원소들(MAC0.0, …, MAC7.0)로 구성되는 8행 및 1열(8X1)의 MAC 결과 매트릭스(MAC RESULT MATRIX)가 생성된다. 8행 및 1열(8X1)의 MAC 결과 매트릭스는 8행 및 1열(8X1)의 바이어스 매트릭스(BIAS MATRIX)와 매트릭스 덧셈 연산된다. 바이어스 매트릭스는 바이어스 데이터로 구성되는 원소들(B0.1, …, B7.7)을 갖는다. 이 바이어스 데이터는, MAC 결과 매트릭스가 갖는 오차를 감소시키도록 임의로 설정될 수 있다. MAC 결과 매트릭스와 바이어스 매트릭스의 매트릭스 덧셈 연산 결과, 8개의 원소들(Y0.0, …, Y7.0)로 구성되는 8행 및 1열(8X1)의 바이어스된 결과 매트릭스(BIASED RESULT MATRIX)가 생성된다.13 shows another example of an operation performed in the PIM system 10 according to the first embodiment of the present disclosure. As shown in FIG. 13 , the operation performed by the PIM system 10 further includes an addition operation of the MAC calculated MAC result matrix (MAC RESULT MATRIX) and the bias matrix (BIAS MATRIX). Specifically, as described with reference to FIG. 4 , the PIM device 100, under the control of the PIM controller 200 , includes, for example, a weight matrix of 8 rows and 8 columns (8X8) and, for example, 8 rows and A matrix multiplication operation is performed on the vector matrix (VECTOR MATRIX) of one column (8X1). As a result of the matrix multiplication operation of the weight matrix and the vector matrix, a MAC result matrix (MAC RESULT MATRIX) of 8 rows and 1 column (8X1) consisting of 8 elements (MAC0.0, ..., MAC7.0) is generated. The MAC result matrix of 8 rows and 1 column (8X1) is subjected to matrix addition operation with the bias matrix (BIAS MATRIX) of 8 rows and 1 column (8X1). The bias matrix has elements B0.1, ..., B7.7 composed of bias data. This bias data can be arbitrarily set to reduce the error of the MAC result matrix. As a result of matrix addition of MAC result matrix and bias matrix, a biased result matrix (BIASED RESULT MATRIX) of 8 rows and 1 column (8X1) consisting of 8 elements (Y0.0, ..., Y7.0) is generated. do.

도 14에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 도 13을 참조하여 설명한 연산 과정을 수행하는 과정을 나타내는 플로챠트가 도시되어 있다. 그리고 도 15에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 도 13의 연산 수행을 구현하기 위한 MAC 오퍼레이터(120-1) 구성의 일 예가 도시되어 있다. 도 15에서 도 3과 동일한 참조부호는 동일한 구성요소를 나타내며, 이하에서 중복되는 설명은 생략하기로 한다. 도 14를 참조하면, 단계 321에서, PIM 장치(100)에서의 연산을 수행하기 위해, 제1 데이터, 즉 웨이트 데이터를 제1 메모리 뱅크(111)에 라이트(write)한다. 이에 따라 PIM 장치(100)의 제1 메모리 뱅크(111)에는 웨이트 데이터가 저장된다. 본 예에서는 웨이트 데이터가 도 13의 웨이트 매트릭스를 구성하는 원소들(W0.0, …, W7.7)인 것으로 전제한다.FIG. 14 is a flowchart illustrating a process of performing the calculation process described with reference to FIG. 13 in the PIM system 10 according to the first embodiment of the present disclosure. And FIG. 15 shows an example of the configuration of the MAC operator 120-1 for implementing the operation of FIG. 13 in the PIM system 10 according to the first embodiment of the present disclosure. In FIG. 15 , the same reference numerals as those of FIG. 3 denote the same components, and repeated descriptions will be omitted below. Referring to FIG. 14 , in step 321 , in order to perform an operation in the PIM device 100 , first data, that is, weight data, is written to the first memory bank 111 . Accordingly, weight data is stored in the first memory bank 111 of the PIM device 100 . In this example, it is assumed that the weight data are elements (W0.0, ..., W7.7) constituting the weight matrix of FIG. 13 .

단계 322에서, 인퍼런스(inference) 요청이 있는지를 판단한다. 인퍼런스 요청은, PIM 시스템(10)의 외부에서 PIM 컨트롤러(200)로 전송될 수 있다. 일 예에서 인퍼런스 요청이 없는 경우, PIM 시스템(10)은 인퍼런스 요청이 전송될 때까지 대기 상태를 유지할 수 있다. 다른 예에서, 인퍼런스 요청이 없는 경우, PIM 시스템(10)은 인퍼런스 요청이 전송될 때까지 MAC 연산 동작 외의 다른 동작, 예컨대 데이터 리드/라이트와 같은 메모리 모드의 동작을 수행할 수도 있다. 본 예에서 인퍼런스 요청과 함께 제2 데이터, 즉 벡터 데이터가 함께 전송되는 것을 전제한다. 또한 본 예에서 벡터 데이터는 도 13의 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)인 것으로 전제한다. 단계 322에서 인퍼런스 요청이 전송되는 경우, 단계 323에서 PIM 컨트롤러(200)는, 인퍼런스 요청과 함께 전송되는 벡터 데이터를 제2 메모리 뱅크(112)에 라이트한다. 이에 따라 PIM 장치(100)의 제2 메모리 뱅크(112)에는 벡터 데이터가 저장된다.In step 322, it is determined whether there is an inference request. The inference request may be transmitted from the outside of the PIM system 10 to the PIM controller 200 . In one example, if there is no inference request, the PIM system 10 may maintain a standby state until the inference request is transmitted. In another example, if there is no inference request, the PIM system 10 may perform an operation other than the MAC operation operation, for example, a memory mode operation such as data read/write, until the inference request is transmitted. . In this example, it is assumed that the second data, ie, vector data, is transmitted together with the inference request. Also, in this example, it is assumed that the vector data are elements (X0.0, ..., X7.0) constituting the vector matrix of FIG. 13 . When the inference request is transmitted in step 322 , in step 323 , the PIM controller 200 writes the vector data transmitted along with the inference request to the second memory bank 112 . Accordingly, vector data is stored in the second memory bank 112 of the PIM device 100 .

단계 324에서 MAC 오퍼레이터의 출력 래치를 바이어스 데이터로 초기 세팅하고, 초기 세팅된 바이어스 데이터를 MAC 오퍼레이터의 누적 가산기로 피드백시킨다. 이 과정은, 도 13을 참조하여 설명한 연산에서 MAC 결과 매트릭스에 바이어스 매트릭스를 매트릭스 덧셈 연산시키기 위한 과정이다. 즉 도 15에 나타낸 바와 같이, MAC 오퍼레이터(120-1)의 데이터 출력부(123-A) 내의 출력 래치(123-1)를 바이어스 데이터로 초기 세팅시킨다. 매트릭스 곱셈 연산이 웨이트 매트릭스의 제1행에 대해 수행되는 과정이므로, 바이어스 데이터로서 바이어스 매트릭스의 제1행 및 제1열 원소(B0.0)가 출력 래치(123-1)에 초기 세팅된다. 출력 래치(123-1)는, 바이어스 데이터(B0.0)를 출력시키고, 출력 래치(123-1)로부터 출력되는 바이어스 데이터(B0.0)는 가산 로직(122-2)의 누적 가산기(122-21D)로 입력된다.In step 324, the output latch of the MAC operator is initially set as bias data, and the initially set bias data is fed back to the cumulative adder of the MAC operator. This process is a process for the matrix addition operation of the bias matrix to the MAC result matrix in the operation described with reference to FIG. 13 . That is, as shown in FIG. 15 , the output latch 123-1 in the data output unit 123-A of the MAC operator 120-1 is initially set to bias data. Since the matrix multiplication operation is performed on the first row of the weight matrix, the first row and first column elements B0.0 of the bias matrix are initially set in the output latch 123-1 as bias data. The output latch 123-1 outputs the bias data B0.0, and the bias data B0.0 output from the output latch 123-1 is the accumulation adder 122 of the addition logic 122-2. -21D) is entered.

일 예에서 출력 래치(123-1)로부터 바이어스 데이터(B0,0)를 출력시켜 누적 가산기(122-21D)로 피드백시키기 위해, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는 MAC 출력 래치 신호(MAC_L3)를 PIM 장치(100)의 MAC 오퍼레이터(120-1)로 전송시킬 수 있다. MAC 오퍼레이터(120-1)의 누적 가산기(122-21D)는, 후속으로 MAC 연산이 수행되는 경우, 가산 로직(122-2)의 마지막 스테이지에 배치되는 가산기(122-21C)로부터 출력되는 MAC 결과 데이터(MAC0.0)와 피드백된 바이어스 데이터(B0.0)를 가산하고, 그 결과인 바이어스된 데이터(Y0.0)를 출력하여 출력 래치(123-1)로 입력시킨다. 바이어스된 데이터(Y0.0)는, 후속으로 전송되는 MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력될 수 있다.In one example, in order to output the bias data B0,0 from the output latch 123-1 and feed it back to the accumulation adder 122-21D, the MAC command generator 240 of the PIM controller 200 generates a MAC output latch signal. (MAC_L3) may be transmitted to the MAC operator 120 - 1 of the PIM device 100 . The accumulation adder 122-21D of the MAC operator 120-1 performs the MAC result output from the adder 122-21C disposed in the last stage of the addition logic 122-2 when the MAC operation is subsequently performed. The data MAC0.0 and the fed back bias data B0.0 are added, and the resulting biased data Y0.0 is output and input to the output latch 123-1. The biased data Y0.0 may be output from the output latch 123 - 1 in synchronization with the subsequently transmitted MAC output latch signal MAC_L3 .

단계 325에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제1 MAC 리드 신호(MAC_RD_BK0)를 생성하여 PIM 장치(100)로 전송한다. 또한 PIM 컨트롤러(200)의 어드레스 발생기(250)는 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(100)로 전송한다. 단계 325의 과정은, 도 6을 참조하여 설명한 과정과 동일하다. 단계 326에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제2 MAC 리드 신호(MAC_RD_BK1)를 생성하여 PIM 장치(100)로 전송한다. 또한 PIM 컨트롤러(200)의 어드레스 발생기(250)는, 제2 메모리 뱅크(112)를 지정하는 뱅크선택신호(BS)와, 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(100)로 전송한다. 단계 326의 과정은, 도 7을 참조하여 설명한 과정과 동일하다.In step 325 , the MAC command generator 240 of the PIM controller 200 generates a first MAC read signal MAC_RD_BK0 and transmits it to the PIM device 100 . Also, the address generator 250 of the PIM controller 200 generates a bank selection signal BS and row/column addresses ADDR_R/ADDR_C and transmits them to the PIM device 100 . The process of step 325 is the same as the process described with reference to FIG. 6 . In operation 326 , the MAC command generator 240 of the PIM controller 200 generates a second MAC read signal MAC_RD_BK1 and transmits it to the PIM device 100 . In addition, the address generator 250 of the PIM controller 200 generates a bank selection signal BS designating the second memory bank 112 and row/column addresses ADDR_R/ADDR_C to the PIM device 100 . send. The process of step 326 is the same as the process described with reference to FIG. 7 .

단계 327에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제1 MAC 입력 래치 신호(MAC_L1)를 생성하여 PIM 장치(100)로 전송한다. 단계 327의 과정은, 도 8을 참조하여 설명한 과정과 동일하다. 제1 MAC 입력 래치 신호(MAC_L1)는 PIM 장치(100)의 MAC 오퍼레이터(120)에 대한 제1 데이터의 입력 래치 동작을 제어한다. 제1 데이터의 입력 래치 동작은, 도 10을 참조하여 설명한 과정과 동일하다. 단계 328에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제2 MAC 입력 래치 신호(MAC_L2)를 생성하여 PIM 장치(100)로 전송한다. 단계 328의 과정은, 도 9를 참조하여 설명한 과정과 동일하다. 제2 MAC 입력 래치 신호(MAC_L2)는 PIM 장치(100)의 MAC 오퍼레이터(120)에 대한 제2 데이터의 입력 래치 동작을 제어한다. 제2 데이터의 입력 래치 동작은, 도 10을 참조하여 설명한 바와 동일하다. In step 327 , the MAC command generator 240 of the PIM controller 200 generates a first MAC input latch signal MAC_L1 and transmits it to the PIM device 100 . The process of step 327 is the same as the process described with reference to FIG. 8 . The first MAC input latch signal MAC_L1 controls an input latch operation of the first data to the MAC operator 120 of the PIM device 100 . The operation of latching the input of the first data is the same as the process described with reference to FIG. 10 . In step 328 , the MAC command generator 240 of the PIM controller 200 generates a second MAC input latch signal MAC_L2 and transmits it to the PIM device 100 . The process of step 328 is the same as the process described with reference to FIG. 9 . The second MAC input latch signal MAC_L2 controls an input latch operation of the second data to the MAC operator 120 of the PIM device 100 . The second data input latch operation is the same as described with reference to FIG. 10 .

단계 329에서, MAC 오퍼레이터(120)의 MAC 회로(122)는, 입력되는 웨이트 매트릭스의 제R행 및 벡터 매트릭스의 제1열에 대한 MAC 연산을 수행한다. 초기값으로 R=1이 설정되며, 이에 따라 웨이트 매트릭스의 제1행 및 벡터 매트릭스의 제1열에 대한 MAC 연산이 수행된다. 구체적으로 곱셈 로직(122-1)의 곱셈기들(122-11) 각각은, 입력되는 데이터에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 가산 로직(122-2)에 입력시킨다. 가산 로직(122-2)은, 도 15에 나타낸 바와 같이, 1단 스테이지에 배치되는 4개의 가산기들(122-21A)과, 2단 스테이지에 배치되는 2개의 가산기들(122-21B)과, 3단 스테이지에 배치되는 가산기(122-21C)와, 그리고 누적 가산기(122-21D)를 포함한다. 누적 가산기(122-21D)는, 가산기(122-21C)의 출력 데이터와, 출력 래치(123-1)로부터 피드백되는 피드백 데이터를 가산하여 출력시킨다. 가산 로직(122-2)의 가산기(122-21C)로부터 출력되는 출력 데이터는, 웨이트 매트릭스의 제1행과 벡터 매트릭스의 제1열과의 매트릭스 곱셈 결과 데이터(MAC0.0)이다. 누적 가산기(122-21D)는, 가산기(122-21C)로부터 출력되는 매트릭스 곱셈 결과 데이터(MAC0.0)와 출력 래치(123-1)로부터 피드백된 바이어스 데이터(B0.0)를 가산하여 출력시킨다. 누적 가산기(122-21D)로부터 출력되는 출력 데이터(Y0.0)는, MAC 오퍼레이터(120)의 데이터 출력부(123-A) 내에 배치되는 출력 래치(123-1)로 입력된다.In step 329, the MAC circuit 122 of the MAC operator 120 performs a MAC operation on the R-th row of the input weight matrix and the first column of the vector matrix. R=1 is set as an initial value, and MAC operation is performed on the first row of the weight matrix and the first column of the vector matrix. Specifically, each of the multipliers 122-11 of the multiplication logic 122-1 performs a multiplication operation on input data, and inputs the result data to the addition logic 122-2. The addition logic 122-2, as shown in FIG. 15, includes four adders 122-21A disposed in the first stage and two adders 122-21B disposed in the second stage; It includes an adder 122-21C disposed in the three-stage stage, and an accumulation adder 122-21D. The accumulation adder 122-21D adds and outputs the output data of the adder 122-21C and the feedback data fed back from the output latch 123-1. Output data output from the adder 122-21C of the addition logic 122-2 is matrix multiplication result data MAC0.0 of the first row of the weight matrix and the first column of the vector matrix. The accumulation adder 122-21D adds and outputs the matrix multiplication result data MAC0.0 output from the adder 122-21C and the bias data B0.0 fed back from the output latch 123-1. . The output data Y0.0 output from the accumulation adder 122-21D is input to the output latch 123-1 disposed in the data output unit 123-A of the MAC operator 120.

단계 330에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, MAC 출력 래치 신호(MAC_L3)를 생성하여 PIM 장치(100)로 전송한다. 단계 330의 과정은, 도 11을 참조하여 설명한 과정과 동일하다. MAC 출력 래치 신호(MAC_L3)는 PIM 장치(100)의 MAC 오퍼레이터(120)에서의 MAC 결과 데이터(MAC0.0)의 출력 래치 동작을 제어한다. 이 출력 래치 동작에 의해, MAC 오퍼레이터(120)의 MAC 회로(122)로부터 입력되는 바이어스된 결과 데이터(Y0.0)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력된다. 출력 래치(123-1)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는 전달게이트(123-2)로 입력된다.In step 330 , the MAC command generator 240 of the PIM controller 200 generates a MAC output latch signal MAC_L3 and transmits it to the PIM device 100 . The process of step 330 is the same as the process described with reference to FIG. 11 . The MAC output latch signal MAC_L3 controls an output latch operation of the MAC result data MAC0.0 in the MAC operator 120 of the PIM device 100 . By this output latch operation, the biased result data Y0.0 input from the MAC circuit 122 of the MAC operator 120 is synchronized with the MAC output latch signal MAC_L3 from the output latch 123-1. is output The biased result data Y0.0 output from the output latch 123-1 is input to the transfer gate 123-2.

단계 331에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, MAC 래치 리셋 신호(MAC_L_RST)를 생성하여 PIM 장치(100)로 전송한다. 단계 331의 과정은, 도 12를 참조하여 설명한 과정과 동일하다. MAC 래치 리셋 신호(MAC_L_RST)는 PIM 장치(100)의 MAC 오퍼레이터(120)에서의 바이어스된 결과 데이터(Y0.0)의 출력 동작과 출력 래치(123-1)의 리셋 동작을 제어한다. MAC 오퍼레이터(120)의 데이터 출력부(123-A)의 출력 래치(123-1)로부터 바이어스된 결과 데이터(Y0.0)를 입력받은 전달게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 동기되어 바이어스된 결과 데이터(Y0.0)를 출력시킨다. 일 예에서 MAC 오퍼레이터(120)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는, PIM 장치(100) 내에서 제1 BIO 라인 또는 제2 BIO 라인을 통해 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)에 저장될 수 있다.In step 331 , the MAC command generator 240 of the PIM controller 200 generates a MAC latch reset signal MAC_L_RST and transmits it to the PIM device 100 . The process of step 331 is the same as the process described with reference to FIG. 12 . The MAC latch reset signal MAC_L_RST controls an output operation of the biased result data Y0.0 by the MAC operator 120 of the PIM device 100 and a reset operation of the output latch 123 - 1 . The transfer gate 123-2 receiving the bias result data Y0.0 from the output latch 123-1 of the data output unit 123-A of the MAC operator 120 receives the MAC latch reset signal MAC_L_RST ) and output the biased result data (Y0.0). In one example, the biased result data Y0.0 output from the MAC operator 120 is the first memory bank 111 or the second through the first BIO line or the second BIO line in the PIM device 100 . It may be stored in the memory bank 112 .

단계 332에서, MAC 연산이 수행된 웨이트 매트릭스의 행 수인 "R"을 하나 증가시킨다. 지금까지 웨이트 매트릭스의 제1행 내지 제8행 중 제1행에 대한 MAC 연산이 수행됨에 따라, 단계 332에서 웨이트 매트릭스의 행 수는 제1행에서 제2행으로 변경된다. 단계 333에서는 단계 332에 의해 변경된 웨이트 매트릭스의 행 수가 웨이트 매트릭스의 마지막 행, 즉 제8행보다 큰지의 여부를 판단한다. 단계 332에 의해 변경된 웨이트 매트릭스의 행 수가 제2행이므로, 단계 333에서의 판단은 단계 332에 의해 변경된 웨이트 매트릭스의 행 수가 제8행보다 작은 것으로 판단하여, 단계 324의 과정을 다시 수행한다.In step 332, "R" which is the number of rows of the weight matrix on which the MAC operation is performed is increased by one. As the MAC operation has been performed on the first row among the first to eighth rows of the weight matrix so far, the number of rows of the weight matrix is changed from the first row to the second row in step 332 . In step 333, it is determined whether the number of rows of the weight matrix changed by step 332 is greater than the last row, that is, the eighth row of the weight matrix. Since the number of rows of the weight matrix changed by step 332 is the second row, the determination in step 333 determines that the number of rows of the weight matrix changed by step 332 is smaller than the eighth row, and the process of step 324 is performed again.

단계 333로부터 피드백되면, MAC 연산이 이루어지는 웨이트 매트릭스의 행 수가 다른 점을 제외하고는 위에서 설명한 바와 동일한 단계 324 내지 단계 331의 과정이 수행된다. 즉 단계 332에서 웨이트 매트릭스의 행 수가 제2행으로 증가됨에 따라, 웨이트 매트릭스의 제1행 대신 제2행과 벡터 매트릭스의 매트릭스 곱셈 연산이 이루어진다는 점에서 차이가 있다. 그리고 단계 324에서 출력 래치(123-1)에 초기 세팅되는 바이어스 데이터가 바이어스 매트릭스의 제2행 및 제1열 원소(B1.0)로 변경되는 점에서만 차이가 있다. 단계 333에서 피드백되어 단계 324 내지 단계 332를 수행하는 과정은, 웨이트 매트릭스의 모든 행 수, 즉 제1행 내지 제8행과 벡터 매트릭스의 MAC 연산이 종료될 때까지 이루어진다. 웨이트 매트릭스의 제8행에 대한 MAC 연산이 종료되어, 단계 332에서 웨이트 매트릭스의 행 수가 제8행에서 제9행으로 변경되면, 단계 333의 판단에서 웨이트 매트릭스의 행 수인 제9행이 마지막 행인 제8행보다 크므로, MAC 연산 동작을 종료한다.When fed back from step 333, the same processes of steps 324 to 331 as described above are performed except that the number of rows of the weight matrix on which the MAC operation is performed is different. That is, as the number of rows of the weight matrix is increased to the second row in step 332, there is a difference in that a matrix multiplication operation is performed between the second row and the vector matrix instead of the first row of the weight matrix. There is a difference only in that the bias data initially set in the output latch 123-1 in step 324 is changed to the element B1.0 in the second row and first column of the bias matrix. The process of performing steps 324 to 332 after being fed back in step 333 is performed until the number of all rows of the weight matrix, that is, the MAC operation of the first to eighth rows and the vector matrix is finished. When the MAC operation on the 8th row of the weight matrix is finished and the number of rows of the weight matrix is changed from the 8th row to the 9th row in step 332, the ninth row, which is the number of rows of the weight matrix, is the last row in the judgment of step 333 Since it is greater than 8 lines, the MAC operation is terminated.

도 16에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 수행되는 연산의 또 다른 예가 나타나 있다. 도 16에 나타낸 바와 같이, PIM 시스템(10)에 의해 수행되는 연산은, 바이어스된 결과 매트릭스(BIASED RESULT MATRIX)에 대한 활성화 함수(ACTIVE FUNCTION) 적용 과정을 더 포함한다. 구체적으로, 도 13을 참조하여 설명한 바와 같이, PIM 장치(100)는, PIM 컨트롤러(200)의 제어에 의해, 예컨대 8행 및 8열(8X8)의 웨이트 매트릭스(WEIGHT MATRIX)와 예컨대 8행 및 1열(8X1)의 벡터 매트릭스(VECTOR MATRIX)에 대한 매트릭스 곱셈 연산을 수행한다. 그리고 그 결과인 MAC 결과 매트릭스(MAC RESULT MATRIX)와 바이어스 매트릭스(BIAS MATRIX)의 매트릭스 덧셈 연산을 수행하여 바이어스된 결과 매트릭스(BIASED RESULT MATRIX)를 생성한다.FIG. 16 shows another example of an operation performed in the PIM system 10 according to the first embodiment of the present disclosure. As shown in FIG. 16 , the operation performed by the PIM system 10 further includes a process of applying an activation function (ACTIVE FUNCTION) to a biased result matrix (BIASED RESULT MATRIX). Specifically, as described with reference to FIG. 13 , the PIM device 100, under the control of the PIM controller 200 , includes, for example, a weight matrix of 8 rows and 8 columns (8X8) and, for example, 8 rows and A matrix multiplication operation is performed on the vector matrix (VECTOR MATRIX) of one column (8X1). Then, a matrix addition operation of the resulting MAC result matrix (MAC RESULT MATRIX) and the bias matrix (BIAS MATRIX) is performed to generate a biased result matrix (BIASED RESULT MATRIX).

바이어스된 결과 매트릭스는 활성화 함수(ACTIVE FUNCTION)가 적용된 후에 출력된다. 활성화 함수는, MLP 신경망에서 MAC 연산된 값을 임계값과 비교하여 고유한 출력값을 계산하는데 사용되는 함수를 의미한다. 일 예에서 활성화 함수는, 출력값이 양수만 가능한 단극성 활성화 함수나, 또는 음수도 출력 가능한 양극성 활성화 함수일 수 있다. 일 예에서 활성화 함수는, 시그모이드(Sigmoid) 함수, Tanh 함수, 정류된 선형(ReLU) 함수, 리키(Leaky) ReLU 함수, 항등(Identity) 함수, 맥스 아웃(Max Out) 함수를 포함할 수 있다.The biased result matrix is output after the ACTIVE FUNCTION is applied. The activation function refers to a function used to calculate a unique output value by comparing the MAC calculated value in the MLP neural network with a threshold value. In an example, the activation function may be a unipolar activation function capable of outputting only a positive value or a bipolar activation function capable of outputting a negative value as well. In one example, the activation function may include a Sigmoid function, a Tanh function, a rectified linear (ReLU) function, a Leaky ReLU function, an identity function, and a Max Out function. there is.

도 17에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 도 16을 참조하여 설명한 연산 과정을 수행하는 과정을 나타내는 플로챠트가 도시되어 있다. 그리고 도 18에는 본 개시의 제1 실시예에 따른 PIM 시스템(10)에서 도 16의 연산 수행을 구현하기 위한 MAC 오퍼레이터(120-2) 구성의 일 예가 도시되어 있다. 도 18에서 도 3과 동일한 참조부호는 동일한 구성요소를 나타내며, 이하에서 중복되는 설명은 생략하기로 한다. 도 17을 참조하면, 단계 341에서, MAC 연산을 수행하기 위해 제1 데이터, 즉 웨이트 데이터를 제1 메모리 뱅크(111)에 라이트(write)한다. 이에 따라 PIM 장치(100)의 제1 메모리 뱅크(111)에는 웨이트 데이터가 저장된다. 본 예에서는 웨이트 데이터가 도 16의 웨이트 매트릭스를 구성하는 원소들(W0.0, …, W7.7)인 것으로 전제한다.FIG. 17 is a flowchart illustrating a process of performing the calculation process described with reference to FIG. 16 in the PIM system 10 according to the first embodiment of the present disclosure. In addition, FIG. 18 shows an example of the configuration of the MAC operator 120-2 for implementing the operation of FIG. 16 in the PIM system 10 according to the first embodiment of the present disclosure. In FIG. 18, the same reference numerals as those of FIG. 3 denote the same components, and repeated descriptions will be omitted below. Referring to FIG. 17 , in step 341 , first data, that is, weight data, is written to the first memory bank 111 in order to perform a MAC operation. Accordingly, weight data is stored in the first memory bank 111 of the PIM device 100 . In this example, it is assumed that the weight data are elements (W0.0, ..., W7.7) constituting the weight matrix of FIG. 16 .

단계 342에서, 인퍼런스(inference) 요청이 있는지를 판단한다. 인퍼런스 요청은, PIM 시스템(10)의 외부에서 PIM 컨트롤러(200)로 전송될 수 있다. 일 예에서 인퍼런스 요청이 없는 경우, PIM 시스템(10)은 인퍼런스 요청이 전송될 때까지 대기 상태를 유지할 수 있다. 다른 예에서, 인퍼런스 요청이 없는 경우, PIM 시스템(10)은 인퍼런스 요청이 전송될 때까지 MAC 연산 동작 외의 다른 동작, 예컨대 데이터 리드/라이트와 같은 메모리 모드의 동작을 수행할 수도 있다. 본 예에서 인퍼런스 요청과 함께 제2 데이터, 즉 벡터 데이터가 함께 전송되는 것을 전제한다. 또한 본 예에서 벡터 데이터는 도 16의 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)인 것으로 전제한다. 단계 342에서 인퍼런스 요청이 전송되는 경우, 단계 343에서 PIM 컨트롤러(200)는, 인퍼런스 요청과 함께 전송되는 벡터 데이터를 제2 메모리 뱅크(112)에 라이트한다. 이에 따라 PIM 장치(100)의 제2 메모리 뱅크(112)에는 벡터 데이터가 저장된다.In step 342, it is determined whether there is an inference request. The inference request may be transmitted from the outside of the PIM system 10 to the PIM controller 200 . In one example, if there is no inference request, the PIM system 10 may maintain a standby state until the inference request is transmitted. In another example, if there is no inference request, the PIM system 10 may perform an operation other than the MAC operation operation, for example, a memory mode operation such as data read/write, until the inference request is transmitted. . In this example, it is assumed that the second data, ie, vector data, is transmitted together with the inference request. Also, in this example, it is assumed that the vector data are elements (X0.0, ..., X7.0) constituting the vector matrix of FIG. 16 . When the inference request is transmitted in step 342 , in step 343 , the PIM controller 200 writes the vector data transmitted along with the inference request to the second memory bank 112 . Accordingly, vector data is stored in the second memory bank 112 of the PIM device 100 .

단계 344에서 MAC 오퍼레이터의 출력 래치를 바이어스 데이터로 초기 세팅하고, 초기 세팅된 바이어스 데이터를 MAC 오퍼레이터의 누적 가산기로 피드백시킨다. 이 과정은, 도 16을 참조하여 설명한 연산에서 MAC 결과 매트릭스에 바이어스 매트릭스를 매트릭스 덧셈 연산시키기 위한 과정이다. 즉 도 18에 나타낸 바와 같이, MAC 오퍼레이터(120-2)의 데이터 출력부(123-B) 내의 출력 래치(123-1)를 바이어스 데이터로 초기 세팅시킨다. 매트릭스 곱셈 연산이 웨이트 매트릭스의 제1행에 대해 수행되는 과정이므로, 바이어스 데이터로서 바이어스 매트릭스의 제1행 및 제1열 원소(B0.0)가 출력 래치(123-1)에 초기 세팅된다. 출력 래치(123-1)는, 바이어스 데이터(B0.0)를 출력시키고, 출력 래치(123-1)로부터 출력되는 바이어스 데이터(B0.0)는 가산 로직(122-2)의 누적 가산기(122-21D)로 입력된다.In step 344, the output latch of the MAC operator is initially set as bias data, and the initially set bias data is fed back to the cumulative adder of the MAC operator. This process is a process for the matrix addition operation of the bias matrix to the MAC result matrix in the operation described with reference to FIG. 16 . That is, as shown in FIG. 18 , the output latch 123-1 in the data output unit 123-B of the MAC operator 120-2 is initially set to bias data. Since the matrix multiplication operation is performed on the first row of the weight matrix, the first row and first column elements B0.0 of the bias matrix are initially set in the output latch 123-1 as bias data. The output latch 123-1 outputs the bias data B0.0, and the bias data B0.0 output from the output latch 123-1 is the accumulation adder 122 of the addition logic 122-2. -21D) is entered.

일 예에서 출력 래치(123-1)로부터 바이어스 데이터(B0,0)를 출력시켜 누적 가산기(122-21D)로 피드백시키기 위해, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는 MAC 출력 래치 신호(MAC_L3)를 PIM 장치(100)의 MAC 오퍼레이터(120-2)로 전송시킬 수 있다. MAC 오퍼레이터(120-2)의 누적 가산기(122-21D)는, 후속으로 MAC 연산이 수행되는 경우, 가산 로직(122-2)의 마지막 스테이지에 배치되는 가산기(122-21C)로부터 출력되는 MAC 결과 데이터(MAC0.0)와 피드백된 바이어스 데이터(B0.0)를 가산하고, 그 결과인 바이어스된 데이터(Y0.0)를 출력하여 출력 래치(123-1)로 입력시킨다. 바이어스된 데이터(Y0.0)는, 후속으로 전송되는 MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 MAC 오퍼레이터(120-2)의 데이터 출력부(123-B) 내에 배치되는 활성화 함수 로직(123-5)으로 입력될 수 있다.In one example, in order to output the bias data B0,0 from the output latch 123-1 and feed it back to the accumulation adder 122-21D, the MAC command generator 240 of the PIM controller 200 generates a MAC output latch signal. (MAC_L3) may be transmitted to the MAC operator 120 - 2 of the PIM device 100 . The accumulation adder 122-21D of the MAC operator 120-2 is the MAC result output from the adder 122-21C disposed in the last stage of the addition logic 122-2 when the MAC operation is subsequently performed. The data MAC0.0 and the feedback bias data B0.0 are added, and the resultant biased data Y0.0 is output and input to the output latch 123-1. The biased data Y0.0 is placed in the data output unit 123-B of the MAC operator 120-2 from the output latch 123-1 in synchronization with the subsequently transmitted MAC output latch signal MAC_L3. may be inputted to the activation function logic 123 - 5 .

단계 345에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제1 MAC 리드 신호(MAC_RD_BK0)를 생성하여 PIM 장치(100)로 전송한다. 또한 PIM 컨트롤러(200)의 어드레스 발생기(250)는 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(100)로 전송한다. 단계 345의 과정은, 도 6을 참조하여 설명한 과정과 동일하다. 단계 346에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제2 MAC 리드 신호(MAC_RD_BK1)를 생성하여 PIM 장치(100)로 전송한다. 또한 PIM 컨트롤러(200)의 어드레스 발생기(250)는, 제2 메모리 뱅크(112)를 지정하는 뱅크선택신호(BS)와, 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(100)로 전송한다. 단계 346의 과정은, 도 7을 참조하여 설명한 과정과 동일하다.In step 345 , the MAC command generator 240 of the PIM controller 200 generates a first MAC read signal MAC_RD_BK0 and transmits it to the PIM device 100 . Also, the address generator 250 of the PIM controller 200 generates a bank selection signal BS and row/column addresses ADDR_R/ADDR_C and transmits them to the PIM device 100 . The process of step 345 is the same as the process described with reference to FIG. 6 . In step 346 , the MAC command generator 240 of the PIM controller 200 generates a second MAC read signal MAC_RD_BK1 and transmits it to the PIM device 100 . In addition, the address generator 250 of the PIM controller 200 generates a bank selection signal BS designating the second memory bank 112 and row/column addresses ADDR_R/ADDR_C to the PIM device 100 . send. The process of step 346 is the same as the process described with reference to FIG. 7 .

단계 347에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제1 MAC 입력 래치 신호(MAC_L1)를 생성하여 PIM 장치(100)로 전송한다. 단계 347의 과정은, 도 8을 참조하여 설명한 과정과 동일하다. 제1 MAC 입력 래치 신호(MAC_L1)는 PIM 장치(100)의 MAC 오퍼레이터(120)에 대한 제1 데이터의 입력 래치 동작을 제어한다. 제1 데이터의 입력 래치 동작은, 도 10을 참조하여 설명한 과정과 동일하다. 단계 348에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, 제2 MAC 입력 래치 신호(MAC_L2)를 생성하여 PIM 장치(100)로 전송한다. 단계 348의 과정은, 도 9를 참조하여 설명한 과정과 동일하다. 제2 MAC 입력 래치 신호(MAC_L2)는 PIM 장치(100)의 MAC 오퍼레이터(120)에 대한 제2 데이터의 입력 래치 동작을 제어한다. 제2 데이터의 입력 래치 동작은, 도 10을 참조하여 설명한 바와 동일하다. In step 347 , the MAC command generator 240 of the PIM controller 200 generates a first MAC input latch signal MAC_L1 and transmits it to the PIM device 100 . The process of step 347 is the same as the process described with reference to FIG. 8 . The first MAC input latch signal MAC_L1 controls an input latch operation of the first data to the MAC operator 120 of the PIM device 100 . The operation of latching the input of the first data is the same as the process described with reference to FIG. 10 . In step 348 , the MAC command generator 240 of the PIM controller 200 generates a second MAC input latch signal MAC_L2 and transmits it to the PIM device 100 . The process of step 348 is the same as the process described with reference to FIG. 9 . The second MAC input latch signal MAC_L2 controls an input latch operation of the second data to the MAC operator 120 of the PIM device 100 . The second data input latch operation is the same as described with reference to FIG. 10 .

단계 349에서, MAC 오퍼레이터(120)의 MAC 회로(122)는, 입력되는 웨이트 매트릭스의 제R행 및 벡터 매트릭스의 제1열에 대한 MAC 연산을 수행한다. 초기값으로 R=1이 설정되며, 이에 따라 웨이트 매트릭스의 제1행 및 벡터 매트릭스의 제1열에 대한 MAC 연산이 수행된다. 구체적으로 곱셈 로직(122-1)의 곱셈기들(122-11) 각각은, 입력되는 데이터에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 가산 로직(122-2)에 입력시킨다. 가산 로직(122-2)은, 도 18에 나타낸 바와 같이, 1단 스테이지에 배치되는 4개의 가산기들(122-21A)과, 2단 스테이지에 배치되는 2개의 가산기들(122-21B)과, 3단 스테이지에 배치되는 가산기(122-21C)와, 그리고 누적 가산기(122-21D)를 포함한다. 누적 가산기(122-21D)는, 가산기(122-21C)의 출력 데이터와, 출력 래치(123-1)로부터 피드백되는 피드백 데이터를 가산하여 출력시킨다. 가산 로직(122-2)의 가산기(122-21C)로부터 출력되는 출력 데이터는, 웨이트 매트릭스의 제1행과 벡터 매트릭스의 제1열과의 매트릭스 곱셈 결과 데이터(MAC0.0)이다. 누적 가산기(122-21D)는, 가산기(122-21C)로부터 출력되는 매트릭스 곱셈 결과 데이터(MAC0.0)와 출력 래치(123-1)로부터 피드백된 바이어스 데이터(B0.0)를 가산하여 출력시킨다. 누적 가산기(122-21D)로부터 출력되는 출력 데이터(Y0.0)는, MAC 오퍼레이터(120)의 데이터 출력부(123-A) 내에 배치되는 출력 래치(123-1)로 입력된다.In step 349, the MAC circuit 122 of the MAC operator 120 performs a MAC operation on the R-th row of the input weight matrix and the first column of the vector matrix. R=1 is set as an initial value, and MAC operation is performed on the first row of the weight matrix and the first column of the vector matrix. Specifically, each of the multipliers 122-11 of the multiplication logic 122-1 performs a multiplication operation on input data, and inputs the result data to the addition logic 122-2. The addition logic 122-2, as shown in FIG. 18, includes four adders 122-21A disposed in the first stage and two adders 122-21B disposed in the second stage; It includes an adder 122-21C disposed in the three-stage stage, and an accumulation adder 122-21D. The accumulation adder 122-21D adds and outputs the output data of the adder 122-21C and the feedback data fed back from the output latch 123-1. Output data output from the adder 122-21C of the addition logic 122-2 is matrix multiplication result data MAC0.0 of the first row of the weight matrix and the first column of the vector matrix. The accumulation adder 122-21D adds and outputs the matrix multiplication result data MAC0.0 output from the adder 122-21C and the bias data B0.0 fed back from the output latch 123-1. . The output data Y0.0 output from the accumulation adder 122-21D is input to the output latch 123-1 disposed in the data output unit 123-A of the MAC operator 120.

단계 350에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, MAC 출력 래치 신호(MAC_L3)를 생성하여 PIM 장치(100)로 전송한다. 단계 350의 과정은, 도 11을 참조하여 설명한 과정과 동일하다. MAC 출력 래치 신호(MAC_L3)는 PIM 장치(100)의 MAC 오퍼레이터(120)에서의 출력 래치(123-1)의 출력 래치 동작을 제어한다. 이 출력 래치 동작에 의해, MAC 오퍼레이터(120)의 MAC 회로(122)로부터 입력되는 바이어스된 결과 데이터(Y0.0)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력된다. 출력 래치(123-1)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는 활성화 함수 로직(123-5)으로 입력된다. 그리고 단계 351에서, 활성화 함수 로직(123-5)은, 입력되는 바이어스된 결과 데이터(Y0.0)에 활성화 함수를 적용하여 최종 출력값을 생성하여 전달게이트(도 3의 123-2)로 입력시킨다. In step 350 , the MAC command generator 240 of the PIM controller 200 generates a MAC output latch signal MAC_L3 and transmits it to the PIM device 100 . The process of step 350 is the same as the process described with reference to FIG. 11 . The MAC output latch signal MAC_L3 controls an output latch operation of the output latch 123 - 1 in the MAC operator 120 of the PIM device 100 . By this output latch operation, the biased result data Y0.0 input from the MAC circuit 122 of the MAC operator 120 is synchronized with the MAC output latch signal MAC_L3 from the output latch 123-1. is output The biased result data Y0.0 output from the output latch 123-1 is input to the activation function logic 123-5. And in step 351, the activation function logic 123-5 applies the activation function to the input biased result data Y0.0 to generate a final output value and input it to the transfer gate (123-2 in FIG. 3). .

단계 352에서, PIM 컨트롤러(200)의 MAC 커맨드 발생기(240)는, MAC 래치 리셋 신호(MAC_L_RST)를 생성하여 PIM 장치(100)로 전송한다. 단계 352의 과정은, 도 12를 참조하여 설명한 과정과 동일하다. MAC 래치 리셋 신호(MAC_L_RST)는 PIM 장치(100)의 MAC 오퍼레이터(120)에서의 최종 출력값의 출력 동작과 출력 래치(123-1)의 리셋 동작을 제어한다. MAC 오퍼레이터(120)의 데이터 출력부(123-B)의 활성화 함수 로직(123-5)로부터 최종 출력값을 입력받은 전달게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 동기되어 최종 출력값을 출력시킨다. 일 예에서 MAC 오퍼레이터(120)로부터 출력되는 최종 출력값은, PIM 장치(100) 내에서 제1 BIO 라인 또는 제2 BIO 라인을 통해 제1 메모리 뱅크(111) 또는 제2 메모리 뱅크(112)에 저장될 수 있다.In step 352 , the MAC command generator 240 of the PIM controller 200 generates a MAC latch reset signal MAC_L_RST and transmits it to the PIM device 100 . The process of step 352 is the same as the process described with reference to FIG. 12 . The MAC latch reset signal MAC_L_RST controls the output operation of the final output value from the MAC operator 120 of the PIM device 100 and the reset operation of the output latch 123 - 1 . The transfer gate 123-2 receiving the final output value from the activation function logic 123-5 of the data output unit 123-B of the MAC operator 120 is synchronized with the MAC latch reset signal MAC_L_RST to obtain the final output value. outputs In one example, the final output value output from the MAC operator 120 is stored in the first memory bank 111 or the second memory bank 112 through the first BIO line or the second BIO line in the PIM device 100 . can be

단계 353에서, MAC 연산이 수행된 웨이트 매트릭스의 행 수인 "R"을 하나 증가시킨다. 지금까지 웨이트 매트릭스의 제1행 내지 제8행 중 제1행에 대한 MAC 연산이 수행됨에 따라, 단계 353에서 웨이트 매트릭스의 행 수는 제1행에서 제2행으로 변경된다. 단계 354에서는 단계 353에 의해 변경된 웨이트 매트릭스의 행 수가 웨이트 매트릭스의 마지막 행, 즉 제8행보다 큰지의 여부를 판단한다. 단계 353에 의해 변경된 웨이트 매트릭스의 행 수가 제2행이므로, 단계 354에서의 판단은 단계 353에 의해 변경된 웨이트 매트릭스의 행 수가 제8행보다 작은 것으로 판단하여, 단계 344의 과정을 다시 수행한다.In step 353, "R" which is the number of rows of the weight matrix on which the MAC operation is performed is increased by one. As the MAC operation is performed on the first row among the first to eighth rows of the weight matrix so far, the number of rows of the weight matrix is changed from the first row to the second row in step 353 . In step 354, it is determined whether the number of rows of the weight matrix changed by step 353 is greater than the last row, that is, the eighth row of the weight matrix. Since the number of rows of the weight matrix changed by step 353 is the second row, the determination in step 354 determines that the number of rows of the weight matrix changed by step 353 is smaller than the eighth row, and the process of step 344 is performed again.

단계 354로부터 피드백되면, MAC 연산이 이루어지는 웨이트 매트릭스의 행 수가 다른 점을 제외하고는 위에서 설명한 바와 동일한 단계 344 내지 단계 354의 과정이 수행된다. 즉 단계 353에서 웨이트 매트릭스의 행 수가 제2행으로 증가됨에 따라, 웨이트 매트릭스의 제1행 대신 제2행과 벡터 매트릭스의 매트릭스 곱셈 연산이 이루어진다는 점에서 차이가 있다. 그리고 단계 344에서 출력 래치(123-1)에 초기 세팅되는 바이어스 데이터가 바이어스 매트릭스의 제2행 및 제1열 원소(B1.0)로 변경되는 점에서만 차이가 있다. 단계 354에서 피드백되어 단계 344 내지 단계 354를 수행하는 과정은, 웨이트 매트릭스의 모든 행 수, 즉 제1행 내지 제8행과 벡터 매트릭스의 MAC 연산이 종료될 때까지 이루어진다. 웨이트 매트릭스의 제8행에 대한 MAC 연산이 종료되어, 단계 354에서 웨이트 매트릭스의 행 수가 제8행에서 제9행으로 변경되면, 단계 354의 판단에서 웨이트 매트릭스의 행 수인 제9행이 마지막 행인 제8행보다 크므로, MAC 연산 동작을 종료한다.Upon feedback from step 354, the same process as described above in steps 344 to 354 is performed except that the number of rows of the weight matrix on which the MAC operation is performed is different. That is, as the number of rows of the weight matrix is increased to the second row in step 353, there is a difference in that a matrix multiplication operation is performed between the second row and the vector matrix instead of the first row of the weight matrix. There is a difference only in that the bias data initially set in the output latch 123-1 in step 344 is changed to the element B1.0 in the second row and first column of the bias matrix. The process of performing steps 344 to 354 after being fed back in step 354 is performed until the number of all rows of the weight matrix, that is, the MAC operation of the first to eighth rows and the vector matrix is finished. When the MAC operation on the 8th row of the weight matrix is completed and the number of rows of the weight matrix is changed from the 8th row to the 9th row in step 354, the ninth row, which is the number of rows of the weight matrix, is the last row in the judgment of step 354. Since it is greater than 8 lines, the MAC operation is terminated.

도 19에는 본 개시의 제2 실시예에 따른 PIM 시스템(30)의 블록도가 개략적으로 도시되어 있다. 도 19에서 도 1과 동일한 참조부호는 동일한 구성을 나타낸다. 도 19에 나타낸 바와 같이, PIM 시스템(30)은, PIM 장치(400) 및 PIM 컨트롤러(500)를 포함하여 구성된다. PIM 장치(400)는, 메모리 뱅크(BANK)(411)와, 글로벌 버퍼(412)와, MAC 오퍼레이터(MAC OPERATOR)(420)와, 인터페이스(I/F)(431)와, 그리고 데이터 입출력 패드(DQ)(432)를 포함하여 구성될 수 있다. PIM 장치(400)의 메모리 뱅크(411) 및 MAC 오퍼레이터(420)는 하나의 MAC 유닛(MAC UNIT)을 구성한다. 다른 예에서, PIM 장치(400)는 복수의 MAC 유닛들을 포함할 수 있다. 메모리 뱅크(411)는 데이터가 저장되는 영역으로, 예컨대 디램(DRAM)을 구성하는 메모리 영역 단위일 수 있다. 글로벌 버퍼(412) 또한 데이터가 저장되는 영역으로, 예컨대 디램(DRAM) 또는 에스램(SRAM)으로 구성될 수 있다. 메모리 뱅크(411)는, 독립적으로 활성화(active)될 수 있는 단위이며, PIM 장치(400) 내의 데이터 입출력 라인과 동일한 데이터 버스 폭(data bus width)을 가질 수 있다. 일 예에서 메모리 뱅크(411)는, 다른 메모리 뱅크가 액세스되는 동안 활성화 동작이 병행하여 진행되는 인터리빙(interleaving) 방식으로 동작할 수 있다. 메모리 뱅크(411)는, 복수의 로우들(rows) 및 컬럼들(columns)의 교차점들 각각에 메모리 단위 셀이 배치되어 구성되는 적어도 하나의 메모리 셀 어레이를 포함할 수 있다.19 schematically shows a block diagram of a PIM system 30 according to a second embodiment of the present disclosure. In FIG. 19, the same reference numerals as in FIG. 1 denote the same configuration. As shown in FIG. 19 , the PIM system 30 includes a PIM device 400 and a PIM controller 500 . The PIM device 400 includes a memory bank 411 , a global buffer 412 , a MAC OPERATOR 420 , an interface (I/F) 431 , and a data input/output pad (DQ) 432 . The memory bank 411 and the MAC operator 420 of the PIM device 400 constitute one MAC unit (MAC UNIT). In another example, the PIM device 400 may include a plurality of MAC units. The memory bank 411 is an area in which data is stored, and may be, for example, a unit of a memory area constituting a DRAM. The global buffer 412 is also an area in which data is stored, and may be formed of, for example, DRAM or SRAM. The memory bank 411 is a unit that can be independently activated, and may have the same data bus width as the data input/output line in the PIM device 400 . In one example, the memory bank 411 may operate in an interleaving manner in which activation operations are performed in parallel while another memory bank is being accessed. The memory bank 411 may include at least one memory cell array in which a memory unit cell is disposed at each of intersections of a plurality of rows and columns.

도면에 나타내지는 않았지만, 메모리 뱅크(411)에 인접한 영역에는 코어(core)가 배치될 수 있다. 코어는, X-디코더들(XDEC) 및 Y-디코더들/입출력회로들(YDEC/IO)을 포함할 수 있다. X-디코더(XDEC)는, 워드라인 디코더 또는 로우 디코더로 명명되기도 한다. X-디코더(XDEC)는, PIM 컨트롤러(500)로부터 전송되는 로우 어드레스(ADD_R)를 수신하고, 수신된 로우 어드레스(ADD_R)를 디코딩하여 선택된 메모리 뱅크의 선택된 로우를 인에이블시킨다. Y-디코더들/입출력회로들(YDEC/IO) 각각은, Y-디코더(YDEC) 및 입출력회로(IO)를 포함할 수 있다. Y-디코더(YDEC)는, 비트라인 디코더 또는 컬럼 디코더로 명명되기도 한다. Y-디코더(YDEC)는, PIM 컨트롤러(500)로부터 전송되는 컬럼 어드레스(ADDR_C)를 수신하고, 수신된 컬럼 어드레스(ADDR_C)를 디코딩하여 선택된 메모리 뱅크 내에서 선택된 로우의 컬럼들 중 선택된 컬럼들을 인에이블시킨다. 입출력회로(IO)는, 메모리 뱅크(411)에 대한 리드 동작에서 리드 데이터를 감지 증폭하기 위한 입출력 센스앰프(IO sense amp)를 포함할 수 있다. 또한 입출력회로(IO)는, 메모리 뱅크(411)에 대한 라이트 동작에서 라이트 데이터를 드라이빙하기 위한 라이트 드라이버(write driver)를 포함할 수 있다.Although not shown in the drawing, a core may be disposed in an area adjacent to the memory bank 411 . The core may include X-decoders XDEC and Y-decoders/input/output circuits YDEC/IO. The X-decoder (XDEC) is also called a word line decoder or a row decoder. The X-decoder XDEC receives the row address ADD_R transmitted from the PIM controller 500 and decodes the received row address ADD_R to enable the selected row of the selected memory bank. Each of the Y-decoders/input/output circuits YDEC/IO may include a Y-decoder YDEC and an input/output circuit IO. The Y-decoder (YDEC) is also called a bitline decoder or a column decoder. The Y-decoder YDEC receives the column address ADDR_C transmitted from the PIM controller 500, decodes the received column address ADDR_C, and reads selected columns among columns of a selected row in the selected memory bank. enable The input/output circuit IO may include an input/output sense amplifier for sensing and amplifying read data in a read operation on the memory bank 411 . Also, the input/output circuit IO may include a write driver for driving write data in a write operation on the memory bank 411 .

PIM 장치(400)의 MAC 오퍼레이터(420)는, 도 3을 참조하여 설명한 MAC 오퍼레이터(120)와 대부분 동일하다. 즉 본 예에 따른 MAC 오퍼레이터(420)는, 도 3을 참조하여 설명한 바와 같이, 데이터 입력부(121)와, MAC 회로(122)와, 그리고 데이터 출력부(123)를 포함하여 구성될 수 있다. 데이터 입력부(121)는, 제1 입력 래치(121-1) 및 제2 입력 래치(121-2)를 포함하여 구성될 수 있다. MAC 회로(122)는, 곱셈 로직(122-1) 및 가산 로직(122-2)을 포함하여 구성될 수 있다. 데이터 출력부(123)는, 출력 래치(123-1), 전달 게이트(123-2), 지연회로(123-3), 및 인버터(123-4)를 포함하여 구성될 수 있다. 일 예에서 제1 입력 래치(121-1), 제2 입력 래치(121-2), 및 출력 래치(123-1)는 플립 플랍으로 구성될 수 있다.The MAC operator 420 of the PIM device 400 is mostly the same as the MAC operator 120 described with reference to FIG. 3 . That is, as described with reference to FIG. 3 , the MAC operator 420 according to this example may include a data input unit 121 , a MAC circuit 122 , and a data output unit 123 . The data input unit 121 may include a first input latch 121-1 and a second input latch 121-2. The MAC circuit 122 may include a multiplication logic 122-1 and an addition logic 122-2. The data output unit 123 may include an output latch 123-1, a transfer gate 123-2, a delay circuit 123-3, and an inverter 123-4. In an example, the first input latch 121-1, the second input latch 121-2, and the output latch 123-1 may be configured as flip-flops.

본 예에서의 MAC 오퍼레이터(420)는, 제1 입력 래치(121-1) 및 제2 입력 래치(121-2)의 클럭 단자에 각각 MAC 입력 래치 신호(MAC_L1)가 동시에 입력된다는 점에서 도 3의 MAC 오퍼레이터(120)와 다르다. 아래에서 상세하게 설명하겠지만, 본 예에 따른 PIM 시스템(30)의 PIM 장치(400) 내에서 MAC 오퍼레이터(420)로의 웨이트 데이터와 벡터 데이터 전송은 동시에 이루어질 수 있다. 즉 MAC 오퍼레이터(420)의 데이터 입력부(121)를 구성하는 제1 입력 래치(121-1) 및 제2 입력 래치(121-2)에 각각 제1 데이터(DA1)(웨이트 데이터) 및 제2 데이터(DA2)(벡터 데이터)가 동시에 입력된다. 따라서 제1 입력 래치(121-1)의 클럭단자 및 제2 입력 래치(121-2)의 클럭 단자에 별도의 제어신호가 인가될 필요가 없으며, 이에 따라 본 예의 MAC 오퍼레이터(420)에서는 제1 입력 래치(121-1)의 클럭단자 및 제2 입력 래치(121-2)의 클럭 단자에 MAC 입력 래치(MAC_L1)가 공통으로 입력된다.3 in that the MAC operator 420 in this example simultaneously inputs the MAC input latch signal MAC_L1 to the clock terminals of the first input latch 121-1 and the second input latch 121-2, respectively. It is different from the MAC operator 120 of As will be described in detail below, weight data and vector data transmission to the MAC operator 420 within the PIM device 400 of the PIM system 30 according to the present example may be simultaneously performed. That is, the first data DA1 (weight data) and the second data are respectively provided to the first input latch 121-1 and the second input latch 121-2 constituting the data input unit 121 of the MAC operator 420 . (DA2) (vector data) is input simultaneously. Therefore, there is no need to apply a separate control signal to the clock terminal of the first input latch 121-1 and the clock terminal of the second input latch 121-2. Accordingly, in the MAC operator 420 of this example, the first The MAC input latch MAC_L1 is commonly input to the clock terminal of the input latch 121-1 and the clock terminal of the second input latch 121-2.

다른 예에서 PIM 장치(400)의 MAC 오퍼레이터(420)는, 도 13에 나타낸 연산을 수행하기 위해 도 15를 참조하여 설명한 MAC 오퍼레이터(120-1)와 동일하게 구성될 수 있다. 이 경우에도 데이터 입력부(121)를 구성하는 제1 입력 래치(121-1)의 클럭단자 및 제2 입력 래치(121-2)의 클럭 단자에 MAC 입력 래치(MAC_L1)가 공통으로 입력되는 점을 제외하고는, 도 15를 참조하여 설명한 바와 동일한 구성을 갖는다. 또 다른 예에서 PIM 장치(400)의 MAC 오퍼레이터(420)는, 도 16에 나타낸 연산을 수행하기 위해 도 18을 참조하여 설명한 MAC 오퍼레이터(120-2)와 동일하게 구성될 수 있다. 이 경우에도 데이터 입력부(121)를 구성하는 제1 입력 래치(121-1)의 클럭단자 및 제2 입력 래치(121-2)의 클럭 단자에 MAC 입력 래치(MAC_L1)가 공통으로 입력되는 점을 제외하고는, 도 18을 참조하여 설명한 바와 동일한 구성을 갖는다.In another example, the MAC operator 420 of the PIM device 400 may be configured in the same manner as the MAC operator 120-1 described with reference to FIG. 15 in order to perform the operation shown in FIG. 13 . Also in this case, it should be noted that the MAC input latch MAC_L1 is commonly input to the clock terminal of the first input latch 121-1 and the clock terminal of the second input latch 121-2 constituting the data input unit 121. Except that, it has the same configuration as described with reference to FIG. 15 . In another example, the MAC operator 420 of the PIM device 400 may be configured the same as the MAC operator 120 - 2 described with reference to FIG. 18 to perform the operation shown in FIG. 16 . Also in this case, it should be noted that the MAC input latch MAC_L1 is commonly input to the clock terminal of the first input latch 121-1 and the clock terminal of the second input latch 121-2 constituting the data input unit 121. Except that, it has the same configuration as described with reference to FIG. 18 .

PIM 장치(400)의 인터페이스(431)는, PIM 컨트롤러(500)로부터 메모리 커맨드(M_CMD), MAC 커맨드들(MAC_CMDs), 뱅크선택신호(BS), 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 수신받는다. 인터페이스(431)는, PIM 컨트롤러(500)로부터 수신된 메모리 커맨드(M_CMD)를 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)와 함께 메모리 뱅크(411)로 전송한다. 인터페이스(431)는, PIM 컨트롤러(500)로부터 수신된 MAC 커맨드들(MAC_CMDs)을 메모리 뱅크(411) 및 MAC 오퍼레이터(420)로 전송한다. 이때 인터페이스(431)는, 뱅크선택신호(BS) 및 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 메모리 뱅크(411)로 함께 전송시킬 수도 있다. PIM 장치(400)의 데이터 입출력 패드(432)는, PIM 장치(400) 내의 메모리 뱅크(411), 글로벌 버퍼(412), 및 MAC 오퍼레이터(420)와 PIM 장치(400)의 외부 사이의 데이터 통신 터미널로 기능한다. 여기서 PIM 장치(400)의 외부는, PIM 시스템(30)을 구성하는 PIM 컨트롤러(500)이거나, 또는 PIM 시스템(30) 외부의 호스트일 수 있다. 이에 따라 호스트 또는 PIM 컨트롤러(500)로부터 전송되는 데이터는, 데이터 입출력 패드(432)를 통해 PIM 장치(400) 내부로 입력될 수 있다. 또한 PIM 장치(400) 내의 데이터는 데이터 입출력 패드(432)를 통해 PIM 장치(400) 외부로 전송될 수 있다.The interface 431 of the PIM device 400 receives a memory command M_CMD, MAC commands MAC_CMDs, a bank selection signal BS, and row/column addresses ADDR_R/ADDR_C from the PIM controller 500 . receive The interface 431 transmits the memory command M_CMD received from the PIM controller 500 to the memory bank 411 together with the bank selection signal BS and the row/column addresses ADDR_R/ADDR_C. The interface 431 transmits the MAC commands MAC_CMDs received from the PIM controller 500 to the memory bank 411 and the MAC operator 420 . In this case, the interface 431 may transmit the bank selection signal BS and the row/column addresses ADDR_R/ADDR_C together to the memory bank 411 . The data input/output pad 432 of the PIM device 400 includes a memory bank 411 in the PIM device 400 , a global buffer 412 , and data communication between the MAC operator 420 and the outside of the PIM device 400 . It functions as a terminal. Here, the outside of the PIM device 400 may be the PIM controller 500 constituting the PIM system 30 or a host outside the PIM system 30 . Accordingly, data transmitted from the host or the PIM controller 500 may be input into the PIM device 400 through the data input/output pad 432 . Also, data in the PIM device 400 may be transmitted to the outside of the PIM device 400 through the data input/output pad 432 .

PIM 컨트롤러(500)는, PIM 장치(400)의 동작을 제어한다. 일 예에서 PIM 컨트롤러(500)는, PIM 장치(400)의 메모리 모드 동작을 제어하거나, 또는 MAC 모드 동작을 제어할 수 있다. PIM 컨트롤러(500)가 PIM 장치(400)를 메모리 모드로 제어하는 경우, PIM 장치(500)에서 메모리 뱅크(411)에 대한 데이터 리드 동작 및 데이터 라이트 동작이 수행될 수 있다. PIM 컨트롤러(500)가 PIM 장치(400)를 MAC 모드로 제어하는 경우, PIM 장치(400)에서 MAC 오퍼레이터(420)에 의한 MAC 연산 동작이 수행될 수 있다. PIM 컨트롤러(500)가 PIM 장치(400)를 MAC 모드로 동작되도록 제어하는 경우, PIM 장치(400)에서는 MAC 연산을 위해 메모리 뱅크(411) 및 글로벌 버퍼(412)에 데이터를 라이트하고 리드하는 동작이 수행될 수도 있다.The PIM controller 500 controls the operation of the PIM device 400 . In an example, the PIM controller 500 may control the memory mode operation of the PIM device 400 or may control the MAC mode operation. When the PIM controller 500 controls the PIM device 400 in the memory mode, the PIM device 500 may perform a data read operation and a data write operation on the memory bank 411 . When the PIM controller 500 controls the PIM device 400 in the MAC mode, a MAC operation operation by the MAC operator 420 may be performed in the PIM device 400 . When the PIM controller 500 controls the PIM device 400 to operate in the MAC mode, the PIM device 400 writes and reads data to the memory bank 411 and the global buffer 412 for MAC operation. This may be done.

PIM 컨트롤러(500)는, 커맨드 큐(210), 스케줄러(220), 메모리 커맨드 발생기(230), MAC 커맨드 발생기(540), 및 어드레스 발생기(550)를 포함하여 구성될 수 있다. 스케줄러(220)는 모드 선택기(221)를 포함할 수 있다. 커맨드 큐(210)는, PIM 시스템(30)의 외부로부터 전송되는 커맨드(CMD)를 전송받아 저장한다. 커맨드 큐(210)에 저장되는 커맨드(CMD)는, 스케줄러(220)에 의해 정해진 순서대로 메모리 커맨드 발생기(230) 또는 MAC 커맨드 발생기(540)로 전송된다. 스케줄러(220)는, 커맨드 큐(210)에 저장되어 있는 커맨드(CMD)가 커맨드 큐(210)로부터 출력되는 타이밍을 조절한다. 스케줄러(210)는, 커맨드 큐(210)에 저장되어 있는 커맨드(CMD)가 PIM 장치(400)의 메모리 모드 동작을 요청하는 커맨드인지, 아니면 MAC 모드 동작을 요청하는 커맨드인지에 관한 모드 선택 신호를 생성하는 모드 선택기(221)를 포함한다. 메모리 커맨드 발생기(230)는, 커맨드 큐(210)로부터 PIM 장치(400)의 메모리 모드 동작을 요청하는 커맨드(CMD)를 전송받고, 메모리 커맨드(M_CMD)를 생성하여 출력시킨다. 이와 같은 커맨드 큐(210), 스케줄러(220), 모드 선택기(221), 및 메모리 커맨드 발생기(230)에 대해서는 도 1을 참조하여 설명한 바와 동일하다.The PIM controller 500 may include a command queue 210 , a scheduler 220 , a memory command generator 230 , a MAC command generator 540 , and an address generator 550 . The scheduler 220 may include a mode selector 221 . The command queue 210 receives and stores the command CMD transmitted from the outside of the PIM system 30 . The commands CMD stored in the command queue 210 are transmitted to the memory command generator 230 or the MAC command generator 540 in an order determined by the scheduler 220 . The scheduler 220 adjusts the timing at which the command CMD stored in the command queue 210 is output from the command queue 210 . The scheduler 210 receives a mode selection signal regarding whether the command CMD stored in the command queue 210 is a command for requesting a memory mode operation of the PIM device 400 or a command for requesting a MAC mode operation. and a mode selector 221 to generate. The memory command generator 230 receives a command CMD for requesting the memory mode operation of the PIM device 400 from the command queue 210 , and generates and outputs the memory command M_CMD. The command queue 210 , the scheduler 220 , the mode selector 221 , and the memory command generator 230 are the same as described with reference to FIG. 1 .

MAC 커맨드 발생기(540)는, 커맨드 큐(210)로부터 PIM 장치(400)의 MAC 모드 동작을 요청하는 커맨드(CMD)를 전송받는다. MAC 커맨드 발생기(540)는, 전송된 커맨드(CMD)를 디코딩하여 MAC 커맨드들(MAC_CMDs)를 생성하여 출력한다. MAC 커맨드 발생기(540)로부터 출력되는 MAC 커맨드들(MAC_CMDs)는 PIM 장치(400)로 전송된다. MAC 커맨드 발생기(540)로부터 전송되는 MAC 커맨드들(MAC_CMDs)에 의해, PIM 장치(400)의 메모리 뱅크(411)에 대한 데이터 리드 동작과, MAC 오퍼레이터(420)의 MAC 연산 동작이 제어된다. MAC 커맨드들(MAC_CMDs) 및 그에 따른 PIM 장치(400)의 MAC 모드 동작에 대해서는 아래에서 도 20을 참조하여 보다 상세하게 설명하기로 한다. 어드레스 발생기(550)는, 메모리 뱅크(411)를 선택하는 뱅크선택신호(BS)를 생성하여 PIM 장치(400)로 전송한다. 또한 어드레스 발생기(550)는, 메모리 뱅크(411)의 액세스할 영역을 지정하는 로우 어드레스(ADDR_R) 및 컬럼 어드레스(ADDR/C)를 생성하여 PIM 장치(400)로 전송한다.The MAC command generator 540 receives a command CMD for requesting the MAC mode operation of the PIM device 400 from the command queue 210 . The MAC command generator 540 decodes the transmitted command CMD to generate and output MAC commands MAC_CMDs. MAC commands MAC_CMDs output from the MAC command generator 540 are transmitted to the PIM device 400 . The data read operation for the memory bank 411 of the PIM device 400 and the MAC operation operation of the MAC operator 420 are controlled by the MAC commands MAC_CMDs transmitted from the MAC command generator 540 . The MAC commands (MAC_CMDs) and the MAC mode operation of the PIM device 400 will be described in more detail below with reference to FIG. 20 . The address generator 550 generates a bank selection signal BS for selecting the memory bank 411 and transmits it to the PIM device 400 . In addition, the address generator 550 generates a row address ADDR_R and a column address ADDR/C designating a region to be accessed of the memory bank 411 and transmits the generated row address ADDR/C to the PIM device 400 .

도 20에는 본 개시의 제2 실시예에 따른 PIM 시스템(30)에서 PIM 컨트롤러(500)를 구성하는 MAC 커맨드 발생기(540)로부터 발생되는 MAC 커맨드들(MAC_CMDs)이 도시되어 있다. 도 20에 나타낸 바와 같이, MAC 커맨드들(MAC_CMDs)은, 제1 내지 제4 MAC 커맨드 신호를 포함할 수 있다. 일 예에서 제1 MAC 커맨드 신호는, MAC 리드 신호(MAC_RD_BK)일 수 있다. 제2 MAC 커맨드 신호는, MAC 입력 래치 신호(MAC_L1)일 수 있다. 제3 MAC 커맨드 신호는, MAC 출력 래치 신호(MAC_L3)일 수 있다. 그리고 제4 MAC 커맨드 신호는, MAC 래치 리셋 신호(MAC_L_RST)일 수 있다.FIG. 20 shows MAC commands MAC_CMDs generated from the MAC command generator 540 constituting the PIM controller 500 in the PIM system 30 according to the second embodiment of the present disclosure. As shown in FIG. 20 , the MAC commands MAC_CMDs may include first to fourth MAC command signals. In an example, the first MAC command signal may be a MAC read signal MAC_RD_BK. The second MAC command signal may be a MAC input latch signal MAC_L1. The third MAC command signal may be a MAC output latch signal MAC_L3. In addition, the fourth MAC command signal may be a MAC latch reset signal MAC_L_RST.

MAC 리드 신호(MAC_RD_BK)는, 메모리 뱅크(411)로부터 제1 데이터, 예컨대 웨이트 데이터를 리드하여 MAC 오퍼레이터(420)로 전송하는 동작을 제어한다. MAC 입력 래치 신호(MAC_L1)는, 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로 전송되는 웨이트 데이터에 대한 입력 래치 동작을 제어한다. MAC 출력 래치 신호(MAC_L3)는, MAC 오퍼레이터(420) 내에서 생성되는 MAC 결과 데이터에 대한 출력 래치 동작을 제어한다. 그리고 MAC 래치 리셋 신호(MAC_L_RST)는, MAC 오퍼레이터(420) 내에서 생성되는 MAC 결과 데이터의 출력 동작과, MAC 오퍼레이터(420) 내에서의 출력 래치에 대한 리셋 동작을 제어한다.The MAC read signal MAC_RD_BK controls an operation of reading first data, for example, weight data, from the memory bank 411 and transmitting the read signal to the MAC operator 420 . The MAC input latch signal MAC_L1 controls an input latch operation for weight data transmitted from the memory bank 411 to the MAC operator 420 . The MAC output latch signal MAC_L3 controls an output latch operation for the MAC result data generated in the MAC operator 420 . In addition, the MAC latch reset signal MAC_L_RST controls an output operation of the MAC result data generated in the MAC operator 420 and a reset operation of the output latch in the MAC operator 420 .

본 예에 따른 PIM 시스템(30) 또한, 확정적(deterministic) MAC 연산 동작을 수행하도록 구성된다. 이에 따라 PIM 컨트롤러(500)로부터 PIM 장치(400)로 전송되는 MAC 커맨드들(MAC_CMDs) 각각은 정해진 시간 간격으로 순차적으로 생성된다. 따라서 PIM 컨트롤러(500)는, PIM 장치(400)로 MAC 연산 동작을 제어하는 MAC 커맨드들(MAC_CMDs) 각각의 생성을 위해, PIM 장치(400)로부터 별도의 동작 완료 신호를 PIM 컨트롤러(500)에 전송할 것을 요구하지 않는다. 일 예에서 확정적 MAC 연산 동작을 위해, PIM 장치(400) 내에서 MAC 커맨드들(MAC_CMDs) 각각에 의해 수행되는 MAC 연산 동작들 각각이 이루어지는 레이턴시(latency)가 고정적으로 설정될 수 있다. 그리고 PIM 컨트롤러(500)로부터 출력되는 MAC 커맨드들(MAC_CMDs) 각각은 설정된 레이턴시 간격으로 순차적으로 생성될 수 있다.The PIM system 30 according to the present example is also configured to perform a deterministic MAC operation operation. Accordingly, each of the MAC commands MAC_CMDs transmitted from the PIM controller 500 to the PIM device 400 is sequentially generated at predetermined time intervals. Accordingly, the PIM controller 500 transmits a separate operation completion signal from the PIM device 400 to the PIM controller 500 to generate each of the MAC commands (MAC_CMDs) for controlling the MAC operation by the PIM device 400 . do not ask to send In one example, for the deterministic MAC operation, a latency for each of the MAC operation operations performed by each of the MAC commands MAC_CMDs in the PIM device 400 may be fixedly set. In addition, each of the MAC commands MAC_CMDs output from the PIM controller 500 may be sequentially generated at a set latency interval.

도 21에는 본 개시의 제2 실시예에 따른 PIM 시스템(30)에서 도 4를 참조하여 설명한 MAC 연산 과정을 수행하는 과정을 나타내는 플로챠트가 도시되어 있다. 그리고 도 22 내지 도 25에는 본 개시의 제2 실시예에 따른 PIM 시스템(30)에서 도 4의 MAC 연산을 수행하는 과정들을 설명하기 위한 블록도들이 도시되어 있다. 도 22 내지 도 25와 함께 도 21을 참조하면, 단계 361에서, MAC 연산을 수행하기 위해, 제1 데이터, 즉 웨이트 데이터를 메모리 뱅크(411)에 라이트한다. 이에 따라 PIM 장치(400)의 메모리 뱅크(411)에는 웨이트 데이터가 저장된다. 본 예에서는 웨이트 데이터가 도 4의 웨이트 매트릭스를 구성하는 원소들(W0.0, …, W7.7)인 것으로 전제한다.21 is a flowchart illustrating a process of performing the MAC operation process described with reference to FIG. 4 in the PIM system 30 according to the second embodiment of the present disclosure. 22 to 25 are block diagrams for explaining processes of performing the MAC operation of FIG. 4 in the PIM system 30 according to the second embodiment of the present disclosure. Referring to FIG. 21 together with FIGS. 22 to 25 , in step 361 , first data, ie, weight data, is written to the memory bank 411 in order to perform a MAC operation. Accordingly, the weight data is stored in the memory bank 411 of the PIM device 400 . In this example, it is assumed that the weight data are elements (W0.0, ..., W7.7) constituting the weight matrix of FIG. 4 .

단계 362에서, 인퍼런스(inference) 요청이 있는지를 판단한다. 인퍼런스 요청은, PIM 시스템(30)의 외부에서 PIM 컨트롤러(500)로 전송될 수 있다. 일 예에서 인퍼런스 요청이 없는 경우, PIM 시스템(30)은 인퍼런스 요청이 전송될 때까지 대기 상태를 유지할 수 있다. 다른 예에서, 인퍼런스 요청이 없는 경우, PIM 시스템(30)은 인퍼런스 요청이 전송될 때까지 MAC 연산 동작 외의 다른 동작, 예컨대 데이터 리드/라이트와 같은 메모리 모드의 동작을 수행할 수도 있다. 본 예에서 인퍼런스 요청과 함께 제2 데이터, 즉 벡터 데이터가 함께 전송되는 것을 전제한다. 또한 본 예에서 벡터 데이터는 도 4의 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)인 것으로 전제한다. 단계 362에서 인퍼런스 요청이 전송되는 경우, 단계 363에서 PIM 컨트롤러(500)는, 인퍼런스 요청과 함께 전송되는 벡터 데이터를 글로벌 버퍼(412)에 라이트한다. 이에 따라 PIM 장치(400)의 글로벌 버퍼(412)에는 벡터 데이터가 저장된다.In step 362, it is determined whether there is an inference request. The inference request may be transmitted from the outside of the PIM system 30 to the PIM controller 500 . In an example, if there is no inference request, the PIM system 30 may maintain a standby state until the inference request is transmitted. In another example, if there is no inference request, the PIM system 30 may perform an operation other than the MAC operation operation, for example, a memory mode operation such as data read/write, until the inference request is transmitted. . In this example, it is assumed that the second data, ie, vector data, is transmitted together with the inference request. Also, in this example, it is assumed that the vector data are elements (X0.0, ..., X7.0) constituting the vector matrix of FIG. 4 . When the inference request is transmitted in step 362 , the PIM controller 500 writes the vector data transmitted together with the inference request to the global buffer 412 in step 363 . Accordingly, vector data is stored in the global buffer 412 of the PIM device 400 .

단계 364에서, 도 22에 나타낸 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 리드 신호(MAC_RD_BK)를 생성하여 PIM 장치(400)로 전송한다. 이때 PIM 컨트롤러(500)의 어드레스 발생기(550)는, 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(400)로 전송한다. 도면에 나타내지는 않았지만, PIM 장치(400) 내에 복수의 메모리 뱅크들이 배치되는 경우, 어드레스 발생기(550)는, PIM 장치(400) 내의 복수의 메모리 뱅크들 중 메모리 뱅크(411)를 지정하는 뱅크선택신호를 함께 전송할 수 있다. PIM 장치(400)로 전송되는 MAC 리드 신호(MAC_RD_BK)는, PIM 장치(400)의 메모리 뱅크(411)에 대한 데이터 리드 동작을 제어한다. 메모리 뱅크(411)는, MAC 리드 신호(MAC_RD_BK)에 응답하여, 메모리 뱅크(411)에서 로우/컬럼 어드레스(ADDR_R/ADDR_C)에 의해 지정된 영역에 저장되어 있는 웨이트 데이터 중 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)을 MAC 오퍼레이터(420)에 전송한다. 일 예에서 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로의 데이터 전송은, 메모리 뱅크(411)와 MAC 오퍼레이터(420) 사이의 데이터 전송만을 위한 BIO 라인을 통해 이루어질 수 있다.In step 364 , as shown in FIG. 22 , the MAC command generator 540 of the PIM controller 500 generates a MAC read signal MAC_RD_BK and transmits it to the PIM device 400 . In this case, the address generator 550 of the PIM controller 500 generates row/column addresses ADDR_R/ADDR_C and transmits the generated row/column addresses ADDR_R/ADDR_C to the PIM device 400 . Although not shown in the drawing, when a plurality of memory banks are disposed in the PIM device 400 , the address generator 550 selects a bank designating the memory bank 411 among the plurality of memory banks in the PIM device 400 . signals can be transmitted together. The MAC read signal MAC_RD_BK transmitted to the PIM device 400 controls a data read operation for the memory bank 411 of the PIM device 400 . The memory bank 411 is, in response to the MAC read signal MAC_RD_BK, in the first row of the weight matrix among the weight data stored in the area designated by the row/column addresses ADDR_R/ADDR_C in the memory bank 411 The present elements (W0.0, ..., W0.7) are transmitted to the MAC operator 420 . In one example, data transfer from the memory bank 411 to the MAC operator 420 may be performed through a BIO line for data transfer only between the memory bank 411 and the MAC operator 420 .

한편, 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로 웨이트 데이터가 전송되는 클럭에 동기되어, 글로벌 버퍼(412)에 저장되어 있는 벡터 데이터(X0.0, …, X7.0)도 MAC 오퍼레이터(420)로 전송된다. 이를 위해 PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)로부터의 MAC 리드 신호(MAC_RD_BK)의 전송에 동기되어 글로벌 버퍼(412)에 대한 리드 동작을 제어하는 제어신호가 발생될 수 있다. 글로벌 버퍼(412)와 MAC 오퍼레이터(420) 사이의 데이터 전송은 GIO 라인을 통해 이루어질 수 있다. 이에 따라 BIO 라인을 통해 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로의 웨이트 데이터 전송과 독립적으로 글로벌 버퍼(412)로부터 MAC 오퍼레이터(420)로의 벡터 데이터 전송이 이루어질 수 있다. 일 예에서 MAC 오퍼레이터(420)로의 웨이트 데이터 전송 및 벡터 데이터 전송은 각각 BIO 라인 및 GIO 라인을 통해 동시에 이루어질 수 있다.On the other hand, the vector data (X0.0, ..., X7.0) stored in the global buffer 412 in synchronization with the clock to which the weight data is transmitted from the memory bank 411 to the MAC operator 420 also 420). To this end, a control signal for controlling a read operation on the global buffer 412 may be generated in synchronization with the transmission of the MAC read signal MAC_RD_BK from the MAC command generator 540 of the PIM controller 500 . Data transmission between the global buffer 412 and the MAC operator 420 may be performed through a GIO line. Accordingly, vector data transmission from the global buffer 412 to the MAC operator 420 may be performed independently of the weight data transmission from the memory bank 411 to the MAC operator 420 through the BIO line. In an example, transmission of weight data and transmission of vector data to the MAC operator 420 may be performed simultaneously through a BIO line and a GIO line, respectively.

단계 365에서, 도 23에 나타낸 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 입력 래치 신호(MAC_L1)를 생성하여 PIM 장치(400)로 전송한다. MAC 입력 래치 신호(MAC_L1)는 PIM 장치(400)의 MAC 오퍼레이터(420)에 대한 웨이트 데이터의 입력 래치 동작 및 벡터 데이터의 입력 래치 동작을 제어한다. 이 입력 래치 동작에 의해, MAC 오퍼레이터(420)의 MAC 회로(122)로 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)과 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0)이 입력된다. MAC 회로(122)는, 웨이트 매트릭스의 열 수 및 벡터 매트릭스의 행 수와 동일한 개수, 즉 8개의 곱셈기들(122-11)을 포함할 수 있다. 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7) 각각과, 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0) 각각은 곱셈기들(122-11) 각각에 입력된다. In step 365 , as shown in FIG. 23 , the MAC command generator 540 of the PIM controller 500 generates a MAC input latch signal MAC_L1 and transmits it to the PIM device 400 . The MAC input latch signal MAC_L1 controls an input latch operation of weight data and an input latch operation of vector data to the MAC operator 420 of the PIM device 400 . By this input latch operation, the elements in the first row (W0.0, ..., W0.7) of the weight matrix and the elements in the first column of the vector matrix are sent to the MAC circuit 122 of the MAC operator 420 . (X0.0, …, X7.0) is input. The MAC circuit 122 may include a number equal to the number of columns of the weight matrix and the number of rows of the vector matrix, ie, eight multipliers 122-11. Each of the elements (W0.0, ..., W0.7) in the first row of the weight matrix and each of the elements (X0.0, ..., X7.0) in the first column of the vector matrix are multipliers 122 -11) is entered in each.

단계 366에서, MAC 오퍼레이터(420)의 MAC 회로(122)는, 입력되는 웨이트 매트릭스의 제R행 및 벡터 매트릭스의 제1열에 대한 MAC 연산을 수행한다. 초기값으로 R=1이 설정되며, 이에 따라 웨이트 매트릭스의 제1행 및 벡터 매트릭스의 제1열에 대한 MAC 연산이 수행된다. 구체적으로 도 3을 참조하여 설명한 바와 같이, 곱셈 로직(122-1)의 곱셈기들(122-11) 각각은, 입력되는 데이터에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 가산 로직(122-2)에 입력시킨다. 가산 로직(122-2)은, 곱셈기들(122-11)로부터 출력 데이터를 입력받아 가산하여 출력시킨다. 가산 로직(122-2)로부터 출력되는 출력 데이터는, 웨이트 매트릭스의 제1행과 벡터 매트릭스와의 MAC 연산 결과 데이터이다. 이에 따라 출력 데이터는, 도 4에 나타낸 MAC 결과 데이터들로 원소들(MAC0.0, …, MAC7.0)이 구성되는 8행 및 1열의 MAC 결과 매트릭스의 제1행 및 제1열의 원소(MAC0.0)를 구성한다. 가산 로직(122-2)으로부터 출력되는 출력 데이터(MAC0.0)는, 도 3을 참조하여 설명한 바와 같이, MAC 오퍼레이터(420)의 데이터 출력부(123) 내에 배치되는 출력 래치(123-1)로 입력된다.In step 366, the MAC circuit 122 of the MAC operator 420 performs a MAC operation on the R-th row of the input weight matrix and the first column of the vector matrix. R=1 is set as an initial value, and MAC operation is performed on the first row of the weight matrix and the first column of the vector matrix. As specifically described with reference to FIG. 3 , each of the multipliers 122-11 of the multiplication logic 122-1 performs a multiplication operation on input data, and adds the result to the addition logic 122-2. ) is entered. The addition logic 122-2 receives output data from the multipliers 122-11, adds them, and outputs them. The output data output from the addition logic 122-2 is MAC operation result data of the first row of the weight matrix and the vector matrix. Accordingly, the output data is the element (MAC0) in the first row and first column of the MAC result matrix of 8 rows and 1 column in which the elements MAC0.0, ..., MAC7.0 are composed of the MAC result data shown in FIG. .0) is configured. The output data MAC0.0 output from the addition logic 122-2 is an output latch 123-1 disposed in the data output unit 123 of the MAC operator 420, as described with reference to FIG. 3 . is entered as

단계 367에서, 도 24에 나타낸 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 출력 래치 신호(MAC_L3)를 생성하여 PIM 장치(400)로 전송한다. MAC 출력 래치 신호(MAC_L3)는 PIM 장치(400)의 MAC 오퍼레이터(420)에서의 MAC 결과 데이터(MAC0.0)의 출력 래치 동작을 제어한다. 이 출력 래치 동작에 의해, 도 3을 참조하여 설명한 바와 같이, MAC 오퍼레이터(420)의 MAC 회로(122)로부터 입력되는 MAC 결과 데이터(MAC0.0)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력된다. 출력 래치(123-1)로부터 출력되는 MAC 결과 데이터(MAC0.0)는 데이터 출력부(123)의 전달게이트(123-2)로 입력된다.In step 367 , as shown in FIG. 24 , the MAC command generator 540 of the PIM controller 500 generates a MAC output latch signal MAC_L3 and transmits it to the PIM device 400 . The MAC output latch signal MAC_L3 controls an output latch operation of the MAC result data MAC0.0 in the MAC operator 420 of the PIM device 400 . By this output latch operation, as described with reference to FIG. 3 , the MAC result data MAC0.0 input from the MAC circuit 122 of the MAC operator 420 is synchronized with the MAC output latch signal MAC_L3. output from the output latch 123-1. The MAC result data MAC0.0 output from the output latch 123-1 is input to the transfer gate 123-2 of the data output unit 123.

단계 368에서, 도 25에 나타낸 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 래치 리셋 신호(MAC_L_RST)를 생성하여 PIM 장치(400)로 전송한다. MAC 래치 리셋 신호(MAC_L_RST)는 PIM 장치(400)의 MAC 오퍼레이터(420)에서의 MAC 결과 데이터(MAC0.0)의 출력 동작과 출력 래치의 리셋 동작을 제어한다. 도 3을 참조하여 설명한 바와 같이, MAC 오퍼레이터(420)의 데이터 출력부(123)의 출력 래치(123-1)로부터 MAC 결과 데이터(MAC0.0)를 입력받은 전달게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 동기되어 MAC 결과 데이터(MAC0.0)를 출력시킨다. 일 예에서 MAC 오퍼레이터(120)로부터 출력되는 MAC 결과 데이터(MAC0.0)는, PIM 장치(400) 내에서 BIO 라인을 통해 메모리 뱅크(411)에 저장될 수 있다.In step 368 , as shown in FIG. 25 , the MAC command generator 540 of the PIM controller 500 generates a MAC latch reset signal MAC_L_RST and transmits it to the PIM device 400 . The MAC latch reset signal MAC_L_RST controls the output operation of the MAC result data MAC0.0 and the reset operation of the output latch by the MAC operator 420 of the PIM device 400 . As described with reference to FIG. 3 , the transfer gate 123-2 receiving the MAC result data MAC0.0 from the output latch 123-1 of the data output unit 123 of the MAC operator 420, The MAC result data MAC0.0 is output in synchronization with the MAC latch reset signal MAC_L_RST. In an example, the MAC result data MAC0.0 output from the MAC operator 120 may be stored in the memory bank 411 through the BIO line in the PIM device 400 .

단계 369에서, MAC 연산이 수행된 웨이트 매트릭스의 행 수인 "R"을 하나 증가시킨다. 지금까지 웨이트 매트릭스의 제1행 내지 제8행 중 제1행에 대한 MAC 연산이 수행됨에 따라, 단계 369에서 웨이트 매트릭스의 행 수는 제1행에서 제2행으로 변경된다. 단계 370에서는 단계 369에 의해 변경된 웨이트 매트릭스의 행 수가 웨이트 매트릭스의 마지막 행, 즉 제8행보다 큰지의 여부를 판단한다. 단계 369에 의해 변경된 웨이트 매트릭스의 행 수가 제2행이므로, 단계 370에서의 판단은 단계 369에 의해 변경된 웨이트 매트릭스의 행 수가 제8행보다 작은 것으로 판단하여, 단계 364의 과정을 다시 수행한다.In step 369, "R" which is the number of rows of the weight matrix on which the MAC operation is performed is increased by one. As the MAC operation is performed on the first row among the first to eighth rows of the weight matrix so far, the number of rows of the weight matrix is changed from the first row to the second row in step 369 . In step 370, it is determined whether the number of rows of the weight matrix changed by step 369 is greater than the last row, that is, the eighth row of the weight matrix. Since the number of rows of the weight matrix changed by step 369 is the second row, the determination in step 370 determines that the number of rows of the weight matrix changed by step 369 is smaller than the eighth row, and the process of step 364 is performed again.

단계 370으로부터 피드백되면, MAC 연산이 이루어지는 웨이트 매트릭스의 행 수가 다른 점을 제외하고는 위에서 설명한 바와 동일한 단계 364 내지 단계 370의 과정이 수행된다. 즉 단계 369에서 웨이트 매트릭스의 행 수가 제2행으로 증가됨에 따라, 웨이트 매트릭스의 제1행 대신 제2행과 벡터 매트릭스의 MAC 연산이 이루어진다는 점에서만 차이가 있다. 단계 370에서 피드백되어 단계 364 내지 단계 370을 수행하는 과정은, 웨이트 매트릭스의 모든 행 수, 즉 제1행 내지 제8행과 벡터 매트릭스의 MAC 연산이 종료될 때까지 이루어진다. 웨이트 매트릭스의 제8행에 대한 MAC 연산이 종료되어, 단계 369에서 웨이트 매트릭스의 행 수가 제8행에서 제9행으로 변경되면, 단계 370의 판단에서 웨이트 매트릭스의 행 수인 제9행이 마지막 행인 제8행보다 크므로, MAC 연산 동작을 종료한다.Upon feedback from step 370, the same processes as described above in steps 364 to 370 are performed except that the number of rows of the weight matrix on which the MAC operation is performed is different. That is, as the number of rows of the weight matrix is increased to the second row in step 369, there is a difference only in that the MAC operation of the second row and the vector matrix is performed instead of the first row of the weight matrix. The process of performing steps 364 to 370 after being fed back in step 370 is performed until the number of all rows of the weight matrix, that is, the MAC operation of the first to eighth rows and the vector matrix is finished. When the MAC operation on the 8th row of the weight matrix is completed and the number of rows of the weight matrix is changed from the 8th row to the 9th row in step 369, the ninth row, which is the number of rows of the weight matrix, is the last row in the judgment of step 370. Since it is greater than 8 lines, the MAC operation is terminated.

도 26에는 본 개시의 제2 실시예에 따른 PIM 시스템(30)에서 도 13을 참조하여 설명한 연산 과정을 수행하는 과정을 나타내는 플로챠트가 도시되어 있다. 본 예에 따른 연산 과정 수행을 위해, PIM 장치(400)의 MAC 오퍼레이터(420)는, 도 15에 나타낸 MAC 오퍼레이터(120-1)와 동일한 구성을 갖는다. 도 26을 도 19와 함께 참조하면, 단계 381에서, MAC 연산을 수행하기 위해, 제1 데이터, 즉 웨이트 데이터를 메모리 뱅크(411)에 라이트한다. 이에 따라 PIM 장치(400)의 메모리 뱅크(411)에는 웨이트 데이터가 저장된다. 본 예에서는 웨이트 데이터가 도 13의 웨이트 매트릭스를 구성하는 원소들(W0.0, …, W7.7)인 것으로 전제한다.FIG. 26 is a flowchart illustrating a process of performing the calculation process described with reference to FIG. 13 in the PIM system 30 according to the second embodiment of the present disclosure. In order to perform the calculation process according to the present example, the MAC operator 420 of the PIM device 400 has the same configuration as the MAC operator 120-1 shown in FIG. 15 . Referring to FIG. 26 together with FIG. 19 , in step 381 , first data, that is, weight data, is written to the memory bank 411 in order to perform a MAC operation. Accordingly, the weight data is stored in the memory bank 411 of the PIM device 400 . In this example, it is assumed that the weight data are elements (W0.0, ..., W7.7) constituting the weight matrix of FIG. 13 .

단계 382에서, 인퍼런스(inference) 요청이 있는지를 판단한다. 인퍼런스 요청은, PIM 시스템(30)의 외부에서 PIM 컨트롤러(500)로 전송될 수 있다. 일 예에서 인퍼런스 요청이 없는 경우, PIM 시스템(30)은 인퍼런스 요청이 전송될 때까지 대기 상태를 유지할 수 있다. 다른 예에서, 인퍼런스 요청이 없는 경우, PIM 시스템(30)은 인퍼런스 요청이 전송될 때까지 MAC 연산 동작 외의 다른 동작, 예컨대 데이터 리드/라이트와 같은 메모리 모드의 동작을 수행할 수도 있다. 본 예에서 인퍼런스 요청과 함께 제2 데이터, 즉 벡터 데이터가 함께 전송되는 것을 전제한다. 또한 본 예에서 벡터 데이터는 도 13의 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)인 것으로 전제한다. 단계 382에서 인퍼런스 요청이 전송되는 경우, 단계 383에서 PIM 컨트롤러(500)는, 인퍼런스 요청과 함께 전송되는 벡터 데이터를 글로벌 버퍼(412)에 라이트한다. 이에 따라 PIM 장치(400)의 글로벌 버퍼(412)에는 벡터 데이터가 저장된다.In step 382, it is determined whether there is an inference request. The inference request may be transmitted from the outside of the PIM system 30 to the PIM controller 500 . In an example, if there is no inference request, the PIM system 30 may maintain a standby state until the inference request is transmitted. In another example, if there is no inference request, the PIM system 30 may perform an operation other than the MAC operation operation, for example, a memory mode operation such as data read/write, until the inference request is transmitted. . In this example, it is assumed that the second data, ie, vector data, is transmitted together with the inference request. Also, in this example, it is assumed that the vector data are elements (X0.0, ..., X7.0) constituting the vector matrix of FIG. 13 . When the inference request is transmitted in step 382 , in step 383 , the PIM controller 500 writes vector data transmitted along with the inference request to the global buffer 412 . Accordingly, vector data is stored in the global buffer 412 of the PIM device 400 .

단계 384에서, MAC 오퍼레이터(420)의 출력 래치를 바이어스 데이터로 초기 세팅하고, 초기 세팅된 바이어스 데이터를 MAC 오퍼레이터(420)의 누적 가산기로 피드백시킨다. 이 과정은, 도 13을 참조하여 설명한 연산에서 MAC 결과 매트릭스에 바이어스 매트릭스를 매트릭스 덧셈 연산시키기 위한 과정이다. 즉 도 15를 참조하여 설명한 바와 같이, MAC 오퍼레이터(420)의 데이터 출력부(123-A) 내의 출력 래치(123-1)를 바이어스 데이터로 초기 세팅시킨다. 매트릭스 곱셈 연산이 웨이트 매트릭스의 제1행에 대해 수행되는 과정이므로, 바이어스 데이터로서 바이어스 매트릭스의 제1행 및 제1열 원소(B0.0)가 출력 래치(123-1)에 초기 세팅된다. 출력 래치(123-1)는, 바이어스 데이터(B0.0)를 출력시키고, 출력 래치(123-1)로부터 출력되는 바이어스 데이터(B0.0)는 가산 로직(122-2)의 누적 가산기(122-21D)로 입력된다.In step 384 , the output latch of the MAC operator 420 is initially set to bias data, and the initially set bias data is fed back to the cumulative adder of the MAC operator 420 . This process is a process for the matrix addition operation of the bias matrix to the MAC result matrix in the operation described with reference to FIG. 13 . That is, as described with reference to FIG. 15 , the output latch 123-1 in the data output unit 123-A of the MAC operator 420 is initially set to bias data. Since the matrix multiplication operation is performed on the first row of the weight matrix, the first row and first column elements B0.0 of the bias matrix are initially set in the output latch 123-1 as bias data. The output latch 123-1 outputs the bias data B0.0, and the bias data B0.0 output from the output latch 123-1 is the accumulation adder 122 of the addition logic 122-2. -21D) is entered.

일 예에서 출력 래치(123-1)로부터 바이어스 데이터(B0,0)를 출력시켜 누적 가산기(122-21D)로 피드백시키기 위해, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는 MAC 출력 래치 신호(MAC_L3)를 PIM 장치(400)의 MAC 오퍼레이터(420)로 전송시킬 수 있다. MAC 오퍼레이터(420)의 누적 가산기(122-21D)는, 후속으로 MAC 연산이 수행되는 경우, 가산 로직(122-2)의 마지막 스테이지에 배치되는 가산기(122-21C)로부터 출력되는 MAC 결과 데이터(MAC0.0)와 피드백된 바이어스 데이터(B0.0)를 가산하고, 그 결과인 바이어스된 데이터(Y0.0)를 출력하여 출력 래치(123-1)로 입력시킨다. 바이어스된 데이터(Y0.0)는, 후속으로 전송되는 MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력될 수 있다.In one example, in order to output the bias data B0,0 from the output latch 123-1 and feed it back to the accumulation adder 122-21D, the MAC command generator 540 of the PIM controller 500 generates a MAC output latch signal. (MAC_L3) may be transmitted to the MAC operator 420 of the PIM device 400 . The accumulation adders 122-21D of the MAC operator 420, when the MAC operation is subsequently performed, the MAC result data outputted from the adders 122-21C disposed in the last stage of the addition logic 122-2 ( MAC0.0) and the fed back bias data B0.0 are added, and the resulting biased data Y0.0 is output and input to the output latch 123-1. The biased data Y0.0 may be output from the output latch 123 - 1 in synchronization with the subsequently transmitted MAC output latch signal MAC_L3 .

단계 385에서, 도 22를 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 리드 신호(MAC_RD_BK)를 생성하여 PIM 장치(400)로 전송한다. 이때 PIM 컨트롤러(500)의 어드레스 발생기(550)는, 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(400)로 전송한다. PIM 장치(400)로 전송되는 MAC 리드 신호(MAC_RD_BK)는, PIM 장치(400)의 메모리 뱅크(411)에 대한 데이터 리드 동작을 제어한다. 메모리 뱅크(411)는, MAC 리드 신호(MAC_RD_BK)에 응답하여, 메모리 뱅크(411)에서 로우/컬럼 어드레스(ADDR_R/ADDR_C)에 의해 지정된 영역에 저장되어 있는 웨이트 데이터 중 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)을 MAC 오퍼레이터(420)에 전송한다. 일 예에서 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로의 데이터 전송은, 메모리 뱅크(411)와 MAC 오퍼레이터(420) 사이의 데이터 전송만을 위한 BIO 라인을 통해 이루어질 수 있다.In step 385 , as described with reference to FIG. 22 , the MAC command generator 540 of the PIM controller 500 generates a MAC read signal MAC_RD_BK and transmits it to the PIM device 400 . In this case, the address generator 550 of the PIM controller 500 generates row/column addresses ADDR_R/ADDR_C and transmits the generated row/column addresses ADDR_R/ADDR_C to the PIM device 400 . The MAC read signal MAC_RD_BK transmitted to the PIM device 400 controls a data read operation for the memory bank 411 of the PIM device 400 . The memory bank 411 is, in response to the MAC read signal MAC_RD_BK, in the first row of the weight matrix among the weight data stored in the area designated by the row/column addresses ADDR_R/ADDR_C in the memory bank 411 The present elements (W0.0, ..., W0.7) are transmitted to the MAC operator 420 . In one example, data transfer from the memory bank 411 to the MAC operator 420 may be performed through a BIO line for data transfer only between the memory bank 411 and the MAC operator 420 .

한편, 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로 웨이트 데이터가 전송되는 클럭에 동기되어, 글로벌 버퍼(412)에 저장되어 있는 벡터 데이터(X0.0, …, X7.0)도 MAC 오퍼레이터(420)로 전송된다. 이를 위해 PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)로부터의 MAC 리드 신호(MAC_RD_BK)의 전송에 동기되어 글로벌 버퍼(412)에 대한 리드 동작을 제어하는 제어신호가 발생될 수 있다. 글로벌 버퍼(412)와 MAC 오퍼레이터(420) 사이의 데이터 전송은 GIO 라인을 통해 이루어질 수 있다. 이에 따라 BIO 라인을 통해 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로의 웨이트 데이터 전송과 독립적으로 글로벌 버퍼(412)로부터 MAC 오퍼레이터(420)로의 벡터 데이터 전송이 이루어질 수 있다. 일 예에서 MAC 오퍼레이터(420)로의 웨이트 데이터 전송 및 벡터 데이터 전송은 각각 BIO 라인 및 GIO 라인을 통해 동시에 이루어질 수 있다.On the other hand, the vector data (X0.0, ..., X7.0) stored in the global buffer 412 in synchronization with the clock to which the weight data is transmitted from the memory bank 411 to the MAC operator 420 also 420). To this end, a control signal for controlling a read operation on the global buffer 412 may be generated in synchronization with the transmission of the MAC read signal MAC_RD_BK from the MAC command generator 540 of the PIM controller 500 . Data transmission between the global buffer 412 and the MAC operator 420 may be performed through a GIO line. Accordingly, vector data transmission from the global buffer 412 to the MAC operator 420 may be performed independently of the weight data transmission from the memory bank 411 to the MAC operator 420 through the BIO line. In an example, transmission of weight data and transmission of vector data to the MAC operator 420 may be performed simultaneously through a BIO line and a GIO line, respectively.

단계 386에서, 도 23을 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 입력 래치 신호(MAC_L1)를 생성하여 PIM 장치(400)로 전송한다. MAC 입력 래치 신호(MAC_L1)는 PIM 장치(400)의 MAC 오퍼레이터(420)에 대한 웨이트 데이터의 입력 래치 동작 및 벡터 데이터의 입력 래치 동작을 제어한다. 이 입력 래치 동작에 의해, MAC 오퍼레이터(420)의 MAC 회로(122)로 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)과 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0)이 입력된다. MAC 회로(122)는, 웨이트 매트릭스의 열 수 및 벡터 매트릭스의 행 수와 동일한 개수, 즉 8개의 곱셈기들(122-11)을 포함할 수 있다. 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7) 각각과, 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0) 각각은 곱셈기들(122-11) 각각에 입력된다. In step 386 , as described with reference to FIG. 23 , the MAC command generator 540 of the PIM controller 500 generates a MAC input latch signal MAC_L1 and transmits it to the PIM device 400 . The MAC input latch signal MAC_L1 controls an input latch operation of weight data and an input latch operation of vector data to the MAC operator 420 of the PIM device 400 . By this input latch operation, the elements in the first row (W0.0, ..., W0.7) of the weight matrix and the elements in the first column of the vector matrix are sent to the MAC circuit 122 of the MAC operator 420 . (X0.0, …, X7.0) is input. The MAC circuit 122 may include a number equal to the number of columns of the weight matrix and the number of rows of the vector matrix, ie, eight multipliers 122-11. Each of the elements (W0.0, ..., W0.7) in the first row of the weight matrix and each of the elements (X0.0, ..., X7.0) in the first column of the vector matrix are multipliers 122 -11) is entered in each.

단계 387에서, MAC 오퍼레이터(420)의 MAC 회로(122)는, 입력되는 웨이트 매트릭스의 제R행 및 벡터 매트릭스의 제1열에 대한 MAC 연산을 수행한다. 초기값으로 R=1이 설정되며, 이에 따라 웨이트 매트릭스의 제1행 및 벡터 매트릭스의 제1열에 대한 MAC 연산이 수행된다. 구체적으로 곱셈 로직(122-1)의 곱셈기들(122-11) 각각은, 입력되는 데이터에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 가산 로직(122-2)에 입력시킨다. 가산 로직(122-2)은, 곱셈기들(122-11)로부터 출력 데이터를 입력받아 가산연산을 수행하고, 그 결과를 누적 가산기(122-21D)로 출력시킨다. 가산 로직(122-2)의 가산기(122-21C)로부터 출력되는 출력 데이터는, 웨이트 매트릭스의 제1행과 벡터 매트릭스와의 MAC 연산 결과 데이터(MAC0.0)이다. 누적 가산기(122-21D)는, 가산기(122-21C)로부터 출력되는 매트릭스 곱셈 결과 데이터(MAC0.0)와 출력 래치(123-1)로부터 피드백된 바이어스 데이터(B0.0)를 가산하여 출력시킨다. 누적 가산기(122-21D)로부터 출력되는 출력 데이터, 즉 바이어스된 결과 데이터(Y0.0)는, MAC 오퍼레이터(120)의 데이터 출력부(123-A) 내에 배치되는 출력 래치(123-1)로 입력된다.In step 387, the MAC circuit 122 of the MAC operator 420 performs a MAC operation on the R-th row of the input weight matrix and the first column of the vector matrix. R=1 is set as an initial value, and MAC operation is performed on the first row of the weight matrix and the first column of the vector matrix. Specifically, each of the multipliers 122-11 of the multiplication logic 122-1 performs a multiplication operation on input data, and inputs the result data to the addition logic 122-2. The addition logic 122-2 receives output data from the multipliers 122-11, performs an addition operation, and outputs the result to the accumulation adder 122-21D. The output data output from the adder 122-21C of the addition logic 122-2 is MAC operation result data MAC0.0 of the first row of the weight matrix and the vector matrix. The accumulation adder 122-21D adds and outputs the matrix multiplication result data MAC0.0 output from the adder 122-21C and the bias data B0.0 fed back from the output latch 123-1. . The output data output from the accumulation adder 122-21D, that is, the biased result data Y0.0, is transferred to the output latch 123-1 disposed in the data output unit 123-A of the MAC operator 120. is input

단계 388에서, 도 24를 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 출력 래치 신호(MAC_L3)를 생성하여 PIM 장치(400)로 전송한다. MAC 출력 래치 신호(MAC_L3)는 PIM 장치(400)의 MAC 오퍼레이터(420)에서의 출력 래치(123-1)의 출력 래치 동작을 제어한다. 이 출력 래치 동작에 의해, MAC 오퍼레이터(420)의 출력 래치(123-1)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 바이어스된 결과 데이터(Y0.0)를 출력시킨다. 출력 래치(123-1)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는 데이터 출력부(123-A)의 전달게이트(123-2)로 입력된다.In step 388 , as described with reference to FIG. 24 , the MAC command generator 540 of the PIM controller 500 generates a MAC output latch signal MAC_L3 and transmits it to the PIM device 400 . The MAC output latch signal MAC_L3 controls an output latch operation of the output latch 123 - 1 in the MAC operator 420 of the PIM device 400 . By this output latch operation, the output latch 123-1 of the MAC operator 420 outputs the biased result data Y0.0 in synchronization with the MAC output latch signal MAC_L3. The biased result data Y0.0 output from the output latch 123-1 is input to the transfer gate 123-2 of the data output unit 123-A.

단계 389에서, 도 25를 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 래치 리셋 신호(MAC_L_RST)를 생성하여 PIM 장치(400)로 전송한다. MAC 래치 리셋 신호(MAC_L_RST)는 PIM 장치(400)의 MAC 오퍼레이터(420)에서의 바이어스된 결과 데이터(Y0.0)의 출력 동작과 출력 래치의 리셋 동작을 제어한다. MAC 오퍼레이터(420)의 데이터 출력부(123)의 출력 래치(123-1)로부터 바이어스된 결과 데이터(Y0.0)를 입력받은 전달게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 동기되어 바이어스된 결과 데이터(Y0.0)를 출력시킨다. 일 예에서 MAC 오퍼레이터(120)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는, PIM 장치(400) 내에서 BIO 라인을 통해 메모리 뱅크(411)에 저장될 수 있다.In step 389 , as described with reference to FIG. 25 , the MAC command generator 540 of the PIM controller 500 generates a MAC latch reset signal MAC_L_RST and transmits it to the PIM device 400 . The MAC latch reset signal MAC_L_RST controls the output operation of the biased result data Y0.0 and the reset operation of the output latch by the MAC operator 420 of the PIM device 400 . The transfer gate 123-2 receiving the bias result data Y0.0 from the output latch 123-1 of the data output unit 123 of the MAC operator 420 receives the MAC latch reset signal MAC_L_RST. Synchronously biased result data (Y0.0) is output. In one example, the biased result data Y0.0 output from the MAC operator 120 may be stored in the memory bank 411 through the BIO line in the PIM device 400 .

단계 390에서, MAC 연산이 수행된 웨이트 매트릭스의 행 수인 "R"을 하나 증가시킨다. 지금까지 웨이트 매트릭스의 제1행 내지 제8행 중 제1행에 대한 MAC 연산이 수행됨에 따라, 단계 390에서 웨이트 매트릭스의 행 수는 제1행에서 제2행으로 변경된다. 단계 391에서는 단계 390에 의해 변경된 웨이트 매트릭스의 행 수가 웨이트 매트릭스의 마지막 행, 즉 제8행보다 큰지의 여부를 판단한다. 단계 390에 의해 변경된 웨이트 매트릭스의 행 수가 제2행이므로, 단계 391에서의 판단은 단계 390에 의해 변경된 웨이트 매트릭스의 행 수가 제8행보다 작은 것으로 판단하여, 단계 384의 과정을 다시 수행한다.In step 390, "R" which is the number of rows of the weight matrix on which the MAC operation is performed is increased by one. As the MAC operation is performed on the first row among the first to eighth rows of the weight matrix so far, the number of rows of the weight matrix is changed from the first row to the second row in step 390 . In step 391, it is determined whether the number of rows of the weight matrix changed by step 390 is greater than the last row, that is, the eighth row of the weight matrix. Since the number of rows of the weight matrix changed by step 390 is the second row, it is determined in step 391 that the number of rows of the weight matrix changed by step 390 is smaller than the eighth row, and the process of step 384 is performed again.

단계 391으로부터 피드백되면, MAC 연산이 이루어지는 웨이트 매트릭스의 행 수가 다른 점을 제외하고는 위에서 설명한 바와 동일한 단계 384 내지 단계 391의 과정이 수행된다. 즉 단계 389에서 웨이트 매트릭스의 행 수가 제2행으로 증가됨에 따라, 웨이트 매트릭스의 제1행 대신 제2행과 벡터 매트릭스의 MAC 연산이 이루어진다는 점에서만 차이가 있다. 단계 390에서 피드백되어 단계 384 내지 단계 390을 수행하는 과정은, 웨이트 매트릭스의 모든 행 수, 즉 제1행 내지 제8행과 벡터 매트릭스의 MAC 연산이 종료될 때까지 이루어진다. 웨이트 매트릭스의 제8행에 대한 MAC 연산이 종료되어, 단계 389에서 웨이트 매트릭스의 행 수가 제8행에서 제9행으로 변경되면, 단계 390의 판단에서 웨이트 매트릭스의 행 수인 제9행이 마지막 행인 제8행보다 크므로, MAC 연산 동작을 종료한다.When fed back from step 391, the same processes of steps 384 to 391 as described above are performed except that the number of rows of the weight matrix on which the MAC operation is performed is different. That is, as the number of rows of the weight matrix is increased to the second row in step 389, there is a difference only in that the MAC operation of the second row and the vector matrix is performed instead of the first row of the weight matrix. The process of performing steps 384 to 390 after being fed back in step 390 is performed until the number of all rows of the weight matrix, that is, the MAC operation of the first to eighth rows and the vector matrix is finished. When the MAC operation on the eighth row of the weight matrix is finished and the number of rows of the weight matrix is changed from the eighth row to the ninth row in step 389, the ninth row, which is the number of rows of the weight matrix, is the last row in the judgment of step 390. Since it is greater than 8 lines, the MAC operation is terminated.

도 27에는 본 개시의 제2 실시예에 따른 PIM 시스템(30)에서 도 16을 참조하여 설명한 연산 과정을 수행하는 과정을 나타내는 플로챠트가 도시되어 있다. 본 예에 따른 연산 과정 수행을 위해, PIM 장치(400)의 MAC 오퍼레이터(420)는, 도 18에 나타낸 MAC 오퍼레이터(120-2)와 동일한 구성을 갖는다. 도 27을 도 18과 함께 참조하면, 단계 601에서, MAC 연산을 수행하기 위해, 제1 데이터, 즉 웨이트 데이터를 메모리 뱅크(411)에 라이트한다. 이에 따라 PIM 장치(400)의 메모리 뱅크(411)에는 웨이트 데이터가 저장된다. 본 예에서는 웨이트 데이터가 도 16의 웨이트 매트릭스를 구성하는 원소들(W0.0, …, W7.7)인 것으로 전제한다.FIG. 27 is a flowchart illustrating a process of performing the calculation process described with reference to FIG. 16 in the PIM system 30 according to the second embodiment of the present disclosure. In order to perform the calculation process according to the present example, the MAC operator 420 of the PIM device 400 has the same configuration as the MAC operator 120 - 2 shown in FIG. 18 . Referring to FIG. 27 together with FIG. 18 , in step 601 , first data, that is, weight data, is written to the memory bank 411 in order to perform a MAC operation. Accordingly, the weight data is stored in the memory bank 411 of the PIM device 400 . In this example, it is assumed that the weight data are elements (W0.0, ..., W7.7) constituting the weight matrix of FIG. 16 .

단계 602에서, 인퍼런스(inference) 요청이 있는지를 판단한다. 인퍼런스 요청은, PIM 시스템(30)의 외부에서 PIM 컨트롤러(500)로 전송될 수 있다. 일 예에서 인퍼런스 요청이 없는 경우, PIM 시스템(30)은 인퍼런스 요청이 전송될 때까지 대기 상태를 유지할 수 있다. 다른 예에서, 인퍼런스 요청이 없는 경우, PIM 시스템(30)은 인퍼런스 요청이 전송될 때까지 MAC 연산 동작 외의 다른 동작, 예컨대 데이터 리드/라이트와 같은 메모리 모드의 동작을 수행할 수도 있다. 본 예에서 인퍼런스 요청과 함께 제2 데이터, 즉 벡터 데이터가 함께 전송되는 것을 전제한다. 또한 본 예에서 벡터 데이터는 도 16의 벡터 매트릭스를 구성하는 원소들(X0.0, …, X7.0)인 것으로 전제한다. 단계 602에서 인퍼런스 요청이 전송되는 경우, 단계 603에서 PIM 컨트롤러(500)는, 인퍼런스 요청과 함께 전송되는 벡터 데이터를 글로벌 버퍼(412)에 라이트한다. 이에 따라 PIM 장치(400)의 글로벌 버퍼(412)에는 벡터 데이터가 저장된다.In step 602, it is determined whether there is an inference request. The inference request may be transmitted from the outside of the PIM system 30 to the PIM controller 500 . In an example, if there is no inference request, the PIM system 30 may maintain a standby state until the inference request is transmitted. In another example, if there is no inference request, the PIM system 30 may perform an operation other than the MAC operation operation, for example, a memory mode operation such as data read/write, until the inference request is transmitted. . In this example, it is assumed that the second data, ie, vector data, is transmitted together with the inference request. Also, in this example, it is assumed that the vector data are elements (X0.0, ..., X7.0) constituting the vector matrix of FIG. 16 . When the inference request is transmitted in step 602 , in step 603 , the PIM controller 500 writes the vector data transmitted along with the inference request to the global buffer 412 . Accordingly, vector data is stored in the global buffer 412 of the PIM device 400 .

단계 604에서, MAC 오퍼레이터(420)의 출력 래치를 바이어스 데이터로 초기 세팅하고, 초기 세팅된 바이어스 데이터를 MAC 오퍼레이터(420)의 누적 가산기로 피드백시킨다. 이 과정은, 도 16을 참조하여 설명한 연산에서 MAC 결과 매트릭스에 바이어스 매트릭스를 매트릭스 덧셈 연산시키기 위한 과정이다. 즉 도 18을 참조하여 설명한 바와 같이, MAC 오퍼레이터(420)의 데이터 출력부(123-B) 내의 출력 래치(123-1)를 바이어스 데이터로 초기 세팅시킨다. 매트릭스 곱셈 연산이 웨이트 매트릭스의 제1행에 대해 수행되는 과정이므로, 바이어스 데이터로서 바이어스 매트릭스의 제1행 및 제1열 원소(B0.0)가 출력 래치(123-1)에 초기 세팅된다. 출력 래치(123-1)는, 바이어스 데이터(B0.0)를 출력시키고, 출력 래치(123-1)로부터 출력되는 바이어스 데이터(B0.0)는 가산 로직(122-2)의 누적 가산기(122-21D)로 피드백되어 입력된다.In step 604 , the output latch of the MAC operator 420 is initially set to bias data, and the initially set bias data is fed back to the cumulative adder of the MAC operator 420 . This process is a process for the matrix addition operation of the bias matrix to the MAC result matrix in the operation described with reference to FIG. 16 . That is, as described with reference to FIG. 18 , the output latch 123-1 in the data output unit 123-B of the MAC operator 420 is initially set to bias data. Since the matrix multiplication operation is performed on the first row of the weight matrix, the first row and first column elements B0.0 of the bias matrix are initially set in the output latch 123-1 as bias data. The output latch 123-1 outputs the bias data B0.0, and the bias data B0.0 output from the output latch 123-1 is the accumulation adder 122 of the addition logic 122-2. -21D) is fed back.

일 예에서 출력 래치(123-1)로부터 바이어스 데이터(B0,0)를 출력시켜 누적 가산기(122-21D)로 피드백시키기 위해, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는 MAC 출력 래치 신호(MAC_L3)를 PIM 장치(400)의 MAC 오퍼레이터(420)로 전송시킬 수 있다. MAC 오퍼레이터(420)의 누적 가산기(122-21D)는, 후속으로 MAC 연산이 수행되는 경우, 가산 로직(122-2)의 마지막 스테이지에 배치되는 가산기(122-21C)로부터 출력되는 MAC 결과 데이터(MAC0.0)와 피드백된 바이어스 데이터(B0.0)를 가산하고, 그 결과인 바이어스된 데이터(Y0.0)를 출력하여 출력 래치(123-1)로 입력시킨다. 바이어스된 데이터(Y0.0)는, 후속으로 전송되는 MAC 출력 래치 신호(MAC_L3)에 동기되어 출력 래치(123-1)로부터 출력될 수 있다.In one example, in order to output the bias data B0,0 from the output latch 123-1 and feed it back to the accumulation adder 122-21D, the MAC command generator 540 of the PIM controller 500 generates a MAC output latch signal. (MAC_L3) may be transmitted to the MAC operator 420 of the PIM device 400 . The accumulation adders 122-21D of the MAC operator 420, when the MAC operation is subsequently performed, the MAC result data outputted from the adders 122-21C disposed in the last stage of the addition logic 122-2 ( MAC0.0) and the fed back bias data B0.0 are added, and the resulting biased data Y0.0 is output and input to the output latch 123-1. The biased data Y0.0 may be output from the output latch 123 - 1 in synchronization with the subsequently transmitted MAC output latch signal MAC_L3 .

단계 605에서, 도 22를 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 리드 신호(MAC_RD_BK)를 생성하여 PIM 장치(400)로 전송한다. 이때 PIM 컨트롤러(500)의 어드레스 발생기(550)는, 로우/컬럼 어드레스(ADDR_R/ADDR_C)를 생성하여 PIM 장치(400)로 전송한다. PIM 장치(400)로 전송되는 MAC 리드 신호(MAC_RD_BK)는, PIM 장치(400)의 메모리 뱅크(411)에 대한 데이터 리드 동작을 제어한다. 메모리 뱅크(411)는, MAC 리드 신호(MAC_RD_BK)에 응답하여, 메모리 뱅크(411)에서 로우/컬럼 어드레스(ADDR_R/ADDR_C)에 의해 지정된 영역에 저장되어 있는 웨이트 데이터 중 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)을 MAC 오퍼레이터(420)에 전송한다. 일 예에서 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로의 데이터 전송은, 메모리 뱅크(411)와 MAC 오퍼레이터(420) 사이의 데이터 전송만을 위한 BIO 라인을 통해 이루어질 수 있다.In step 605 , as described with reference to FIG. 22 , the MAC command generator 540 of the PIM controller 500 generates a MAC read signal MAC_RD_BK and transmits the generated MAC read signal MAC_RD_BK to the PIM device 400 . In this case, the address generator 550 of the PIM controller 500 generates row/column addresses ADDR_R/ADDR_C and transmits the generated row/column addresses ADDR_R/ADDR_C to the PIM device 400 . The MAC read signal MAC_RD_BK transmitted to the PIM device 400 controls a data read operation for the memory bank 411 of the PIM device 400 . The memory bank 411 is, in response to the MAC read signal MAC_RD_BK, in the first row of the weight matrix among the weight data stored in the area designated by the row/column addresses ADDR_R/ADDR_C in the memory bank 411 The present elements (W0.0, ..., W0.7) are transmitted to the MAC operator 420 . In one example, data transfer from the memory bank 411 to the MAC operator 420 may be performed through a BIO line for data transfer only between the memory bank 411 and the MAC operator 420 .

한편, 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로 웨이트 데이터가 전송되는 클럭에 동기되어, 글로벌 버퍼(412)에 저장되어 있는 벡터 데이터(X0.0, …, X7.0)도 MAC 오퍼레이터(420)로 전송된다. 이를 위해 PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)로부터의 MAC 리드 신호(MAC_RD_BK)의 전송에 동기되어 글로벌 버퍼(412)에 대한 리드 동작을 제어하는 제어신호가 발생될 수 있다. 글로벌 버퍼(412)와 MAC 오퍼레이터(420) 사이의 데이터 전송은 GIO 라인을 통해 이루어질 수 있다. 이에 따라 BIO 라인을 통해 메모리 뱅크(411)로부터 MAC 오퍼레이터(420)로의 웨이트 데이터 전송과 독립적으로 글로벌 버퍼(412)로부터 MAC 오퍼레이터(420)로의 벡터 데이터 전송이 이루어질 수 있다. 일 예에서 MAC 오퍼레이터(420)로의 웨이트 데이터 전송 및 벡터 데이터 전송은 각각 BIO 라인 및 GIO 라인을 통해 동시에 이루어질 수 있다.On the other hand, the vector data (X0.0, ..., X7.0) stored in the global buffer 412 in synchronization with the clock to which the weight data is transmitted from the memory bank 411 to the MAC operator 420 also 420). To this end, a control signal for controlling a read operation on the global buffer 412 may be generated in synchronization with the transmission of the MAC read signal MAC_RD_BK from the MAC command generator 540 of the PIM controller 500 . Data transmission between the global buffer 412 and the MAC operator 420 may be performed through a GIO line. Accordingly, vector data transmission from the global buffer 412 to the MAC operator 420 may be performed independently of the weight data transmission from the memory bank 411 to the MAC operator 420 through the BIO line. In an example, transmission of weight data and transmission of vector data to the MAC operator 420 may be performed simultaneously through a BIO line and a GIO line, respectively.

단계 606에서, 도 23을 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 입력 래치 신호(MAC_L1)를 생성하여 PIM 장치(400)로 전송한다. MAC 입력 래치 신호(MAC_L1)는 PIM 장치(400)의 MAC 오퍼레이터(420)에 대한 웨이트 데이터의 입력 래치 동작 및 벡터 데이터의 입력 래치 동작을 제어한다. 이 입력 래치 동작에 의해, MAC 오퍼레이터(420)의 MAC 회로(122)로 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7)과 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0)이 입력된다. MAC 회로(122)는, 웨이트 매트릭스의 열 수 및 벡터 매트릭스의 행 수와 동일한 개수, 즉 8개의 곱셈기들(122-11)을 포함할 수 있다. 웨이트 매트릭스의 제1행에 있는 원소들(W0.0, …, W0.7) 각각과, 벡터 매트릭스의 제1열에 있는 원소들(X0.0, …, X7.0) 각각은 곱셈기들(122-11) 각각에 입력된다. In step 606 , as described with reference to FIG. 23 , the MAC command generator 540 of the PIM controller 500 generates a MAC input latch signal MAC_L1 and transmits it to the PIM device 400 . The MAC input latch signal MAC_L1 controls an input latch operation of weight data and an input latch operation of vector data to the MAC operator 420 of the PIM device 400 . By this input latch operation, the elements in the first row (W0.0, ..., W0.7) of the weight matrix and the elements in the first column of the vector matrix are sent to the MAC circuit 122 of the MAC operator 420 . (X0.0, …, X7.0) is input. The MAC circuit 122 may include a number equal to the number of columns of the weight matrix and the number of rows of the vector matrix, ie, eight multipliers 122-11. Each of the elements (W0.0, ..., W0.7) in the first row of the weight matrix and each of the elements (X0.0, ..., X7.0) in the first column of the vector matrix are multipliers 122 -11) is entered in each.

단계 607에서, MAC 오퍼레이터(420)의 MAC 회로(122)는, 입력되는 웨이트 매트릭스의 제R행 및 벡터 매트릭스의 제1열에 대한 MAC 연산을 수행한다. 초기값으로 R=1이 설정되며, 이에 따라 웨이트 매트릭스의 제1행 및 벡터 매트릭스의 제1열에 대한 MAC 연산이 수행된다. 구체적으로 곱셈 로직(122-1)의 곱셈기들(122-11) 각각은, 입력되는 데이터에 대한 곱셈 연산을 수행하고, 그 결과 데이터를 가산 로직(122-2)에 입력시킨다. 가산 로직(122-2)은, 곱셈기들(122-11)로부터 출력 데이터를 입력받아 가산연산을 수행하고, 그 결과를 누적 가산기(122-21D)로 출력시킨다. 가산 로직(122-2)의 가산기(122-21C)로부터 출력되는 출력 데이터는, 웨이트 매트릭스의 제1행과 벡터 매트릭스와의 MAC 연산 결과 데이터(MAC0.0)이다. 누적 가산기(122-21D)는, 가산기(122-21C)로부터 출력되는 매트릭스 곱셈 결과 데이터(MAC0.0)와 출력 래치(123-1)로부터 피드백된 바이어스 데이터(B0.0)를 가산하여 출력시킨다. 누적 가산기(122-21D)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는, MAC 오퍼레이터(120)의 데이터 출력부(123-A) 내에 배치되는 출력 래치(123-1)로 입력된다.In step 607, the MAC circuit 122 of the MAC operator 420 performs a MAC operation on the R-th row of the input weight matrix and the first column of the vector matrix. R=1 is set as an initial value, and MAC operation is performed on the first row of the weight matrix and the first column of the vector matrix. Specifically, each of the multipliers 122-11 of the multiplication logic 122-1 performs a multiplication operation on input data, and inputs the result data to the addition logic 122-2. The addition logic 122-2 receives output data from the multipliers 122-11, performs an addition operation, and outputs the result to the accumulation adder 122-21D. The output data output from the adder 122-21C of the addition logic 122-2 is MAC operation result data MAC0.0 of the first row of the weight matrix and the vector matrix. The accumulation adder 122-21D adds and outputs the matrix multiplication result data MAC0.0 output from the adder 122-21C and the bias data B0.0 fed back from the output latch 123-1. . The biased result data Y0.0 output from the accumulation adder 122-21D is input to the output latch 123-1 disposed in the data output unit 123-A of the MAC operator 120.

단계 608에서, 도 24를 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 출력 래치 신호(MAC_L3)를 생성하여 PIM 장치(400)로 전송한다. MAC 출력 래치 신호(MAC_L3)는 PIM 장치(400)의 MAC 오퍼레이터(420)에서의 출력 래치(123-1)의 출력 래치 동작을 제어한다. 이 출력 래치 동작에 의해, MAC 오퍼레이터(420)의 출력 래치(123-1)는, MAC 출력 래치 신호(MAC_L3)에 동기되어 바이어스된 결과 데이터(Y0.0)를 출력시킨다. 출력 래치(123-1)로부터 출력되는 바이어스된 결과 데이터(Y0.0)는 활성화 함수 로직(123-5)으로 입력된다. 그리고 단계 610에서, 활성화 함수 로직(123-5)은, 입력되는 바이어스된 결과 데이터(Y0.0)에 활성화 함수를 적용하여 최종 출력값을 생성하여 전달게이트(도 3의 123-2)로 입력시킨다.In step 608 , as described with reference to FIG. 24 , the MAC command generator 540 of the PIM controller 500 generates a MAC output latch signal MAC_L3 and transmits it to the PIM device 400 . The MAC output latch signal MAC_L3 controls an output latch operation of the output latch 123 - 1 in the MAC operator 420 of the PIM device 400 . By this output latch operation, the output latch 123-1 of the MAC operator 420 outputs the biased result data Y0.0 in synchronization with the MAC output latch signal MAC_L3. The biased result data Y0.0 output from the output latch 123-1 is input to the activation function logic 123-5. And in step 610, the activation function logic 123-5 applies the activation function to the input biased result data Y0.0 to generate a final output value and input it to the transfer gate (123-2 in FIG. 3). .

단계 610에서, 도 25를 참조하여 설명한 바와 같이, PIM 컨트롤러(500)의 MAC 커맨드 발생기(540)는, MAC 래치 리셋 신호(MAC_L_RST)를 생성하여 PIM 장치(400)로 전송한다. MAC 래치 리셋 신호(MAC_L_RST)는 PIM 장치(400)의 MAC 오퍼레이터(420)에서의 최종 출력값의 출력 동작과 출력 래치의 리셋 동작을 제어한다. MAC 오퍼레이터(420)의 데이터 출력부(123-B)의 활성화 함수 로직(123-5)으로부터 최종 출력값을 입력받은 전달게이트(123-2)는, MAC 래치 리셋 신호(MAC_L_RST)에 동기되어 최종 출력값을 출력시킨다. 일 예에서 MAC 오퍼레이터(120)로부터 출력되는 최종 출력값은, PIM 장치(400) 내에서 BIO 라인을 통해 메모리 뱅크(411)에 저장될 수 있다.In step 610 , as described with reference to FIG. 25 , the MAC command generator 540 of the PIM controller 500 generates a MAC latch reset signal MAC_L_RST and transmits it to the PIM device 400 . The MAC latch reset signal MAC_L_RST controls the output operation of the final output value from the MAC operator 420 of the PIM device 400 and the reset operation of the output latch. The transfer gate 123-2 receiving the final output value from the activation function logic 123-5 of the data output unit 123-B of the MAC operator 420 is synchronized with the MAC latch reset signal MAC_L_RST to obtain the final output value. outputs In an example, the final output value output from the MAC operator 120 may be stored in the memory bank 411 through the BIO line in the PIM device 400 .

단계 611에서, MAC 연산이 수행된 웨이트 매트릭스의 행 수인 "R"을 하나 증가시킨다. 지금까지 웨이트 매트릭스의 제1행 내지 제8행 중 제1행에 대한 MAC 연산이 수행됨에 따라, 단계 611에서 웨이트 매트릭스의 행 수는 제1행에서 제2행으로 변경된다. 단계 612에서는 단계 611에서 변경된 웨이트 매트릭스의 행 수가 웨이트 매트릭스의 마지막 행, 즉 제8행보다 큰지의 여부를 판단한다. 단계 611에 의해 변경된 웨이트 매트릭스의 행 수가 제2행이므로, 단계 612에서의 판단은 단계 611에서 변경된 웨이트 매트릭스의 행 수가 제8행보다 작은 것으로 판단하여, 단계 604의 과정을 다시 수행한다.In step 611, "R" which is the number of rows of the weight matrix on which the MAC operation is performed is increased by one. As the MAC operation is performed on the first row among the first to eighth rows of the weight matrix so far, the number of rows of the weight matrix is changed from the first row to the second row in step 611 . In step 612, it is determined whether the number of rows of the weight matrix changed in step 611 is greater than the last row, that is, the eighth row of the weight matrix. Since the number of rows of the weight matrix changed by step 611 is the second row, the determination in step 612 determines that the number of rows of the weight matrix changed in step 611 is smaller than the eighth row, and the process of step 604 is performed again.

단계 612로부터 피드백되면, MAC 연산이 이루어지는 웨이트 매트릭스의 행 수, 벡터 매트릭스의 열 수, 및 바이어스 매트릭스의 열 수가 다른 점을 제외하고는 위에서 설명한 바와 동일한 단계 604 내지 단계 612의 과정이 수행된다. 즉 단계 611에서 웨이트 매트릭스의 행 수가 제2행으로 증가됨에 따라, MAC 연산의 대상이 웨이트 매트릭스의 제2행과 벡터 매트릭스인 점과, 바이어스 연산의 대상이 MAC 결과 매트릭스의 제1행 및 제2열 원소(MAC1.0)와 바이어스 매트릭스의 제1행 및 제2열 원소(B1.0)인 점에서만 차이가 있다. 단계 612에서 피드백되어 단계 604 내지 단계 611을 수행하는 과정은, 웨이트 매트릭스의 모든 행 수, 즉 제1행 내지 제8행과 벡터 매트릭스의 MAC 연산이 종료될 때까지 이루어진다. 웨이트 매트릭스의 제8행에 대한 MAC 연산이 종료되어, 단계 611에서 웨이트 매트릭스의 행 수가 제8행에서 제9행으로 변경되면, 단계 612의 판단에서 웨이트 매트릭스의 행 수인 제9행이 마지막 행인 제8행보다 크므로, MAC 연산 동작을 종료한다.Upon feedback from step 612, the same steps 604 to 612 as described above are performed except that the number of rows of the weight matrix, the number of columns of the vector matrix, and the number of columns of the bias matrix are different from each other. That is, as the number of rows of the weight matrix is increased to the second row in step 611, the target of the MAC operation is the second row and the vector matrix of the weight matrix, and the target of the bias operation is the first row and the second row of the MAC result matrix. It differs only in that it is a column element (MAC1.0) and a first row and second column element (B1.0) of the bias matrix. The process of performing steps 604 to 611 after being fed back in step 612 is performed until the number of all rows of the weight matrix, that is, the MAC operation of the first to eighth rows and the vector matrix is finished. When the MAC operation on the 8th row of the weight matrix is finished and the number of rows of the weight matrix is changed from the 8th row to the 9th row in step 611, the ninth row, which is the number of rows of the weight matrix, is the last row in the judgment of step 612. Since it is greater than 8 lines, the MAC operation is terminated.

도 28에는 본 개시의 제3 실시예에 다른 PIM 시스템(20)의 블록도가 도시되어 있다. 도 28에 나타낸 바와 같이, 본 예에 따른 PIM 시스템(20)은, PIM 컨트롤러(200)가 모드 레지스터(Mode Register)(260)를 더 포함하는 것을 제외하고는, 도 1을 참조하여 설명한 PIM 시스템(10)과 동일하다. 이에 따라 도 1을 참조하여 설명한 설명 동일한 설명은 생략하기로 한다. PIM 컨트롤러(200) 내의 모드 레지스터(260)는, PIM 시스템(20)의 MAC 모드 동작시 필요한 세팅을 지시하는 모드 레지스터 세팅(Mode Register Setting; 이하 MRS) 신호를 제공받을 수 있다. 일 예에서 스케줄러(220) 내의 모드 선택기(221)로부터 MRS 신호를 제공받을 수 있으나, 이는 단지 하나의 예시로서 별도의 MRS 신호 제공을 위한 로직이 배치될 수도 있다. MRS 신호를 제공받은 모드 레지스터(260)는, MRS 신호를 MAC 커맨드 발생기(240)로 전송한다.28 is a block diagram of a PIM system 20 according to a third embodiment of the present disclosure. As shown in FIG. 28 , the PIM system 20 according to this example is the PIM system described with reference to FIG. 1 , except that the PIM controller 200 further includes a mode register 260 . Same as (10). Accordingly, the same description as described with reference to FIG. 1 will be omitted. The mode register 260 in the PIM controller 200 may receive a mode register setting (MRS) signal indicating a setting necessary for the MAC mode operation of the PIM system 20 . In one example, the MRS signal may be provided from the mode selector 221 in the scheduler 220, but this is only an example, and logic for providing a separate MRS signal may be disposed. The mode register 260 receiving the MRS signal transmits the MRS signal to the MAC command generator 240 .

일 예에서 MRS 신호에는, MAC 커맨드들(MAC_CMDs) 각각이 생성되는 타이밍이 포함될 수 있다. 이 경우 PIM 시스템(20)의 확정적(deterministic) 동작은, 모드 레지스터(260)에 의해 제공되는 MRS 데이터에 의해 수행될 수 있다. 다른 예에서 MRS 신호에는, MAC 모드 동작과 MAC 모드 동작들 사이의 타이밍이나, 또는 MAC 모드 동작과 메모리 모드 동작 사이의 모드 변환 동작에 관련된 정보가 포함될 수 있다. 일 예에서 모드 레지스터(260)에서의 MRS 세팅은, 외부로부터 인퍼런스가 전송되어 벡터 데이터가 PIM 장치(100)의 제2 메모리 뱅크(112)에 저장되기 전에 수행될 수 있다. 다른 예에서 모드 레지스터(260)에서의 MRS 세팅은, 외부로부터 인퍼런스가 전송되어 벡터 데이터가 PIM 장치(100)의 제2 메모리 뱅크(112)에 저장된 후에 수행될 수도 있다.In one example, the MRS signal may include a timing at which each of the MAC commands MAC_CMDs are generated. In this case, the deterministic operation of the PIM system 20 may be performed by MRS data provided by the mode register 260 . In another example, the MRS signal may include information related to the timing between the MAC mode operation and the MAC mode operation or the mode conversion operation between the MAC mode operation and the memory mode operation. In an example, the MRS setting in the mode register 260 may be performed before an inference is transmitted from the outside and vector data is stored in the second memory bank 112 of the PIM device 100 . In another example, the MRS setting in the mode register 260 may be performed after an inference is transmitted from the outside and vector data is stored in the second memory bank 112 of the PIM device 100 .

도 29에는 본 개시의 제4 실시예에 다른 PIM 시스템(40)의 블록도가 도시되어 있다. 도 29에 나타낸 바와 같이, 본 예에 따른 PIM 시스템(40)은, PIM 컨트롤러(500)가 모드 레지스터(260)를 더 포함하는 것을 제외하고는, 도 19를 참조하여 설명한 PIM 시스템(30)과 동일하다. 이에 따라 도 19를 참조하여 설명한 설명과 동일한 설명은 생략하기로 한다. PIM 컨트롤러(500) 내의 모드 레지스터(260)는, PIM 시스템(40)의 MAC 모드 동작시 필요한 세팅을 지시하는 MRS 신호를 제공받을 수 있다. 일 예에서 스케줄러(220) 내의 모드 선택기(221)로부터 MRS 신호를 제공받을 수 있으나, 이는 단지 하나의 예시로서 별도의 MRS 신호 제공을 위한 로직이 배치될 수도 있다. MRS 신호를 제공받은 모드 레지스터(260)는, MRS 신호를 MAC 커맨드 발생기(540)로 전송한다.29 is a block diagram of a PIM system 40 according to a fourth embodiment of the present disclosure. As shown in FIG. 29 , the PIM system 40 according to this example includes the PIM system 30 described with reference to FIG. 19 , except that the PIM controller 500 further includes a mode register 260 . same. Accordingly, the same description as that described with reference to FIG. 19 will be omitted. The mode register 260 in the PIM controller 500 may receive an MRS signal indicating a setting necessary for the MAC mode operation of the PIM system 40 . In one example, the MRS signal may be provided from the mode selector 221 in the scheduler 220, but this is only an example, and logic for providing a separate MRS signal may be disposed. The mode register 260 receiving the MRS signal transmits the MRS signal to the MAC command generator 540 .

일 예에서 MRS 신호에는, MAC 커맨드들(MAC_CMDs) 각각이 생성되는 타이밍이 포함될 수 있다. 이 경우 PIM 시스템(40)의 확정적(deterministic) 동작은, 모드 레지스터(260)에 의해 제공되는 MRS 데이터에 의해 수행될 수 있다. 다른 예에서 MRS 신호에는, MAC 모드 동작과 MAC 모드 동작들 사이의 타이밍이나, 또는 MAC 모드 동작과 메모리 모드 동작 사이의 모드 변환 동작에 관련된 정보가 포함될 수 있다. 일 예에서 모드 레지스터(260)에서의 MRS 세팅은, 외부로부터 인퍼런스가 전송되어 벡터 데이터가 PIM 장치(400)의 글로벌 버퍼(412)에 저장되기 전에 수행될 수 있다. 다른 예에서 모드 레지스터(260)에서의 MRS 세팅은, 외부로부터 인퍼런스가 전송되어 벡터 데이터가 PIM 장치(400)의 글로벌 버퍼(412)에 저장된 후에 수행될 수도 있다.In one example, the MRS signal may include a timing at which each of the MAC commands MAC_CMDs are generated. In this case, the deterministic operation of the PIM system 40 may be performed by MRS data provided by the mode register 260 . In another example, the MRS signal may include information related to the timing between the MAC mode operation and the MAC mode operation or the mode conversion operation between the MAC mode operation and the memory mode operation. In an example, the MRS setting in the mode register 260 may be performed before an inference is transmitted from the outside and vector data is stored in the global buffer 412 of the PIM device 400 . In another example, the MRS setting in the mode register 260 may be performed after an inference is transmitted from the outside and vector data is stored in the global buffer 412 of the PIM device 400 .

이제까지 본 출원 기술에 대하여 실시예들을 중심으로 살펴보았다. 본 출원 기술이 속하는 기술분야에서 통상의 지식을 가진 자는 본 출원 기술이 본 출원 기술의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 출원 기술의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 출원 기술에 포함된 것으로 해석되어야 할 것이다.So far, with respect to the technology of the present application, it has been mainly looked at the embodiments. Those of ordinary skill in the art to which the technology of the present application belongs will understand that the technology of the present application may be implemented in a modified form without departing from the essential characteristics of the technology of the present application. Therefore, the disclosed embodiments are to be considered in an illustrative rather than a restrictive sense. The scope of the technology of the present application is indicated in the claims rather than the above description, and all differences within the scope equivalent thereto should be construed as being included in the technology of the present application.

10...PIM 시스템 100...PIM 장치
111...제1 메모리 뱅크 112...제2 메모리 뱅크
120...MAC 오퍼레이터 131...인터페이스
132...데이터 입출력 단자(DQ) 200...PIM 컨트롤러
210...커맨드 큐 220...스케줄러
221...모드 선택기 230...메모리 커맨드 발생기
240...MAC 커맨드 발생기 250...어드레스 발생기
10...PIM system 100...PIM device
111...First memory bank 112...Second memory bank
120...MAC operator 131...Interface
132...Data input/output terminal (DQ) 200...PIM controller
210...command queue 220...scheduler
221...mode selector 230...memory command generator
240...MAC command generator 250...address generator

Claims (52)

제1 저장영역과, 제2 저장영역과, 그리고 상기 제1 저장영역 및 제2 저장영역으로부터 각각 제1 데이터 및 제2 데이터를 전송받아 곱셈-누적 가산(MAC) 연산을 수행하는 MAC 오퍼레이터를 포함하는 PIM 장치; 및
상기 PIM 장치의 메모리 모드 동작 및 MAC 모드 동작을 제어하되, 상기 메모리 모드에서는 메모리 커맨드 신호를 생성하여 상기 PIM 장치로 전송하고, 상기 MAC 모드에서는 제1 내지 제5 MAC 커맨드 신호를 상기 PIM 장치로 전송하도록 구성되는 PIM 컨트롤러를 포함하는 PIM 시스템.
a first storage area, a second storage area, and a MAC operator receiving first data and second data from the first storage area and the second storage area, respectively, and performing a multiply-accumulate addition (MAC) operation; a PIM device; and
A memory mode operation and a MAC mode operation of the PIM device are controlled, wherein a memory command signal is generated and transmitted to the PIM device in the memory mode, and first to fifth MAC command signals are transmitted to the PIM device in the MAC mode A PIM system comprising a PIM controller configured to:
제1항에 있어서,
상기 제1 저장영역으로부터 상기 MAC 오퍼레이터로의 상기 제1 데이터의 전송과, 상기 제2 저장영역으로부터 상기 MAC 오퍼레이터로의 상기 제2 데이터의 전송은, 상기 PIM 장치 내의 글로벌 입출력(GIO) 라인을 통해 이루어지는 PIM 시스템.
According to claim 1,
The transfer of the first data from the first storage area to the MAC operator and the transfer of the second data from the second storage area to the MAC operator are performed via a global input/output (GIO) line in the PIM device. PIM system made.
제1항에 있어서,
상기 MAC 연산은, 정해진 고정 시간 동안 수행하는 확정적 MAC 연산 방식으로 동작하도록 구성되는 PIM 시스템.
According to claim 1,
The MAC operation is a PIM system configured to operate in a deterministic MAC operation method performed for a fixed fixed time.
제1항에 있어서, 상기 PIM 컨트롤러는,
상기 메모리 모드에서 상기 메모리 커맨드 신호를 생성하여 출력하는 메모리 커맨드 발생기; 및
상기 MAC 모드에서 상기 제1 내지 제5 MAC 커맨드 신호를 생성하여 출력하는 MAC 커맨드 발생기를 포함하는 PIM 시스템.
According to claim 1, wherein the PIM controller,
a memory command generator for generating and outputting the memory command signal in the memory mode; and
and a MAC command generator for generating and outputting the first to fifth MAC command signals in the MAC mode.
제4항에 있어서,
상기 MAC 커맨드 발생기는, 상기 제1 내지 제5 MAC 커맨드 신호를 정해진 고정 시간 간격으로 순차적으로 출력시키도록 구성되는 PIM 시스템.
5. The method of claim 4,
The MAC command generator is configured to sequentially output the first to fifth MAC command signals at predetermined fixed time intervals.
제4항에 있어서,
상기 제1 MAC 커맨드 신호는, 상기 제1 저장영역으로부터 상기 제1 데이터를 리드하는 제어신호이고,
상기 제2 MAC 커맨드 신호는, 상기 제2 저장영역으로부터 상기 제2 데이터를 리드하는 제어신호이고,
상기 제3 MAC 커맨드 신호는, 상기 제1 데이터를 상기 MAC 오퍼레이터 내에 래치시키는 제어신호이고,
상기 제4 MAC 커맨드 신호는, 상기 제2 데이터를 상기 MAC 오퍼레이터 내에 래치시키는 제어신호이며, 그리고
상기 제5 MAC 커맨드 신호는, 상기 MAC 오퍼레이터의 MAC 결과 데이터를 래치시키는 제어신호인 PIM 시스템.
5. The method of claim 4,
The first MAC command signal is a control signal for reading the first data from the first storage area;
The second MAC command signal is a control signal for reading the second data from the second storage area;
The third MAC command signal is a control signal for latching the first data in the MAC operator,
The fourth MAC command signal is a control signal for latching the second data in the MAC operator, and
The fifth MAC command signal is a control signal for latching MAC result data of the MAC operator.
제6항에 있어서, 상기 MAC 커맨드 발생기는,
제1 시점에 상기 제1 MAC 커맨드 신호를 출력시키고,
상기 제1 시점으로부터 제1 레이턴시가 경과한 제2 시점에 상기 제2 MAC 커맨드 신호를 출력시키고,
상기 제2 시점으로부터 제2 레이턴시가 경과한 제3 시점에 상기 제3 MAC 커맨드 신호를 출력시키고,
상기 제3 시점으로부터 제3 레이턴시가 경과한 제4 시점에 상기 제4 MAC 커맨드 신호를 출력시키며, 그리고
상기 제4 시점으로부터 제4 레이턴시가 경과한 제5 시점에 상기 제5 MAC 커맨드 신호를 출력시키도록 구성되는 PIM 시스템.
7. The method of claim 6, wherein the MAC command generator comprises:
outputting the first MAC command signal at a first time,
outputting the second MAC command signal at a second time point when a first latency has elapsed from the first time point;
outputting the third MAC command signal at a third time point when a second latency has elapsed from the second time point;
outputting the fourth MAC command signal at a fourth time point when a third latency has elapsed from the third time point, and
and output the fifth MAC command signal at a fifth time point when a fourth latency has elapsed from the fourth time point.
제7항에 있어서,
상기 제1 레이턴시는, 상기 제1 MAC 커맨드 신호에 의해 상기 제1 저장영역으로부터 상기 제1 데이터를 리드하여 상기 MAC 오퍼레이터로 입력시키는데 소요되는 시간으로 설정되고,
상기 제2 레이턴시는, 상기 제2 MAC 커맨드 신호에 의해 상기 제2 저장영역으로부터 상기 제2 데이터를 리드하여 상기 MAC 오퍼레이터로 입력시키는데 소요되는 시간으로 설정되고,
상기 제3 레이턴시는, 상기 제3 MAC 커맨드 신호에 의해 상기 MAC 오퍼레이터로 입력되는 상기 제1 데이터가 래치되는데 소요되는 시간으로 설정되고,
상기 제4 레이턴시는, 상기 제4 MAC 커맨드 신호에 의해 상기 MAC 오퍼레이터로 입력되는 상기 제2 데이터가 래치되고, 래치된 상기 제1 데이터 및 제2 데이터에 대한 MAC 연산이 수행되는데 소요되는 시간으로 설정되는 PIM 시스템.
8. The method of claim 7,
The first latency is set as a time required to read the first data from the first storage area and input it to the MAC operator by the first MAC command signal;
The second latency is set to a time required to read the second data from the second storage area and input it to the MAC operator by the second MAC command signal;
The third latency is set to a time required for the first data input to the MAC operator by the third MAC command signal to be latched;
The fourth latency is set as a time required for the second data input to the MAC operator by the fourth MAC command signal to be latched and to perform MAC operations on the latched first data and second data. being a PIM system.
제6항에 있어서, 상기 MAC 오퍼레이터는,
상기 제1 저장영역 및 제2 저장영역으로부터 각각 상기 제1 데이터 및 제2 데이터를 입력받고, 상기 제3 MAC 커맨드 신호 및 상기 제4 MAC 커맨드 신호에 각각 동기되어 상기 제1 데이터 및 제2 데이터를 래치시키는 데이터 입력부;
상기 데이터 입력부로부터 래치되는 제1 데이터 및 제2 데이터를 입력받고 상기 MAC 연산을 수행하여 MAC 결과 데이터를 출력하는 MAC 회로; 및
상기 MAC 회로로부터의 상기 MAC 결과 데이터를 입력받고, 상기 제5 MAC 커맨드 신호에 동기되어 상기 MAC 결과 데이터를 래치시키는 출력래치를 포함하는 데이터 출력부를 포함하는 PIM 장치.
The method of claim 6, wherein the MAC operator,
The first data and the second data are respectively received from the first storage area and the second storage area, and the first data and the second data are respectively synchronized with the third MAC command signal and the fourth MAC command signal. a data input unit for latching;
a MAC circuit for receiving first data and second data latched from the data input unit, performing the MAC operation, and outputting MAC result data; and
and a data output unit receiving the MAC result data from the MAC circuit and including an output latch for latching the MAC result data in synchronization with the fifth MAC command signal.
제9항에 있어서,
상기 데이터 출력부는, 상기 MAC 결과 데이터를 상기 GIO 라인으로 출력시키는 전달게이트를 더 포함하는 PIM 장치.
10. The method of claim 9,
The data output unit may further include a transfer gate configured to output the MAC result data to the GIO line.
제6항에 있어서,
상기 MAC 커맨드 발생기는, 상기 제5 MAC 커맨드 신호를 출력시킨 후에 정해진 고정 시간이 경과한 후에 제6 MAC 커맨드 신호를 출력시키도록 구성되는 PIM 시스템.
7. The method of claim 6,
The MAC command generator is configured to output a sixth MAC command signal after a predetermined fixed time elapses after outputting the fifth MAC command signal.
제11항에 있어서,
상기 제6 MAC 커맨드 신호는, 상기 MAC 결과 데이터를 상기 MAC 오퍼레이터로부터 출력시키고, 상기 MAC 오퍼레이터 내의 출력 래치를 리셋시키는 제어신호인 PIM 시스템.
12. The method of claim 11,
The sixth MAC command signal is a control signal for outputting the MAC result data from the MAC operator and resetting an output latch in the MAC operator.
제12항에 있어서, 상기 MAC 커맨드 발생기는,
제1 시점에 상기 제1 MAC 커맨드 신호를 출력시키고,
상기 제1 시점으로부터 제1 레이턴시가 경과한 제2 시점에 상기 제2 MAC 커맨드 신호를 출력시키고,
상기 제2 시점으로부터 제2 레이턴시가 경과한 제3 시점에 상기 제3 MAC 커맨드 신호를 출력시키고,
상기 제3 시점으로부터 제3 레이턴시가 경과한 제4 시점에 상기 제4 MAC 커맨드 신호를 출력시키고,
상기 제4 시점으로부터 제4 레이턴시가 경과한 제5 시점에 상기 제5 MAC 커맨드 신호를 출력시키며, 그리고
상기 제5 시점으로부터 제5 레이턴시가 경과한 제6 시점에 상기 제6 MAC 커맨드 신호를 출력시키도록 구성되는 PIM 시스템.
13. The method of claim 12, wherein the MAC command generator,
outputting the first MAC command signal at a first time,
outputting the second MAC command signal at a second time point when a first latency has elapsed from the first time point;
outputting the third MAC command signal at a third time point when a second latency has elapsed from the second time point;
outputting the fourth MAC command signal at a fourth time point when a third latency has elapsed from the third time point;
outputting the fifth MAC command signal at a fifth time point when a fourth latency has elapsed from the fourth time point, and
and output the sixth MAC command signal at a sixth time point when a fifth latency has elapsed from the fifth time point.
제13항에 있어서,
상기 제1 레이턴시는, 상기 제1 MAC 커맨드 신호에 의해 상기 제1 저장영역으로부터 상기 제1 데이터를 리드하여 상기 MAC 오퍼레이터로 입력시키는데 소요되는 시간으로 설정되고,
상기 제2 레이턴시는, 상기 제2 MAC 커맨드 신호에 의해 상기 제2 저장영역으로부터 상기 제2 데이터를 리드하여 상기 MAC 오퍼레이터로 입력시키는데 소요되는 시간으로 설정되고,
상기 제3 레이턴시는, 상기 제3 MAC 커맨드 신호에 의해 상기 MAC 오퍼레이터로 입력되는 상기 제1 데이터가 래치되는데 소요되는 시간으로 설정되고,
상기 제4 레이턴시는, 상기 제4 MAC 커맨드 신호에 의해 상기 MAC 오퍼레이터로 입력되는 상기 제2 데이터가 래치되고, 래치된 상기 제1 데이터 및 제2 데이터에 대한 MAC 연산이 수행되는데 소요되는 시간으로 설정되며, 그리고
상기 제5 레이턴시는, 상기 MAC 연산으로 생성되는 MAC 결과 데이터에 대한 출력 래치가 수행되는데 소요되는 시간으로 설정되는 PIM 시스템.
14. The method of claim 13,
The first latency is set as a time required to read the first data from the first storage area and input it to the MAC operator by the first MAC command signal;
The second latency is set to a time required to read the second data from the second storage area and input it to the MAC operator by the second MAC command signal;
The third latency is set to a time required for the first data input to the MAC operator by the third MAC command signal to be latched;
The fourth latency is set as a time required for the second data input to the MAC operator by the fourth MAC command signal to be latched and to perform MAC operations on the latched first data and second data. becomes, and
The fifth latency is set as a time required to perform an output latch on the MAC result data generated by the MAC operation.
제6항에 있어서, 상기 PIM 컨트롤러는,
외부로부터 전송되는 커맨드를 저장하는 커맨드 큐;
상기 커맨드 큐에 저장되어 있는 커맨드가 상기 커맨드 큐로부터 출력되는 타이밍을 조정하는 스케줄러를 더 포함하는 PIM 시스템.
The method of claim 6, wherein the PIM controller,
a command queue for storing commands transmitted from the outside;
The PIM system further comprising a scheduler that adjusts a timing at which a command stored in the command queue is output from the command queue.
제15항에 있어서,
상기 스케줄러는, 상기 커맨드 큐로부터 출력되는 커맨드가 상기 메모리 모드 동작을 요청하는지, 아니면 상기 MAC 모드 동작을 요청하는지에 관한 모드 선택 신호를 생성하는 모드 선택기를 포함하는 PIM 시스템.
16. The method of claim 15,
and the scheduler includes a mode selector configured to generate a mode selection signal indicating whether a command output from the command queue requests the memory mode operation or the MAC mode operation.
제15항에 있어서,
상기 커맨드 큐는, 상기 스케줄러로부터의 제어신호에 응답하여, 상기 커맨드가 메모리 모드 동작을 요청하는 경우 상기 메모리 커맨드 발생기로 전송하고, 상기 커맨드가 MAC 모드 동작을 요청하는 경우 상기 MAC 커맨드 발생기로 전송하는 PIM 시스템.
16. The method of claim 15,
The command queue, in response to a control signal from the scheduler, is transmitted to the memory command generator when the command requests a memory mode operation, and is transmitted to the MAC command generator when the command requests a MAC mode operation. PIM system.
제6항에 있어서,
상기 PIM 컨트롤러는, 상기 MAC 모드 동작시 필요한 모드 레지스터 세팅이 이루어지는 모드 레지스터를 더 포함하는 PIM 시스템.
7. The method of claim 6,
The PIM controller further includes a mode register configured to set a mode register necessary for the MAC mode operation.
제18항에 있어서,
상기 모드 레지스터 세팅은, 상기 제1 내지 제5 MAC 커맨드 신호가 생성되는 타이밍을 포함하는 PIM 시스템.
19. The method of claim 18,
The mode register setting includes a timing at which the first to fifth MAC command signals are generated.
제18항에 있어서,
상기 모드 레지스터 세팅은, MAC 모드 동작과 MAC 모드 동작 사이의 타이밍, 또는 MAC 모드 동작과 메모리 모드 동작 사이의 모드 변환 동작에 관련된 정보를 포함하는 PIM 시스템.
19. The method of claim 18,
The mode register setting includes information related to a timing between a MAC mode operation and a MAC mode operation, or a mode conversion operation between a MAC mode operation and a memory mode operation.
저장영역과, 글로벌 버퍼와, 그리고 상기 저장영역 및 글로벌 버퍼로부터 각각 제1 데이터 및 제2 데이터를 전송받아 MAC 연산을 수행하는 MAC 오퍼레이터를 포함하는 PIM 장치; 및
상기 PIM 장치의 메모리 모드 동작 및 MAC 모드 동작을 제어하되, 상기 메모리 모드에서는 메모리 커맨드 신호를 생성하여 상기 PIM 장치로 전송하고, 상기 MAC 모드에서는 제1 내지 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하도록 구성되는 PIM 컨트롤러를 포함하는 PIM 시스템.
a PIM device including a storage area, a global buffer, and a MAC operator receiving first data and second data from the storage area and the global buffer, respectively, and performing a MAC operation; and
A memory mode operation and a MAC mode operation of the PIM device are controlled, wherein a memory command signal is generated and transmitted to the PIM device in the memory mode, and first to fourth MAC command signals are transmitted to the PIM device in the MAC mode A PIM system comprising a PIM controller configured to:
제21항에 있어서,
상기 MAC 연산은, 정해진 고정 시간 동안 수행하는 확정적 MAC 연산 방식으로 동작하도록 구성되는 PIM 시스템.
22. The method of claim 21,
The MAC operation is a PIM system configured to operate in a deterministic MAC operation method performed for a fixed fixed time.
제21항에 있어서,
상기 PIM 장치는, 상기 PIM 장치의 내부에서의 데이터 전송 통로를 제공하는 GIO 라인과, 상기 저장장치와 상기 MAC 오퍼레이터 사이의 데이터 전송 통로를 제공하는 뱅크 입출력(BIO) 라인을 더 포함하며,
상기 저장영역으로부터 상기 MAC 오퍼레이터로의 상기 제1 데이터의 전송은 상기 BIO 라인을 통해 이루어지고, 상기 글로벌 버퍼로부터 상기 MAC 오퍼레이터로의 상기 제2 데이터의 전송은, 상기 GIO 라인을 통해 이루어지는 PIM 시스템.
22. The method of claim 21,
The PIM device further includes a GIO line providing a data transmission path inside the PIM device, and a bank input/output (BIO) line providing a data transmission path between the storage device and the MAC operator,
The transmission of the first data from the storage area to the MAC operator is performed through the BIO line, and the transmission of the second data from the global buffer to the MAC operator is performed through the GIO line.
제21항에 있어서, 상기 PIM 컨트롤러는,
상기 메모리 모드에서 상기 메모리 커맨드 신호를 생성하여 출력하는 메모리 커맨드 발생기; 및
상기 MAC 모드에서 상기 제1 내지 제3 MAC 커맨드 신호를 생성하여 출력하는 MAC 커맨드 발생기를 포함하는 PIM 시스템.
The method of claim 21, wherein the PIM controller,
a memory command generator for generating and outputting the memory command signal in the memory mode; and
and a MAC command generator for generating and outputting the first to third MAC command signals in the MAC mode.
제24항에 있어서,
상기 MAC 커맨드 발생기는, 상기 제1 내지 제3 MAC 커맨드 신호를 정해진 고정 시간 간격으로 순차적으로 출력시키도록 구성되는 PIM 시스템.
25. The method of claim 24,
The MAC command generator is configured to sequentially output the first to third MAC command signals at predetermined fixed time intervals.
제24항에 있어서,
상기 제1 MAC 커맨드 신호는, 상기 저장영역으로부터 상기 제1 데이터를 리드하는 제어신호이고,
상기 제2 MAC 커맨드 신호는, 상기 제1 데이터 및 제2 데이터를 상기 MAC 오퍼레이터 내에 래치시키는 제어신호이고,
상기 제3 MAC 커맨드 신호는, 상기 MAC 오퍼레이터의 MAC 결과 데이터를 래치시키는 제어신호인 PIM 시스템.
25. The method of claim 24,
The first MAC command signal is a control signal for reading the first data from the storage area;
The second MAC command signal is a control signal for latching the first data and the second data in the MAC operator;
The third MAC command signal is a control signal for latching MAC result data of the MAC operator.
제26항에 있어서, 상기 MAC 커맨드 발생기는,
제1 시점에 상기 제1 MAC 커맨드 신호를 출력시키고,
상기 제1 시점으로부터 제1 레이턴시가 경과한 제2 시점에 상기 제2 MAC 커맨드 신호를 출력시키며, 그리고
상기 제2 시점으로부터 제2 레이턴시가 경과한 제3 시점에 상기 제3 MAC 커맨드 신호를 출력시키도록 구성되는 PIM 시스템.
27. The method of claim 26, wherein the MAC command generator comprises:
outputting the first MAC command signal at a first time,
outputting the second MAC command signal at a second time point when a first latency has elapsed from the first time point, and
and output the third MAC command signal at a third time point when a second latency has elapsed from the second time point.
제27항에 있어서,
상기 제1 레이턴시는, 상기 제1 MAC 커맨드 신호에 의해 상기 저장영역으로부터 상기 제1 데이터를 리드하여 상기 MAC 오퍼레이터로 입력시키는데 소요되는 시간으로 설정되고, 그리고
상기 제2 레이턴시는, 상기 제2 MAC 커맨드 신호에 의해 상기 MAC 오퍼레이터로 입력되는 상기 제1 데이터 및 제2 데이터가 래치되고, 래치된 상기 제1 데이터 및 제2 데이터에 대한 MAC 연산이 수행되는데 소요되는 시간으로 설정되는 PIM 시스템.
28. The method of claim 27,
The first latency is set to a time required to read the first data from the storage area and input it to the MAC operator by the first MAC command signal, and
In the second latency, the first data and second data input to the MAC operator by the second MAC command signal are latched, and a MAC operation is performed on the latched first data and second data. A PIM system that is set to time.
제28항에 있어서, 상기 MAC 오퍼레이터는,
상기 저장영역 및 상기 글로벌 버퍼로부터 각각 상기 제1 데이터 및 제2 데이터를 입력받고, 상기 제2 MAC 커맨드 신호에 동기되어 상기 제1 데이터 및 제2 데이터를 래치시키는 데이터 입력부;
상기 데이터 입력부로부터 래치되는 제1 데이터 및 제2 데이터를 입력받고 상기 MAC 연산을 수행하여 MAC 결과 데이터를 출력하는 MAC 회로; 및
상기 MAC 회로로부터의 상기 MAC 결과 데이터를 입력받고, 상기 제3 MAC 커맨드 신호에 동기되어 상기 MAC 결과 데이터를 래치시키는 출력래치를 포함하는 데이터 출력부를 포함하는 PIM 장치.
29. The method of claim 28, wherein the MAC operator,
a data input unit receiving the first data and the second data from the storage area and the global buffer, respectively, and latching the first data and the second data in synchronization with the second MAC command signal;
a MAC circuit for receiving first data and second data latched from the data input unit, performing the MAC operation, and outputting MAC result data; and
and a data output unit receiving the MAC result data from the MAC circuit and including an output latch for latching the MAC result data in synchronization with the third MAC command signal.
제29항에 있어서,
상기 데이터 출력부는, 상기 MAC 결과 데이터를 상기 GIO 라인으로 출력시키는 전달게이트를 더 포함하는 PIM 장치.
30. The method of claim 29,
The data output unit may further include a transfer gate configured to output the MAC result data to the GIO line.
제24항에 있어서,
상기 MAC 커맨드 발생기는, 상기 제3 MAC 커맨드 신호를 출력시킨 후에 정해진 고정 시간이 경과한 후에 제4 MAC 커맨드 신호를 출력시키도록 구성되는 PIM 시스템.
25. The method of claim 24,
The MAC command generator is configured to output a fourth MAC command signal after a predetermined fixed time has elapsed after outputting the third MAC command signal.
제31항에 있어서,
상기 제4 MAC 커맨드 신호는, 상기 MAC 결과 데이터를 상기 MAC 오퍼레이터로부터 출력시키고, 상기 MAC 오퍼레이터 내의 출력 래치를 리셋시키는 제어신호인 PIM 시스템.
32. The method of claim 31,
The fourth MAC command signal is a control signal for outputting the MAC result data from the MAC operator and resetting an output latch in the MAC operator.
제32항에 있어서, 상기 MAC 커맨드 발생기는,
제1 시점에 상기 제1 MAC 커맨드 신호를 출력시키고,
상기 제1 시점으로부터 제1 레이턴시가 경과한 제2 시점에 상기 제2 MAC 커맨드 신호를 출력시키고,
상기 제2 시점으로부터 제2 레이턴시가 경과한 제3 시점에 상기 제3 MAC 커맨드 신호를 출력시키며, 그리고
상기 제3 시점으로부터 제3 레이턴시가 경과한 제4 시점에 상기 제4 MAC 커맨드 신호를 출력시키도록 구성되는 PIM 시스템.
33. The method of claim 32, wherein the MAC command generator comprises:
outputting the first MAC command signal at a first time,
outputting the second MAC command signal at a second time point when a first latency has elapsed from the first time point;
outputting the third MAC command signal at a third time point when a second latency has elapsed from the second time point, and
and output the fourth MAC command signal at a fourth time point when a third latency has elapsed from the third time point.
제33항에 있어서,
상기 제1 레이턴시는, 상기 제1 MAC 커맨드 신호에 의해 상기 저장영역으로부터 상기 제1 데이터를 리드하여 상기 MAC 오퍼레이터로 입력시키는데 소요되는 시간으로 설정되고,
상기 제2 레이턴시는, 상기 제2 MAC 커맨드 신호에 의해 상기 MAC 오퍼레이터로 입력되는 상기 제1 데이터 및 제2 데이터가 래치되고, 래치된 상기 제1 데이터 및 제2 데이터에 대한 MAC 연산이 수행되는데 소요되는 시간으로 설정되며, 그리고
상기 제3 레이턴시는, 상기 MAC 연산으로 생성되는 MAC 결과 데이터에 대한 출력 래치가 수행되는데 소요되는 시간으로 설정되는 PIM 시스템.
34. The method of claim 33,
The first latency is set to a time required to read the first data from the storage area and input it to the MAC operator by the first MAC command signal;
In the second latency, the first data and second data input to the MAC operator by the second MAC command signal are latched, and a MAC operation is performed on the latched first data and second data. is set to the time to be, and
The third latency is set to a time required to perform an output latch on the MAC result data generated by the MAC operation.
제24항에 있어서, 상기 PIM 컨트롤러는,
외부로부터 전송되는 커맨드를 저장하는 커맨드 큐;
상기 커맨드 큐에 저장되어 있는 커맨드가 상기 커맨드 큐로부터 출력되는 타이밍을 조정하는 스케줄러를 더 포함하는 PIM 시스템.
The method of claim 24, wherein the PIM controller comprises:
a command queue for storing commands transmitted from the outside;
The PIM system further comprising a scheduler that adjusts a timing at which a command stored in the command queue is output from the command queue.
제35항에 있어서,
상기 스케줄러는, 상기 커맨드 큐로부터 출력되는 커맨드가 상기 메모리 모드 동작을 요청하는지, 아니면 상기 MAC 모드 동작을 요청하는지에 관한 모드 선택 신호를 생성하는 모드 선택기를 포함하는 PIM 시스템.
36. The method of claim 35,
and the scheduler includes a mode selector configured to generate a mode selection signal indicating whether a command output from the command queue requests the memory mode operation or the MAC mode operation.
제35항에 있어서,
상기 커맨드 큐는, 상기 스케줄러로부터의 제어신호에 응답하여, 상기 커맨드가 메모리 모드 동작을 요청하는 경우 상기 메모리 커맨드 발생기로 전송하고, 상기 커맨드가 MAC 모드 동작을 요청하는 경우 상기 MAC 커맨드 발생기로 전송하는 PIM 시스템.
36. The method of claim 35,
The command queue, in response to a control signal from the scheduler, is transmitted to the memory command generator when the command requests a memory mode operation, and is transmitted to the MAC command generator when the command requests a MAC mode operation. PIM system.
제24항에 있어서,
상기 PIM 컨트롤러는, 상기 MAC 모드 동작시 필요한 모드 레지스터 세팅이 이루어지는 모드 레지스터를 더 포함하는 PIM 시스템.
25. The method of claim 24,
The PIM controller further includes a mode register configured to set a mode register necessary for the MAC mode operation.
제38항에 있어서,
상기 모드 레지스터 세팅은, 상기 제1 내지 제5 MAC 커맨드 신호가 생성되는 타이밍을 포함하는 PIM 시스템.
39. The method of claim 38,
The mode register setting includes a timing at which the first to fifth MAC command signals are generated.
제38항에 있어서,
상기 모드 레지스터 세팅은, MAC 모드 동작과 MAC 모드 동작 사이의 타이밍, 또는 MAC 모드 동작과 메모리 모드 동작 사이의 모드 변환 동작에 관련된 정보를 포함하는 PIM 시스템.
39. The method of claim 38,
The mode register setting includes information related to a timing between a MAC mode operation and a MAC mode operation, or a mode conversion operation between a MAC mode operation and a memory mode operation.
MAC 연산을 수행하는 PIM 장치와, 상기 PIM 장치의 MAC 연산 동작을 제어하는 PIM 컨트롤러를 포함하는 PIM 시스템의 동작방법에 있어서,
상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 PIM 장치의 제1 저장장치로부터 MAC 연산을 위한 MXN(M, N은 1보다 큰 자연수)의 웨이트 매트릭스의 R행(R은 "1"로 초기 세팅됨) 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계;
상기 PIM 컨트롤러로부터 제2 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 PIM 장치의 제2 저장장치로부터 MAC 연산을 위한 NX1의 벡터 매트릭스의 제1열 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계;
상기 PIM 컨트롤러로부터 제3 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 R행 원소들에 대한 입력 래치가 수행되도록 하는 단계;
상기 PIM 컨트롤러로부터 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 벡터 매트릭스의 제1열 원소들에 대한 입력 래치가 수행되도록 하는 단계;
상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들과 상기 벡터 매트릭스의 제1열 원소들의 매트릭스 곱셈 연산을 수행하는 단계;
상기 PIM 컨트롤러로부터 제5 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 매트릭스 곱셈 연산 결과인 결과 데이터에 대한 출력 래치가 수행되도록 하는 단계:
상기 PIM 컨트롤러로부터 제6 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 출력 래치된 결과 데이터가 상기 MAC 오퍼레이터로부터 출력되도록 하는 단계; 및
상기 R을 +1 증가시킨 후 상기 R이 마지막 행보다 같거나 작은 경우 상기 단계들을 반복하여 수행하는 단계를 포함하는 PIM 시스템의 동작 방법.
A method of operating a PIM system comprising: a PIM device for performing a MAC operation; and a PIM controller for controlling a MAC operation operation of the PIM device, the method comprising:
R row (R is a natural number greater than 1) of a weight matrix of MXN (M, N is a natural number greater than 1) for MAC operation from the first storage device of the PIM device by transmitting a first MAC command signal from the PIM controller to the PIM device initially set to "1") allowing elements to be input to a MAC operator of the PIM device;
transmitting a second MAC command signal from the PIM controller to the PIM device so that the first column elements of the vector matrix of NX1 for MAC operation are input from the second storage device of the PIM device to the MAC operator of the PIM device step;
transmitting a third MAC command signal from the PIM controller to the PIM device, so that an input latch for R row elements of the weight matrix is performed in the MAC operator;
transmitting a fourth MAC command signal from the PIM controller to the PIM device, so that an input latch on the first column elements of the vector matrix is performed in the MAC operator;
performing a matrix multiplication operation on the elements of the R-th row of the weight matrix and the elements of the first column of the vector matrix in the MAC operator;
transmitting a fifth MAC command signal from the PIM controller to the PIM device so that an output latch is performed on the result data that is the result of the matrix multiplication operation in the MAC operator;
transmitting a sixth MAC command signal from the PIM controller to the PIM device so that the output latched result data in the MAC operator is output from the MAC operator; and
and repeating the above steps if R is less than or equal to the last row after increasing R by +1.
제41항에 있어서,
상기 제1 내지 제6 MAC 커맨드 신호의 전송은, 정해진 고정 시간 동안 수행하는 확정적 MAC 연산 방식으로 이루어지는 PIM 시스템의 동작방법.
42. The method of claim 41,
The transmission of the first to sixth MAC command signals is a method of operating a PIM system in which a deterministic MAC operation method is performed for a predetermined fixed time.
제41항에 있어서, 상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하기 전에,
상기 MXN의 웨이트 매트릭스를 상기 제1 저장장치에 라이트하는 단계;
상기 PIM 시스템의 외부로부터 인퍼런스 요청이 있는 경우, 상기 NX1의 벡터 매트릭스를 상기 제2 저장장치에 라이트하는 단계를 더 포함하는 PIM 시스템의 동작방법.
42. The method of claim 41, wherein before transmitting a first MAC command signal from the PIM controller to the PIM device,
writing the weight matrix of the MXN to the first storage device;
and writing the vector matrix of NX1 to the second storage device when there is an inference request from outside the PIM system.
제41항에 있어서,
상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하기 전에, 상기 MAC 오퍼레이터의 출력 래치를 NX1의 바이어스 매트릭스의 제R행 원소로 초기 세팅하는 단계를 더 포함하는 PIM 시스템의 동작 방법.
42. The method of claim 41,
and, before sending a first MAC command signal from the PIM controller to the PIM device, initially setting an output latch of the MAC operator to an R-th row element of a bias matrix of NX1.
제44항에 있어서,
상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들과 상기 벡터 매트릭스의 제1열 원소들의 매트릭스 곱셈 연산을 수행하는 단계에서, 상기 매트릭스 곱셈 연산 결과인 MAC 결과 데이터에 상기 초기 세팅된 바이어스 매트릭스가 가산되도록 하는 과정을 더 포함하는 PIM 시스템의 동작방법.
45. The method of claim 44,
In the step of performing a matrix multiplication operation of the elements of the R-th row of the weight matrix and the elements of the first column of the vector matrix in the MAC operator, the initially set bias matrix is added to the MAC result data, which is the result of the matrix multiplication operation. The method of operation of the PIM system further comprising the step of adding.
제45항에 있어서,
상기 PIM 컨트롤러로부터 제6 MAC 커맨드 신호를 상기 PIM 장치로 전송하기 전에, 상기 MAC 오퍼레이터 내에서 출력 래치되는 상기 매트릭스 곱셈 연산 결과인 결과 데이터는, 상기 MAC 오퍼레이터 내에서 상기 초기 세팅된 바이어스 매트릭스가 가산된 결과 데이터로 대체되고,
상기 출력 래치된 초기 세팅된 바이어스 매트릭스가 가산된 결과 데이터에 활성화 함수를 적용하는 단계를 더 포함하며, 그리고
상기 MAC 오퍼레이터로부터 출력되는 상기 출력 래치된 결과 데이터는, 상기 활성화 함수가 적용된 데이터로 대체되는 PIM 시스템의 동작방법.
46. The method of claim 45,
Before transmitting the sixth MAC command signal from the PIM controller to the PIM device, the result data, which is the result of the matrix multiplication operation output latched in the MAC operator, is obtained by adding the initially set bias matrix in the MAC operator. replaced by the resulting data,
applying an activation function to the result data to which the output latched initially set bias matrix is added; and
The output latched result data output from the MAC operator is replaced with data to which the activation function is applied.
MAC 연산을 수행하는 PIM 장치와, 상기 PIM 장치의 MAC 연산 동작을 제어하는 PIM 컨트롤러를 포함하는 PIM 시스템의 동작방법에 있어서,
상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 PIM 장치의 저장장치로부터 MAC 연산을 위한 MXN(M, N은 1보다 큰 자연수)의 웨이트 매트릭스의 R행(R은 "1"로 초기 세팅됨) 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계;
상기 PIM 장치의 글로벌 버퍼로부터 MAC 연산을 위한 NX1의 벡터 매트릭스의 제1열 원소들이 상기 PIM 장치의 MAC 오퍼레이터로 입력되도록 하는 단계;
상기 PIM 컨트롤러로부터 제2 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들 및 상기 벡터 매트릭스의 제1열 원소들에 대한 입력 래치가 수행되도록 하는 단계;
상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들과 상기 벡터 매트릭스의 제1열 원소들의 매트릭스 곱셈 연산을 수행하는 단계;
상기 PIM 컨트롤러로부터 제3 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 매트릭스 곱셈 연산 결과인 결과 데이터에 대한 출력 래치가 수행되도록 하는 단계:
상기 PIM 컨트롤러로부터 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하여, 상기 MAC 오퍼레이터 내에서 상기 출력 래치된 결과 데이터가 상기 MAC 오퍼레이터로부터 출력되도록 하는 단계; 및
상기 R을 +1 증가시킨 후 상기 R이 마지막 행보다 같거나 작은 경우 상기 단계들을 반복하여 수행하는 단계를 포함하는 PIM 시스템의 동작 방법.
A method of operating a PIM system comprising: a PIM device for performing a MAC operation; and a PIM controller for controlling a MAC operation operation of the PIM device, the method comprising:
A first MAC command signal is transmitted from the PIM controller to the PIM device, and the R row (R is “1”) of a weight matrix of MXN (M, N is a natural number greater than 1) for MAC operation from the storage device of the PIM device. (initially set to "), causing the elements to be input to the MAC operator of the PIM device;
allowing first column elements of a vector matrix of NX1 for MAC operation to be input from the global buffer of the PIM device to a MAC operator of the PIM device;
sending a second MAC command signal from the PIM controller to the PIM device so that an input latch is performed on the elements in the R-th row of the weight matrix and the elements in the first column of the vector matrix in the MAC operator; ;
performing a matrix multiplication operation on the elements of the R-th row of the weight matrix and the elements of the first column of the vector matrix in the MAC operator;
transmitting a third MAC command signal from the PIM controller to the PIM device so that an output latch is performed on the result data that is the result of the matrix multiplication operation in the MAC operator;
transmitting a fourth MAC command signal from the PIM controller to the PIM device so that the output latched result data in the MAC operator is output from the MAC operator; and
and repeating the above steps if R is less than or equal to the last row after increasing R by +1.
제47항에 있어서,
상기 제1 내지 제4 MAC 커맨드 신호의 전송은, 정해진 고정 시간 동안 수행하는 확정적 MAC 연산 방식으로 이루어지는 PIM 시스템의 동작방법.
48. The method of claim 47,
The transmission of the first to fourth MAC command signals is a method of operating a PIM system in which the deterministic MAC operation is performed for a fixed time.
제47항에 있어서, 상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하기 전에,
상기 MXN의 웨이트 매트릭스를 상기 저장장치에 라이트하는 단계;
상기 PIM 시스템의 외부로부터 인퍼런스 요청이 있는 경우, 상기 NX1의 벡터 매트릭스를 상기 글로벌 버퍼에 저장하는 단계를 더 포함하는 PIM 시스템의 동작방법.
48. The method of claim 47, wherein before transmitting a first MAC command signal from the PIM controller to the PIM device,
writing the weight matrix of the MXN to the storage device;
and storing the vector matrix of the NX1 in the global buffer when there is an inference request from outside the PIM system.
제47항에 있어서,
상기 PIM 컨트롤러로부터 제1 MAC 커맨드 신호를 상기 PIM 장치로 전송하기 전에, 상기 MAC 오퍼레이터의 출력 래치를 NX1의 바이어스 매트릭스의 제R행 원소로 초기 세팅하는 단계를 더 포함하는 PIM 시스템의 동작 방법.
48. The method of claim 47,
and, before sending a first MAC command signal from the PIM controller to the PIM device, initially setting an output latch of the MAC operator to an R-th row element of a bias matrix of NX1.
제50항에 있어서,
상기 MAC 오퍼레이터 내에서 상기 웨이트 매트릭스의 제R행 원소들과 상기 벡터 매트릭스의 제1열 원소들의 매트릭스 곱셈 연산을 수행하는 단계에서, 상기 매트릭스 곱셈 연산 결과인 MAC 결과 데이터에 상기 초기 세팅된 바이어스 매트릭스가 가산되도록 하는 과정을 더 포함하는 PIM 시스템의 동작방법.
51. The method of claim 50,
In the step of performing a matrix multiplication operation of the elements of the R-th row of the weight matrix and the elements of the first column of the vector matrix in the MAC operator, the initially set bias matrix is added to the MAC result data, which is the result of the matrix multiplication operation. The method of operation of the PIM system further comprising the step of adding.
제51항에 있어서,
상기 PIM 컨트롤러로부터 제4 MAC 커맨드 신호를 상기 PIM 장치로 전송하기 전에, 상기 MAC 오퍼레이터 내에서 출력 래치되는 상기 매트릭스 곱셈 연산 결과인 결과 데이터는, 상기 MAC 오퍼레이터 내에서 상기 초기 세팅된 바이어스 매트릭스가 가산된 결과 데이터로 대체되고,
상기 출력 래치된 초기 세팅된 바이어스 매트릭스가 가산된 결과 데이터에 활성화 함수를 적용하는 단계를 더 포함하며, 그리고
상기 MAC 오퍼레이터로부터 출력되는 상기 출력 래치된 결과 데이터는, 상기 활성화 함수가 적용된 데이터로 대체되는 PIM 시스템의 동작방법.
52. The method of claim 51,
Before transmitting the fourth MAC command signal from the PIM controller to the PIM device, the result data, which is the result of the matrix multiplication operation output latched in the MAC operator, is obtained by adding the initially set bias matrix in the MAC operator. replaced by the resulting data,
applying an activation function to the result data to which the output latched initially set bias matrix is added; and
The output latched result data output from the MAC operator is replaced with data to which the activation function is applied.
KR1020200006903A 2020-01-07 2020-01-17 Processing-In-Memory(PIM) system and operating method of the PIM system KR20210093126A (en)

Priority Applications (31)

Application Number Priority Date Filing Date Title
KR1020200006903A KR20210093126A (en) 2020-01-17 2020-01-17 Processing-In-Memory(PIM) system and operating method of the PIM system
TW109131494A TW202141290A (en) 2020-01-07 2020-09-14 Processing-in-memory (pim) system and operating methods of the pim system
US17/027,276 US11513733B2 (en) 2020-01-07 2020-09-21 Processing-in-memory (PIM) system and operating methods of the PIM system
CN202110012256.4A CN113157248A (en) 2020-01-07 2021-01-06 In-memory Processing (PIM) system and method of operating PIM system
US17/143,886 US11315611B2 (en) 2020-01-07 2021-01-07 Processing-in-memory (PIM) system and operating methods of the PIM system
US17/143,941 US20210210125A1 (en) 2020-01-07 2021-01-07 Processing-in-memory (pim) system and operating methods of the pim system
US17/143,984 US11847451B2 (en) 2020-01-07 2021-01-07 Processing-in-memory (PIM) device for implementing a quantization scheme
US17/144,530 US11500629B2 (en) 2020-01-07 2021-01-08 Processing-in-memory (PIM) system including multiplying-and-accumulating (MAC) circuit
US17/146,101 US11663000B2 (en) 2020-01-07 2021-01-11 Multiplication and accumulation(MAC) operator and processing-in-memory (PIM) device including the MAC operator
US17/147,278 US11635911B2 (en) 2020-01-07 2021-01-12 Processing-in-memory (PIM) system and operating methods of the PIM system
US17/148,473 US11720354B2 (en) 2020-01-07 2021-01-13 Processing-in-memory (PIM) system and operating methods of the PIM system
US17/148,451 US11385837B2 (en) 2020-01-07 2021-01-13 Memory system
US17/175,497 US11586438B2 (en) 2020-01-07 2021-02-12 Multiplication and accumulation (MAC) operator
US17/175,446 US11817884B2 (en) 2020-01-07 2021-02-12 Neural network system with multiplication and accumulation(MAC) operator
US17/175,477 US11579870B2 (en) 2020-01-07 2021-02-12 Multiplication and accumulation (MAC) operator
US17/188,951 US11909421B2 (en) 2020-01-07 2021-03-01 Multiplication and accumulation (MAC) operator
US17/225,915 US20210224039A1 (en) 2020-01-07 2021-04-08 Multiplication and accumulation (mac) operator and processing-in-memory (pim) device including the mac operator
US17/491,954 US11704052B2 (en) 2020-01-07 2021-10-01 Processing-in-memory (PIM) systems
US17/491,893 US11908541B2 (en) 2020-01-07 2021-10-01 Processing-in-memory (PIM) systems
US17/694,220 US20220197596A1 (en) 2020-01-07 2022-03-14 Processing-in-memory (pim) system and operating methods of the pim system
US17/703,744 US20220229633A1 (en) 2020-01-07 2022-03-24 Multiplication and accumulation(mac) operator and processing-in-memory (pim) device including the mac operator
US17/724,253 US11907680B2 (en) 2020-01-07 2022-04-19 Multiplication and accumulation (MAC) operator
US17/726,303 US11829760B2 (en) 2020-01-07 2022-04-21 Processing-in-memory device and processing-in-memory system including the same
US17/750,922 US20220283806A1 (en) 2020-01-07 2022-05-23 Processing-in-memory device having a plurality of global buffers and processing-in-memory system including the same
US17/889,071 US11816362B2 (en) 2020-01-07 2022-08-16 Processing-in-memory (PIM) system and operating methods of the PIM system
US17/889,134 US11822823B2 (en) 2020-01-07 2022-08-16 Processing-in-memory (PIM) system and operating methods of the PIM system
US17/894,014 US20220405019A1 (en) 2020-01-07 2022-08-23 Processing-in-memory (pim) system and operating methods of the pim system
US17/962,334 US20230033179A1 (en) 2020-01-07 2022-10-07 Accumulator and processing-in-memory (pim) device including the accumulator
US18/114,140 US20230244442A1 (en) 2020-01-07 2023-02-24 Normalizer and multiplication and accumulation (mac) operator including the normalizer
US18/118,634 US20230221883A1 (en) 2020-01-07 2023-03-07 Processing-in-memory (pim) system and operating methods of the pim system
US18/334,659 US20230325186A1 (en) 2020-01-07 2023-06-14 Processing-in-memory (pim) system and operating methods of the pim system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020200006903A KR20210093126A (en) 2020-01-17 2020-01-17 Processing-In-Memory(PIM) system and operating method of the PIM system

Publications (1)

Publication Number Publication Date
KR20210093126A true KR20210093126A (en) 2021-07-27

Family

ID=77125468

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020200006903A KR20210093126A (en) 2020-01-07 2020-01-17 Processing-In-Memory(PIM) system and operating method of the PIM system

Country Status (1)

Country Link
KR (1) KR20210093126A (en)

Similar Documents

Publication Publication Date Title
US11822823B2 (en) Processing-in-memory (PIM) system and operating methods of the PIM system
US11908541B2 (en) Processing-in-memory (PIM) systems
US20230325186A1 (en) Processing-in-memory (pim) system and operating methods of the pim system
US11467965B2 (en) Processing-in-memory (PIM) device
US20210223996A1 (en) Processing-in-memory (pim) devices
US20210210125A1 (en) Processing-in-memory (pim) system and operating methods of the pim system
US11861369B2 (en) Processing-in-memory (PIM) device
US20220351765A1 (en) Processing-in-memory (pim) device for performing a burst multiplication and accumulation (mac) operation
US11385837B2 (en) Memory system
US11847451B2 (en) Processing-in-memory (PIM) device for implementing a quantization scheme
US11500629B2 (en) Processing-in-memory (PIM) system including multiplying-and-accumulating (MAC) circuit
KR20210093126A (en) Processing-In-Memory(PIM) system and operating method of the PIM system
US11315611B2 (en) Processing-in-memory (PIM) system and operating methods of the PIM system
US20220283806A1 (en) Processing-in-memory device having a plurality of global buffers and processing-in-memory system including the same
US20210224039A1 (en) Multiplication and accumulation (mac) operator and processing-in-memory (pim) device including the mac operator
US11829760B2 (en) Processing-in-memory device and processing-in-memory system including the same
US20230033179A1 (en) Accumulator and processing-in-memory (pim) device including the accumulator
US20220019374A1 (en) Processing-in-memory (pim) systems
KR20210093127A (en) AIM device
US11842193B2 (en) Processing-in-memory (PIM) device
US11635911B2 (en) Processing-in-memory (PIM) system and operating methods of the PIM system
JP2871967B2 (en) Dual-port semiconductor memory device
US20220197596A1 (en) Processing-in-memory (pim) system and operating methods of the pim system
US20210373852A1 (en) Processing-in-memory (pim) devices
US11537323B2 (en) Processing-in-memory (PIM) device