KR19990080283A - How to transfer data between FIFO and memory - Google Patents

How to transfer data between FIFO and memory Download PDF

Info

Publication number
KR19990080283A
KR19990080283A KR1019980013414A KR19980013414A KR19990080283A KR 19990080283 A KR19990080283 A KR 19990080283A KR 1019980013414 A KR1019980013414 A KR 1019980013414A KR 19980013414 A KR19980013414 A KR 19980013414A KR 19990080283 A KR19990080283 A KR 19990080283A
Authority
KR
South Korea
Prior art keywords
data
memory
fifo
dma controller
unit
Prior art date
Application number
KR1019980013414A
Other languages
Korean (ko)
Inventor
이혁진
Original Assignee
유기범
대우통신 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 유기범, 대우통신 주식회사 filed Critical 유기범
Priority to KR1019980013414A priority Critical patent/KR19990080283A/en
Publication of KR19990080283A publication Critical patent/KR19990080283A/en

Links

Classifications

    • 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/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • 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/24Handling requests for interconnection or transfer for access to input/output bus using interrupt
    • 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

본 발명은 FIFO와 메모리, FIFO와 메모리 사이의 데이터 전송을 제어하는 DMA 제어기, 및 DMA 제어기를 제어하는 프로세서를 포함하는 임의의 디지털 데이터 처리 장치에 있어서, FIFO와 메모리 간에 데이터를 전송하는 방법에 관한 것이다.The present invention relates to any digital data processing apparatus comprising a FIFO and a memory, a DMA controller for controlling the data transfer between the FIFO and the memory, and a processor for controlling the DMA controller, the present invention relates to a method for transferring data between the FIFO and the memory. will be.

본 발명에 따른 메모리로부터 FIFO로의 데이터 전송방법은 프로세서부가 데이터의 크기와 이 데이터가 저장되어 있는 메모리의 시작주소를 기록하는 단계, DMA 제어기를 구동 시키는 단계, DMA 제어기가 메모리로부터 데이터를 읽어 FIFO부에 쓰는 메모리-FIFO 전송단계, DMA 제어기가 모든 데이터가 전송되었는지 조사하여, 전송할 데이터가 더 남아있는가에 따라 메모리-FIFO 전송단계로 되돌아가거나, 데이터 전송의 종료를 프로세서부에게 알려주는 종료 단계로 이루어진다.In the data transmission method from the memory to the FIFO according to the present invention, the processor unit writes the size of the data and the start address of the memory in which the data is stored, driving the DMA controller, and the DMA controller reads data from the memory. Memory-FIFO transfer step, the DMA controller checks whether all data has been transferred, and returns to the memory-FIFO transfer step depending on whether there is more data to be transferred, or the termination step notifies the processor unit of the end of data transfer. .

또한, FIFO로부터 메모리로의 데이터 전송방법은 DMA 제어기가 FIFO부로 데이터가 쓰여질 때마다, 현재 입력 데이터의 다음 비트(데이터 종료 비트)를 임의의 논리값으로 세팅하는 단계, 데이터를 전송할 메모리의 시작주소를 기록하는 단계, DMA 제어기 구동명령을 내리는 단계, DMA 제어기가 FIFO부로부터 순서대로 데이터를 읽어, 메모리에 입력시키는 FIFO-메모리 전송단계, 및 DMA 제어기는 데이터 종료 비트를 조사하여 FIFO-메모리 전송단계로 되돌아가거나, 인터럽트 신호를 발생시켜 프로세서부에게 알려주는 인터럽트 단계로 이루어진다.In addition, the data transfer method from the FIFO to the memory, each time the DMA controller writes data to the FIFO unit, setting the next bit (data end bit) of the current input data to an arbitrary logical value, the start address of the memory to transfer the data A FIFO-memory transfer step in which the DMA controller reads data from the FIFO unit in order and inputs the data into the memory, and the DMA controller examines the data end bits to transmit the FIFO-memory transfer step. It returns to or to generate an interrupt signal to inform the processor section is an interrupt step.

Description

FIFO와 메모리 사이의 데이터 전송방법(Data transfer method between a FIFO and a memory)Data transfer method between a FIFO and a memory

본 발명은 디지털 데이터 기억장치 사이에서의 데이터 전송방법에 관한 것으로서, 특히 FIFO와 메모리 사이에서 DMA 제어기(Direct Memory Access controller)를 이용하여 서로 데이터를 주고받는 방법, 즉 FIFO와 메모리 사이의 데이터 전송방법에 관한 것이다.BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data transfer method between digital data storage devices, and more particularly, to a method of transferring data between a FIFO and a memory using a direct memory access controller (DMA), that is, a data transfer method between a FIFO and a memory. It is about.

도 1은 일반 컴퓨터 시스템에서 DMA 제어기를 사용하여 데이터를 전송하는 것에 관한 개요도이다. 보통 DMA를 사용한 데이터 전송은 메모리(120)로부터 하드 디스크 드라이브(130)와 같은 데이터 기억 장소로 다량의 데이터를 이동시키거나, 하드 디스크 드라이브(130)로부터 메모리(120)로, 혹은 두 메모리 사이에서 다량의 데이터를 이동시킬 때, 불필요한 단계를 거치지 않도록 하여, 효율적 데이터 이동을 실현시키기 위해 사용된다.1 is a schematic diagram of transferring data using a DMA controller in a general computer system. Data transfer, usually using DMA, moves large amounts of data from memory 120 to a data storage location, such as hard disk drive 130, or from hard disk drive 130 to memory 120, or between two memories. When moving a large amount of data, it is used to realize efficient data movement by avoiding unnecessary steps.

