KR19990058930A - Deamic controller and method for changing priority of deamplification request signal using same - Google Patents

Deamic controller and method for changing priority of deamplification request signal using same Download PDF

Info

Publication number
KR19990058930A
KR19990058930A KR1019970079123A KR19970079123A KR19990058930A KR 19990058930 A KR19990058930 A KR 19990058930A KR 1019970079123 A KR1019970079123 A KR 1019970079123A KR 19970079123 A KR19970079123 A KR 19970079123A KR 19990058930 A KR19990058930 A KR 19990058930A
Authority
KR
South Korea
Prior art keywords
input
transfer
register
priority
output device
Prior art date
Application number
KR1019970079123A
Other languages
Korean (ko)
Other versions
KR100257071B1 (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 KR1019970079123A priority Critical patent/KR100257071B1/en
Publication of KR19990058930A publication Critical patent/KR19990058930A/en
Application granted granted Critical
Publication of KR100257071B1 publication Critical patent/KR100257071B1/en

Links

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/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/18Handling requests for interconnection or transfer for access to memory bus based on priority control
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Bus Control (AREA)

Abstract

본 발명은 가장 높은 우선순위를 갖는 입/출력 디바이스가 메모리와의트랜스퍼 진행중에 일시적으로 우선순위를 변경하여 다음 우선순위를 갖는 입/출력 디바이스가 트랜스퍼동작을 수행할 수 있도록하여 프로그래머블하게 우선순위를 변경할 수 있는 DMA컨트롤러 및 이를 이용한 DMA요구신호 우선순위 변경방법을 제공하기 위한 것으로써, 복수개의 입/출력 디바이스들과 메모리와의 트랜스퍼(리드 및 라이트)에 있어서, 상기 복수개의 입/출력 디바이스로부터 입력되는 DMA요구신호들을 받아 우선순위를 결정하는 우선순위 결정부와, CPU와 입/출력 디바이스와 그리고 메모리간의 인터페이스를 담당하는 컨트롤 로직부와, 각 입/출력 다바이스들에 대한 트랜스퍼값을 저장하는 제 1 레지스터부와, 최대허용 트랜스퍼값을 저장하는 제 2 레지스터부와, 트랜스퍼를 위해 가장 높은 우선순위를 갖는 입/출력 디바이스에 대한 트랜스퍼값을 저장하는 임시 레지스터부와, 상기 제 2 레지스터부의 값과 현재 진행중인 트랜스퍼값을 비교하는 비교부와, 상기 현재 진행중인 트랜스퍼값이 상기 최대허용 트랜스퍼값보다 클 때, 상기 임시 레지스터부에 저장된 트랜스퍼값을 일시적으로 저장하는 제 3 레지스터부를 포함하여 구성되는 것을 특징으로 한다.The present invention allows the input / output device with the highest priority to temporarily change the priority during the transfer with the memory so that the input / output device with the next priority can perform the transfer operation so that the priority can be changed programmatically. In order to provide a DMA controller and a method for changing the DMA request signal priority using the same, a plurality of input / output devices and a memory (transfer and read) between the input, the input from the plurality of input / output devices A priority deciding unit configured to receive the DMA request signals to determine the priority, a control logic unit responsible for the interface between the CPU, the input / output device, and the memory, and a transfer value for each input / output device. A first register section, a second register section for storing a maximum allowable transfer value, A temporary register unit for storing a transfer value for an input / output device having a highest priority for spurs, a comparison unit for comparing a value of the second register unit with a transfer value currently in progress, and the current transfer value And a third register section for temporarily storing a transfer value stored in the temporary register section when larger than the maximum allowable transfer value.

Description

디엠에이(DMA)컨트롤러 및 이를 이용한 디엠에이(DMA)요구신호 우선순위 변경방법DMA controller and method for changing priority of DMA request signal using the same

본 발명은 디앰에이(DMA : Direct Memory Access)컨트롤러에 관한 것으로써, 특히 복수개의 입/출력소자들로부터 입력되는 DMA요구신호를 받아 우선순위를 결정함에 있어서 프로그래머블하게 변경할 수 있는 DMA 요구신호의 우선순위 결정함에 있어서 프로그래머를 변경할 수 있는 DMA 요구신호의 우선순위 변경방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a direct memory access (DMA) controller, and in particular, prioritizes a DMA request signal that can be changed programmatically in determining priority by receiving DMA request signals input from a plurality of input / output devices. It relates to a method of changing the priority of the DMA request signal that can change the programmer in ranking.

도 1은 종래 DMA컨트롤러의 구성블록도이다.1 is a block diagram of a conventional DMA controller.

도 1에 도시한 바와같이 복수개의 입/출력 디바이스들로부터 입력되는 DMA요구신호의 우선순위를 결정하는 컨트롤 로직부(11)와, 데이터버스를 통해 전달되는 데이터를 일시저장하는 데이터버퍼(12)와, 어드레스 버스를 통해 전달되는 데이터를 일시저장하는 데이터버퍼(12)와, 어드레스 버스를 통해 전달되는 어드레스를 일시저장하는 어드레스버퍼(13)와, 메모리의 스타트 어드레스를 저장하는 어드레스 레지스터(14)와, 메모리의 트랜스퍼 워드의 수를 저장하는 워드 카운트 레지스터(15)와, 리드 또는 라이트와 같은 트랜스퍼의 모드를 나타내는 컨트롤 레지스터(16)로 구성된다.As shown in FIG. 1, a control logic section 11 for determining the priority of DMA request signals input from a plurality of input / output devices, and a data buffer 12 for temporarily storing data transmitted through a data bus. A data buffer 12 for temporarily storing data transmitted through the address bus, an address buffer 13 for temporarily storing the address transmitted through the address bus, and an address register 14 for storing the start address of the memory. And a word count register 15 for storing the number of transfer words in the memory, and a control register 16 for indicating the mode of transfer such as read or write.

여기서, 상기 컨트롤 로직부(11)에는 CPU(도면에 도시되지 않음)로부터 DMA선택신호 및 레지스터 선택신호가 입력된다.Here, the control logic section 11 receives a DMA selection signal and a register selection signal from a CPU (not shown).

그리고 컨트롤 로직부(11)와 CPU간에는 리드신호 및 라이트신호를 주고받는다.In addition, a read signal and a write signal are exchanged between the control logic unit 11 and the CPU.

상기 컨트롤 로직부(11)는 상기 CPU로 버스사용을 요구하는 요구신호를 출력한다.The control logic unit 11 outputs a request signal for requesting bus use to the CPU.

상기 컨트롤 로직부(11)의 요구신호에 딸라 상기 CPU는 버스사용을 허락하는 승인신호를 컨트롤 로직부(11)로 출력한다.In response to the request signal from the control logic unit 11, the CPU outputs an acknowledgment signal for allowing the bus to be used to the control logic unit 11.

상기 컨트롤 로직부(11)는 DMA트랜스퍼(리드 또는 라이트)가 끝났을 때 CPU에게 인터럽트신호를 출력한다.The control logic unit 11 outputs an interrupt signal to the CPU when the DMA transfer (read or write) is finished.

그리고 입/출력 디바이스들은 상기 컨트롤 로직부(11)로 DMA요구신호를 출력한다.Input / output devices then output a DMA request signal to the control logic section 11.

따라서, 상기 컨트롤 로직부(11)는 입/출력 디바이스들로 DMA 인식신호를 출력한다.Thus, the control logic section 11 outputs a DMA recognition signal to input / output devices.

이와같이 구성된 종래 DMA컨트롤러의 동작을 설명하면 다음과 같다.The operation of the conventional DMA controller configured as described above is as follows.

도 1에 도시한 바와같이 입/출력을 디바이스들은 상기 컨트롤 로직부(11)로 DMA요구신호를 보낸다.As shown in FIG. 1, the devices send / receive a DMA request signal to the control logic unit 11.

따라서, 컨트롤 로직부(11)는 내부에 구성된 우선순위 로직부를 이용하여 우선순위를 결정한다.Accordingly, the control logic unit 11 determines the priority by using the priority logic unit configured therein.

이후, 상기 컨트롤 로직부(11)는 CPU로 버스사용을 요구하는 버스사용 요구신호를 출력한다.Thereafter, the control logic unit 11 outputs a bus use request signal for requesting bus use to the CPU.

이에 CPU는 DMA선택신호 및 레지스터 선택신호를 출력하고, 어드레스 버스를 통해 상기 어드레스 레지스터(14), 워드 카운트 레지스터(15) 그리고 컨트롤 레지스터(16)들을 선택한다.The CPU outputs a DMA selection signal and a register selection signal, and selects the address register 14, the word count register 15 and the control registers 16 through the address bus.

그리고, 상기 CPU로부터 컨트롤 로직부(11)로 입력되는 버스 승인신호가 "0"이면 상기 CPU는 데이터버스를 통해 리드 또는 라이트신호를 출력한다.When the bus acknowledgment signal input from the CPU to the control logic unit 11 is "0", the CPU outputs a read or write signal through the data bus.

이후, 상기 어드레스 레지스터(14), 워드 카운트 레지스터(15), 그리고 컨트롤 레지스터(16)에 리드 또는 라이트동작을 수행한다.Thereafter, a read or write operation is performed on the address register 14, the word count register 15, and the control register 16.

즉, CPU가 컨트롤 로직부(11)로 리드신호를 출력하면, 상기 어드레스 레지스터(14), 워드 카운트 레지스터(15), 그리고 컨트롤 레지스터(16)에 저장된 데이터(어드레스도 포함)를 리드한다.That is, when the CPU outputs a read signal to the control logic section 11, it reads the data (including the address) stored in the address register 14, the word count register 15, and the control register 16.

만일, 라이트신호를 출력하면 상기 데이터버퍼(12) 및 어드레스버퍼(13)에 저장된 데이터 및 어드레스를 상기 각각의 레지스터(14, 15, 16)에 라이트한다.If a write signal is outputted, data and addresses stored in the data buffer 12 and the address buffer 13 are written to the respective registers 14, 15 and 16.

여기서, 상기 CPU로부터 컨트롤 로직부(11)로 입력되는 버스 승인신호가 "1"이면, 상기 CPU는 버스 사용을 포기하고 컨트롤 로직부(11)는 메모리쪽으로 리드 또는 라이트신호와 더불어 어드레스를 출력한다.Here, when the bus acknowledgment signal input from the CPU to the control logic unit 11 is "1", the CPU abandons the use of the bus and the control logic unit 11 outputs an address along with a read or write signal to the memory. .

즉, 컨트롤 로직부(11)는 복수개의 입/출력 디바이스들에게 DMA인식신호를 출력한다.In other words, the control logic unit 11 outputs the DMA recognition signal to the plurality of input / output devices.

따라서, 상기 복수개의 입/출력 디바이스들(메모리도 포함)은 데이터버스를 통해 직접 데이터의 리드 또는 라이트를 수행한다.Thus, the plurality of input / output devices (including the memory) perform a read or write of data directly through the data bus.

이때 컨트롤 로직부(11)는 어드레스 레지스터(14)의 값을 증가시키고 카운트 레지스터(15)값을 감소시킨다.At this time, the control logic unit 11 increases the value of the address register 14 and decreases the value of the count register 15.

결국, 카운트 레이지스터(15)값이 "0"이되면, 컨트롤 로직부(11)는 더 이상의 트랜스퍼(리드 또는 라이트)를 하지 않고 CPU로 버스요구신호를 보내지 않는다.As a result, when the value of the count register 15 becomes " 0 ", the control logic section 11 does not send a bus request signal to the CPU without performing further transfer (lead or write).

마직막으로 컨트롤 로직부(11)는 상기 CPU로 인터럽트 신호를 출력하여 트랜스퍼의 종료를 알려준다.Finally, the control logic unit 11 outputs an interrupt signal to the CPU to inform the end of the transfer.

그러나 상기와 같은 종래 DMA컨트롤러 및 이를 이용한 DMA요구신호의 우선순위 변경방법은 다음과 같은 문제점이 있었다.However, the prior art DMA controller and the method of changing the priority of the DMA request signal using the same have the following problems.

컨트롤러 로직부에서 DMA요구신호의 우선순위를 결정하기 위해서는 이미 고정된 우선순위대로 우선순위를 부여하는 방식과, 각 입/출력 디바이스에게 순차적으로 우선순위를 부여하는 방식을 사용한다.In order to determine the priority of the DMA request signal in the controller logic unit, a priority is given according to a fixed priority and a method of sequentially giving priority to each input / output device.

따라서, 임의의 입/출력 디바이스가 높은 우선순위를 가지고 있는 경우에는 상기 디바이스의 트랜스퍼 도중에는 다른 디바이스는 전혀 트랜스퍼 동작을 할 수가 없다.Thus, when any input / output device has a high priority, no other device can transfer at all during the transfer of the device.

예를들어, 비슷한 우선순위를 갖는 경우, 조금 더 높은 우선순위를 가진 입/출력 디바이스가 많은 양의 데이터 트랜스퍼를 요구하게 되면, 더 낮은 우선순위를 가진 입/출력을 디바이스를 상기 조금 높은 우선순위를 갖는 입/출력 디바이스의 트랜스퍼 동작이 모두 완료될 때까지 기다려야 한다.For example, with similar priorities, if an input / output device with a slightly higher priority requires a large amount of data transfer, then the device with a higher priority should be assigned a device with a lower priority. It must wait until all transfer operations of the input / output device with.

본 발명은 상기와 같은 문제점을 해결하기 위해 안출한 것으로써, 데이터 트랜스퍼에 있어서, 우선순위가 높은 입/출력 디바이스의 트랜스퍼가 수행되는 도중에도 경우에 따라서는 우선순위가 낮은 입/출력 디바이스도 트랜스퍼 동작을 수행할 수 있도록 하는데 적당한 DMA컨트롤러 및 이를 이용한 DMA요구신호의 우선순위 변경방법을 제공하는데 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and in some cases, even during the transfer of the high priority input / output device in the data transfer, the low priority input / output device may also be transferred. An object of the present invention is to provide a DMA controller suitable for performing an operation and a method for changing the priority of a DMA request signal using the same.

도 1은 종래기술에 따른 DMA컨트롤러의 구성도1 is a block diagram of a DMA controller according to the prior art

도 2는 본 발명의 DMA컨트롤러의 구성도2 is a block diagram of a DMA controller of the present invention

도 3은 본 발명의 DMA컨트롤러를 이용한 DMA요구신호 우선순위 변경방법을 설명하기 위한 플로우챠트3 is a flowchart illustrating a method of changing the priority of a DMA request signal using the DMA controller of the present invention.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

21 : 우선순위 결정부 22 : 컨트롤 로직부21: priority determination section 22: control logic section

23 : 제 1 레지스터부 24 : 임시 레지스터부23: first register section 24: temporary register section

25 : 제 2 레지스터부 26 : 제 3 레지스터부25: second register portion 26: third register portion

27 : 비교부27: comparison unit

상기의 목적을 달성하기 위한 본 발명의 DMA컨트롤러는 복수개의 입/출력 디바이스들과 메모리와의 트랜스퍼(리드 및 라이트)에 있어서, 상기 복수개의 입/출력 디바이스로부터 입력되는 DMA요구신호들을 받아 우선순위를 결정하는 우선순위 결정부와, CPU와 입/출력 디바이스와 그리고 메모리간의 인터페이스를 담당하는 컨트롤로직부와, 각 입/출력 디바이스들에 대한 트랜스퍼값을 저장하는 제 1 레지스터부와, 최대허용 트랜스퍼값을 저장하는 제 2 레지스터부와, 트랜스퍼를 위해 가장 높은 우선순위를 갖는 입/출력 디바이스에 대한 트랜스퍼값을 저장하는 임시 레지스터부와, 상기 제 2 레지스터부의 값과 현재 진행중인 트랜스퍼값을 비교하는 비교부와, 사기 현재 진행중인 트랜스퍼값이 상기 최대허용 트랜스퍼값보다 클 때, 상기 임시 레지스터부에 저장된 트랜스퍽ㅄ을 일시적으로 저장하는 제 3 레지스터부를 포함하여 구성되고 본 발명의 DMA컨트롤러를 이용한 DMA요구신호의 우선순위변경방법은 복수개의 입/출력 디바이스들로부터 입력된 DMA요구신호에 대해 우선순위를 결정한 후, 가장 높은 우선순위를 갖는 입/출력 디바이스의 트랜스퍼값을 임시 레지스터부로 저장하는 스텝과, 상기 가장 높은 우선순위를 갖는 입/출력 디바이스와 메모리와의 트랜스퍼 동작을 수행하는 스텝과, 현재의 트랜스퍼값과 미리 설정한 최대허용 트랜스퍼값을 비교하여 현재의 트랜스퍼값이 크면, 진행중인 트랜스퍼동작을 일시중지하고, 다음 우선순위를 갖는 입/출력 디바이스와 메모리와의 트랜스퍼동작을 수행하는 스텝과, 상기 다음 우선순위를 갖는 입/출력 디바이스와의 트랜스퍼가 완료되면, 상기 일시중지했던 최초의 입/출력 디바이스의 트랜스퍼 동작을 연속하여 수행하는 스텝을 포함하여 이루어지는 것을 특징으로 한다.In order to achieve the above object, the DMA controller of the present invention receives priority of DMA request signals input from the plurality of input / output devices in transfer (lead and write) between a plurality of input / output devices and a memory. A prioritization unit for determining the control unit, a control logic unit in charge of the interface between the CPU and the input / output device and the memory, a first register unit for storing transfer values for each input / output device, and a maximum allowable transfer. A second register portion for storing a value, a temporary register portion for storing a transfer value for the input / output device having the highest priority for transfer, and a comparison comparing the value of the second register portion with the ongoing transfer value The temporary register when the current transfer value is greater than the maximum allowed transfer value. A method of changing the priority of a DMA request signal using a DMA controller of the present invention, comprising a third register unit for temporarily storing a transucket stored in the prior art, gives priority to DMA request signals input from a plurality of input / output devices. After determining the rank, storing a transfer value of the input / output device having the highest priority in a temporary register unit, performing a transfer operation between the input / output device having the highest priority and a memory; Comparing the current transfer value with the preset maximum allowable transfer value, if the current transfer value is large, the step of pausing the ongoing transfer operation and performing transfer operation between the input / output device and the memory having the next priority and When the transfer with the input / output device having the next priority is completed, the temporary The transfer operation of the first input / output devices which support is characterized in that comprising the step of performing in succession.

이하, 본 발명에 따른 DMA컨트롤러 및 이를 이용한 DMA요구신호 우선순위 변경방법을 첨부된 도면을 참조하여 설명하기로 한다.Hereinafter, a DMA controller and a method of changing priority of a DMA request signal using the same according to the present invention will be described with reference to the accompanying drawings.

도 2는 본 발명에 따른 DMA컨트롤러의 구성블록도이다.2 is a block diagram of a DMA controller according to the present invention.

도 2에 도시한 바와같이 입/출력 디바이스가 욕되는 DMA요구신호에 대해 우선순위를 결정하는 우선순위 결정부(21)와, CPU(도시되지 않음)와 입/출력 디바이스와 그리고 메모리간의 인터페이스를 담당하는 컨트롤 로직부(22)와, 각 디바이스들에 대한 스타트 어드레스, 트랜스퍼 수, 그리고 트랜스퍼모드를 저장하고 있는 제 1 레지스터부(23)와, 현재 진행중인 트랜스퍼값을 저장하는 임시 레지스터부(24)와, 최대허용 트랜스퍼 수를 저장하고 있는 제 2 레지스터부(25)와, 상기 현재 진행중인 트랜스퍼값이 최대허용 트랜스퍼값보다 클때 현재 진행중인 트랜스퍼값들을 일시적으로 저장하는 제 3 레지스터부(26)와, 상기 제 2 레지스터부(25)에 저장된 최대허용 트랜스퍼 수와 현재까지 트랜스퍼된 수를 비교하는 비교부(27)를 포함하여 구성된다.As shown in FIG. 2, an interface between the priority determining unit 21 which determines the priority of the DMA request signal that the input / output device desires, the CPU (not shown), the input / output device, and the memory is shown. The control logic section 22 in charge, the first register section 23 storing the start address, the number of transfers, and the transfer mode for each device, and the temporary register section 24 storing the current transfer value. A second register section 25 storing a maximum allowable transfer number, a third register section 26 temporarily storing current transfer values when the current transfer value is greater than the maximum allowable transfer value, and And a comparison unit 27 for comparing the maximum allowable transfer number stored in the second register unit 25 with the number transferred up to now.

여기서, 상기 제 1, 제 3 레지스터부(23, 26), 그리고 임시 레지스터부(24)는 각각 어드레스 레지스터(23a, 24a, 25a)와 카운트 레지스터(23b, 24b, 25b)와, 그리고 컨트롤 레지스터(23c, 24c, 25c)로 구성된다.Here, the first and third register parts 23 and 26 and the temporary register part 24 respectively include address registers 23a, 24a and 25a, count registers 23b, 24b and 25b, and a control register ( 23c, 24c, 25c).

상기 제 1 레지스터부(23)에는 각 입/출력 디바이스들의 레지스터값들이 저장된다.The first register unit 23 stores register values of respective input / output devices.

그리고 임시 레지스터부(24)에는 우선순위가 높은 입/출력 디바이스의 레지스터값이 저장된다.The temporary register section 24 stores the register values of the input / output devices with high priority.

즉, 메모리의 스타트 어드레스, 트랜스퍼 모드, 그리고, 트랜스퍼 수를 저장한다.That is, the start address of the memory, the transfer mode, and the number of transfers are stored.

그리고, 제 3 레지스터부(26)에는 현재까지 트랜스퍼된 숙 제 2 레지스터(25)에 저장된 트랜스퍼 수보다 클 경우, 상기 임시 레지스터부924)의 값을 일시 저장한다.The third register section 26 temporarily stores the value of the temporary register section 924 when it is larger than the number of transfers stored in the second register 25 transferred to date.

