KR102673748B1 - Multi-dimension dma controller and computer system comprising the same - Google Patents

Multi-dimension dma controller and computer system comprising the same Download PDF

Info

Publication number
KR102673748B1
KR102673748B1 KR1020210041598A KR20210041598A KR102673748B1 KR 102673748 B1 KR102673748 B1 KR 102673748B1 KR 1020210041598 A KR1020210041598 A KR 1020210041598A KR 20210041598 A KR20210041598 A KR 20210041598A KR 102673748 B1 KR102673748 B1 KR 102673748B1
Authority
KR
South Korea
Prior art keywords
data
descriptor
blob
multidimensional
controller
Prior art date
Application number
KR1020210041598A
Other languages
Korean (ko)
Other versions
KR20220074683A (en
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 US17/533,891 priority Critical patent/US20220171622A1/en
Publication of KR20220074683A publication Critical patent/KR20220074683A/en
Application granted granted Critical
Publication of KR102673748B1 publication Critical patent/KR102673748B1/en

Links

Images

Classifications

    • 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/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1081Address translation for peripheral access to main memory, e.g. direct memory access [DMA]
    • 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/30094Condition code generation, e.g. Carry, Zero flag

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Image Generation (AREA)

Abstract

본 발명에 따른 메모리에 저장되는 다차원 데이터의 직접 메모리 접근(DMA)을 수행하기 위한 다차원 DMA 컨트롤러는, 상기 다차원 데이터를 접근하기 위한 마이크로코드 디스크립터, 노멀 디스크립터, 그리고 블롭 디스크립터를 포함하는 디스크립터, 상기 마이크로코드 디스크립터에 포함된 명령어(Instruction)를 실행하는 마이크로코드 컨트롤러, 그리고 상기 디스크립터에 저장된 파라미터에 따라 상기 다차원 데이터의 적어도 일부를 자동적으로 전송하는 전송 컨트롤러를 포함한다. A multidimensional DMA controller for performing direct memory access (DMA) of multidimensional data stored in a memory according to the present invention includes a descriptor including a microcode descriptor, a normal descriptor, and a blob descriptor for accessing the multidimensional data, and the micro It includes a microcode controller that executes instructions included in a code descriptor, and a transmission controller that automatically transmits at least part of the multidimensional data according to parameters stored in the descriptor.

Description

다차원 직접 메모리 접근 컨트롤러 및 그것을 포함하는 컴퓨터 시스템{MULTI-DIMENSION DMA CONTROLLER AND COMPUTER SYSTEM COMPRISING THE SAME}Multidimensional direct memory access controller and computer system including same {MULTI-DIMENSION DMA CONTROLLER AND COMPUTER SYSTEM COMPRISING THE SAME}

본 발명은 컴퓨터 시스템에 관한 것으로, 좀 더 구체적으로 다차원 데이터에 대한 접근 성능을 높일 수 있는 다차원 직접 메모리 접근 컨트롤러 및 그것을 포함하는 컴퓨터 시스템에 관한 것이다.The present invention relates to a computer system, and more specifically, to a multidimensional direct memory access controller capable of increasing access performance to multidimensional data and a computer system including the same.

직접 메모리 접근 컨트롤러(Direct Memory Access Controller: 이하, DMAC) 기술은 CPU 또는 프로세서의 성능을 향상시키기 위한 기술로서 현재까지 컴퓨터 시스템에 널리 활용되어 왔다. 직접 메모리 접근 컨트롤러(DMAC)의 제어 레지스터에 설정되는 데이터를 일반적으로 DMA 디스크립터(DMA Descriptor)라 부른다. 일반적으로 DMA 디스크립터는 적어도 4개의 레지스터를 포함한다. Direct Memory Access Controller (DMAC) technology is a technology to improve the performance of a CPU or processor and has been widely used in computer systems to date. Data set in the control register of the direct memory access controller (DMAC) is generally called a DMA descriptor. Typically, a DMA descriptor contains at least four registers.

예를 들면, DMA 디스크립터는 소스 어드레스(Source address) 레지스터, 목적지 어드레스(Destination address) 레지스터, 데이터 사이즈 레지스터, 후속 디스크립터 어드레스(Next descriptor address) 레지스터 등을 포함할 수 있다. For example, the DMA descriptor may include a source address register, a destination address register, a data size register, a next descriptor address register, etc.

소스 어드레스 레지스터에는 메모리 상에서 읽어올 데이터의 시작 어드레스가 저장된다. 목적지 어드레스 레지스터에는 복사한 데이터를 기입할 메모리의 시작 어드레스가 저장된다. 그리고 후속 디스크립터 어드레스 레지스터에는 현재의 DMA 디스크립터에 의한 데이터 복사가 완료된 이후에 DMAC가 후속 데이터의 복사를 위해 읽어올 DMA 디스크립터의 어드레스가 저장될 수 있다. 이 밖에도 DMA 디스크립터(DMA Descriptor)에는 DMA 디스크립터의 속성을 정의하는 값들(예를 들면, isLast, enIRQ)이 더 포함될 수 있다.The starting address of data to be read from memory is stored in the source address register. The destination address register stores the starting address of the memory where the copied data is to be written. And in the subsequent descriptor address register, the address of the DMA descriptor to be read by DMAC for copying subsequent data after data copying by the current DMA descriptor is completed may be stored. In addition, the DMA descriptor may further include values (eg, isLast, enIRQ) that define the properties of the DMA descriptor.

최근에는 인공 지능(AI) 기술의 발전과 확산에 따라 컴퓨터 시스템에서는 3차원 배열의 데이터(이하, '3차원 데이터' 또는 "3D-BLOB"이라 칭함)를 처리해야 하는 경우가 많아지고 있다. 3차원 데이터는 컴퓨터 시스템 및 프로그래밍 언어 등에 따라 로우 매이저(Row-Major) 또는 칼럼 매이저(Column-Major) 방식으로 저장된다. 그리고 3차원 데이터의 크기와 규격이 달라짐에 따라 실제 물리적인 메모리에 저장되는 위치는 모두 바뀌게 된다. Recently, with the development and spread of artificial intelligence (AI) technology, computer systems are increasingly required to process three-dimensional arrays of data (hereinafter referred to as “3-dimensional data” or “3D-BLOB”). 3D data is stored in Row-Major or Column-Major depending on the computer system and programming language. And as the size and specifications of 3D data change, the locations where it is stored in the actual physical memory all change.

하지만, 3차원 데이터 또는 3차원 이상의 다차원 데이터의 전송이나 처리를 위한 DMAC 구조나 아키텍쳐에 대한 지원은 부족한 상황이다. 따라서, 3차원 데이터 또는 그 이상의 다차원 데이터를 효율적으로 전송하기 위한 DMAC 기술에 대한 요구가 절실한 실정이다. However, support for DMAC structure or architecture for transmission or processing of 3D data or multidimensional data beyond 3D is lacking. Therefore, there is an urgent need for DMAC technology to efficiently transmit 3D data or more multidimensional data.

본 발명의 목적은 3차원 또는 다차원 데이터로의 접근에 있어서 성능을 높일 수 있고, 직관적이고 간결한 DMA 프로그래밍 모델을 제공하기 위한 DMA 컨트롤러를 제공하는데 있다.The purpose of the present invention is to provide a DMA controller that can improve performance in accessing three-dimensional or multi-dimensional data and provides an intuitive and concise DMA programming model.

본 발명의 실시 예에 따른 메모리에 저장되는 다차원 데이터의 직접 메모리 접근(DMA)을 수행하기 위한 다차원 DMA 컨트롤러는, 상기 다차원 데이터를 접근하기 위한 마이크로코드 디스크립터, 노멀 디스크립터, 그리고 블롭 디스크립터를 포함하는 디스크립터, 상기 마이크로코드 디스크립터에 포함된 명령어(Instruction)를 실행하는 마이크로코드 컨트롤러, 그리고 상기 디스크립터에 저장된 파라미터에 따라 상기 다차원 데이터의 적어도 일부를 자동적으로 전송하는 전송 컨트롤러를 포함한다. A multidimensional DMA controller for performing direct memory access (DMA) of multidimensional data stored in a memory according to an embodiment of the present invention includes a descriptor including a microcode descriptor, a normal descriptor, and a blob descriptor for accessing the multidimensional data. , a microcode controller that executes instructions included in the microcode descriptor, and a transmission controller that automatically transmits at least part of the multidimensional data according to parameters stored in the descriptor.

실시 예로서, 상기 마이크로코드 디스크립터는 복수의 커맨드 레지스터들을 포함할 수 있다. 상기 복수의 커맨드 레지스터들 중 제 1 내지 제 3 커맨드 레지스터에는 명령어가 명령어(Instruction)가 저장되고, 상기 복수의 커맨드 레지스터들 중 제 4 레지스터에는 후속 디스크립터 어드레스가 저장될 수 있다. 상기 제 3 커맨드 레지스터의 적어도 하나의 비트는 상기 다차원 데이터가 1차원 배열인지 또는 다차원 배열인지를 지시하는 데이터 타입 필드를 포함할 수 있다.As an embodiment, the microcode descriptor may include a plurality of command registers. Instructions may be stored in first to third command registers among the plurality of command registers, and a subsequent descriptor address may be stored in the fourth register among the plurality of command registers. At least one bit of the third command register may include a data type field indicating whether the multidimensional data is a one-dimensional array or a multidimensional array.

실시 예로서, 상기 노멀 디스크립터는 소스 어드레스를 저장하는 제 1 커맨드 레지스터, 목적지 어드레스를 저장하는 제 2 커맨드 레지스터, 그리고 전송 바이트 수를 저장하는 제 3 커맨드 레지스터를 포함할 수 있다. 상기 제 3 커맨드 레지스터에는 상기 소스 어드레스의 속성을 정의하는 상수 쓰기(CW) 필드가 포함될 수 있다. 상수 쓰기(CW) 필드가 논리 '1'인 경우, 상기 제 1 커맨드 레지스터의 상기 소스 어드레스에 대응하는 필드는 상수 데이터를 지시할 수 있다. 상수 쓰기(CW) 필드가 논리 '1'인 경우, 상기 다차원 DMA 컨트롤러는 읽기 동작없이 상기 전송 바이트 수에 대응하는 상기 상수 데이터(Constant Data)를 상기 메모리의 상기 목적지 어드레스에 기입할 수 있다. As an embodiment, the normal descriptor may include a first command register storing a source address, a second command register storing a destination address, and a third command register storing the number of transmitted bytes. The third command register may include a constant write (CW) field that defines properties of the source address. When the constant write (CW) field is logic '1', the field corresponding to the source address of the first command register may indicate constant data. When the constant write (CW) field is logic '1', the multidimensional DMA controller can write the constant data (Constant Data) corresponding to the number of transfer bytes to the destination address of the memory without a read operation.

실시 예로서, 상기 3차원 블롭 디스크럽터는, 페이로드 데이터를 저장하는 제 1 내지 제 3 커맨드 레지스터, 그리고 후속 디스크립터의 어드레스를 저장하는 제 4 커맨드 레지스터를 포함할 수 있다. 상기 제 3 커맨드 레지스터에는 상기 페이로드 데이터의 속성을 지시하는 페이로드 타입 필드를 포함할 수 있다. As an embodiment, the 3D blob destructor may include first to third command registers that store payload data, and a fourth command register that stores the address of a subsequent descriptor. The third command register may include a payload type field indicating properties of the payload data.

상기 페이로드 타입 필드가 제 1 값인 경우, 상기 페이로드 데이터는 상기 메모리 상에서의 3차원 데이터의 규격을 정의할 수 있다. 상기 페이로드 타입 필드가 제 2 값인 경우, 상기 페이로드 데이터는 상기 메모리 상에서의 3차원 데이터에 포함되는 매크로 블롭의 위치를 정의할 수 있다. 상기 페이로드 타입 필드가 제 3 값인 경우, 상기 페이로드 데이터는 상기 메모리 상에서의 3차원 데이터에 포함되는 매크로 블롭의 사이즈를 정의할 수 있다. 상기 페이로드 타입 필드가 제 4 값인 경우, 상기 페이로드 데이터는 이전에 전송된 매크로 블롭과 동일한 규격을 갖는 적어도 하나의 인접한 매크로 블롭을 전송하기 위한 데이터에 대응할 수 있다. When the payload type field is the first value, the payload data may define a standard for 3D data on the memory. When the payload type field is a second value, the payload data may define the location of a macro blob included in 3D data on the memory. When the payload type field is a third value, the payload data may define the size of a macro blob included in 3D data on the memory. When the payload type field is the fourth value, the payload data may correspond to data for transmitting at least one adjacent macro blob having the same specifications as a previously transmitted macro blob.

상기 페이로드 데이터는, 상기 적어도 하나의 인접한 매크로 블롭의 수(Iteration count), 그리고 상기 다차원 데이터 내에서 상기 이전에 전송된 매크로 블롭에 대한 상기 적어도 하나의 인접한 매크로 블롭의 방향 중 적어도 하나를 포함할 수 있다. 상기 페이로드 데이터는, 상기 적어도 하나의 인접한 매크로 블롭의 어드레스를 다차원 배열 또는 일차원 배열로 변환하도록 설정하는 필드를 포함할 수 있다. 상기 페이로드 데이터는, 고정된 어드레스를 생성할지 또는 가변되는 어드레스를 생성할지를 지시하는 필드를 포함할 수 있다. 상기 고정된 어드레스는 상기 디스크립터의 소스 어드레스가 FIFO(First-In-First-Out) 메모리인 경우에 대응할 수 있다. The payload data may include at least one of an iteration count of the at least one adjacent macro blob and an orientation of the at least one adjacent macro blob relative to the previously transmitted macro blob within the multidimensional data. You can. The payload data may include a field for converting the address of the at least one adjacent macro blob into a multidimensional array or a one-dimensional array. The payload data may include a field indicating whether to generate a fixed address or a variable address. The fixed address may correspond to a case where the source address of the descriptor is a First-In-First-Out (FIFO) memory.

실시 예로서, 상기 마이크로코드 컨트롤러는 32개의 범용 레지스터를 갖고, 31개의 명령어 코드를 가질 수 있다. 상기 마이크로코드 컨트롤러는, 상기 범용 레지스터 중에서 상기 마이크로코드 컨트롤러의 ALU의 입력으로 사용되는 소스 레지스터(RS), 상기 ALU의 처리 결과를 저장하는 목적지 레지스터(RD)를 포함할 수 있다.As an example, the microcode controller may have 32 general-purpose registers and 31 instruction codes. Among the general-purpose registers, the microcode controller may include a source register (RS) used as an input to the ALU of the microcode controller and a destination register (RD) that stores processing results of the ALU.

본 발명의 실시 예에 따른 컴퓨터 시스템은, 중앙 처리 장치, 메모리 장치, 그리고 상기 중앙 처리 장치의 제어에 따라 상기 메모리 장치에 저장되는 다차원 데이터에 대한 직접 메모리 접근(DMA)을 수행하기 위한 다차원 DMA 컨트롤러를 포함하되, 상기 다차원 DMA 컨트롤러는, 상기 다차원 데이터를 접근하기 위한 마이크로코드 디스크립터, 노멀 디스크립터, 그리고 3차원 블롭 디스크립터를 포함하는 디스크립터, 상기 마이크로코드 디스크립터에 포함된 명령어(Instrcution)를 실행하는 마이크로코드 컨트롤러, 그리고 상기 디스크립터에 저장된 파라미터에 따라 상기 다차원 데이터의 적어도 일부를 자동적으로 전송하는 전송 컨트롤러를 포함한다. A computer system according to an embodiment of the present invention includes a central processing unit, a memory device, and a multidimensional DMA controller for performing direct memory access (DMA) on multidimensional data stored in the memory device under the control of the central processing unit. Including, the multidimensional DMA controller, a descriptor including a microcode descriptor, a normal descriptor, and a 3D blob descriptor for accessing the multidimensional data, and a microcode that executes instructions included in the microcode descriptor. It includes a controller, and a transmission controller that automatically transmits at least part of the multidimensional data according to parameters stored in the descriptor.

본 발명의 실시 예에 따른 3차원 또는 다차원 데이터에 접근하는 DMA 컨트롤러에 따르면, 다차원 데이터로의 순차적 접근시 발생하는 비효율성을 제거하여 높은 성능을 제공할 수 있다.According to the DMA controller that accesses three-dimensional or multi-dimensional data according to an embodiment of the present invention, high performance can be provided by eliminating inefficiencies that occur when sequentially accessing multi-dimensional data.

도 1은 본 발명의 실시 예에 따른 컴퓨터 시스템을 보여주는 블록도이다.
도 2는 도 1의 3차원 데이터를 예시적으로 보여주는 도면이다.
도 3은 3차원 데이터의 메모리에서의 저장 구조를 예시적으로 보여주는 도면이다.
도 4는 본 발명의 실시 예에 따른 3차원 DMAC(직접 메모리 접근 제어기)의 구조를 예시적으로 보여주는 블록도이다.
도 5는 본 발명의 디스크립터의 구조를 보여주는 도면이다.
도 6은 본 발명의 마이크로코드(uCode) 디스크립터의 구조를 보여주는 도면이다.
도 7은 본 발명의 노멀 디스크립터(Normal Descrtipor)의 구조를 보여주는 도면이다.
도 8a 내지 도 8e는 블롭 디스크립터의 구조를 보여주는 도면들이다.
도 9는 도 4의 마이크로코드(uCode) 컨트롤러를 예시적으로 보여주는 블록도이다.
도 10은 본 발명의 마이크로코드 컨트롤러의 ISA(Instruction Set Architecture)를 예시적으로 보여주는 도면이다.
도 11은 본 발명의 실시 예에 따른 어드레스 생성 방법을 간략히 보여주는 도면이다.
1 is a block diagram showing a computer system according to an embodiment of the present invention.
FIG. 2 is a diagram illustrating the 3D data of FIG. 1 by way of example.
Figure 3 is a diagram showing an exemplary storage structure in a memory of 3D data.
Figure 4 is a block diagram illustrating the structure of a 3D direct memory access controller (DMAC) according to an embodiment of the present invention.
Figure 5 is a diagram showing the structure of the descriptor of the present invention.
Figure 6 is a diagram showing the structure of a microcode (uCode) descriptor of the present invention.
Figure 7 is a diagram showing the structure of a normal descriptor of the present invention.
Figures 8A to 8E are diagrams showing the structure of a blob descriptor.
FIG. 9 is a block diagram exemplarily showing the microcode (uCode) controller of FIG. 4.
Figure 10 is a diagram illustrating the ISA (Instruction Set Architecture) of the microcode controller of the present invention.
Figure 11 is a diagram briefly showing an address generation method according to an embodiment of the present invention.

아래에서는, 본 발명의 기술 분야에서 통상의 지식을 가진 자가 본 발명을 용이하게 실시할 수 있을 정도로, 본 발명의 실시 예들이 명확하고 상세하게 기재된다.Below, embodiments of the present invention are described clearly and in detail so that those skilled in the art can easily practice the present invention.

도 1은 본 발명의 실시 예에 따른 컴퓨터 시스템을 보여주는 블록도이다. 도 1을 참조하면, 컴퓨터 시스템(100)은 CPU(110), 3차원 데이터(135)에 효과적으로 접근할 수 있는 3차원 DMA 컨트롤러(120), 메모리(130), 그리고 시스템 버스(140)를 포함할 수 있다. 1 is a block diagram showing a computer system according to an embodiment of the present invention. Referring to FIG. 1, the computer system 100 includes a CPU 110, a 3D DMA controller 120 capable of effectively accessing 3D data 135, a memory 130, and a system bus 140. can do.

CPU(110)는 컴퓨터 시스템(100)에서 수행될 다양한 소프트웨어(응용 프로그램, 운영 체제, 장치 드라이버들)를 실행한다. CPU(110)는 메모리(130)에 로드되는 운영 체제(OS)를 실행할 것이다. CPU(110)는 운영 체제(OS) 기반에서 구동될 다양한 응용 프로그램들(Application Program)을 실행할 것이다. CPU 110 executes various software (application programs, operating systems, device drivers) to be executed in computer system 100. CPU 110 will run an operating system (OS) loaded into memory 130. The CPU 110 will execute various application programs to be run based on an operating system (OS).

CPU(110)는 동종 멀티-코어 프로세서(Homogeneous Multi-Core Processor) 또는 이종 멀티-코어 프로세서(Heterogeneous Multi-Core Processor)로 제공될 수 있다. CPU(110)는 메모리(130)에 저장된 3차원 데이터(135)에 대한 접근을 제어할 수 있다. 특히, 3차원 데이터(135)를 메모리(130)로부터 다른 외부 장치나 시스템-온-칩(SoC) 등으로 전송하는 경우, CPU(110)는 직접 메모리 접근(DMA) 방식으로 데이터 전송이 발생하도록 3차원 DMA 컨트롤러(120)를 제어할 수 있다. The CPU 110 may be provided as a homogeneous multi-core processor or a heterogeneous multi-core processor. The CPU 110 may control access to the 3D data 135 stored in the memory 130. In particular, when transferring 3D data 135 from the memory 130 to another external device or system-on-chip (SoC), the CPU 110 allows data transfer to occur using direct memory access (DMA). The 3D DMA controller 120 can be controlled.

3차원 DMA 컨트롤러(120)는 메모리(130)와 타깃 디바이스(140) 사이의 데이터 전송을 직접 메모리 접근(DMA) 방식으로 처리할 수 있다. 즉, 3차원 DMA 컨트롤러(120)는 CPU(110)의 위임에 따라 메모리(130)를 액세스 또는 제어할 수 있다.The 3D DMA controller 120 can process data transfer between the memory 130 and the target device 140 using direct memory access (DMA). That is, the 3D DMA controller 120 can access or control the memory 130 according to the delegation of the CPU 110.

예를 들어, 3차원 DMA 컨트롤러(120)는 타깃 디바이스(140)로부터 읽혀진 데이터를 CPU(110)의 명령에 따라 메모리(130)에 기입할 수 있다. 이때, 3차원 DMA 컨트롤러(120)는 최초에는 CPU(110)로부터 전송 명령을 수신하지만, 이후 3차원 DMA 컨트롤러(120)는 CPU(110)의 개입없이도 연속적으로 데이터를 메모리(130)에 기입할 수 있다. 또는, 3차원 DMA 컨트롤러(120)는 직접 메모리 접근(DMA) 방식에 따라 메모리(130)로부터 3차원 데이터(135)를 읽고, 읽혀진 데이터를 타깃 디바이스(140)에 전송할 수 있다. For example, the 3D DMA controller 120 may write data read from the target device 140 to the memory 130 according to a command from the CPU 110. At this time, the 3D DMA controller 120 initially receives a transfer command from the CPU 110, but thereafter the 3D DMA controller 120 continuously writes data to the memory 130 without the intervention of the CPU 110. You can. Alternatively, the 3D DMA controller 120 may read the 3D data 135 from the memory 130 according to a direct memory access (DMA) method and transmit the read data to the target device 140.

메모리(130)는 컴퓨터 시스템(100)을 동작시키는 데에 이용되는 데이터를 저장할 수 있다. 메모리(130)는 CPU(110)의 요청에 따라 데이터를 저장하거나 출력한다. 특히, 메모리(130)는 3차원 데이터(135)를 저장할 수 있다. 3차원 데이터(135)는 인공지능(AI) 기술의 발전과 확산에 따라 최근 컴퓨터 시스템(100)에서는 3차원 배열의 데이터를 다루어야 하는 경우가 많아지고 있다. 메모리(130)는 SRAM(Static Random Access Memory), DRAM(Dynamic RAM), SDRAM(Synchronous DRAM), PRAM(Phase-change RAM), FRAM(Ferro-electric RAM), MRAM(Magneto-resistive RAM), ReRAM(Resistive RAM) 등과 같은 휘발성/불휘발성 메모리 장치를 포함할 수 있다.Memory 130 may store data used to operate computer system 100. The memory 130 stores or outputs data according to the request of the CPU 110. In particular, the memory 130 can store three-dimensional data 135. As for 3D data 135, with the development and spread of artificial intelligence (AI) technology, the computer system 100 is increasingly required to handle 3D arrays of data. The memory 130 includes Static Random Access Memory (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Phase-change RAM (PRAM), Ferro-electric RAM (FRAM), Magneto-resistive RAM (MRAM), and ReRAM. It may include volatile/non-volatile memory devices such as (Resistive RAM).

타깃 디바이스(140)는 메모리(130)와 별도의 메모리 장치나 스토리지 또는 IP(Intellectual Property)일 수 있다. 또는, 타깃 디바이스(140)는 시스템-온-칩(SoC)이나 컴퓨터 시스템(100)의 외부에 구비되는 하드웨어 장치일 수 있다. 타깃 디바이스(140)와 메모리(130) 사이의 데이터 전송을 위해, CPU(110)는 3차원 DMA 컨트롤러(120)에 제어 동작을 위임할 수 있다. 이 경우, CPU(110)는 3차원 DMA 컨트롤러(120)의 레지스터에 DMA 디스크립터를 기입하게 될 것이다. 그러면, 이후에는 전송 요청된 데이터는 CPU(110)의 개입없이 타깃 디바이스(140)와 메모리(130) 사이에서 3차원 DMA 컨트롤러(120)의 제어하에 전송될 수 있다. The target device 140 may be a memory device, storage, or IP (Intellectual Property) separate from the memory 130. Alternatively, the target device 140 may be a system-on-chip (SoC) or a hardware device provided external to the computer system 100. For data transfer between the target device 140 and the memory 130, the CPU 110 may delegate control operations to the 3D DMA controller 120. In this case, the CPU 110 will write the DMA descriptor to the register of the 3D DMA controller 120. Then, the data requested to be transmitted can be transmitted between the target device 140 and the memory 130 under the control of the 3D DMA controller 120 without intervention of the CPU 110.

이상에서 설명된 컴퓨터 시스템(100)은 3차원 데이터(135)에 대한 직접 메모리 접근(DMA)이 가능하다. 이를 위해, 컴퓨터 시스템(100)은 3차원 데이터(135)를 DMA 방식으로 처리할 수 있는 3차원 DMA 컨트롤러(120)를 포함한다. 여기서, 예시적으로 3차원 데이터(135)에 대해서 기재하고 있으나, 본 발명은 여기의 개시에 국한되지 않는다. 즉, 본 발명은 3차원보다 높은 다차원 데이터에도 적용될 수 있다.The computer system 100 described above is capable of direct memory access (DMA) to 3D data 135. To this end, the computer system 100 includes a 3D DMA controller 120 capable of processing 3D data 135 using a DMA method. Here, the 3D data 135 is described as an example, but the present invention is not limited to the disclosure here. In other words, the present invention can be applied to multidimensional data higher than three dimensions.

도 2는 도 1의 3차원 데이터를 예시적으로 보여주는 도면이다. 도 2를 참조하면, 3차원 데이터(135)는 메모리(130)에 저장될 때 배열이나 차원이 다차원으로 생성되는 데이터이다. FIG. 2 is a diagram illustrating the 3D data of FIG. 1 by way of example. Referring to FIG. 2, 3D data 135 is data that is generated in a multi-dimensional array or dimension when stored in the memory 130.

인공지능(AI) 기술의 적용에 따라 처리 효율의 향상을 위해 데이터는 다차원으로 배열되고 전송되어야 하는 경우가 증가하고 있다. 예를 들면, 다층 신경 회로망(MLP; Multi-layer Perceptron) 및 신경망(Neural Network) 회로의 개념이 도입되면서, 메모리(130)에 저장되는 데이터는 3차원 데이터(135) 형태로 저장될 것이 요구되고 있다. With the application of artificial intelligence (AI) technology, there are increasing cases where data must be arranged and transmitted in multiple dimensions to improve processing efficiency. For example, as the concepts of multi-layer perceptron (MLP) and neural network circuits are introduced, data stored in the memory 130 is required to be stored in the form of three-dimensional data 135. there is.

3차원 데이터(135, 또는 3D-BLOB)는, 예를 들면, 컴퓨터 시스템(100) 및 프로그래밍 언어 등에 따라 로우 매이저(Row-Major) 또는 칼럼 매이저(Column-Major) 방식으로 메모리(130)에 저장될 수 있다. 로우 매이저(Row-Major) 방식은 데이터를 행(y) 방향으로 먼저 메모리(130)에 저장한 후에, 열(x) 방향으로 메모리(130)에 저장하고, 이후 깊이(n) 방향으로 데이터를 저장하는 데이터 관리 방식을 말한다. 칼럼 매이저(Column-Major) 방식은 데이터를 메모리의 열(x) 방향으로 저장하고, 이어서 행(y) 방향으로, 이후에 깊이(n) 방향으로 저장하는 방식을 말한다. 또한, 3차원 데이터(135)의 사이즈와 규격이 달라짐에 따라 실제 물리적인 메모리(130)에 저장되는 위치는 모두 변경될 수 있다.Three-dimensional data (135, or 3D-BLOB) is, for example, stored in the memory 130 in a Row-Major or Column-Major manner depending on the computer system 100 and programming language. It can be saved in . In the Row-Major method, data is first stored in the memory 130 in the row (y) direction, then stored in the memory 130 in the column (x) direction, and then data is stored in the depth (n) direction. It refers to a data management method that stores . The Column-Major method refers to a method of storing data in the column (x) direction of memory, then in the row (y) direction, and then in the depth (n) direction. Additionally, as the size and specifications of the 3D data 135 change, the actual storage location in the physical memory 130 may change.

도 3은 3차원 데이터의 메모리에서의 저장 구조를 예시적으로 보여주는 도면이다. 도 2 및 도 3을 참조하면, 로우 매이저(Row-Major) 방식의 1차원적 접근시에 매크로 블롭(136)은 메모리(130, 도 1 참조)에 3차원 배열로 저장되기 위해서는 수많은 디스크립터(Descriptor)가 작성되어야 한다. Figure 3 is a diagram showing an exemplary storage structure in a memory of 3D data. Referring to FIGS. 2 and 3, in the one-dimensional access of the Row-Major method, the macro blob 136 requires numerous descriptors to be stored in a three-dimensional array in the memory 130 (see FIG. 1). Descriptor) must be written.

매크로 블롭(136, 도 2 참조)으로 도시된 3차원 데이터의 일부를 메모리(130)에 기입하기 위해서는, 메모리(130)에서 주소의 배열은 도시된 방식으로 제공될 수 있다. 먼저, 3차원으로 배열되는 매크로 블롭(136)은 서로 다른 열에 할당되는 서브 데이터들(136a, 136b, 136c)로 구성된다. 메모리(130) 상에서 1차원적으로 접근하는 경우, 서브 데이터(136a)는 첫 번째 열 내에서도 불연속적으로 배열된다. 서브 데이터(136a)와 다른 두 번째 열에 배열되는 서브 데이터(136b)도 불연속적으로 배열된다. 서브 데이터(136c)도 서브 데이터들(136a, 136b)과 마찬가지의 불연속 배열을 갖는다. 따라서 일반적인 DMA 제어 기술을 적용하는 경우, 3차원 데이터(135) 내에서 매크로 블롭(136)에 대응하는 데이터를 읽거나 쓰기 위해서는 불연속 배열에 의해서 많은 수의 디스크립터(Descriptor)가 요구된다.In order to write part of the three-dimensional data shown as a macro blob 136 (see FIG. 2) to the memory 130, an array of addresses in the memory 130 may be provided in the manner shown. First, the macro blob 136 arranged in three dimensions is composed of sub data 136a, 136b, and 136c assigned to different columns. In the case of one-dimensional access on the memory 130, the sub data 136a is arranged discontinuously even within the first column. The sub data 136b arranged in a second column different from the sub data 136a is also discontinuously arranged. The sub data 136c also has a discontinuous arrangement similar to the sub data 136a and 136b. Therefore, when applying a general DMA control technology, a large number of descriptors are required in a discontinuous arrangement to read or write data corresponding to the macro blob 136 within the three-dimensional data 135.

즉, 기존의 DMAC 디스크럽터(DMAC Descriptor)는 1차원적으로 배열된 데이터에 대한 접근을 다루고 있다. 따라서, 매크로 블롭(136)에 해당하는 3차원 데이터에 접근하기 위해서는 불연속적으로 표시된 부분에 접근하기 위한 많은 수의 1차원 DMAC 디스크립터를 생성하고 실행해야만 한다. In other words, the existing DMAC Descriptor deals with access to one-dimensionally arranged data. Therefore, in order to access three-dimensional data corresponding to the macro blob 136, a large number of one-dimensional DMAC descriptors must be created and executed to access the discontinuously displayed parts.

또한, 매번 1차원 DMAC 디스크립터를 3차원 규격에 따른 매크로 블롭의 어드레스를 항상 계산하여야 한다. 따라서, CPU 및 소프트웨어가 매번 개입해야 하므로 전체 시스템의 성능이 현저히 저하되고, 소프트웨어 개발시 프로그래밍 모델도 매우 복잡하고 번잡할 수 있다. 3차원 데이터 구조에서 매크로 블롭들을 순차적으로 x-방향, y-방향 또는 n-방향으로 순차적으로 접근해야 하는 상황이라면 비효율성은 크게 증가하게 된다.In addition, the address of the macro blob must always be calculated from the 1-dimensional DMAC descriptor according to the 3-dimensional standard. Therefore, since the CPU and software must intervene every time, the performance of the overall system is significantly reduced, and the programming model during software development can also be very complex and cumbersome. In a situation where macro blobs must be accessed sequentially in the x-direction, y-direction, or n-direction in a 3D data structure, inefficiency increases significantly.

본 발명에서는 이러한 비효율성을 제거하기 위해 3차원 데이터(135) 및 매크로 블롭(136)을 DMA 컨트롤러(DMAC)가 직접 처리할 수 있는 DMAC 디스크립터의 형식을 제안하고 이를 이용한 다양한 DMAC의 3D 데이터 접근 방식이 제공된다. 이를 통하여 3차원 데이터(135)를 접근하거나 3차원 데이터(135) 내부의 매크로 블롭(136)을 순차적으로 접근하는 등의 동작에 있어 성능을 크게 향상시킬 수 있고, 매우 직관적이고 간결한 DMA 프로그래밍 모델을 제공할 수 있다. In order to eliminate this inefficiency, the present invention proposes a DMAC descriptor format that allows a DMA controller (DMAC) to directly process 3D data 135 and macro blobs 136, and various 3D data access methods of DMAC using this. This is provided. Through this, performance can be greatly improved in operations such as accessing the 3D data 135 or sequentially accessing the macro blob 136 within the 3D data 135, and a very intuitive and concise DMA programming model is provided. can be provided.

도 4는 본 발명의 실시 예에 따른 3차원 DMAC(직접 메모리 접근 컨트롤러)의 구조를 예시적으로 보여주는 블록도이다. 도 4를 참조하면, 3차원 DMAC(120)는 채널 아비터(121), 채널(122), 채널 레지스터(123), 공유 레지스터(124), 디스크립터(125), 마이크로코드(이하, uCode) 컨트롤러(126), 그리고 전송 컨트롤러(127)를 포함할 수 있다. 더불어, 3차원 DMAC(120)는 데이터 버스 인터페이스, 컨트롤 인터페이스, 그리고 인터럽트 요청(IRQ) 인터페이스와 같은 외부 인터페이스에 연결된다. Figure 4 is a block diagram illustrating the structure of a 3D direct memory access controller (DMAC) according to an embodiment of the present invention. Referring to FIG. 4, the three-dimensional DMAC 120 includes a channel arbiter 121, a channel 122, a channel register 123, a shared register 124, a descriptor 125, and a microcode (hereinafter, uCode) controller ( 126), and may include a transmission controller 127. Additionally, the 3D DMAC 120 is connected to external interfaces such as a data bus interface, a control interface, and an interrupt request (IRQ) interface.

채널 아비터(121)는 읽기 또는 쓰기 데이터가 전송될 채널을 선택한다. 채널 아비터(121)는 데이터의 전송이 요청된 채널의 효율을 높이기 위해 채널들의 시퀀스를 스케줄링하거나 사용의 허가 여부를 제어할 수 있다. The channel arbiter 121 selects a channel through which read or write data will be transmitted. The channel arbiter 121 may schedule a sequence of channels or control whether or not to permit use of the channels to increase the efficiency of the channel for which data transmission is requested.

채널들(122) 및 채널 레지스터들(123)은 컨트롤 인터페이스를 통해서 설정되며, 메모리(130) 또는 타깃 디바이스(140)와의 데이터 전송을 담당한다. 공유 레지스터(124)는 채널들 각각이 공유되는 속성을 설정하기 위한 수단으로 제공될 수 있다. Channels 122 and channel registers 123 are set through a control interface and are responsible for data transmission with the memory 130 or target device 140. The shared register 124 may be provided as a means for setting shared attributes of each channel.

디스크립터(125)는 본 발명의 3차원 데이터를 처리할 수 있는 디스크립터들을 저장하고 처리한다. 디스크립터(125)는, 예를 들면, uCode 디스크립터, 노멀(Normal) 디스크립터, 그리고 3D 블롭 디스크립터(3D-Blob descriptor)를 포함할 수 있다.The descriptor 125 stores and processes descriptors capable of processing 3D data of the present invention. The descriptor 125 may include, for example, a uCode descriptor, a normal descriptor, and a 3D-Blob descriptor.

uCode 컨트롤러(126)는 3D 블롭 디스크립터(3D-Blob descriptor)를 활용하여 마이크로 프로세서와 같은 프로그램 처리를 수행한다. The uCode controller 126 performs program processing like a microprocessor using a 3D-Blob descriptor.

전송 컨트롤러(127)는 3D 블롭 디스크립터(3D-Blob descriptor)를 이용하여 데이터를 다양한 형태로, 순차적으로, 그리고 자동적으로 전송하도록 데이터 전송을 제어한다. 데이터의 전송 상태나 결과는 IRQ 인터페이스를 통해서 CPU(110, 도 1 참조) 등에 알릴 수 있다.The transmission controller 127 controls data transmission to transmit data sequentially and automatically in various forms using a 3D-Blob descriptor. The data transmission status or result can be notified to the CPU (110, see FIG. 1), etc. through the IRQ interface.

도 5는 본 발명의 디스크립터의 포맷을 보여주는 도면이다. 도 5를 참조하면, 본 발명의 디스크립터(125)는 4개의 커맨드 레지스터(cmd0, cmd1, cmd2, cmd3)를 포함한다. Figure 5 is a diagram showing the format of the descriptor of the present invention. Referring to Figure 5, the descriptor 125 of the present invention includes four command registers (cmd0, cmd1, cmd2, and cmd3).

커맨드 레지스터들(Command Register) 각각의 비트 폭(Bit width)은 DMAC(120)가 적용되는 컴퓨터 시스템(100)의 어드레스 폭(Address width)에 따라 달라지게 된다. 예컨대, 커맨드 레지스터들(Command Register) 각각의 비트 폭(Bit width)은 32-bit 또는 64-bit일 수 있다. 후술하는 설명에서는 32-bit의 비트 폭을 갖는 경우를 예로 들어 설명하기로 한다. The bit width of each command register varies depending on the address width of the computer system 100 to which the DMAC 120 is applied. For example, the bit width of each command register may be 32-bit or 64-bit. In the following description, the case with a bit width of 32-bit will be used as an example.

커맨드 레지스터(cmd2)의 경우, 한 개 비트(예를 들면, [31])는 해당 디스크립터가 데이터 이동을 위한 디스크립터인지 또는 uCode 컨트롤러(126)를 위한 다수의 명령어(Instruction)들이 포함(Packing)된 마이크로코드(uCode)인지를 표시하도록 설정될 수 있다. 예를 들면, 해당 디스크립터가 데이터 이동을 위해 제공되는 디스크립터인 경우, 커맨드 레지스터(cmd2)의 [31] 번째 비트(cmd2[31])는 논리 '0'으로 제공될 수 있다. 반면에, 디스크립터가 마이크로코드(uCode)인 경우, 커맨드 레지스터(cmd2)의 [31] 번째 비트(cmd2[31])는 논리 '1'으로 설정될 수 있다.In the case of the command register (cmd2), one bit (e.g., [31]) indicates whether the corresponding descriptor is a descriptor for data movement or contains (packing) a number of instructions for the uCode controller 126. It can be set to indicate whether it is a microcode (uCode). For example, if the corresponding descriptor is a descriptor provided for data movement, the [31]th bit (cmd2[31]) of the command register (cmd2) may be provided as logic '0'. On the other hand, if the descriptor is a microcode (uCode), the [31]th bit (cmd2[31]) of the command register (cmd2) may be set to logic '1'.

커맨드 레지스터(cmd2)의 [31] 번째 비트(cmd2[31])가 논리 '0'인 경우, 미리 약속된 추가적인 레지스터 비트들(예를 들면, cmd2[30:28])의 설정에 따라 해당 디스크립터가 1차원적인 데이터 이동을 나타내는 노멀 디스크립터(Normal Descriptor)인지 또는 3차원 데이터(3D Blob)의 이동을 설정하기 위한 디스크립터인지 설정할 수 있다. If the [31st] bit (cmd2[31]) of the command register (cmd2) is logic '0', the corresponding descriptor is You can set whether it is a normal descriptor indicating one-dimensional data movement or a descriptor for setting the movement of three-dimensional data (3D Blob).

예를 들면, 해당 디스크립터가 1차원적인 데이터 이동을 위한 노멀 디스크립터(Normal Descriptor)인 경우, 레지스터 비트들(cmd2[30:28])이 '0'으로 나타낼 수 있다. 반면에 해당 디스크립터가 3차원 데이터 이동을 설정하기 위한 3차원 블롭(3D Blob) 디스크립터인 경우, 레지스터 비트들(cmd2[30:28])은 여러 개의 디스크립터들(cmd[30:28]=1,2,3,4,7)들 중의 하나를 나타내게 된다. For example, if the corresponding descriptor is a normal descriptor for one-dimensional data movement, register bits (cmd2[30:28]) may be indicated as '0'. On the other hand, if the corresponding descriptor is a 3D Blob descriptor for setting 3D data movement, the register bits (cmd2[30:28]) are used in multiple descriptors (cmd[30:28]=1, It represents one of 2,3,4,7).

따라서, 커맨드 레지스터(cmd2)의 비트들(cmd2[30:28])에 따라 해당 디스크립터 특정한 정보를 포함할 수 있다. 커맨드 레지스터(cmd2)의 비트들(cmd2[30:28])에 포함된 정보는 다음의 표 1과 같이 나타낼 수 있다. 여기서, 레지스터 비트(cmd2[31])는 'DTY(Data Type)'을, 레지스터 비트들(cmd2[30:28])은 'PTY(Payload Type)'을 의미한다. Accordingly, the corresponding descriptor may contain specific information according to the bits (cmd2[30:28]) of the command register (cmd2). Information included in the bits (cmd2[30:28]) of the command register (cmd2) can be represented as in Table 1 below. Here, the register bits (cmd2[31]) mean 'DTY (Data Type)', and the register bits (cmd2[30:28]) mean 'PTY (Payload Type)'.

cmd2[31]cmd2[31] cmd2[30:28]cmd2[30:28] Descriptor 종류Descriptor type 1One X(ignored)X(ignored) uCode descriptoruCode descriptor 00 00 Normal descriptorNormal descriptor 00 1One (Blob) Vitual blob dimension descriptor(Blob)Vitual blob dimension descriptor 00 22 (Blob) Start index of macro blob for iteration(Blob) Start index of macro blob for iteration 00 33 (Blob) macro blob dimension(Blob) macro blob dimension 00 44 (Blob) Iteration counter(1 iteration= 1 macro blob)(Blob) Iteration counter (1 iteration= 1 macro blob) 00 Reserved(예비)Reserved Reserved(예비)Reserved 00 77 (Blob)Blob data transfer descriptor(Blob)Blob data transfer descriptor

모든 종류의 디스크립터에서 커맨드 레지스터(cmd3)는 모두 동일한 구성으로 설정될 수 있다. 즉, 커맨드 레지스터(cmd3)는 현재 디스크립터(Descriptor)에 이어서 로딩해야 하는 디스크립터(Descriptor)의 주소값(Next Descriptor Address)필드를 포함할 수 있다. 그리고 커맨드 레지스터(cmd3)는 종래의 DMAC 기술과 유사한 동작을 수행하는 'isLst', 'enIRQ' 필드를 포함할 수 있다.The command register (cmd3) in all types of descriptors can all be set to the same configuration. That is, the command register (cmd3) may include a Next Descriptor Address field of the descriptor that must be loaded following the current descriptor. And the command register (cmd3) may include 'isLst' and 'enIRQ' fields that perform operations similar to conventional DMAC technology.

도 6은 본 발명의 마이크로코드(uCode) 디스크립터의 구조를 보여주는 도면이다. 도 6을 참조하면, uCode 디스크립터(125a)는 4개의 커맨드 레지스터(cmd0, cmd1, cmd2, cmd3)를 포함할 수 있다. Figure 6 is a diagram showing the structure of a microcode (uCode) descriptor of the present invention. Referring to FIG. 6, the uCode descriptor 125a may include four command registers (cmd0, cmd1, cmd2, and cmd3).

3개의 커맨드 레지스터(cmd0, cmd1, cmd2)에는 uCode 컨트롤러(126, 도 4 참조)에서 수행될 명령어(instr.0, instr.1, instr.2)이 포함될 수 있다. 커맨드 레지스터(cmd2)의 레지스터 비트(cmd2[31])는 'DTY(Data Type)'을 지시하는 필드로 사용될 수 있다. 커맨드 레지스터(cmd3)의 레지스터 비트(cmd3[31:4])는 후속하는 디스크립터의 어드레스가 저장될 것이다.The three command registers (cmd0, cmd1, cmd2) may include instructions (instr.0, instr.1, instr.2) to be executed in the uCode controller (126, see FIG. 4). The register bit (cmd2[31]) of the command register (cmd2) can be used as a field indicating 'DTY (Data Type)'. The register bits (cmd3[31:4]) of the command register (cmd3) will store the address of the subsequent descriptor.

uCode 컨트롤러(126)는 32개의 범용 레지스터(General Purpose Register: GPR)를 포함하고 있으며, 명령어(Instruction)에 의해 프로그램을 수행하여 자체적으로 디스크립터를 생성할 수 있다. 그리고 uCode 컨트롤러(126)는 생성된 디스크립터를 3차원 DMAC(120) 내부 로직에 전달할 수 있다. 따라서, uCode 컨트롤러(126)에 의해서 데이터 이동을 시스템 내부의 상태에 따라 소프트웨어적, 가변적으로, 그리고 동적으로 변경할 수 있게 해준다.The uCode controller 126 includes 32 general purpose registers (GPR) and can generate a descriptor on its own by executing a program using instructions. And the uCode controller 126 can transmit the generated descriptor to the internal logic of the 3D DMAC (120). Therefore, the uCode controller 126 allows data movement to be changed variably and dynamically in software depending on the internal state of the system.

도 7은 1차원 데이터의 전송을 정의하는 노멀 디스크립터(Normal Descrtipor)의 구조를 보여주는 도면이다. 도 7을 참조하면, 노멀 디스크립터(125b)는 4개의 커맨드 레지스터(cmd0, cmd1, cmd2, cmd3)를 포함할 수 있다. Figure 7 is a diagram showing the structure of a normal descriptor that defines the transmission of one-dimensional data. Referring to FIG. 7, the normal descriptor 125b may include four command registers (cmd0, cmd1, cmd2, and cmd3).

커맨드 레지스터(cmd0)에는 소스 어드레스(Source address)가 설정될 수 있다. 커맨드 레지스터(cmd1)에는 목적지 어드레스(Destination address)가 저장된다. 그리고 커맨드 레지스터(cmd2)의 레지스터 비트(cmd2[23:0])는 전송 바이트 수(n Byte) 필드를 포함될 수 있다. A source address may be set in the command register (cmd0). The destination address is stored in the command register (cmd1). And the register bits (cmd2[23:0]) of the command register (cmd2) may include a field for the number of bytes to be transmitted (n Byte).

또한, 커맨드 레지스터(cmd2)의 레지스터 비트(cmd2[27])에는 CW(Constant Write) 필드가 저장될 수 있다. 즉, 레지스터 비트(cmd2[27])의 비트값이 논리 '1'로 설정된 경우, 커맨드 레지스터(cmd0)에 저장된 데이터는 소스 어드레스(Source address)가 아닌 상수 데이터(Constant data)임을 의미한다. 이 경우, 3차원 DMAC(120)는 목적지 어드레스(Destination address)에서 시작하여 n 바이트(Bytes) 만큼의 메모리를 상수 데이터(Constant Data)로 쓰기를 수행하며, 읽기 동작은 수행하지 않는 특징이 있다.Additionally, a CW (Constant Write) field may be stored in the register bit (cmd2[27]) of the command register (cmd2). That is, when the bit value of the register bit (cmd2[27]) is set to logic '1', this means that the data stored in the command register (cmd0) is constant data, not a source address. In this case, the 3D DMAC 120 has the characteristic of writing n bytes of memory as constant data starting from the destination address and not performing a read operation.

커맨드 레지스터(cmd3)의 레지스터 비트(cmd3[31:4])는 후속 디스크립터의 어드레스가 저장되고, 레지스터 비트(cmd3[3:2])에는 'rdaFixed' 및 'wraFixed' 필드가 저장된다. 또한, 레지스터 비트(cmd3[3:2])에는 'isLst', 'enIRQ' 필드가 설정될 수 있다.The address of the subsequent descriptor is stored in the register bit (cmd3[31:4]) of the command register (cmd3), and the 'rdaFixed' and 'wraFixed' fields are stored in the register bit (cmd3[3:2]). Additionally, the 'isLst' and 'enIRQ' fields may be set in the register bits (cmd3[3:2]).

도 8a 내지 도 8e는 3차원 블롭 디스크립터의 구조를 보여주는 도면들이다. 본 발명의 3차원 블롭 디스크립터(125c)는 4개의 커맨드 레지스터(cmd0, cmd1, cmd2, cmd3)를 포함하며, 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28]=1,2,3,4,7)의 값에 따라 그 속성이 다양하게 설정 가능하다. 표 1에서 설명된 바와 같이, 레지스터 비트(cmd2[31])는 블롭 디스크립터의 데이터 타입(DTY[31])을 의미하고, 레지스터 비트들(cmd2[30:28])은 블롭 디스크립터의 페이로드 타입(PTY[30:28])을 지시한다.Figures 8A to 8E are diagrams showing the structure of a 3D blob descriptor. The three-dimensional blob descriptor 125c of the present invention includes four command registers (cmd0, cmd1, cmd2, cmd3), and the register bits of the command register (cmd2) (cmd2[30:28]=1,2,3 Depending on the values of ,4,7), the properties can be set in various ways. As described in Table 1, the register bits (cmd2[31]) mean the data type (DTY[31]) of the blob descriptor, and the register bits (cmd2[30:28]) mean the payload type of the blob descriptor. (PTY[30:28]).