이 때, 중앙처리장치(140:CPU)는 DMA 요구가 있으면, DMA 제어기(110)에게 DMA 처리를 지시하게 되고, 이 지시를 받은 DMA 제어기(110)는 임의의 두 장치 사이에서의 데이터 이동을 수행한다. 그리고 데이터 이동이 종료하면, 데이터의 이동이 종료하였음을 CPU(140)에게 보고한다.At this time, the central processing unit 140 (CPU) instructs the DMA controller 110 to perform DMA processing when there is a DMA request, and the DMA controller 110 which received this instruction performs data movement between any two devices. Perform. When the data movement ends, the CPU 140 reports that the movement of data has ended.

그러나, 이런 DMA를 이용한 데이터 전송은 위에서 설명한 바와 같이, 메모리와 메모리 사이, 혹은 하드디스크 드라이브(130)와 같은 데이터 저장장치와 메모리 (120)사이에서 만이 아니라, FIFO와 메모리 사이에서도 수행되어야 한다.However, such data transfer using DMA should be performed not only between the memory and the memory, or between the data storage device such as the hard disk drive 130 and the memory 120, but also between the FIFO and the memory as described above.

도 2는 임의의 두 지점간의 데이터 통신에 관한 개요도로서, 제 1 데이터 송수신 장치(210)와 제 2 데이터 송수신 장치(220)는 임의의 데이터 처리장치(300)를 통하여 데이터를 주고 받는다. 이 때, 데이터 처리부(300)를 통하여 데이터를 주고 받는 이유는 여러 가지가 있을 수 있으나, 그 한 예로는 제 1 데이터 송수신 장치(210)의 데이터 처리 속도와 제 2 데이터 송수신 장치(220)의 데이터 처리 속도가 서로 다른 경우이다. 또한 다른 예로는 제 1 데이터 송수신 장치(210)와 제 2 데이터 송수신 장치(220)가 사용하는 데이터 구조가 서로 달라서 어느 한 쪽의 송신 데이터를 상대편에서 사용하는 데이터 구조로 변환하여, 순서대로 전달할 필요가 있는 경우이다.2 is a schematic diagram of data communication between two arbitrary points, wherein the first data transmission / reception device 210 and the second data transmission / reception device 220 exchange data via an arbitrary data processing device 300. In this case, there may be various reasons for exchanging data through the data processing unit 300. For example, the data processing speed of the first data transmitting and receiving device 210 and the data of the second data transmitting and receiving device 220 may be used. The processing speed is different. In another example, since the data structures used by the first data transmission / reception device 210 and the second data transmission / reception device 220 are different from each other, it is necessary to convert either transmission data into a data structure used by the other party and deliver them in order. If there is.

위에서 설명한 예와 같은 상황에서 데이터 처리부(300)는 보통 FIFO와 메모리를 포함하여 구성되는데, 메모리는 변환시킬 데이터를 저장하기 위하여 사용되며, FIFO는 메모리로부터 받은 데이터, 혹은 메모리로 보낼 데이터를 입력받은 후, 순서대로 출력하기 위하여 사용된다.In the situation described above, the data processing unit 300 generally includes a FIFO and a memory. The memory is used to store data to be converted, and the FIFO receives data received from the memory or data to be sent to the memory. After that, it is used to output in order.

이와 같이 FIFO와 메모리가 사용되는 경우, 위에서 설명한 메모리와 메모리, 혹은 메모리와 하드 디스크 드라이브 사이에서와 같이 DMA 제어기를 이용하여 효율적인 데이터 송수신을 수행할 필요성이 있다.When the FIFO and the memory are used as described above, it is necessary to perform efficient data transmission and reception using the DMA controller as in the above-described memory and memory, or between the memory and the hard disk drive.

이에 본 발명은 상기와 같은 필요성에 부응하기 위하여 안출된 것으로서, DMA 제어기를 이용하여 FIFO와 메모리 사이에서 효율적으로 데이터를 주고 받는 방법을 제공하는데 그 목적이 있다.Accordingly, an object of the present invention is to provide a method for efficiently exchanging data between a FIFO and a memory using a DMA controller.

상기와 같은 목적을 달성하기 위하여, 본 발명에 따른 FIFO와 메모리 사이의 데이터 전송방법은 메모리로부터 FIFO로의 데이터 전송방법과 FIFO로부터 메모리로의 데이터 전송방법으로 이루어진다.In order to achieve the above object, the data transfer method between the FIFO and the memory according to the present invention comprises a data transfer method from the memory to the FIFO and a data transfer method from the FIFO to the memory.