이와같이 구성된 본 발명의 본 발명의 DMA컨트롤러 및 이를 이용한 DMA요구신호의 우선순위 변경방법을 도 3을 참조하여 설명하기로 한다.The DMA controller of the present invention configured as described above and the method for changing the priority of the DMA request signal using the same will be described with reference to FIG.

도 3은 본 발명의 DMA컨트롤러를 이용한 우선순위 변경방법을 설명하기 위한 공정단면도이다.3 is a process sectional view for explaining a priority change method using the DMA controller of the present invention.

도 3에 도시한 바와같이, 복수개의 입/출력 디바이스들이 우선순위 결정부로 DMA요구신호를 보내다(S301).As shown in FIG. 3, a plurality of input / output devices send a DMA request signal to the priority determining unit (S301).

우선순위 결정부는 내부에 설정된 우선순위에 따라 우선순위를 결정하고, DMA컨트롤러는 CPU에게 버스사용 요구신호를 보낸다(S302).The priority determining unit determines the priority according to the priority set therein, and the DMA controller sends a bus use request signal to the CPU (S302).

이에 CPU는 제 1 레지스터부에 저장된 가장 높은 우선순위를 갖는 입/출력 디바이스의 레지스터의 값(즉, 스타트 어드레스, 트랜스퍼 수, 그리고 트랜스퍼 모드)를 임시 레지스터부로 저장한다(S303).The CPU stores the value (ie, start address, number of transfers, and transfer mode) of the register of the input / output device having the highest priority stored in the first register unit as a temporary register unit (S303).