도 8a는 가상 데이터의 차원을 정의하는 블롭 디스크립터를 보여주는 도면이다. 도 8a를 참조하면, 3차원 블롭 디스크립터(125c)는 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28])의 값이 '1'로 설정된다. 이 경우, 3차원 블롭 디스크립터(125c)는 데이터의 차원(Dimension)을 정의하는 의미를 갖는다. 여기서, 커맨드 레지스터들(cmd0, cmd1, cmd2) 각각은 메모리(130) 상에 저장된 3차원 데이터(3D Blob)의 규격에 해당하는 X(width), Y(height), N(depth) 각각의 규격을 설정하게 된다. 이후, 3차원 DMA 컨트롤러(120)는 3차원 데이터(3D Blob) 내부의 매크로 블롭(Macro blob)을 접근할 때 X, Y, N 값을 활용하여 하드웨어 내부적으로 어드레싱을 수행하게 된다. Figure 8a is a diagram showing a blob descriptor that defines the dimensions of virtual data. Referring to FIG. 8A, in the 3D blob descriptor 125c, the register bits (cmd2[30:28]) of the command register (cmd2) are set to '1'. In this case, the 3D blob descriptor 125c has the meaning of defining the dimension of data. Here, the command registers (cmd0, cmd1, cmd2) each have specifications for is set. Afterwards, the 3D DMA controller 120 performs addressing internally in hardware using the X, Y, and N values when accessing the macro blob within the 3D data (3D Blob).