메모리로부터 FIFO로의 데이터 전송방법은 임의의 디지털 데이터 기억공간을 가지는 FIFO부와 메모리, FIFO부와 메모리 사이의 데이터 전송을 제어하는 DMA 제어기, 및 DMA 제어기를 제어하는 프로세서부를 포함하여 구성된 임의의 디지털 데이터 처리 장치에 있어서, 프로세서부가 FIFO부로 전송될 메모리에 있는 데이터의 크기와 이 데이터가 저장되어 있는 메모리의 시작주소를 소정의 기억장소에 기록하는 기록단계; 프로세서부가 DMA 제어기로 데이터 전송 시작 명령을 내리는 전송명령단계; 데이터 전송 시작 명령을 받은 DMA 제어기가 소정의 기억장소에 기록된 메모리의 시작주소로부터 시작하여 데이터를 읽고, 읽은 데이터를 FIFO부에 쓰는 메모리-FIFO 전송단계; DMA 제어기가 모든 데이터가 전송되었는지 조사하는 조사단계; 및 조사단계에서의 조사 결과, 아직 전송할 데이터가 더 남아있다고 판단된 경우에는, 메모리-FIFO 전송단계로 되돌아가며, 모든 데이터가 전송된 경우에는, 모든 데이터가 전송되었다는 것을 프로세서부에게 알려주는 종료 단계를 포함하여 구성되는 것을 특징으로 한다.The data transfer method from the memory to the FIFO includes any digital data including a FIFO unit having an arbitrary digital data storage space, a memory, a DMA controller for controlling data transfer between the FIFO unit and a memory, and a processor unit for controlling the DMA controller. A processing apparatus comprising: a recording step of recording, by a processor unit, a size of data in a memory to be transmitted to a FIFO unit and a start address of a memory in which the data is stored in a predetermined storage location; A transfer command step of causing the processor to issue a data transfer start command to the DMA controller; A memory-FIFO transfer step in which the DMA controller receiving the data transfer start command reads data starting from the start address of the memory recorded in the predetermined storage location and writes the read data to the FIFO unit; An investigation step of the DMA controller checking whether all data has been transmitted; And if it is determined that there is still more data to be transmitted as a result of the investigation in the investigation step, the process returns to the memory-FIFO transmission step and, in the case where all data is transmitted, an end step of informing the processor unit that all data has been transmitted. Characterized in that comprises a.

이 때, 위에서 언급한 기록 단계는 프로세서부가 FIFO부로 전송될 메모리에 있는 데이터의 크기와 이 데이터가 저장되어 있는 메모리의 시작주소를 기록함에 있어서, 해당 데이터 크기와 시작주소를 DMA 제어기 내에 구비된 제 1 레지스터와 제 2 레지스터에 각각 기록하는 과정을 포함하여 구성되는 것을 특징으로 하고, 조사 단계는 메모리로부터 읽은 데이터의 수와 소정의 기억장소에 저장되어 있는 전송할 데이터의 크기를 비교하는 과정을 포함하여 구성되는 것을 특징으로 하며, 종료 단계는 모든 데이터가 전송되었다는 것을 프로세서부에게 알려주기 위하여, DMA 제어기가 소정의 인터럽트 신호를 발생시켜서 프로세서부에게 전해주는 단계를 포함하여 구성되는 것을 특징으로 한다.At this time, in the above-mentioned writing step, the processor unit records the size of the data in the memory to be transmitted to the FIFO unit and the start address of the memory in which the data is stored. And writing the data into the first register and the second register, respectively, and the investigating step includes comparing the number of data read from the memory with the size of the data to be transmitted stored in the predetermined storage location. And the terminating step includes the step of generating a predetermined interrupt signal to the processor unit and informing the processor unit in order to inform the processor unit that all data has been transmitted.

한편, FIFO로부터 메모리로의 데이터 전송방법은 DMA 제어기가 FIFO부로 데이터가 쓰여질 때마다, 현재 입력 데이터의 다음 비트(데이터 종료 비트)를 임의의 논리값으로 세팅하는 단계; 프로세서부는 FIFO부에 입력되어 있는 데이터를 전송할 메모리의 시작주소를 소정의 기억장소에 기록하는 단계; 프로세서부가 DMA 제어기에게 동작명령을 내리는 단계; DMA 제어기는 FIFO부로부터 순서대로 데이터를 읽고, 읽은 데이터를 상기 소정의 기억장소에 기록된 시작주소로부터 시작하여, 메모리에 입력시키는 FIFO-메모리 전송단계; 및 DMA 제어기는 FIFO부의 모든 데이터가 전송되었는가를 조사하여, 모든 데이터가 전송되지 않은 경우에는 FIFO-메모리 전송단계로 되돌아가거나, 모든 데이터의 전송을 종료하였을 경우에는 인터럽트 신호를 발생시켜 프로세서부에게 알려주는 인터럽트 단계를 포함하여 구성되는 것을 특징으로 한다.On the other hand, the data transfer method from the FIFO to the memory, the DMA controller, each time the data is written to the FIFO unit, setting the next bit (data end bit) of the current input data to an arbitrary logic value; The processor unit writes a start address of a memory to which data inputted in the FIFO unit is to be transferred to a predetermined storage location; The processor unit giving an operation command to the DMA controller; A FIFO-memory transfer step of causing the DMA controller to read data in order from the FIFO unit and to input the read data into the memory starting from the start address recorded in the predetermined storage location; And the DMA controller checks whether all the data of the FIFO unit has been transferred, and returns to the FIFO-memory transfer step if all data is not transmitted, or generates an interrupt signal to notify the processor unit when all data has been transferred. Is characterized in that it comprises an interrupt step.

이 때, 인터럽트 단계는 FIFO부로부터 모든 데이터가 전송되었는가를 조사함에 있어서, 데이터 종료 비트의 논리값을 조사하여 모든 데이터가 종료되었는가를 판단하는 과정을 포함하여 구성되는 것을 특징으로 한다.In this case, the interruption step may include determining whether all data have been terminated by examining a logic value of the data end bit in checking whether all data has been transmitted from the FIFO unit.

도 1은 일반 컴퓨터 시스템에서 DMA 제어기를 사용하여 데이터를 전송하는 것에 관한 개요도,1 is a schematic diagram of transmitting data using a DMA controller in a general computer system;

