WO2017005009A1 - External device expansion card and data processing method for input/output external device - Google Patents

External device expansion card and data processing method for input/output external device Download PDF

Info

Publication number
WO2017005009A1
WO2017005009A1 PCT/CN2016/076492 CN2016076492W WO2017005009A1 WO 2017005009 A1 WO2017005009 A1 WO 2017005009A1 CN 2016076492 W CN2016076492 W CN 2016076492W WO 2017005009 A1 WO2017005009 A1 WO 2017005009A1
Authority
WO
WIPO (PCT)
Prior art keywords
external device
expansion card
memory unit
data
controller
Prior art date
Application number
PCT/CN2016/076492
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2017005009A1 publication Critical patent/WO2017005009A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
    • G06F1/16Constructional details or arrangements

Definitions

  • the present invention relates to communication technologies, and in particular, to an external device expansion card and a data processing method for an input/output external device.
  • I/O external devices are an important part of the computer system and hardware resources.
  • I/O external devices of mainstream computer systems mainly include two types, one is a traditional I/O external device controller, and the other is a hardware accelerator expansion card.
  • the I/O external device and the central processing unit (CPU) of the computer system have two coupling modes.
  • the coupling method mainly used is a separate loose-coupled interconnection implementation based on a dedicated high-bandwidth peripheral bus such as Peripheral Component Interconnect (PCI) or PCI Express Channel (PCIe).
  • PCI Peripheral Component Interconnect
  • PCIe PCI Express Channel
  • the I/O external device communicates with the CPU through a high-speed interconnect bus between chips such as PCI or PCIe to deliver raw data and processing results.
  • the CPU of the computer system needs to access the I/O external device across multiple bus interfaces, thereby causing a large amount of communication protocol conversion overhead.
  • the present invention provides a data processing method for an external device expansion card and an input/output external device, which is used to solve the problem that the CPU accesses the I/O external device in the prior art.
  • a first aspect of the present invention provides an external device expansion card, including: an interface unit, a memory unit, a memory unit controller, an input/output I/O external device, and an I/O external device that are inserted into a memory card slot of the host.
  • Device controller including: an interface unit, a memory unit, a memory unit controller, an input/output I/O external device, and an I/O external device that are inserted into a memory card slot of the host.
  • the interface unit is communicatively connected to the memory unit controller and the I/O external device controller;
  • the memory unit is communicatively coupled to the memory unit controller, and the I/O external device controller is communicatively coupled to the I/O external device;
  • the I/O external device controller is communicatively coupled to the memory unit controller; wherein
  • the I/O external device controller is configured to send, to the memory unit controller, a first read request that carries a physical address in the memory unit, and read from the memory unit by using the memory unit controller Data corresponding to the physical address;
  • the interface unit is configured to receive a second read request that is sent by the host and that carries a physical address in the memory unit, and forward the second read request to the memory
  • the unit controller reads, by the memory unit controller, data corresponding to the physical address from the memory unit.
  • the memory unit controller is configured to receive a data cache space request request sent by the host by using the interface unit, and according to the data The cache space request requests a data cache space to be reserved within the memory unit.
  • the external device expansion card further includes: an interconnection unit for connecting the remote external device expansion card, the interconnection unit and the interface Unit communication connection
  • the interconnecting unit is configured to receive a third read request sent by the host through the interface unit, and forward the third read request to an interconnect unit of the remote external device expansion card to read Taking data in a memory unit of the remote external device expansion card;
  • the third read request is sent by the interconnect unit of the remote external device expansion card to the memory unit controller of the remote external device expansion card, and the third read request carries the remote external device.
  • the external device expansion card further includes: a capacitive address memory CAM, the CAM and the interface unit The interconnection unit is communicatively coupled;
  • the CAM is configured to temporarily store data sent by the remote external device expansion card.
  • a second aspect of the embodiments of the present invention provides a data processing method for inputting and outputting an external device, where the method is used for an external device expansion card, and the external device expansion card includes: Interface unit, memory unit, memory unit controller, input/output I/O external device, I/O external device controller on the memory card slot;
  • the method includes:
  • the I/O external device controller acquires data to be processed, and sends the to-be-processed data to the I/O external device for processing;
  • the I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device controller;
  • the I/O external device controller sends the processed data to the memory unit controller, and the processed memory unit stores the processed data in the memory unit;
  • the I/O external device controller acquires data to be processed, including:
  • the I/O external device controller sends a to-be-processed data read request to the memory unit controller;
  • the memory unit controller reads the to-be-processed data in the memory unit according to a physical address in the memory unit carried in the to-be-processed data read request, and sends the to-be-processed data to the The I/O external device controller.
  • the I/O external device controller acquires data to be processed, including:
  • the I/O external device controller receives data to be processed transmitted by the host through the interface unit.
  • the external device expansion card further includes: an interconnection unit configured to connect the remote external device expansion card;
  • the interconnection unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the remote unit through the interconnect unit of the remote external device expansion card a memory unit controller of a remote external device expansion card, wherein the remote external device expansion card data access request carries the remote external device extension a physical address in the memory unit of the card, configured to request processed data stored in a memory unit of the remote external device expansion card;
  • the interconnection unit receives the processed data in the memory unit of the remote external device expansion card forwarded by the memory unit controller of the remote external device expansion card through the interconnection unit of the remote external device expansion card, and the The processed data in the memory unit of the remote external device expansion card is forwarded to the host through the interface unit.
  • the interconnecting unit receives a remote external device expansion card data access request sent by the host through the interface unit ,Also includes:
  • the interconnected unit does not receive the processed data forwarded by the interconnect unit of the remote external device expansion card within a preset time period, the error identifier is sent to the host through the interface unit.
  • the external device expansion card further includes: a capacitive address memory CAM;
  • the interconnect unit After the interface unit sends the error identifier to the host, the interconnect unit receives the processed data forwarded by the interconnect unit of the remote external device expansion card, and stores the processed data in the In the CAM, and sending the first interrupt information to the host by using the interface unit;
  • the I/O external device controller acquires data to be processed, and sends the to-be-processed data to the I/O external device. Before processing, it also includes:
  • the I/O external device controller receives a working state read request sent by the host through the interface unit, and sends the working state data to the host through the interface unit according to the working state read request;
  • the I/O external device controller receives the updated working state data sent by the host through the interface unit, and starts the I/O external device according to the updated working state data.
  • the I/O external device controller receives a working status read by the host by using the interface unit Before taking the request, it also includes:
  • the memory unit controller receives a data cache space request request sent by the host through the interface unit, where the data cache space is used to store the processed data;
  • the memory unit controller reserves the data cache space in the memory unit according to the data cache space request.
  • the I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device.
  • the controller After the controller, it also includes:
  • the I/O external device controller sends a second interrupt information to the host through the interface unit, where the second interrupt information is used to indicate that the I/O external device has completed data processing.
  • the data processing method of the external device expansion card and the input/output external device provided by the embodiment of the present invention can be directly inserted into the memory card slot of the host through the interface unit, and the memory unit and the I/O external are integrated on the external device expansion card.
  • the device, and thus the I/O external device controller and the host can directly access the memory unit through the physical address of the memory unit, that is, the I/O external device controller and the host can directly read the data in the memory unit according to the physical address in the memory unit. This greatly reduces the overhead of reading data from memory by the host and I/O external devices.
  • Embodiment 1 is a schematic structural diagram of Embodiment 1 of an external device expansion card provided by the present invention
  • Embodiment 2 is a schematic structural diagram of Embodiment 2 of an external device expansion card provided by the present invention.
  • Embodiment 1 of an external device expansion card system provided by the present invention
  • Embodiment 2 is a schematic structural diagram of Embodiment 2 of an external device expansion card system provided by the present invention.
  • FIG. 5 is a schematic flowchart diagram of Embodiment 1 of a data processing method for an I/O external device according to the present invention
  • FIG. 6 is a schematic flowchart diagram of Embodiment 2 of a data processing method for an I/O external device according to the present invention.
  • FIG. 7 is a schematic flowchart diagram of Embodiment 3 of a data processing method for an I/O external device according to the present invention.
  • Embodiment 1 is a schematic structural diagram of Embodiment 1 of an external device expansion card provided by the present invention.
  • the external device expansion card includes: an interface unit 01 for inserting into a memory card slot of a host, and a memory unit 02 The memory unit controller 03, the input/output (I/O) external device 04, and the I/O external device controller 05.
  • the interface unit 01 is communicatively coupled to the memory unit controller 03 and the I/O external device controller 05.
  • the memory unit 02 is communicatively coupled to the memory unit controller 03
  • the I/O external device 04 is communicatively coupled to the I/O external device controller 05.
  • the I/O external device controller 05 is communicatively coupled to the memory unit controller 03.
  • the host may be a device having a memory card slot such as a computer or a processor.
  • Common memory card slots include: Dual-Inline-Memory-Modules (DIMM) card slots, but not limited to this.
  • the above memory unit 02 can be various versions of double rate synchronous dynamic random access memory (Double Data Rate, DDR for short), such as DDR, DDR2, DDR3, etc., but not limited thereto, other memory that can be used as memory can .
  • DDR double rate synchronous dynamic random access memory
  • the I/O external device controller 05 is configured to send a first read request carrying the physical address in the memory unit 02 to the memory unit controller 03, and read from the memory unit 02 through the memory unit controller 03. The data corresponding to the above physical address.
  • the receiving unit 01 is configured to receive a second read request sent by the host and carry the physical address in the memory unit 02, and forward the second read request to the memory unit controller 03, and control the memory unit
  • the controller 03 reads the data corresponding to the physical address from the memory unit 02.
  • the physical address in the memory unit 02 can be determined by the physical address of the memory card slot on the host, and the physical address in the memory unit 02 is within the physical address range of the memory card slot. After the external device expansion card is inserted into the memory card slot and the physical address of the memory unit 02 is determined, the physical address of the memory unit 02 is shared with the host and the I/O external device. Thus, the host and the I/O external device can directly read data from the memory unit using the physical address of the memory unit 02.
  • the external device expansion card provided in this embodiment can be directly inserted into the memory card slot of the host through the interface unit, and the memory unit and the I/O external device are integrated on the external device expansion card, thereby the I/O external device controller.
  • the host can directly access the memory unit through the physical address of the memory unit, that is, the I/O external device controller and the host can directly read the data in the memory unit according to the physical address in the memory unit, thereby greatly reducing the host and I/. O The overhead of external devices reading data from memory.
  • the memory unit controller 03 can be configured to receive a data cache space request request sent by the host through the interface unit 01, and reserve a data cache space in the memory unit 02 according to the data cache space request.
  • the data cache space can be used to store some data to be processed, or processed data.
  • Embodiment 2 is a schematic structural diagram of Embodiment 2 of an external device expansion card according to the present invention.
  • the external device expansion card further includes: an interconnection for connecting a remote external device expansion card.
  • Unit 06 which is communicatively coupled to interface unit 01.
  • FIG. 3 is a schematic structural diagram of Embodiment 1 of an external device expansion card system according to the present invention.
  • the system includes a local external device expansion card 101 and a remote external device expansion card 102, wherein the local external device expansion card 101
  • the remote external device expansion card 102 has the same structure as the local external device expansion card, and includes: an interface unit 11, a memory unit 12, a memory unit controller 13, and an I/O external device.
  • the type of I/O external device may be different, and the local external device expansion card 101 and the remote external device expansion card are realized by connecting the interconnection unit 16 of the remote external device expansion card 102 with the interconnection unit 06 of the local external device expansion card 101. 102 connection.
  • the external device expansion card provided in this embodiment implements the scalability of the external device expansion card, and prevents an external device expansion card from being inserted into the memory card slot. After that, the type of I/O external device is limited.
  • the interconnection unit 06 is configured to receive a third read request sent by the host through the interface unit 01, and forward the third read request to the interconnect unit 16 of the remote external device expansion card to read the remote external device extension The data in the memory unit of the card.
  • the third read request is sent by the interconnect unit 16 of the remote external device expansion card to the memory unit controller 13 of the remote external device expansion card, where the third read request carries the remote external device expansion card in the memory unit 12 Physical address.
  • the physical address of the memory unit 12 of the remote external device expansion card may also be determined by the physical address of the memory card slot of the host, and the physical address of the memory unit 12 of the remote external device expansion card is also the physical address of the memory card slot. The range does not coincide with the physical address of the memory unit of the local external device expansion card.
  • the external device expansion card may further include: a content addressable memory (Content Addressable Memory, Referred to as CAM) 07, the CAM 07 is communicatively coupled to the interface unit 01 and the interconnection unit 06.
  • CAM Content Addressable Memory
  • the CAM07 is used to temporarily store data sent by a remote external device expansion card. Specifically, in the process of the host accessing the memory unit of the remote external device expansion card, if the remote external device expansion card does not receive the data returned by the remote external device expansion card within the preset time, the error identifier is sent to the host, and the error is sent. After the identification, if the remote external device expansion card returns the data requested by the host, the data is temporarily stored in the CAM07 of the local external device expansion card, and when the host requests again, the CAM07 of the local external device expansion card is directly The data in is sent to the host.
  • the above I/O external device may be a traditional I/O external device, or may be a hardware accelerator expansion card, etc., correspondingly, when the I/O external device is a traditional I/O external device, the above I/O The external device control unit 05 is a conventional I/O external device controller.
  • the I/O external device is a hardware accelerator expansion card
  • the above I/O external device control unit 05 may be a hardware accelerator, but this is not limit.
  • FIG. 5 is a schematic flowchart of Embodiment 1 of a data processing method for an I/O external device according to the present invention.
  • the method is used for the foregoing external device expansion card.
  • the structure of the external device expansion card can be referred to the embodiment of FIG.
  • the method includes:
  • the I/O external device controller acquires the to-be-processed data, and sends the to-be-processed data to I/O external devices are processed.
  • the I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device controller.
  • the I/O external device controller sends the processed data to the memory unit controller, and the processed memory unit stores the processed data in the memory unit.
  • the memory unit controller receives a data access request sent by the host through the interface unit, and reads the processed data in the memory unit according to the physical address in the memory unit carried in the data access request, and passes the processed data.
  • the interface unit sends to the host. The host can then use the processed data for further processing.
  • the data access request may be sent by software or an application on a CPU in the host.
  • the physical address carried in the data access request is the address corresponding to the processed data in the memory unit.
  • the I/O external device controller stores the processed data of the I/O external device in the memory unit, and the host can directly read the processed data of the I/O external device stored in the memory unit, thereby realizing The host can directly read and write data in the memory unit, which greatly reduces the data migration overhead that exists when the I/O peripheral controller interacts with the host.
  • the above I/O external device controller can obtain data to be processed in two cases:
  • the data to be processed is pre-stored in the memory unit of the external device expansion card, specifically, the I/O external device controller sends a pending data read request to the memory unit controller; the memory unit controller according to the to-be-processed data
  • the physical address in the memory unit carried in the read request reads the data to be processed in the memory unit, and sends the to-be-processed data to the I/O external device controller.
  • the data to be processed is sent to the I/O external device for processing by the I/O external device controller.
  • the physical address in the memory unit carried in the data read request to be processed is the physical address corresponding to the data to be processed in the memory unit.
  • the I/O external device controller can directly read and write the memory unit by using direct memory access (DMA).
  • DMA direct memory access
  • the I/O external device controller receives the data to be processed sent by the host through the interface unit. That is, the to-be-processed data is sent by the other device in the host to the I/O external device controller in the external device expansion card.
  • the network card in the host may be sent to the I/O external device controller through the host. of.
  • the I/O external device controller Before the I/O external device controller acquires the to-be-processed data and sends the to-be-processed data to the I/O external device for processing, the I/O external device controller receives the working state read request sent by the host through the interface unit, and The working state data is sent to the host through the interface unit according to the working state read request. Further, the I/O external device controller receives the updated working state data sent by the host through the interface unit, and starts the I/O external device according to the updated working state data.
  • the I/O external device controller may include a plurality of different registers, and the value of the register indicates the working state of the external device expansion card, that is, the working state of the I/O external device controller returned to the host.
  • the data is the value of each register. The host can modify the values of these registers and modify them to return to the external device expansion card to start the I/O external device in the external device expansion card.
  • the memory unit controller may further receive a data cache space request request sent by the host through the interface unit, and further, the memory unit The controller reserves the foregoing data cache space in the foregoing memory unit according to the cache space request.
  • the data cache space is used to store the processed data.
  • the data cache space can also be used to store the data to be processed.
  • the memory unit controller after receiving the data buffer space request request, the memory unit controller initializes the memory unit to reserve the data buffer space.
  • the above external device expansion card further includes: an interconnection unit.
  • FIG. 6 is a schematic flowchart of Embodiment 2 of a data processing method for an I/O external device according to the present invention.
  • the host can directly read the remote external device expansion card.
  • the interconnect unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the memory of the remote external device expansion card through the interconnect unit of the remote external device expansion card.
  • Unit controller The remote external device expansion card data access request carries a physical address in the memory unit in the remote external device expansion card, and is used to request the processed data stored in the memory unit of the remote external device expansion card.
  • the processed data of the I/O external device in the remote external device expansion card is also stored in In the memory unit in the remote external device expansion card, the host can directly access the memory unit in the remote external device expansion card through the physical address of the memory unit in the remote external device expansion card, and the physical address carried in the remote external device expansion card data access request Is the corresponding physical address of the processed data in the memory unit of the remote external device expansion card.
  • the interconnect unit receives the processed data in the memory unit of the remote external device expansion card forwarded by the memory unit controller of the remote external device expansion card through the interconnection unit of the remote external device expansion card, and expands the remote external device expansion card.
  • the processed data in the memory unit is forwarded to the host.
  • FIG. 7 is a schematic flowchart diagram of Embodiment 3 of a data processing method for an I/O external device according to the present invention.
  • the host may have a long delay, in order to avoid the host reading an error.
  • the information can be solved by multiple access methods. Take two asynchronous accesses as an example. As shown in Figure 7, the method includes:
  • the interconnect unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the memory of the remote external device expansion card through the interconnect unit of the remote external device expansion card.
  • Unit controller receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the memory of the remote external device expansion card through the interconnect unit of the remote external device expansion card.
  • the interconnected unit does not receive the processed data forwarded by the interconnecting unit of the remote external device expansion card within a preset time period, send an error identifier to the host by using the interface unit.
  • the above external device expansion card may further include: a CAM.
  • the interconnect unit After the interface unit sends the error identifier to the host, the interconnect unit receives the processed data forwarded by the interconnect unit of the remote external device expansion card, and stores the processed data in the CAM and passes the interface. The unit sends a first interrupt message to the host.
  • the interface unit receives a remote external device expansion card data access request that is sent by the host after receiving the first interrupt information, and sends the processed data in the CAM according to the retransmitted remote external device expansion card data access request. Give the host. That is, after the interface unit is again subjected to the remote external device expansion card data access request sent by the host, the interface does not need to be forwarded to the remote external device expansion card, and the processed data in the CAM can be directly sent to the host.
  • the host also requests to read the remote external device expansion card I// before the remote external device expansion card's I/O external device processes the data.
  • O The operating status data in the external device controller, and modify the working status data to be returned to the remote external device expansion card I/O external device controller to start the remote
  • I/O external device of the external device expansion card refer to the foregoing embodiment for a specific process, and details are not described herein again.
  • the host can also apply for a data cache space in advance, that is, send a data cache space request request to the memory unit controller of the remote external device expansion card, so that the memory unit controller of the remote external device expansion card is
  • the data cache space is reserved in the memory unit of the remote external device expansion card.
  • the I/O external device controller sends the host to the host through the interface unit. Sending a second interrupt information, the second interrupt information is used to indicate that the I/O external device has completed data processing.
  • the general memory card slot does not actively send an interrupt request to the CPU of the host. Therefore, the interrupt pin is generally not provided on the memory card slot.
  • the I/O external device controller is in I/. After the external device completes the data processing, it sends an interrupt message to the host to notify the host CPU of the subsequent processing.
  • the remote external device expansion card can also send an interrupt message to the host by referring to the local external device expansion card.
  • a high-speed interconnect interface can be selected to better avoid delays in the above interconnected cells.
  • the foregoing program may be stored in a computer readable storage medium, and the program is executed when executed.
  • the foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.

