WO2020085583A1 - 상용 메모리 버스를 이용하는 프로세싱 인 메모리 장치 - Google Patents
상용 메모리 버스를 이용하는 프로세싱 인 메모리 장치 Download PDFInfo
- Publication number
- WO2020085583A1 WO2020085583A1 PCT/KR2019/001204 KR2019001204W WO2020085583A1 WO 2020085583 A1 WO2020085583 A1 WO 2020085583A1 KR 2019001204 W KR2019001204 W KR 2019001204W WO 2020085583 A1 WO2020085583 A1 WO 2020085583A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- memory
- pim
- processing
- data
- signal
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/16—Handling requests for interconnection or transfer for access to memory bus
- G06F13/1668—Details of memory controller
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
Definitions
- the present invention relates to a processing in memory (PIM) device compatible with a traditional computer system, and more specifically, a protocol, packet structure, operating method, and hardware structure of a PIM device using a commercialized memory bus. It is about.
- PIM processing in memory
- the hardware compatibility problem between PIM and existing systems arises from the vertical memory hierarchy of existing computer systems.
- Today's computer systems rely on caches to address memory bottlenecks, so even the application processor (AP) of a small embedded system uses multiple layers of cache, so it is difficult to expect the processor to give up the cache in the future.
- the cache is a method of providing a memory address that repeatedly accesses by referring to previously accessed data. Even if the PIM accesses the same address, the data written or read may vary depending on the operation performed. Therefore, when PIM and cache are used together, cache consistency problems and cache coherence problems occur either individually or simultaneously.
- the existing memory bus is also a stumbling block to using PIM.
- the main memory bus used by most systems today follows the JEDEC standard. This standard memory bus is a fixed-latency method with constant read and write response times.
- a memory bus with variable-latency method is required because PIM processes arithmetic commands in addition to read / write operations.
- a channel that can transmit information for PIM operation as well as read / write, address, and data of the existing memory channel to the PIM without damage must be provided in hardware.
- the present invention has been devised to solve the above problems, and an object of the present invention is to provide a method for operating a PIM using a conventional commercial memory bus without modification and a PIM device to which the method is applied.
- a processing in memory (PIM) device includes a memory in which data is stored; A memory control device for reading and writing data at a corresponding address in the memory; An input / output device for receiving addresses, data and commands; Includes; a computing device for performing a command on the data, the input and output device, through the address signal, receives the destination address, through the DQ signal, the command to be performed by the computing device, the address of the operand and the packet containing the data is received can do.
- the length of the packet may be determined by the memory size, the number of instructions, and the size of the data word.
- the packet may be transmitted to the input / output device in the same manner as the data write operation through the write burst protocol of the memory.
- the input / output device may be configured to change the received packet to control information that can be processed by the computing device and transmit it to the computing device.
- the memory control device stores the operation result of the operation device in a destination address of the memory, and the stored operation result may be one that can be accessed by the system through a read protocol.
- the I / O device may indicate that when a computing device is processing a previously received command, a specific signal is left in an invalid state, and is not ready to process the next packet.
- the input / output device When the input / output device is processing a previously received command, the input / output device may be to hold and wait for the received Address signal and WE signal.
- the input / output device may be to activate a processing wait signal for notifying that there is a next packet waiting.
- the input / output device may deactivate the processing wait signal when receiving the next waiting packet or changing a specific signal to a valid state.
- a processing in memory (PIM) method includes: an input / output device receiving a destination address through an address signal; An input / output device receiving a packet including a command, an operand address, and data to be performed by the computing device through a DQ signal; A computing device, performing a command; And a memory control device storing the result of the command execution in the memory.
- PIM processing in memory
- a computing system includes a processing in memory (PIM) device; And a system for storing data in the PIM device, wherein the PIM device comprises: a memory in which the data is stored; A memory control device for reading and writing data at a corresponding address in the memory; An input / output device for receiving addresses, data and commands; Includes; a computing device for performing a command on the data, and the input / output device may receive a destination address through an address signal, and receive a packet including a command to be performed by the computing device through a DQ signal.
- PIM processing in memory
- the processing in memory (PIM) method the system, through the address signal, transmitting a destination address to the input / output device of the processing in memory (PIM) device;
- the system through the DQ signal, transmitting, to the input / output device of the PIM device, a packet containing a command, an operand address and data to be performed by the computing device of the PIM device;
- a computing device of the PIM device performing an instruction;
- PIM can be implemented without modification of hardware and software of an existing computer system, and in particular, PIM can be used in all commercial motherboards using PSRAM. .
- FIG. 3 is a block diagram of the hardware structure of the PIM device
- FIG. 6 is a logic circuit for preserving a destination address and a read / write instruction of a packet waiting to be processed
- a PIM device using a commercial memory bus is presented. Specifically, we propose a protocol, packet structure, operation method, and hardware structure of a PIM device using a commercialized memory bus to be compatible with a traditional computer system.
- a PIM interface is implemented using a protocol of a pseudostatic random-access memory (PSRAM), which is a conventional commercial memory, without modification, and a PIM packet structure capable of using the PSRAM bus as it is. It proposes and proposes the hardware structure of a PIM device using a PSRAM bus.
- PSRAM pseudostatic random-access memory
- a processing in memory (PIM) device using a JEDEC pseudostatic SRAM (PSRAM) bus, a packet structure, and an operating method are presented.
- PIM processing in memory
- PSRAM JEDEC pseudostatic SRAM
- PSRAM is a DRAM that contains a refresh circuit and an address-decoder, and is a memory that combines the high density of DRAM and the accessibility of SRAM.
- PSRAM may have a refresh and conflict internally during a read or write operation.
- the PSRAM bus is variable response delay method unlike other DRAM-based memory buses use a fixed latency bus protocol. latency protocol.
- the PSRAM memory bus uses a WAIT signal, and the PSRAM controller can read data or read data according to the state of the WAIT signal.
- burst length is selectable and the delay time until the DQ signal outputs valid data after the WAIT signal is asserted is also selectable.
- the protocol of the PSRAM bus is shown in FIGS. 1 and 2.
- the ADV # signal indicates an address valid period
- CE # is used as a chip select signal
- WE # is used as a write enable signal. Since DQ is a data signal and is a bi-directional bus, the input / output direction of the current DQ is determined through the OE # signal.
- the WAIT signal is a signal that the PSRAM sends to the system.
- the data output from the DQ is valid by asserting the WAIT signal before the PSRAM outputs the requested address data.
- PSRAM In write mode, when ready to receive write data, PSRAM asserts a WAIT signal, and the memory controller transmits write data according to the promised burst length and timing.
- the PIM according to the embodiment of the present invention is the same as the PSRAM in terms of basic functions of the memory.
- DRAM is used as core-memory, and address-decoder and refresh circuit are built in. In addition, it provides some additional computational functions.
- the hardware structure of the PIM device is shown in FIG. 3.
- the PIM device includes an input / output device 110, a computing device 120, a memory control device 130, and a DRAM 140, as shown in FIG. 3.
- the DRAM 140 is used as an internal memory of the PIM, and main DRAM operations such as address decoding and refresh are controlled by the memory controller 130.
- the computing device 120 performs a command code received from the input / output device 110 of the PIM, and performs a basic operation and a computing function of the memory.
- the I / O device 110 decomposes the PIM access packet by the PSRAM bus protocol and transmits it to the computing device 120 for processing and responds to the result.
- the PIM proposed in the embodiment of the present invention uses a commercial memory bus, only a few control signals, signals such as addresses and data are used. Therefore, the existing memory bus must be operated in a different way in order to transmit a command for the operation to the PIM.
- FIG. 4 The structure of the PIM packet proposed in the embodiment of the present invention is shown in FIG. 4, and the method of transmitting the PIM packet using the PSRAM bus is shown in FIG.
- PIM performs basic memory functions and computation functions, and these functions can use specific functions through the command codes of packets.
- the destination address is used as an address to which the results of the write and read commands and operation commands are applied.
- the command code indicates a command to be executed by the PIM device.
- the operation instructions performed by PIM are largely divided into R-type and I-type.
- R-type instructions data required for operation is called through the operand address (recall), and the I-type instruction is a packet.
- the value of the data field included in is used as an operand.
- the address signal of the PSRAM bus is used as the destination address as shown in FIG. 5. Since the DQ signal is used to deliver packets to the PIM device, all packets except the PIM read command use the write protocol of the PSRAM bus.
- the length of the PIM packet is determined by the size of the accessible memory inside the PIM, the number of instructions, and the data word size of the system. For example, if the system has a 64 MB PIM, 64 operations, and a 32-bit word, the length of the PIM packet is 64 bits.
- the PIM device analyzes the received packet in the input / output device 110 of FIG. 3 and converts it into control information that the computing device 120 can process and transmits it.
- the PIM read command proposed in the embodiment of the present invention uses the read protocol of the PSRAM bus without using the PIM packet.
- the time for processing the PIM packet depends on the type of the command to be processed, and in particular, the processing time becomes longer when overlapped with the reflash operation of the DRAM 140 during packet processing.
- the WAIT signal of the PSRAM bus is used to solve this problem and ensure the reliability of command transmission.
- the PIM leaves the WAIT signal invalid when processing a previously received command, indicating that it is not ready to process the next packet. Even if the system makes a read request, the PIM waits for the system through the WAIT signal.
- the address signal and WE # signal used as the destination address are sent to the PIM from the system regardless of the WAIT signal, so the waiting address signal and WE # signal must be preserved.
- Preserving the pending Address signal and WE # signal is processed by the input / output device 110 of FIG. 3, and a logic circuit for this is shown in FIG. 6 is a logic circuit for preserving a destination address and a read / write command of a packet waiting to be processed.
- the input / output device 110 internally generates and uses a processing wait signal (pending flag), and a logic circuit for generating the processing wait signal is shown in FIG. 7 is a logic circuit for generating a processing wait signal.
- the wait-for-process signal remains active-high when there is a pending destination address and read and write commands, and when the PIM receives the remainder of the pending packet or makes the WAIT signal valid for the response of a read request, the wait-for-process signal Make it active-low to indicate that there are no packets waiting to be processed.
- the system using PIM uses an embedded system that supports an external memory bus.
- the external memory bus supports a PSRAM bus.
- the processor of the system used is an ARM coretex-A9 based AP, and the OS uses 32-bit Linux 4.1.15.
- the external memory bus is also managed as virtual memory in Linux. Using the maximum page size allowed by the system, the entire PIM address area is mapped at once, and the physical address of the PIM is accurately predicted and accessed through the offset value of the address.
- PSRAM is used without requiring modification of hardware and software of an existing computer system to use PIM.
- PIM can be used on all commercial motherboards.
- the address and the DQ bus are expressed by classifying the two buses for conceptual understanding.
- the actual operation of the DQ bus does not have a separate DQ bus, and the address bus configured as a bi-directional bus can be used in compatible with the DQ. It should be noted that it is classified through MUX.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Dram (AREA)
Abstract
기존의 상용 메모리 버스를 변형 없이 이용하여 PIM을 운용 할 수 있는 방법 및 이 방법이 적용된 PIM 장치가 제공된다. 본 발명의 실시예에 따른 PIM(processing in memory) 장치는 데이터가 저장되는 메모리; 메모리의 해당 주소에서 데이터를 read 하고 write 하는 메모리 제어장치; 주소, 데이터 및 명령을 수신하는 입출력 장치; 데이터에 대해 명령을 수행하는 연산 장치;를 포함하고, 입출력 장치는, address 신호를 통해, 목적 주소를 수신하고, DQ 신호를 통해, 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 수신할 수 있다. 이에 의해, 기존 컴퓨터 시스템의 하드웨어 및 소프트웨어의 수정 없이도, PIM을 구현할 수 있으며, 특히 PSRAM을 사용하는 모든 상용 마더보드(motherboard)에서 PIM을 사용할 수 있게 된다.
Description
본 발명은 전통적인 컴퓨터 시스템과 호환 가능한 PIM(processing in memory; 프로세싱 인 메모리) 장치에 관한 것으로, 더욱 상세하게는 상용화된 메모리 버스를 이용한 PIM의 프로토콜, 패킷 구조, 운용 방법, 그리고 PIM 장치의 하드웨어 구조에 관한 것이다.
PIM에 대한 연구와 개발이 지속적으로 이루어짐에도 불구하고 PIM이 쉽게 상용화되지 못하는 이유는 기존 컴퓨터 시스템과의 호환성 문제를 가장 큰 원인으로 꼽을 수 있다. 기존 시스템과의 호환성 문제는 크게 하드웨어와 소프트웨어 측면으로 구분할 수 있으며 이를 극복하기 위해서는 하드웨어와 소프트웨어의 복합적인 접근 방법이 불가피한데, 이러한 접근 방법은 기존 시장을 설득하고 협력을 구해야만 실현 가능하다.
PIM과 기존 시스템과의 하드웨어적 호환성 문제는 기존 컴퓨터 시스템의 수직적 메모리 계층 구조(memory hierarchy)에서 야기된다. 오늘날 컴퓨터 시스템은 소형 임베디드(embedded) 시스템의 AP(application processor) 조차도 여러 계층의 캐시(cache)를 사용할 정도로 메모리 병목현상을 캐시에 의존하여 해결하기 때문에 앞으로도 프로세서가 캐시를 포기하는 일은 기대하기 힘들다. 하지만 캐시는 반복 접근하는 메모리 주소에 대해 이전에 접근했던 데이터를 참조하여 제공하는 방식인데, PIM은 동일한 주소에 접근하더라도 수행하는 operation에 따라서 쓰거나 읽는 데이터가 달라질 수 있다. 그러므로 PIM과 캐시를 함께 사용할 경우 자칫하면 cache consistency 문제, cache coherence 문제가 각각 혹은 동시에 발생하는 상황에 처해진다.
PIM을 사용하기에는 기존 메모리 버스 역시 걸림돌이 된다. 오늘날 대부분 시스템이 사용하는 메인 메모리 버스는 JEDEC 표준을 따르고 있다. 이러한 표준 메모리 버스는 read와 write의 응답시간이 일정한 fixed-latency 방식인데, 이에 반해 PIM은 read/write 동작 외에도 연산 명령을 처리하기 때문에 variable-latency 방식의 메모리 버스가 필요하다. 또한 기존 메모리 채널의 read/write, address, data 뿐만 아니라 PIM operation을 위한 정보를 훼손 없이 PIM에 전달할 수 있는 채널 역시 하드웨어적으로 마련되어야 한다.
PIM과 기존 시스템과의 소프트웨어적 호환성 문제는 운영체제의 메모리 관리에서 비롯된다. 오늘날 대부분의 운영체제는 가상 메모리를 사용하며 가상 메모리를 위한 virtual address는 프로세서의 MMU(memory management unit)를 통해 physical address로 사상(mapping) 되어 실제 물리 메모리에 접근된다(MMU를 가지고 있지 않은 프로세서를 사용하는 일부 시스템에서는 OS에서 MMU 기능을 수행함). 하지만, PIM의 연산 기능을 사용하기 위해서는 연산에 필요한 피연산자(operand)의 physical address를 명확하게 지시해야 하는데 소프트웨어에서 사용하는 virtual address는 non-contiguous하게 할당되는 페이지(page) 단위로 관리되기 때문에 이를 통해 모든 physical address를 정확하게 예측하는 것은 매우 어렵다.
지금까지 설명한 문제점들을 극복하기 위한 가장 좋은 방법은 PIM만을 위한 인터페이스를 개발하고 PIM을 사용하고자 하는 프로세서와 마더보드(motherboard), 주변 장치, 운영체제 등이 PIM을 사용할 수 있게 기술적 지원을 하는 것이다. 하지만 이러한 일은 앞서 언급했듯이 기존 시장을 설득하고 협력을 구해야 한다. HMC(hybrid memory cube)의 경우는 여러 제조사들과 연구그룹에 의해 기술적으로는 상용화 수준에 이르렀지만 인터페이스의 특수성으로 기존 시스템과 호환이 되지 않으며 이로 인해 HMC의 보편화에 대한 전망은 쉽게 내리기 어렵다.
본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 기존의 상용 메모리 버스를 변형 없이 이용하여 PIM을 운용 할 수 있는 방법 및 이 방법이 적용된 PIM 장치를 제공함에 있다.
상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, PIM(processing in memory) 장치는 데이터가 저장되는 메모리; 메모리의 해당 주소에서 데이터를 read 하고 write 하는 메모리 제어장치; 주소, 데이터 및 명령을 수신하는 입출력 장치; 데이터에 대해 명령을 수행하는 연산 장치;를 포함하고, 입출력 장치는, address 신호를 통해, 목적 주소를 수신하고, DQ 신호를 통해, 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 수신할 수 있다.
패킷의 길이는. 메모리 크기, 명령의 개수 및 데이터 워드의 크기에 의해 결정되는 것일 수 있다.
패킷은, 메모리의 write burst 프로토콜을 통해 데이터 write 동작과 동일하게 입출력 장치에 전달되는 것일 수 있다.
입출력 장치는, 수신한 패킷을 연산 장치가 처리 할 수 있는 제어 정보로 변경하여 연산 장치에 전달하는 것일 수 있다.
메모리 제어장치는, 연산 장치의 연산 결과를 메모리의 목적 주소에 저장하고, 저장된 연산 결과는, 읽기 프로토콜을 통해 시스템이 접근할 수 있는 것일 수 있다.
입출력 장치는, 연산 장치가 이전에 받은 명령을 처리중인 경우, 특정 신호를 무효한 상태로 두어, 다음 패킷을 처리할 준비가 되지 않았음을 알리는 것일 수 있다.
입출력 장치는, 연산 장치가 이전에 받은 명령을 처리중인 경우, 수신되는 Address 신호와 WE 신호를 보존하여 대기시키는 것일 수 있다.
입출력 장치는, 대기 중인 다음 패킷이 있음을 알리기 위한 처리 대기 신호를 활성화시키는 것일 수 있다.
입출력 장치는, 대기 중인 다음 패킷을 수신하거나 특정 신호를 유효한 상태로 변경하면, 처리 대기 신호를 비활성화시키는 것일 수 있다.
한편, 본 발명의 다른 실시예에 따른, PIM(processing in memory) 방법은 입출력 장치가, address 신호를 통해, 목적 주소를 수신하는 단계; 입출력 장치가, DQ 신호를 통해, 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 수신하는 단계; 연산 장치가, 명령을 수행하는 단계; 메모리 제어장치가, 명령 수행 결과를 메모리에 저장하는 단계;를 포함한다.
한편, 본 발명의 또다른 실시예에 따른, 컴퓨팅 시스템은 PIM(processing in memory) 장치; 및 PIM 장치에 데이터를 저장하는 시스템;를 포함하고, PIM 장치는, 데이터가 저장되는 메모리; 메모리의 해당 주소에서 데이터를 read 하고 write 하는 메모리 제어장치; 주소, 데이터 및 명령을 수신하는 입출력 장치; 데이터에 대해 명령을 수행하는 연산 장치;를 포함하고, 입출력 장치는, address 신호를 통해, 목적 주소를 수신하고, DQ 신호를 통해, 연산 장치가 수행할 명령이 수록된 패킷을 수신할 수 있다.
한편, 본 발명의 또다른 실시예에 따른, PIM(processing in memory) 방법은 시스템이, address 신호를 통해, PIM(processing in memory) 장치의 입출력 장치에 목적 주소를 전송하는 단계; 시스템이, DQ 신호를 통해, PIM 장치의 입출력 장치에, PIM 장치의 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 전송하는 단계; PIM 장치의 연산 장치가, 명령을 수행하는 단계; PIM 장치의 메모리 제어장치가, 명령 수행 결과를 메모리에 저장하는 단계;를 포함한다.
이상 설명한 바와 같이, 본 발명의 실시예들에 따르면, 기존 컴퓨터 시스템의 하드웨어 및 소프트웨어의 수정 없이도, PIM을 구현할 수 있으며, 특히 PSRAM을 사용하는 모든 상용 마더보드(motherboard)에서 PIM을 사용할 수 있게 된다.
도 1은 PSRAM 4-word burst read operation,
도 2는 PSRAM 4-word burst write operation,
도 3은 PIM 장치의 하드웨어 구조에 대한 블록다이어그램,
도 4는 PIM 패킷 구조,
도 5는 PIM 패킷 전송 방법,
도 6은 처리 대기 중인 패킷의 목적 주소와 읽기/쓰기 명령어 보존을 위한 논리 회로,
도 7은 처리 대기 신호를 생성을 위한 논리 회로,
도 8은 PIM과 CPU가 처리한 영상처리 결과를 비교한 표이다.
이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다.
본 발명의 실시예에서는, 상용 메모리 버스를 이용하는 PIM 장치를 제시한다. 구체적으로, 전통적인 컴퓨터 시스템과 호환 가능하도록 상용화된 메모리 버스를 이용한 PIM의 프로토콜, 패킷 구조, 운용 방법, 그리고 PIM 장치의 하드웨어 구조를 제안한다.
이를 위해, 본 발명의 실시예에서는, 기존의 상용 메모리인 PSRAM(pseudostatic random-access memory)의 프로토콜을 변형 없이 이용하여 PIM 인터페이스를 구현하고, PSRAM 버스를 그대로 이용할 수 있는 PIM 패킷(packet) 구조를 제안하며, PSRAM 버스를 이용하는 PIM 장치의 하드웨어 구조를 제시한다.
본 발명의 실시예에서는 JEDEC PSRAM(pseudostatic SRAM) 버스를 이용하는 PIM(processing in memory) 장치와 패킷 구조, 운용 방법을 제시한다. 본 발명의 실시예에 대한 이해를 돕기 위해, PSRAM과 PSRAM 버스의 특징을 우선 설명한다.
PSRAM은 refresh 회로와 address-decoder를 내장하고 있는 DRAM으로서 DRAM의 높은 집적도와 SRAM의 접근 용이성을 합친 메모리이다.
PSRAM은 read 혹은 write 동작 중 내부에서 refresh와 충돌이 발생할 수 있으며, 이러한 경우를 위해서 PSRAM 버스는 다른 DRAM 기반 메모리 버스가 고정 응답 지연(fixed latency) 버스 프로토콜을 사용하는 것과 달리 가변 응답 지연 방식(variable latency)의 버스 프로토콜을 사용한다.
가변 응답 지연 방식에 따른 read와 write의 정확한 타이밍을 제공하기 위하여 PSRAM 메모리 버스는 WAIT 신호를 사용하고 있으며, PSRAM 컨트롤러는 WAIT 신호의 상태에 따라 읽기 데이터를 읽거나 쓰기 데이터를 입력할 수 있다.
그 외에, burst length는 선택가능하며 WAIT 신호가 assert 된 후 DQ 신호가 유효한 데이터를 출력하기까지 지연시간도 선택가능하다. PSRAM 버스의 프로토콜은 도 1 및 2와 같다.
도 1과 2에서, ADV # 신호는 address가 유효한 구간을 알리며, CE #은 chip select 신호로 사용되고 WE #은 write enable 신호로 사용된다. DQ는 데이터 신호인데 양방향 버스(bi-directional bus) 이므로 OE # 신호를 통해 현재 DQ의 입·출력 방향을 결정한다.
WAIT신호는 PSRAM이 시스템으로 보내는 신호로써, 읽기 모드에서는 PSRAM이 요청받은 주소의 데이터를 출력하기 전에 WAIT 신호를 assert하여 DQ에서 출력되는 데이터가 유효함을 알린다. 쓰기 모드에서는 쓰기 데이터를 수신 할 준비가 되었을 때 PSRAM이 WAIT 신호를 assert하며 memory controller는 약속된 burst length와 타이밍에 맞게 쓰기 데이터를 전송한다.
본 발명의 실시예에 따른 PIM은 메모리의 기본적인 기능 측면에서는 PSRAM과 동일하다. DRAM을 core-memory로 사용하고 있고 address-decoder와 refresh 회로를 내장하고 있다. 여기에 추가로 몇 가지 연산기능을 제공한다. PIM 장치의 하드웨어 구조는 도 3과 같다.
본 발명의 일 실시예에 따른 PIM 장치는, 도 3에 도시된 바와 같이, 입출력 장치(110), 연산 장치(120), 메모리 제어장치(130) 및 DRAM(140)을 포함하여 구성된다.
DRAM(140)은 PIM의 내부 메모리로 사용되며 address decoding, refresh 등의 주요 DRAM 동작은 메모리 제어장치(130)에 의해 제어된다.
연산 장치(120)는 PIM의 입출력 장치(110)에서 받은 명령 코드를 수행하는데 메모리의 기본적인 동작과 연산 기능 등을 수행한다.
입출력 장치(110)는 PSRAM 버스 프로토콜에 의해 PIM 접근 패킷(packet)을 분해하여 연산 장치(120)가 처리할 수 있게 전달하고 그 결과를 응답해 준다.
본 발명의 실시예에서 제안하는 PIM은 상용 메모리 버스를 사용하기 때문에 몇 가지의 제어신호와 주소, 데이터 등의 신호만을 사용한다. 따라서 PIM에게 연산에 대한 명령을 전달하기 위해서는 기존 메모리 버스를 다른 방식으로 운용해야만 한다.
본 발명의 실시예에서 제안하는 PIM 패킷의 구조는 도 4와 같고, 이러한 PIM 패킷을 PSRAM 버스를 이용하여 전송하는 방법은 도 5와 같다.
PIM은 기본적인 메모리 기능과 연산 기능을 수행하며, 이러한 기능은 패킷의 명령 코드를 통해 특정 기능을 사용할 수 있다. 도 4에서, 목적 주소는 쓰기와 읽기 명령, 그리고 연산 명령의 결과를 적용할 주소로 사용된다. 명령 코드는 PIM 장치가 수행해야할 명령을 나타낸다.
PIM이 수행하는 연산 명령은 크게 R-type과 I-type으로 구분되는데, R-type의 명령을 수행할 시에는 피연산자 주소를 통해 연산에 필요한 데이터를 불러오며(recall), I-type 명령어는 패킷에 포함된 데이터 필드의 값을 피연산자로 사용한다.
명령 코드의 모든 기능은 목적 주소를 반드시 필요로 하며, 그 외의 연산 기능을 수행하기 위해서는 명령어의 종류에 따라 피연산자 주소와 데이터가 요구된다.
목적 주소는 모든 PIM 접근에 필요하므로 도 5와 같이 PSRAM 버스의 address 신호를 목적 주소로 그대로 사용한다. PIM 장치에 패킷을 전달하기 위해서는 DQ 신호를 사용하기 때문에, PIM의 읽기 명령을 제외한 모든 패킷은 PSRAM 버스의 쓰기 프로토콜을 사용한다.
PIM 패킷의 길이는 PIM 내부의 접근 가능한 메모리 크기, 명령어의 개수, 그리고 시스템의 데이터 워드(word) 크기에 의해 결정된다. 가령 64 MB 크기의 PIM, 64 개의 연산, 32-bit 워드를 가진 시스템이라면 PIM 패킷의 길이는 64 비트가 된다.
이러한 패킷은 PSRAM write burst 프로토콜을 통해 데이터 쓰기 동작과 동일하게 PIM에 전달된다. PIM 장치는 수신한 패킷을 도 3의 입출력 장치(110)에서 분석하여 연산 장치(120)가 처리 할 수 있는 제어 정보로 변경하여 전달한다.
모든 연산 명령은 PSRAM 버스의 쓰기 프로토콜에 의해 전달되기 때문에 연산 결과 역시 목적 주소에 적용되며, 이 값은 별도의 읽기 명령을 통해서 접근할 수 있다.
따라서 본 발명의 실시예에서 제안하는 PIM 읽기 명령은 PIM 패킷을 사용하지 않고 PSRAM 버스의 읽기 프로토콜을 그대로 사용한다. PIM 패킷을 처리하는 시간은 처리하는 명령어의 종류에 따라 달라지며, 특히 패킷 처리 중에 DRAM(140)의 reflash 동작과 중첩될 경우 처리 시간은 더욱 길어진다.
PSRAM 버스 프로토콜은 현재 PIM의 패킷 처리 과정에 대한 정보를 전혀 알 수 없기 때문에, 시스템이 PIM에게 연속적인 명령을 전달할 경우 일부 명령어가 제대로 수행되지 않을 수 있다.
본 발명의 실시예에서는 이러한 문제를 해결하고 명령어 전송의 신뢰성을 보장하기 위해 PSRAM 버스의 WAIT 신호를 이용한다. PIM은 이전에 받은 명령을 처리중일 때 WAIT 신호를 무효한 상태로 두고 다음 패킷을 처리할 준비가 되지 않았음을 알린다. 시스템이 읽기 요청을 할지라도 PIM은 WAIT 신호를 통해 시스템을 대기시킨다.
다만 목적 주소로 사용되는 Address 신호와 WE # 신호는 WAIT 신호와 상관없이 시스템에서 PIM으로 보내지므로 대기 중인 Address 신호와 WE # 신호는 보존해야 한다. 대기 중인 Address 신호와 WE # 신호를 보존하는 것은 도 3의 입출력 장치(110)에서 처리되며, 이를 위한 논리 회로는 도 6과 같다. 도 6은 처리 대기 중인 패킷의 목적 주소와 읽기/쓰기 명령어 보존을 위한 논리 회로이다.
뿐만 아니라 PIM이 하나의 패킷을 처리한 후에는 이미 대기 중인 다음 패킷이 있는지 여부를 알려야 한다. 이를 위해 입출력 장치(110)는 내부적으로 처리 대기 신호(pending flag)를 만들어 사용하며 처리 대기 신호를 만드는 논리 회로는 도 7과 같다. 도 7은 처리 대기 신호를 생성을 위한 논리 회로이다.
처리 대기 신호는 대기 중인 목적 주소와 읽기 및 쓰기 명령어가 있으면 active-high 상태를 유지하고, PIM이 대기 중인 패킷의 나머지를 수신하거나 읽기 요청의 응답을 위해 WAIT 신호를 유효한 상태로 만들면 처리 대기 신호를 active-low로 만들어 처리 대기 중인 패킷이 없음을 알린다.
본 발명의 실시예를 통해 개발한 PIM을 통해 512x512 크기의 24-bit 컬러사진을 median-filter 처리를 한 후 CPU가 처리한 결과와 비교를 해보았다. PIM이 사용되는 시스템은 external memory bus를 지원하는 임베디드 시스템을 사용하였는데, external memory bus가 PSRAM 버스를 지원한다. 사용하는 시스템의 프로세서는 ARM coretex-A9 기반의 AP를 사용하였으며 OS는 32-bit Linux 4.1.15를 사용하였다. External memory bus 역시 리눅스에서 가상 메모리로 관리 되는데, 시스템이 허용하는 최대 페이지 크기를 이용하여 PIM 주소 영역 전체를 한 번에 사상하고 주소의 offset 값을 통해 PIM의 물리 주소를 정확하게 예측하고 접근하였다.
처리 결과는 도 8과 같다. 도 8의 결과와 같이 동일한 알고리즘을 수행하였을 때 연산 결과는 CPU와 PIM이 동일하지만 처리 시간은 PIM을 이용하는 방식이 CPU의 처리 시간보다 20배 이상 향상된 것을 알 수 있다.
지금까지, 상용 메모리 버스를 이용하는 프로세싱 인 메모리 장치에 대해 바람직한 실시예를 들어 상세히 설명하였다.
본 발명의 실시예에서는, 기존 상용 메모리 버스를 이용할 수 있는 PIM 장치, PIM 패킷 구조 및 PIM 운용 방법을 제시하여, PIM을 사용하기 위해 기존 컴퓨터 시스템의 하드웨어 및 소프트웨어의 수정을 요구하지 않고, PSRAM을 사용하는 모든 상용 마더보드(motherboard)에서 PIM을 사용할 수 있도록 하였다.
한편, 본 명세서에서, address와 DQ 버스는 개념적인 이해를 위해 두 버스를 구분하여 표현하였다. 하지만 실제 DQ 버스의 운용은 (PSRAM 표준에 근거하여) 별도의 DQ 버스를 두지 않고, 양방향 버스(bi-directional bus)로 설정된 address 버스를 DQ와 호환하여 사용가능하며, 이때 주소와 데이터는 시차에 의한 MUX를 통해 구분함에 유념하여야 한다.
또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어 져서는 안될 것이다.
Claims (12)
- 데이터가 저장되는 메모리;메모리의 해당 주소에서 데이터를 read 하고 write 하는 메모리 제어장치;주소, 데이터 및 명령을 수신하는 입출력 장치;데이터에 대해 명령을 수행하는 연산 장치;를 포함하고,입출력 장치는,address 신호를 통해, 목적 주소를 수신하고,DQ 신호를 통해, 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 수신하는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 1에 있어서,패킷의 길이는.메모리 크기, 명령의 개수 및 데이터 워드의 크기에 의해 결정되는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 1에 있어서,패킷은,메모리의 write burst 프로토콜을 통해 데이터 write 동작과 동일하게 입출력 장치에 전달되는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 3에 있어서,입출력 장치는,수신한 패킷을 연산 장치가 처리 할 수 있는 제어 정보로 변경하여 연산 장치에 전달하는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 4에 있어서,메모리 제어장치는,연산 장치의 연산 결과를 메모리의 목적 주소에 저장하고,저장된 연산 결과는,읽기 프로토콜을 통해 시스템이 접근할 수 있는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 1에 있어서,입출력 장치는,연산 장치가 이전에 받은 명령을 처리중인 경우, 특정 신호를 무효한 상태로 두어, 다음 패킷을 처리할 준비가 되지 않았음을 알리는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 1에 있어서,입출력 장치는,연산 장치가 이전에 받은 명령을 처리중인 경우, 수신되는 Address 신호와 WE 신호를 보존하여 대기시키는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 7에 있어서,입출력 장치는,대기 중인 다음 패킷이 있음을 알리기 위한 처리 대기 신호를 활성화시키는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 청구항 8에 있어서,입출력 장치는,대기 중인 다음 패킷을 수신하거나 특정 신호를 유효한 상태로 변경하면, 처리 대기 신호를 비활성화시키는 것을 특징으로 하는 PIM(processing in memory) 장치.
- 입출력 장치가, address 신호를 통해, 목적 주소를 수신하는 단계;입출력 장치가, DQ 신호를 통해, 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 수신하는 단계;연산 장치가, 명령을 수행하는 단계;메모리 제어장치가, 명령 수행 결과를 메모리에 저장하는 단계;를 포함하는 것을 특징으로 하는 PIM(processing in memory) 방법.
- PIM(processing in memory) 장치; 및PIM 장치에 데이터를 저장하는 시스템;를 포함하고,PIM 장치는,데이터가 저장되는 메모리;메모리의 해당 주소에서 데이터를 read 하고 write 하는 메모리 제어장치;주소, 데이터 및 명령을 수신하는 입출력 장치;데이터에 대해 명령을 수행하는 연산 장치;를 포함하고,입출력 장치는,address 신호를 통해, 목적 주소를 수신하고,DQ 신호를 통해, 연산 장치가 수행할 명령이 수록된 패킷을 수신하는 것을 특징으로 하는 컴퓨팅 시스템.
- 시스템이, address 신호를 통해, PIM(processing in memory) 장치의 입출력 장치에 목적 주소를 전송하는 단계;시스템이, DQ 신호를 통해, PIM 장치의 입출력 장치에, PIM 장치의 연산 장치가 수행할 명령, 피연산자 주소 및 데이터가 수록된 패킷을 전송하는 단계;PIM 장치의 연산 장치가, 명령을 수행하는 단계;PIM 장치의 메모리 제어장치가, 명령 수행 결과를 메모리에 저장하는 단계;를 포함하는 것을 특징으로 하는 PIM(processing in memory) 방법.
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| KR10-2018-0127171 | 2018-10-24 | ||
| KR1020180127171A KR102144185B1 (ko) | 2018-10-24 | 2018-10-24 | 상용 메모리 버스를 이용하는 프로세싱 인 메모리 장치 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020085583A1 true WO2020085583A1 (ko) | 2020-04-30 |
Family
ID=70331199
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/KR2019/001204 Ceased WO2020085583A1 (ko) | 2018-10-24 | 2019-01-29 | 상용 메모리 버스를 이용하는 프로세싱 인 메모리 장치 |
Country Status (2)
| Country | Link |
|---|---|
| KR (1) | KR102144185B1 (ko) |
| WO (1) | WO2020085583A1 (ko) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20220007403A (ko) * | 2020-07-10 | 2022-01-18 | 한국전자기술연구원 | 프로세싱인메모리의 메모리 관리 방법 및 장치 |
| KR20220007404A (ko) * | 2020-07-10 | 2022-01-18 | 한국전자기술연구원 | 프로세싱인메모리의 읽고-쓰기-연산 명령어 처리 방법 및 장치 |
| KR20220098947A (ko) * | 2021-01-05 | 2022-07-12 | 삼성전자주식회사 | 반도체 장치 및 이를 포함하는 전자 장치 |
| EP4174672A1 (en) | 2021-10-27 | 2023-05-03 | Samsung Electronics Co., Ltd. | Backward compatible processing-in-memory (pim) protocol |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20170045098A (ko) * | 2015-10-16 | 2017-04-26 | 삼성전자주식회사 | 프로세싱-인-메모리를 이용한 명령어 처리 방법 및 그 장치 |
| KR20180015565A (ko) * | 2016-08-03 | 2018-02-13 | 삼성전자주식회사 | 메모리 모듈 및 그것의 동작 방법 |
| KR20180042111A (ko) * | 2016-10-14 | 2018-04-25 | 삼성전자주식회사 | 프로세서 모드를 가지는 메모리 모듈 및 프로세싱 데이터 버퍼 |
| KR101858597B1 (ko) * | 2016-12-30 | 2018-05-17 | 한양대학교 산학협력단 | 프로세싱 인 메모리 시스템의 연산할 작업, 연산할 데이터 및 연산 결과 데이터 전달 방법 및 프로세싱 인 메모리 시스템 |
| KR101867219B1 (ko) * | 2017-02-22 | 2018-06-12 | 연세대학교 산학협력단 | 동적 메모리 인터페이스에 기반하여 서로 다른 메모리 연산들을 처리하기 위한 장치 및 방법 |
-
2018
- 2018-10-24 KR KR1020180127171A patent/KR102144185B1/ko active Active
-
2019
- 2019-01-29 WO PCT/KR2019/001204 patent/WO2020085583A1/ko not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20170045098A (ko) * | 2015-10-16 | 2017-04-26 | 삼성전자주식회사 | 프로세싱-인-메모리를 이용한 명령어 처리 방법 및 그 장치 |
| KR20180015565A (ko) * | 2016-08-03 | 2018-02-13 | 삼성전자주식회사 | 메모리 모듈 및 그것의 동작 방법 |
| KR20180042111A (ko) * | 2016-10-14 | 2018-04-25 | 삼성전자주식회사 | 프로세서 모드를 가지는 메모리 모듈 및 프로세싱 데이터 버퍼 |
| KR101858597B1 (ko) * | 2016-12-30 | 2018-05-17 | 한양대학교 산학협력단 | 프로세싱 인 메모리 시스템의 연산할 작업, 연산할 데이터 및 연산 결과 데이터 전달 방법 및 프로세싱 인 메모리 시스템 |
| KR101867219B1 (ko) * | 2017-02-22 | 2018-06-12 | 연세대학교 산학협력단 | 동적 메모리 인터페이스에 기반하여 서로 다른 메모리 연산들을 처리하기 위한 장치 및 방법 |
Also Published As
| Publication number | Publication date |
|---|---|
| KR102144185B1 (ko) | 2020-08-12 |
| KR20200046270A (ko) | 2020-05-07 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US12386696B2 (en) | Delayed snoop for improved multi-process false sharing parallel thread performance | |
| US5263142A (en) | Input/output cache with mapped pages allocated for caching direct (virtual) memory access input/output data based on type of I/O devices | |
| US7287101B2 (en) | Direct memory access using memory descriptor list | |
| EP2994837B1 (en) | Multi-core page table sets of attribute fields | |
| TW390986B (en) | Cache memory system | |
| CA1300279C (en) | Central processor unit for digital data processing system including cache management mechanism | |
| CN109977037B (zh) | 一种dma数据传输方法及系统 | |
| US20130054896A1 (en) | System memory controller having a cache | |
| CN112631961A (zh) | 一种内存管理单元、地址转译方法以及处理器 | |
| KR102144185B1 (ko) | 상용 메모리 버스를 이용하는 프로세싱 인 메모리 장치 | |
| WO2025113441A1 (zh) | 一种网卡设备及数据传输系统 | |
| CN114546896A (zh) | 系统内存管理单元、读写请求处理方法、电子设备和片上系统 | |
| JPH0743682B2 (ja) | 中央処理装置 cpu とシステムバスを有するワークステーションすなわちサーバ | |
| EP3992802B1 (en) | Input/output device operational modes for a system with memory pools | |
| EP3270293B1 (en) | Two stage command buffers to overlap iommu map and second tier memory reads | |
| KR100322223B1 (ko) | 대기행렬및스누프테이블을갖는메모리제어기 | |
| CN113849262A (zh) | 用于无需复制而在虚拟机之间移动数据的技术 | |
| US20250315377A1 (en) | Hybrid-paging | |
| US9436617B2 (en) | Dynamic processor-memory revectoring architecture | |
| CN117827417A (zh) | 一种内存管理方法和相关设备 | |
| JPH01298457A (ja) | コンピュータシステム | |
| US20070204091A1 (en) | Single Bus Command for Transferring Data in a Processing System | |
| US8850159B2 (en) | Method and system for latency optimized ATS usage | |
| US20050091458A1 (en) | Storage control apparatus, control system capable of DMA transfer, and method of controlling DMA transfer | |
| KR102932434B1 (ko) | NVMe SSD 및 이를 포함하는 스토리지 시스템 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19875073 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 19875073 Country of ref document: EP Kind code of ref document: A1 |