그리고 CPU는 해당 입/추력 디바이스로 버스사용 승인신호를 보내고(S304), DMA컨트롤러는 해당 입/출력 디바이스에게 데이터를 보내도 좋다는 것을 알리는 신호를 보낸다(S305).The CPU sends a bus use approval signal to the input / thrust device (S304), and the DMA controller sends a signal indicating that the data may be sent to the input / output device (S305).

그리고 CPU는 해당 입/출력 디바이스로 버스사용 승인신호를 보내고(S304), DMA컨트롤러는 해당 입/출력 디바이스에게 데이터를 보내도 좋다는 것을 알리는 신호를 보낸다(S305).The CPU sends a bus use approval signal to the input / output device (S304), and the DMA controller sends a signal indicating that the data may be sent to the input / output device (S305).

이에따라 해당 입/출력 디바이스는 메모리에 데이터를 라이트(write)하든지 또는 리드(read)한다(S306).Accordingly, the input / output device writes or reads data in the memory (S306).

예를들어, 임의의 입/출력 디바이스가 메모리의 0002에서부터 1112까지 데이터를 라이트하고자 할 경우, 상기 CPU는 해당 입/출력 디바이스의 레지스터값을 임시 레지스터부에 저장한다.For example, if any input / output device wants to write data from 000 2 to 111 2 in memory, the CPU stores the register value of the input / output device in a temporary register.