Abstract

An external device expansion card and a data processing method for an input/output external device. The external device expansion card comprises: an interface unit (01) for being inserted on a memory card slot of a host, a memory unit (02), a memory unit controller (03), an input/output (I/O) external device (04) and an I/O external device controller (05). The external device expansion card may be directly inserted into the memory card slot of the host via the interface unit (01), and the memory unit (02) and the I/O external device (04) are integrated on the external device expansion card, such that the I/O external device controller (05) and the host may access the memory unit (02) directly by means of a physical address of the memory unit (02), namely, the I/O external device controller (05) and the host may read data in the memory unit (02) directly according to the physical address of the memory unit (02), thereby greatly reducing overhead for reading data from a memory by the host and the I/O external device (04).

Description

外部设备扩展卡及输入输出外部设备的数据处理方法External device expansion card and data processing method of input/output external device
本申请要求于2015年7月8日提交中国专利局、申请号为201510400020.2、发明名称为“外部设备扩展卡及输入输出外部设备的数据处理方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application filed on July 8, 2015, the Chinese Patent Office, Application No. 201510400020.2, entitled "External Device Expansion Card and Data Processing Method for Input and Output External Devices", the entire contents of which are The citations are incorporated herein by reference.
技术领域Technical field
本发明涉及通信技术,尤其涉及一种外部设备扩展卡及输入输出外部设备的数据处理方法。The present invention relates to communication technologies, and in particular, to an external device expansion card and a data processing method for an input/output external device.
背景技术Background technique
输入/输出(Input/Output,简称I/O)外部设备是计算机系统的重要组成部分与硬件资源。目前,主流计算机系统的I/O外部设备主要包括两类,一类是传统的I/O外部设备控制器,另一类是硬件加速器扩展卡。Input/Output (I/O) external devices are an important part of the computer system and hardware resources. At present, I/O external devices of mainstream computer systems mainly include two types, one is a traditional I/O external device controller, and the other is a hardware accelerator expansion card.
现有技术中,I/O外部设备与计算机系统的中央处理器(Central Processing Unit,简称CPU)有两种耦合方式。其中主要采用的耦合方式是基于外设部件互连标准(Peripheral Component Interconnect,简称PCI)或PCI快速通道(PCI Express,简称PCIe)等专用高带宽外设总线的分离松耦合互连实现方式,在这种方式中,I/O外部设备与CPU通过PCI或PCIe等芯片间的高速互连总线进行通信,以传递原始数据与处理结果。In the prior art, the I/O external device and the central processing unit (CPU) of the computer system have two coupling modes. The coupling method mainly used is a separate loose-coupled interconnection implementation based on a dedicated high-bandwidth peripheral bus such as Peripheral Component Interconnect (PCI) or PCI Express Channel (PCIe). In this way, the I/O external device communicates with the CPU through a high-speed interconnect bus between chips such as PCI or PCIe to deliver raw data and processing results.
但是,采用上述分离松互连实现方式,计算机系统的CPU要访问I/O外部设备需要跨过多个总线接口,从而造成大量通信协议转换开销。However, with the above-described separation loose interconnection implementation, the CPU of the computer system needs to access the I/O external device across multiple bus interfaces, thereby causing a large amount of communication protocol conversion overhead.
发明内容Summary of the invention
本发明提供一种外部设备扩展卡及输入输出外部设备的数据处理方法,用于解决现有技术中CPU访问I/O外部设备开销大的问题。The present invention provides a data processing method for an external device expansion card and an input/output external device, which is used to solve the problem that the CPU accesses the I/O external device in the prior art.
本发明第一方面提供一种外部设备扩展卡,包括:用于插设在主机的内存卡槽上的接口单元、内存单元、内存单元控制器、输入输出I/O外部设备、I/O外部设备控制器; A first aspect of the present invention provides an external device expansion card, including: an interface unit, a memory unit, a memory unit controller, an input/output I/O external device, and an I/O external device that are inserted into a memory card slot of the host. Device controller
所述接口单元与所述内存单元控制器、所述I/O外部设备控制器通信连接;The interface unit is communicatively connected to the memory unit controller and the I/O external device controller;
所述内存单元与所述内存单元控制器通信连接,所述I/O外部设备控制器与所述I/O外部设备通信连接;The memory unit is communicatively coupled to the memory unit controller, and the I/O external device controller is communicatively coupled to the I/O external device;
所述I/O外部设备控制器与所述内存单元控制器通信连接;其中,The I/O external device controller is communicatively coupled to the memory unit controller; wherein
所述I/O外部设备控制器,用于向所述内存单元控制器发送携带所述内存单元中物理地址的第一读取请求,通过所述内存单元控制器从所述内存单元内读取所述物理地址对应的数据;所述接口单元,用于接收所述主机发送的携带所述内存单元中物理地址的第二读取请求,并将所述第二读取请求转发给所述内存单元控制器,通过所述内存单元控制器从所述内存单元内读取所述物理地址对应的数据。The I/O external device controller is configured to send, to the memory unit controller, a first read request that carries a physical address in the memory unit, and read from the memory unit by using the memory unit controller Data corresponding to the physical address; the interface unit is configured to receive a second read request that is sent by the host and that carries a physical address in the memory unit, and forward the second read request to the memory And the unit controller reads, by the memory unit controller, data corresponding to the physical address from the memory unit.
结合第一方面,在第一方面的第一种可能的实施方式中,所述内存单元控制器,用于接收所述主机通过所述接口单元发送的数据缓存空间申请请求,并根据所述数据缓存空间申请请求在所述内存单元内预留数据缓存空间。In conjunction with the first aspect, in a first possible implementation of the first aspect, the memory unit controller is configured to receive a data cache space request request sent by the host by using the interface unit, and according to the data The cache space request requests a data cache space to be reserved within the memory unit.
结合第一方面,在第一方面的第二种可能的实施方式中,所述外部设备扩展卡还包括:用于连接远程外部设备扩展卡的互连单元,所述互连单元与所述接口单元通信连接;In conjunction with the first aspect, in a second possible implementation of the first aspect, the external device expansion card further includes: an interconnection unit for connecting the remote external device expansion card, the interconnection unit and the interface Unit communication connection
所述互连单元,用于接收所述主机通过所述接口单元发送的第三读取请求,并将所述第三读取请求转发给所述远程外部设备扩展卡的互连单元,以读取所述远程外部设备扩展卡的内存单元中的数据;The interconnecting unit is configured to receive a third read request sent by the host through the interface unit, and forward the third read request to an interconnect unit of the remote external device expansion card to read Taking data in a memory unit of the remote external device expansion card;
其中,所述第三读取请求由所述远程外部设备扩展卡的互连单元发送给所述远程外部设备扩展卡的内存单元控制器,所述第三读取请求中携带所述远程外部设备扩展卡的内存单元中的物理地址。The third read request is sent by the interconnect unit of the remote external device expansion card to the memory unit controller of the remote external device expansion card, and the third read request carries the remote external device. The physical address in the memory unit of the expansion card.
结合第一方面的第二种可能的实施方式,在第一方面的第三种可能的实施方式中,所述外部设备扩展卡还包括:容寻址存储器CAM,所述CAM与所述接口单元、所述互连单元通信连接;In conjunction with the second possible implementation of the first aspect, in a third possible implementation of the first aspect, the external device expansion card further includes: a capacitive address memory CAM, the CAM and the interface unit The interconnection unit is communicatively coupled;
所述CAM,用于临时存储所述远程外部设备扩展卡发送的数据。The CAM is configured to temporarily store data sent by the remote external device expansion card.
本发明实施例第二方面提供一种输入输出外部设备的数据处理方法,所述方法用于外部设备扩展卡,所述外部设备扩展卡包括:用于插设在主机的 内存卡槽上的接口单元、内存单元、内存单元控制器、输入输出I/O外部设备、I/O外部设备控制器;A second aspect of the embodiments of the present invention provides a data processing method for inputting and outputting an external device, where the method is used for an external device expansion card, and the external device expansion card includes: Interface unit, memory unit, memory unit controller, input/output I/O external device, I/O external device controller on the memory card slot;
所述方法包括:The method includes:
所述I/O外部设备控制器获取待处理数据,并将所述待处理数据发送给所述I/O外部设备进行处理;The I/O external device controller acquires data to be processed, and sends the to-be-processed data to the I/O external device for processing;
所述I/O外部设备对所述待处理数据进行处理,并将处理后的数据发送给所述I/O外部设备控制器;The I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device controller;
所述I/O外部设备控制器将所述处理后的数据发送给所述内存单元控制器,由所述内存单元控制器将所述处理后的数据存储在所述内存单元中;The I/O external device controller sends the processed data to the memory unit controller, and the processed memory unit stores the processed data in the memory unit;
所述内存单元控制器接收所述主机通过所述接口单元发送的数据访问请求,并根据所述数据访问请求携带的所述内存单元中的物理地址在所述内存单元中读取所述处理后的数据,并将所述处理后的数据通过所述接口单元发送给所述主机。Receiving, by the memory unit controller, a data access request sent by the host through the interface unit, and reading the processing in the memory unit according to a physical address in the memory unit carried by the data access request And transmitting the processed data to the host through the interface unit.
结合第二方面,在第二方面的第一种可能的实施方式中,所述I/O外部设备控制器获取待处理数据,包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, the I/O external device controller acquires data to be processed, including:
所述I/O外部设备控制器向所述内存单元控制器发送待处理数据读取请求;The I/O external device controller sends a to-be-processed data read request to the memory unit controller;
所述内存单元控制器根据所述待处理数据读取请求中携带的所述内存单元中的物理地址在所述内存单元中读取所述待处理数据,并将所述待处理数据发送给所述I/O外部设备控制器。The memory unit controller reads the to-be-processed data in the memory unit according to a physical address in the memory unit carried in the to-be-processed data read request, and sends the to-be-processed data to the The I/O external device controller.
结合第二方面,在第二方面的第二种可能的实施方式中,所述I/O外部设备控制器获取待处理数据,包括:With reference to the second aspect, in a second possible implementation manner of the second aspect, the I/O external device controller acquires data to be processed, including:
所述I/O外部设备控制器接收主机通过所述接口单元发送的待处理数据。The I/O external device controller receives data to be processed transmitted by the host through the interface unit.
结合第二方面,在第二方面的第三种可能的实施方式中,所述外部设备扩展卡还包括:用于连接远程外部设备扩展卡的互连单元;With reference to the second aspect, in a third possible implementation manner of the second aspect, the external device expansion card further includes: an interconnection unit configured to connect the remote external device expansion card;
所述互连单元接收主机通过所述接口单元发送的远程外部设备扩展卡数据访问请求,并将所述远程外部设备扩展卡数据访问请求通过所述远程外部设备扩展卡的互连单元转发给所述远程外部设备扩展卡的内存单元控制器,其中,所述远程外部设备扩展卡数据访问请求中携带所述远程外部设备扩展 卡中内存单元中的物理地址,用于请求所述远程外部设备扩展卡的内存单元中存储的处理后数据;The interconnection unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the remote unit through the interconnect unit of the remote external device expansion card a memory unit controller of a remote external device expansion card, wherein the remote external device expansion card data access request carries the remote external device extension a physical address in the memory unit of the card, configured to request processed data stored in a memory unit of the remote external device expansion card;
所述互连单元接收所述远程外部设备扩展卡的内存单元控制器通过所述远程外部设备扩展卡的互连单元转发的远程外部设备扩展卡的内存单元中的处理后数据,并将该将所述远程外部设备扩展卡的内存单元中的处理后数据通过所述接口单元转发给主机。The interconnection unit receives the processed data in the memory unit of the remote external device expansion card forwarded by the memory unit controller of the remote external device expansion card through the interconnection unit of the remote external device expansion card, and the The processed data in the memory unit of the remote external device expansion card is forwarded to the host through the interface unit.
结合第二方面的第三种可能的实施方式,在第二方面的第四种可能的实施方式中,所述互连单元接收主机通过所述接口单元发送的远程外部设备扩展卡数据访问请求之后,还包括:In conjunction with the third possible implementation of the second aspect, in a fourth possible implementation of the second aspect, the interconnecting unit receives a remote external device expansion card data access request sent by the host through the interface unit ,Also includes:
若预设时间段内,所述互连单元未接收到所述远程外部设备扩展卡的互连单元转发的所述处理后数据,则通过所述接口单元向所述主机发送错误标识。If the interconnected unit does not receive the processed data forwarded by the interconnect unit of the remote external device expansion card within a preset time period, the error identifier is sent to the host through the interface unit.
结合第二方面的第四种可能的实施方式,在第二方面的第五种可能的实施方式中,所述外部设备扩展卡还包括:容寻址存储器CAM;With the fourth possible implementation of the second aspect, in a fifth possible implementation of the second aspect, the external device expansion card further includes: a capacitive address memory CAM;
若所述接口单元向所述主机发送错误标识之后,所述互连单元接收到所述远程外部设备扩展卡的互连单元转发的所述处理后数据,则将所述处理后数据存储在所述CAM中,并通过所述接口单元向所述主机发送第一中断信息;After the interface unit sends the error identifier to the host, the interconnect unit receives the processed data forwarded by the interconnect unit of the remote external device expansion card, and stores the processed data in the In the CAM, and sending the first interrupt information to the host by using the interface unit;
所述接口单元接收所述主机在接收到所述第一中断信息后再次发送的远程外部设备扩展卡数据访问请求,根据所述再次发送的远程外部设备扩展卡数据访问请求将所述CAM中的处理后数据发送给所述主机。Receiving, by the interface unit, a remote external device expansion card data access request that is sent by the host after receiving the first interrupt information, according to the retransmitted remote external device expansion card data access request, the CAM in the CAM The processed data is sent to the host.
结合第二方面,在第二方面的第六种可能的实施方式中,所述I/O外部设备控制器获取待处理数据,并将所述待处理数据发送给所述I/O外部设备进行处理之前,还包括:With reference to the second aspect, in a sixth possible implementation manner of the second aspect, the I/O external device controller acquires data to be processed, and sends the to-be-processed data to the I/O external device. Before processing, it also includes:
所述I/O外部设备控制器接收所述主机通过所述接口单元发送的工作状态读取请求,并根据所述工作状态读取请求将工作状态数据通过所述接口单元发送给所述主机;The I/O external device controller receives a working state read request sent by the host through the interface unit, and sends the working state data to the host through the interface unit according to the working state read request;
所述I/O外部设备控制器接收所述主机通过所述接口单元发送的更新后的工作状态数据,并根据所述更新后的工作状态数据启动所述I/O外部设备。 The I/O external device controller receives the updated working state data sent by the host through the interface unit, and starts the I/O external device according to the updated working state data.
结合第二方面的第六种可能的实施方式,在第二方面的第七种可能的实施方式中,所述I/O外部设备控制器接收所述主机通过所述接口单元发送的工作状态读取请求之前,还包括:With reference to the sixth possible implementation manner of the second aspect, in a seventh possible implementation manner of the second aspect, the I/O external device controller receives a working status read by the host by using the interface unit Before taking the request, it also includes:
所述内存单元控制器接收所述主机通过所述接口单元发送的数据缓存空间申请请求,所述数据缓存空间用于存储所述处理后的数据;The memory unit controller receives a data cache space request request sent by the host through the interface unit, where the data cache space is used to store the processed data;
所述内存单元控制器根据所述数据缓存空间申请请求在所述内存单元中预留所述数据缓存空间。The memory unit controller reserves the data cache space in the memory unit according to the data cache space request.
结合第二方面,在第二方面的第八种可能的实施方式中,所述I/O外部设备对所述待处理数据进行处理,并将处理后的数据发送给所述I/O外部设备控制器之后,还包括:With reference to the second aspect, in an eighth possible implementation manner of the second aspect, the I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device. After the controller, it also includes:
所述I/O外部设备控制器通过所述接口单元向所述主机发送第二中断信息,所述第二中断信息用于指示所述I/O外部设备已经完成数据处理。The I/O external device controller sends a second interrupt information to the host through the interface unit, where the second interrupt information is used to indicate that the I/O external device has completed data processing.
本发明实施例提供的外部设备扩展卡及输入输出外部设备的数据处理方法,可以通过接口单元直接插在主机的内存卡槽内,且该外部设备扩展卡上集成了内存单元和I/O外部设备,从而I/O外部设备控制器和主机可以直接通过内存单元的物理地址访问内存单元,即I/O外部设备控制器和主机可以直接根据内存单元内的物理地址读取内存单元中的数据,从而大大减小了主机和I/O外部设备从内存中读取数据的开销。The data processing method of the external device expansion card and the input/output external device provided by the embodiment of the present invention can be directly inserted into the memory card slot of the host through the interface unit, and the memory unit and the I/O external are integrated on the external device expansion card. The device, and thus the I/O external device controller and the host can directly access the memory unit through the physical address of the memory unit, that is, the I/O external device controller and the host can directly read the data in the memory unit according to the physical address in the memory unit. This greatly reduces the overhead of reading data from memory by the host and I/O external devices.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description of the drawings used in the embodiments or the prior art description will be briefly described below. Obviously, the drawings in the following description It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any inventive labor.
图1为本发明提供的外部设备扩展卡实施例一的结构示意图;1 is a schematic structural diagram of Embodiment 1 of an external device expansion card provided by the present invention;
图2为本发明提供的外部设备扩展卡实施例二的结构示意图;2 is a schematic structural diagram of Embodiment 2 of an external device expansion card provided by the present invention;
图3为本发明提供的外部设备扩展卡系统实施例一的结构示意图;3 is a schematic structural diagram of Embodiment 1 of an external device expansion card system provided by the present invention;
图4为本发明提供的外部设备扩展卡系统实施例二的结构示意图;4 is a schematic structural diagram of Embodiment 2 of an external device expansion card system provided by the present invention;
图5为本发明提供的I/O外部设备的数据处理方法实施例一的流程示意图; FIG. 5 is a schematic flowchart diagram of Embodiment 1 of a data processing method for an I/O external device according to the present invention;
图6为本发明提供的I/O外部设备的数据处理方法实施例二的流程示意图;FIG. 6 is a schematic flowchart diagram of Embodiment 2 of a data processing method for an I/O external device according to the present invention;
图7为本发明提供的I/O外部设备的数据处理方法实施例三的流程示意图。FIG. 7 is a schematic flowchart diagram of Embodiment 3 of a data processing method for an I/O external device according to the present invention.
具体实施方式detailed description
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. It is a partial embodiment of the invention, and not all of the embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts are within the scope of the present invention.
图1为本发明提供的外部设备扩展卡实施例一的结构示意图,如图1所示,该外部设备扩展卡包括:用于插设在主机的内存卡槽上的接口单元01、内存单元02、内存单元控制器03、输入输出(Input/Output,简称I/O)外部设备04、I/O外部设备控制器05。1 is a schematic structural diagram of Embodiment 1 of an external device expansion card provided by the present invention. As shown in FIG. 1 , the external device expansion card includes: an interface unit 01 for inserting into a memory card slot of a host, and a memory unit 02 The memory unit controller 03, the input/output (I/O) external device 04, and the I/O external device controller 05.
其中,参照图1,接口单元01与内存单元控制器03、I/O外部设备控制器05通信连接。内存单元02与内存单元控制器03通信连接,I/O外部设备04与I/O外部设备控制器05通信连接。I/O外部设备控制器05与内存单元控制器03通信连接。Referring to FIG. 1, the interface unit 01 is communicatively coupled to the memory unit controller 03 and the I/O external device controller 05. The memory unit 02 is communicatively coupled to the memory unit controller 03, and the I/O external device 04 is communicatively coupled to the I/O external device controller 05. The I/O external device controller 05 is communicatively coupled to the memory unit controller 03.
具体实现时,上述主机可以是计算机、处理器等具有内存卡槽的设备。常见的内存卡槽包括:双列直插式存储模块(Dual-Inline-Memory-Modules,简称DIMM)卡槽,但并不以此为限。In a specific implementation, the host may be a device having a memory card slot such as a computer or a processor. Common memory card slots include: Dual-Inline-Memory-Modules (DIMM) card slots, but not limited to this.
上述内存单元02可以是各种版本的双倍速率同步动态随机存储器(Double Data Rate,简称DDR),像DDR、DDR2、DDR3等,但并不以此为限,其他可以作为内存的存储器均可以。The above memory unit 02 can be various versions of double rate synchronous dynamic random access memory (Double Data Rate, DDR for short), such as DDR, DDR2, DDR3, etc., but not limited thereto, other memory that can be used as memory can .
具体地,上述I/O外部设备控制器05,用于向内存单元控制器03发送携带内存单元02中物理地址的第一读取请求,通过上述内存单元控制器03从内存单元02中读取上述物理地址对应的数据。Specifically, the I/O external device controller 05 is configured to send a first read request carrying the physical address in the memory unit 02 to the memory unit controller 03, and read from the memory unit 02 through the memory unit controller 03. The data corresponding to the above physical address.
接收单元01,用于接收主机发送的携带上述内存单元02中物理地址的第二读取请求,并将第二读取请求转发给内存单元控制器03,通过内存单元控 制器03从内存单元02内读取物理地址对应的数据。The receiving unit 01 is configured to receive a second read request sent by the host and carry the physical address in the memory unit 02, and forward the second read request to the memory unit controller 03, and control the memory unit The controller 03 reads the data corresponding to the physical address from the memory unit 02.
具体地,内存单元02中的物理地址可以由主机上内存卡槽的物理地址决定,该内存单元02中的物理地址在内存卡槽的物理地址范围内。外部设备扩展卡插入内存卡槽、确定完内存单元02的物理地址后,将内存单元02的物理地址共享给主机和I/O外部设备。从而,主机和I/O外部设备可以直接采用内存单元02的物理地址从内存单元中读取数据。Specifically, the physical address in the memory unit 02 can be determined by the physical address of the memory card slot on the host, and the physical address in the memory unit 02 is within the physical address range of the memory card slot. After the external device expansion card is inserted into the memory card slot and the physical address of the memory unit 02 is determined, the physical address of the memory unit 02 is shared with the host and the I/O external device. Thus, the host and the I/O external device can directly read data from the memory unit using the physical address of the memory unit 02.
本实施例提供的外部设备扩展卡,可以通过接口单元直接插在主机的内存卡槽内,且该外部设备扩展卡上集成了内存单元和I/O外部设备,从而I/O外部设备控制器和主机可以直接通过内存单元的物理地址访问内存单元,即I/O外部设备控制器和主机可以直接根据内存单元内的物理地址读取内存单元中的数据,从而大大减小了主机和I/O外部设备从内存中读取数据的开销。The external device expansion card provided in this embodiment can be directly inserted into the memory card slot of the host through the interface unit, and the memory unit and the I/O external device are integrated on the external device expansion card, thereby the I/O external device controller. And the host can directly access the memory unit through the physical address of the memory unit, that is, the I/O external device controller and the host can directly read the data in the memory unit according to the physical address in the memory unit, thereby greatly reducing the host and I/. O The overhead of external devices reading data from memory.
进一步地,内存单元控制器03,可以用于接收主机通过接口单元01发送的数据缓存空间申请请求,并根据该数据缓存空间申请请求在内存单元02内预留数据缓存空间。该数据缓存空间可以用来存储一些待处理的数据,或者,处理后的数据。Further, the memory unit controller 03 can be configured to receive a data cache space request request sent by the host through the interface unit 01, and reserve a data cache space in the memory unit 02 according to the data cache space request. The data cache space can be used to store some data to be processed, or processed data.
图2为本发明提供的外部设备扩展卡实施例二的结构示意图,如图2所示,在图1的基础上,该外部设备扩展卡还包括:用于连接远程外部设备扩展卡的互连单元06,该互连单元06与接口单元01通信连接。2 is a schematic structural diagram of Embodiment 2 of an external device expansion card according to the present invention. As shown in FIG. 2, on the basis of FIG. 1, the external device expansion card further includes: an interconnection for connecting a remote external device expansion card. Unit 06, which is communicatively coupled to interface unit 01.
图3为本发明提供的外部设备扩展卡系统实施例一的结构示意图,如图3所示,该系统包括本地外部设备扩展卡101和远程外部设备扩展卡102,其中,本地外部设备扩展卡101是直接插在主机内存卡槽上的,远程外部设备扩展卡102与本地外部设备扩展卡的结构相同,也包括:接口单元11、内存单元12、内存单元控制器13、I/O外部设备14、I/O外部设备控制器15和互连单元16。FIG. 3 is a schematic structural diagram of Embodiment 1 of an external device expansion card system according to the present invention. As shown in FIG. 3, the system includes a local external device expansion card 101 and a remote external device expansion card 102, wherein the local external device expansion card 101 The remote external device expansion card 102 has the same structure as the local external device expansion card, and includes: an interface unit 11, a memory unit 12, a memory unit controller 13, and an I/O external device. The I/O external device controller 15 and the interconnection unit 16.
其中的I/O外部设备类型可以不同,通过将远程外部设备扩展卡102的互连单元16与本地外部设备扩展卡101的互连单元06连接实现本地外部设备扩展卡101和远程外部设备扩展卡102的连接。但不以图3为限,依照这种方式,可以扩展多个远程外部设备扩展卡。即本实施例提供的外部设备扩展卡实现了外部设备扩展卡的可扩展性,避免一个外部设备扩展卡插入内存卡槽 后,就限制了I/O外部设备的类型。The type of I/O external device may be different, and the local external device expansion card 101 and the remote external device expansion card are realized by connecting the interconnection unit 16 of the remote external device expansion card 102 with the interconnection unit 06 of the local external device expansion card 101. 102 connection. However, it is not limited to FIG. 3, and in this way, a plurality of remote external device expansion cards can be expanded. That is, the external device expansion card provided in this embodiment implements the scalability of the external device expansion card, and prevents an external device expansion card from being inserted into the memory card slot. After that, the type of I/O external device is limited.
互连单元06,用于接收主机通过接口单元01发送的第三读取请求,并将第三读取请求转发给远程外部设备扩展卡的互连单元16,以读取所述远程外部设备扩展卡的内存单元中的数据。其中,第三读取请求由远程外部设备扩展卡的互连单元16发送给远程外部设备扩展卡的内存单元控制器13,该第三读取请求中携带远程外部设备扩展卡的内存单元12中的物理地址。The interconnection unit 06 is configured to receive a third read request sent by the host through the interface unit 01, and forward the third read request to the interconnect unit 16 of the remote external device expansion card to read the remote external device extension The data in the memory unit of the card. The third read request is sent by the interconnect unit 16 of the remote external device expansion card to the memory unit controller 13 of the remote external device expansion card, where the third read request carries the remote external device expansion card in the memory unit 12 Physical address.
具体实现时,远程外部设备扩展卡的内存单元12的物理地址也可以由主机的内存卡槽的物理地址确定,该远程外部设备扩展卡的内存单元12的物理地址也在内存卡槽的物理地址范围内,但与本地外部设备扩展卡的内存单元的物理地址不重合。In a specific implementation, the physical address of the memory unit 12 of the remote external device expansion card may also be determined by the physical address of the memory card slot of the host, and the physical address of the memory unit 12 of the remote external device expansion card is also the physical address of the memory card slot. The range does not coincide with the physical address of the memory unit of the local external device expansion card.
图4为本发明提供的外部设备扩展卡系统实施例二的结构示意图,参照图4,以本地外部设备扩展卡为例,上述外部设备扩展卡还可以包括:内容寻址存储器(Content Addressable Memory,简称CAM)07,该CAM07与接口单元01、互连单元06通信连接。4 is a schematic structural diagram of Embodiment 2 of an external device expansion card system according to the present invention. Referring to FIG. 4, taking the local external device expansion card as an example, the external device expansion card may further include: a content addressable memory (Content Addressable Memory, Referred to as CAM) 07, the CAM 07 is communicatively coupled to the interface unit 01 and the interconnection unit 06.
该CAM07,用于临时存储远程外部设备扩展卡发送的数据。具体地,主机访问远程外部设备扩展卡的内存单元过程中,如果远程外部设备扩展卡在预设时间内,没有接收到远程外部设备扩展卡返回的数据,则向主机发送错误标识,在发送错误标识后,如果远程外部设备扩展卡又返回了主机请求的数据,则将这些数据临时存储在本地外部设备扩展卡的CAM07中,等主机再次请求的时候,就直接将本地外部设备扩展卡的CAM07中的数据发送给主机。The CAM07 is used to temporarily store data sent by a remote external device expansion card. Specifically, in the process of the host accessing the memory unit of the remote external device expansion card, if the remote external device expansion card does not receive the data returned by the remote external device expansion card within the preset time, the error identifier is sent to the host, and the error is sent. After the identification, if the remote external device expansion card returns the data requested by the host, the data is temporarily stored in the CAM07 of the local external device expansion card, and when the host requests again, the CAM07 of the local external device expansion card is directly The data in is sent to the host.
需要说明的是,上述I/O外部设备可以是传统I/O外部设备,也可以是硬件加速器扩展卡等,相应地,I/O外部设备是传统I/O外部设备时,上述I/O外部设备控制单器05是传统的I/O外部设备控制器,I/O外部设备是硬件加速器扩展卡时,上述I/O外部设备控制单器05可以是硬件加速器,但并不以此为限。It should be noted that the above I/O external device may be a traditional I/O external device, or may be a hardware accelerator expansion card, etc., correspondingly, when the I/O external device is a traditional I/O external device, the above I/O The external device control unit 05 is a conventional I/O external device controller. When the I/O external device is a hardware accelerator expansion card, the above I/O external device control unit 05 may be a hardware accelerator, but this is not limit.
图5为本发明提供的I/O外部设备的数据处理方法实施例一的流程示意图,该方法用于前述外部设备扩展卡,该外部设备扩展卡的结构可参照图1实施例,在此不再赘述,如图2所示,该方法包括:FIG. 5 is a schematic flowchart of Embodiment 1 of a data processing method for an I/O external device according to the present invention. The method is used for the foregoing external device expansion card. The structure of the external device expansion card can be referred to the embodiment of FIG. As further described, as shown in FIG. 2, the method includes:
S501、I/O外部设备控制器获取待处理数据,并将该待处理数据发送给 I/O外部设备进行处理。S501. The I/O external device controller acquires the to-be-processed data, and sends the to-be-processed data to I/O external devices are processed.
S502、I/O外部设备对上述待处理数据进行处理,并将处理后的数据发送给I/O外部设备控制器。S502: The I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device controller.
S503、I/O外部设备控制器将上述处理后的数据发送给内存单元控制器,由该内存单元控制器将该处理后的数据存储在内存单元中。S503. The I/O external device controller sends the processed data to the memory unit controller, and the processed memory unit stores the processed data in the memory unit.
S504、内存单元控制器接收主机通过接口单元发送的数据访问请求,并根据该数据访问请求携带的上述内存单元中的物理地址在内存单元读取处理后的数据,并将该处理后的数据通过接口单元发送给主机。进而主机可以采用处理后的数据进行进一步地处理。S504. The memory unit controller receives a data access request sent by the host through the interface unit, and reads the processed data in the memory unit according to the physical address in the memory unit carried in the data access request, and passes the processed data. The interface unit sends to the host. The host can then use the processed data for further processing.
具体地,可以是由主机中的CPU上的软件或应用程序来发送数据访问请求。数据访问请求中携带的物理地址是上述处理后的数据在内存单元中对应的地址。Specifically, the data access request may be sent by software or an application on a CPU in the host. The physical address carried in the data access request is the address corresponding to the processed data in the memory unit.
本实施例中,I/O外部设备控制器将I/O外部设备处理后的数据存储在内存单元中,主机可以直接读取内存单元内存储的I/O外部设备处理后的数据,实现了主机可以直接对内存单元中的数据进行读写,大大减小了I/O外设控制器与主机进行交互时存在的数据搬移开销。In this embodiment, the I/O external device controller stores the processed data of the I/O external device in the memory unit, and the host can directly read the processed data of the I/O external device stored in the memory unit, thereby realizing The host can directly read and write data in the memory unit, which greatly reduces the data migration overhead that exists when the I/O peripheral controller interacts with the host.
另一实施例中,上述I/O外部设备控制器获取待处理数据可以有两种情况:In another embodiment, the above I/O external device controller can obtain data to be processed in two cases:
(1)待处理数据预先存储在外部设备扩展卡的内存单元中,具体地,I/O外部设备控制器向内存单元控制器发送待处理数据读取请求;内存单元控制器根据上述待处理数据读取请求中携带的内存单元中的物理地址在内存单元中读取待处理数据,并将该待处理数据发送给I/O外部设备控制器。进而由I/O外部设备控制器将待处理数据发送给I/O外部设备进行处理。其中,待处理数据读取请求中携带的内存单元中的物理地址是待处理数据在内存单元中对应的物理地址。(1) The data to be processed is pre-stored in the memory unit of the external device expansion card, specifically, the I/O external device controller sends a pending data read request to the memory unit controller; the memory unit controller according to the to-be-processed data The physical address in the memory unit carried in the read request reads the data to be processed in the memory unit, and sends the to-be-processed data to the I/O external device controller. The data to be processed is sent to the I/O external device for processing by the I/O external device controller. The physical address in the memory unit carried in the data read request to be processed is the physical address corresponding to the data to be processed in the memory unit.
本实施例中I/O外部设备控制器可以直接采用直接内存访问(Direct Memory Access,简称DMA)的方式对内存单元直接进行读写。In this embodiment, the I/O external device controller can directly read and write the memory unit by using direct memory access (DMA).
(2)I/O外部设备控制器接收主机通过接口单元发送的待处理数据。即该待处理数据是由主机中其它设备发送给外部设备扩展卡内的I/O外部设备控制器的,例如,可以是主机中网卡通过主机发送给该I/O外部设备控制器 的。(2) The I/O external device controller receives the data to be processed sent by the host through the interface unit. That is, the to-be-processed data is sent by the other device in the host to the I/O external device controller in the external device expansion card. For example, the network card in the host may be sent to the I/O external device controller through the host. of.
I/O外部设备控制器获取待处理数据,并将该待处理数据发送给I/O外部设备进行处理之前,I/O外部设备控制器接收主机通过接口单元发送的工作状态读取请求,并根据该工作状态读取请求将工作状态数据通过接口单元发送给主机。进而,I/O外部设备控制器接收该主机通过接口单元发送的更新后的工作状态数据,并根据该更新后的工作状态数据启动上述I/O外部设备。Before the I/O external device controller acquires the to-be-processed data and sends the to-be-processed data to the I/O external device for processing, the I/O external device controller receives the working state read request sent by the host through the interface unit, and The working state data is sent to the host through the interface unit according to the working state read request. Further, the I/O external device controller receives the updated working state data sent by the host through the interface unit, and starts the I/O external device according to the updated working state data.
需要说明的是,I/O外部设备控制器中可以包括多个不同的寄存器,由寄存器的值来表示该外部设备扩展卡的工作状态,即I/O外部设备控制器返给主机的工作状态数据是各个寄存器的值,主机可以对这些寄存器的值进行修改,修改后返回给外部设备扩展卡,以启动外部设备扩展卡中的I/O外部设备。It should be noted that the I/O external device controller may include a plurality of different registers, and the value of the register indicates the working state of the external device expansion card, that is, the working state of the I/O external device controller returned to the host. The data is the value of each register. The host can modify the values of these registers and modify them to return to the external device expansion card to start the I/O external device in the external device expansion card.
更进一步地,I/O外部设备控制器接收主机通过接口单元发送的工作状态读取请求之前,上述内存单元控制器还可以接收主机通过接口单元发送的数据缓存空间申请请求,进而,该内存单元控制器根据缓存空间申请请求在上述内存单元中预留上述数据缓存空间。其中,上述该数据缓存空间用于存储上述处理后的数据。另外,对于上述需要在内存单元存储待处理数据的情况,该数据缓存空间还可以用于存储待处理数据。Further, before the I/O external device controller receives the working state read request sent by the host through the interface unit, the memory unit controller may further receive a data cache space request request sent by the host through the interface unit, and further, the memory unit The controller reserves the foregoing data cache space in the foregoing memory unit according to the cache space request. The data cache space is used to store the processed data. In addition, for the above-mentioned case where the data to be processed needs to be stored in the memory unit, the data cache space can also be used to store the data to be processed.
具体实现过程中,内存单元控制器接收到数据缓冲空间申请请求后,对内存单元进行初始化,以预留数据缓冲空间。During the specific implementation process, after receiving the data buffer space request request, the memory unit controller initializes the memory unit to reserve the data buffer space.
参照图2、图3,上述外部设备扩展卡还包括:互连单元。Referring to FIGS. 2 and 3, the above external device expansion card further includes: an interconnection unit.
图6为本发明提供的I/O外部设备的数据处理方法实施例二的流程示意图,参照图3、图4的外部设备扩展卡系统,具体地,主机也可以直接读取远程外部设备扩展卡的内存单元中的数据,如图6所示,具体地:FIG. 6 is a schematic flowchart of Embodiment 2 of a data processing method for an I/O external device according to the present invention. Referring to the external device expansion card system of FIG. 3 and FIG. 4, specifically, the host can directly read the remote external device expansion card. The data in the memory unit, as shown in Figure 6, specifically:
S601、互连单元接收主机通过接口单元发送的远程外部设备扩展卡数据访问请求,并将远程外部设备扩展卡数据访问请求通过远程外部设备扩展卡的互连单元转发给远程外部设备扩展卡的内存单元控制器。其中,该远程外部设备扩展卡数据访问请求中携带远程外部设备扩展卡中内存单元中的物理地址,用于请求所述远程外部设备扩展卡的内存单元中存储的处理后数据。S601. The interconnect unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the memory of the remote external device expansion card through the interconnect unit of the remote external device expansion card. Unit controller. The remote external device expansion card data access request carries a physical address in the memory unit in the remote external device expansion card, and is used to request the processed data stored in the memory unit of the remote external device expansion card.
具体地,远程外部设备扩展卡中的I/O外部设备处理后的数据也存储在 远程外部设备扩展卡中的内存单元中,主机可以通过远程外部设备扩展卡中内存单元的物理地址直接访问远程外部设备扩展卡中的内存单元,远程外部设备扩展卡数据访问请求中携带的物理地址,是处理后数据在远程外部设备扩展卡的内存单元中对应的物理地址。Specifically, the processed data of the I/O external device in the remote external device expansion card is also stored in In the memory unit in the remote external device expansion card, the host can directly access the memory unit in the remote external device expansion card through the physical address of the memory unit in the remote external device expansion card, and the physical address carried in the remote external device expansion card data access request Is the corresponding physical address of the processed data in the memory unit of the remote external device expansion card.
S602、互连单元接收远程外部设备扩展卡的内存单元控制器通过远程外部设备扩展卡的互连单元转发的远程外部设备扩展卡的内存单元中的处理后数据,并将该远程外部设备扩展卡的内存单元中的处理后数据转发给主机。S602. The interconnect unit receives the processed data in the memory unit of the remote external device expansion card forwarded by the memory unit controller of the remote external device expansion card through the interconnection unit of the remote external device expansion card, and expands the remote external device expansion card. The processed data in the memory unit is forwarded to the host.
图7为本发明提供的I/O外部设备的数据处理方法实施例三的流程示意图,主机在访问远程外部设备扩展卡的过程中,可能存在较长的延时,为了避免主机读取到错误的信息,可以采用多次访问的方法来解决这一问题,以两次异步访问为例,如图7所示,该方法包括:FIG. 7 is a schematic flowchart diagram of Embodiment 3 of a data processing method for an I/O external device according to the present invention. In the process of accessing a remote external device expansion card, the host may have a long delay, in order to avoid the host reading an error. The information can be solved by multiple access methods. Take two asynchronous accesses as an example. As shown in Figure 7, the method includes:
S701、互连单元接收主机通过接口单元发送的远程外部设备扩展卡数据访问请求,并将远程外部设备扩展卡数据访问请求通过远程外部设备扩展卡的互连单元转发给远程外部设备扩展卡的内存单元控制器。S701. The interconnect unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request to the memory of the remote external device expansion card through the interconnect unit of the remote external device expansion card. Unit controller.
S702、若预设时间段内,该互连单元未接收到远程外部设备扩展卡的互连单元转发的上述处理后数据,则通过上述接口单元向所述主机发送错误标识。S702. If the interconnected unit does not receive the processed data forwarded by the interconnecting unit of the remote external device expansion card within a preset time period, send an error identifier to the host by using the interface unit.
如图4所示,上述外部设备扩展卡还可以包括:CAM。As shown in FIG. 4, the above external device expansion card may further include: a CAM.
S703、若上述接口单元向主机发送上述错误标识之后,该互连单元接收到远程外部设备扩展卡的互连单元转发的上述处理后数据,则将该处理后数据存储在CAM中,并通过接口单元向主机发送第一中断信息。S703. After the interface unit sends the error identifier to the host, the interconnect unit receives the processed data forwarded by the interconnect unit of the remote external device expansion card, and stores the processed data in the CAM and passes the interface. The unit sends a first interrupt message to the host.
S704、上述接口单元接收主机在接收到上述第一中断信息后再次发送的远程外部设备扩展卡数据访问请求,根据该再次发送的远程外部设备扩展卡数据访问请求将上述CAM中的处理后数据发送给主机。即接口单元再次受到主机发送的远程外部设备扩展卡数据访问请求后,不需要将该请求转发给远程外部设备扩展卡,而可以直接将CAM中的处理后数据发送给主机。S704. The interface unit receives a remote external device expansion card data access request that is sent by the host after receiving the first interrupt information, and sends the processed data in the CAM according to the retransmitted remote external device expansion card data access request. Give the host. That is, after the interface unit is again subjected to the remote external device expansion card data access request sent by the host, the interface does not need to be forwarded to the remote external device expansion card, and the processed data in the CAM can be directly sent to the host.
参照前述实施例,对于远程外部设备扩展卡,与本地外部设备扩展卡一样,在远程外部设备扩展卡的I/O外部设备处理数据之前,主机也会请求读取远程外部设备扩展卡的I/O外部设备控制器内的工作状态数据,并修改工作状态数据返回给远程外部设备扩展卡的I/O外部设备控制器,以启动远程 外部设备扩展卡的I/O外部设备,具体过程参照前述实施例,在此不再赘述。Referring to the foregoing embodiment, for the remote external device expansion card, like the local external device expansion card, the host also requests to read the remote external device expansion card I// before the remote external device expansion card's I/O external device processes the data. O The operating status data in the external device controller, and modify the working status data to be returned to the remote external device expansion card I/O external device controller to start the remote For the I/O external device of the external device expansion card, refer to the foregoing embodiment for a specific process, and details are not described herein again.
同样,对于远程外部设备扩展卡,主机也可以预先申请数据缓存空间,即向远程外部设备扩展卡的内存单元控制器发送数据缓存空间申请请求,以使远程外部设备扩展卡的内存单元控制器在远程外部设备扩展卡的内存单元中预留数据缓存空间,具体过程参照前述实施例,在此不再赘述。Similarly, for a remote external device expansion card, the host can also apply for a data cache space in advance, that is, send a data cache space request request to the memory unit controller of the remote external device expansion card, so that the memory unit controller of the remote external device expansion card is The data cache space is reserved in the memory unit of the remote external device expansion card. For the specific process, refer to the foregoing embodiment, and details are not described herein again.
另一实施例中,上述I/O外部设备对上述待处理数据进行处理,并将处理后的数据发送给I/O外部设备控制器之后,I/O外部设备控制器通过上述接口单元向主机发送第二中断信息,该第二中断信息用于指示I/O外部设备已经完成数据处理。需要说明的是,一般的内存卡槽并不会主动向主机的CPU发送中断请求,因此内存卡槽上一般也没有提供中断引脚,本实施例中,I/O外部设备控制器在I/O外部设备完成数据处理后主动向主机发送中断信息,以通知主机的CPU可以进行后续的处理。远程外部设备扩展卡也可以参照本地外部设备扩展卡,向主机发送中断信息。In another embodiment, after the I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device controller, the I/O external device controller sends the host to the host through the interface unit. Sending a second interrupt information, the second interrupt information is used to indicate that the I/O external device has completed data processing. It should be noted that the general memory card slot does not actively send an interrupt request to the CPU of the host. Therefore, the interrupt pin is generally not provided on the memory card slot. In this embodiment, the I/O external device controller is in I/. After the external device completes the data processing, it sends an interrupt message to the host to notify the host CPU of the subsequent processing. The remote external device expansion card can also send an interrupt message to the host by referring to the local external device expansion card.
另外,为了更好地避免延时上述互连单元可以选用高速互连接口。In addition, a high-speed interconnect interface can be selected to better avoid delays in the above interconnected cells.
本领域普通技术人员可以理解:实现上述方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成,前述的程序可以存储于一计算机可读取存储介质中,该程序在执行时,执行包括上述方法实施例的步骤;而前述的存储介质包括:ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。A person skilled in the art can understand that all or part of the steps of implementing the above method embodiments may be completed by using hardware related to the program instructions. The foregoing program may be stored in a computer readable storage medium, and the program is executed when executed. The foregoing steps include the steps of the foregoing method embodiments; and the foregoing storage medium includes: a medium that can store program codes, such as a ROM, a RAM, a magnetic disk, or an optical disk.
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the foregoing embodiments may be modified, or some or all of the technical features may be equivalently replaced; and the modifications or substitutions do not deviate from the technical solutions of the embodiments of the present invention. range.