도 2는 임의의 두 지점간의 데이터 통신에 관한 개요도,2 is a schematic diagram of data communication between any two points;

도 3은 도 2에 보인 데이터 처리부의 블록도,3 is a block diagram of a data processing unit shown in FIG. 2;

도 4는 메모리로부터 FIFO부로의 데이터 전송에 관한 흐름도,4 is a flowchart relating to data transfer from a memory to a FIFO unit;

도 5는 FIFO부로부터 메모리로의 데이터 전송에 관한 흐름도이다.5 is a flowchart illustrating data transfer from a FIFO unit to a memory.

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

110: DMA 제어기 120: 메모리110: DMA controller 120: memory

130: 하드 디스크 드라이브(HDD) 140: CPU130: hard disk drive (HDD) 140: CPU

210: 제 1 데이터 송수신 장치 220: 제 2 데이터 송수신 장치210: first data transceiver 220: second data transceiver

300: 데이터 처리부 310: FIFO 접속부300: data processing unit 310: FIFO connection unit

320: FIFO부 330: DMA 제어기320: FIFO unit 330: DMA controller

331: 제 1 레지스터 332: 제 2 레지스터331: First register 332: Second register

340: 메모리 350: 메모리 접속부340: memory 350: memory connection

360: 프로세서부360: processor unit

이하에 첨부된 도면을 참조하여 본 발명을 자세히 설명한다.Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

도 3은 데이터 처리부(300)의 블록도로서, 도 2에서 보인 제 1 데이터 송수신 장치(210)와 제 2 데이터 송수신 장치(220) 사이에서 데이터 처리를 담당하는 데이터 처리부(300)의 한 구성예이다.FIG. 3 is a block diagram of the data processing unit 300. An example of the configuration of the data processing unit 300 in charge of data processing between the first data transmission / reception unit 210 and the second data transmission / reception unit 220 shown in FIG. to be.

이 데이터 처리부(300)는 FIFO 접속부(310), FIFO부(320), DMA 제어기(330), 메모리(340), 메모리 접속부(350), 및 프로세서부(360)로 이루어진다.The data processing unit 300 includes a FIFO connection unit 310, a FIFO unit 320, a DMA controller 330, a memory 340, a memory connection unit 350, and a processor unit 360.

먼저, 제 1 데이터 송수신 장치(210)에서 송신한 데이터가 제 2 데이터 송수신 장치(220)로 전달되는 과정을 설명한다. 이 때, 제 1 데이터 송수신 장치(210)와 제 2 데이터 송수신 장치(220)는 서로 다른 데이터 구조를 사용하는 장치라고 가정한다. 그 한 예로서, 제 1 데이터 송수신 장치(210)는 프레임 릴레이 망에 접속되어 프레임 릴레이 망의 데이터를 송수신하는 장치이고, 제 2 데이터 송수신 장치(220)는 ATM 망에 접속되어 ATM 망의 데이터를 송수신하는 장치일 수있다. 이 때, 프레임 릴레이 망에서 사용하는 데이터 구조와 ATM 망에서 사용되는 데이터 구조는 서로 다르므로, 한쪽 망에서 다른 망으로 데이터가 전달되려면, 데이터 처리부(300)로부터 상대 측 데이터 구조에 맞도록 변환해 주어야 하는 것이다.First, a process in which data transmitted from the first data transmission / reception device 210 is transferred to the second data transmission / reception device 220 will be described. In this case, it is assumed that the first data transmission and reception device 210 and the second data transmission and reception device 220 use different data structures. As an example, the first data transmitting and receiving device 210 is an apparatus for transmitting and receiving data of the frame relay network by being connected to the frame relay network, and the second data transmitting and receiving device 220 is connected to the ATM network to transmit data of the ATM network. It may be a device for transmitting and receiving. At this time, since the data structure used in the frame relay network and the data structure used in the ATM network are different from each other, in order to transmit data from one network to the other network, the data structure is converted from the data processing unit 300 to match the data structure of the other party. It must be given.

FIFO 접속부(310)는 제 1 데이터 송수신 장치(210)와 직접 접속되어, 제 1 데이터 송수신 장치(210)에서 제 2 데이터 송수신 장치(220)로 보낼 데이터를 수신하고, 수신한 순서대로 8 비트 데이터 입출력선을 통해 FIFO부(320)로 보낸다.The FIFO connection unit 310 is directly connected to the first data transmission / reception unit 210 to receive data to be sent from the first data transmission / reception unit 210 to the second data transmission / reception unit 220, and in order of receiving 8-bit data. It is sent to the FIFO unit 320 through the input and output lines.

FIFO부(320)에 데이터가 입력되면, 프로세서부(360)는 DMA 제어기(330)에 FIFO부(320)로부터 메모리(340)로 데이터를 보내라는 명령을 내리며, 이 명령을 받은 DMA 제어기(330)는 FIFO부(320)의 데이터를 메모리(340)로 전송한다.When data is input to the FIFO unit 320, the processor unit 360 instructs the DMA controller 330 to send data from the FIFO unit 320 to the memory 340, and receives the command. ) Transmits the data of the FIFO unit 320 to the memory 340.

메모리 접속부(350)는 메모리에 저장된 데이터를 제 2 데이터 송수신 장치(220)에서 사용하는 데이터 구조에 맞도록 변환시킨 후, 제 2 데이터 송수신 장치(220)로 출력시킨다. 이 때, 제 1 데이터 송수신 장치(210)는 프레임 릴레이 망에 접속되어 프레임 릴레이 망의 데이터를 송수신하는 장치이고, 제 2 데이터 송수신 장치(220)는 ATM 망에 접속되어 ATM 망의 데이터를 송수신하는 장치라면, 프레임 데이터를 ATM 망에서 사용할 수 있도록 ATM 셀 데이터로 변환시켜 주는 것이다.The memory connection unit 350 converts the data stored in the memory to match the data structure used by the second data transmission / reception apparatus 220 and then outputs the data to the second data transmission / reception apparatus 220. At this time, the first data transmitting and receiving device 210 is a device for transmitting and receiving data of the frame relay network is connected to the frame relay network, the second data transmitting and receiving device 220 is connected to the ATM network for transmitting and receiving data of the ATM network In the case of a device, the frame data is converted into ATM cell data for use in an ATM network.

한편, 제 2 데이터 송수신 장치(220)에서 송신한 데이터가 제 1 데이터 송수신 장치(210)로 전달되는 과정은 다음과 같다.Meanwhile, a process of transmitting data transmitted from the second data transmission / reception apparatus 220 to the first data transmission / reception apparatus 210 is as follows.

메모리 접속부(350)는 제 2 데이터 송수신 장치(220)로부터 송신할 데이터를 입력 받은 후, 제 1 데이터 송수신 장치(210)에서 사용하는 데이터 구조에 맞도록 변환 시킨 후, 메모리(340)로 입력시킨다.The memory connection unit 350 receives data to be transmitted from the second data transmission / reception unit 220, converts the data to match the data structure used by the first data transmission / reception unit 210, and then inputs the data to the memory 340. .

메모리(340)에 송신할 데이터가 모두 입력되면, 프로세서부(360)는 DMA 제어기(330)에게 메모리(340)의 데이터를 FIFO부(320)로 전송하라는 명령을 내리며, 이 명령을 받은 DMA 제어기(330)는 메모리(340)의 데이터를 FIFO부(320)로 전송한다.When all the data to be transmitted to the memory 340 is input, the processor unit 360 instructs the DMA controller 330 to transmit the data of the memory 340 to the FIFO unit 320 and receives the command. 330 transmits the data of the memory 340 to the FIFO unit 320.

그리고, FIFO부(320)에 메모리(340)의 데이터가 전송되면, FIFO 접속부(310)는 FIFO부(320)의 데이터를 차례대로 제 1 데이터 송수신 장치(210)로 보낸다.When the data of the memory 340 is transmitted to the FIFO unit 320, the FIFO connecting unit 310 sequentially transmits the data of the FIFO unit 320 to the first data transmitting and receiving device 210.

이와 같이, 제 1 데이터 송수신 장치(210)와 제 2 데이터 송수신 장치(220)는 데이터 처리부(300)를 통하여 서로 데이터를 주고 받는다.As such, the first data transmission and reception device 210 and the second data transmission and reception device 220 exchange data with each other through the data processing unit 300.

이제, DMA 제어기(330)를 사용해서 FIFO부(320)와 메모리(340) 사이의 데이터를 주고 받는 방법을 상세히 설명한다.Now, a method of exchanging data between the FIFO unit 320 and the memory 340 using the DMA controller 330 will be described in detail.

도 4는 메모리(340)로부터 FIFO부(320)로의 데이터 전송에 관한 흐름도로서, 메모리(340), FIFO부(320), DMA 제어기(330), 및 프로세서부(360)가 서로 관계하여 메모리(340)로부터 FIFO부(320)로 데이터가 전송되는 과정을 나타낸다.4 is a flowchart illustrating data transfer from the memory 340 to the FIFO unit 320, in which the memory 340, the FIFO unit 320, the DMA controller 330, and the processor unit 360 relate to each other. A process in which data is transmitted from 340 to the FIFO unit 320 is shown.

처음 단계에서 프로세서부(360)는 FIFO부(320)로 전송될 메모리(340)에 있는 데이터의 크기와 이 데이터가 저장되어 있는 메모리(340)의 시작주소를 파악하고, 이 사항을 DMA 제어기(330)에 포함되어 있는 제 1 레지스터(331)와 제 2 레지스터(332)에 각각 기록한다(단계 S410).In the first step, the processor unit 360 determines the size of data in the memory 340 to be transmitted to the FIFO unit 320 and the start address of the memory 340 in which the data is stored. Each of the first register 331 and the second register 332 included in 330 is written (step S410).

그리고 프로세서부(360)는 DMA 제어기(330)로 DMA 동작, 즉 데이터 전송 동작을 시작하라는 명령을 내린다(단계 S420).The processor 360 then gives a command to the DMA controller 330 to start a DMA operation, that is, a data transfer operation (step S420).

DMA 구동명령을 받은 DMA 제어기(330)는 제 2 레지스터(332)를 참조하여, 메모리(340)로부터 8 비트 단위로 데이터를 읽고(단계 S430), 읽은 데이터를 FIFO부(320)의 해당 공간에 기록한다(단계 S440).The DMA controller 330 receiving the DMA driving command reads data in units of 8 bits from the memory 340 by referring to the second register 332 (step S430), and reads the read data into the corresponding space of the FIFO unit 320. Record (step S440).

또한, DMA 제어기(330)는 FIFO부(320)로 데이터 쓰기를 한 다음, 현재 까지 전송된 데이터의 수와 자신의 제 1 레지스터(331)의 내용, 즉 전송할 데이터의 크기를 비교하여, 전송할 모든 데이터가 전송되었는가를 조사한다(단계 S450).In addition, the DMA controller 330 writes data to the FIFO unit 320, and then compares the number of data transmitted so far with the contents of its first register 331, that is, the size of the data to be transmitted, It is checked whether data has been transmitted (step S450).

위의 단계 S450에서의 조사 결과, 아직 전송할 데이터가 더 남아있다고 판단된 경우에는, 단계 S430으로 되돌아가며, 모든 데이터가 전송된 경우에는, 모든 데이터가 전송되었다는 인터럽트 신호를 발생시켜 프로세서부(360)에게 알려준다.If it is determined in the above step S450 that there is still more data to be transmitted, the process returns to step S430. If all data is transmitted, the processor unit 360 generates an interrupt signal indicating that all data has been transmitted. Inform

한편, 도 5는 FIFO부(320)로부터 메모리(340)로의 데이터 전송에 관한 흐름도로서, 메모리(340), FIFO부(320), DMA 제어기(330), 및 프로세서부(360)가 서로 관계하여 메모리(340)로부터 FIFO부(320)로 데이터가 전송되는 과정을 나타낸다.5 is a flowchart illustrating data transfer from the FIFO unit 320 to the memory 340. The memory 340, the FIFO unit 320, the DMA controller 330, and the processor unit 360 are related to each other. A process in which data is transmitted from the memory 340 to the FIFO unit 320 is shown.

처음 단계에서 DMA 제어기(330)는 FIFO부(320)로 데이터가 쓰여질 때마다, 현재 입력 데이터의 다음 비트를 임의의 논리값으로 세팅한다(단계 S510). 예로서, 전송할 데이터가 8 비트 데이터 단위로 FIFO부(320)에 입력된다면, 해당 8 비트 데이터가 FIFO부(320)에 입력된 후, 전송될 데이터의 마지막 부분인가를 조사하여, 마지막 부분이 아니라면 그 다음 9번째 비트(데이터 종료 비트)를 논리값 '0'으로 세팅하고, 마지막 부분이라면, 데이터 종료 비트를 논리값 '1'로 세팅한다.In the first step, the DMA controller 330 sets the next bit of the current input data to an arbitrary logic value each time data is written to the FIFO unit 320 (step S510). For example, if data to be transmitted is input to the FIFO unit 320 in units of 8-bit data, the 8-bit data is input to the FIFO unit 320 and then checked whether it is the last part of the data to be transmitted. The ninth bit (data end bit) is then set to logical value '0', and if it is the last part, the data end bit is set to logical value '1'.

이 데이터 종료 비트열을 FIFO부(320)의 가장 윗 열에 보였다. 즉 도 3에서 보는바와 같이, DMA 제어기(330)는 FIFO 접속부(310)로부터 8비트 데이터 입출력선을 통해 8 비트 데이터가 FIFO 부(320)로 입력되면, 해당 데이터 열의 가장 윗열의 해당 데이터 종료 비트를 세팅한다.This data end bit string is shown in the top row of the FIFO section 320. That is, as shown in FIG. 3, when the 8-bit data is input to the FIFO unit 320 from the FIFO connection unit 310 through the 8-bit data input / output line, the DMA controller 330 receives the corresponding data end bit of the top row of the corresponding data string. Set.

즉, 제 1 데이터 송수신 장치(210)가 프레임 릴레이 망과 접속되어 있는 장치라면, 프레임 릴레이 망으로부터 연속적으로 수신되는 프레임 데이터는 8비트 단위로 FIFO 부(320)에 입력되고, 8 비트 데이터가 입력될 때 마다, 해당 데이터 종료비트를 세팅하는 것이다.That is, if the first data transmitting and receiving device 210 is a device connected to the frame relay network, frame data continuously received from the frame relay network is input to the FIFO unit 320 in 8-bit units, and 8-bit data is input. Each time, the corresponding data end bit is set.

그리고, 프로세서부(360)는 FIFO부(320)에 입력되어 있는 데이터를 전송할 메모리(340)의 시작주소를 DMA 제어기(330)의 제 2 레지스터(332)에 기록한 후(단계 S520), DMA 제어기(330)에 대한 구동명령을 내린다(S530).Then, the processor 360 records the start address of the memory 340 to transmit the data input to the FIFO unit 320 in the second register 332 of the DMA controller 330 (step S520), and then the DMA controller Give a driving command for (330) (S530).

그러면, DMA 제어기(330)는 FIFO부(320)로부터 순서대로 8 비트 단위의 데이터를 읽고(단계 S540), 읽은 데이터를 메모리(340)에 입력시킨다(단계 S550).Then, the DMA controller 330 reads data in units of 8 bits from the FIFO unit 320 in order (step S540), and inputs the read data into the memory 340 (step S550).

그 다음, DMA 제어기(330)는 현재 FIFO부(320)로부터 읽은 데이터의 다음 비트, 즉 FIFO부(320)의 가장 윗열의 출력단자로부터 출력되는 데이터 종료 비트의 값을 조사한다. 이 조사 결과, 데이터 종료 비트가 논리값 '0'을 가진다면, 아직 FIFO부(320)로부터 읽을 데이터가 더 남아있는 것이므로 단계 S540으로 되돌아가며, 만일 데이터 종료 비트가 논리값 '1'을 가진다면, FIFO부(320)로부터 모든 데이터를 읽은 것이므로 단계 S570으로 진행한다.Next, the DMA controller 330 examines the value of the next bit of data currently read from the FIFO unit 320, that is, the data end bit output from the output terminal of the top row of the FIFO unit 320. As a result of this investigation, if the data end bit has a logic value of '0', there is still more data to be read from the FIFO section 320, and the flow returns to step S540, if the data end bit has a logic value of '1'. Since all data has been read from the FIFO unit 320, the flow advances to step S570.

단계 S570에서 DMA 제어기(330)는 모든 데이터의 전송을 종료하였다는 인터럽트 신호를 발생시켜 프로세서부(360)에 알린다.In step S570, the DMA controller 330 generates an interrupt signal indicating that the transfer of all data has been completed and notifies the processor 360. FIG.

이와 같이, FIFO부(320)로부터 메모리(340)로의 데이터 전송이 이루어진다.In this manner, data transfer from the FIFO unit 320 to the memory 340 is performed.

본 발명에 따른 FIFO와 메모리 사이의 데이터 전송방법을 사용하면, FIFO부(320)와 메모리(340) 사이에서의 데이터 전송을 효율적으로 구현할 수 있는 효과가 있다.Using the data transmission method between the FIFO and the memory according to the present invention, there is an effect that can be efficiently implemented between the FIFO unit 320 and the memory 340.

Claims (6)

임의의 디지털 데이터 기억공간을 가지는 FIFO부(320)와 메모리(340), FIFO부(320)와 메모리(340) 사이의 데이터 전송을 제어하는 DMA 제어기(330), 및 상기 DMA 제어기(330)를 제어하는 프로세서부(360)를 포함하여 구성된 임의의 디지털 데이터 처리 장치에 있어서, 상기 프로세서부(360)가 상기 FIFO부(320)로 전송될 상기 메모리(340)에 있는 데이터의 크기와 이 데이터가 저장되어 있는 메모리(340)의 시작주소를 소정의 기억장소에 기록하는 기록단계;The FIFO unit 320 and the memory 340 having any digital data storage space, the DMA controller 330 for controlling data transfer between the FIFO unit 320 and the memory 340, and the DMA controller 330 In any digital data processing apparatus configured to include a processor unit 360 for controlling, the size of the data in the memory 340 to be transmitted to the FIFO unit 320 and the data is A recording step of recording the start address of the stored memory 340 in a predetermined storage location; 상기 프로세서부(360)가 상기 DMA 제어기(330)로 데이터 전송 시작 명령을 내리는 전송명령단계;A transfer command step of the processor unit 360 giving a data transfer start command to the DMA controller 330; 상기 데이터 전송 시작 명령을 받은 상기 DMA 제어기(330)가 상기 소정의 기억장소에 기록된 상기 메모리(340)의 시작주소로부터 시작하여 데이터를 읽고, 읽은 데이터를 상기 FIFO부(320)에 쓰는 메모리-FIFO 전송단계;A memory in which the DMA controller 330 receiving the data transfer start command reads data starting from the start address of the memory 340 recorded in the predetermined storage location and writes the read data to the FIFO unit 320; FIFO transmission step; 상기 DMA 제어기(330)가 모든 데이터가 전송되었는지 조사하는 조사단계; 및An investigation step of examining, by the DMA controller 330, whether all data has been transmitted; And 상기 조사단계에서의 조사 결과, 아직 전송할 데이터가 더 남아있다고 판단된 경우에는, 상기 메모리-FIFO 전송단계로 되돌아가며, 모든 데이터가 전송된 경우에는, 모든 데이터가 전송되었다는 것을 상기 프로세서부(360)에게 알려주는 종료 단계를 포함하여 구성되는 것을 특징으로 하는 메모리로부터 FIFO 로의 데이터 전송방법.If it is determined that there is still more data to be transmitted as a result of the investigation, the processor returns to the memory-FIFO transmission step and, if all data is transmitted, indicates that all data has been transmitted. And a terminating step of notifying a data transfer method from the memory to the FIFO. 제 1 항에 있어서, 상기 기록 단계는 상기 프로세서부(360)가 상기 FIFO부(320)로 전송될 상기 메모리(340)에 있는 데이터의 크기와 이 데이터가 저장되어 있는 메모리(340)의 시작주소를 기록함에 있어서, 해당 데이터 크기와 시작주소를 DMA 제어기(330) 내에 구비된 제 1 레지스터와 제 2 레지스터에 각각 기록하는 과정을 포함하여 구성되는 것을 특징으로 하는 메모리로부터 FIFO 로의 데이터 전송방법.The method of claim 1, wherein the writing step includes the size of the data in the memory 340 to be transmitted to the FIFO unit 320 by the processor unit 360 and the start address of the memory 340 in which the data is stored. And recording the corresponding data size and start address into the first register and the second register, respectively, provided in the DMA controller (330). 제 1 항에 있어서, 상기 조사 단계는 메모리(340)로부터 읽은 데이터의 수와 상기 소정의 기억장소에 저장되어 있는 전송할 데이터의 크기를 비교하는 과정을 포함하여 구성되는 것을 특징으로 하는 메모리로부터 FIFO 로의 데이터 전송방법.The method according to claim 1, wherein the inspecting step comprises comparing the number of data read from the memory 340 with the size of the data to be transmitted stored in the predetermined storage location. Data transmission method. 제 1 항에 있어서, 상기 종료 단계는 모든 데이터가 전송되었다는 것을 프로세서부(360)에게 알려주기 위하여, 상기 DMA 제어기(330)가 소정의 인터럽트 신호를 발생시켜서 프로세서부(360)에게 전해주는 단계를 포함하여 구성되는 것을 특징으로 하는 메모리로부터 FIFO 로의 데이터 전송방법.The method of claim 1, wherein the terminating step includes generating a predetermined interrupt signal from the DMA controller 330 and informing the processor 360 to inform the processor 360 that all data has been transmitted. And a data transfer method from the memory to the FIFO. 상기 DMA 제어기(330)는 상기 FIFO부(320)로 데이터가 쓰여질 때마다, 현재 입력 데이터의 다음 비트(데이터 종료 비트)를 임의의 논리값으로 세팅하는 단계;The DMA controller (330), each time data is written to the FIFO unit (320), setting the next bit (data end bit) of the current input data to an arbitrary logic value; 상기 프로세서부(360)는 상기 FIFO부(320)에 입력되어 있는 데이터를 전송할 메모리(340)의 시작주소를 소정의 기억장소에 기록하는 단계;The processor 360 recording a start address of a memory 340 to transmit data input to the FIFO unit 320 in a predetermined storage location; 상기 프로세서부(360)가 상기 DMA 제어기(330)에게 동작명령을 내리는 단계;The processor 360 giving an operation command to the DMA controller 330; 상기 DMA 제어기(330)는 상기 FIFO부(320)로부터 순서대로 데이터를 읽고, 읽은 데이터를 상기 소정의 기억장소에 기록된 시작주소로부터 시작하여, 메모리(340)에 입력시키는 FIFO-메모리 전송단계; 및The DMA controller 330 reads data from the FIFO unit 320 in order, and inputs the read data into the memory 340 starting from the start address recorded in the predetermined storage location; And 상기 DMA 제어기(330)는 상기 FIFO부(320)의 모든 데이터가 전송되었는가를 조사하여, 모든 데이터가 전송되지 않은 경우에는 상기의 FIFO-메모리 전송단계로 되돌아가거나, 모든 데이터의 전송을 종료하였을 경우에는 인터럽트 신호를 발생시켜 프로세서부(360)에게 알려주는 인터럽트 단계를 포함하여 구성되는 것을 특징으로 하는 FIFO로부터 메모리로의 데이터 전송방법.The DMA controller 330 checks whether all data of the FIFO unit 320 has been transmitted. If all data is not transmitted, the DMA controller 330 returns to the FIFO-memory transfer step or terminates all data transfer. The data transfer method from the FIFO to the memory, characterized in that it comprises an interrupt step for generating an interrupt signal to inform the processor (360). 제 5 항에 있어서, 상기 인터럽트 단계는 FIFO부(320)로부터 모든 데이터가 전송되었는가를 조사함에 있어, 상기 데이터 종료 비트의 논리값을 조사하여 모든 데이터가 종료되었는가를 판단하는 과정을 포함하여 구성되는 것을 특징으로 하는 FIFO로부터 메모리로의 데이터 전송방법.6. The method of claim 5, wherein the interrupting step includes determining whether all data has been terminated by examining a logic value of the data end bit in checking whether all data has been transmitted from the FIFO unit 320. A data transfer method from a FIFO to a memory, characterized in that.
KR1019980013414A 1998-04-15 1998-04-15 How to transfer data between FIFO and memory KR19990080283A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019980013414A KR19990080283A (en) 1998-04-15 1998-04-15 How to transfer data between FIFO and memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019980013414A KR19990080283A (en) 1998-04-15 1998-04-15 How to transfer data between FIFO and memory

Publications (1)

Publication Number Publication Date
KR19990080283A true KR19990080283A (en) 1999-11-05

Family

ID=65890319

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019980013414A KR19990080283A (en) 1998-04-15 1998-04-15 How to transfer data between FIFO and memory

Country Status (1)

Country Link
KR (1) KR19990080283A (en)

Similar Documents

Publication Publication Date Title
US4779190A (en) Communication bus interface
EP0844566B1 (en) Interface apparatus for adapting data width to system bus width
JP4022442B2 (en) Control method of fieldbus interface board
KR100239716B1 (en) Diagnostic test apparatus of scsi controller
US6584512B1 (en) Communication DMA device for freeing the data bus from the CPU and outputting divided data
KR19990080283A (en) How to transfer data between FIFO and memory
US20040213277A1 (en) Method and related circuit for increasing network transmission efficiency by increasing a data updating rate of a memory
JPH1063617A (en) Serial communication device
JPH07334281A (en) Scsi connector
KR100800704B1 (en) Message preprocessing apparatus and control method for mobile station in wireless communication system
KR960014177B1 (en) Data communication device for a parallel data processing system
KR100212993B1 (en) Mpeg video server system and its operation method in personal computer
JPH07319841A (en) Serial control device
JPH08197788A (en) Image data reading circuit of printer control device
JP2830802B2 (en) ATM cross connect device
JP3442099B2 (en) Data transfer storage device
JPS6294042A (en) Communication control equipment
KR100227335B1 (en) Data transfer method between multiple systems
KR20050046094A (en) Bus system for reducing data write latency of slave device and method of processing data in the bus system
JP2000132498A (en) Dma transfer controller
JPH1031640A (en) Image transfer device
JPH0936930A (en) Communication control circuit
JPH06259374A (en) Input/output bus controller
JPH0589022A (en) Information processor
JP2000222350A (en) Data transfer system

Legal Events

Date Code Title Description
N231 Notification of change of applicant
WITN Withdrawal due to no request for examination