즉, 임시 레지스퍼부의 어드레스 레지스터에 메모리의 스타트 어드레스인 0002를 셋팅시키고, 카운트 레지스터에는 8(1112)을 셋팅시킨다.That is, setting the start address of the second memory 000 to the temporary register and the buffer section address register, the count register is then set to 8 (111 2).

그리고, 상기 컨트롤 레지스터에는 라이트 모드임을 알리는 1(또는 0)을 셋팅시킨다.The control register 1 is set to 1 (or 0) indicating the write mode.

이와같이, 우선순위가 높은 입/출력 디바이스의 레지스터값이 임시 레지스터부에 저장되면, 해당 입/출력 디바이스와 메모리간의 DMA가 수행된다.In this way, when the register value of the high priority input / output device is stored in the temporary register section, DMA between the corresponding input / output device and the memory is performed.

이때, 상기 임시 레지스터부의 어드레스 레지스터는 데이터가 메모리에 라이트 될 때마다 하나씩 증가하게 되고, 카운트 레지스터는 하나씩 감소하게 된다(S307).At this time, the address register of the temporary register unit increases by one each time data is written to the memory, and the count register decreases by one (S307).

상기와 같이, 메모리에 데이타가 라이트될 때마다 어드레스 레지스터와 카운트 레지스터는 증감을 계속하게 되는데 이때 비교부는 현재의 트랜스퍼 수와 상기 제 2 레지스터부에 설정된 최대허용 트랜스퍼 수를 비교한다(S308).As described above, each time data is written to the memory, the address register and the count register continue to increase and decrease. At this time, the comparison unit compares the current transfer number with the maximum allowable transfer number set in the second register unit (S308).