도 8b는 매크로 블롭의 위치를 정의하는 블롭 디스크립터를 보여주는 도면이다. 도 8b를 참조하면, 3차원 블롭 디스크립터(125c)는 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28])의 값이 '2'로 설정된다. 이 경우, 3차원 블롭 디스크립터(125c)는 3차원 데이터(135, 도 2 참조) 내부의 매크로 블롭(136, Macro blob)의 시작 위치를 제공한다. Figure 8b is a diagram showing a blob descriptor that defines the location of a macro blob. Referring to FIG. 8B, in the 3D blob descriptor 125c, the register bits (cmd2[30:28]) of the command register (cmd2) are set to '2'. In this case, the 3D blob descriptor 125c provides the starting position of the macro blob 136 within the 3D data 135 (see FIG. 2).

매크로 블롭(Macro blob)의 시작 위치는 3차원 데이터(135)의 첫 번째 데이터로부터 매크로 블롭(136)의 첫 번째 데이터까지의 오프셋(Offset) 값으로 표시할 수 있다. 즉, 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28])의 값이 '2'로 설정된 3차원 블롭 디스크립터(125c)는 3차원 데이터(135) 내에서의 매크로 블롭(136)의 위치를 정의할 수 있다. 매크로 블롭(136)의 시작 위치는 커맨드 레지스터들(cmd0, cmd1, cmd2) 각각에서 'x_start', 'y_start', 그리고 'n_start'로 제공될 수 있다. The starting position of the macro blob can be expressed as an offset value from the first data of the 3D data 135 to the first data of the macro blob 136. That is, the 3D blob descriptor 125c, in which the register bits (cmd2[30:28]) of the command register (cmd2) are set to '2', is the macro blob 136 within the 3D data 135. The location can be defined. The starting position of the macro blob 136 may be provided as 'x_start', 'y_start', and 'n_start' in each of the command registers (cmd0, cmd1, and cmd2).

