KR100902506B1 - Method of direct memory access based on remaining data transfer amount and direct access memory control apparatus using thereof - Google Patents
Method of direct memory access based on remaining data transfer amount and direct access memory control apparatus using thereof Download PDFInfo
- Publication number
- KR100902506B1 KR100902506B1 KR1020070010092A KR20070010092A KR100902506B1 KR 100902506 B1 KR100902506 B1 KR 100902506B1 KR 1020070010092 A KR1020070010092 A KR 1020070010092A KR 20070010092 A KR20070010092 A KR 20070010092A KR 100902506 B1 KR100902506 B1 KR 100902506B1
- Authority
- KR
- South Korea
- Prior art keywords
- request block
- dma
- data
- data transfer
- memory
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
- G06F13/28—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal
- G06F13/30—Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal with priority control
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR 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
Abstract
본 발명에 의한 우선 순위를 결정하는 방법은, 제1 DMA 요청 블록과 메모리 간의 데이터를 전송하고, 전송된 데이터의 데이터 전송량과 소정의 최대 허용 전송량을 비교하며, 비교 결과 전송된 데이터 전송량이 소정의 최대 허용 전송량 이상인 경우 제1 DMA 요청 블록과 메모리 간에 전송되어야 할 데이터 전송량으로부터 전송된 데이터 전송량을 감산하여 잔존 데이터 전송량을 계산하고, 계산된 잔존 데이터 전송량에 기초하여, 제1 DMA 요청 블록보다 낮은 우선순위의 제2 DMA 요청 블록과 메모리 간의 데이터 전송 여부를 결정함으로써, 우선순위가 낮은 DMA 요청 블록과 메모리 간의 데이터 전송을 효율적으로 처리할 수 있는 효과를 가진다.
The method for determining the priority according to the present invention includes transferring data between a first DMA request block and a memory, comparing a data transmission amount of the transmitted data with a predetermined maximum allowable transmission amount, and as a result of the comparison, the data transmission amount is predetermined. If the maximum allowable transmission amount or more is exceeded, the remaining data transfer amount is calculated by subtracting the transferred data transfer amount from the data transfer amount to be transferred between the first DMA request block and the memory, and based on the calculated remaining data transfer amount, the lower priority than the first DMA request block By determining whether data is transmitted between the second DMA request block and the memory of the priority, it is possible to efficiently process data transmission between the DMA request block and the memory having a lower priority.
Description
도 1은 본 발명의 일 실시예에 따른 DMA 제어 장치(100)의 구성도이다.1 is a block diagram of a
도 2는 본 발명의 일 실시예에 따라 잔존 데이터 전송량을 고려한 데이터 전송에 대한 개념도이다.2 is a conceptual diagram for data transmission in consideration of remaining data transmission amount according to an embodiment of the present invention.
도 3은 본 발명의 다른 실시예에 따라 잔존 데이터 전송량을 고려한 데이터 전송에 대한 개념도이다.3 is a conceptual diagram for data transmission in consideration of remaining data transmission amount according to another embodiment of the present invention.
도 4는 본 발명의 일 실시예에 따른 DMA 제어 방법의 흐름도이다.4 is a flowchart of a DMA control method according to an embodiment of the present invention.
<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>
100 : DMA 제어 장치100: DMA control unit
101 : DMA 처리부101: DMA processing unit
102 : 우선순위 저장부102: priority storage unit
103 : 비교부103: comparison unit
104 : 제1 저장부104: first storage unit
105 : 잔존 데이터 전송량 계산부105: remaining data transfer calculation unit
106 : DMA 결정부106: DMA decision unit
107 : 제2 저장부107: second storage unit
108 : 임시 저장부108: temporary storage
본 발명은 직접 메모리 액세스(Direct memory access: DMA)에 관한 것으로, 특히 잔존 데이터 전송량에 기초하여 우선 순위가 낮은 DMA 요청 블록의 데이터 전송을 처리하는 방법 및 장치에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to direct memory access (DMA), and more particularly to a method and apparatus for processing data transfer of low priority DMA request blocks based on the amount of data remaining.
직접 메모리 액세스 방식은 중앙처리장치(Central Processing Unit: CPU)를 거치지 않고 메모리와 입/출력 장치 사이에서 수행되는 데이터 전송 방법의 하나이다. DMA 전송 방식을 사용하기 위해서는 시스템 버스 상에 DMA 제어 모듈(Direct Memory Access Control Module)이 추가되어야 한다. DMA 제어 모듈은 중앙처리장치로부터 시스템의 제어를 넘겨받아 중앙처리장치의 기능 중 일부를 대신 처리한다. 즉, 중앙처리장치는 데이터 전송 동작을 DMA 제어 모듈에 일임하고, DMA 제어 모듈은 중앙처리장치를 대신하여 데이터 전송 동작을 처리한다. DMA 제어 모듈은 중앙처리장치를 거치지 않고 데이터를 메모리로 직접 전송하고, 모든 데이터 전송이 완료되면 DMA 제어 모듈은 인터럽트를 생성하고, 생성된 인터럽트를 중앙처리장치로 전달한다.The direct memory access method is one of data transfer methods performed between a memory and an input / output device without going through a central processing unit (CPU). In order to use the DMA transfer method, a DMA control module (Direct Memory Access Control Module) must be added on the system bus. The DMA control module takes over control of the system from the central processing unit and processes some of the functions of the central processing unit instead. That is, the central processing unit assigns the data transfer operation to the DMA control module, and the DMA control module processes the data transfer operation on behalf of the central processing unit. The DMA control module transfers data directly to the memory without going through the central processing unit. When all data transfers are completed, the DMA control module generates an interrupt and transfers the generated interrupt to the central processing unit.
특히, 복수의 DMA 요청 블록들을 가지는 DMA 제어 모듈의 경우에 있어서, DMA 요청 블록이 액정 표시 장치(Liquid Crystal Display; LCD)와 같은 I/O(Input/Output) 장치인 경우 데이터의 전송만을 목적으로 하며, I/O 장치들간에 고정된 우선 순위를 미리 설정함이 통상적이다. 따라서, 우선 순위가 낮은 I/O 장치와 메모리 간에 데이터 전송을 하는 도중에, 우선 순위가 높은 I/O 장치로부터 DMA 요청이 들어오면, DMA 제어 모듈은 우선 순위가 낮은 I/O 장치와 메모리 간의 데이터 전송을 일시 정지하고, 우선 순위가 높은 I/O 장치와 메모리 간의 데이터 전송을 우선 처리한다. 우선 순위가 높은 I/O 장치와 메모리 간의 데이터 전송이 완료된 후에, DMA 제어 모듈은 우선 순위가 낮은 I/O 장치와 메모리 간의 데이터 전송을 처리한다. 반대로 우선순위가 높은 I/O 장치와 메모리 간의 데이터 전송이 처리되는 동안에 우선 순위가 낮은 I/O 장치로부터 DMA 요청이 들어오는 경우에는 우선순위가 낮은 I/O 장치는 우선순위가 높은 I/O 장치의 데이터 전송이 완료될 때까지 대기해야 한다.In particular, in the case of a DMA control module having a plurality of DMA request blocks, when the DMA request block is an input / output (I / O) device such as a liquid crystal display (LCD), only data is transmitted. It is common to pre-set fixed priorities between I / O devices. Therefore, during a data transfer between a low priority I / O device and a memory, if a DMA request is received from a high priority I / O device, the DMA control module causes data between the low priority I / O device and the memory. Pauses the transfer and prioritizes data transfer between high priority I / O devices and memory. After the data transfer between the high priority I / O device and the memory is completed, the DMA control module handles the data transfer between the low priority I / O device and the memory. Conversely, if a DMA request comes from a low-priority I / O device while data transfer between the high-priority I / O device and memory is being processed, the low-priority I / O device will be the high-priority I / O device. Wait until the data transfer is complete.
이러한 종래 기술에 의하면, 우선순위가 낮은 I/O 장치의 데이터 전송량이 우선순위가 높은 I/O 장치의 잔존 데이터 전송량에 비해 상대적으로 적은 경우에도 우선순위가 높은 I/O 장치의 데이터 전송이 완료될 때까지 대기해야 한다는 문제점이 있다.According to this conventional technology, even if the data transmission amount of the low priority I / O device is relatively small compared to the remaining data transmission amount of the high priority I / O device, the data transmission of the high priority I / O device is completed. The problem is that you have to wait until.
본 발명이 이루고자 하는 기술적 과제는, 우선순위가 높은 DMA 요청블록의 잔존 데이터 전송량과 우선순위가 낮은 DMA 요청블록의 데이터 전송량에 기초하여 우선순위가 낮은 DMA 요청블록과 메모리 간의 데이터 전송 여부를 결정하기 위한 방법 및 장치를 제공하는 데 있다.The technical problem to be achieved by the present invention is to determine whether to transfer data between the low priority DMA request block and the memory based on the remaining data transfer amount of the high priority DMA request block and the data transfer amount of the low priority DMA request block. To provide a method and apparatus for the same.
본 발명이 이루고자 하는 다른 기술적 과제는, 우선순위가 높은 DMA 요청블록의 잔존 데이터 전송량과 우선순위가 낮은 DMA 요청블록의 데이터 전송량에 기초하여 우선순위가 낮은 DMA 요청블록과 메모리 간의 데이터 전송 여부를 결정하기 위한 방법을 기록한 컴퓨터로 독출 가능한 기록 매체를 제공하는 데 있다.Another technical problem to be solved by the present invention is to determine whether to transfer data between the low priority DMA request block and the memory based on the remaining data transfer amount of the high priority DMA request block and the data transfer amount of the low priority DMA request block. A computer readable recording medium having recorded thereon a method for doing so is provided.
상기 과제를 이루기 위해, 본 발명에 의한 DMA 제어 방법은 (a) 제1 DMA 요청 블록과 메모리 간의 데이터를 전송하는 단계; (b) 상기 전송된 데이터의 데이터 전송량과 소정의 최대 허용 전송량을 비교하는 단계; (c) 상기 비교 결과 상기 전송된 데이터 전송량이 상기 소정의 최대 허용 전송량 이상인 경우 상기 제1 DMA 요청 블록과 상기 메모리 간에 전송되어야 할 데이터 전송량으로부터 상기 전송된 데이터 전송량을 감산하여 잔존 데이터 전송량을 계산하는 단계; 및 (d) 상기 계산된 잔존 데이터 전송량에 기초하여, 상기 제1 DMA 요청 블록보다 낮은 우선순위의 제2 DMA 요청 블록과 상기 메모리 간의 데이터 전송 여부를 결정하는 단계를 포함하는 것을 특징으로 한다.In order to achieve the above object, the DMA control method according to the present invention comprises the steps of (a) transferring data between the first DMA request block and the memory; (b) comparing a data transmission amount of the transmitted data with a predetermined maximum allowable transmission amount; (c) calculating the remaining data transfer amount by subtracting the transferred data transfer amount from the data transfer amount to be transferred between the first DMA request block and the memory when the transferred data transfer amount is equal to or greater than the predetermined maximum allowed transfer amount. step; And (d) determining whether to transmit data between the memory and the second DMA request block having a lower priority than the first DMA request block based on the calculated remaining data transfer amount.
상기 또 다른 과제를 이루기 위해, 상기 방법을 실행하기 위한 프로그램이 기록된 컴퓨터로 독출 가능한 기록매체가 제공된다.In order to achieve the above further object, there is provided a computer-readable recording medium having recorded thereon a program for executing the method.
상기 다른 과제를 이루기 위해, 본 발명에 의한 DMA 제어 장치는, 제1 DMA 요청 블록과 메모리 간의 데이터를 전송하는 DMA 처리부; 상기 전송된 데이터의 데이터 전송량과 소정의 최대 허용 전송량을 비교하는 비교부; 상기 비교 결과 상기 전송된 데이터 전송량이 상기 소정의 최대 허용 전송량 이상인 경우 상기 제1 DMA 요청 블록과 상기 메모리 간에 전송되어야 할 데이터 전송량으로부터 상기 전송된 데이터 전송량을 감산하여 잔존 데이터 전송량을 계산하는 잔존 데이터 전송량 계산부; 및 상기 계산된 잔존 데이터 전송량에 기초하여, 상기 제1 DMA 요청 블록보다 낮은 우선순위의 제2 DMA 요청 블록과 상기 메모리 간의 데이터 전송 여부를 결정하는 DMA 결정부를 포함하는 것을 특징으로 한다.In order to achieve the above object, the DMA control apparatus according to the present invention, the DMA processing unit for transmitting data between the first DMA request block and the memory; A comparison unit for comparing a data transmission amount of the transmitted data with a predetermined maximum allowable transmission amount; The remaining data transfer amount for calculating the remaining data transfer amount by subtracting the transferred data transfer amount from the data transfer amount to be transferred between the first DMA request block and the memory when the result of the comparison is that the transferred data transfer amount is equal to or greater than the predetermined maximum allowable transfer amount. A calculator; And a DMA determination unit that determines whether to transfer data between the memory and the second DMA request block having a lower priority than the first DMA request block based on the calculated remaining data transfer amount.
이하, 첨부한 도면을 참조하면서 본 발명에 따른 잔존 데이터 전송량에 기초하여 직접 메모리 액세스하는 방법 및 이를 이용한 직접 메모리 액세스 제어 장치의 바람직한 실시예를 상세하게 설명한다. 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 한해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호로 표기되었음에 유의하여야 한다. 또한, 하기의 설명에서는 구체적인 회로의 구성소자 등과 같은 많은 특정사항들이 도시되어 있는데, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐 이러한 특정사항들 없이도 본 발명이 실시될 수 있음은 이 기술분야에서 통상의 지식을 가진 자에게는 자명하다 할 것이다. 그리고 본 발명을 설명함에 있어서, 관련된 공지 기능 또는 구성에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명을 생략한다.Hereinafter, with reference to the accompanying drawings will be described in detail a preferred method of a direct memory access method and a direct memory access control apparatus using the same based on the remaining data transfer amount according to the present invention. In adding reference numerals to the components of the drawings, it should be noted that the same components are denoted by the same reference numerals as much as possible even if they are shown in different drawings. In addition, in the following description, many specific details are shown, such as components of a specific circuit, which are provided to help a more general understanding of the present invention, and the present invention may be practiced without these specific details. It is self-evident to those of ordinary knowledge in Esau. In the following description of the present invention, when it is determined that detailed descriptions of related known functions or configurations may obscure the gist of the present invention, the detailed description thereof will be omitted.
도 1은 본 발명의 일 실시예에 따른 DMA 제어 장치(100)의 구성도이다.1 is a block diagram of a
도 1을 참조하면, 제1 DMA 요청 블록(110), 제2 DMA 요청 블록(111), 및 제n DMA 요청 블록(112)은 DMA 버스를 통해 각각 DMA 요청 신호 DMA_Request_1, DMA_Request_2, 및 DMA_Request_n를 DMA 제어 장치(100)의 DMA 처리부(101)로 출력한다. DMA 요청 신호들 각각은 자신의 DMA 요청 블록의 데이터 전송량(Transfer Amount: TA)을 포함한다.Referring to FIG. 1, the first
DMA 처리부(101)는 DMA 처리부(101)로부터 출력된 DMA 요청 신호들을 수신하고, 우선순위 저장부(102)를 참조하여 우선순위가 제일 높은 DMA 요청 블록에 대하여 DMA 승인 신호 DMA_Ack_1, DMA_Ack_2, 또는 DMA_Ack_n 중 어느 하나를 전송하고, 메모리(120)와의 데이터 전송을 처리한다. 우선순위는 제1 DMA 요청블록(110)이 제2 DMA 요청블록보다 높다고 가정한다. 따라서, DMA 처리부(101)는 DMA_Ack_1신호를 제1 DMA 요청블록(110)에 전송하고, 제1 DMA 요청블록(110)과 메모리(120) 간에 데이터를 전송한다. 전송된 데이터의 데이터 전송량은 비교부(103)로 출력된다.The
우선순위 저장부(102)는 복수의 DMA 요청블록들(110 내지 112)에 대한 미리 결정된 우선순위를 저장하고 있다.The
비교부(103)는 DMA 처리부(101)에서 전송된 데이터 전송량을 수신하고, 전송된 데이터 전송량과 제1 저장부(104)에 저장된 최대 허용 전송량을 비교한다. 비교 결과는 잔존 데이터 전송량 계산부(105)로 출력된다.The
제1 저장부(104)는 비교부(103)에서 참조되는 최대 허용 전송량을 저장하고 있다. 최대 허용 전송량은 사용자에 의해 임의로 변경 가능하다.The
잔존 데이터 전송량 계산부(105)는 비교부(103)로부터 수신된 비교 결과에 따라 제1 DMA 요청 블록(110)과 메모리(120)와의 잔존 데이터 전송량을 계산한다. 즉, 잔존 데이터 전송량 계산부(105)는 전송된 데이터 전송량이 소정의 최대 허용 전송량 이상인 경우, 제1 DMA 요청 블록(110)과 메모리(120) 간에 전송되어야 할 데이터 전송량으로부터 전송된 데이터 전송량을 감산함으로써 잔존 데이터 전송량을 계산한다. 계산된 잔존 데이터 전송량은 DMA 결정부(106)로 출력된다.The remaining data transfer
DMA 결정부(106)는 잔존 데이터 전송량 계산부(105)로부터 수신된 잔존 데이터 전송량 및 제2 저장부(107)에 기초하여, 현재 처리중인 제1 DMA 요청블록(110)과 메모리(120)와의 데이터 전송을 중지하고, 제2 DMA 요청블록(111)과 메모리(120) 간의 데이터 전송을 개시할 것인지 결정한다.The DMA determiner 106 determines whether the first
제2 저장부(107)는 실시예에 따라 제1 오프셋 내지 제3 오프셋, 가중치에 대한 값을 미리 설정하여 저장하고 있다. According to an embodiment, the
DMA 결정부(106)는 여러가지 방법들에 의해 제2 DMA 요청블록(111)과 메모리(120) 간의 데이터 전송 여부를 결정할 수 있으며, 예시적인 방법들로 다음의 방법들을 고려할 수 있다.The
(ⅰ) 잔존 데이터 전송량 ≥ 제1 오프셋을 만족하는 경우 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정하는 방법으로, 다른 방법들보다 가장 간단하게 데이터 전송 여부를 결정할 수 있으나, 제2 DMA 요청 블록(111)의 데이터 전송량이 고려되지 않기 때문에 제2 DMA 요청 블록(111)의 데이터 전송량이 제1 DMA 요청 블록(110)의 잔존 데이터 전송량보다 큰 경우는 우선순위가 위인 제1 DMA 요청 블록(110)의 데이터 처리가 늦어지는 단점이 있다.(I) A method of determining that data is to be transferred between the second
(ⅱ) 잔존 데이터 전송량 ≥ 제2 DMA 요청 블록(111)의 데이터 전송량을 만 족하는 경우 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정하는 방법으로, 제2 DMA 요청 블록(111)의 데이터 전송량을 고려하여 데이터 전송 여부를 결정할 수 있다는 점에서 일률적인 오프셋에 기초한 (ⅰ) 방법과 차이가 있다.(Ii) remaining data transfer amount ≥ a method of determining that data is transferred between the second
(ⅲ) 잔존 데이터 전송량 ≥ (제2 DMA 요청 블록의 데이터 전송량 ± 제2 오프셋)을 만족하는 경우 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정하는 방법으로, 제2 오프셋을 통해 제2 DMA 요청 블록(111)의 데이터 전송량을 조절할 수 있는 장점이 있다.(Iii) a method for determining to transfer data between the second
(ⅳ) 잔존 데이터 전송량 ≥ (제2 DMA 요청 블록의 데이터 전송량 × 가중치)인 경우 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정하는 방법으로, (ⅲ) 방법의 일률적인 오프셋을 더하거나 빼는 대신 가중치를 이용하는 방법이다. 시프트 연산(shift operation)을 통한 하드웨어 구현을 용이하게 하기 위해 가중치는 2의 배수인 것이 바람직하다. (Iv) when remaining data transfer amount ≥ (data transfer amount of the second DMA request block x weight), it is determined that data is transferred between the second
(ⅴ) 잔존 데이터 전송량 ≥ (제2 DMA 요청 블록(111)의 데이터 전송량 × 가중치 ± 제3 오프셋) 이상인 경우 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정하는 방법으로, (ⅲ)의 오프셋과 (ⅳ)의 가중치를 모두 이용하는 방법이다. (ⅴ) 방법의 경우에서도 시프트 연산을 통한 하드웨어 구현을 용이하게 하기 위해 가중치는 2의 배수인 것이 바람직하다. (ⅴ) 방법의 경우 제2 DMA 요청 블록(111)의 데이터 전송량은 가중치에 의해 큰 폭으로, 제3 오프셋에 의해 더욱 세밀하게 조절될 수 있는 장점이 있다. 제1 오프셋 내지 제3 오프셋, 가중치는 임의로 변경 가능한 값이다. (Iii) a method for determining to transfer data between the second
이상의 방법들은 잔존 데이터 전송량에 기초한 예시적인 것들이며, 당해 분야의 숙련자에게는 본 발명의 정신 내에서 위의 방법들의 다양한 변형이 가능할 것이다.The above methods are exemplary based on the amount of remaining data transmission, and various modifications of the above methods will be possible to those skilled in the art within the spirit of the present invention.
한편, DMA 결정부(106)가 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정한 경우, 현재 전송중인 제1 DMA 요청블록(110)과 메모리(120)와의 데이터 전송을 중지하고, 제2 DMA 요청블록(111)과 메모리(120) 간의 데이터 전송을 개시하라는 제어 신호를 DMA 처리부(101)로 전달한다.On the other hand, when the
DMA 처리부(101)는 DMA 결정부(106)로부터 제어 신호를 전달받으면, 현재 진행중인 제1 DMA 요청 블록(110)과 메모리(120) 간의 데이터 전송을 중지하고, 제1 DMA 요청 블록(110)의 데이터 전송 상태를 임시 저장부(108)에 저장한다.When the
이후, DMA 처리부(101)는 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송한다. 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송이 완료된 후에, DMA 처리부(101)는 임시 저장부(108)에 저장된 데이터 전송 상태에 기초하여, 잔존 데이터에 대해 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송을 처리한다. 모든 데이터 전송이 처리되면, DMA 제어 장치(100)는 인터럽트를 생성하고, 생성된 인터럽트를 시스템 버스를 경유하여 중앙처리장치(Central Processing Unit: CPU)로 전달한다.Thereafter, the
도 2는 본 발명의 일 실시예에 따라 잔존 데이터 전송량을 고려한 데이터 전송에 대한 개념도로, 도 1에서 기술된 (ⅰ) 내지 (ⅴ)의 방법 중 (ⅱ) 잔존 데이터 전송량 ≥ 제2 DMA 요청 블록(111)의 데이터 전송량을 만족하는 경우에 기초한 데이터 전송이다.FIG. 2 is a conceptual diagram of data transmission in consideration of the amount of data remaining in accordance with an embodiment of the present invention, wherein (ii) the amount of data remaining ≥ a second DMA request block in the methods of (i) to (v) described in FIG. The data transfer is based on the case where the data transfer amount of 111 is satisfied.
도 2를 참조하면, 도 2의 (a)는 우선순위 1인 제1 DMA 요청 블록(110)의 데이터 전송량으로, 도면부호 200은 제1 DMA 요청 블록(110)의 데이터 전송량 중 제1 저장부(104)에 저장된 최대 허용 전송량에 해당하는 데이터 전송량을, 도면부호 201은 잔존 데이터 전송량을 도시하고 있다. 도 2의 (b)는 우선순위 2인 제2 DMA 요청 블록(111)의 데이터 전송량(202)이다. Referring to FIG. 2, (a) of FIG. 2 is a data transfer amount of the first
한편, 도 2의 (c)는 제1 DMA 요청 블록(110)의 잔존 데이터 전송량(201)이 최대 허용 전송량(200) 이상인 경우에, 데이터 전송을 도시하고 있으며, 도면부호 210 및 211은 DMA 전송시 요구되는 스위칭 시간으로, 도 2(a) 및 (b)와 같은 동일한 차원(dimension)을 위하여 데이터 전송량으로 표기하였다.2C illustrates data transmission when the remaining
도 2(c)에 도시된 바와 같이, 제1 DMA 요청 블록(110)의 잔존 데이터 전송량(201)이 최대 허용 전송량(200) 이상인 경우에는 우선 제1 DMA 요청 블록(110)과 메모리(120) 간에 데이터 전송량(200)에 대한 데이터 전송이 처리된다. 이후, 제1 DMA 요청 블록(110)과 메모리(120) 간의 데이터 전송량이 최대 허용 전송량 이상이고 동시에 제1 DMA 요청 블록(110)의 잔존 데이터 전송량(201)이 제2 DMA 요청 블록(111)의 데이터 전송량(202) 이상인 경우, 스위칭 시간(210)이 경과한 후에 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터 전송량(202)의 데이터 전송이 개시되며, 이후 스위칭 시간(211)이 경과된 후에는 중단되었던 제1 DMA 요청 블록(110)과 메모리(120) 간의 잔존 데이터 전송량(201)이 전송됨을 도시하고 있다.As shown in FIG. 2C, when the remaining
도 3은 본 발명의 다른 실시예에 따라 잔존 데이터 전송량을 고려한 데이터 전송에 대한 개념도로, 도 1에서 기술된 (ⅰ) 내지 (ⅴ)의 방법 중 (ⅱ) 잔존 데이터 전송량 ≥ 제2 DMA 요청 블록(111)의 데이터 전송량인 경우의 데이터 전송이다.3 is a conceptual diagram of data transmission in consideration of the amount of data remaining in accordance with another embodiment of the present invention, wherein (ii) the amount of data remaining ≥ 2 DMA request blocks in the methods of (i) to (i) described in FIG. Data transfer in the case of data transfer amount of (111).
도 3을 참조하면, 도 3의 (a)는 우선순위 1인 제1 DMA 요청 블록(110)의 데이터 전송량으로, 도면부호 300은 제1 DMA 요청 블록(110)의 데이터 전송량 중 제1 저장부(104)에 저장된 최대 허용 전송량에 해당하는 데이터 전송량을, 도면부호 301은 잔존 데이터 전송량을 도시하고 있다. 도 3의 (b)는 우선순위 2인 제2 DMA 요청 블록(111)의 데이터 전송량(302)이다. 도 2의 (c)는 제1 DMA 요청 블록(110)의 잔존 데이터 전송량(201)이 최대 허용 전송량(200) 미만인 경우에, 데이터 전송을 도시하고 있으며, 도면부호 310은 DMA 전송시 요구되는 스위칭 시간으로, 도 3(a) 및 (b)와 같은 동일한 차원을 위하여 데이터 전송량으로 표기하였다.Referring to FIG. 3, (a) of FIG. 3 is a data transfer amount of the first
도 3(c)에 도시된 바와 같이, 우선 데이터 전송량(200)에 대해 제1 DMA 요청 블록(110)과 메모리(120) 간에 데이터가 전송된다. 이후, 제1 DMA 요청 블록(110)과 메모리(120) 간의 데이터 전송량이 최대 허용 전송량 이상이고, 제1 DMA 요청 블록(110)의 잔존 데이터 전송량(301)이 제2 DMA 요청 블록(111)의 데이터 전송량(302) 미만인 경우에는 DMA 처리부(101)는 현재 처리중인 제1 DMA 요청 블록(110)과 메모리(120) 간의 잔존 데이터 전송량(301)에 대한 데이터 전송을 계속한다. 이후, 제1 DMA 요청 블록(110)과 메모리(120) 간의 데이터 전송(200)이 완료되면, 소정의 스위칭 시간(310)이 경과한 후에 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송량(302)을 처리한다.As shown in FIG. 3C, first, data is transferred between the first
도 4는 본 발명의 일 실시예에 따른 DMA 제어 방법의 흐름도이다.4 is a flowchart of a DMA control method according to an embodiment of the present invention.
도 4를 참조하면, 단계 400에서 DMA 처리부(101)로부터 출력된 DMA 요청 신호들을 수신하고, 우선순위 저장부(102)를 참조하여 우선순위가 제일 높은 DMA 요청 블록과 메모리(120) 간에 데이터를 전송한다. 우선순위는 제1 DMA 요청블록(110)이 제2 DMA 요청블록보다 높다고 가정한다. 따라서, DMA 처리부(101)는 제1 DMA 요청블록(110)과 메모리(120)간에 데이터를 전송하며, 전송된 데이터의 데이터 전송량은 비교부(103)로 출력된다.Referring to FIG. 4, in step 400, the DMA request signals output from the
단계 401에서 비교부(103)는 DMA 처리부(101)에서 전송된 데이터 전송량을 수신하고, 전송된 데이터 전송량과 제1 저장부(104)에 저장된 최대 허용 전송량을 비교한다. 비교 결과는 잔존 데이터 전송량 계산부(105)로 출력된다.In step 401, the
단계 402에서 잔존 데이터 전송량 계산부(105)는 비교부(103)로부터 수신된 비교 결과에 따라 제1 DMA 요청 블록(110)과 메모리(120)와의 잔존 데이터 전송량을 계산한다. 즉, 제1 DMA 요청 블록(110)과 메모리(120) 간에 전송된 데이터 전송량이 최대 허용 전송량 이상인 경우에, 제1 DMA 요청 블록(110)과 메모리(120) 간에 전송되어야 할 데이터 전송량으로부터 전송된 데이터 전송량을 감산함으로써, 잔존 데이터 전송량을 계산한다. 계산된 잔존 데이터 전송량은 DMA 결정부(106)로 출력된다.In operation 402, the remaining data transfer
단계 403에서 DMA 결정부(106)는 잔존 데이터 전송량 계산부(105)로부터 수신된 잔존 데이터 전송량과 제2 저장부(107)에 저장된 제1 오프셋을 비교한다. 잔존 데이터 전송량과 제1 오프셋의 비교는 예시적이며, (ⅰ) 제1 오프셋 외에도 (ⅱ) 제2 DMA 요청 블록(111)의 데이터 전송량, (ⅲ) 제2 DMA 요청 블록의 데이터 전송량 ± 제2 오프셋, (ⅳ) 제2 DMA 요청 블록의 데이터 전송량 × 가중치, (ⅴ) 제2 DMA 요청 블록(111)의 데이터 전송량 × 가중치 ± 제3 오프셋을 이용할 수 있음은 도 1에서 이미 기술된 바와 같다.In operation 403, the
단계 404에서, DMA 결정부(106)는 잔존 데이터 전송량 계산부(105)로부터 수신된 잔존 데이터 전송량이 제2 저장부(107)에 저장된 제1 오프셋 이상인 경우 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터 전송을 처리하는 것으로 결정하고, 제2 DMA 요청블록(111)과 메모리(120) 간의 데이터 전송을 개시하라는 제어 신호를 DMA 처리부(101)로 전달한다.In step 404, the
단계 405에서, DMA 처리부(101)는 DMA 결정부(106)로부터 제어 신호를 전달받으면, 현재 진행중인 제1 DMA 요청 블록(110)과 메모리(120) 간의 데이터 전송을 중지하고, 제1 DMA 요청 블록(110)의 데이터 전송 상태를 임시 저장부(108)에 저장한다.In step 405, when the
단계 406에서, DMA 처리부(101)는 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송을 처리한다.In step 406, the
단계 407에서, DMA 처리부(101)는 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송이 완료되었는지를 판단한다.In step 407, the
이후 단계 408에서, DMA 처리부(101)는 임시 저장부(108)에 저장된 데이터 전송 상태에 기초하여, 잔여 데이터에 대해 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송을 처리한다.Thereafter, in step 408, the
한편, 단계 409에서는 단계 403에서 판단결과, 잔존 데이터 전송량 계산부(105)로부터 수신된 잔존 데이터 전송량이 제2 저장부(107)에 저장된 제1 오프셋 미만인 경우 DMA 처리부(101)는 현재 처리중인 제1 DMA 요청블록(110)과 메모리(120)와의 데이터 전송을 처리한다.On the other hand, in step 409, if the remaining data transfer amount received from the remaining data transfer
이후, 단계 401에서는, 제1 DMA 요청블록(110)과 메모리(120)와의 데이터 전송이 완료된 이후, DMA 처리부(101)는 다음 우선순위인 제2 DMA 요청블록(111)과 메모리(120)와의 데이터 전송을 처리한다.Thereafter, in step 401, after the data transfer between the first
이상의 방법들은 잔존 데이터 전송량에 기초한 예시적인 것들이며, 당해 분야의 숙련자에게는 본 발명의 정신 내에서 위의 방법들의 다양한 변형이 가능할 것이다.The above methods are exemplary based on the amount of remaining data transmission, and various modifications of the above methods will be possible to those skilled in the art within the spirit of the present invention.
한편, DMA 결정부(106)가 제2 DMA 요청 블록(111)과 메모리(120) 간에 데이터를 전송하는 것으로 결정한 경우, 현재 처리중인 제1 DMA 요청블록(110)과 메모리(120)와의 데이터 전송을 중지하고, 제2 DMA 요청블록(111)과 메모리(120) 간의 데이터 전송을 개시하라는 제어 신호를 DMA 처리부(101)로 전달한다.On the other hand, when the
DMA 처리부(101)는 DMA 결정부(106)로부터 제어 신호를 전달받으면, 현재 진행중인 제1 DMA 요청 블록(110)과 메모리(120) 간의 데이터 전송을 중지하고, 제1 DMA 요청 블록(110)의 데이터 전송 상태를 임시 저장부(108)에 저장한다.When the
이후, DMA 처리부(101)는 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송을 처리한다. 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송이 완료된 후에, DMA 처리부(101)는 임시 저장부(108)에 저장된 데이터 전송 상태에 기초하여, 잔존 데이터에 대해 제2 DMA 요청 블록(111)과 메모리(120) 간의 데이터 전송을 처리한다.Thereafter, the
본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록 매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장 장치 등이 있으며, 또한 캐리어 웨이브 (예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록 매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disks, optical data storage devices, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
이상 도면과 명세서에서 최적 실시예들이 개시되었다. 여기서 특정한 용어들이 사용되었으나, 이는 단지 본 발명을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 특허청구범위에 기재된 본 발명의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술 분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 발명의 진정한 기술적 보호 범위는 첨부된 특허청구범위의 기술적 사상에 의해 정해져야 할 것이다.The best embodiments have been disclosed in the drawings and specification above. Although specific terms have been used herein, they are used only for the purpose of describing the present invention and are not used to limit the scope of the present invention as defined in the meaning or claims. Therefore, those skilled in the art will understand that various modifications and equivalent other embodiments are possible from this. Therefore, the true technical protection scope of the present invention will be defined by the technical spirit of the appended claims.
이상에서 설명한 바와 같이, 본 발명에 의한 직접 메모리 액세스 방법 및 이를 이용한 직접 메모리 액세스 제어 장치는 우선순위가 높은 DMA 요청블록의 잔존 데이터 전송량과 우선순위가 낮은 DMA 요청블록의 데이터 전송량에 기초하여 우선순위가 낮은 DMA 요청블록과 메모리(120) 간의 데이터 전송 여부를 결정함으로써, 우선순위가 낮은 DMA 요청블록의 데이터 전송량이 우선순위가 높은 DMA 요청블록의 잔존 데이터 전송량과 일정한 관계에 있는 경우에는 우선순위가 낮은 DMA 요청블록의 DMA 데이터 전송을 먼저 처리함으로써, 보다 효율적인 직접 메모리 액세스가 가능한 효과가 있다.As described above, the direct memory access method and the direct memory access control apparatus using the same according to the present invention have a priority based on the remaining data transfer amount of the high priority DMA request block and the data transfer amount of the low priority DMA request block. Determines whether data is transmitted between the low DMA request block and the
또한, 비록 우선순위는 낮긴 하지만, 처리해야 하는 데이터 전송량이 적은 DMA 요청블록에 대한 데이터 전송을 먼저 처리함으로써, 우선순위가 낮은 DMA 요청블록은 DMA를 통해 데이터 전송을 위해 대기해야 하는 시간을 줄일 수 있는 효과를 가진다.In addition, although the priority is low, by first processing the data transmission for the DMA request block with a small amount of data transfer to be processed, the low priority DMA request block can reduce the time to wait for data transmission through the DMA. Has the effect.
Claims (13)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070010092A KR100902506B1 (en) | 2007-01-31 | 2007-01-31 | Method of direct memory access based on remaining data transfer amount and direct access memory control apparatus using thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020070010092A KR100902506B1 (en) | 2007-01-31 | 2007-01-31 | Method of direct memory access based on remaining data transfer amount and direct access memory control apparatus using thereof |
Publications (2)
Publication Number | Publication Date |
---|---|
KR20080071788A KR20080071788A (en) | 2008-08-05 |
KR100902506B1 true KR100902506B1 (en) | 2009-06-15 |
Family
ID=39882397
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020070010092A KR100902506B1 (en) | 2007-01-31 | 2007-01-31 | Method of direct memory access based on remaining data transfer amount and direct access memory control apparatus using thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR100902506B1 (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002351815A (en) | 2001-05-23 | 2002-12-06 | Fuji Photo Film Co Ltd | Bus control method and device |
-
2007
- 2007-01-31 KR KR1020070010092A patent/KR100902506B1/en not_active IP Right Cessation
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2002351815A (en) | 2001-05-23 | 2002-12-06 | Fuji Photo Film Co Ltd | Bus control method and device |
Also Published As
Publication number | Publication date |
---|---|
KR20080071788A (en) | 2008-08-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7376853B2 (en) | Network apparatus, method for controlling the same, and program for the same | |
US8214552B2 (en) | Transmission apparatus, transmission method, communication apparatus, and program | |
US20080168130A1 (en) | Method and system for determining whether to send a synchronous or asynchronous resource request | |
WO2008056205A1 (en) | Device and method for managing access requests | |
US8612661B2 (en) | Interrupt-notification control unit, semiconductor integrated circuit and methods therefor | |
US9135195B2 (en) | Prediction of electronic component behavior in bus-based systems | |
JP2009508215A5 (en) | ||
US20060080472A1 (en) | Method and apparatus for simultaneous bidirectional signaling in a bus topology | |
JPH07253936A (en) | Time-out processing circuit and reception device using the same | |
US20120047294A1 (en) | Communication apparatus | |
JP2008046892A (en) | Arbitration circuit | |
KR100902506B1 (en) | Method of direct memory access based on remaining data transfer amount and direct access memory control apparatus using thereof | |
US9910812B2 (en) | Initiating multiple data transactions on a system bus | |
EP2141606B1 (en) | Apparatus and method for processing high speed data using hybrid DMA | |
JP4046727B2 (en) | Communication speed control circuit, communication speed control board, and information processing apparatus | |
JP4218034B2 (en) | Data communication system, data communication method, and data communication program | |
JP2001092798A (en) | Load distribution multi-processor system and method | |
JP2004295701A (en) | Serial communication device | |
JPH1049344A (en) | Buffer busy control system | |
KR100451722B1 (en) | apparatus for controlling direct memory access | |
JP2005182505A (en) | Data transfer controller and image forming apparatus | |
CN113711192A (en) | Information processing apparatus | |
US10768688B2 (en) | Arithmetic processing device, information processing apparatus, and method for controlling arithmetic processing device | |
JP2007122490A (en) | Computer | |
JP2003256353A (en) | Device and method for dma control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20120517 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20130522 Year of fee payment: 5 |
|
LAPS | Lapse due to unpaid annual fee |