비교결과, 현재 트랜스퍼 수가 제 2 레지스터부에 설정된 최대허용 트랜스퍼 수보다 작으면 계속하여 트랜스퍼 동작을 수행하고(S305), 현재 트랜스퍼 수가 제 2 레지스터에 설정된 트랜스퍼 수보다 크면, DMA컨트롤러는 CPU에게 인터럽트를 발생한다(S309).As a result of the comparison, if the current number of transfers is less than the maximum allowable number of transfers set in the second register unit, the transfer operation continues to be performed (S305). Occurs (S309).

그리고, 현재의 트랜스퍼값(즉, 임시 레지스터부에 저장된 트랜스퍼값)을 제 3 레지스터부로 저장한다(S310).The current transfer value (that is, the transfer value stored in the temporary register unit) is stored in the third register unit (S310).

즉, 제 2 레지스터에 설정된 최대허용 트랜스퍼값이 5(1002)일 경우, 현재 데이터를 라이트하고 있는 상태라고 하면, 현재 라이트동작을 중단하고, 다음 우선순위를 갖는 입/출력 디바이스의 트랜스퍼동작을 수행한다.That is, if the maximum allowable transfer value set in the second register is 5 (100 2 ), and the current data is being written, the current write operation is interrupted and the transfer operation of the input / output device having the next priority is stopped. Perform.