Claims (13)

  1. 一种外部设备扩展卡,其特征在于,包括:用于插设在主机的内存卡槽上的接口单元、内存单元、内存单元控制器、输入输出I/O外部设备、以及I/O外部设备控制器;An external device expansion card, comprising: an interface unit for inserting in a memory card slot of a host, a memory unit, a memory unit controller, an input/output I/O external device, and an I/O external device Controller
    所述接口单元与所述内存单元控制器、所述I/O外部设备控制器通信连接;The interface unit is communicatively connected to the memory unit controller and the I/O external device controller;
    所述内存单元与所述内存单元控制器通信连接,所述I/O外部设备控制器与所述I/O外部设备通信连接;The memory unit is communicatively coupled to the memory unit controller, and the I/O external device controller is communicatively coupled to the I/O external device;
    所述I/O外部设备控制器与所述内存单元控制器通信连接;其中,The I/O external device controller is communicatively coupled to the memory unit controller; wherein
    所述I/O外部设备控制器,用于向所述内存单元控制器发送携带所述内存单元中一个物理地址的第一读取请求,通过所述内存单元控制器从所述内存单元内读取所述物理地址对应的数据;所述接口单元,用于接收所述主机发送的携带所述内存单元中的所述物理地址的第二读取请求,并将所述第二读取请求转发给所述内存单元控制器,通过所述内存单元控制器从所述内存单元内读取所述物理地址对应的数据。The I/O external device controller is configured to send, to the memory unit controller, a first read request that carries a physical address in the memory unit, and read from the memory unit by using the memory unit controller Obtaining data corresponding to the physical address; the interface unit is configured to receive a second read request sent by the host that carries the physical address in the memory unit, and forward the second read request And the memory unit controller reads data corresponding to the physical address from the memory unit by using the memory unit controller.
  2. 根据权利要求1所述的外部设备扩展卡,其特征在于,所述内存单元控制器,用于接收所述主机通过所述接口单元发送的数据缓存空间申请请求,并根据所述数据缓存空间申请请求在所述内存单元内预留数据缓存空间。The external device expansion card according to claim 1, wherein the memory unit controller is configured to receive a data cache space application request sent by the host through the interface unit, and apply according to the data cache space. Requesting to reserve data cache space within the memory unit.
  3. 根据权利要求1所述的外部设备扩展卡,其特征在于,所述外部设备扩展卡还包括:用于连接远程外部设备扩展卡的互连单元,所述互连单元与所述接口单元通信连接;The external device expansion card according to claim 1, wherein the external device expansion card further comprises: an interconnection unit for connecting a remote external device expansion card, wherein the interconnection unit is in communication with the interface unit ;
    所述互连单元,用于接收所述主机通过所述接口单元发送的第三读取请求,并将所述第三读取请求转发给所述远程外部设备扩展卡的互连单元,以读取所述远程外部设备扩展卡的内存单元中的数据;The interconnecting unit is configured to receive a third read request sent by the host through the interface unit, and forward the third read request to an interconnect unit of the remote external device expansion card to read Taking data in a memory unit of the remote external device expansion card;
    其中,所述第三读取请求由所述远程外部设备扩展卡的互连单元发送给所述远程外部设备扩展卡的内存单元控制器,所述第三读取请求中携带所述远程外部设备扩展卡的内存单元中的物理地址。 The third read request is sent by the interconnect unit of the remote external device expansion card to the memory unit controller of the remote external device expansion card, and the third read request carries the remote external device. The physical address in the memory unit of the expansion card.
  4. 根据权利要求3所述的外部设备扩展卡,其特征在于,所述外部设备扩展卡还包括:容寻址存储器CAM,其中,所述CAM与所述接口单元、以及所述互连单元通信连接;The external device expansion card according to claim 3, wherein the external device expansion card further comprises: a capacitive address memory CAM, wherein the CAM is communicably connected to the interface unit and the interconnection unit ;
    所述CAM,用于临时存储所述远程外部设备扩展卡发送的数据。The CAM is configured to temporarily store data sent by the remote external device expansion card.
  5. 一种输入输出外部设备的数据处理方法,其特征在于,所述方法用于外部设备扩展卡,所述外部设备扩展卡包括:用于插设在主机的内存卡槽上的接口单元、内存单元、内存单元控制器、输入输出I/O外部设备、以及I/O外部设备控制器;A data processing method for inputting and outputting an external device, wherein the method is used for an external device expansion card, and the external device expansion card includes: an interface unit and a memory unit for inserting in a memory card slot of the host , a memory unit controller, an input/output I/O external device, and an I/O external device controller;
    所述方法包括:The method includes:
    所述I/O外部设备控制器获取待处理数据,并将所述待处理数据发送给所述I/O外部设备进行处理;The I/O external device controller acquires data to be processed, and sends the to-be-processed data to the I/O external device for processing;
    所述I/O外部设备对所述待处理数据进行处理,并将处理后的数据发送给所述I/O外部设备控制器;The I/O external device processes the to-be-processed data, and sends the processed data to the I/O external device controller;
    所述I/O外部设备控制器将所述处理后的数据发送给所述内存单元控制器,由所述内存单元控制器将所述处理后的数据存储在所述内存单元中的一个物理地址中;The I/O external device controller sends the processed data to the memory unit controller, and the memory unit controller stores the processed data in a physical address in the memory unit in;
    所述内存单元控制器接收所述主机通过所述接口单元发送的数据访问请求,并根据所述数据访问请求携带的所述内存单元中的所述物理地址在所述内存单元中读取所述处理后的数据,并将所述处理后的数据通过所述接口单元发送给所述主机。The memory unit controller receives a data access request sent by the host through the interface unit, and reads the content in the memory unit according to the physical address in the memory unit carried by the data access request. The processed data is sent to the host through the interface unit.
  6. 根据权利要求5所述的方法,其特征在于,所述I/O外部设备控制器获取待处理数据,包括:The method according to claim 5, wherein the I/O external device controller acquires data to be processed, including:
    所述I/O外部设备控制器向所述内存单元控制器发送待处理数据读取请求;The I/O external device controller sends a to-be-processed data read request to the memory unit controller;
    所述内存单元控制器根据所述待处理数据读取请求中携带的所述内存单元中的物理地址在所述内存单元中读取所述待处理数据,并将所述待处理数据发送给所述I/O外部设备控制器。 The memory unit controller reads the to-be-processed data in the memory unit according to a physical address in the memory unit carried in the to-be-processed data read request, and sends the to-be-processed data to the The I/O external device controller.
  7. 根据权利要求5所述的方法,其特征在于,所述I/O外部设备控制器获取待处理数据,包括:The method according to claim 5, wherein the I/O external device controller acquires data to be processed, including:
    所述I/O外部设备控制器接收所述主机通过所述接口单元发送的待处理数据。The I/O external device controller receives the to-be-processed data sent by the host through the interface unit.
  8. 根据权利要求5所述的方法,其特征在于,所述外部设备扩展卡还包括:用于连接远程外部设备扩展卡的互连单元;The method according to claim 5, wherein the external device expansion card further comprises: an interconnection unit for connecting a remote external device expansion card;
    所述互连单元接收所述主机通过所述接口单元发送的远程外部设备扩展卡数据访问请求,并将所述远程外部设备扩展卡数据访问请求通过所述远程外部设备扩展卡的互连单元转发给所述远程外部设备扩展卡的内存单元控制器,其中,所述远程外部设备扩展卡数据访问请求中携带所述远程外部设备扩展卡中内存单元中的物理地址,用于请求所述远程外部设备扩展卡的内存单元中存储的处理后数据;The interconnection unit receives a remote external device expansion card data access request sent by the host through the interface unit, and forwards the remote external device expansion card data access request through an interconnection unit of the remote external device expansion card a memory unit controller for the remote external device expansion card, wherein the remote external device expansion card data access request carries a physical address in a memory unit in the remote external device expansion card for requesting the remote external The processed data stored in the memory unit of the device expansion card;
    所述互连单元接收所述远程外部设备扩展卡的内存单元控制器通过所述远程外部设备扩展卡的互连单元转发的远程外部设备扩展卡的内存单元中的处理后数据,并将该将所述远程外部设备扩展卡的内存单元中的处理后数据通过所述接口单元转发给所述主机。The interconnection unit receives the processed data in the memory unit of the remote external device expansion card forwarded by the memory unit controller of the remote external device expansion card through the interconnection unit of the remote external device expansion card, and the The processed data in the memory unit of the remote external device expansion card is forwarded to the host through the interface unit.
  9. 根据权利要求8所述的方法,其特征在于,所述互连单元接收主机通过所述接口单元发送的远程外部设备扩展卡数据访问请求之后,还包括:The method according to claim 8, wherein the receiving unit, after receiving the remote external device expansion card data access request sent by the host through the interface unit, further comprises:
    若预设时间段内,所述互连单元未接收到所述远程外部设备扩展卡的互连单元转发的所述处理后数据,则通过所述接口单元向所述主机发送错误标识。If the interconnected unit does not receive the processed data forwarded by the interconnect unit of the remote external device expansion card within a preset time period, the error identifier is sent to the host through the interface unit.
  10. 根据权利要求9所述的方法,其特征在于,所述外部设备扩展卡还包括:容寻址存储器CAM;The method of claim 9, wherein the external device expansion card further comprises: a capacitive address memory CAM;
    若所述接口单元向所述主机发送错误标识之后,所述互连单元接收到所述远程外部设备扩展卡的互连单元转发的所述处理后数据,则将所述处理后数据存储在所述CAM中,并通过所述接口单元向所述主机发送第一中断信息;After the interface unit sends the error identifier to the host, the interconnect unit receives the processed data forwarded by the interconnect unit of the remote external device expansion card, and stores the processed data in the In the CAM, and sending the first interrupt information to the host by using the interface unit;
    所述接口单元接收所述主机在接收到所述第一中断信息后再次发送的远程 外部设备扩展卡数据访问请求,根据所述再次发送的远程外部设备扩展卡数据访问请求将所述CAM中的处理后数据发送给所述主机。The interface unit receives a remotely sent by the host after receiving the first interrupt information The external device expansion card data access request transmits the processed data in the CAM to the host according to the retransmitted remote external device expansion card data access request.
  11. 根据权利要求5所述的方法,其特征在于,所述I/O外部设备控制器获取待处理数据,并将所述待处理数据发送给所述I/O外部设备进行处理之前,还包括:The method according to claim 5, wherein before the I/O external device controller acquires the data to be processed and sends the data to be processed to the I/O external device for processing, the method further includes:
    所述I/O外部设备控制器接收所述主机通过所述接口单元发送的工作状态读取请求,并根据所述工作状态读取请求将工作状态数据通过所述接口单元发送给所述主机;The I/O external device controller receives a working state read request sent by the host through the interface unit, and sends the working state data to the host through the interface unit according to the working state read request;
    所述I/O外部设备控制器接收所述主机通过所述接口单元发送的更新后的工作状态数据,并根据所述更新后的工作状态数据启动所述I/O外部设备。The I/O external device controller receives the updated working state data sent by the host through the interface unit, and starts the I/O external device according to the updated working state data.
  12. 根据权利要求11所述的方法,其特征在于,所述I/O外部设备控制器接收所述主机通过所述接口单元发送的工作状态读取请求之前,还包括:The method of claim 11, wherein before the I/O external device controller receives the working status read request sent by the host through the interface unit, the method further includes:
    所述内存单元控制器接收所述主机通过所述接口单元发送的数据缓存空间申请请求,所述数据缓存空间用于存储所述处理后的数据;The memory unit controller receives a data cache space request request sent by the host through the interface unit, where the data cache space is used to store the processed data;
    所述内存单元控制器根据所述数据缓存空间申请请求在所述内存单元中预留所述数据缓存空间。The memory unit controller reserves the data cache space in the memory unit according to the data cache space request.
  13. 根据权利要求5所述的方法,其特征在于,所述I/O外部设备对所述待处理数据进行处理,并将处理后的数据发送给所述I/O外部设备控制器之后,还包括:The method according to claim 5, wherein the I/O external device processes the data to be processed, and after the processed data is sent to the I/O external device controller, further includes :
    所述I/O外部设备控制器通过所述接口单元向所述主机发送第二中断信息,所述第二中断信息用于指示所述I/O外部设备已经完成数据处理。 The I/O external device controller sends a second interrupt information to the host through the interface unit, where the second interrupt information is used to indicate that the I/O external device has completed data processing.
PCT/CN2016/076492 2015-07-08 2016-03-16 External device expansion card and data processing method for input/output external device WO2017005009A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510400020.2A CN106325377B (en) 2015-07-08 2015-07-08 The data processing method of Principle of External Device Extension card and I/O peripheral equipment
CN201510400020.2 2015-07-08

Publications (1)

Publication Number Publication Date
WO2017005009A1 true WO2017005009A1 (en) 2017-01-12

Family

ID=57684874

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076492 WO2017005009A1 (en) 2015-07-08 2016-03-16 External device expansion card and data processing method for input/output external device

Country Status (2)

Country Link
CN (1) CN106325377B (en)
WO (1) WO2017005009A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107179998A (en) * 2017-06-22 2017-09-19 湖南国科微电子股份有限公司 A kind of method and device for configuring peripheral hardware core buffer
WO2023000784A1 (en) * 2021-07-23 2023-01-26 华为技术有限公司 Data access method and related device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4654818A (en) * 1983-12-16 1987-03-31 Texas Instruments Incorporated Data processing device having memory selectively interfacing with computer
US20020103951A1 (en) * 2001-01-26 2002-08-01 Huber Gary Douglas Removable personal digital assistant in a dual personal computer/personal digital assistant computer architecture
CN1595384A (en) * 1993-10-28 2005-03-16 英普罗Ⅱ特许有限公司 Micro personal digital assistant system
CN101489078A (en) * 2009-01-14 2009-07-22 深圳市同洲电子股份有限公司 Digital television terminal, memory expanding method and system based on middleware
CN101583201A (en) * 2008-05-15 2009-11-18 李明 Expanding device for smart mobile phone
CN202110466U (en) * 2011-05-18 2012-01-11 福州瑞芯微电子有限公司 Memory-extensible hand-held equipment circuit structure
CN103543798A (en) * 2013-11-13 2014-01-29 鄢伟 Combined type computer allowing expanded use

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2394152B (en) * 2002-10-09 2005-11-02 Nokia Corp DMA Detection
CN1181422C (en) * 2002-12-24 2004-12-22 联想(北京)有限公司 Computer system with separated peripheral equipment and input-output method thereof
CN102739790A (en) * 2012-06-29 2012-10-17 张建忠 Remote equipment extension system and local equipment remote operating method
US9912612B2 (en) * 2013-10-28 2018-03-06 Brocade Communications Systems LLC Extended ethernet fabric switches

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4654818A (en) * 1983-12-16 1987-03-31 Texas Instruments Incorporated Data processing device having memory selectively interfacing with computer
CN1595384A (en) * 1993-10-28 2005-03-16 英普罗Ⅱ特许有限公司 Micro personal digital assistant system
US20020103951A1 (en) * 2001-01-26 2002-08-01 Huber Gary Douglas Removable personal digital assistant in a dual personal computer/personal digital assistant computer architecture
CN101583201A (en) * 2008-05-15 2009-11-18 李明 Expanding device for smart mobile phone
CN101489078A (en) * 2009-01-14 2009-07-22 深圳市同洲电子股份有限公司 Digital television terminal, memory expanding method and system based on middleware
CN202110466U (en) * 2011-05-18 2012-01-11 福州瑞芯微电子有限公司 Memory-extensible hand-held equipment circuit structure
CN103543798A (en) * 2013-11-13 2014-01-29 鄢伟 Combined type computer allowing expanded use

Also Published As

Publication number Publication date
CN106325377A (en) 2017-01-11
CN106325377B (en) 2019-06-28

Similar Documents

Publication Publication Date Title
US10515030B2 (en) Method and device for improved advanced microcontroller bus architecture (AMBA) and advanced extensible interface (AXI) operations
US10394723B2 (en) Data accessing method and PCIe storage device
US10248610B2 (en) Enforcing transaction order in peer-to-peer interactions
WO2017084400A1 (en) Nvme networked storage implementation method, terminal, server, and system
WO2015061971A1 (en) Data processing system and data processing method
US7469309B1 (en) Peer-to-peer data transfer method and apparatus with request limits
EP3077914B1 (en) System and method for managing and supporting virtual host bus adaptor (vhba) over infiniband (ib) and for supporting efficient buffer usage with a single external memory interface
JP6523707B2 (en) Memory subsystem that performs continuous reading from lap reading
US9727521B2 (en) Efficient CPU mailbox read access to GPU memory
WO2017005009A1 (en) External device expansion card and data processing method for input/output external device
CN107250995B (en) Memory management device
US11556279B2 (en) System device, and method for memory interface including reconfigurable channel
US9116836B2 (en) Tunneling transaction packets
JP4902640B2 (en) Integrated circuit and integrated circuit system
US8898353B1 (en) System and method for supporting virtual host bus adaptor (VHBA) over infiniband (IB) using a single external memory interface
US10684965B2 (en) Method to reduce write responses to improve bandwidth and efficiency
WO2021082877A1 (en) Method and apparatus for accessing solid state disk
US7302508B2 (en) Apparatus and method for high speed data transfer
KR100432701B1 (en) Method and apparatus for an improved interface between computer components
WO2024012015A1 (en) Storage system, main control chip, data storage method and data reading method
JP7363344B2 (en) Memory control device and control method
US9104637B2 (en) System and method for managing host bus adaptor (HBA) over infiniband (IB) using a single external memory interface
CN116756078B (en) Notification method and device of pcie data packet and storage medium
US10529396B2 (en) Preinstall of partial store cache lines
US10452579B2 (en) Managing input/output core processing via two different bus protocols using remote direct memory access (RDMA) off-loading processing system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 16820664

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16820664

Country of ref document: EP

Kind code of ref document: A1