도 8c는 매크로 블롭의 사이즈를 정의하는 3차원 블롭 디스크립터를 보여주는 도면이다. 도 8c를 참조하면, 3차원 블롭 디스크립터(125c)는 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28])의 값이 '3'으로 설정된다. 이 경우, 3차원 블롭 디스크립터(125c)는 매크로 블롭(136, Macro blob)의 사이즈 값을 제공할 수 있다. Figure 8c is a diagram showing a 3D blob descriptor that defines the size of a macro blob. Referring to FIG. 8C, in the 3D blob descriptor 125c, the register bits (cmd2[30:28]) of the command register (cmd2) are set to '3'. In this case, the 3D blob descriptor 125c may provide the size value of the macro blob 136.

3차원 DMA 컨트롤러(120)가 전송하고자 하는 3차원 데이터(135) 전체 또는 일부에 해당하는 매크로 블롭(136)의 사이즈는 커맨드 레지스터들(cmd0, cmd1, cmd2)에 설정될 수 있다. 즉, 매크로 블롭(136)의 사이즈는 커맨드 레지스터들(cmd0, cmd1, cmd2) 각각에서 'x_size', 'y_size', 그리고 'n_size'로 제공될 수 있다. The size of the macro blob 136 corresponding to all or part of the 3D data 135 to be transmitted by the 3D DMA controller 120 may be set in the command registers cmd0, cmd1, and cmd2. That is, the size of the macro blob 136 can be provided as 'x_size', 'y_size', and 'n_size' in each of the command registers (cmd0, cmd1, and cmd2).

도 8d는 매크로 블롭의 반복 횟수를 정의하는 3차원 블롭 디스크립터를 보여주는 도면이다. 도 8d를 참조하면, 3차원 블롭 디스크립터(125c)는 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28])의 값이 '4'로 설정된다. 이 경우, 3차원 블롭 디스크립터(125c)는 이미 전송이 완료된 매크로 블롭(136)과 동일한 규격의 전송할 인접 매크로 블롭들의 수(반복 횟수)를 설정할 수 있다. Figure 8d is a diagram showing a 3D blob descriptor that defines the number of repetitions of a macro blob. Referring to FIG. 8D, in the 3D blob descriptor 125c, the register bits (cmd2[30:28]) of the command register (cmd2) are set to '4'. In this case, the 3D blob descriptor 125c can set the number (number of repetitions) of adjacent macro blobs to be transmitted of the same standard as the macro blob 136 for which transmission has already been completed.

3차원 DMA 컨트롤러(120)는 한 개의 매크로 블롭(136)의 전송이 완료되면, 그 후에 인접한 매크로 블롭들에 대해 동일한 규격으로 반복하여 전송할 수 있다. 인접한 매크로 블롭들이 반복되어 전송되는 반복 회수(Iteration count)는 커맨드 레지스터들(cmd0, cmd1, cmd2)에 설정될 수 있다. 즉, 매크로 블롭들이 반복되어 전송되는 반복 회수(Iteration count)는 커맨드 레지스터들(cmd0, cmd1, cmd2) 각각에서 'x_cnt', 'y_cnt', 그리고 'n_cnt'로 제공될 수 있다. Once the transmission of one macro blob 136 is completed, the 3D DMA controller 120 can repeatedly transmit adjacent macro blobs in the same standard. The repetition count at which adjacent macro blobs are repeatedly transmitted can be set in the command registers (cmd0, cmd1, and cmd2). That is, the repetition count at which macro blobs are repeatedly transmitted can be provided as 'x_cnt', 'y_cnt', and 'n_cnt' in each of the command registers (cmd0, cmd1, and cmd2).