이를 위해, 현재 트랜스퍼 되고 있는 메모리의 어드레스(1012)를 제 2 레지스터부의 어드레스 레이지스터에 저장하고, 현재의 트랜스퍼 수(6 : 1012)를 카운트 레지스터에 저장한다.For this purpose, the address 101 2 of the memory currently being transferred is stored in the address register of the second register section, and the current transfer number 6: 101 2 is stored in the count register.

그리고, 현재 라이트동작이었으므로 상기 컨트롤 레지스터에는 1(또는 0)을 저장한다.Since the write operation is currently performed, 1 (or 0) is stored in the control register.

이와같이, 현재 진행중인 트랜스퍼값을 제 3 레지스터부에 저장하였으면(S310), 다음 우선순위를 갖는 입/출력 디바이스가 트랜스퍼 동작을 수행한다(S311).As such, when the current transfer value is stored in the third register unit (S310), the input / output device having the next priority performs the transfer operation (S311).

이와같이 다음 우선순위를 갖는 입/출력 디바이스의 트랜스퍼 동작이 완료되었는지를 판단하여(S312), 완료되었으면 상기 제 3 레지스터부에 저장되었던 트랜스퍼값을 다시 임시 레지스터부에 저장하고(S313), 이후의 최초 입/출력 디바이스의 트랜스퍼 동작을 계속하게 된다(S314).In this way, it is determined whether the transfer operation of the input / output device having the next priority is completed (S312), and when the transfer operation is completed, the transfer value stored in the third register unit is stored again in the temporary register unit (S313), and then the first The transfer operation of the input / output device is continued (S314).

즉, 카운트 레지스터의 값이 0(0002)이 될 때까지 최초의 입/출력 디바이스는 메모리에 데이터를 라이트하게 된다.In other words, the first input / output device writes data to the memory until the value of the count register becomes 0 (000 2 ).

이상 상술한 바와같이, 본 발명의 DMA컨트롤러 및 이를 이용한 DMA요구신호의 우선순위 변경방법은 최대허용 트랜스퍼 수를 설정한 후, 현재의 트랜스퍼 수와 비교하여 그 결과에 따라 우선순위를 변경할 수 있다.As described above, in the DMA controller of the present invention and the method for changing the priority of the DMA request signal using the same, after setting the maximum allowable number of transfers, the priority can be changed according to the result compared with the current number of transfers.

즉, 가장 높은 우선순위를 갖는 입/출력 디바이스의 트랜스퍼동작을 잠시 중단하고 다음 우선순위를 갖는 입/출력 디바이스의 트랜스퍼 동작을 수행할 수 있으므로 다수의 입/출력 디바이스들의 우선순위를 프로그래머블하게 변경시킬 수 있는 효과가 있다.That is, the transfer operation of the input / output device having the highest priority can be interrupted for a while and the transfer operation of the input / output device having the next priority can be performed. It can be effective.

Claims (6)

복수개의 입/출력 디바이스들과 메모리와의 트랜스퍼(리드 및 라이트)에 있어서, 상기 복수개의 입/출력 디바이스로부터 입력되는 DMA요구신호들을 받아 우선순위를 결정하는 우선순위 결정부와, CPU와 입/출력 디바이스와 그리고 메모리간의 인터페이스를 담당하는 컨트롤 로직부와, 각 입/출력 디바이스들에 대한 트랜스퍼값을 저장하는 제 1 레지스터부와, 최대허용 트랜스퍼값을 저장하는 제 2 레지스터부와, 트랜스퍼를 위해 가장 높은 우선순위를 갖는 입/출력 디바이스에 대한 트래스퍼값을 저장하는 임시 레지스터부와, 상기 제 2 레지스터부의 값과 현재 진행중인 트랜스퍼값을 비교하는 비교부와, 상기 현재 진행중인 트랜스퍼값이 상기 최대허용 트랜스퍼값보다 클 때, 상기 임시 레지스터부에 저장된 트랜스퍼값을 일시적으로 저장하는 제 3 레지스터부를 포함하여 구성되는 것을 특징으로 하는 DMA컨트롤러.In the transfer (read and write) between a plurality of input / output devices and a memory, a priority determining unit for receiving the DMA request signals input from the plurality of input / output devices to determine the priority, CPU and input / output A control logic portion responsible for the interface between the output device and the memory, a first register portion for storing transfer values for each input / output device, a second register portion for storing a maximum allowable transfer value, and for transfer A temporary register section for storing a transfer value for an input / output device having a highest priority, a comparison section for comparing a value of the second register section with a transfer value currently in progress, and the current transfer value being the maximum allowable value. A third level for temporarily storing a transfer value stored in the temporary register section when larger than a transfer value DMA controller, characterized in that configured to include a jitter unit. 제 1 항에 있어서, 상기 제 1, 제 3 레지스터부, 그리고 임시 레지스터부는 각각 어드레스 레지스터, 카운트 레지스터, 컨트롤 레지스터로 구성되는 것을 특징으로 하는 DMA컨트롤러.The DMA controller of claim 1, wherein the first register, the third register, and the temporary register are composed of an address register, a count register, and a control register, respectively. 제 2 항에 있어서, 상기 어드레스 레지스터는 현재 트랜스퍼중인 메모리의 어드레스를 저장하고, 상기 카운트 레지스터는 현재까지 트랜스퍼된 수를 저장하고, 상기 컨트롤러 레지스터는 현재의 트랜스퍼모드를 저장하는 것을 특징으로 하는 DMA컨트롤러.The DMA controller of claim 2, wherein the address register stores an address of a memory currently being transferred, the count register stores a number transferred to the present, and the controller register stores a current transfer mode. . 복수개의 입/출력 디바이스들로부터 입력된 DMA요구신호에 대해 우선순위를 결정한 후, 가장 높은 우선순위를 갖는 입/출력 디바이스의 트랜스퍼값을 임시 레지스터부로 저장하는 스텝과, 상기 가장 높은 우선순위를 갖는 입/출력 디바이스와 메모리와의 트랜스퍼 동작을 수행하는 스텝과, 현재의 트랜스퍼값과 미리 설정한 최대허용 트랜스퍼값을 비교하여 현재의 트랜스퍼값이 크면, 진행중인 트랜스퍼동작을 일시중지하고, 다음 우선순위를 갖는 입/출력 디바이스와 메모리와의 트랜스퍼동작을 수행하는 스텝과, 상기 다음 우선순위를 갖는 입/출력 디바이스의 트랜스퍼가 완료되면, 상기 일시중지했던 최초의 입/추력 디바이스의 트랜스퍼 동작을 연속하여 수행하는 스텝을 포함하여 이루어지는 것을 특징으로 하는 DMA요구신호 우선순위 변경방법.Determining priorities of the DMA request signals input from the plurality of input / output devices, and storing transfer values of the input / output devices having the highest priority in a temporary register unit, and having the highest priority; In the step of performing transfer operation between the input / output device and the memory and comparing the current transfer value with the preset maximum allowable transfer value, if the current transfer value is large, the ongoing transfer operation is paused and the next priority is set. Performing a transfer operation between the input / output device having a memory and a memory; and when the transfer of the input / output device having the next priority is completed, the transfer operation of the paused first input / output device is continuously performed. And a step of performing a DMA request signal priority change. 제 4 항에 있어서, 상기 현재의 트랜스퍼값과 미리 설정한 최대허용 트랜스퍼값을 비교한 결과, 현재의 트래스퍼값이 더 작으면, 계속하여 트랜스퍼 동작을 수행하는 스텝을 더 포함하는 것을 특징으로 하는 DMA요구신호 우선순위 변경방법.The method of claim 4, further comprising: performing a transfer operation if the current transfer value is smaller as a result of comparing the current transfer value with a preset maximum allowable transfer value. How to change DMA request signal priority. 제 4 항에 있어서, 상기 트랜스퍼값은 메모리의 스타트 어드레스와, 트랜스퍼 수와, 그리고 트래스퍼모드를 포함하는 것을 특징으로 하는 DMA요구신호 우선순위 변경방법.5. The method of claim 4, wherein the transfer value comprises a start address of a memory, a number of transfers, and a tracer mode.
KR1019970079123A 1997-12-30 1997-12-30 Dma controller and method for aternating priority of dma request signal by using the same KR100257071B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019970079123A KR100257071B1 (en) 1997-12-30 1997-12-30 Dma controller and method for aternating priority of dma request signal by using the same

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019970079123A KR100257071B1 (en) 1997-12-30 1997-12-30 Dma controller and method for aternating priority of dma request signal by using the same

Publications (2)

Publication Number Publication Date
KR19990058930A true KR19990058930A (en) 1999-07-26
KR100257071B1 KR100257071B1 (en) 2000-05-15

Family

ID=19530035

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019970079123A KR100257071B1 (en) 1997-12-30 1997-12-30 Dma controller and method for aternating priority of dma request signal by using the same

Country Status (1)

Country Link
KR (1) KR100257071B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100484304B1 (en) * 2002-11-14 2005-04-20 한국전자통신연구원 Method for determining bus master priority in direct memory access controller

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002041445A (en) 2000-05-19 2002-02-08 Matsushita Electric Ind Co Ltd Highly efficient dma controller

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100484304B1 (en) * 2002-11-14 2005-04-20 한국전자통신연구원 Method for determining bus master priority in direct memory access controller

Also Published As

Publication number Publication date
KR100257071B1 (en) 2000-05-15

Similar Documents

Publication Publication Date Title
EP0464615B1 (en) Microcomputer equipped with DMA controller
US6581119B1 (en) Interrupt controller and a microcomputer incorporating this controller
JP2000047974A (en) Bus arbitrating method of bus controller, bus controller, and system of electronic equipment
JPH04363746A (en) Microcomputer system having dma function
US5444852A (en) I/O device interface having buffer mapped in processor memory addressing space and control registers mapped in processor I/O addressing space
US6292853B1 (en) DMA controller adapted for transferring data in two-dimensional mapped address space
KR100257071B1 (en) Dma controller and method for aternating priority of dma request signal by using the same
US20050135402A1 (en) Data transfer apparatus
US7076641B2 (en) Programmable controller
JPH01125644A (en) Data transfer equipment
JPH06131294A (en) Data transfer device
KR100382939B1 (en) Communication control method and apparatus for slave cpu
JPH0443302B2 (en)
JPH11175464A (en) Arbitrating device and method therefor
KR920008225B1 (en) Memory control circuit and method for storing display character
JP3266610B2 (en) DMA transfer method
JP2635863B2 (en) Central processing unit
JPH11175396A (en) Memory access controller and storage medium
JPH09160786A (en) Microprocessor
JPH06314249A (en) Data transfer equipment
KR19980050038A (en) Interface chip and internal register access method of interface chip
JPS63292355A (en) Control system for dma transfer
JPH06110828A (en) Memory controller
JPH0589028A (en) Information processor
JPH04303247A (en) Microcomputer device

Legal Events

Date Code Title Description
A201 Request for examination
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20050124

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee