KR100429265B1 - Common communication interface by programable logic divice - Google Patents

Common communication interface by programable logic divice Download PDF

Info

Publication number
KR100429265B1
KR100429265B1 KR10-2001-0070648A KR20010070648A KR100429265B1 KR 100429265 B1 KR100429265 B1 KR 100429265B1 KR 20010070648 A KR20010070648 A KR 20010070648A KR 100429265 B1 KR100429265 B1 KR 100429265B1
Authority
KR
South Korea
Prior art keywords
cpu
interrupt
data
buffer
pld
Prior art date
Application number
KR10-2001-0070648A
Other languages
Korean (ko)
Other versions
KR20030039644A (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 KR10-2001-0070648A priority Critical patent/KR100429265B1/en
Publication of KR20030039644A publication Critical patent/KR20030039644A/en
Application granted granted Critical
Publication of KR100429265B1 publication Critical patent/KR100429265B1/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/10Program control for peripheral devices
    • G06F13/102Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3814Implementation provisions of instruction buffers, e.g. prefetch buffer; banks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4812Task transfer initiation or dispatching by interrupt, e.g. masked

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Selective Calling Equipment (AREA)
  • Small-Scale Networks (AREA)

Abstract

본 발명은 시스템의 전반적인 제어 및 기본 동작수행을 위한 CPU, 상기 CPU와의 패킷 데이터 송수신을 통해 시스템에 부가기능을 제공하는 다수의 디바이스, 상기 다수의 디바이스와 CPU 사이에 연결되어, 각 디바이스로부터 인터럽트가 수신되면, 해당 디바이스의 상태 정보를 이용하여 상기 인터럽트의 종류를 판단하고, 그 판단결과에 따라 해당 디바이스로부터 전송된 패킷이 하나의 완전한 패킷 데이터가 될때까지 대기한 후, 한꺼번에 송수신을 수행하는 프로그램 가능한 로직 디바이스로 구성되는 것을 특징으로 한다.The present invention is a CPU for the overall control of the system and performing basic operations, a plurality of devices providing additional functions to the system through packet data transmission and reception with the CPU, connected between the plurality of devices and the CPU, interrupts from each device When received, it is possible to determine the type of the interrupt by using the state information of the device, and wait until the packet transmitted from the device is one complete packet data according to the determination result, and then perform the transmission and reception at once. It is characterized by consisting of a logic device.

이 같은 본 발명에 의하면, 디바이스의 버퍼가 작아서 여러 번에 걸쳐 인터럽트를 발생하여 CPU로 데이터를 송수신하였던 것을, PLD에서 한꺼번에 데이터를 모아서 CPU로 송수신 함으로써 CPU의 인터럽트 시간을 줄이고, 시스템 기본동작을 위한 시간을 제공함으로써 시스템의 성능을 향상시킬 수 있는 효과가 기대된다.According to the present invention, since the device buffer is small, an interrupt is generated several times to transmit and receive data to and from the CPU. The data is collected and transmitted to the CPU at once from the PLD to reduce the interrupt time of the CPU, and to perform system basic operations. By providing time, the effect of improving the performance of the system is expected.

Description

프로그램 가능한 로직디바이스를 이용한 공통 송수신 인터페이스{Common communication interface by programable logic divice}Common communication interface by programmable logic divice}

본 발명은 CPU 와 주변 기기간의 송수신을 위한 인터페이스에 관한 것으로,특히 CPU 와 주변기기간의 데이터 송수신을 위해서 프로그램 가능한 로직 디바이스에서 송수신을 담당하도록 함으로써 CPU의 부하를 줄이고, 전체 속도를 올리기 위한 프로그램 가능한 로직디바이스를 이용한 공통 송수신 인터페이스에 관한 것이다.The present invention relates to an interface for transmitting and receiving between a CPU and a peripheral device, and in particular, a programmable logic device for reducing the load on the CPU and increasing the overall speed by allowing the programmable logic device to transmit and receive data between the CPU and the peripheral device. It relates to a common transmission and reception interface using.

시스템의 CPU와 주변의 통신 디바이스의 데이터 송수신을 위해서는 각 디바이스의 버퍼를 사용하게 된다.The buffer of each device is used to transmit and receive data between the CPU of the system and the peripheral communication devices.

도 1은 종래의 CPU와 주변장치간의 송수신을 위한 구성을 나타낸 블록도이다.1 is a block diagram showing a configuration for transmitting and receiving between a conventional CPU and a peripheral device.

도 1을 참조하면, 시스템의 전반적인 제어 및 동작을 수행하도록 하는 CPU(10)와, 상기 CPU(10)와 주변 디바이스 1, 2(20, 30)간의 데이터 송수신을 하는데 있어서, 상기 디바이스 1, 2(20, 30)에 구성되어 있는 버퍼를 이용하게 된다.Referring to FIG. 1, in the data transmission and reception between the CPU 10 and the CPU 10 and the peripheral devices 1, 2 (20, 30) for performing overall control and operation of the system, the devices 1, 2 The buffer configured at (20, 30) is used.

예를 들어, 상기 디바이스 1(20)에서 상기 CPU(10)로 데이터를 전송하기 위해서는 디바이스 1(20)이 CPU(10)로 전송할 데이터가 있음을 알리는 인터럽트 신호를 보내게 된다.For example, in order to transmit data from the device 1 20 to the CPU 10, the device 1 20 sends an interrupt signal indicating that there is data to transmit to the CPU 10.

이에 상기 CPU(10)는 수신된 인터럽트를 분석하여 상기 디바이스 1(10)에서 데이터 전송을 원한다는 것을 알고, 폴링(Polling)명령을 이용하여 상기 디바이스 1(20)을 억세스 하여 버퍼에 있는 데이터를 수신하게 된다. 상기 폴링(Polling)명령은 컴퓨터 또는 단말 제어 장치 등에서 여러 개의 단말 장치에 대하여 순차적으로 송신 요구의 유무를 문의하고, 요구가 있을 경우에는 그 단말 장치에 송신을 시작하도록 명령하며 없을 때에는 다음의 단말 장치에 대하여 문의하게 되는 전송 제어 방식을 말한다.Accordingly, the CPU 10 analyzes the received interrupt and knows that the device 1 10 wants to transmit data, and accesses the device 1 20 using a polling command to receive data in a buffer. Done. The polling command inquires of a plurality of terminal apparatuses sequentially from a computer or a terminal control apparatus whether there is a transmission request, and instructs the terminal apparatus to start transmission if there is a request. The transmission control method inquired about.

한편, 상기 디바이스 1(20)의 버퍼는 하나의 완전한 패킷을 저장할 만큼 크지 않기 때문에 상기 CPU(10)가 수신한 데이터는 완전한 패킷의 일부분이다.On the other hand, since the buffer of the device 1 20 is not large enough to store one complete packet, the data received by the CPU 10 is a part of the complete packet.

따라서, 디바이스 1(20)은 다음 데이터를 버퍼에 저장한 후 다시 CPU(10)로 인터럽트 신호를 보내어 데이터를 수신하도록 요청한다.Therefore, the device 1 20 stores the next data in the buffer and sends an interrupt signal to the CPU 10 to request the data to be received.

상기와 같이 하나의 완전한 패킷을 CPU(10)로 전송하기 위해서 디바이스 1(20)은 여러 번에 걸쳐 인터럽트 신호를 보내야 하며, 상기 CPU(10)도 여러 번에 걸쳐 폴링명령을 내리고 상기 디바이스 1(20)을 억세스 해야 한다.As described above, in order to transmit one complete packet to the CPU 10, the device 1 20 must send an interrupt signal several times, and the CPU 10 also issues a polling command several times and the device 1 ( 20) must be accessed.

또한, CPU(10)가 상기 디바이스 2(30)로 데이터를 전송할 때도 CPU(10)가 하나의 패킷데이터를 전송하기 위해서는 여러 번에 걸쳐 디바이스 2(20)의 버퍼에 데이터를 나누어 전송해야 한다.In addition, when the CPU 10 transmits data to the device 2 30, the CPU 10 must divide and transmit data to the buffer of the device 2 20 several times in order for the CPU 10 to transmit one packet data.

이것은 상기 디바이스 2(30)의 버퍼가 하나의 패킷을 저장할 만큼 크지 않기 때문에 오버런(overrun)이나 언더런(underrun)과 같은 에러를 막기 위해 CPU(10)가 여러 번에 걸쳐 인터럽트와 폴링을 사용하여 데이터를 전송하는 것이다.This is because the buffer of the device 2 30 is not large enough to store one packet so that the CPU 10 uses interrupts and polling multiple times to prevent an error such as overrun or underrun. To send.

그러나, 상기와 같은 데이터 송수신방법은 CPU(10)가 데이터 송수신을 위해 디바이스 1, 2(20, 30)를 여러 차례 억세스 하여 작업을 해야하는 소프트웨어방식의 데이터 송수신방식이므로, 데이터 크기에 따라 인터럽트가 많아지게 되고, CPU의 부하가 커져서 이에 따라 시스템운영의 기본작업을 실행할 시간이 줄어들게 되므로, 시스템의 성능이 저하되는 결과를 초래한다.However, the data transmission / reception method as described above is a software data transmission / reception method in which the CPU 10 needs to access and work with the devices 1, 2 (20, 30) several times for data transmission / reception. As the CPU load increases, the time for executing basic operations of the system operation is reduced, resulting in a decrease in system performance.

상기와 같은 문제를 해결하기 위해서, 본 발명은 CPU와 주변 디바이스간의 데이터 송수신을 종래와 같이 디바이스의 작은 크기의 버퍼를 이용하여 인터럽트와 폴링명령을 이용하여 수행하지 않고, 디바이스와 CPU사이에 프로그램이 가능한 로직 디바이스(PLD; programmable logic device)를 추가로 구성하여, 상기 PLD가 디바이스로부터 데이터를 조금씩 모아 하나의 패킷이 되면 CPU로 송수신 하도록 하여 CPU가 작업을 수행함으로써, CPU의 부하를 줄이고 인터럽트 시간을 최소화하여 CPU가 기본작업 수행시간을 더 많이 가질 수 있도록 보장해 주어, 시스템의 성능을 높일 수 있는 프로그램 가능한 로직디바이스를 이용한 공통 송수신 인터페이스를 제공함에 그 목적이 있다.In order to solve the above problems, the present invention does not perform data transmission and reception between the CPU and the peripheral device using interrupt and polling instructions using a small buffer of the device as in the prior art, and a program between the device and the CPU is executed. A programmable logic device (PLD) is further configured to allow the PLD to collect data from the device little by little and send and receive data to and from the CPU to the CPU, thereby reducing the load on the CPU and reducing interrupt time. The goal is to provide a common transmit / receive interface using a programmable logic device that can increase system performance by minimizing the CPU's time to execute basic tasks by minimizing it.

도 1은 종래의 CPU와 주변 디바이스간의 데이터 송수신을 위한 시스템 구성을 나타낸 블록도.1 is a block diagram showing a system configuration for transmitting and receiving data between a conventional CPU and a peripheral device.

도 2는 본 발명의 실시 예에 따른 PLD를 이용한 공통 송수신 인터페이스에 따른 시스템 구성을 나타낸 블록도.2 is a block diagram illustrating a system configuration according to a common transmit / receive interface using a PLD according to an embodiment of the present invention.

도 3은 도 3의 PLD의 구성을 나타낸 블록도.3 is a block diagram showing the configuration of the PLD of FIG.

도 4는 본 발명의 실시 예에 따른 PLD를 이용한 공통 송수신 인터페이스에서 CPU가 디바이스로부터 데이터를 수신하도록 하는 동작순서를 나타낸 플로우 차트.4 is a flowchart illustrating an operation procedure for allowing a CPU to receive data from a device in a common transmit / receive interface using a PLD according to an embodiment of the present invention.

도 5는 본 발명의 실시 예에 따른 PLD를 이용한 공통 송수신 인터페이스에서 CPU가 디바이스로 데이터 송신을 하는 동작순서를 나타낸 플로우 차트.5 is a flowchart illustrating an operation procedure of a CPU transmitting data to a device in a common transmit / receive interface using a PLD according to an embodiment of the present invention.

본 발명에 따른 시스템의 전반적인 제어 및 기본 동작수행을 위한 CPU와;상기 CPU와의 패킷 데이터 송수신을 통해 시스템에 부가기능을 제공하는 다수의 디바이스와;상기 다수의 디바이스와 CPU 사이에 연결되어, 각 디바이스로부터 인터럽트가 수신되면, 해당 디바이스의 상태 정보를 이용하여 상기 인터럽트의 종류를 판단하고, 그 판단결과에 따라 해당 디바이스로부터 전송된 패킷이 하나의 완전한 패킷 데이터가 될때까지 대기한 후, 한꺼번에 송수신을 수행하는 프로그램 가능한 로직 디바이스를 포함하는 것을 특징으로 한다.CPU for overall control and basic operation of the system according to the present invention; A plurality of devices for providing additional functions to the system through the packet data transmission and reception with the CPU; And connected between the plurality of devices and the CPU, each device When an interrupt is received from the device, the type of the interrupt is determined by using the state information of the corresponding device, and the packet transmitted from the device is waited until the complete packet data is transmitted according to the determination result. And a programmable logic device.

바람직하게, 상기 프로그램 가능한 로직 디바이스는,Advantageously, said programmable logic device comprises:

다수의 주변 디바이스와 연결되어, 각 디바이스와의 데이터 및 디바이스 상태정보를 송수신하기 위한 인터페이스를 제공하는 디바이스 인터페이스부와;A device interface unit connected to a plurality of peripheral devices and providing an interface for transmitting and receiving data and device state information with each device;

상기 디바이스 인터페이스부에서 수신한 디바이스상태정보를 저장하는 디바이스 상태부와;A device state unit which stores device state information received by the device interface unit;

상기 다수의 디바이스와 CPU간의 데이터 송수신을 위한 인터럽트 신호를 제어하는 인터럽트 제어부와;An interrupt controller for controlling interrupt signals for data transmission and reception between the plurality of devices and the CPU;

상기 인터럽트 제어부에 수신된 인터럽트를 판단하여 디바이스로부터의 데이터를 송수신 하도록 하는 주제어부와;A main controller configured to determine an interrupt received by the interrupt controller to transmit and receive data from a device;

상기 다수의 디바이스로부터 전송되는 데이터를 임시 저장하는 수신버퍼와;A reception buffer for temporarily storing data transmitted from the plurality of devices;

CPU에서 상기 디바이스로 전송하는 데이터를 임시 저장하는 송신버퍼와;A transmission buffer for temporarily storing data transmitted from the CPU to the device;

상기 수신버퍼와 송신버퍼의 데이터 저장 및 삭제를 관리하는 버퍼 에이전트와;A buffer agent managing data storage and deletion of the receiving buffer and the transmitting buffer;

상기 CPU와의 인터페이스를 담당하는 CPU 인터페이스부와;A CPU interface unit in charge of interfacing with the CPU;

상기 PLD의 전체적인 상태정보를 나타내는 로직상태부를 포함하여 구성되는 것을 특징으로 한다.And a logic state unit indicating overall state information of the PLD.

상기와 같이 구성되는 본 발명에 따른 프로그램 가능한 로직디바이스를 이용한 공통 송수신 인터페이스에 대하여 첨부된 도면을 참조하여 설명하면 다음과 같다.A common transmit / receive interface using a programmable logic device according to the present invention configured as described above will be described with reference to the accompanying drawings.

도 2는 본 발명의 실시 예에 따른 PLD를 이용한 공통 송수신 인터페이스에따른 시스템 구성을 나타낸 블록도이다.2 is a block diagram illustrating a system configuration based on a common transmit / receive interface using a PLD according to an embodiment of the present invention.

도 2를 참조하면, 본 발명은 CPU(10)와 주변 디바이스 1, 2(20, 30)사이에 PLD(40)를 구성하여, 상기 PLD(40)에서 디바이스 1, 2(20, 30)로부터 수신되는 데이터가 하나의 패킷이 될때까지 대기한후 CPU(10)로 한꺼번에 전송하도록 하였다.2, the present invention configures the PLD 40 between the CPU 10 and the peripheral devices 1, 2 (20, 30), and from the devices 1, 2 (20, 30) in the PLD 40; It waits until the received data becomes one packet and transmits it to the CPU 10 at once.

이때, 상기 디바이스는 패킷을 송수신하기 위한 상태 레지스터를 갖는데 각기 성질과 이름이 조금씩은 다르지만 PLD가 동작하는데 필요한 상태정보를 가지고 있으므로, 어떠한 디바이스와 PLD를 연결해 주어도 PLD에 구성되는 디바이스 인터페이스부에서의 맵핑만 잘 해주면 송수신동작을 원활히 할 수 있다.At this time, the device has a status register for transmitting and receiving a packet, each of which has a slightly different nature and name, but has the status information required for the PLD to operate, so no matter what device and the PLD is connected to the mapping in the device interface configured in the PLD If you do it well, you can send / receive smoothly.

상기 PLD(40)의 구성을 자세히 설명하면 도 3과 같다.The configuration of the PLD 40 will be described in detail with reference to FIG. 3.

도 3은 도 2의 PLD의 구성을 나타낸 블록도이다.3 is a block diagram showing the configuration of the PLD of FIG.

도 3을 참조하면, 다수의 주변 디바이스(20, 30)와 연결되어 각 디바이스와의 데이터 및 디바이스 상태정보를 송수신하기 위한 인터페이스를 제공하는 디바이스 인터페이스부(42)와, 상기 디바이스 인터페이스부(42)에서 수신한 디바이스 상태정보를 저장하는 디바이스 상태부(41)와, 상기 다수의 디바이스(20, 30)와 CPU(10)간의 데이터 송수신을 위한 인터럽트 신호를 제어하는 인터럽트 제어부(44)와, 상기 인터럽트 제어부(44)에 수신된 인터럽트를 판단하여 디바이스로부터의 데이터를 송수신 하도록 하는 주제어부(43)와, 상기 다수의 디바이스로부터 전송되는 데이터를 임시 저장하는 수신버퍼(47)와, 상기 CPU(10)에서 디바이스로 전송하는 데이터를 임시 저장하는 송신버퍼(46)와, 상기 수신버퍼(47)와 송신버퍼(46)의 데이터 저장 및 삭제를 관리하는 버퍼 에이전트(45)와, 상기 CPU(10)와의 인터페이스를 담당하는 CPU 인터페이스부(48)와, 상기 PLD(40)의 전체적인 상태정보를 나타내는 로직상태부(49)를 포함하여 구성되는 것을 특징으로 한다.Referring to FIG. 3, a device interface unit 42 connected to a plurality of peripheral devices 20 and 30 to provide an interface for transmitting and receiving data and device state information with each device, and the device interface unit 42. A device state unit 41 for storing device state information received by the controller; an interrupt controller 44 for controlling an interrupt signal for data transmission and reception between the plurality of devices 20 and 30 and the CPU 10; and the interrupt A main controller 43 for determining the interrupt received by the controller 44 to transmit and receive data from the device, a reception buffer 47 for temporarily storing data transmitted from the plurality of devices, and the CPU 10 Transmit buffer 46 for temporarily storing data to be transmitted from the device to the device, and buffer A for managing data storage and deletion of the receive buffer 47 and the transmit buffer 46 And a logic state unit 49 representing overall state information of the PLD 40, and a CPU interface unit 48 that is in charge of the interface with the CPU 10. .

상기와 같이 구성되는 PLD를 이용한 공통 송수신 인터페이스에서 디바이스와 CPU간의 데이터 송수신을 도 4 및 도 5와 같이 동작한다.4 and 5 operate data transmission and reception between the device and the CPU in the common transmission / reception interface using the PLD configured as described above.

도 4는 본 발명의 실시 예에 따른 PLD를 이용한 공통 송수신 인터페이스에서 CPU가 디바이스로부터 데이터를 수신하도록 하는 동작순서를 나타낸 플로우 차트이고, 도 5는 본 발명의 실시 예에 따른 PLD를 이용한 공통 송수신 인터페이스에서 CPU가 디바이스로 데이터 송신을 하는 동작순서를 나타낸 플로우 차트이다.4 is a flowchart illustrating an operation procedure of allowing a CPU to receive data from a device in a common transmit / receive interface using a PLD according to an embodiment of the present invention, and FIG. 5 is a common transmit / receive interface using a PLD according to an embodiment of the present invention. Is a flow chart showing the operation procedure of the CPU sending data to the device.

먼저, 도 4를 참조하여 디바이스 1(20)에서 데이터를 수신하면(S101), 수신된 데이터를 CPU(10)에서 수신하도록 인터럽트를 발생시킨다(S102).First, referring to FIG. 4, when data is received from the device 1 20 (S101), an interrupt is generated to receive the received data from the CPU 10 (S102).

상기 인터럽트는 PLD(40)의 인터럽트 제어부(44)로 전송되고(S103), 상기 PLD(40)의 주제어부(43)는 인터럽트 제어부(44)에 새로운 인터럽트가 수신되었음을 알고, 인터럽트의 종류를 판단하기 위해서 상기 디바이스 인터페이스부(42)로 디바이스 상태정보를 업데이트 할 것을 명령한다(S104).The interrupt is transmitted to the interrupt control section 44 of the PLD 40 (S103), and the main control section 43 of the PLD 40 knows that a new interrupt has been received by the interrupt control section 44, and determines the type of interrupt. In order to update the device status information to the device interface unit 42 in order to (S104).

상기 업데이트 명령에 따라 디바이스 인터페이스부(42)에서 디바이스의 상태를 파악하여 디바이스 상태부(41)에 저장하면(S105), 상기 주제어부(43)에서 디바이스 상태에 따라 수신된 인터럽트가 상기 디바이스1(20)에 새로운 패킷 데이터의 일부분이 수신되었다는 인터럽트 또는 패킷 데이터의 마지막 데이터가 수신되었다는 인터럽트인지를 판단하고(S106), 새로운 패킷 데이터의 일부분이 수신되었다는 인터럽트라면 상기 디바이스 1(20)의 수신버퍼를 로딩하고(S107), 버퍼에이전트(45)가 상기 로딩된 데이터를 수신버퍼(47)에 저장하도록 명령한다(S108).According to the update command, when the device interface unit 42 detects the state of the device and stores the state of the device in the device state unit 41 (S105), the interrupt received by the main control unit 43 according to the device state is the device 1 ( In step 20), it is determined whether an interrupt is received that a part of new packet data is received or an interrupt that the last data of the packet data is received (S106). If the interrupt is that a part of new packet data is received, the reception buffer of the device 1 (20) is Loading (S107), the buffer agent 45 instructs to store the loaded data in the reception buffer 47 (S108).

그러나, 상기 인터럽트가 패킷의 마지막 데이터 수신을 알리는 인터럽트라면, 주제어부(43)는 상기 디바이스 1(20)의 수신버퍼에 저장된 데이터를 로딩하고(S109), 버퍼 에이전트(45)에게 명령하여 수신버퍼(47)에 로딩된 데이터를 저장하도록 한후(S110), PLD 상태부(49)에 수신버퍼(47)에 전송할 패킷데이터가 있음을 표시하도록 한다(S111).However, if the interrupt is an interrupt indicating the reception of the last data of the packet, the main controller 43 loads the data stored in the reception buffer of the device 1 20 (S109), and instructs the buffer agent 45 to instruct the reception buffer. After storing the loaded data at 47 (S110), the PLD status unit 49 is to indicate that there is packet data to be transmitted to the reception buffer 47 (S111).

그리고 상기 인터럽트 제어부(44)에서 CPU(10)로 인터럽트를 전송하여 (S112), 상기 CPU(10)가 CPU 인터페이스부(48)를 통해 수신버퍼(47)의 패킷을 수신하도록 한다(S113).The interrupt controller 44 transmits an interrupt to the CPU 10 (S112), so that the CPU 10 receives a packet of the reception buffer 47 through the CPU interface unit 48 (S113).

또한, 상기 CPU(10)는 수신버퍼(47)의 데이터를 수신한 후에 수신버퍼(47)의 내용을 삭제하여(S114), 다른 디바이스로부터의 데이터를 수신할 수 있도록 한다.In addition, the CPU 10 deletes the contents of the reception buffer 47 after receiving the data of the reception buffer 47 (S114), so as to receive data from another device.

이것은 상기 수신버퍼(47)에 저장된 데이터가 잘못된 데이터인경우도 마찬가지로 수신버퍼(47)를 비우고, 다른 인터럽트를 기다리는 상태로 들어가는 것이다.This means that even when the data stored in the reception buffer 47 is wrong data, the reception buffer 47 is emptied and enters a state waiting for another interrupt.

한편, 상기 단계 S106에서 인터럽트의 종류가 데이터 수신과 관련 없는 에러 또는 다른 이벤트를 알리는 인터럽트인 경우는 상기 PLD 상태부(49)에 다른 부분의 이벤트라는 표시를 하도록 하고(S114), 인터럽트를 CPU(10)로 전달한다(S115).On the other hand, if the type of interrupt in step S106 is an interrupt indicating an error or other event not related to data reception, the PLD status unit 49 displays an event of another part (S114), and interrupts the CPU ( 10) (S115).

상기와 같이 디바이스로부터 데이터를 수신하는 CPU(10)가 디바이스 2(30)로 데이터를 전송할 때의 동작을 자세히 설명하면 다음과 같다.An operation when the CPU 10 receiving data from the device transmits data to the device 2 30 as described above will be described in detail as follows.

도 5를 참조하면, CPU(10)에서 디바이스 2(30)로 하나의 완전한 패킷을 전송하기 위해서는 우선 상기 PLD(40)의 송신버퍼(46)에 패킷 데이터를 저장하고(S201), PLD 상태부(49)에 디바이스 2(30)로 전송할 패킷이 있다는 표시를 하도록 한다(S202).Referring to FIG. 5, in order to transmit one complete packet from the CPU 10 to the device 2 30, first, packet data is stored in the transmission buffer 46 of the PLD 40 (S201), and the PLD state unit In operation S202, an indication that there is a packet to be transmitted to the device 2 30 is made.

상기와 같이 PLD 상태부(49)에 송신버퍼에 데이터가 있음을 표시하면, 주제어부(43)는 디바이스 2(30)의 상태가 데이터를 송신할 수 있는지를 파악해야 하므로, 디바이스 인터페이스부(42)로 디바이스 상태정보 업데이트를 요구하는 신호를 보내어(S203), 상기 디바이스 인터페이스부(42)에서 디바이스들(20, 30)의 상태를 파악한 후 디바이스 상태부(41)를 업데이트하도록 한다(S204).If the PLD status section 49 indicates that there is data in the transmission buffer, the main control section 43 needs to know whether the status of the device 2 30 can transmit data, so that the device interface section 42 In step S203, the device interface unit 42 checks the states of the devices 20 and 30 and updates the device state unit 41 (S204).

상기 주 제어부(43)는 업데이트된 디바이스 상태부(41)의 정보를 보고, 디바이스 2(30)에 데이터를 송신할 수 있는가를 판단하고(S205), 데이터를 송신할 수 있는 상태가 될 때까지 계속하여 주기적으로 디바이스 인터페이스부(42)로 디바이스 상태부(41) 업데이트를 요구하며 대기한다.The main controller 43 looks at the updated information of the device status unit 41, determines whether data can be transmitted to the device 2 30 (S205), and continues until it becomes a state capable of transmitting data. Periodically waiting for the device interface unit 42 to update the device status unit 41.

상기 디바이스 2(30)에 데이터를 송신할 수 있는 상태가 되면(S205), 주제어부(43)는 상기 디바이스 2(30)의 송신버퍼의 크기에 맞게 PLD의 송신버퍼(46)에 저장된 데이터를 분할하여(S206), 디바이스 2(30)의 송신버퍼로 전송한다(S207).When the data can be transmitted to the device 2 (30) (S205), the main control unit 43 is adapted to store the data stored in the transmission buffer 46 of the PLD in accordance with the size of the transmission buffer of the device 2 (30). The data is divided (S206) and transmitted to the transmission buffer of the device 2 (30) (S207).