커맨드 레지스터들(cmd0, cmd1, cmd2) 각각에 설정되는 'x_cnt', 'y_cnt', 그리고 'n_cnt'는 각각 x, y, n 방향으로 동일한 규격의 인접한 매크로 블롭을 몇 개까지 반복하여 목적지 어드레스로 전송할 지를 설정하게 된다. 이후 3차원 DMA 컨트롤러(120)는 설정된 값에 따라 하드웨어 자체적으로 각각의 매크로 블롭들을 순차적으로 전송하게 된다. 'x_cnt', 'y_cnt', and 'n_cnt' set in each of the command registers (cmd0, cmd1, cmd2) are used to repeat up to a certain number of adjacent macro blobs of the same size in the x, y, and n directions, respectively, to the destination address. You decide whether to transmit. Afterwards, the 3D DMA controller 120 sequentially transmits each macro blob by hardware itself according to the set value.

도 8e는 데이터 전송을 정의하는 3차원 블롭 디스크립터를 보여주는 도면이다. 도 8e를 참조하면, 3차원 블롭 디스크립터(125c)는 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28])의 값이 '7'로 설정된다. 이 경우, 이 3차원 블롭 디스크립터(125c)가 로딩된 후에는 실제 매크로 블롭의 목적지 어드레스로의 전송이 이루어진다. Figure 8e is a diagram showing a 3D blob descriptor defining data transmission. Referring to FIG. 8E, in the 3D blob descriptor 125c, the values of register bits (cmd2[30:28]) of the command register (cmd2) are set to '7'. In this case, after the 3D blob descriptor 125c is loaded, the actual macro blob is transmitted to the destination address.

즉, 커맨드 레지스터(cmd2)의 레지스터 비트들(cmd2[30:28]= 0, 1, 2, 3, 4)의 블롭 디스크립터들에 의해서 설정이 완료되고, 이어서 레지스터 비트들(cmd2[30:28]=7)의 3차원 블롭 디스크립터(125c)가 소스 어드레스, 목적지 어드레스 등을 설정하면 데이터 전송이 시작된다. 이때, 데이터의 전송은 3차원 블롭 디스크립터(125c)에 설정된 다양한 필드값들에 의해 다양하게 설정될 수 있으며, 이러한 필드의 내용은 아래 표 2로 표시될 수 있다. That is, the setting is completed by the blob descriptors of the register bits (cmd2[30:28] = 0, 1, 2, 3, 4) of the command register (cmd2), and then the register bits (cmd2[30:28] ]=7) When the 3D blob descriptor 125c sets the source address, destination address, etc., data transmission begins. At this time, data transmission can be set in various ways by various field values set in the 3D blob descriptor 125c, and the contents of these fields can be displayed in Table 2 below.

필드(Field)Field 설명explanation cmd2[27]
(CW)
cmd2[27]
(CW)
Constant Write 의미하며 set 될 경우 Normal Descriptor의 CW 필드와 동일하게 Read 동작을 수행하지 않고 cmd0를 constant 값으로 활용하여 Destination macro blob에 상수 값으로 write를 수행하여 constant 값 filling을 수행한다. It means Constant Write. When set, it does not perform a Read operation in the same way as the CW field of the Normal Descriptor, but uses cmd0 as a constant value to perform constant value filling by writing to the Destination macro blob as a constant value.
cmd2[10:8]
(DECR)
cmd2[10:8]
(DECR)
Decrement index for next macro blob : 한 개의 macro blob 전송을 마친 후 다음 인접한 macro blob을 선택할 때 x, y, n 방향 각각에 대해 증가의 인접 macro blob을 선택할 것인지 아니면 감소하는 방향의 인접 macro blob을 선택할 것인지 선택하도록 설정
[10] =‘1’ : x 방향, 증가 방향의 인접 macro blob을 전송 진행, ‘0’인 경우 감소 방향의 인접 macro blob을 전송 진행
[9] : y 방향에 대해 동일
[8] : n 방향에 대해 동일
Decrement index for next macro blob: When selecting the next adjacent macro blob after completing the transmission of one macro blob, whether to select the adjacent macro blob in the increasing direction or the adjacent macro blob in the decreasing direction for each of the x, y, and n directions. set to select
[10] ='1': In the x direction, the adjacent macro blob in the increasing direction is transmitted. If '0', the adjacent macro blob in the decreasing direction is transmitted.
[9]: Same for y direction
[8]: Same for n direction
cmd2[7:2]
(LDO)
cmd2[7:2]
(LDO)
Loop Direction Order를 의미하며 3D Blob에서 macro blob을 순차적으로 전송할 때 x, y, n 방향 중 어느 방향을 먼저 적용할지에 대한 설정
cmd2[3:2] : INNER (x, y, n 방향 중 가장 먼저 진행하는 방향을 설정)
0 : N-방향, 1:Y-방향, 2:X-방향
cmd2[5:4] : MIDDLE (x, y, n 방향 중 INNER 다음 진행 방향 설정)
cmd2[7:6] : OUTER (x, y, n 방향 중 마지막 진행 방향 설정)
예를 들어, INNER = 0 (N 방향) / MIDDLE=1(Y-방향) / OUTER=2(X-방향) 인 경우, 한 개의 macro blob들이 전송된 후 N 방향의 인접 macro blob이 DECR 필드를 참고하여 선택되어 전송되고 3D Blob의 규격의 N 방향으로 전송이 모두 완료된 경우에는 Y 방향으로 DEC 필드를 참고하여 인덱스를 이동하여 다음 macro blob을 전송한다. 이후에는 X 방향으로 이동하여 macro blob들을 전송한다.
Loop Direction Order refers to the setting of which direction among the x, y, and n directions is applied first when sequentially transmitting macro blobs in 3D Blob.
cmd2[3:2]: INNER (Sets the first direction among x, y, and n directions)
0: N-direction, 1:Y-direction, 2:X-direction
cmd2[5:4]: MIDDLE (Set the next INNER direction among x, y, and n directions)
cmd2[7:6]: OUTER (sets the last direction among x, y, and n directions)
For example, when INNER = 0 (N direction) / MIDDLE = 1 (Y-direction) / OUTER = 2 (X-direction), after one macro blob is transmitted, an adjacent macro blob in the N direction sends the DECR field. If it is selected and transmitted for reference and transmission in the N direction of the 3D Blob standard is completed, the index is moved in the Y direction by referring to the DEC field and the next macro blob is transmitted. Afterwards, it moves in the X direction and transmits macro blobs.
cmd2[1:0]
(BAM)
cmd2[1:0]
(BAM)
Blob Address Mode를 의미하며
[1] : Source Address Mode
[0] : Destination Address Mode
를 설정한다.
해당 bit가 ‘1’인 경우 address는 3D-Blob 내부의 macro blob을 위한 blob address가 생성된다.
해당 bit 가 ‘0’인 경우 address 는 1D memory로 가정한 address가 출력된다.
이러한 address 생성은 3D Blob을 1D vector로 변환하거나 1D vector로 저장된 영역을 3D Blob형태로 변환하기 주로 위해 활용된다.
It stands for Blob Address Mode.
[1]: Source Address Mode
[0]: Destination Address Mode
Set .
If the bit is '1', a blob address for the macro blob inside the 3D-Blob is created.
If the corresponding bit is '0', the address assumed to be a 1D memory is output.
This address creation is mainly used to convert a 3D blob into a 1D vector or an area stored as a 1D vector into a 3D blob.
cmd1[3]
(RDAfixed)
cmd1[3]
(RDAfixed)
Read Address Fixed를 의미하며 데이터를 읽어 올 때 고정된 address를 생성(set to ‘1’) 하도록 하거나, Blob Address Mode에 의해 생성된 변화하는 address가 생성(set to ‘0’)하도록 하기 위함이다.

이 방법은 데이터를 읽어오는 Source 측이 일반적인 memory가 아닌 FIFO 형식과 같은 단일 메모리 address 주소 값을 사용하는 경우를 위함이다.
It means Read Address Fixed, and is intended to create a fixed address (set to '1') when reading data, or to create a changing address (set to '0') created by Blob Address Mode.

This method is for cases where the source side that reads data uses a single memory address such as a FIFO format rather than a general memory.
cmd1[2]
(WRAfixed)
cmd1[2]
(WRAfixed)
Write Address Fixed를 의미하여 RDAfixed와 동일한 의미이며, 단, Write 측을 위한 address 생성을 위한 설정이다.Write Address Fixed means the same thing as RDAfixed, but it is a setting for creating an address for the Write side.
cmd1[1:0]
(isLast, enIRQ)
cmd1[1:0]
(isLast, enIRQ)
종래의 DMAC 기술의 isLast, enIRQ와 동일한 의미로 활용된다
종래의 기술과의 호환성을 보장하기 위함이다.
It is used in the same sense as isLast and enIRQ of conventional DMAC technology.
This is to ensure compatibility with conventional technology.

도 9는 도 4의 마이크로코드(uCode) 컨트롤러를 예시적으로 보여주는 블록도이다. 도 9를 참조하면, uCode 컨트롤러(126)는 32개의 레지스터들로 이루어진 범용 레지스터(216, General Purpose Register)를 포함한다. uCode 컨트롤러(126)는 후술하게 될 ISA(Instruction Set Architecture)를 포함한다. uCode 컨트롤러(126)는 31-비트의 명령어 코드(Instruction code)를 갖는 컨트롤러이다.FIG. 9 is a block diagram exemplarily showing the microcode (uCode) controller of FIG. 4. Referring to FIG. 9, the uCode controller 126 includes a general purpose register (216) consisting of 32 registers. The uCode controller 126 includes an Instruction Set Architecture (ISA), which will be described later. The uCode controller 126 is a controller with a 31-bit instruction code.

uCode 컨트롤러(126)는 명령어(Instruction)에 의해 프로그램을 수행하여 자체적으로 디스크립터(Descriptor)를 생성할 수 있다. 그리고 이렇게 생성된 디스크립터(Descriptor)를 3차원 DMA 컨트롤러(120)의 내부 로직으로 전달할 수 있다. 따라서, 3차원 DMA 컨트롤러(120)는 데이터 이동을 시스템 내부의 상태에 따라 소프트웨어적으로 가변적으로, 동적으로 변경할 수 있다.The uCode controller 126 can generate a descriptor on its own by executing a program based on an instruction. And the descriptor generated in this way can be transmitted to the internal logic of the 3D DMA controller 120. Accordingly, the 3D DMA controller 120 can variably and dynamically change data movement in software depending on the internal state of the system.

도 10은 본 발명의 uCode 컨트롤러의 ISA(Instruction Set Architecture)를 예시적으로 보여주는 도면이다. 도 9 및 도 10을 참조하면, 31-비트 폭을 가지는 명령어 셋(Instr.)은 아래의 설명과 같은 비트 필드(Bit field)를 포함하다.Figure 10 is a diagram illustrating the ISA (Instruction Set Architecture) of the uCode controller of the present invention. Referring to Figures 9 and 10, an instruction set (Instr.) with a 31-bit width includes a bit field as described below.

RS1, RS2, RD는 범용 레지스터(216, 도 9 참조) 중에서 ALU(미도시)의 입력으로 사용되는 소스 레지스터(Source register)와 연산의 결과값을 저장하기 위한 목적지 레지스터(Destination register)를 선택하기 위한 필드이다. 도 9에 도시된 바와 같이, 'RS1'에 의해서 멀티플렉서(221)의 소스 레지스터가 선택되고, 'RS2'에 의해서 멀티플렉서(223)의 소스 레지스터가 선택된다. 그리고 'RD'값에 따라 디멀티플렉서(227)에 의해 범용 레지스터(216, 도 9 참조) 중에서 목적지 레지스터(Destination register)가 선택될 것이다. RS1, RS2, and RD select a source register used as an input to an ALU (not shown) and a destination register to store the result of the operation among the general-purpose registers (216, see FIG. 9). This is a field for As shown in FIG. 9, the source register of the multiplexer 221 is selected by 'RS1', and the source register of the multiplexer 223 is selected by 'RS2'. And, according to the 'RD' value, a destination register (Destination register) will be selected from the general-purpose register (216, see FIG. 9) by the demultiplexer 227.

명령어 셋(Instr.)의 필드값 'imm16' 및 'imm8'은 명령어 코드 필드에 포함된 이미디어트 데이터(Immediate data) 값들을 의미한다. 'imm16' 및 'imm8'은 16-비트 또는 8-비트 크기를 가질 수 있다.Field values 'imm16' and 'imm8' of the instruction set (Instr.) refer to immediate data values included in the instruction code field. 'imm16' and 'imm8' can have 16-bit or 8-bit sizes.

'cmd3'는 앞서 설명된 바와 같이, 이전에 로딩된 블롭 디스크립터에 기록되어 있던 후속 디스크립터(Next Descriptor)의 주소를 포함한다. 'cmd3'는 uCode 컨트롤러(126)에 의해 DMA 동작이 변경된 후, 종래의 DMA 동작으로 복귀하기 위해 사용된다. 즉, 'cmd3'는 일반적인 CPU에서 리턴 어드레스(Return Address)에 해당한다.As previously explained, 'cmd3' includes the address of the next descriptor (Next Descriptor) recorded in the previously loaded blob descriptor. 'cmd3' is used to return to the conventional DMA operation after the DMA operation has been changed by the uCode controller 126. In other words, 'cmd3' corresponds to the return address in a general CPU.

'shift Imm. Bytes' 필드는 명령어 코드(Instruction code)에 포함된 이미디어트 데이터(Immediate data)를 0, 8, 16, 32-비트 단위로 좌측으로 쉬프트하는 연산에 사용된다. 단, 직접 AND 명령(ANDI instruction)의 경우에는 'imm8' 데이터 이외의 다른 부분은 '1'로 설정하여 연산에 사용한다. 그 외 명령어(Instruction)들의 'imm8' 데이터 이외의 다른 부분은 '0'으로 설정하여 연산에 사용한다.'shift Imm. The Bytes' field is used for operations that shift immediate data included in the instruction code to the left in 0, 8, 16, or 32-bit units. However, in the case of a direct AND instruction (ANDI instruction), parts other than the 'imm8' data are set to '1' and used for calculation. Other parts of the instructions other than the 'imm8' data are set to '0' and used in calculations.

더불어, 본 발명의 3차원 DMA 컨트롤러(120) 내부의 uCode 컨트롤러(126)는 7-비트 'OPCODE'를 가지고 최대 128개의 명령어(Instruction)로 확장 가능하며, 정의된 명령어 셋(Instruction Set)은 아래 표 3으로 나타낼 수 있다.In addition, the uCode controller 126 inside the 3D DMA controller 120 of the present invention can be expanded to a maximum of 128 instructions with a 7-bit 'OPCODE', and the defined instruction set is as follows. It can be shown in Table 3.

Instruction codeInstruction code 설명explanation NOPNOP No operationNo operation LLILLI Load immediate field to Lower half of destination registerLoad immediate field to Lower half of destination register LUILUI Load immediate field to Upper half of destination registerLoad immediate field to Upper half of destination register LCOMD3LCOMD3 Load CMD3 data to destination registerLoad CMD3 data to destination register ADDADD rd = rs1 + rs2rd = rs1 + rs2 SUBSUB rd = rs1 - rs2rd = rs1 - rs2 ANDAND rd = rs1 & rs2rd = rs1 & rs2 OROR rd = rs1 | rs2rd = rs1 | rs2 XORXOR rd = rs1 ^ rs2rd = rs1 ^ rs2 ADDIADDI rd = rs1 + shift(imm8)rd = rs1 + shift(imm8) SUBISUBI rd = rs1 - shift(imm8)rd = rs1 - shift(imm8) SBURSBUR rd = shift(imm8) - rs1rd = shift(imm8) - rs1 ANDIANDI rd = rs1 & shift(imm8).setOtherBitsrd = rs1 & shift(imm8).setOtherBits ORIORI rd = rs1 | shift(imm8).clrOtherBitsrd = rs1 | shift(imm8).clrOtherBits XORIXORI rd = rs1 ^ shift(imm8)rd = rs1 ^ shift(imm8) UPDUPD Copy R28 to CMD0 if SEL[0]=1 otherwise do not copy
Copy R29 to CMD1 if SEL[1]=1 otherwise do not copy
Copy R30 to CMD2 if SEL[2]=1 otherwise do not copy
Copy R31 to CMD3 if SEL[3]=1 otherwise do not copy
After copy, execute the descriptor {CMD3, CMD2, CMD1, CMD0}
Copy R28 to CMD0 if SEL[0]=1 otherwise do not copy
Copy R29 to CMD1 if SEL[1]=1 otherwise do not copy
Copy R30 to CMD2 if SEL[2]=1 otherwise do not copy
Copy R31 to CMD3 if SEL[3]=1 otherwise do not copy
After copy, execute the descriptor {CMD3, CMD2, CMD1, CMD0}

'UCF(Update Condition Flag)' 필드가 '1'로 설정된 명령어의 경우, uCode 컨트롤러(126)는 그 연산 결과를 체크하여 연산 결과가 '0'이면 'eq' 플래그를 셋 상태('1')로 설정하고, 그렇지 않으면 클리어 상태('0')로 설정한다. 명령어의 연산 결과를 체크하여 연산 결과가 양수이면, uCode 컨트롤러(126)는 'gt' 플래그를 셋 상태('1')로 설정하고, 그렇지 않으면 클리어 상태('0')로 설정한다. 'UCF' 필드가 설정되어 있지 않거나, 'UCF' 필드가 존재하지 않는 명령어(Instruction)에 대해서는, uCode 컨트롤러(126)는 연산의 수행 후에도 조건 플래그(eq, gt, Condition flag)를 변경하지 않는다.In the case of an instruction in which the 'UCF (Update Condition Flag)' field is set to '1', the uCode controller 126 checks the operation result and sets the 'eq' flag ('1') if the operation result is '0'. Set to , otherwise set to clear status ('0'). If the operation result of the instruction is checked and the operation result is a positive number, the uCode controller 126 sets the 'gt' flag to the set state ('1'), otherwise, it sets it to the clear state ('0'). For instructions in which the 'UCF' field is not set or the 'UCF' field does not exist, the uCode controller 126 does not change the condition flags (eq, gt, condition flag) even after performing the operation.

'CCF(Condition Code Flag)' 필드는 'UCF(Update Condition Flag)'가 설정 상태('1'로 설정)인 명령어 셋(Instruction set)에 의해 매 연산의 결과마다 업데이트되는 'gt(greater than)', 'eq(equal)'의 출력 결과를 참고하여 설정된다. 'CCF' 필드에 대응되는 조건을 만족할 시에는, 해당 명령어(Instruction)가 수행되고, 그렇지 않은 경우에는 해당 명령어(Instruction)는 무시된다. 사용되는 CCF에 따른 명령어(Instrcution)의 실행 조건은 아래 표4와 같다.The 'CCF (Condition Code Flag)' field is a 'gt (greater than)' field that is updated for each operation result by an instruction set with the 'UCF (Update Condition Flag)' set (set to '1'). It is set by referring to the output results of ', 'eq(equal)'. If the conditions corresponding to the 'CCF' field are met, the corresponding instruction is executed. Otherwise, the instruction is ignored. The execution conditions of instructions according to the CCF used are shown in Table 4 below.

`define CCF_TRUE 'h0 // run always
`define CCF_IFEQ 'h1 // run if eq
`define CCF_IFNE 'h2 // run if ne
`define CCF_IFGT 'h3 // run if gt
`define CCF_IFLT 'h4 // run if lt
`define CCF_IFGE 'h5 // run if ge
`define CCF_IFLE 'h6 // run if le
`define CCF_TRUE 'h0 // run always
`define CCF_IFEQ 'h1 // run if eq
`define CCF_IFNE 'h2 // run if ne
`define CCF_IFGT 'h3 // run if gt
`define CCF_IFLT 'h4 // run if lt
`define CCF_IFGE 'h5 // run if ge
`define CCF_IFLE 'h6 // run if le

도 11은 본 발명의 실시 예에 따른 어드레스 생성 방법을 간략히 보여주는 도면이다. 도 11을 참조하면, 어드레스 발생기(300)는 데이터 컨트롤러(310)의 어드레스(blob_addr)와 디스크립터로부터 제공되는 소스 어드레스(source addr), 목적지 어드레스(destination addr)를 사용하여 실질적인 메모리(130)의 어드레스(src_addr, dst_addr)를 생성할 수 있다.Figure 11 is a diagram briefly showing an address generation method according to an embodiment of the present invention. Referring to FIG. 11, the address generator 300 uses the address (blob_addr) of the data controller 310, the source address (source addr) provided from the descriptor, and the destination address (destination addr) to generate the address of the actual memory 130. (src_addr, dst_addr) can be created.

위에서 설명한 내용은 본 발명을 실시하기 위한 구체적인 예들이다. 본 발명에는 위에서 설명한 실시 예들뿐만 아니라, 단순하게 설계 변경하거나 용이하게 변경할 수 있는 실시 예들도 포함될 것이다. 또한, 본 발명에는 상술한 실시 예들을 이용하여 앞으로 용이하게 변형하여 실시할 수 있는 기술들도 포함될 것이다.The contents described above are specific examples for carrying out the present invention. The present invention will include not only the embodiments described above, but also embodiments that can be simply changed or easily changed in design. In addition, the present invention will also include technologies that can be easily modified and implemented in the future using the above-described embodiments.

Claims (19)

메모리에 저장되는 다차원 데이터의 직접 메모리 접근(DMA)을 수행하기 위한 다차원 DMA 컨트롤러에 있어서:
상기 다차원 데이터를 접근하기 위한 마이크로코드 디스크립터, 노멀 디스크립터, 그리고 3차원 블롭 디스크립터를 포함하는 디스크립터;
상기 마이크로코드 디스크립터에 포함된 명령어(Instruction)를 실행하는 마이크로코드 컨트롤러; 그리고
상기 디스크립터에 저장된 파라미터에 따라 상기 다차원 데이터의 적어도 일부를 자동적으로 전송하는 전송 컨트롤러를 포함하는 다차원 DMA 컨트롤러.
In a multidimensional DMA controller for performing direct memory access (DMA) of multidimensional data stored in memory:
A descriptor including a microcode descriptor, a normal descriptor, and a 3D blob descriptor for accessing the multidimensional data;
a microcode controller that executes instructions included in the microcode descriptor; and
A multidimensional DMA controller comprising a transmission controller that automatically transmits at least a portion of the multidimensional data according to parameters stored in the descriptor.
제 1 항에 있어서,
상기 마이크로코드 디스크립터는 복수의 커맨드 레지스터들을 포함하고,
상기 복수의 커맨드 레지스터들 중 제 1 내지 제 3 커맨드 레지스터에는 명령어(Instruction)가 저장되고, 상기 복수의 커맨드 레지스터들 중 제 4 레지스터에는 후속 디스크립터 어드레스가 저장되는 다차원 DMA 컨트롤러.
According to claim 1,
The microcode descriptor includes a plurality of command registers,
A multidimensional DMA controller in which instructions are stored in first to third command registers among the plurality of command registers, and a subsequent descriptor address is stored in the fourth register among the plurality of command registers.
제 2 항에 있어서,
상기 제 3 커맨드 레지스터의 적어도 하나의 비트는 상기 다차원 데이터가 1차원 배열인지 또는 다차원 배열인지를 지시하는 데이터 타입 필드를 포함하는 다차원 DMA 컨트롤러.
According to claim 2,
At least one bit of the third command register includes a data type field indicating whether the multidimensional data is a one-dimensional array or a multidimensional array.
제 1 항에 있어서,
상기 노멀 디스크립터는 소스 어드레스를 저장하는 제 1 커맨드 레지스터, 목적지 어드레스를 저장하는 제 2 커맨드 레지스터, 그리고 전송 바이트 수를 저장하는 제 3 커맨드 레지스터를 포함하고,
상기 제 3 커맨드 레지스터에는 상기 소스 어드레스의 속성을 정의하는 상수 쓰기(CW) 필드가 포함되는 다차원 DMA 컨트롤러.
According to claim 1,
The normal descriptor includes a first command register storing a source address, a second command register storing a destination address, and a third command register storing the number of transmitted bytes,
The third command register includes a constant write (CW) field that defines properties of the source address.
제 4 항에 있어서,
상수 쓰기(CW) 필드가 논리 '1'인 경우, 상기 제 1 커맨드 레지스터의 상기 소스 어드레스에 대응하는 필드는 상수 데이터(Constant Data)를 지시하는 다차원 DMA 컨트롤러.
According to claim 4,
When the constant write (CW) field is logic '1', the field corresponding to the source address of the first command register indicates constant data.
제 5 항에 있어서,
상수 쓰기(CW) 필드가 논리 '1'인 경우, 상기 다차원 DMA 컨트롤러는 읽기 동작없이 상기 전송 바이트 수에 대응하는 상기 상수 데이터(Constant Data)를 상기 메모리의 상기 목적지 어드레스에 기입하는 다차원 DMA 컨트롤러.
According to claim 5,
When the constant write (CW) field is logic '1', the multidimensional DMA controller writes the constant data (Constant Data) corresponding to the number of transfer bytes to the destination address of the memory without a read operation.
제 1 항에 있어서,
상기 3차원 블롭 디스크럽터는, 페이로드 데이터를 저장하는 제 1 내지 제 3 커맨드 레지스터, 그리고 후속 디스크립터의 어드레스를 저장하는 제 4 커맨드 레지스터를 포함하고,
상기 제 3 커맨드 레지스터에는 상기 페이로드 데이터의 속성을 지시하는 페이로드 타입 필드를 포함하는 다차원 DMA 컨트롤러.
According to claim 1,
The three-dimensional blob deruptor includes first to third command registers storing payload data, and a fourth command register storing the address of a subsequent descriptor,
The third command register includes a payload type field indicating properties of the payload data.
제 7 항에 있어서,
상기 페이로드 타입 필드가 제 1 값인 경우, 상기 페이로드 데이터는 상기 메모리 상에서의 3차원 데이터의 규격을 정의하는 다차원 DMA 컨트롤러.
According to claim 7,
When the payload type field is the first value, the payload data defines a standard for three-dimensional data on the memory.
제 7 항에 있어서,
상기 페이로드 타입 필드가 제 2 값인 경우, 상기 페이로드 데이터는 상기 메모리 상에서의 3차원 데이터에 포함되는 매크로 블롭의 위치를 정의하는 다차원 DMA 컨트롤러.
According to claim 7,
When the payload type field is a second value, the payload data defines the location of a macro blob included in 3D data on the memory.
제 7 항에 있어서,
상기 페이로드 타입 필드가 제 3 값인 경우, 상기 페이로드 데이터는 상기 메모리 상에서의 3차원 데이터에 포함되는 매크로 블롭의 사이즈를 정의하는 다차원 DMA 컨트롤러.
According to claim 7,
When the payload type field is a third value, the payload data defines the size of a macro blob included in 3D data on the memory.
제 7 항에 있어서,
상기 페이로드 타입 필드가 제 4 값인 경우, 상기 페이로드 데이터는 이전에 전송된 매크로 블롭과 동일한 규격을 갖는 적어도 하나의 인접한 매크로 블롭을 전송하기 위한 데이터에 대응하는 다차원 DMA 컨트롤러.
According to claim 7,
When the payload type field is the fourth value, the payload data corresponds to data for transmitting at least one adjacent macro blob having the same specifications as a previously transmitted macro blob.
제 11 항에 있어서,
상기 페이로드 데이터는, 상기 적어도 하나의 인접한 매크로 블롭의 수(Iteration count), 그리고 상기 다차원 데이터 내에서 상기 이전에 전송된 매크로 블롭에 대한 상기 적어도 하나의 인접한 매크로 블롭의 방향 중 적어도 하나를 포함하는 다차원 DMA 컨트롤러.
According to claim 11,
The payload data includes at least one of an iteration count of the at least one adjacent macro blob and an orientation of the at least one adjacent macro blob relative to the previously transmitted macro blob within the multidimensional data. Multidimensional DMA controller.
제 12 항에 있어서,
상기 페이로드 데이터는, 상기 적어도 하나의 인접한 매크로 블롭의 어드레스를 다차원 배열 또는 일차원 배열로 변환하도록 설정하는 필드를 포함하는 다차원 DMA 컨트롤러.
According to claim 12,
The payload data includes a field for converting the address of the at least one adjacent macro blob into a multidimensional array or a one-dimensional array.
제 12 항에 있어서,
상기 페이로드 데이터는, 고정된 어드레스를 생성할지 또는 가변되는 어드레스를 생성할지를 지시하는 필드를 포함하는 다차원 DMA 컨트롤러.
According to claim 12,
The payload data includes a field indicating whether to generate a fixed address or a variable address.
제 14 항에 있어서,
상기 고정된 어드레스는 상기 디스크립터의 소스 어드레스가 FIFO(First-In-First-Out) 메모리인 경우에 대응하는 다차원 DMA 컨트롤러.
According to claim 14,
The fixed address corresponds to a case where the source address of the descriptor is a First-In-First-Out (FIFO) memory.
제 1 항에 있어서,
상기 마이크로코드 컨트롤러는 32개의 범용 레지스터를 갖고, 31개의 명령어 코드를 갖는 다차원 DMA 컨트롤러.
According to claim 1,
The microcode controller is a multidimensional DMA controller with 32 general-purpose registers and 31 instruction codes.
제 16 항에 있어서,
상기 마이크로코드 컨트롤러는, 상기 범용 레지스터 중에서 상기 마이크로코드 컨트롤러의 ALU의 입력으로 사용되는 소스 레지스터(RS), 상기 ALU의 처리 결과를 저장하는 목적지 레지스터(RD)를 포함하는 다차원 DMA 컨트롤러.
According to claim 16,
The microcode controller is a multidimensional DMA controller that includes, among the general-purpose registers, a source register (RS) used as an input to the ALU of the microcode controller and a destination register (RD) that stores processing results of the ALU.
중앙 처리 장치;
메모리 장치; 그리고
상기 중앙 처리 장치의 제어에 따라 상기 메모리 장치에 저장되는 다차원 데이터에 대한 직접 메모리 접근(DMA)을 수행하기 위한 다차원 DMA 컨트롤러를 포함하되,
상기 다차원 DMA 컨트롤러는:
상기 다차원 데이터를 접근하기 위한 마이크로코드 디스크립터, 노멀 디스크립터, 그리고 3차원 블롭 디스크립터를 포함하는 디스크립터;
상기 마이크로코드 디스크립터에 포함된 명령어(Instrcution)를 실행하는 마이크로코드 컨트롤러; 그리고
상기 디스크립터에 저장된 파라미터에 따라 상기 다차원 데이터의 적어도 일부를 자동적으로 전송하는 전송 컨트롤러를 포함하는 컴퓨터 시스템.
central processing unit;
memory device; and
A multidimensional DMA controller for performing direct memory access (DMA) on multidimensional data stored in the memory device under the control of the central processing unit,
The multidimensional DMA controller:
A descriptor including a microcode descriptor, a normal descriptor, and a 3D blob descriptor for accessing the multidimensional data;
A microcode controller that executes instructions included in the microcode descriptor; and
A computer system comprising a transmission controller that automatically transmits at least a portion of the multidimensional data according to parameters stored in the descriptor.
제 18 항에 있어서,
상기 3차원 블롭 디스크립터는 페이로드 데이터를 저장하는 제 1 내지 제 3 커맨드 레지스터, 그리고 후속 디스크립터의 어드레스를 저장하는 제 4 커맨드 레지스터를 포함하고, 상기 제 3 커맨드 레지스터에는 상기 페이로드 데이터의 속성을 지시하는 페이로드 타입 필드를 포함하는 컴퓨터 시스템.
According to claim 18,
The three-dimensional blob descriptor includes first to third command registers that store payload data, and a fourth command register that stores the address of a subsequent descriptor, and the third command register indicates properties of the payload data. A computer system that includes a payload type field.
KR1020210041598A 2020-11-27 2021-03-31 Multi-dimension dma controller and computer system comprising the same KR102673748B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/533,891 US20220171622A1 (en) 2020-11-27 2021-11-23 Multi-dimension dma controller and computer system including the same

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020200161870 2020-11-27
KR20200161870 2020-11-27

Publications (2)

Publication Number Publication Date
KR20220074683A KR20220074683A (en) 2022-06-03
KR102673748B1 true KR102673748B1 (en) 2024-06-10

Family

ID=81982676

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020210041598A KR102673748B1 (en) 2020-11-27 2021-03-31 Multi-dimension dma controller and computer system comprising the same

Country Status (1)

Country Link
KR (1) KR102673748B1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130159726A1 (en) 2009-12-22 2013-06-20 Francis X. McKeen Method and apparatus to provide secure application execution
US20200342632A1 (en) 2019-04-29 2020-10-29 Nvidia Corporation Efficient matrix format suitable for neural networks
US20200371978A1 (en) 2019-04-01 2020-11-26 Wave Computing, Inc. Multidimensional address generation for direct memory access

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130159726A1 (en) 2009-12-22 2013-06-20 Francis X. McKeen Method and apparatus to provide secure application execution
US20200371978A1 (en) 2019-04-01 2020-11-26 Wave Computing, Inc. Multidimensional address generation for direct memory access
US20200342632A1 (en) 2019-04-29 2020-10-29 Nvidia Corporation Efficient matrix format suitable for neural networks

Also Published As

Publication number Publication date
KR20220074683A (en) 2022-06-03

Similar Documents

Publication Publication Date Title
TWI512466B (en) Efficient memory virtualization in multi-threaded processing units
TWI529626B (en) Efficient memory virtualization in multi-threaded processing units
CN107077334B (en) Hardware apparatus and method for prefetching multidimensional blocks of elements from a multidimensional array
TWI525437B (en) Efficient memory virtualization in multi-threaded processing units
JP6708334B2 (en) Morton coordinate adjustment processor, method, system, and instructions
TWI461910B (en) Memories and methods for performing atomic memory operations in accordance with configuration information
US11113062B2 (en) Inserting predefined pad values into a stream of vectors
US11249759B2 (en) Two-dimensional zero padding in a stream of matrix elements
US20180052685A1 (en) Processor and method for executing instructions on processor
JP6696674B2 (en) Three-dimensional Morton coordinate transformation processor, method, system, and instructions
US11256508B2 (en) Inserting null vectors into a stream of vectors
JP2018500630A (en) 4D Morton coordinate transformation processor, method, system, and instructions
US20220237041A1 (en) Parallel processing system performing in-memory processing
JP6757791B2 (en) Computer device with in-memory processing and narrow data port
KR102579192B1 (en) Data processing method and apparatus, and related product
KR20230042498A (en) Register addressing information for data transfer instructions
US20220171622A1 (en) Multi-dimension dma controller and computer system including the same
KR102673748B1 (en) Multi-dimension dma controller and computer system comprising the same
JP6094356B2 (en) Arithmetic processing unit
CN114218152B (en) Stream processing method, processing circuit and electronic equipment
US20140013066A1 (en) Memory sub-system and computing system including the same
JP4384828B2 (en) Coprocessor device and method for facilitating data transfer
CN114675888A (en) Apparatus, method, and system for loading instructions for matrix manipulation of accelerator tiles
JP6292324B2 (en) Arithmetic processing unit
US11500632B2 (en) Processor device for executing SIMD instructions

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant