KR20050089117A - Method to transmit data in pci 2.2 using prefetch request - Google Patents

Method to transmit data in pci 2.2 using prefetch request Download PDF

Info

Publication number
KR20050089117A
KR20050089117A KR1020040014293A KR20040014293A KR20050089117A KR 20050089117 A KR20050089117 A KR 20050089117A KR 1020040014293 A KR1020040014293 A KR 1020040014293A KR 20040014293 A KR20040014293 A KR 20040014293A KR 20050089117 A KR20050089117 A KR 20050089117A
Authority
KR
South Korea
Prior art keywords
data
pci
target device
bus master
bus
Prior art date
Application number
KR1020040014293A
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 KR1020040014293A priority Critical patent/KR20050089117A/en
Publication of KR20050089117A publication Critical patent/KR20050089117A/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/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4004Coupling between buses
    • G06F13/4027Coupling between buses using bus bridges
    • G06F13/405Coupling between buses using bus bridges where the bridge performs a synchronising function
    • G06F13/4059Coupling between buses using bus bridges where the bridge performs a synchronising function where the synchronisation uses buffers, e.g. for speed matching between buses

Landscapes

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

Abstract

본 발명은 PCI 2.2에서 프리페치 요구를 이용하여 데이터의 전송효율을 향상시키도록 한 것으로, 버스 마스터의 메모리 쓰기 명령을 이용하여 다음에 요구할 메모리 읽기 명령의 어드레스와 읽을 데이터의 양을 타겟 디바이스에 미리 알려줄 수 있도록 하여 타겟 디바이스에서 전송할 데이터의 정확한 양을 준비할 수 있도록 한다.The present invention is to improve the data transfer efficiency by using the prefetch request in PCI 2.2, the address of the next memory read command and the amount of data to be read in advance to the target device by using the memory write command of the bus master This allows you to prepare the exact amount of data to send from the target device.

버스 마스터는 메모리 쓰기 명령을 이용하여 다음에 요구할 메모리 읽기 명령의 어드레스와 읽을 데이터의 크기를 프리페치 제어 레지스터에 저장하는 단계; 상기 프리페치 제어 레지스터에 저장된 정보를 이용하여 타겟 디바이스로부터 해당 데이터를 프리페치하여 버퍼에 저장하는 단계; 상기 타겟 디바이스는 버스 마스터로부터 인가된 메모리 읽기 명령을 수신하여 프리페치된 데이터를 버스 마스터로 전송하는 단계;로 이루어지는 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 관한 것이다.The bus master using a memory write command to store an address of a memory read command to be requested next and a size of data to be read in a prefetch control register; Prefetching corresponding data from a target device using information stored in the prefetch control register and storing the data in a buffer; The target device relates to a data transmission method using a prefetch request in PCI 2.2, comprising: receiving a read command applied from a bus master and transmitting prefetched data to the bus master.

Description

PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법{Method to transmit data in PCI 2.2 using prefetch request}Method to transmit data in PCI 2.2 using prefetch request}

본 발명은 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 관한 것으로, 보다 상세하게는 버스 마스터의 메모리 쓰기 명령을 이용하여 다음에 요구할 메모리 읽기 명령의 어드레스와 읽을 데이터의 양을 타겟 디바이스에 미리 알려주는 프리페치 요구를 이용하여 보다 효율적으로 데이터를 전송할 수 있도록 한 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 관한 것이다.The present invention relates to a data transfer method using a prefetch request in PCI 2.2. More specifically, the address of a memory read command to be requested next and the amount of data to be read are notified to the target device in advance by using a memory write command of a bus master. The present invention relates to a data transmission method using a prefetch request in PCI 2.2, which enables more efficient data transmission using a prefetch request.

일반적으로 PCI(Peripheral component interconnect) 버스는 데이터 전송을 위한 버스로서 이전의 베사-로컬 버스 방식의 느린 데이터 전송속도를 개선한 데이터 전송버스로서, 중앙처리장치(CPU)가 호스트-PCI 브리지(Host-PCI bridge), 아비터(Arbiter)를 통하여 PCI 버스에 접속되고, PCI 장치가 PCI 버스에 접속된 이러한 형태의 PCI 버스 시스템이 구성되는데, 이러한 PCI 버스 시스템에서 확장 버스 브리지가 종종 PCI 버스에 접속되는 한편, 확장장치가 확장버스를 통하여 이러한 확장 버스 브리지에 접속된다.Generally, Peripheral Component Interconnect (PCI) bus is a data transmission bus that improves the slow data transmission speed of the previous Besa-local bus method as a bus for data transmission, and the CPU is a host-PCI bridge. This type of PCI bus system consists of a PCI bridge, an Arbiter connected to the PCI bus, and a PCI device connected to the PCI bus. In such a PCI bus system, an expansion bus bridge is often connected to the PCI bus. The expansion device is connected to this expansion bus bridge via an expansion bus.

상기 PCI 버스는 CPU와 독립적으로 동작하도록 되어 있고 일반적으로 32bit 버스 폭을 지원하면서 33MHz서 동작하는데, 근래에 들어와서 CPU와 메모리의 성능이 향상되고 네트워크 카드 및 디스크 컨트롤러 등을 포함한 주변장치들이 고성능화 됨에 따라 이들을 연결하는 PCI 버스가 전체 시스템의 병목현상이 되고 있어 보다 효율적인 버스활용을 위해 PCI-X 인터페이스가 개발되어 고속 데이터 전송을 요구하는 서버나 워크스테이션 등에 사용되고 있다.The PCI bus is designed to operate independently of the CPU and generally operates at 33 MHz with 32-bit bus width. In recent years, the performance of the CPU and memory has been improved, and peripheral devices including network cards and disk controllers have been improved. As a result, the PCI bus that connects them becomes a bottleneck for the entire system, and a PCI-X interface has been developed for more efficient bus utilization and is used for servers and workstations that require high-speed data transfer.

하지만 대부분의 컴퓨터는 아직까지 PCI 2.2 버스를 지원하고 있으며, 셋톱박스, 통신 시스템, 실시간 시스템, 공장 자동화 시스템 등 다양한 분야에서도 PCI 2.2 버스가 응용되고 있으며, PCI-X는 PCI 2.2 프로토콜을 지원하는 디바이스에 옵션으로 추가 지원되는 프로토콜이기 때문에 모든 PCI-X 디바이스는 PCI 2.2 프로토콜을 지원함으로 인해 PCI 2.2 버스의 성능이 전체 시스템의 성능에 많은 영향을 미치게 된다.However, most computers still support the PCI 2.2 bus, and the PCI 2.2 bus is also applied in various fields such as set-top boxes, communication systems, real-time systems, and factory automation systems. PCI-X supports the PCI 2.2 protocol. As an optional additional protocol, all PCI-X devices support the PCI 2.2 protocol, so the performance of the PCI 2.2 bus will greatly affect the performance of the entire system.

PCI 2.2 버스 마스터가 타겟 디바이스로부터 데이터를 읽어 오고자 할 때 타겟 디바이스는 내부적으로 전송할 데이터를 준비하게 되는데, 버스 마스터가 타겟 디바이스에 메모리 읽기 명령을 요구한 경우 타겟 디바이스는 데이터를 전송해주기 위해서 내부적으로 데이터를 준비하게 되는데, 특히 로컬 버스를 가지는 PCI 디바이스인 경우 로컬 디바이스로부터 데이터를 읽어와야 할 시간이 필요하기 때문에 그 동안 아무런 데이터 전송없이 PCI 버스를 점유하고 있어야 하고, 만일 로컬 버스가 느리게 동작하는 경우라면 데이터를 전송하기 위해 PCI 버스를 장시간 점유하는 상황이 발생하기 때문에 버스 사용효율 및 데이터 전송효율이 저하된다.When the PCI 2.2 bus master wants to read data from the target device, the target device prepares the data for internal transmission. When the bus master requests a memory read command from the target device, the target device internally transmits the data. Data is prepared. Especially for PCI device with local bus, it needs time to read data from local device. So, it should occupy PCI bus without any data transfer. If local bus is slow Ramen occupies the PCI bus for a long time to transmit data, which reduces bus utilization and data transmission efficiency.

이로 인해 PCI 2.2 사양에서는 도1ab에 도시된 바와 같이 딜레이드 트랜잭션(Delayed Transaction) 메카니즘을 사용하게 되는데, 도1a에 도시된 바와 같이 먼저 버스 마스터 A가 타겟 디바이스 B에 메모리 읽기 명령을 요구하면, 타겟 디바이스 B는 데이터를 전송할 수 없음을 알리기 위해 리트라이 죵료로 프로토콜을 종료하게 되고, 타겟 디바이스 B는 기억해둔 어드레스를 이용하여 자체적으로 데이터를 준비하기 시작하는데 이를 프리페치(Prefetch)라고 하는데, 타겟 디바이스에 의해 데이터의 전송 준비가 완료하게 되면, 버스 마스터 A가 동일한 메모리 읽기 명령을 다시 요구해 올 경우 도1b에 도시된 바와 같이 준비된 데이터를 전송하게 된다.As a result, the PCI 2.2 specification uses a delayed transaction mechanism as shown in FIG. 1A. When the bus master A requests a memory read command from the target device B as shown in FIG. Device B terminates the protocol with a retry process to indicate that data cannot be transmitted. Target device B starts to prepare data by itself using the address that it remembers. This is called prefetch. When the data master is ready to transfer data, the bus master A transmits the prepared data as shown in FIG. 1B when the bus master A requests the same memory read command again.

상기 PCI 2.2에서 사용되는 딜레이드 트랜잭션 메커니즘은 타겟 디바이스 B가 버스 마스터 A에 의해 요청된 데이터를 자체적으로 준비를 하는 동안 버스 마스터 A가 다른 타겟 디바이스와 데이터 전송을 하거나 또는 버스 마스터 B가 PCI 버스를 사용할 수 있기 때문에 PCI 버스의 사용 효율을 향상시킬 수 있도록 한다.The delay transaction mechanism used in PCI 2.2 is used when bus master A transfers data with another target device while target device B prepares data requested by bus master A, or bus master B It can be used to improve the efficiency of the PCI bus.

하지만 상기 딜레이드 트랜잭션 메커니즘을 PCI 2.2에서 사용하는 경우 다음과 같은 문제점이 있다.However, when the delayed transaction mechanism is used in PCI 2.2, there are the following problems.

첫 번째, 버스 마스터가 읽어려는 데이터에 비해 타겟 디바이스가 프리페치 해둔 데이터가 적은 경우 타겟 디바이스는 더 이상 전송해 줄 수 있는 데이터가 없으므로 디스커넥트 종료로 프로토콜을 종료하게 되고, 일정 시간 경과 후 버스 마스터는 아비터로부터 다시 버스 사용권을 인가받아 나머지 데이터 전송을 위해 읽기 명령으로 데이터를 요구하게 되는데, 결국 버스 마스터가 다시 버스 사용권을 인가받는 시간과 타겟 디바이스가 리트라이 종료로 프로토콜을 종료한 후, 다시 프리페치해야 하므로 전체 데이터 전송효율이 저하되고, 이는 버스 마스터가 한번에 많은 양의 데이터를 읽어오고자 할 때는 버스 사용효율 및 데이터 전송효율이 더욱 저하되는 문제점이 있다.First, if there is less data prefetched by the target device than the data that the bus master wants to read, the target device will no longer be able to transmit data, so the protocol will be terminated by disconnection. The bus is again licensed by the arbiter and requests data as a read command for the rest of the data transfer.As a result, when the bus master is again licensed by the bus and the target device terminates the protocol by retrying, the protocol is free again. Since the data must be fetched, the overall data transfer efficiency is lowered, which causes a problem that the bus utilization and data transfer efficiency are further reduced when the bus master attempts to read a large amount of data at one time.

두 번째, 버스 마스터가 타겟 디바이스에 의해 프리페치되어진 데이터 보다 적은 양의 데이터를 읽고 프로토콜을 종료하는 경우, 이 때 타겟 디바이스가 아직 하위 버스로부터 데이터를 프리페치 하는 중이라면 즉시 종료하고, 타겟 디바이스가 이미 프리페치 해둔 남은 데이터는 모두 폐기되는데, 이는 버스 마스터가 타겟 디바이스로부터 남은 데이터를 다시 읽어갈 것이라는 보장이 없기 때문에 버스 마스터가 원하는 데이터를 모두 읽고 완료종료로 종료하게 되면 더 이상 데이터를 읽어갈 필요가 없어 타겟 디바이스가 남은 데이터를 폐기하여도 아무런 문제가 없게된다.Second, if the bus master reads less data than the data prefetched by the target device and terminates the protocol, then if the target device is still prefetching data from the lower bus, it immediately terminates and the target device Any remaining data already prefetched is discarded, since there is no guarantee that the bus master will reread the remaining data from the target device. There is no problem even if the target device discards the remaining data.

만일 버스 마스터가 많은 양의 데이터를 읽어 가려고 하였지만 버스 마스터의 내부적인 문제나 타임아웃 종료로 불가피하게 프로토콜을 종료하게 되는 경우 버스 마스터는 분명히 남은 데이터 전송을 위해 다시 메모리 읽기 명령을 요구해 올 것인데, 이미 타겟 디바이스는 남은 데이터를 모두 폐기하였기 때문에 전송해 줄 데이터가 없게 되어 결국 버스 사용 및 데이터 전송효율이 저하되는 문제점이 있다.If the bus master attempts to read a large amount of data but inevitably terminates the protocol due to an internal problem or a timeout termination of the bus master, the bus master will definitely request a memory read command again for the remaining data transfer. Since the target device discards all remaining data, there is no data to transmit, resulting in a decrease in bus usage and data transmission efficiency.

본 발명은 상기의 종래 문제점을 해결하기 위해 안출한 것으로, 버스 마스터는 타겟 디바이스에 데이터의 전송량에 대한 정확한 정보를 제공하여 미리 프리페치할 수 있도록 하여 전송될 데이터의 양이 많거나 다양한 사정으로 프로토콜이 종료된 경우에도 정확한 데이트의 양을 프리페치할 수 있도록 함으로써, 데이터 전송효율 및 버스의 사용효율성을 향상시키도록 하는데 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned conventional problem, and the bus master provides accurate information on the amount of data transmission to the target device so that it can be prefetched in advance so that the protocol is large or various. Even when this is done, it is possible to prefetch the correct amount of data, thereby improving the data transfer efficiency and the bus usage efficiency.

상기의 목적을 달성하기 위하여 PCI 2.2에서 데이터를 전송하는 방법에 있어서, 버스 마스터는 메모리 쓰기 명령을 이용하여 다음에 요구할 메모리 읽기 명령의 어드레스와 읽을 데이터의 크기를 프리페치 제어 레지스터에 저장하는 단계; 상기 프리페치 제어 레지스터에 저장된 정보를 이용하여 타겟 디바이스로부터 해당 데이터를 프리페치하여 버퍼에 저장하는 단계; 상기 타겟 디바이스는 버스 마스터로부터 인가된 메모리 읽기 명령을 수신하여 프리페치된 데이터를 버스 마스터로 전송하는 단계;로 이루어지는 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 관한 것이다.A method for transferring data in PCI 2.2 to achieve the above object, the method comprising: a bus master using a memory write command to store the address of a memory read command to be requested next and the size of data to be read in a prefetch control register; Prefetching corresponding data from a target device using information stored in the prefetch control register and storing the data in a buffer; The target device relates to a data transmission method using a prefetch request in PCI 2.2, comprising: receiving a read command applied from a bus master and transmitting prefetched data to the bus master.

이하, 도면을 참조하여 본 발명에 적용되는 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 대하여 상세히 설명한다.Hereinafter, a data transmission method using a prefetch request in PCI 2.2 applied to the present invention will be described in detail with reference to the accompanying drawings.

도2ab는 본 발명에 적용되는 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송과정을 도시한 구성도이고, 도3ab는 본 발명의 일실시례에 의해 구현되는 C언어를 이용한 클럭단위로 동작하는 행위모델을 도시한 구성도이고, 도4는 본 발명의 일실시례에 의해 구현되는 프리페치 데이터의 크기에 따른 클럭수를 도시한 그래프이고, 도5는 본 발명의 일실시례에 의해 구현되는 로컬 버스 지연에 따른 데이터 전송속도를 도시한 그래프이고, 도6은 본 발명의 일실시례에 의해 구현되는 데이터의 분할 전송에 따른 데이터의 전송속도를 도시한 그래프이다.Figure 2ab is a block diagram showing a data transmission process using a prefetch request in PCI 2.2 applied to the present invention, Figure 3ab is a behavior model that operates in clock units using the C language implemented by an embodiment of the present invention 4 is a graph illustrating the number of clocks according to the size of prefetch data implemented by an embodiment of the present invention, and FIG. 5 is a local bus implemented by an embodiment of the present invention. 6 is a graph illustrating a data transmission rate according to a delay, and FIG. 6 is a graph illustrating a data transmission rate according to divided transmission of data implemented by an embodiment of the present invention.

도시된 바와 같이 버스 마스터(10)는 메모리 쓰기 명령을 이용하여 요구할 메모리 읽기 명령의 어드레스와 데이터 크기를 프리페치 제어 레지스터(30)에 저장하고, 타겟 디바이스(20)는 이를 이용하여 데이터를 프리페치하여 버퍼(40)에 저장한 후, 버스 마스터(10)로부터 메모리 읽기 명령을 요구받게 되는 경우 프리페치된 데이터를 버스 마스터(10)에게 전송할 수 있도록 한다.As shown, the bus master 10 stores the address and data size of a memory read command to be requested using a memory write command in the prefetch control register 30, and the target device 20 uses the data to prefetch data. After storing the buffer 40 in the buffer 40, the prefetched data can be transmitted to the bus master 10 when a memory read command is requested from the bus master 10.

상기 버스 마스터(10)는 입출력 콘트롤러 내에 있는 프로그램으로 컴퓨터 버스 또는 입출력 회로 상의 데이터 흐름을 직접 관장하여 버스 회로 상에 있는 주소와 제어신호 흐름 등을 제어할 수 있도록 하는 역활을 한다.The bus master 10 is a program in the input / output controller that directly manages the data flow on the computer bus or the input / output circuit to control the address and control signal flow on the bus circuit.

상기 타겟 디바이스(20)는 메모리 읽기 명령을 수행하고자 하는 버스 마스터(10)가 메모리 쓰기 명령을 이용하여 읽어올 데이터의 양을 타겟 디바이스(20)에 미리 알려주는 프리페치 요구를 이용해 데이터를 효율적으로 전송할 수 있도록 프리페치 제어 레지스터(30)와 버퍼(40)를 구성할 수 있도록 한다.The target device 20 efficiently uses the prefetch request that informs the target device 20 of the amount of data to be read by the bus master 10 to perform a memory read command in advance using the memory write command. The prefetch control register 30 and the buffer 40 can be configured for transmission.

상기 프리페치 제어 레지스터(30)는 버스 마스터(10)의 프리페치 요구를 지원하기 위한 내부 컨트롤 레지스터로서, 메모리 읽기 명령을 수행하고자 하는 버스 마스터(10)의 메모리 쓰기 명령을 이용하여 다음에 요구되어질 메모리 읽기 명령의 어드레스와 데이터의 크기를 저장할 수 있도록 하는데, 이를 통상 프리페치 요구라 말한다.The prefetch control register 30 is an internal control register for supporting a prefetch request of the bus master 10. The prefetch control register 30 may be requested next by using a memory write command of the bus master 10 to perform a memory read command. The address of the memory read command and the size of data can be stored, which is commonly referred to as a prefetch request.

상기 버퍼(40)는 프리페치 제어 레지스터(30)에 프리페치를 위한 어드레스와 데이터의 크기 정보가 저장되면, 상기 정보를 이용하여 타겟 디바이스(20)에 의해 로컬 디바이스로부터 해당 데이터가 프리페치되어 저장될 수 있도록 한다.When the address for prefetch and size information of the data are stored in the prefetch control register 30, the buffer 40 stores the corresponding data from the local device by the target device 20 using the information. To be possible.

이상과 같이 본 발명의 일실시례에 의해 구성된 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 대하여 상세히 설명한다.As described above, a data transmission method using a prefetch request in PCI 2.2 configured according to an embodiment of the present invention will be described in detail.

도2a에 도시된 바와 같이 버스 마스터(10)는 메모리 읽기 명령을 수행하기 위해서 먼저 메모리 쓰기 명령을 이용하여 다음에 요구할 메모리 읽기 명령의 어드레스와 읽을 데이터의 크기를 프리페치 제어 레지스터(30)에 저장하는데, 이를 통상적으로 프리페치 요구라고 하며, 상기 프리페치 제어 레지스터(30)에 프리페치를 위한 어드레스와 데이터 크기 정보가 저장되면, 타겟 디바이스(20)는 이를 이용하여 로컬 디바이스로부터 해당 데이터를 프리페치하여 버퍼(40)에 저장하게 된다.As shown in FIG. 2A, the bus master 10 first stores a memory read command address and a size of data to be read in the prefetch control register 30 using a memory write command. This is commonly referred to as a prefetch request. When the address and data size information for prefetch are stored in the prefetch control register 30, the target device 20 uses the same to prefetch the corresponding data from the local device. To be stored in the buffer 40.

상기와 같이 버퍼(40)에 해당 데이터가 프리페치되어지면, 도2b에 도시된 바와 같이 버스 마스터(10)는 메모리 읽기 명령을 타겟 디바이스(20)에 요구하게 되는데, 이 때 타겟 디바이스(20)가 전송할 데이터를 프리페치하지 못했을 경우에는 리트라이 종료로 프로토콜을 종료하게 되고, 만약 전송할 데이터가 프리페치되어 있는 경우에 버스 마스터(10)에게 해당 데이터를 전송하게 된다.When the data is prefetched into the buffer 40 as described above, the bus master 10 requests a memory read command to the target device 20 as shown in FIG. 2B, and at this time, the target device 20 If it fails to prefetch the data to be transmitted, the protocol is terminated by retry termination. If the data to be transmitted is prefetched, the corresponding data is transmitted to the bus master 10.

본 발명에 의한 PCI 2.2에서 프리페치를 이용한 데이터 전송방법은 타겟 디바이스(10)가 몇 개의 데이터를 프리페치 해야 될 지를 정확하게 알 수 있기 때문에 딜레이드 트랜잭션 메커니즘에서 발생할 수 있는 문제점을 해결할 수 있다. 즉, 딜레이드 트랜잭션에서 버스 마스터(10)가 읽어가려는 데이터에 비해 타겟 디바이스(20)가 프리페치 해 둔 데이터가 적거나 많은 경우, 타겟 디바이스(20)가 많은 양의 데이터를 프리페치 해 둔다면 전송효율이 향상될 수 있겠지만, 상기의 경우 버스 마스터(10)가 요구할 데이터의 양이 얼마인지도 모른체 항상 많은 양의 데이터를 프리페치 해야 함으로 인해 버퍼 및 로컬 버스효율이 저하되는 문제점이 발생하게 된다.The data transmission method using prefetch in PCI 2.2 according to the present invention can solve the problem that may occur in the delay transaction mechanism because the target device 10 can know exactly how many data to prefetch. That is, when the target device 20 has less or more data prefetched compared to the data that the bus master 10 intends to read in the delay transaction, if the target device 20 prefetches a large amount of data, the data is transmitted. Although the efficiency may be improved, in this case, a problem arises in that the buffer and local bus efficiency are deteriorated due to the need to always prefetch a large amount of data regardless of how much data the bus master 10 requires.

또한 버스 마스터(10)가 많은 양의 데이터를 읽어 가려고 하였으나 타임아웃 종료나 버스 마스터(10) 내부 버퍼의 공간 부족 등으로 인해 불가피하게 프로토콜을 종료한 경우, 본 발명에 의한 방법에서는 타겟 디바이스(20)가 나머지 데이터를 폐기하지 않고 버스 마스터(10)가 다시 읽어갈 때까지 기다리게 되고, 버스 마스터(10)가 요구한 모든 데이터를 타겟 디바이스(20)가 프리페치 하지 못하게 되면 나머지 데이터를 계속 프리페치하면 되는데, 이 경우 버스 마스터(10)가 얼마만큼의 데이터를 읽어갈지를 미리 정확히 알려주기 때문에 얼마 후 남은 데이터 전송을 하기 위해 반드시 다시 메모리 읽기 명령을 요구할 것이기 때문이다.In addition, when the bus master 10 attempts to read a large amount of data but inevitably terminates the protocol due to a timeout end or a lack of space in the internal buffer of the bus master 10, the method according to the present invention uses the target device 20. ) Waits for the bus master 10 to read back without discarding the remaining data, and if the target device 20 fails to prefetch all the data requested by the bus master 10, the data continues to be prefetched. In this case, since the bus master 10 accurately tells in advance how much data to read, it will always require a memory read command again for the remaining data transfer.

아래에서는 본 발명의 일실시례에 의해 구성된 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 대한 다양한 실시례에 대하여 상세히 설명한다.Hereinafter, various embodiments of a data transmission method using a prefetch request in PCI 2.2 configured according to an embodiment of the present invention will be described in detail.

본 발명에 의한 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법에 대한 실험을 위해 도3a에 도시된 바와 같이 아비터, PCI 2.2 버스 마스터, PCI 2.2 타겟 디바이스 그리고 로컬 디바이스를 C언어를 이용하여 클럭단위로 동작하는 행위모델로 구현되게 하며, 각 C모델들을 Verilog 시뮬레이터 PLI(Programming Language Interface)를 이용하여 연결되게 한다.In order to experiment with a data transmission method using a prefetch request in PCI 2.2 according to the present invention, as shown in FIG. 3A, the arbiter, the PCI 2.2 bus master, the PCI 2.2 target device, and the local device are clocked using the C language. Each model is connected to each other using Verilog Simulator PLI (Programming Language Interface).

전체 시뮬레이션 환경은 도3b에 도시된 바와 같이 테스트 벡터는 사용자가 직접 파일로 작성하거나 또는 랜던 발생기에 의해 파일로 자동 생성이 되며, 이 파일에는 PCI 버스 마스터가 수행하기 위한 명령어들이 열거되어 있는데, 예를 들면 로컬 메모리 300번지로부터 84 바이트의 데이터를 읽어 PCI 타겟 디바이스 100번지로 전송하도록 하려면 mWrite 0x100, 0x300, 84 라고 코팅하고, 이 명령어를 테스트 벡터 파일로부터 읽은 버스 마스터(10)는 아비터로부터 버스 사용권을 획득한 후 메모리 쓰기 명령어를 수행하며, 메모리 쓰기 명령어를 모두 수행하게 되면, PCI 버스 마스터는 벡터에서 다음 명령어를 읽어 수행하게 된다.The entire simulation environment is a test vector written by the user or automatically generated by a random generator, as shown in Figure 3b, which lists instructions for the PCI bus master to perform. For example, to read 84 bytes of data from local memory 300 and send it to 100 PCI target devices, coat mWrite 0x100, 0x300, 84, and read this command from the test vector file. After acquiring, the memory write command is executed. When all memory write commands are executed, the PCI bus master reads the next command from the vector.

[실시례 1(프리페치 데이터의 크기에 따른 클럭수)]Example 1 (Number of Clocks According to Size of Prefetch Data)

도4는 버스 마스터(10)가 메모리 읽기 멀티플 명령어를 이용하여 데이터 전송을 요구할 때 전송 데이터의 크기를 증가하면서 그 때 소요되는 클럭수를 측정한 것으로, 딜레이드 트랜잭션이 적용된 경우 타겟 디바이스(20)가 로컬 디바이스로부터 프리페치할 데이터의 크기를 16 바이트부터 512 바이트까지 증가시키면서 시뮬레이션 하면서 전송할 데이터의 크기를 512 바이트부터 4K 바이트까지 증가시키며 시뮬레이션 하고, 로컬 버스와 PCI 버스의 지연은 없도록 하며 마스터에서 타임아웃이 발생하지 않도록 한다.4 shows the number of clocks required when the bus master 10 requests data transmission using a memory read multiple command while increasing the size of the transmitted data. When the delay transaction is applied, the target device 20 is measured. Simulates increasing the size of the data to be prefetched from the local device from 16 bytes to 512 bytes, increasing the size of the data to be transmitted from 512 bytes to 4K bytes, and avoiding delays in the local bus and the PCI bus. Make sure no out occurs.

도4의 가로축은 전송할 데이터의 크기이며, 세로축은 전송이 완료될 때까지 소요된 클럭수이며, (ⅰ)∼(ⅴ)는 딜레이드 트랜잭션이 적용된 경우로 각각 16 바이트, 32 바이트, 64 바이트, 128 바이트 그리고 512 바이트씩 데이터를 프리페치 한 경우이고, (ⅵ)는 본 발명에 의한 방법이 적용된 경우인데, 데이터의 양이 많을수록 전송시간이 늘어나며 딜레이드 트랜잭션에서는 프리페치 크기가 클수록 전송시간이 줄어드는 것을 알 수 있으며, 프리페치 크기가 512 바이트 이상이면 본 발명에 의한 방법과 유사한 데이터 전송효율을 나타내는 것을 알 수 있다.4, the horizontal axis represents the size of data to be transmitted, and the vertical axis represents the number of clocks required until the transfer is completed, and (i) to (iii) are 16 bytes, 32 bytes, 64 bytes, respectively, when a delay transaction is applied. In the case of prefetching data by 128 bytes and 512 bytes, (iii) is a case in which the method according to the present invention is applied, the larger the amount of data, the longer the transmission time, and in the delay transaction, the larger the prefetch size, the shorter the transmission time. It can be seen that, if the prefetch size is 512 bytes or more, the data transfer efficiency is similar to that of the method of the present invention.

[실시례 2(로컬 버스 지연에 따른 데이터 전송속도)]Example 2 (Data Transfer Rate According to Local Bus Delay)

도5는 로컬 버스 지연에 따른 데이터 전송속도를 나타낸 것으로, 명령어는 메모리 읽기 멀티플을 이용하고, 전송할 데이터의 크기는 4K 바이트로 하며, 딜레이드 트랜잭션이 적용된 경우 데이터 전송 속도를 최대로 하기 위해 프리페치할 데이터의 크기를 4K 바이트로 하며, 또한 PCI 버스의 지연은 없도록 하고, 버스 마스터에서 타임아웃이 발생하지 않도록 조건을 설정한다.Figure 5 shows the data transfer rate according to the local bus delay, the instruction uses a memory read multiple, the size of the data to be transmitted is 4K bytes, prefetch to maximize the data transfer rate when a delay transaction is applied The size of the data to be set is 4K bytes, there is no delay of the PCI bus, and the condition is set so that a timeout does not occur at the bus master.

도5의 가로축은 로컬 버스 지연 클럭이며, 세로축은 전송이 완료되는데 소요되는 클럭수로서, (ⅰ)은 딜레이드 트랜잭션이 적용된 경우이고, (ⅱ)는 본 발명에 의한 방법이 적용된 경우이다.5 is the local bus delay clock, the vertical axis is the number of clocks required to complete the transmission, (i) is the case where a delay transaction is applied, and (ii) is the case where the method according to the present invention is applied.

딜레이드 트랜잭션을 이용한 방법과 본 발명에 의한 방법 모두 로컬 버스의 지연이 커짐에 따라 데이터 전송 시간이 증가됨을 알 수 있고, 로컬 버스 지연이 0에서 7 클럭일 때까지는 딜레이드 트랜잭션과 본 발명에 의한 방법의 성능이 유사하지만 로컬 버스 지연이 8인 경우에는 딜레이드 트랜잭션의 경우 전송시간이 현격하게 많이 소요되는 것을 알 수 있는데, 이는 로컬 버스 지연으로 인해 타겟 디바이스가 PCI 버스 마스터에게 데이터를 8 사이클 내로 전송하지 못해 타겟 디바이스는 디스커넥트로 PCI 프로토콜을 종료하여야 하며, 그로 인해 타겟 디바이스에 의해 현재 이루어지는 프리페치는 중단되고, 프리페치된 모든 데이터는 폐기되어야 하기 때문이다.In both the method using the delay transaction and the method according to the present invention, it can be seen that the data transmission time increases as the delay of the local bus increases, and the delay transaction and the method according to the present invention are performed until the local bus delay is 0 to 7 clocks. The performance of the method is similar, but if the local bus delay is 8, the transfer time is significantly longer for delayed transactions. This is because the local bus delay causes the target device to send data to the PCI bus master within 8 cycles. Because the transmission fails, the target device must terminate the PCI protocol by disconnection, which causes the current prefetch by the target device to be aborted and all prefetched data must be discarded.

[실시례 3(데이터의 분할 전송에 따른 데이터 전송속도)]Example 3 (Data Transfer Rate According to Split Transfer of Data)

버스 마스터(10)가 내부적인 문제로 프로토콜을 종료해야 하거나 버스 사용을 장시간 점유할 수 없어 타임아웃 종료로 프로토콜을 종료해야 하는 경우, 버스 마스터(10)는 읽기 멀티플 명령어를 이용하여 4K 바이트만큼의 데이터 전송을 요구하며, 이 때 타겟 디바이스(20)에 딜레이드 트랜잭션이 적용된 경우 프리페치 할 데이터의 크기를 4K 바이트로 하며, PCI 버스 지연은 없도록 조건을 설정한다.When the bus master 10 needs to terminate the protocol due to an internal problem or cannot use the bus for a long time and needs to terminate the protocol by the timeout termination, the bus master 10 uses a read multiple instruction to read as many as 4K bytes. Data transmission is required, and when a delay transaction is applied to the target device 20, the size of data to be prefetched is 4K bytes, and a condition is set so that there is no PCI bus delay.

도6에 도시된 바와 같이 버스 마스터(10)가 중간에 프로토콜 종료없이 4K 바이트만큼의 데이터를 한번에 모두 전송받는 것부터 최대 32번 나누어 전송받도록 하고, 가로축은 버스 마스터(10)에 의한 분할 전송 횟수이며, 세로축은 전송이 완료된 클럭 수 이며, (ⅰ)는 딜레이드 트랜잭션이 적용된 경우이고, (ⅱ)는 본 발명에 의한 방법이 적용된 경우이다.As shown in FIG. 6, the bus master 10 receives up to 32 divided transmissions of data up to 4K bytes at a time without protocol termination in the middle, and the horizontal axis represents the number of times of division transmission by the bus master 10. , The vertical axis represents the number of clocks for which transmission has been completed, (i) represents a case where a delay transaction is applied, and (ii) represents a case where the method according to the present invention is applied.

한번에 모든 데이터가 전송된 경우, 두 경우가 거의 비슷한 성능을 가지지만, 중간에 전송이 끊기는 횟수가 많을수록 본 발명에 의한 방법의 전송효율이 우수한 것을 알 수 있는데, 이는 딜레이드 트랜잭션이 적용된 타겟 디바이스(20)가 비록 4K 바이트만큼의 데이터를 프리페치 하더라도 버스 마스터가 중간에 프로토콜을 종료하게 되면, 타겟 디바이스(20)는 프리페치 해둔 데이터를 모두 폐기해야 하지만, 본 발명에 의한 방법은 비록 버스 마스터가 중간에 프로토콜을 종료하더라도 타겟 디바이스(20)는 데이터를 폐기하지 않고 버스 마스터가 다시 요구하기를 기다리기 때문이다.When all the data is transmitted at once, the two cases have almost the same performance, but the more the number of interruptions in the middle of the transmission method of the present invention, the better the transmission efficiency, the target device to which the delay transaction is applied ( Although 20) prefetches 4K bytes of data, if the bus master terminates the protocol in the middle, the target device 20 must discard all prefetched data. This is because the target device 20 waits for the bus master to request again without discarding the data even if the protocol is terminated in the middle.

또한 전송할 데이터를 4 바이트에서 4K 바이트까지 무작위로 100개를 선택되도록 하되, 로컬 버스 지연은 0에서 8로 무작위로 선택되게 하고, PCI 버스 지연은 없도록 조건을 설정하고, 버스 마스터(10)가 타겟 디바이스(20)로부터 데이터를 4 바이트만큼 읽고자 할 땐 메모리 읽기 명령어를, 16 바이트 이하를 읽고자 할 땐 메모리 읽기 라인 명령어를 그리고 그 이상의 데이터를 읽고자 할 땐 메모리 읽기 멀티플 명령어가 사용되게 하며, 버스 마스터(10)가 데이터를 읽을 때 중간에 프로토콜을 종료없이 한번에 모든 데이터를 읽어갈지 이니면 최대 32번까지 나누어 전송받을지도 무작위로 선택되게 한 결과 본 발명에 의한 방법이 딜레이드 트랜잭션에 비해 평균 10% 향상이 되는 것을 알 수 있다.In addition, 100 data are randomly selected from 4 bytes to 4K bytes to be transmitted, but local bus delays are randomly selected from 0 to 8, conditions are set such that there is no PCI bus delay, and the bus master 10 targets A memory read command is used to read 4 bytes of data from the device 20, a memory read line command is used to read 16 bytes or less, and a memory read multiple command is used to read more data. When the bus master 10 reads the data, it reads all the data at once without terminating the protocol or randomly selects whether to receive the data up to 32 times. As a result, the method according to the present invention averages more than the delayed transaction. It can be seen that the 10% improvement.

이상과 같이 본 발명은 메모리 쓰기 명령을 이용하여 읽어올 데이터의 양을 타겟 디바이스(20)에 미리 알려주는 프리페치 요구를 타겟 디바이스(20)에 먼저 요청하여 효율적으로 데이터 전송이 이루어지도록 한 것으로, 이상에서 설명한 본 발명은, 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 있어 본 발명의 기술적 사상을 벗어나지 않는 범위내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시례 및 첨부된 도면에 한정되는 것이 아니다.As described above, according to the present invention, the data transfer is efficiently performed by first requesting the target device 20 for a prefetch request that informs the target device 20 of the amount of data to be read using a memory write command. The present invention described above is capable of various substitutions, modifications, and changes without departing from the technical spirit of the present invention for those skilled in the art to which the present invention pertains. It is not limited to the drawing.

본 발명은 PCI 2.2에서 버스 마스터가 메모리 읽기 명령으로 타겟 디바이스에 데이터의 전송 요구시, 타겟 디바이스의 내부적인 전송할 데이터의 준비시간을 단축하기 위해 메모리 쓰기 명령을 이용하여 읽어올 데이터의 양의 타겟 디바이스에 프리페치 요구를 먼저하여 타겟 디바이스로 하여금 전송할 데이터의 정확한 양을 충분히 준비할 시간을 제공함으로써, 데이터 전송 효율성 및 PCI 버스와 로컬 버스의 사용 효율성을 향상시키는 효과가 있다.According to the present invention, when the bus master requests a data transfer to a target device with a memory read command in PCI 2.2, the target device has an amount of data to be read using a memory write command to shorten a preparation time of data to be transmitted internally by the target device. By prefetching requests in advance, the target device has time to fully prepare the correct amount of data to transmit, thereby improving the data transfer efficiency and the efficiency of using the PCI bus and the local bus.

도1ab는 종래의 PCI 2.2에서 사용되는 딜레이드 트랜잭션 메카니즘을 도시한 구성도Figure 1ab is a block diagram showing a delayed transaction mechanism used in the conventional PCI 2.2

도2ab는 본 발명에 적용되는 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송과정을 도시한 구성도Figure 2ab is a block diagram showing a data transmission process using a prefetch request in PCI 2.2 applied to the present invention

도3ab는 본 발명의 일실시례에 의해 구현되는 C언어를 이용한 클럭단위로 동작하는 행위모델을 도시한 구성도Figure 3ab is a block diagram showing a behavior model operating in clock units using the C language implemented by an embodiment of the present invention

도4는 본 발명의 일실시례에 의해 구현되는 프리페치 데이터의 크기에 따른 클럭수를 도시한 그래프4 is a graph showing the number of clocks according to the size of prefetch data implemented according to an embodiment of the present invention.

도5는 본 발명의 일실시례에 의해 구현되는 로컬 버스 지연에 따른 데이터 전송속도를 도시한 그래프Figure 5 is a graph showing the data rate according to the local bus delay implemented by one embodiment of the present invention

도6은 본 발명의 일실시례에 의해 구현되는 데이터의 분할 전송에 따른 데이터의 전송속도를 도시한 그래프6 is a graph illustrating a data transmission rate according to divided transmission of data implemented by an embodiment of the present invention.

*도면의 주요부분에 대한 부호설명** Description of Signs of Main Parts of Drawings *

10. 버스 마스터 20. 타겟 디바이스10. Bus master 20. Target device

30. 프리페치 제어 레지스터 40. 버퍼30. Prefetch control register 40. Buffer

Claims (1)

PCI 2.2에서 데이터를 전송하는 방법에 있어서,In PCI 2.2, how to transfer data, 버스 마스터는 메모리 쓰기 명령을 이용하여 다음에 요구할 메모리 읽기 명령의 어드레스와 읽을 데이터의 크기를 프리페치 제어 레지스터에 저장하는 단계; 상기 프리페치 제어 레지스터에 저장된 정보를 이용하여 타겟 디바이스로부터 해당 데이터를 프리페치하여 버퍼에 저장하는 단계; 상기 타겟 디바이스는 버스 마스터로부터 인가된 메모리 읽기 명령을 수신하여 프리페치된 해당 데이터를 버스 마스터로 전송하는 단계;로 이루어짐을 특징으로 하는 PCI 2.2에서 프리페치 요구를 이용한 데이터 전송방법.The bus master using a memory write command to store an address of a memory read command to be requested next and a size of data to be read in a prefetch control register; Prefetching corresponding data from a target device using information stored in the prefetch control register and storing the data in a buffer; And receiving, by the target device, a memory read command from a bus master and transmitting the corresponding prefetched data to the bus master. 2.
KR1020040014293A 2004-03-03 2004-03-03 Method to transmit data in pci 2.2 using prefetch request KR20050089117A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040014293A KR20050089117A (en) 2004-03-03 2004-03-03 Method to transmit data in pci 2.2 using prefetch request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040014293A KR20050089117A (en) 2004-03-03 2004-03-03 Method to transmit data in pci 2.2 using prefetch request

Publications (1)

Publication Number Publication Date
KR20050089117A true KR20050089117A (en) 2005-09-07

Family

ID=37271594

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040014293A KR20050089117A (en) 2004-03-03 2004-03-03 Method to transmit data in pci 2.2 using prefetch request

Country Status (1)

Country Link
KR (1) KR20050089117A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100667954B1 (en) * 2005-11-11 2007-01-11 (재)대구경북과학기술연구원 A target controller of peripheral component interconnection having versatilities in design
US8484437B2 (en) 2010-07-08 2013-07-09 Hynix Semiconductor Data processing apparatus using pre-fetched data

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100667954B1 (en) * 2005-11-11 2007-01-11 (재)대구경북과학기술연구원 A target controller of peripheral component interconnection having versatilities in design
US8484437B2 (en) 2010-07-08 2013-07-09 Hynix Semiconductor Data processing apparatus using pre-fetched data

Similar Documents

Publication Publication Date Title
US7130933B2 (en) Method, system, and program for handling input/output commands
US7526593B2 (en) Packet combiner for a packetized bus with dynamic holdoff time
US5761464A (en) Prefetching variable length data
US5579530A (en) Method and apparatus for dynamically allocating access time to a resource shared between a peripheral bus and a host bus by dynamically controlling the size of burst data transfers on the peripheral bus
US6289406B1 (en) Optimizing the performance of asynchronous bus bridges with dynamic transactions
US6839777B1 (en) System and method for transferring data over a communication medium using data transfer links
US20040044811A1 (en) System and method for transferring data over a communication medium using double-buffering
US5812774A (en) System for transmitting data packet from buffer by reading buffer descriptor from descriptor memory of network adapter without accessing buffer descriptor in shared memory
EP0595960A4 (en) Computer workstation expansion chassis
US7469309B1 (en) Peer-to-peer data transfer method and apparatus with request limits
CN111656322A (en) Scheduling memory requests for ganged memory devices
US20060236001A1 (en) Direct memory access controller
CN112988647A (en) TileLink bus-to-AXI 4 bus conversion system and method
US6973528B2 (en) Data caching on bridge following disconnect
US6801963B2 (en) Method, system, and program for configuring components on a bus for input/output operations
US6425071B1 (en) Subsystem bridge of AMBA's ASB bus to peripheral component interconnect (PCI) bus
US6968402B2 (en) System and method for storing chunks of first cache line and second cache line in a buffer in a first and second chunk order
CN116107923B (en) BRAM-based many-to-many high-speed memory access architecture and memory access system
CN117472815A (en) Storage module conversion interface under AXI protocol and conversion method thereof
US20040019708A1 (en) Method, system, and program for returning data to read requests received over a bus
KR20050089117A (en) Method to transmit data in pci 2.2 using prefetch request
CN115905046A (en) Network card drive data packet processing method and device, electronic equipment and storage medium
US6327636B1 (en) Ordering for pipelined read transfers
US7673091B2 (en) Method to hide or reduce access latency of a slow peripheral in a pipelined direct memory access system
CN101097555B (en) Method and system for processing data on chip

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application