주제어부(43)는 데이터 전송이 완료될 때까지 디바이스 상태 체크 및 데이터 전송을 되풀이하고, 전송이 완료되면(S208), 디바이스2(30)로부터 정상적으로 데이터 전송이 완료되었는가에 대한 인터럽트를 수신후(S209), 데이터 전송이 정상적으로 완료되었다는 인터럽트가 수신되면, PLD 상태부(49)에 데이터 전송이 완료되었음을 표시하고(S210), 송신버퍼(46)를 비운다(S211).The main control unit 43 repeats the device status check and data transmission until the data transmission is completed, and when the transmission is completed (S208), after receiving an interrupt indicating whether the data transmission is normally completed from the device 2 (30) ( In step S209, when an interrupt is received that data transmission is normally completed, the PLD status unit 49 indicates that data transmission is completed (S210), and the transmission buffer 46 is emptied (S211).

만약 디바이스 2(30)로부터 패킷송신 에러에 관한 인터럽트가 있으면 주제어부(43)는 패킷을 처음부터 다시 전송하게 된다(S203~S211).If there is an interrupt regarding the packet transmission error from the device 2 (30), the main control unit 43 transmits the packet again from the beginning (S203 to S211).

상기와 같이 PLD내의 송신버퍼와 수신버퍼를 이용하여 디바이스로부터 CPU로 수신되는 데이터를 한꺼번에 모아 CPU로 전달하고, CPU에서 디바이스로 전송하는 데이터를 한꺼번에 저장했다가 나누어 전송함으로써, CPU는 시스템동작에 관련한 기본동작을 할 시간을 많이 얻을 수 있어서 시스템의 성능을 더욱더 좋아지게 되는 것이다.As described above, by using the transmit buffer and the receive buffer in the PLD, the data received from the device to the CPU are collected and transferred to the CPU at once, and the data transmitted from the CPU to the device are stored at once and transmitted in a separate manner. The more time you take for basic operations, the better the performance of your system.

이상에서 설명한 바와 같이, 본 발명에 따른 PLD를 이용한 공통 송수신 인터페이스는 종래에 디바이스에서 CPU로 데이터를 전송할 때 디바이스에 구비된 작은 용량의 버퍼를 사용함으로써 여러 번에 걸쳐 CPU 에 인터럽트 신호를 보내고 데이터를 전송하고, CPU가 디바이스로 데이터를 전송할 때도 여러 번에 걸쳐 데이터를 전송해야하는 문제로 인해 CPU가 시스템의 기본동작을 위해 사용할 시간이 모자라서 시스템의 성능저하라는 문제가 생겼던 것을, 디바이스와 CPU사이에 PLD를 연결하여 PLD에서 여러 번에 걸쳐 CPU로 송수신 되었던 데이터를 한번에 송수신 되도록 하는 역할을 수행함으로써 상기 CPU에서 인터럽트 처리시간을 최소화하고 시스템의 기본동작을 위해 사용할 시간을 많이 갖도록 하여 시스템 성능을 크게 향상시킬 수 있는 효과가 있다.As described above, the common transmit / receive interface using the PLD according to the present invention transmits an interrupt signal to the CPU several times by using a small buffer provided in the device when transmitting data from the device to the CPU. The problem that the CPU has not enough time for the basic operation of the system due to the problem that the data has to be transmitted several times even when the CPU transmits data to the device has caused a problem of poor performance of the system. It connects PLD to transmit / receive data transmitted / received to / from CPU several times at once, minimizing interrupt processing time in CPU and making much time to use for basic operation of system. It can be effected.

Claims (5)

시스템의 전반적인 제어 및 기본 동작수행을 위한 CPU와;A CPU for overall control and basic operation of the system; 상기 CPU와의 패킷 데이터 송수신을 통해 시스템에 부가기능을 제공하는 다수의 디바이스와;A plurality of devices providing additional functions to the system by transmitting and receiving packet data with the CPU; 상기 다수의 디바이스와 CPU 사이에 연결되어, 각 디바이스로부터 인터럽트가 수신되면, 해당 디바이스의 상태 정보를 이용하여 상기 인터럽트의 종류를 판단하고, 그 판단결과에 따라 해당 디바이스로부터 전송된 패킷이 하나의 완전한 패킷 데이터가 될때까지 대기한 후, 한꺼번에 송수신을 수행하는 프로그램 가능한 로직 디바이스를 포함하여 구성되는 것을 특징으로 하는 PLD를 이용한 공통 송수신 인터페이스.Connected between the plurality of devices and the CPU, when an interrupt is received from each device, the type of the interrupt is determined using the state information of the corresponding device, and according to the determination result, a packet transmitted from the corresponding device is one complete. A common transmit / receive interface using a PLD, comprising a programmable logic device that waits for packet data and then transmits and receives at a time. 제 1항에 있어서, 상기 프로그램 가능한 로직 디바이스는,The device of claim 1, wherein the programmable logic device is 다수의 주변 디바이스와 연결되어, 각 디바이스와의 데이터 및 디바이스 상태정보를 송수신하기 위한 인터페이스를 제공하는 디바이스 인터페이스부와;A device interface unit connected to a plurality of peripheral devices and providing an interface for transmitting and receiving data and device state information with each device; 상기 디바이스 인터페이스부에서 수신한 디바이스상태정보를 저장하는 디바이스 상태부와;A device state unit which stores device state information received by the device interface unit; 상기 다수의 디바이스와 CPU간의 데이터 송수신을 위한 인터럽트 신호를 제어하는 인터럽트 제어부와;An interrupt controller for controlling interrupt signals for data transmission and reception between the plurality of devices and the CPU; 상기 인터럽트 제어부에 수신된 인터럽트를 판단하여 디바이스로부터의 데이터를 송수신 하도록 하는 주제어부와;A main controller configured to determine an interrupt received by the interrupt controller to transmit and receive data from a device; 상기 다수의 디바이스로부터 전송되는 데이터를 임시 저장하는 수신버퍼와;A reception buffer for temporarily storing data transmitted from the plurality of devices; CPU에서 상기 디바이스로 전송하는 데이터를 임시 저장하는 송신버퍼와;A transmission buffer for temporarily storing data transmitted from the CPU to the device; 상기 수신버퍼와 송신버퍼의 데이터 저장 및 삭제를 관리하는 버퍼 에이전트와;A buffer agent managing data storage and deletion of the receiving buffer and the transmitting buffer; 상기 CPU와의 인터페이스를 담당하는 CPU 인터페이스부와;A CPU interface unit in charge of interfacing with the CPU; 상기 PLD의 전체적인 상태정보를 나타내는 로직상태부를 포함하여 구성되는 것을 특징으로 하는 PLD를 이용한 공통 송수신 인터페이스.And a logic state unit indicating overall state information of the PLD. 복수의 디바이스와 CPU사이에 구비된 PLD를 이용하여 패킷 데이터 송수신을 수행하는 방법에 있어서,In the method for performing packet data transmission and reception using a PLD provided between a plurality of devices and the CPU, 상기 디바이스에서 상기 CPU로 전송할 패킷 데이터가 발생하여 인터럽트를 발생시키는 단계;Generating an interrupt by generating packet data to be transmitted from the device to the CPU; 상기 디바이스에서 발생된 인터럽트가 PLD에 수신되면, 상기 PLD에서 상기 디바이스의 상태 정보를 이용하여 상기 수신된 인터럽트 종류를 판단하는 단계;If an interrupt generated in the device is received in a PLD, determining the received interrupt type by using status information of the device in the PLD; 상기 판단결과 상기 인터럽트가 해당 패킷 데이터의 마지막 패킷 수신에 관한 인터럽트이면, 상기 디바이스에 저장된 패킷 데이터를 로딩하여 수신버퍼에 저장한 후, 전송패킷 대기 표시를 하고, 상기 CPU로 인터럽트를 전송하는 단계;If it is determined that the interrupt is an interrupt for receiving the last packet of the packet data, loading the packet data stored in the device and storing the packet data in the reception buffer, indicating a waiting for a transmission packet, and transmitting the interrupt to the CPU; 상기 CPU에서 상기 PLD로부터 전송된 인터럽트가 수신되면, 상기 저장된 패킷 데이터를 수신한 후, 상기 수신버퍼의 내용을 삭제하는 단계를 포함하여 구성되는 PLD를 이용한 공통 송수신 인터페이스 방법.And receiving the stored packet data and deleting the contents of the reception buffer when the interrupt transmitted from the PLD is received by the CPU. 제 3항에 있어서, 상기 판단결과 상기 인터럽트가 패킷 데이터의 일부분 패킷 수신에 관한 인터럽트이면, 상기 패킷을 수신버퍼에 저장하고, 다음 패킷 수신을 기다리는 것을 특징으로 하는 PLD를 이용한 공통 송수신 인터페이스 방법.4. The method of claim 3, wherein if the interrupt is an interrupt for receiving a packet of a portion of the packet data, the packet is stored in a receiving buffer and the next packet is received. 제 3항에 있어서, 상기 CPU에서 디바이스로 패킷 데이터를 전송할 경우,The method of claim 3, wherein the packet data is transmitted from the CPU to a device. CPU에서 PLD의 송신버퍼에 상기 패킷 데이터를 저장하고, 디바이스에 전송할 데이터가 있음을 표시하는 단계;Storing, at a CPU, the packet data in a transmission buffer of a PLD, and indicating that there is data to be transmitted to a device; 상기 PLD에서 상기 패킷 데이터를 송신할 목적지 디바이스의 상태정보를 업데이트하고, 전송이 가능한 경우 디바이스의 버퍼크기에 맞도록 패킷으로 분할하여 전송하는 단계;Updating the state information of a destination device to which the packet data is to be transmitted in the PLD, and if possible, dividing the packet data into packets according to a buffer size of the device; 상기 분할된 패킷을 모두 전송하고, 전송완료에 대한 인터럽트를 상기 디바이스로부터 수신한 후, 패킷 데이터 전송완료를 표시하고, 송신버퍼의 내용을 삭제하는 단계를 포함하여 구성되는 것을 특징으로 하는 PLD를 이용한 공통 송수신 인터페이스 방법.Transmitting all the divided packets, receiving an interrupt for transmission completion from the device, indicating completion of packet data transmission, and deleting contents of the transmission buffer. Common transmit and receive interface method.
KR10-2001-0070648A 2001-11-14 2001-11-14 Common communication interface by programable logic divice KR100429265B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0070648A KR100429265B1 (en) 2001-11-14 2001-11-14 Common communication interface by programable logic divice

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0070648A KR100429265B1 (en) 2001-11-14 2001-11-14 Common communication interface by programable logic divice

Publications (2)

Publication Number Publication Date
KR20030039644A KR20030039644A (en) 2003-05-22
KR100429265B1 true KR100429265B1 (en) 2004-04-29

Family

ID=29569327

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0070648A KR100429265B1 (en) 2001-11-14 2001-11-14 Common communication interface by programable logic divice

Country Status (1)

Country Link
KR (1) KR100429265B1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20210007503A (en) * 2019-07-11 2021-01-20 에스케이하이닉스 주식회사 Memory controller and memory system having the memory controller

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09259068A (en) * 1996-03-25 1997-10-03 Sharp Corp Extended input and output interface
KR19990032586U (en) * 1997-12-31 1999-07-26 서평원 Memory map change circuit
US6038663A (en) * 1995-11-29 2000-03-14 Zf Microsystems, Inc. IBM PC compatible multi-chip module
KR20010037569A (en) * 1999-10-18 2001-05-15 서평원 System Stabilizing Circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6038663A (en) * 1995-11-29 2000-03-14 Zf Microsystems, Inc. IBM PC compatible multi-chip module
JPH09259068A (en) * 1996-03-25 1997-10-03 Sharp Corp Extended input and output interface
KR19990032586U (en) * 1997-12-31 1999-07-26 서평원 Memory map change circuit
KR20010037569A (en) * 1999-10-18 2001-05-15 서평원 System Stabilizing Circuit

Also Published As

Publication number Publication date
KR20030039644A (en) 2003-05-22

Similar Documents

Publication Publication Date Title
US5732094A (en) Method for automatic initiation of data transmission
US5513368A (en) Computer I/O adapters for programmably varying states of peripheral devices without interfering with central processor operations
US20080209084A1 (en) Hardware-Based Concurrent Direct Memory Access (DMA) Engines On Serial Rapid Input/Output SRIO Interface
US7155550B2 (en) Program-executing apparatus and portable information processing apparatus
JPH0824320B2 (en) Method and device for buffer chaining in communication control device
CN111930678A (en) Data transmission method and device, electronic equipment and storage medium
EP1988460A1 (en) Apparatus for and method of distributing instructions
US20080082685A1 (en) Receive coalescing and direct data placement
WO2005036313A2 (en) Queue register configuration structure
CN113010470A (en) Edge node remote control system, method, device and storage medium
KR100429265B1 (en) Common communication interface by programable logic divice
US6775723B2 (en) Efficient reading of a remote first in first out buffer
CN113794713B (en) Communication processing method for bridging MIL-STD-1553 and UART by FC-AE-1553 protocol
EP1454472A2 (en) Communications device, method and program for receiving process execution, and computer-readable recording medium having same program recorded thereon
CN113806112A (en) SPI asynchronous communication scheduling method, device, equipment and storage medium
JPH08202566A (en) Inter-processor communication system
US8433832B2 (en) Control equipment with communication apparatus
CN100495373C (en) Virtual first-in first-out direct storage accessing device
KR100898345B1 (en) Packet receiver hardware apparatus for tcp offload engine and system and method based on ??? packet receive hardware
JP6835758B2 (en) Flow control device and method
JPH11196097A (en) Data communication control device and method therefor
KR100438104B1 (en) Communication method with one serial port in many communication modes
CN102195783A (en) Network interface card capable of sharing buffer and buffer sharing method
CN114465891A (en) Multi-mode communication configuration method of communication box and terminal equipment
KR20040011072A (en) File update system and method

Legal Events

Date Code Title Description
A201 Request for examination
N231 Notification of change of applicant
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: 20090331

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee