WO2012013080A1 - Data transparent transmission method and system - Google Patents

Data transparent transmission method and system Download PDF

Info

Publication number
WO2012013080A1
WO2012013080A1 PCT/CN2011/074495 CN2011074495W WO2012013080A1 WO 2012013080 A1 WO2012013080 A1 WO 2012013080A1 CN 2011074495 W CN2011074495 W CN 2011074495W WO 2012013080 A1 WO2012013080 A1 WO 2012013080A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
external interface
storage
processor
receiving
Prior art date
Application number
PCT/CN2011/074495
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 WO2012013080A1 publication Critical patent/WO2012013080A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/20Handling requests for interconnection or transfer for access to input/output bus
    • G06F13/28Handling requests for interconnection or transfer for access to input/output bus using burst mode transfer, e.g. direct memory access DMA, cycle steal

Definitions

  • the present invention relates to the field of embedded system technologies, and in particular, to a method for transparent transmission of data in an embedded system.
  • the existing embedded device data transmission method is through Ethernet, Peripheral Component Interconnect (PCI) bus, Serial Peripheral Interface (SPI), and local bus ( Local Bus ) and other methods to transfer different types of data. If you transfer different data types, you need a different data transfer interface. If there is not enough interface resources in the embedded system to transfer data of the corresponding interface type, the data cannot be transferred to the embedded device.
  • PCI Peripheral Component Interconnect
  • SPI Serial Peripheral Interface
  • Local Bus Local Bus
  • the present invention provides a method and system for transparent transmission of data, the interface of the processor and various other interfaces (for example, Ethernet interface, SPI, serial Gigabit Media Independent Interface (SGMII) ), and an Inter-Integrated Circuit (I2C) interface, etc. to provide a transparent transmission of data, in the process of data transmission, does not require the participation of the processor, effectively solves the interface resources in the embedded system Insufficient problems.
  • various other interfaces for example, Ethernet interface, SPI, serial Gigabit Media Independent Interface (SGMII) ), and an Inter-Integrated Circuit (I2C) interface, etc.
  • the present invention provides a system for transparent transmission of data, the system comprising a processor, a memory and a logic module, wherein: the memory comprises a receiving storage unit and a transmitting storage unit;
  • the logic module is connected to an external interface, the logic module is configured to: receive data sent by the external interface, and store data sent by the external interface into the receiving storage unit; and query the sending data storage a unit, when querying that the data in the sending storage unit needs to be sent, acquiring data that needs to be sent and transmitting the data that needs to be sent to the external interface;
  • the processor is configured to: need to send to the The data of the external interface is stored in the sending storage unit; and the receiving storage unit is queried, and if there is data in the receiving storage unit that needs to be received, the data to be received is acquired.
  • the receiving storage unit includes a receiving storage subunit corresponding to each external interface
  • the sending storage unit includes a transmitting storage subunit corresponding to each external interface
  • the external interface The number of the data is one or more
  • the logic module is configured to store data sent by the external interface to the receiving storage unit in the following manner: storing data received from each external interface in each external interface Receiving the storage subunit; the logic module is configured to query the sending storage unit according to the following manner, and when the data is sent to the sending storage unit, the data to be sent is acquired, and the data needs to be sent.
  • the data is sent to the external interface: respectively, the sending storage sub-unit corresponding to each external interface is queried, and when the data to be sent is sent in the sending storage sub-unit corresponding to an external interface, the data to be sent is acquired Sending the data to be sent to the external interface;
  • the processor is set to press The following manner: storing data that needs to be sent to the external interface to the sending storage unit: storing data that needs to be sent to each external interface to a sending storage subunit corresponding to each external interface; the processor is The method is as follows: querying the receiving storage unit, if there is data in the receiving storage unit that needs to be received, acquiring the data that needs to be received: separately querying the receiving storage subunit corresponding to each external interface, and querying If data in the receiving storage subunit corresponding to an external interface needs to be received, the data to be received is acquired.
  • the system of the present invention
  • the receiving storage subunit includes a receiving data storage subunit and a receiving address storage subunit;
  • the transmitting storage subunit includes a transmitting data storage subunit and a sending address storage subunit;
  • the logic module is configured to: store data received from each external interface in a receiving storage subunit corresponding to each external interface: store data of each external interface in a corresponding receiving of each external interface
  • the data storage subunit, and the storage location information and the data length information of the data of each external interface are respectively stored in the receiving address storage subunit corresponding to each external interface;
  • the logic module is set as follows:
  • the sending storage sub-unit corresponding to the external interface acquires the data to be sent and sends the data to be sent to the external interface when it is queried that the data needs to be sent in the sending storage sub-unit corresponding to the external interface: Querying the sending address storage sub-unit corresponding to each external interface separately, and if the storage location information and the data length information included in the sending address storage sub-unit corresponding to an external interface are queried,
  • the receiving address storage subunit is emptied; the processor is configured to store data to be sent to each external interface to the sending storage subunit corresponding to each external interface as follows: data to be sent to each external interface Stored separately to the corresponding external interfaces Data storage sub-unit, and needs to be sent to the storage location information and data length information of the data written to each of the external interfaces are sent to the address storage subunit corresponding to each of the external interfaces.
  • data to be sent to each external interface Stored separately to the corresponding external interfaces
  • Data storage sub-unit and needs to be sent to the storage location information and data length information of the data written to each of the external interfaces are sent to the address storage subunit corresponding to each of the external interfaces.
  • the processor includes at least a high speed peripheral component interconnect (PCIE) interface, and the processor is connected to the logic module via the PCIE interface;
  • the logic module is configured to store data of each external interface in a received data storage subunit corresponding to each external interface, and store storage location information and data length information of data of each external interface respectively.
  • a receiving address storage subunit corresponding to each external interface transmitting a direct memory access (DMA) write request and data of each external interface to the processor, and controlling the external unit by the DMA write request
  • DMA direct memory access
  • the data of the interface is respectively written into the receiving data storage subunit corresponding to each external interface, and the data length information and the storage location information of each external interface are written into the receiving address storage subunit corresponding to each external interface;
  • the logic module is configured to separately query a sending address storage subunit corresponding to each external interface as follows: send a DMA read/write request to the processor, and first control the processor to query the external interface by using a DMA read request Corresponding sending address storage subunit; and the logic module is configured to clear the sending address storage subunit corresponding to the external interface as follows: controlling, by the DMA write request, the processor to clear the receiving address corresponding to the external interface Subunit.
  • the logic module includes an interface processing module, a DMA module, a PCIE transceiver processing module, and a PCIE IP core, and the interface processing module is further connected to the PCIE transceiver processing module via a PCIE address data bus.
  • the interface processing module is configured to: connect to one or more external interfaces, and after receiving data of each external interface, generate and send control to the processor to write data of each external interface into the respective a DMA write request in the receive data storage subunit corresponding to the external interface to the DMA module; generating and transmitting a DMA read request for controlling the processor to query a send address storage subunit corresponding to each external interface to the DMA module; And receiving, from the PCIE address data bus, a response indicating that the storage location information and the data length information in the transmission address storage subunit of an external interface are generated, and transmitting, according to the storage location information, Data length information DMA for reading data from the transmission data storage subunit corresponding to the external interface Requesting; and after receiving data from the PCIE address data bus that needs to be sent to an external interface, transmitting the data to a corresponding external interface, generating and transmitting a sending address that controls the processor to correspond to the external interface A DMA write request that the storage subunit is emptied;
  • the DMA module includes
  • the IP core is configured to: after receiving the DMA read/write request sent by the PCIE transceiver processor, send the DMA read/write request to the processor; and receive the sending address corresponding to each external interface sent by the processor.
  • the response corresponding to the DMA read request of the storage subunit is sent to the PCIE transceiver processor; after receiving the data of an external interface sent by the PCIE transceiver processor, it is sent to the processor; and receiving After the data sent by the processor that needs to be sent to an external interface is sent to the PCIE transceiver processor.
  • the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface, if the receiving address corresponding to the external interface is a storage subunit Empty, the data of the external interface is stored in the receiving data storage subunit corresponding to the external interface;
  • the processor is configured to: when sending data to an external interface, first query a sending address storage subunit corresponding to the external interface, if the sending address corresponding to the external interface is The unit is empty, and the data that needs to be sent to the external interface is stored in the corresponding data storage subunit corresponding to the external interface.
  • the present invention provides a method for transparently transmitting data by using the above system, the method comprising: connecting a logic module to an external interface, receiving data sent by the external interface, and transmitting the data from the external interface.
  • the data is stored in the receiving storage unit; the processor queries the receiving storage unit, and if there is data in the receiving storage unit that needs to be received, the data that needs to be received is acquired; and the processor needs to send to the storage unit
  • the data of the external interface is stored in the sending storage unit; the logic module queries the sending storage unit, and when the data is sent to the sending storage unit, the data to be sent is acquired, and the data needs to be sent. Data is sent to the external interface.
  • the receiving storage unit includes a receiving storage subunit corresponding to each external interface
  • the sending storage unit includes a sending storage subunit corresponding to each external interface
  • the external interface The number of the data is one or more
  • the step of storing, by the logic module, the data sent by the external interface into the receiving storage unit comprises: storing the data received from each external interface in the receiving storage subunit corresponding to each external interface
  • the logic module queries the sending storage unit, when querying that the data in the sending storage unit needs to be sent, the step of acquiring data to be sent and transmitting the data to be sent to the external interface includes: Querying the sending storage sub-units corresponding to the external interfaces respectively, and when the data is sent to the sending storage sub-unit corresponding to the external interface, the data to be sent is sent and the data to be sent is sent to The external interface; the processor will need to send data to the external interface
  • the step of storing in the sending storage unit includes: storing data that needs to be sent to each external interface to a sending storage subunit corresponding
  • the receiving storage subunit includes a receiving data storage subunit and a receiving address storage subunit;
  • the transmitting storage subunit includes a transmitting data storage subunit and a sending address storage subunit;
  • the logic module will The step of storing the data received by each external interface in the receiving storage subunit corresponding to each external interface includes: storing data of each external interface in a receiving data storage subunit corresponding to each external interface And storing the storage location information and the data length information of the data of each external interface in a receiving address storage subunit corresponding to each external interface; the logic module respectively querying the sending storage subunit corresponding to each external interface,
  • the step of acquiring the data to be sent and sending the data to be sent to the external interface includes: separately querying the external The sending address storage sub-unit corresponding to the interface, if the query is for a certain The storage address storage sub-unit corresponding to an external interface includes storage location information and data length information, and then acquires
  • the processor separately querying the receiving storage subunit corresponding to each external interface, and querying the receiving storage subunit corresponding to an external interface If the data needs to be received, the step of obtaining the data to be received includes: separately querying the receiving address storage sub-unit corresponding to each external interface, and if the query is to receive the corresponding address, the receiving sub-unit includes the storage The location information and the data length information are read from the received data storage subunit corresponding to the external interface according to the storage location information and the data length information, and the receiving address storage subunit corresponding to the external interface is emptied; The processor will need to be sent to each The step of storing the data of the part interface in the sending storage subunit corresponding to each external interface includes: storing data that needs to be sent to each external interface to the sending data storage subunit corresponding to each external interface, and The storage location information and the data length information of the data sent to the external interfaces are respectively written in corresponding to the external interfaces
  • the send address is stored in the subunit.
  • the processor in the system includes at least a high speed peripheral component interconnect (PCIE) interface, and the processor is connected to the logic module via the PCIE interface, wherein: the logic module
  • PCIE peripheral component interconnect
  • the logic module The data of each external interface is stored in the received data storage subunit corresponding to each external interface, and the storage location information and the data length information of the data of the external interfaces are respectively stored in the corresponding external interfaces.
  • the receiving address storage subunit includes: transmitting a direct memory access (DMA) write request and data of the external interfaces to the processor, and controlling, by the DMA write request, the data of each external interface by the processor Writing to the received data storage subunit corresponding to each external interface, and writing data length information and storage location information of each external interface into the receiving address storage subunit corresponding to each external interface;
  • the sending address storage subunit corresponding to each external interface includes: sending a DMA read/write request to the processor The DMA read request is used to control the processor to query the sending address storage subunit corresponding to each external interface; the logic module clearing the sending address storage subunit corresponding to the external interface includes: controlling by DMA write request The processor clears the receiving address storage subunit corresponding to the external interface.
  • DMA direct memory access
  • the logic module includes an interface processing module, a DMA module, a PCIE transceiver processor, and a PCIE IP core, which are sequentially connected, and the interface processing module is further connected to the PCIE transceiver processor via a PCIE address data bus.
  • the DMA module includes a DMA request queue unit and a DMA command generating unit, and the method further includes: the interface processing module receiving data sent by one or more external interfaces, and after receiving data of an external interface, generating Transmitting, by the processor, the data of each external interface is respectively written into a DMA write request in the receive data storage subunit corresponding to each external interface to the DMA request queue unit; the DMA request queue unit receives the DMA After the write request is added to the DMA request queue, the DMA write request is sent to the DMA command generating unit when the DMA write request is dequeued, and the DMA command generating unit generates a corresponding DMA write command and sends the DMA command to the a PCIE transceiver processor; after receiving the DMA write command that controls the processor to write the data of each external interface to the received data storage subunit corresponding to each external interface,
  • the PCIE address data bus acquires data of the external interface received by the interface processing module, and sends the acquired data and the DMA write
  • the processor executes the DMA write command, writes the data of the external interface into the receiving data storage subunit corresponding to the external interface, and writes the storage location information and the data length information of the data of the external interface to the external
  • the interface corresponding to the receiving address storage subunit; the interface processing module generates and sends a DMA read request for controlling the processor to query the sending address storage subunit corresponding to each external interface to the DMA request queue unit; the DMA request After receiving the DMA read request, the queue unit adds it to the DMA request queue, and sends the DMA read request to the DMA command when it is dequeued.
  • a generating unit after the DMA command generating processor receives the DMA read command for querying the sending address storage subunit corresponding to each external interface, the DMA read command passes the PCIE IP core and the The PCIE interface of the processor is sent to the processor; the processor executes the DMA read command, and queries a sending address storage subunit corresponding to each external interface in the memory, and sends and receives the PCIE IP core and the PCIE.
  • the processor and the PCIE address data bus return a response corresponding to the DMA read request to the interface processing module;
  • the interface processing module receives storage location information in a sending address storage subunit corresponding to an external interface And responding to the data length information, generating and transmitting a DMA read request for controlling the processor to acquire data from the transmit data storage subunit corresponding to the external interface according to the storage location information and the data length information to the DMA request queue unit
  • the DMA request queue unit receives the DMA read request and adds it to the DMA request queue, when the DMA read request is dequeued Which is sent to the DMA command generation unit, by the DMA
  • the PCIE transceiver processor controls the DMA read command of the data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and passes the DMA read command to the PCIE IP core and the Sending, to the processor, a PCIE interface of the processor, the processor executing the DMA read command, and reading data from the sending data storage subunit corresponding to the external interface according to the storage location information and the data length information, and The data read is described
  • the PCIE interface of the processor, the PCIE IP core, the PCIE transceiver processor, and the PCIE address data bus are sent to the interface processing module; after receiving the data that needs to be sent to an external interface, the interface processing module Send it to the corresponding external interface.
  • the logic module stores the data of each external interface in a receiving data storage subunit corresponding to each external interface, where the logic module receives an external interface.
  • the receiving address storage sub-unit corresponding to the external interface is first queried, and if the receiving address storage sub-unit corresponding to the external interface is empty, the data of the external interface is stored to the receiving data storage sub-unit corresponding to the external interface.
  • the processor stores the data that needs to be sent to each external interface to a corresponding one of the sending data storage subunits of the external interfaces, where the processor needs to send data to an external interface.
  • the invention provides a data transparent transmission method and system, and provides a transparent data transmission function between an interface of a processor and various other interfaces (for example, an Ethernet interface, an SPI, an SGMIL, an I2C interface, etc.).
  • an interface of a processor for example, an Ethernet interface, an SPI, an SGMIL, an I2C interface, etc.
  • various other interfaces for example, an Ethernet interface, an SPI, an SGMIL, an I2C interface, etc.
  • FIG. 1 is a block diagram of a system for transparent data transmission of a PCIE interface according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a field for indicating storage location information in a transmit data storage subunit according to an embodiment of the present invention
  • FIG. 4 is a block diagram showing the composition of a logic module according to an embodiment of the present invention
  • FIG. 5 is a flowchart of a method for transparent data transmission of a PCIE interface according to an embodiment of the present invention.
  • the present invention provides a method and system for transparent transmission of PCIE data for providing a transparent transmission of data between an interface of a processor and various other interfaces.
  • the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments of the present application may be arbitrarily combined with each other. Referring to FIG. 1, a system for transparent data transmission of a PCIE interface according to an embodiment of the present invention is shown.
  • the system includes a processor, a memory, and a logic module, where: the memory includes a receiving storage unit (Rx_Mem) and a transmitting storage unit ( Tx_ Mem ).
  • the logic module is connected to an external interface, and the logic module is configured to: receive data sent by the external interface, and store data sent by the external interface into the receiving storage unit; and query the sending storage unit, in query When there is data in the sending storage unit that needs to be sent, the data that needs to be sent is acquired and sent to the external interface.
  • the processor is configured to: store data that needs to be sent to the external interface into the sending storage unit; and query the receiving storage unit, and obtain the data after querying that the receiving storage unit has data to be received The data that needs to be received.
  • the number of the external interfaces is one or more, that is, the external interfaces may include interface 0, interface 1, and interface N.
  • the memory includes one or more external interfaces (interface 0, interface 1 interface)
  • Each external interface in N corresponds to the receive storage subunit (Rx0_ Mem, Rxl_
  • the logic module is configured to store data sent by the external interface to the In the receiving storage unit: the received data of the interface 0 and the interface 1 interface N are respectively stored in the receiving storage subunit RxO-Mem corresponding to the interface 0 and the interface 1 interface N.
  • Rxl_Mem RxN - Mem for processing by the processor; and the logic module is configured to query the sending storage unit according to the following manner, and when the data is sent to the sending storage unit to be sent, the need is obtained Send the data and send it to the external interface: Query the sending storage subunit corresponding to each external interface (interface 0, interface 1 interface N) ( Tx0_
  • the processor mainly completes RxO-Mem, Rxl-Mem RxN in the memory
  • Mem includes receive data storage sub-units (RxO—Data—Mem, Rxl—Data—Mem, and RxN_Data_Mem) and receive address storage sub-units (RxO_Info_Mem,
  • Transmit storage subunits corresponding to each external interface include transmit data storage subunits (TxO—Data—Mem, Txl— Data—Mem and TxN—Data—Mem and send address storage subunits (TxO—Info—Mem, Txl—Info—Mem, and TxN—Info—Mem); the logic module is set to be external from the following
  • the data received by the interface is respectively stored in the receiving storage subunit corresponding to each external interface: the data of each external interface is separately stored in the receiving data storage subunit corresponding to each external interface, and the external interfaces are The storage location information and the data length information of the data are respectively stored in the receiving addresses corresponding to the external interfaces.
  • the logic module is configured to respectively query the sending storage subunits corresponding to the external interfaces as follows: respectively query the sending address storage subunits corresponding to the external interfaces, if the query corresponds to an external interface
  • the storage address storage sub-unit includes storage location information and data length information, and then acquires data from the transmission data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and then sends the acquired data to the The external interface, and the sending address storage subunit corresponding to the external interface are also emptied;
  • the processor is configured to separately query the receiving storage subunits corresponding to the external interfaces as follows: respectively query the receiving corresponding to the external interfaces An address storage subunit, if the storage location information and the data length information are included in the receiving address storage subunit corresponding to a certain external interface, the receiving data storage device corresponding to the external interface according to the storage location information and the data length information Read data in the unit, and The receiving address storage subunit corresponding to the external interface is cleared; the processor is configured to store
  • the send address is stored in the subunit.
  • the information carried by the sending address storage subunit corresponding to each external interface in the memory may be as shown in FIG. 2, where the Tx Length field indicates TxO_Data_Mem, Txl_Data_Mem TxN_Data in the memory. – the length of the data stored in the Mem unit; Tx Start
  • Address Ptr indicates the starting storage address of the data in the TxO—Data—Mem, Txl—Data—Mem TxN—Data—Mem unit.
  • the information carried by the receiving address storage subunit corresponding to each external interface in the memory may be as shown in FIG. 3, where the Rx Length field indicates RxO_Data_Mem in the memory.
  • Rxl Data— Mem
  • RxN Data—the length of data stored in the Mem unit
  • Address Ptr represents the starting storage address of the data in the RxO—Data—Mem, Rxl—Data—Mem, and RxN—Data—Mem units.
  • the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface, and if it is empty, the external interface is The data is stored in the receiving data storage subunit corresponding to the external interface; the processor is configured to: when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, if it is Empty, the data that needs to be sent to the external interface is stored in the corresponding data storage subunit corresponding to the external interface.
  • PCIE Peripheral Component Interconnect Express
  • PCIE Peripheral Component Interconnect Express
  • the processor is connected to the logic module via a PCIE interface.
  • the logic module is configured to store the data of each external interface in a receiving data storage subunit corresponding to each external interface as follows: Send a direct memory access (DMA) to the processor.
  • DMA direct memory access
  • the logic module is configured to separately query the sending address storage subunit corresponding to each external interface as follows: sending a DMA read to the processor Write request, firstly, the DMA read request is used to control the processor to query the sending address storage subunit corresponding to each external interface, and the storage location information and the data length information are included in the sending address storage subunit corresponding to a certain external interface.
  • the logic module includes an interface processing module, a direct memory access (DMA) module, a PCIE transceiver processor, and a PCIE IP core (Intellectual Property core), which are sequentially connected, and the interface processing module is also The number of PCIE addresses of the PCIE transceiver processor According to the bus connection, wherein: the interface processing module has functions such as interface 0 transceiver processing, interface 1 transceiver processing, data transmission and reception processing of interface N, generation of DMA request, and processing of PCIE address data bus; DMA module includes DMA The request queue and the DMA command generation module respectively perform the DMA read/write request sorting and the DMA command generation function of the interface 0 to the interface N; the PCI Express transceiver processing module mainly completes the processing of the
  • the PCIE transceiver processor further has a splitting and merging function of the data packet to meet the requirements of the PCIE IP core.
  • the interface processing module is configured to: connect with one or more external interfaces, and after receiving data of each external interface, Generating and transmitting a DMA write request for controlling, by the processor, the data of each external interface to the received data storage sub-unit corresponding to each external interface to the DMA module; generating and transmitting the processor to query each a DMA read request of the transmit address storage sub-unit corresponding to the external interface to the DMA module; storage location information and data length in the transmit address storage sub-unit received from the PCIE address data bus to indicate an external interface And responsive to the information, generating and transmitting a DMA read request that controls the processor to read data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information; and at the slave PCIE address After the data bus receives the data
  • the response corresponding to the DMA read request of the subunit is sent to the PCIE transceiver processor; after receiving the data of an external interface sent by the PCIE transceiver processor, it is sent to the processor; and after receiving After the data sent by the processor needs to be sent to an external interface, it is sent to the PCIE transceiver processor.
  • the processor Based on the above functions of the logic module, the processor only needs to execute the received DMA read/write command.
  • the processor does not need to participate in transparent transmission control by using RxO-Info-Mem, RxO-Data-Mem, TxO-Info-Mem, TxO-Data-Mem in the memory,
  • the processing can read the data sent from the external interface from the memory, and store the data to be sent on the memory for the logic module of the present invention to send to the corresponding interface.
  • the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface, and if it is empty, the external interface is The data is stored in the receiving data storage subunit corresponding to the external interface; the processor is configured to: when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, if it is Empty, will need to be sent to the external connection The data of the port is stored in the sending data storage subunit corresponding to the external interface.
  • the system for transparent transmission of data in the embodiment of the present invention may further include a switch (not shown), wherein: the switch is mainly a bridge function, and completes interface data of the processor and forwarding of interface data of the logic module.
  • the switch is mainly a bridge function, and completes interface data of the processor and forwarding of interface data of the logic module.
  • Step S501 The logic module is connected to an external interface, and receives data sent by the external interface, and The storage is stored in the receiving storage unit;
  • Step S502 The processor queries the receiving storage unit, and if the data is received in the receiving storage unit, the data to be received is acquired;
  • Step S503 The processor stores data that needs to be sent to the external interface to the sending storage unit;
  • Step S504 The logic module queries the sending storage unit, and when there is data in the sending storage unit that needs to be sent, Acquiring the data that needs to be sent and sending it to the external interface.
  • the number of the external interfaces is one or more, that is, the external interfaces may include interface 0, interface 1, and interface N.
  • the memory includes a receiving storage subunit (RxO-Mem, Rxl-Mem RxN-Mem) corresponding to each of one or more external interfaces (interface 0, interface 1 interface N) and one or more Each of the external interfaces (interface 0, interface 1 interface N) - the corresponding transmit storage subunit
  • the logic module stores the data sent by the receiving interface 0 and the interface 1 interface N when the data sent by the external interface is stored in the receiving storage unit, and is respectively stored in the interface 0 and the interface 1 interface N.
  • Mem RxN Mem for processing by the processor; and querying the sending storage subunits corresponding to each external interface (interface 0, interface 1 interface N) (TxO—Mem, Txl—Mem
  • TxN_Mem when it is found that there is data in the sending storage sub-unit corresponding to an external interface, the data is acquired and sent through the corresponding external interface.
  • the processor the processor mainly completes RxO-Mem, Rxl in the memory-
  • Mem RxN—Mem, TxO—Mem, Txl—Mem TxN—Mem data processing when data to be sent to the external interface is stored in the transmission storage unit, data that needs to be sent to each external interface is separately stored in a transmission storage subunit corresponding to each external interface; When the storage unit is received, the receiving storage sub-unit corresponding to each external interface is separately queried, and when data is received in the receiving storage sub-unit corresponding to an external interface, the data is acquired.
  • Mem includes receiving data storage subunits ( Rx0_Data_Mem ,
  • the transmit storage subunits corresponding to each external interface include the transmit data storage subunit (TxO_Data_Mem, Txl) Data Mem TxN Data Mem ) and a transmission address storage subunit (TxO—Info—Mem, Txl—Info—Mem TxN—Info—Mem); the logic module stores data received from each external interface in the When receiving the storage subunits corresponding to the external interfaces, the data of the external interfaces are respectively stored in the received data storage subunits corresponding to the external interfaces, and the storage location information of the data of the external interfaces is further The data length information is respectively stored in the receiving address storage subunit corresponding to each external interface;
  • the logic module is configured to separately query the sending storage subunits corresponding to the external interfaces. Querying the sending address storage sub-unit corresponding to each external interface, if the storage location information and the data length information included in the sending address storage sub-unit corresponding to an external interface are queried, according to the storage location information and the data length information Obtaining data from the sending data storage subunit corresponding to the external interface, and then sending the acquired data to the external interface, and also clearing the sending address storage subunit corresponding to the external interface; the processor separately querying the When receiving the storage sub-unit corresponding to each external interface, the receiving address storage sub-unit corresponding to each external interface is separately queried, and if the storage address sub-unit corresponding to the external interface is included, the storage location information and the data length information are included.
  • the processor And reading data from the received data storage subunit corresponding to the external interface according to the storage location information and the data length information, and also clearing the receiving address storage subunit corresponding to the external interface; the processor, where Data sent to each external interface is stored separately When stored in the transmission storage subunit corresponding to each external interface, the data to be sent to each external interface is separately stored in the transmission data storage subunit corresponding to each external interface, and also needs to be sent to the external
  • the storage location information and the data length information of the data of the interface are respectively written in the transmission address storage subunits corresponding to the respective external interfaces.
  • the information carried by the sending address storage subunit corresponding to each external interface may be as shown in FIG. 2, where the Tx Length field indicates TxO_Data_Mem in the memory,
  • Txl Data— Mem
  • TxN Data—the length of data stored in the Mem unit
  • Address Ptr indicates the starting storage address of the data in the TxO—Data—Mem, Txl—Data—Mem TxN—Data—Mem unit.
  • the information carried by the receiving address storage subunit corresponding to each external interface may be as shown in FIG. 3, where the Rx Length field indicates RxO_Data_Mem in the memory,
  • Rxl Data— Mem
  • RxN Data—the length of data stored in the Mem unit
  • Address Ptr represents the starting storage address of the data in the RxO—Data—Mem, Rxl—Data—Mem, and RxN—Data—Mem units.
  • the method further includes: after receiving the data of an external interface, querying the receiving address storage subunit corresponding to the external interface, and if the space is empty, storing the data of the external interface to the external The receiving data storage subunit corresponding to the interface; the processor, when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, and if it is empty, it needs to be sent to the The data of the external interface is stored in the transmission data storage subunit corresponding to the external interface.
  • the following is a description of the transparent transmission method of the present invention by using a processor having a PCIE interface.
  • the processor has at least one PCIE interface, and the processor is connected to the logic module via the PCIE interface.
  • the method includes: The logic module sends the DMA write request and the data of each external interface to the processor when the data of each external interface is stored in the received data storage subunit corresponding to each external interface, by using DMA Writing a request to the processor to write data of each external interface into the receiving data storage subunit corresponding to each external interface, and writing data length and storage location information of each external interface to the external interfaces Corresponding receiving address storage sub-unit; the logic module, when separately querying the sending address storage sub-unit corresponding to each external interface, sending a DMA read/write request to the processor, first controlling the DMA read request The processor queries the sending address storage subunit corresponding to each external interface, and queries the sending corresponding to an external interface.
  • the logic module includes an interface processing module, a direct memory access (DMA) module, a PCIE transceiver processor, and a PCIE IP core, and the interface processing module is further connected to the PCIE transceiver processor via a PCIE address data bus.
  • DMA direct memory access
  • the DMA module includes a DMA request queue a unit and a DMA command generating unit, wherein: the interface processing module receives data sent by one or more external interfaces, and after receiving data of an external interface, generates and sends a control to the processor to the external interfaces.
  • the data is respectively written into the DMA write request unit in the receive data storage subunit corresponding to each external interface to the DMA request queue unit; the DMA request queue unit receives the DMA write request and adds it to the DMA request queue, The DMA write request is sent to the DMA command generating unit when it is dequeued, and is generated by the DMA command generating unit to generate a corresponding DMA write command, and then sent to the PCIE transceiver processor; the PCIE transceiver processor receives the same Controlling, by the processor, the data of each external interface is respectively written into the DMA write command in the receiving data storage subunit corresponding to each external interface, and acquiring the received by the interface processing module via the PCIE address data bus Data of the external interface, sending the acquired data and the DMA write command to the PCIE IP core and the PCIE interface of the processor to the The processor executes the DMA write command, writes the data of the external interface into the receiving data storage subunit corresponding to the external interface, and writes the storage location information and the data length
  • the interface processing module Entering a receiving address storage sub-unit corresponding to the external interface; the interface processing module generates and sends a DMA read request for controlling the processor to query a sending address storage sub-unit corresponding to each external interface to the DMA request queue unit; After receiving the DMA read request, the DMA request queue unit adds it to the DMA request queue, and sends the DMA read request to the DMA command generating unit when the DMA read request is dequeued, and the DMA command generating processor receives the DMA command.
  • the DMA read command is sent to the processor via the PCIE IP core and the PCIE interface of the processor;
  • the processor executes the DMA read command, and queries a sending address storage subunit corresponding to each external interface in the memory, and the PCIE IP core and the PCIE Transceiver processor and said PCIE address data bus returning a response corresponding to said DMA read request to said interface processing module;
  • said interface processing module receiving a storage location in said send address storage subunit corresponding to an external interface
  • generating and transmitting a DMA read request for controlling the processor to acquire data from the transmit data storage subunit corresponding to the external interface according to the storage location information and the data length information to the DMA request queue unit;
  • the DMA request queue unit adds the DMA read request to the DMA request queue, and sends the DMA read request to the DMA command generating unit when the DMA read request is dequeued, by the DMA
  • the PCIE transceiver processor controls the DMA read command of the data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and passes the DMA read command to the PCIE IP core and the Sending, to the processor, a PCIE interface of the processor, the processor executing the DMA read command, and reading data from the sending data storage subunit corresponding to the external interface according to the storage location information and the data length information, and
  • the read data is sent to the interface processing module via the PCIE interface of the processor, the PCIE IP core, the PCIE transceiver processor, and the PCIE address data bus; the interface processing module needs to send to the receiving After the data of an external interface is sent to the corresponding external interface.
  • the method further includes: after receiving the data of an external interface, querying the receiving address storage sub-unit corresponding to the external interface, and if the space is empty, storing the data of the external interface to the external The receiving data storage subunit corresponding to the interface; the processor, when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, and if it is empty, it needs to be sent to the The data of the external interface is stored in the transmission data storage subunit corresponding to the external interface.
  • the above method further includes: connecting the processor to one or more of the logic modules in a switch module to implement interface expansion.
  • the switch is mainly a bridging function, and completes the interface data of the processor and the forwarding function of the interface data of the logic module, which can connect the processor with one or more of the logic modules to implement interface expansion.
  • the logic module is mainly responsible for transparent transmission processing, and the processor only needs to execute the received DMA read/write command, and does not need to participate in transparent transmission control, that is, the processor passes the RxO in the memory - Info - Mem, RxO - Data - Mem, TxO - Info - Mem, TxO - Data - Mem, Rxl - Info - Mem, Rxl - Data - Mem,
  • TxN—Data—Mem data can be read from the memory to the external interface
  • the data sent by the port stores the data to be sent on the memory for the logic module of the present invention to send to the corresponding interface.
  • each module unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module.
  • the invention is not limited to any specific form of combination of hardware and software. The invention may, of course, be embodied in various other forms and modifications without departing from the spirit and scope of the invention.
  • the present invention provides a data transparent transmission method and system, which provides a transparent data transmission function between an interface of a processor and various other interfaces, and does not require the participation of a processor in the process of data transmission. , effectively solve the problem of insufficient interface resources in the embedded system.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Systems (AREA)
  • Computer And Data Communications (AREA)

Abstract

A data transparent transmission system and method is disclosed. The system includes a processor, a storage and a logic module. The method comprises the following steps: the logic module is connected with an external interface to receive data transmitted from the external interface, and stores the data transmitted from the external interface in a reception storage unit; the processor inquires the reception storage unit, and acquires the data to be received when inquiring that the data to be received exists in the reception storage unit; and the processor stores the data to be transmitted to the external interface in the transmission storage unit; the logic module inquires the transmission storage unit, and acquires the data to be transmitted and transmits the data to be transmitted to the external interface when inquiring that the data to be transmitted exists in the transmission storage unit. The technical scheme effectively solves the problem of insufficient interface resources in an embedded system.

Description

一种数据透明传输的方法及系统  Method and system for transparent transmission of data
技术领域 本发明涉及嵌入式系统技术领域, 尤其涉及嵌入式系统中一种数据透明 传输的方法。 TECHNICAL FIELD The present invention relates to the field of embedded system technologies, and in particular, to a method for transparent transmission of data in an embedded system.
背景技术 Background technique
随着电信级设备向着高集成化以及微型化方向的发展, 在设备中一块单 板上集成的功能越来越多, 单板上的器件越来越多, 需要的各种类型的接口 数量也越来越多。 现有的嵌入式设备数据传输的方法是通过以太网、 外设部件互连标准 (Peripheral Component Interconnect , 简称 PCI)总线、 串行夕卜设接口 (Serial Peripheral Interface, 简称 SPI)、 以及本地总线( Local Bus )等方式来传输不 同类型的数据。 如果传输不同的数据类型, 需要数据传输接口也不同。 如果 嵌入式系统中没有足够的接口资源来传输对应接口类型的数据时, 会造成数 据无法传输到嵌入式设备。  With the development of carrier-class devices toward high integration and miniaturization, more and more functions are integrated on a single board in a device, and more and more devices are on a single board, and the number of various types of interfaces required is also more and more. The existing embedded device data transmission method is through Ethernet, Peripheral Component Interconnect (PCI) bus, Serial Peripheral Interface (SPI), and local bus ( Local Bus ) and other methods to transfer different types of data. If you transfer different data types, you need a different data transfer interface. If there is not enough interface resources in the embedded system to transfer data of the corresponding interface type, the data cannot be transferred to the embedded device.
发明内容 本发明提供了一种数据透明传输的方法及系统, 在处理器的接口与其它 各种接口(例如, 以太网接口、 SPI、 串行吉比特媒体独立接口 (Serial Gigabit Media Independent Interface , SGMII)、 以及内部集成电路 (Inter-Integrated Circuit, I2C)接口等)之间提供一个数据透明传输的功能, 在数据传输的过 程中,不需要处理器的参与,有效解决了嵌入式系统中接口资源不足的问题。 为了解决上述技术问题, 本发明提出一种数据透明传输的系统, 所述系 统包括处理器、 存储器和逻辑模块, 其中: 所述存储器, 包括接收存储单元和发送存储单元; 所述逻辑模块与外部接口相连, 所述逻辑模块设置为: 接收所述外部接 口发送来的数据, 并将外部接口发送来的数据存储至所述接收存储单元中; 以及查询所述发送数据存储单元, 在查询到所述发送存储单元中有数据需要 发送时,获取需要发送的数据并将所述需要发送的数据发送至所述外部接口; 所述处理器设置为: 将需要发送至所述外部接口的数据存储至所述发送 存储单元中; 以及查询所述接收存储单元, 在查询到所述接收存储单元中有 数据需要接收, 则获取所述需要接收的数据。 本发明的系统中, 所述接收存储单元包括与每一外部接口——对应的接 收存储子单元, 所述发送存储单元包括与每一个外部接口一一对应的发送存 储子单元; 所述外部接口的数量为一个或者多个; 所述逻辑模块是设置为按如下方式将外部接口发送来的数据存储至所述 接收存储单元中: 将从各外部接口接收到的数据分别存储在各外部接口对应 的接收存储子单元中; 所述逻辑模块是设置为按如下方式查询所述发送存储 单元, 在查询到所述发送存储单元中有数据需要发送时, 获取需要发送的数 据并将所述需要发送的数据发送至所述外部接口: 分别查询各外部接口对应 的发送存储子单元, 在查询到某一外部接口对应的发送存储子单元中有数据 需要发送时, 获取所述需要发送的数据并将所述需要发送的数据发送至该外 部接口; 所述处理器是设置为按如下方式: 将需要发送至所述外部接口的数据存 储至所述发送存储单元中: 将需要发送至各外部接口的数据分别存储至各外 部接口对应的发送存储子单元中; 所述处理器是设置为按如下方式查询所述 接收存储单元, 在查询到所述接收存储单元中有数据需要接收, 则获取所述 需要接收的数据: 分别查询各外部接口对应的接收存储子单元, 在查询到某 一外部接口对应的接收存储子单元中有数据需要接收, 则获取所述需要接收 的数据。 本发明的系统中, SUMMARY OF THE INVENTION The present invention provides a method and system for transparent transmission of data, the interface of the processor and various other interfaces (for example, Ethernet interface, SPI, serial Gigabit Media Independent Interface (SGMII) ), and an Inter-Integrated Circuit (I2C) interface, etc. to provide a transparent transmission of data, in the process of data transmission, does not require the participation of the processor, effectively solves the interface resources in the embedded system Insufficient problems. In order to solve the above technical problem, the present invention provides a system for transparent transmission of data, the system comprising a processor, a memory and a logic module, wherein: the memory comprises a receiving storage unit and a transmitting storage unit; The logic module is connected to an external interface, the logic module is configured to: receive data sent by the external interface, and store data sent by the external interface into the receiving storage unit; and query the sending data storage a unit, when querying that the data in the sending storage unit needs to be sent, acquiring data that needs to be sent and transmitting the data that needs to be sent to the external interface; the processor is configured to: need to send to the The data of the external interface is stored in the sending storage unit; and the receiving storage unit is queried, and if there is data in the receiving storage unit that needs to be received, the data to be received is acquired. In the system of the present invention, the receiving storage unit includes a receiving storage subunit corresponding to each external interface, and the sending storage unit includes a transmitting storage subunit corresponding to each external interface; the external interface The number of the data is one or more; the logic module is configured to store data sent by the external interface to the receiving storage unit in the following manner: storing data received from each external interface in each external interface Receiving the storage subunit; the logic module is configured to query the sending storage unit according to the following manner, and when the data is sent to the sending storage unit, the data to be sent is acquired, and the data needs to be sent. The data is sent to the external interface: respectively, the sending storage sub-unit corresponding to each external interface is queried, and when the data to be sent is sent in the sending storage sub-unit corresponding to an external interface, the data to be sent is acquired Sending the data to be sent to the external interface; the processor is set to press The following manner: storing data that needs to be sent to the external interface to the sending storage unit: storing data that needs to be sent to each external interface to a sending storage subunit corresponding to each external interface; the processor is The method is as follows: querying the receiving storage unit, if there is data in the receiving storage unit that needs to be received, acquiring the data that needs to be received: separately querying the receiving storage subunit corresponding to each external interface, and querying If data in the receiving storage subunit corresponding to an external interface needs to be received, the data to be received is acquired. In the system of the present invention,
所述接收存储子单元包括接收数据存储子单元和接收地址存储子单元; 所述发送存储子单元包括发送数据存储子单元和发送地址存储子单元; 所述逻辑模块是设置为按如下方式: 将从各外部接口接收到的数据分别 存储在该各外部接口对应的接收存储子单元中: 将各外部接口的数据分别存 储在各外部接口对应的接收数据存储子单元中, 以及将各外部接口的数据的 存储位置信息和数据长度信息分别存储在各外部接口对应的接收地址存储子 单元中; 所述逻辑模块是设置为按如下方式: 分别查询各外部接口对应的发送存 储子单元, 在查询到某一外部接口对应的发送存储子单元中有数据需要发送 时, 获取所述需要发送的数据并将所述需要发送的数据发送至该外部接口: 分别查询各外部接口对应的发送地址存储子单元, 如果查询到为某一外部接 口对应的发送地址存储子单元中包含存储位置信息和数据长度信息, 则根据 所述存储位置信息和数据长度信息从该外部接口对应的发送数据存储子单元 获取数据, 然后将获取到的数据发送至该外部接口, 以及将该外部接口对应 的发送地址存储子单元清空; 所述处理器是设置为按如下方式分别查询各外部接口对应的接收存储子 单元, 在查询到某一外部接口对应的接收存储子单元中有数据需要接收, 则 获取所述需要接收的数据: 分别查询该各外部接口对应的接收地址存储子单 元, 如果查询到某一外部接口对应的接收地址存储子单元中包括存储位置信 息和数据长度信息, 则根据所述存储位置信息和数据长度信息从该外部接口 对应的接收数据存储子单元中读取数据, 以及将该外部接口对应的接收地址 存储子单元清空; 所述处理器是设置为按如下方式将需要发送至各外部接口的数据分别存 储至各外部接口对应的发送存储子单元中: 将需要发送至各外部接口的数据 分别存储至该各外部接口对应的发送数据存储子单元中, 以及将需要发送至 该各外部接口的数据的存储位置信息和数据长度信息分别写入该各外部接口 对应的发送地址存储子单元中。 本发明的系统中, The receiving storage subunit includes a receiving data storage subunit and a receiving address storage subunit; the transmitting storage subunit includes a transmitting data storage subunit and a sending address storage subunit; The logic module is configured to: store data received from each external interface in a receiving storage subunit corresponding to each external interface: store data of each external interface in a corresponding receiving of each external interface The data storage subunit, and the storage location information and the data length information of the data of each external interface are respectively stored in the receiving address storage subunit corresponding to each external interface; the logic module is set as follows: The sending storage sub-unit corresponding to the external interface acquires the data to be sent and sends the data to be sent to the external interface when it is queried that the data needs to be sent in the sending storage sub-unit corresponding to the external interface: Querying the sending address storage sub-unit corresponding to each external interface separately, and if the storage location information and the data length information included in the sending address storage sub-unit corresponding to an external interface are queried, according to the storage location information and the data length information, Transmit data storage subunit corresponding to the external interface Obtaining data, and then sending the obtained data to the external interface, and clearing the sending address storage subunit corresponding to the external interface; the processor is configured to respectively query the receiving storage subunit corresponding to each external interface as follows If the data is to be received in the receiving storage subunit corresponding to an external interface, the data to be received is obtained: the receiving address storage subunit corresponding to each external interface is separately queried, if an external interface is queried The corresponding receiving address storage subunit includes storage location information and data length information, and then reads data from the received data storage subunit corresponding to the external interface according to the storage location information and the data length information, and corresponding to the external interface. The receiving address storage subunit is emptied; the processor is configured to store data to be sent to each external interface to the sending storage subunit corresponding to each external interface as follows: data to be sent to each external interface Stored separately to the corresponding external interfaces Data storage sub-unit, and needs to be sent to the storage location information and data length information of the data written to each of the external interfaces are sent to the address storage subunit corresponding to each of the external interfaces. In the system of the present invention,
所述处理器至少包括一高速外设组件互连(PCIE )接口, 所述处理器经 所述 PCIE接口与所述逻辑模块相连; 所述逻辑模块是设置为按如下方式将各外部接口的数据分别存储在该各 外部接口对应的接收数据存储子单元中, 以及将各外部接口的数据的存储位 置信息和数据长度信息分别存储在各外部接口对应的接收地址存储子单元 中: 向所述处理器发送直接存储器存取(DMA )写请求和所述各外部接口的 数据, 通过 DMA写请求控制所述处理器将所述各外部接口的数据分别写入 所述各外部接口对应的接收数据存储子单元中, 以及将所述各外部接口的数 据长度信息和存储位置信息写入该各外部接口对应的接收地址存储子单元 中; The processor includes at least a high speed peripheral component interconnect (PCIE) interface, and the processor is connected to the logic module via the PCIE interface; The logic module is configured to store data of each external interface in a received data storage subunit corresponding to each external interface, and store storage location information and data length information of data of each external interface respectively. a receiving address storage subunit corresponding to each external interface: transmitting a direct memory access (DMA) write request and data of each external interface to the processor, and controlling the external unit by the DMA write request The data of the interface is respectively written into the receiving data storage subunit corresponding to each external interface, and the data length information and the storage location information of each external interface are written into the receiving address storage subunit corresponding to each external interface;
所述逻辑模块是设置为按如下方式分别查询各外部接口对应的发送地址 存储子单元: 向所述处理器发送 DMA读写请求, 先通过 DMA读请求控制 所述处理器查询所述各外部接口对应的发送地址存储子单元; 以及所述逻辑 模块是设置为按如下方式将该外部接口对应的发送地址存储子单元清空: 通 过 DMA 写请求控制所述处理器清空该外部接口对应的接收地址存储子单 元。 本发明的系统中, 所述逻辑模块包括依次相连的接口处理模块、 DMA模块、 PCIE收发处 理模块以及 PCIE IP核, 所述接口处理模块还与所述 PCIE收发处理模块经 PCIE地址数据总线相连, 其中: 所述接口处理模块设置为: 与一个或者多个外部接口相连接, 在接收到 各外部接口的数据后, 产生并发送控制所述处理器将该各外部接口的数据分 别写入该各外部接口对应的接收数据存储子单元中的 DMA 写请求至所述 DMA模块; 产生并发送控制所述处理器查询各外部接口对应的发送地址存 储子单元的 DMA读请求至所述 DMA模块;在从所述 PCIE地址数据总线接 收到用以指示某一外部接口的发送地址存储子单元中有存储位置信息和数据 长度信息的应答时, 产生并发送控制所述处理器根据所述存储位置信息和数 据长度信息从该外部接口对应的发送数据存储子单元中读取数据的 DMA读 请求; 以及在从所述 PCIE地址数据总线接收到需要发送至某一外部接口的 数据后, 将该数据发送至对应的外部接口, 产生并发送控制所述处理器将该 外部接口对应的发送地址存储子单元清空的 DMA写请求; 所述 DMA模块包括 DMA请求队列单元和 DMA命令产生单元, 其中: 所述 DMA请求队列单元设置为: 对接收到的 DMA读写请求进行排序; 所 述 DMA命令产生单元设置为:按照所述 DMA请求队列单元中的 DMA读写 请求的排序顺序生成对应的 DMA读写命令, 并将所述 DMA命令发送至所 述 PCIE收发处理器; 所述 PCIE收发处理器设置为:将所述 DMA模块发送来的 DMA读写命 令发送至所述 PCIE IP核; 将所述 PCIE IP核发送来的控制所述处理器查询 各外部接口对应的发送地址存储子单元的 DMA读请求对应的应答经所述 PCIE地址数据总线发送至所述接口处理模块;在接收到控制所述处理器将该 各外部接口的数据分别写入该各外部接口对应的接收数据存储子单元中的 DMA写命令后,经所述 PCIE地址数据总线获取所述接口处理模块接收到的 该外部接口数据并将其发送至所述 PCIE IP核; 以及在接收到所述 PCIE IP 核发送来的需要发送至某一外部接口的数据后, 将其经所述 PCIE地址数据 总线发送至所述接口处理模块; 所述 PCIE IP核集成有物理层, 数据链路层, 事务层的功能, 所述 PCIEThe logic module is configured to separately query a sending address storage subunit corresponding to each external interface as follows: send a DMA read/write request to the processor, and first control the processor to query the external interface by using a DMA read request Corresponding sending address storage subunit; and the logic module is configured to clear the sending address storage subunit corresponding to the external interface as follows: controlling, by the DMA write request, the processor to clear the receiving address corresponding to the external interface Subunit. In the system of the present invention, the logic module includes an interface processing module, a DMA module, a PCIE transceiver processing module, and a PCIE IP core, and the interface processing module is further connected to the PCIE transceiver processing module via a PCIE address data bus. The interface processing module is configured to: connect to one or more external interfaces, and after receiving data of each external interface, generate and send control to the processor to write data of each external interface into the respective a DMA write request in the receive data storage subunit corresponding to the external interface to the DMA module; generating and transmitting a DMA read request for controlling the processor to query a send address storage subunit corresponding to each external interface to the DMA module; And receiving, from the PCIE address data bus, a response indicating that the storage location information and the data length information in the transmission address storage subunit of an external interface are generated, and transmitting, according to the storage location information, Data length information DMA for reading data from the transmission data storage subunit corresponding to the external interface Requesting; and after receiving data from the PCIE address data bus that needs to be sent to an external interface, transmitting the data to a corresponding external interface, generating and transmitting a sending address that controls the processor to correspond to the external interface A DMA write request that the storage subunit is emptied; The DMA module includes a DMA request queue unit and a DMA command generating unit, wherein: the DMA request queue unit is configured to: sort the received DMA read/write requests; the DMA command generating unit is set to: according to the DMA The sorting order of the DMA read/write request in the request queue unit generates a corresponding DMA read/write command, and sends the DMA command to the PCIE transceiver processor; the PCIE transceiver processor is configured to: send the DMA module Sending a DMA read/write command to the PCIE IP core; and transmitting, by the PCIE IP core, a response corresponding to the DMA read request of the sending address address subunit corresponding to each external interface by the processor to the PCIE The address data bus is sent to the interface processing module; after receiving the DMA write command that controls the processor to write the data of each external interface into the received data storage subunit corresponding to each external interface, a PCIE address data bus acquires the external interface data received by the interface processing module and transmits the same to the PCIE IP core; and receives the PCIE IP After the data sent by the core needs to be sent to an external interface, it is sent to the interface processing module via the PCIE address data bus; the PCIE IP core is integrated with a physical layer, a data link layer, and a transaction layer. Function, the PCIE
IP核设置为: 在接收到所述 PCIE收发处理器发送来的 DMA读写请求后, 将其发送至所述处理器; 在接收到所述处理器发送来的查询各外部接口对应 的发送地址存储子单元的 DMA读请求对应的应答发送至所述 PCIE收发处理 器; 在接收到所述 PCIE收发处理器发送来的某一外部接口的数据后, 将发 送至所述处理器; 以及在接收到所述处理器发送来的需要发送至某一外部接 口的数据后, 将其发送至所述 PCIE收发处理器。 本发明的系统中, 所述逻辑模块是设置为: 在接收到某一外部接口的数据后, 先查询该外 部接口对应的接收地址存储子单元, 如果该外部接口对应的接收地址存储子 单元为空, 才将该外部接口的数据存储至该外部接口对应的接收数据存储子 单元中; The IP core is configured to: after receiving the DMA read/write request sent by the PCIE transceiver processor, send the DMA read/write request to the processor; and receive the sending address corresponding to each external interface sent by the processor. The response corresponding to the DMA read request of the storage subunit is sent to the PCIE transceiver processor; after receiving the data of an external interface sent by the PCIE transceiver processor, it is sent to the processor; and receiving After the data sent by the processor that needs to be sent to an external interface is sent to the PCIE transceiver processor. In the system of the present invention, the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface, if the receiving address corresponding to the external interface is a storage subunit Empty, the data of the external interface is stored in the receiving data storage subunit corresponding to the external interface;
所述处理器是设置为: 在需要发送数据至某一外部接口时, 先查询该外 部接口对应的发送地址存储子单元, 如果该外部接口对应的发送地址存储子 单元为空, 才将需要发送至该外部接口的数据存储至该外部接口对应的发送 数据存储子单元中。 为了解决上述技术问题, 本发明提出一种应用上述的系统进行数据透明 传输的方法, 该方法包括: 逻辑模块与外部接口相连, 接收所述外部接口发送来的数据, 并将外部 接口发送来的数据存储至接收存储单元中; 处理器查询所述接收存储单元, 在查询到所述接收存储单元中有数据需要接收,则获取所述需要接收的数据; 以及 所述处理器将需要发送至所述外部接口的数据存储至发送存储单元中; 所述逻辑模块查询所述发送存储单元, 在查询到所述发送存储单元中有数据 需要发送时, 获取需要发送的数据并将所述需要发送的数据发送至所述外部 接口。 本发明的方法中, 所述接收存储单元包括与每一外部接口一一对应的接收存储子单元, 所 述发送存储单元包括与每一个外部接口一一对应的发送存储子单元; 所述外 部接口的数量为一个或者多个; 逻辑模块将外部接口发送来的数据存储至接收存储单元中的步骤包括: 将从各外部接口接收到的数据分别存储在所述各外部接口对应的接收存储子 单元中; 所述逻辑模块查询所述发送存储单元, 在查询到所述发送存储单元 中有数据需要发送时, 获取需要发送的数据并将所述需要发送的数据发送至 所述外部接口的步骤包括: 分别查询各外部接口对应的发送存储子单元, 在 查询到某一外部接口对应的发送存储子单元中有数据需要发送时, 获取所述 需要发送的数据并将所述需要发送的数据发送至该外部接口; 所述处理器将需要发送至所述外部接口的数据存储至所述发送存储单元 中的步骤包括: 将需要发送至各外部接口的数据分别存储至各外部接口对应 的发送存储子单元中; 所述处理器查询所述接收存储单元, 在查询到所述接 收存储单元中有数据需要接收, 则获取所述需要接收的数据的步骤包括: 分 别查询各外部接口对应的接收存储子单元, 在查询到某一外部接口对应的接 收存储子单元中有数据需要接收, 则获取所述需要接收的数据。 本发明的方法中, 所述接收存储子单元包括接收数据存储子单元和接收地址存储子单元; 所述发送存储子单元包括发送数据存储子单元和发送地址存储子单元; 所述逻辑模块将从各外部接口接收到的数据分别存储在所述各外部接口 对应的接收存储子单元中的步骤包括: 将所述各外部接口的数据分别存储在 所述各外部接口对应的接收数据存储子单元中, 以及将所述各外部接口的数 据的存储位置信息和数据长度信息分别存储在该各外部接口对应的接收地址 存储子单元中; 所述逻辑模块分别查询各外部接口对应的发送存储子单元, 在查询到某 一外部接口对应的发送存储子单元中有数据需要发送时, 获取所述需要发送 的数据并将所述需要发送的数据发送至该外部接口的步骤包括: 分别查询所 述各外部接口对应的发送地址存储子单元, 如果查询到为某一外部接口对应 的发送地址存储子单元中包含存储位置信息和数据长度信息, 则根据所述存 储位置信息和数据长度信息从该外部接口对应的发送数据存储子单元获取数 据, 然后将获取到的数据发送至该外部接口, 以及将该外部接口对应的发送 地址存储子单元清空; 所述处理器分别查询各外部接口对应的接收存储子单元, 在查询到某一 外部接口对应的接收存储子单元中有数据需要接收, 则获取所述需要接收的 数据的步骤包括: 分别查询所述各外部接口对应的接收地址存储子单元, 如 果查询到某一外部接口对应的接收地址存储子单元中包括存储位置信息和数 据长度信息, 则根据所述存储位置信息和数据长度信息从该外部接口对应的 接收数据存储子单元中读取数据, 以及将该外部接口对应的接收地址存储子 单元清空; 所述处理器将需要发送至各外部接口的数据分别存储至各外部接口对应 的发送存储子单元中的步骤包括: 将需要发送至各外部接口的数据分别存储 至所述各外部接口对应的发送数据存储子单元中, 以及将需要发送至该各外 部接口的数据的存储位置信息和数据长度信息分别写入该各外部接口对应的 发送地址存储子单元中。 本发明的方法中, 该系统中所述处理器至少包括一高速外设组件互连(PCIE )接口, 所述 处理器经所述 PCIE接口与所述逻辑模块相连, 其中: 所述逻辑模块将所述各外部接口的数据分别存储在所述各外部接口对应 的接收数据存储子单元中, 以及将所述各外部接口的数据的存储位置信息和 数据长度信息分别存储在该各外部接口对应的接收地址存储子单元中的步骤 包括: 向所述处理器发送直接存储器存取(DMA )写请求和该各外部接口的 数据, 通过 DMA写请求控制所述处理器将该各外部接口的数据分别写入该 各外部接口对应的接收数据存储子单元中, 以及将该各外部接口的数据长度 信息和存储位置信息写入该各外部接口对应的接收地址存储子单元中; 所述逻辑模块分别查询该各外部接口对应的发送地址存储子单元的步骤 包括: 向所述处理器发送 DMA读写请求, 先通过 DMA读请求控制所述处 理器查询该各外部接口对应的发送地址存储子单元; 所述逻辑模块将该外部 接口对应的发送地址存储子单元清空的步骤包括: 通过 DMA写请求控制所 述处理器清空该外部接口对应的接收地址存储子单元。 本发明的方法中, 所述逻辑模块包括依次相连的接口处理模块、 DMA模块、 PCIE收发处 理器以及 PCIE IP核, 所述接口处理模块还与所述 PCIE收发处理器经 PCIE 地址数据总线相连,所述 DMA模块包括 DMA请求队列单元和 DMA命令产 生单元, 该方法还包括: 所述接口处理模块接收一个或者多个外部接口发送来的数据, 在接收到 某一外部接口的数据后, 产生并发送控制所述处理器将该各外部接口的数据 分别写入该各外部接口对应的接收数据存储子单元中的 DMA写请求至所述 DMA请求队列单元; 所述 DMA请求队列单元接收到该 DMA写请求后将其 加入 DMA请求队列,在该 DMA写请求出队时将其发送至所述 DMA命令产 生单元, 由所述 DMA命令产生单元产生相应的 DMA写命令后发送至所述 PCIE收发处理器; 所述 PCIE收发处理器在接收到控制所述处理器将该各外 部接口的数据分别写入该各外部接口对应的接收数据存储子单元中的 DMA 写命令后, 经所述 PCIE地址数据总线获取所述接口处理模块接收到的该外 部接口的数据, 将获取到的数据以及所述 DMA写命令经所述 PCIE IP核和 所述处理器的 PCIE接口发送至所述处理器;所述处理器执行该 DMA写命令, 将该外部接口的数据写入该外部接口对应的接收数据存储子单元中, 并将该 外部接口的数据的存储位置信息和数据长度信息写入该外部接口对应的接收 地址存储子单元中; 所述接口处理模块产生并发送控制所述处理器查询各外部接口对应的发 送地址存储子单元的 DMA读请求至所述 DMA请求队列单元; 所述 DMA 请求队列单元接收到该 DMA读请求后将其加入 DMA请求队列,在该 DMA 读请求出队时将其发送至所述 DMA命令产生单元, 由所述 DMA命令产生 发处理器在接收到制所述处理器查询各外部接口对应的发送地址存储子单元 的 DMA读命令后,将该 DMA读命令经所述 PCIE IP核和所述处理器的 PCIE 接口发送至所述处理器; 所述处理器执行该 DMA读命令, 查询所述存储器 中各外部接口对应的发送地址存储子单元, 经所述 PCIE IP核和所述 PCIE 收发处理器和所述 PCIE地址数据总线向所述接口处理模块返回所述 DMA 读请求对应的应答; 所述接口处理模块在接收到指示某一外部接口对应的发 送地址存储子单元中有存储位置信息和数据长度信息的应答后, 产生并发送 控制所述处理器根据该存储位置信息和数据长度信息从该外部接口对应的发 送数据存储子单元中获取数据的 DMA读请求至所述 DMA请求队列单元; 所述 DMA请求队列单元接收到该 DMA读请求后将其加入 DMA请求队列, 在该 DMA读请求出队时将其发送至所述 DMA命令产生单元, 由所述 DMA The processor is configured to: when sending data to an external interface, first query a sending address storage subunit corresponding to the external interface, if the sending address corresponding to the external interface is The unit is empty, and the data that needs to be sent to the external interface is stored in the corresponding data storage subunit corresponding to the external interface. In order to solve the above technical problem, the present invention provides a method for transparently transmitting data by using the above system, the method comprising: connecting a logic module to an external interface, receiving data sent by the external interface, and transmitting the data from the external interface. The data is stored in the receiving storage unit; the processor queries the receiving storage unit, and if there is data in the receiving storage unit that needs to be received, the data that needs to be received is acquired; and the processor needs to send to the storage unit The data of the external interface is stored in the sending storage unit; the logic module queries the sending storage unit, and when the data is sent to the sending storage unit, the data to be sent is acquired, and the data needs to be sent. Data is sent to the external interface. In the method of the present invention, the receiving storage unit includes a receiving storage subunit corresponding to each external interface, and the sending storage unit includes a sending storage subunit corresponding to each external interface; the external interface The number of the data is one or more; the step of storing, by the logic module, the data sent by the external interface into the receiving storage unit comprises: storing the data received from each external interface in the receiving storage subunit corresponding to each external interface The logic module queries the sending storage unit, when querying that the data in the sending storage unit needs to be sent, the step of acquiring data to be sent and transmitting the data to be sent to the external interface includes: Querying the sending storage sub-units corresponding to the external interfaces respectively, and when the data is sent to the sending storage sub-unit corresponding to the external interface, the data to be sent is sent and the data to be sent is sent to The external interface; the processor will need to send data to the external interface The step of storing in the sending storage unit includes: storing data that needs to be sent to each external interface to a sending storage subunit corresponding to each external interface; the processor querying the receiving storage unit, querying the location The step of obtaining the data to be received in the receiving storage unit includes: separately querying the receiving storage subunit corresponding to each external interface, and querying the corresponding external interface If there is data in the receiving storage subunit that needs to be received, the data to be received is acquired. In the method of the present invention, the receiving storage subunit includes a receiving data storage subunit and a receiving address storage subunit; the transmitting storage subunit includes a transmitting data storage subunit and a sending address storage subunit; the logic module will The step of storing the data received by each external interface in the receiving storage subunit corresponding to each external interface includes: storing data of each external interface in a receiving data storage subunit corresponding to each external interface And storing the storage location information and the data length information of the data of each external interface in a receiving address storage subunit corresponding to each external interface; the logic module respectively querying the sending storage subunit corresponding to each external interface, When the data to be sent is sent to the sending storage subunit corresponding to the certain external interface, the step of acquiring the data to be sent and sending the data to be sent to the external interface includes: separately querying the external The sending address storage sub-unit corresponding to the interface, if the query is for a certain The storage address storage sub-unit corresponding to an external interface includes storage location information and data length information, and then acquires data from the transmission data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and then acquires the obtained data. Sending data to the external interface, and clearing the sending address storage subunit corresponding to the external interface; the processor separately querying the receiving storage subunit corresponding to each external interface, and querying the receiving storage subunit corresponding to an external interface If the data needs to be received, the step of obtaining the data to be received includes: separately querying the receiving address storage sub-unit corresponding to each external interface, and if the query is to receive the corresponding address, the receiving sub-unit includes the storage The location information and the data length information are read from the received data storage subunit corresponding to the external interface according to the storage location information and the data length information, and the receiving address storage subunit corresponding to the external interface is emptied; The processor will need to be sent to each The step of storing the data of the part interface in the sending storage subunit corresponding to each external interface includes: storing data that needs to be sent to each external interface to the sending data storage subunit corresponding to each external interface, and The storage location information and the data length information of the data sent to the external interfaces are respectively written in corresponding to the external interfaces. The send address is stored in the subunit. In the method of the present invention, the processor in the system includes at least a high speed peripheral component interconnect (PCIE) interface, and the processor is connected to the logic module via the PCIE interface, wherein: the logic module The data of each external interface is stored in the received data storage subunit corresponding to each external interface, and the storage location information and the data length information of the data of the external interfaces are respectively stored in the corresponding external interfaces. The receiving address storage subunit includes: transmitting a direct memory access (DMA) write request and data of the external interfaces to the processor, and controlling, by the DMA write request, the data of each external interface by the processor Writing to the received data storage subunit corresponding to each external interface, and writing data length information and storage location information of each external interface into the receiving address storage subunit corresponding to each external interface; The sending address storage subunit corresponding to each external interface includes: sending a DMA read/write request to the processor The DMA read request is used to control the processor to query the sending address storage subunit corresponding to each external interface; the logic module clearing the sending address storage subunit corresponding to the external interface includes: controlling by DMA write request The processor clears the receiving address storage subunit corresponding to the external interface. In the method of the present invention, the logic module includes an interface processing module, a DMA module, a PCIE transceiver processor, and a PCIE IP core, which are sequentially connected, and the interface processing module is further connected to the PCIE transceiver processor via a PCIE address data bus. The DMA module includes a DMA request queue unit and a DMA command generating unit, and the method further includes: the interface processing module receiving data sent by one or more external interfaces, and after receiving data of an external interface, generating Transmitting, by the processor, the data of each external interface is respectively written into a DMA write request in the receive data storage subunit corresponding to each external interface to the DMA request queue unit; the DMA request queue unit receives the DMA After the write request is added to the DMA request queue, the DMA write request is sent to the DMA command generating unit when the DMA write request is dequeued, and the DMA command generating unit generates a corresponding DMA write command and sends the DMA command to the a PCIE transceiver processor; after receiving the DMA write command that controls the processor to write the data of each external interface to the received data storage subunit corresponding to each external interface, The PCIE address data bus acquires data of the external interface received by the interface processing module, and sends the acquired data and the DMA write command to the processor via the PCIE IP core and the PCIE interface of the processor. The processor executes the DMA write command, writes the data of the external interface into the receiving data storage subunit corresponding to the external interface, and writes the storage location information and the data length information of the data of the external interface to the external The interface corresponding to the receiving address storage subunit; the interface processing module generates and sends a DMA read request for controlling the processor to query the sending address storage subunit corresponding to each external interface to the DMA request queue unit; the DMA request After receiving the DMA read request, the queue unit adds it to the DMA request queue, and sends the DMA read request to the DMA command when it is dequeued. a generating unit, after the DMA command generating processor receives the DMA read command for querying the sending address storage subunit corresponding to each external interface, the DMA read command passes the PCIE IP core and the The PCIE interface of the processor is sent to the processor; the processor executes the DMA read command, and queries a sending address storage subunit corresponding to each external interface in the memory, and sends and receives the PCIE IP core and the PCIE. The processor and the PCIE address data bus return a response corresponding to the DMA read request to the interface processing module; the interface processing module receives storage location information in a sending address storage subunit corresponding to an external interface And responding to the data length information, generating and transmitting a DMA read request for controlling the processor to acquire data from the transmit data storage subunit corresponding to the external interface according to the storage location information and the data length information to the DMA request queue unit The DMA request queue unit receives the DMA read request and adds it to the DMA request queue, when the DMA read request is dequeued Which is sent to the DMA command generation unit, by the DMA
PCIE 收发处理器在控制所述处理器根据该存储位置信息和数据长度信息从 该外部接口对应的发送数据存储子单元中获取数据的 DMA读命令后, 将该 DMA读命令经 PCIE IP核和所述处理器的 PCIE接口发送至所述处理器, 所 述处理器执行该 DMA读命令, 根据该存储位置信息和数据长度信息从该外 部接口对应的发送数据存储子单元中读取数据, 并将读取到的数据经所述处 理器的 PCIE接口、 PCIE IP核、 所述 PCIE收发处理器以及所述 PCIE地址 数据总线发送至所述接口处理模块; 所述接口处理模块在接收到需要发送至 某一外部接口的数据后, 将其发送至对应的外部接口。 本发明的方法中, 所述逻辑模块将所述各外部接口的数据分别存储在所述各外部接口对应 的接收数据存储子单元中的步骤中, 所述逻辑模块是在接收到某一外部接口 的数据后, 先查询该外部接口对应的接收地址存储子单元, 如果该外部接口 对应的接收地址存储子单元为空, 才将该外部接口的数据存储至该外部接口 对应的接收数据存储子单元中; 所述处理器将需要发送至各外部接口的数据分别存储至所述各外部接口 对应的发送数据存储子单元中的步骤中, 所述处理器在需要发送数据至某一 外部接口时, 先查询该外部接口对应的发送地址存储子单元, 如果该外部接 口对应的发送地址存储子单元为空, 才将需要发送至该外部接口的数据存储 至该外部接口对应的发送数据存储子单元中。 The PCIE transceiver processor controls the DMA read command of the data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and passes the DMA read command to the PCIE IP core and the Sending, to the processor, a PCIE interface of the processor, the processor executing the DMA read command, and reading data from the sending data storage subunit corresponding to the external interface according to the storage location information and the data length information, and The data read is described The PCIE interface of the processor, the PCIE IP core, the PCIE transceiver processor, and the PCIE address data bus are sent to the interface processing module; after receiving the data that needs to be sent to an external interface, the interface processing module Send it to the corresponding external interface. In the method of the present invention, the logic module stores the data of each external interface in a receiving data storage subunit corresponding to each external interface, where the logic module receives an external interface. After the data is received, the receiving address storage sub-unit corresponding to the external interface is first queried, and if the receiving address storage sub-unit corresponding to the external interface is empty, the data of the external interface is stored to the receiving data storage sub-unit corresponding to the external interface. The processor stores the data that needs to be sent to each external interface to a corresponding one of the sending data storage subunits of the external interfaces, where the processor needs to send data to an external interface. Querying the sending address storage sub-unit corresponding to the external interface, if the sending address storage sub-unit corresponding to the external interface is empty, storing the data that needs to be sent to the external interface to the sending data storage sub-unit corresponding to the external interface .
本发明提供的一种数据透明传输的方法及系统, 在处理器的接口与其它 各种接口 (例如, 以太网接口、 SPI、 SGMIL 以及 I2C接口等)之间提供一 个数据透明传输的功能, 在数据传输的过程中, 不需要处理器的参与, 有效 解决了嵌入式系统中接口资源不足的问题。 The invention provides a data transparent transmission method and system, and provides a transparent data transmission function between an interface of a processor and various other interfaces (for example, an Ethernet interface, an SPI, an SGMIL, an I2C interface, etc.). In the process of data transmission, the participation of the processor is not needed, and the problem of insufficient interface resources in the embedded system is effectively solved.
附图概述 图 1是本发明实施例 PCIE接口透明数据传输的系统方框图; 图 2是本发明实施例发送数据存储子单元中用以指示存储位置信息的字 段的示意图; 图 3是本发明实施例接收数据存储子单元中用以指示存储位置信息的字 段的示意图; 图 4是本发明实施例逻辑模块的组成方框图; 图 5是本发明实施例 PCIE接口透明数据传输的方法流程图。 1 is a block diagram of a system for transparent data transmission of a PCIE interface according to an embodiment of the present invention; FIG. 2 is a schematic diagram of a field for indicating storage location information in a transmit data storage subunit according to an embodiment of the present invention; A schematic diagram of a field in a data storage subunit for indicating storage location information; FIG. 4 is a block diagram showing the composition of a logic module according to an embodiment of the present invention; FIG. 5 is a flowchart of a method for transparent data transmission of a PCIE interface according to an embodiment of the present invention.
本发明的较佳实施方式 本发明提供了一种 PCIE数据透明传输的方法及系统, 用以在处理器的 接口和其它各种接口之间提供一个数据透明传输的功能。 为使本发明的目的、 技术方案和优点更加清楚明白, 下文中将结合附图 对本发明的实施例进行详细说明。 需要说明的是, 在不冲突的情况下, 本申 请中的实施例及实施例中的特征可以相互任意组合。 参见图 1 ,该图示出了本发明实施例 PCIE接口透明数据传输的系统,该 系统包括处理器、 存储器和逻辑模块, 其中: 所述存储器包括接收存储单元( Rx_ Mem )和发送存储单元( Tx_ Mem )。 所述逻辑模块与外部接口相连, 逻辑模块设置为: 接收外部接口发送来 的数据, 并将外部接口发送来的数据存储至所述接收存储单元中; 以及查询 所述发送存储单元, 在查询到所述发送存储单元中有数据需要发送时, 获取 所述需要发送的数据并将其发送至所述外部接口。 所述处理器设置为: 将需要发送至外部接口的数据存储至所述发送存储 单元中; 以及查询所述接收存储单元, 在查询到所述接收存储单元中有数据 需要接收, 则获取所述需要接收的数据。 本实施例的系统中, 所述外部接口的数量为一个或者多个, 即所述外部接口可以包括接口 0、 接口 1 以及接口 N。 所述存储器包括与一个或者多个外部接口 (接口 0、接口 1 接口BEST MODE FOR CARRYING OUT THE INVENTION The present invention provides a method and system for transparent transmission of PCIE data for providing a transparent transmission of data between an interface of a processor and various other interfaces. In order to make the objects, the technical solutions and the advantages of the present invention more clearly, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be noted that, in the case of no conflict, the features in the embodiments and the embodiments of the present application may be arbitrarily combined with each other. Referring to FIG. 1, a system for transparent data transmission of a PCIE interface according to an embodiment of the present invention is shown. The system includes a processor, a memory, and a logic module, where: the memory includes a receiving storage unit (Rx_Mem) and a transmitting storage unit ( Tx_ Mem ). The logic module is connected to an external interface, and the logic module is configured to: receive data sent by the external interface, and store data sent by the external interface into the receiving storage unit; and query the sending storage unit, in query When there is data in the sending storage unit that needs to be sent, the data that needs to be sent is acquired and sent to the external interface. The processor is configured to: store data that needs to be sent to the external interface into the sending storage unit; and query the receiving storage unit, and obtain the data after querying that the receiving storage unit has data to be received The data that needs to be received. In the system of this embodiment, the number of the external interfaces is one or more, that is, the external interfaces may include interface 0, interface 1, and interface N. The memory includes one or more external interfaces (interface 0, interface 1 interface)
N ) 中的每一个外部接口 对应的接收存储子单元 ( Rx0_ Mem、 Rxl_Each external interface in N) corresponds to the receive storage subunit (Rx0_ Mem, Rxl_
Mem RxN— Mem ) , 以及与一个或者多个外部接口 (接口 0、 接口 1 接口 N ) 中的每一个外部接口——对应的发送存储子单元(TxO—Mem RxN—Mem ) and the corresponding transmit subunit (TxO—for each of the external interfaces (interface 0, interface 1 interface N)
Mem、 Txl— Mem、 、 TxN— Mem ) 。 所述逻辑模块是设置为按如下方式将外部接口发送来的数据存储至所述 接收存储单元中: 将接收到的接口 0、 接口 1 接口 N发送来的数据, 分别存储在接口 0、接口 1 接口 N对应的接收存储子单元 RxO— Mem、Mem, Txl-Mem, TxN-Mem). The logic module is configured to store data sent by the external interface to the In the receiving storage unit: the received data of the interface 0 and the interface 1 interface N are respectively stored in the receiving storage subunit RxO-Mem corresponding to the interface 0 and the interface 1 interface N.
Rxl_ Mem RxN— Mem中, 以供处理器处理; 以及所述逻辑模块是 设置为按如下方式查询所述发送存储单元, 在查询到所述发送存储单元中有 数据需要发送时, 获取所述需要发送的数据并将其发送至所述外部接口: 查 询各外部接口(接口 0、接口 1 接口 N )对应的发送存储子单元( Tx0_Rxl_Mem RxN - Mem, for processing by the processor; and the logic module is configured to query the sending storage unit according to the following manner, and when the data is sent to the sending storage unit to be sent, the need is obtained Send the data and send it to the external interface: Query the sending storage subunit corresponding to each external interface (interface 0, interface 1 interface N) ( Tx0_
Mem、 Txl— Mem TxN— Mem ) , 在查询到某一外部接口对应的发送 存储子单元中有数据需要发送时, 获取所述数据并经对应的外部接口发送出 去。 所述处理器主要完成对存储器中的 RxO— Mem、 Rxl— Mem RxNMem, Txl—Mem TxN—Mem), when data is sent to the sending storage subunit corresponding to an external interface, the data is acquired and sent out through the corresponding external interface. The processor mainly completes RxO-Mem, Rxl-Mem RxN in the memory
Mem、 TxO— Mem、 Txl— Mem 以及 TxN— Mem的数据处理。 即, 在 将需要发送至所述外部接口的数据存储至所述发送存储单元中时, 是将需要 发送至各外部接口的数据分别存储至该各外部接口对应的发送存储子单元 中; 在查询所述接收存储单元时, 是分别查询各外部接口对应的接收存储子 单元, 在查询到某一外部接口对应的接收存储子单元中有数据需要接收, 则 获取所述数据。 本实施例的系统中, 各外部接口对应的接收存储子单元(RxO— Mem、 Rxl— Mem RxNData processing of Mem, TxO-Mem, Txl-Mem and TxN-Mem. That is, when data to be sent to the external interface is stored in the transmission storage unit, data that needs to be sent to each external interface is separately stored in a transmission storage subunit corresponding to each external interface; When the storage unit is received, the receiving storage sub-unit corresponding to each external interface is separately queried, and when data is received in the receiving storage sub-unit corresponding to an external interface, the data is acquired. In the system of this embodiment, the receiving storage subunits corresponding to the external interfaces (RxO-Mem, Rxl-Mem RxN)
Mem ) 包括接收数据存储子单元(RxO— Data— Mem、 Rxl— Data— Mem 以及 RxN_Data_Mem ) 和接收地址存储子单元 ( RxO_Info_Mem、Mem ) includes receive data storage sub-units (RxO—Data—Mem, Rxl—Data—Mem, and RxN_Data_Mem) and receive address storage sub-units (RxO_Info_Mem,
Rxl— Info— Mem 以及 RxN— Info— Mem ); 各外部接口对应的发送存储 子单元(TxO— Mem、 Txl— Mem 以及 TxN— Mem ) 包括发送数据存 储子单元( TxO— Data— Mem、 Txl— Data— Mem 以及 TxN— Data— Mem ) 和发送地址存储子单元( TxO— Info— Mem、 Txl— Info— Mem 以及 TxN— Info— Mem ) ; 所述逻辑模块是设置为按如下方式将从各外部接口接收到的数据分别存 储在该各外部接口对应的接收存储子单元中: 将该各外部接口的数据分别存 储在该各外部接口对应的接收数据存储子单元中, 以及将该各外部接口的数 据的存储位置信息和数据长度信息分别存储在该各外部接口对应的接收地址 存储子单元中; 所述逻辑模块是设置为按如下方式分别查询各外部接口对应的发送存储 子单元: 分别查询该各外部接口对应的发送地址存储子单元, 如果查询到为 某一外部接口对应的发送地址存储子单元中包含存储位置信息和数据长度信 息, 则根据所述存储位置信息和数据长度信息从该外部接口对应的发送数据 存储子单元获取数据, 然后将获取到的数据发送至该外部接口, 以及还将该 外部接口对应的发送地址存储子单元清空; 所述处理器是设置为按如下方式分别查询该各外部接口对应的接收存储 子单元: 分别查询该各外部接口对应的接收地址存储子单元, 如果查询到某 一外部接口对应的接收地址存储子单元中包括存储位置信息和数据长度信 息, 则根据所述存储位置信息和数据长度信息从该外部接口对应的接收数据 存储子单元中读取数据 ,以及将该外部接口对应的接收地址存储子单元清空; 所述处理器是设置为按如下方式将需要发送至各外部接口的数据分别存 储至该各外部接口对应的发送存储子单元中: 将需要发送至各外部接口的数 据分别存储至该各外部接口对应的发送数据存储子单元中, 以及将需要发送 至该各外部接口的数据的存储位置信息和数据长度信息分别写入该各外部接 口对应的发送地址存储子单元中。 其中, 所述存储器中各外部接口对应的发送地址存储子单元承载的信息 可以如图 2所示, 其中, Tx Length字段表示所述存储器中 TxO— Data— Mem、 Txl— Data— Mem TxN— Data— Mem单元中存储的数据的长度; Tx StartRxl—Info—Mem and RxN—Info—Mem); Transmit storage subunits corresponding to each external interface (TxO—Mem, Txl—Mem, and TxN—Mem) include transmit data storage subunits (TxO—Data—Mem, Txl— Data—Mem and TxN—Data—Mem and send address storage subunits (TxO—Info—Mem, Txl—Info—Mem, and TxN—Info—Mem); the logic module is set to be external from the following The data received by the interface is respectively stored in the receiving storage subunit corresponding to each external interface: the data of each external interface is separately stored in the receiving data storage subunit corresponding to each external interface, and the external interfaces are The storage location information and the data length information of the data are respectively stored in the receiving addresses corresponding to the external interfaces. In the storage subunit, the logic module is configured to respectively query the sending storage subunits corresponding to the external interfaces as follows: respectively query the sending address storage subunits corresponding to the external interfaces, if the query corresponds to an external interface The storage address storage sub-unit includes storage location information and data length information, and then acquires data from the transmission data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and then sends the acquired data to the The external interface, and the sending address storage subunit corresponding to the external interface are also emptied; the processor is configured to separately query the receiving storage subunits corresponding to the external interfaces as follows: respectively query the receiving corresponding to the external interfaces An address storage subunit, if the storage location information and the data length information are included in the receiving address storage subunit corresponding to a certain external interface, the receiving data storage device corresponding to the external interface according to the storage location information and the data length information Read data in the unit, and The receiving address storage subunit corresponding to the external interface is cleared; the processor is configured to store data to be sent to each external interface to the sending storage subunit corresponding to each external interface as follows: The data to the external interfaces are respectively stored in the transmission data storage subunits corresponding to the external interfaces, and the storage location information and the data length information of the data to be sent to the external interfaces are respectively written in the corresponding external interfaces. The send address is stored in the subunit. The information carried by the sending address storage subunit corresponding to each external interface in the memory may be as shown in FIG. 2, where the Tx Length field indicates TxO_Data_Mem, Txl_Data_Mem TxN_Data in the memory. – the length of the data stored in the Mem unit; Tx Start
Address Ptr表示 TxO— Data— Mem、 Txl— Data— Mem TxN— Data— Mem单 元中数据的起始存储地址。 本实施例的系统中, 所述存储器中各外部接口对应的接收地址存储子单元承载的信息可以如 图 3 所示, 其中, Rx Length 字段表示所述存储器中 RxO— Data— Mem、Address Ptr indicates the starting storage address of the data in the TxO—Data—Mem, Txl—Data—Mem TxN—Data—Mem unit. In the system of this embodiment, the information carried by the receiving address storage subunit corresponding to each external interface in the memory may be as shown in FIG. 3, where the Rx Length field indicates RxO_Data_Mem in the memory.
Rxl— Data— Mem RxN— Data— Mem 单元中存储数据的长度; Rx StartRxl—Data— Mem RxN—Data—the length of data stored in the Mem unit; Rx Start
Address Ptr表示 RxO— Data— Mem、 Rxl— Data— Mem、 、 RxN— Data— Mem 单元中数据的起始存储地址。 本实施例的系统中, 所述逻辑模块是设置为: 在接收到某一外部接口的数据后, 先查询该外 部接口对应的接收地址存储子单元, 如果其为空, 才将该外部接口的数据存 储至该外部接口对应的接收数据存储子单元中; 所述处理器是设置为: 在需要发送数据至某一外部接口时, 先查询该外 部接口对应的发送地址存储子单元, 如果其为空, 才将需要发送至该外部接 口的数据存储至该外部接口对应的发送数据存储子单元中。 随着高速夕卜设组件互连 ( Peripheral Component Interconnect Express , 简 称 PCIE )标准的不断完善, 越来越多的嵌入式设备集成 PCIE接口, PCIE 具有速率高, 电路连接简单, 技术兼容性好, 在通信及其他数据传输中应用 越来越多, 因此, 下面以具有 PCIE接口的处理器为例说明本发明透明传输 方案: 所述处理器经 PCIE接口与所述逻辑模块相连。 所述逻辑模块是设置为按如下方式将该各外部接口的数据分别存储在该 各外部接口对应的接收数据存储子单元中: 向所述处理器发送直接存储器存 取( Direct Memory Access, 简称 DMA )写请求和该各外部接口的数据, 通 过 DMA写请求控制所述处理器将各外部接口的数据分别写入各外部接口对 应的接收数据存储子单元中, 以及将各外部接口的数据的长度和存储位置信 息写入各外部接口对应的接收地址存储子单元中; 所述逻辑模块是设置为按如下方式分别查询该各外部接口对应的发送地 址存储子单元: 向所述处理器发送 DMA读写请求, 先通过 DMA读请求控 制所述处理器查询该各外部接口对应的发送地址存储子单元, 并在查询到某 一外部接口对应的发送地址存储子单元中包含存储位置信息和数据长度信息 时, 根据所述存储位置信息和数据长度信息从该外部接口对应的发送数据存 储子单元中读取数据, 然后通过 DMA写请求控制所述处理器清空该外部接 口对应的接收地址存储子单元。 其中, 所述逻辑模块如图 4所示, 包括依次相连的接口处理模块、 直接 存储器存取(DMA )模块、 PCIE 收发处理器以及 PCIE IP核 (Intellectual Property core), 所述接口处理模块还与所述 PCIE收发处理器经 PCIE地址数 据总线相连, 其中: 接口处理模块具有对接口 0收发处理、 接口 1收发处理、 一直到接口 N 的数据收发处理、 DMA请求的产生、以及 PCIE地址数据总线的处理等功能; DMA模块包括 DMA的请求队列和 DMA命令产生模块,分别完成接口 0到 接口 N的 DMA读写请求排序和 DMA的命令的生成功能; PCI Express收发 处理模块主要完成 DMA命令的处理、 PCIE IP CORE接口数据的处理; PCIE IP CORE由逻辑芯片厂家提供, 集成了物理层, 数据链路层, 以及事务层的 功能。 其中, 所述 PCIE收发处理器还具有数据包的拆分与合并功能, 以适 应所述 PCIE IP核的需求。 下面进一步说明所述逻辑模块中上述各模块如何共同协作, 实现本发明 透明传输功能: 所述接口处理模块设置为: 与一个或者多个外部接口相连接, 在接收到 各外部接口的数据后, 产生并发送控制所述处理器将该各外部接口的数据分 别写入该各外部接口对应的接收数据存储子单元中的 DMA 写请求至所述 DMA模块; 产生并发送控制所述处理器查询各外部接口对应的发送地址存 储子单元的 DMA读请求至所述 DMA模块;在从所述 PCIE地址数据总线接 收到用以指示某一外部接口的发送地址存储子单元中有存储位置信息和数据 长度信息的应答时, 产生并发送控制所述处理器根据所述存储位置信息和数 据长度信息从该外部接口对应的发送数据存储子单元中读取数据的 DMA读 请求; 以及在从所述 PCIE地址数据总线接收到需要发送至某一外部接口的 数据后, 将该数据发送至对应的外部接口, 产生并发送控制所述处理器将该 外部接口对应的发送地址存储子单元清空的 DMA写请求; 所述 DMA模块,包括 DMA请求队列单元和 DMA命令产生单元,其中: 所述 DMA请求队列单元设置为: 对接收到的 DMA读写请求进行排序; 所 述 DMA命令产生单元设置为:按照所述 DMA请求队列单元中的 DMA读写 请求的排序顺序生成对应的 DMA读写命令, 并将所述 DMA命令发送至所 述 PCIE收发处理器; 所述 PCIE收发处理器设置为:将所述 DMA模块发送来的 DMA读写命 令发送至所述 PCIE IP核; 将所述 PCIE IP核发送来的控制所述处理器查询 各外部接口对应的发送地址存储子单元的 DMA读请求对应的应答经所述 PCIE地址数据总线发送至所述接口处理模块;在接收到控制所述处理器将该 各外部接口的数据分别写入该各外部接口对应的接收数据存储子单元中的 DMA写命令后,经所述 PCIE地址数据总线获取所述接口处理模块接收到的 该外部接口数据并将其发送至所述 PCIE IP核; 以及在接收到所述 PCIE IP 核发送来的需要发送至某一外部接口的数据后, 将其经所述 PCIE地址数据 总线发送至所述接口处理模块; 所述 PCIE IP核, 集成有物理层, 数据链路层, 以及事务层的功能, 该 PCIE IP核设置为: 在接收到所述 PCIE收发处理器发送来的 DMA读写请求 后, 将其发送至所述处理器; 在接收到所述处理器发送来的查询各外部接口 对应的发送地址存储子单元的 DMA读请求对应的应答发送至所述 PCIE收发 处理器; 在接收到所述 PCIE收发处理器发送来的某一外部接口的数据后, 将发送至所述处理器; 以及在接收到所述处理器发送来的需要发送至某一外 部接口的数据后, 将其发送至所述 PCIE收发处理器。 基于所述逻辑模块上述功能, 所述处理器只需要执行接收到的 DMA读 写命令即可。 所述处理器不需要参与透明传输控制, 通过对所述存储器中 RxO— Info— Mem 、 RxO— Data— Mem 、 TxO— Info— Mem 、 TxO— Data— Mem ,Address Ptr represents the starting storage address of the data in the RxO—Data—Mem, Rxl—Data—Mem, and RxN—Data—Mem units. In the system of this embodiment, the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface, and if it is empty, the external interface is The data is stored in the receiving data storage subunit corresponding to the external interface; the processor is configured to: when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, if it is Empty, the data that needs to be sent to the external interface is stored in the corresponding data storage subunit corresponding to the external interface. With the continuous improvement of the Peripheral Component Interconnect Express (PCIE) standard, more and more embedded devices integrate PCIE interfaces. PCIE has high speed, simple circuit connection and good technical compatibility. There are more and more applications in communication and other data transmission. Therefore, the transparent transmission scheme of the present invention is described below by taking a processor having a PCIE interface as follows: The processor is connected to the logic module via a PCIE interface. The logic module is configured to store the data of each external interface in a receiving data storage subunit corresponding to each external interface as follows: Send a direct memory access (DMA) to the processor. Writing a request and data of the external interfaces, controlling, by the DMA write request, the data of each external interface to be respectively written into the receiving data storage subunit corresponding to each external interface, and the length of the data of each external interface And the storage location information is written into the receiving address storage subunit corresponding to each external interface; the logic module is configured to separately query the sending address storage subunit corresponding to each external interface as follows: sending a DMA read to the processor Write request, firstly, the DMA read request is used to control the processor to query the sending address storage subunit corresponding to each external interface, and the storage location information and the data length information are included in the sending address storage subunit corresponding to a certain external interface. At the time, according to the storage location information and the data length information from the external interface pair The transmission data storage sub-unit to read data and DMA write request by the processor to control emptying of the external interface corresponding to the received address storage subunit. As shown in FIG. 4, the logic module includes an interface processing module, a direct memory access (DMA) module, a PCIE transceiver processor, and a PCIE IP core (Intellectual Property core), which are sequentially connected, and the interface processing module is also The number of PCIE addresses of the PCIE transceiver processor According to the bus connection, wherein: the interface processing module has functions such as interface 0 transceiver processing, interface 1 transceiver processing, data transmission and reception processing of interface N, generation of DMA request, and processing of PCIE address data bus; DMA module includes DMA The request queue and the DMA command generation module respectively perform the DMA read/write request sorting and the DMA command generation function of the interface 0 to the interface N; the PCI Express transceiver processing module mainly completes the processing of the DMA command and the processing of the PCIE IP CORE interface data; The IP CORE is provided by the logic chip manufacturer and integrates the functions of the physical layer, the data link layer, and the transaction layer. The PCIE transceiver processor further has a splitting and merging function of the data packet to meet the requirements of the PCIE IP core. The following further describes how the above modules cooperate in the logic module to implement the transparent transmission function of the present invention: the interface processing module is configured to: connect with one or more external interfaces, and after receiving data of each external interface, Generating and transmitting a DMA write request for controlling, by the processor, the data of each external interface to the received data storage sub-unit corresponding to each external interface to the DMA module; generating and transmitting the processor to query each a DMA read request of the transmit address storage sub-unit corresponding to the external interface to the DMA module; storage location information and data length in the transmit address storage sub-unit received from the PCIE address data bus to indicate an external interface And responsive to the information, generating and transmitting a DMA read request that controls the processor to read data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information; and at the slave PCIE address After the data bus receives the data that needs to be sent to an external interface, the data is sent Corresponding external interface, generating and sending a DMA write request for controlling the processor to clear the sending address storage subunit corresponding to the external interface; the DMA module includes a DMA request queue unit and a DMA command generating unit, where: The DMA request queue unit is configured to: sort the received DMA read/write requests; the DMA command generating unit is configured to: generate a corresponding DMA read/write command according to a sort order of the DMA read/write requests in the DMA request queue unit And sending the DMA command to the PCIE transceiver processor; the PCIE transceiver processor is configured to: send the DMA read/write life of the DMA module Sending to the PCIE IP core; sending, by the PCIE IP core, a response corresponding to the DMA read request of the processor to query the sending address storage subunit corresponding to each external interface is sent to the PCIE address data bus to The interface processing module: after receiving the DMA write command that controls the processor to respectively write the data of each external interface into the received data storage subunit corresponding to each external interface, obtain the DMA write command via the PCIE address data bus The interface processing module receives the external interface data and sends it to the PCIE IP core; and after receiving the data sent by the PCIE IP core that needs to be sent to an external interface, The PCIE address data bus is sent to the interface processing module; the PCIE IP core is integrated with a physical layer, a data link layer, and a transaction layer function, and the PCIE IP core is set to: receive the PCIE transceiver processing After the DMA read/write request sent by the device, send it to the processor; and receive the sending address corresponding to each external interface sent by the processor. The response corresponding to the DMA read request of the subunit is sent to the PCIE transceiver processor; after receiving the data of an external interface sent by the PCIE transceiver processor, it is sent to the processor; and after receiving After the data sent by the processor needs to be sent to an external interface, it is sent to the PCIE transceiver processor. Based on the above functions of the logic module, the processor only needs to execute the received DMA read/write command. The processor does not need to participate in transparent transmission control by using RxO-Info-Mem, RxO-Data-Mem, TxO-Info-Mem, TxO-Data-Mem in the memory,
Rxl— Info— Mem、 Rxl— Data— Mem、 Txl— Info— Mem、 Txl— Data— Mem, , RxN— Info— Mem、 RxN— Data— Mem、 TxN— Info— Mem、 以及 TxN— Data— Mem数 据的处理即可从存储器上读取到外部接口发送来的数据, 将需要发送的数据 存储在存储器上供本发明所述逻辑模块发送至对应接口。 本实施例的系统中, 所述逻辑模块是设置为: 在接收到某一外部接口的数据后, 先查询该外 部接口对应的接收地址存储子单元, 如果其为空, 才将该外部接口的数据存 储至该外部接口对应的接收数据存储子单元中; 所述处理器是设置为: 在需要发送数据至某一外部接口时, 先查询该外 部接口对应的发送地址存储子单元, 如果其为空, 才将需要发送至该外部接 口的数据存储至该外部接口对应的发送数据存储子单元中。 本发明实施例的数据透明传输的系统还可以包括一交换器 (图中未示 出) , 其中: 所述交换器主要是一个桥接作用, 完成处理器的接口数据和逻辑模块的 接口数据的转发功能, 其可以将所述处理器与一个或者多个所述逻辑模块相 连接, 以实现接口扩展。 Rxl—Info— Mem, Rxl—Data— Mem, Txl—Info—Mem, Txl—Data—Mem, , RxN— Info— Mem, RxN—Data—Mem, TxN—Info—Mem, and TxN—Data—Mem Data The processing can read the data sent from the external interface from the memory, and store the data to be sent on the memory for the logic module of the present invention to send to the corresponding interface. In the system of this embodiment, the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface, and if it is empty, the external interface is The data is stored in the receiving data storage subunit corresponding to the external interface; the processor is configured to: when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, if it is Empty, will need to be sent to the external connection The data of the port is stored in the sending data storage subunit corresponding to the external interface. The system for transparent transmission of data in the embodiment of the present invention may further include a switch (not shown), wherein: the switch is mainly a bridge function, and completes interface data of the processor and forwarding of interface data of the logic module. A function that can connect the processor to one or more of the logic modules to implement interface expansion.
参见图 5 , 该图示出了釆用上述系统来执行数据透明传输的方法, 该方 法包括步骤: 步骤 S501 : 所述逻辑模块与外部接口相连,接收所述外部接口发送来的 数据, 并将其存储至所述接收存储单元中; 步骤 S502: 所述处理器查询所述接收存储单元, 在查询到所述接收存储 单元中有数据需要接收, 则获取所述需要接收的数据; 步骤 S503:所述处理器将需要发送至外部接口的数据存储至所述发送存 储单元中; 步骤 S504: 所述逻辑模块查询所述发送存储单元, 在查询到所述发送存 储单元中有数据需要发送时, 获取所述需要发送的数据并将其发送至所述外 部接口。 上述步骤之间没有先后次序要求, 可同时执行, 本发明在此不做限制。 例如, 在逻辑模块将接收到的接口数据写入存储器时, 所述处理器也可以同 时将需要发送的数据写入至所述存储器。 Referring to FIG. 5, the figure shows a method for performing transparent transmission of data by using the above system, the method comprising the following steps: Step S501: The logic module is connected to an external interface, and receives data sent by the external interface, and The storage is stored in the receiving storage unit; Step S502: The processor queries the receiving storage unit, and if the data is received in the receiving storage unit, the data to be received is acquired; Step S503: The processor stores data that needs to be sent to the external interface to the sending storage unit; Step S504: The logic module queries the sending storage unit, and when there is data in the sending storage unit that needs to be sent, Acquiring the data that needs to be sent and sending it to the external interface. There is no order requirement between the above steps, which can be performed at the same time, and the invention is not limited herein. For example, when the logic module writes the received interface data to the memory, the processor can also write data to be transmitted to the memory at the same time.
其中, 所述外部接口的数量为一个或者多个, 即所述外部接口可以包括 接口 0、 接口 1 以及接口 N。 所述存储器, 包括与一个或者多个外部 接口 (接口 0、 接口 1 接口 N )中的每一个——对应的接收存储子单 元(RxO— Mem、 Rxl— Mem RxN— Mem )和与一个或者多个外部接 口 (接口 0、 接口 1 接口 N )中的每一个——对应的发送存储子单元 The number of the external interfaces is one or more, that is, the external interfaces may include interface 0, interface 1, and interface N. The memory includes a receiving storage subunit (RxO-Mem, Rxl-Mem RxN-Mem) corresponding to each of one or more external interfaces (interface 0, interface 1 interface N) and one or more Each of the external interfaces (interface 0, interface 1 interface N) - the corresponding transmit storage subunit
( TxO— Mem、 Txl Mem TxN— Mem ) 。 所述逻辑模块, 在将外部接口发送来的数据存储至所述接收存储单元中 时, 是将接收接口 0、 接口 1 接口 N发送来的数据, 分别存储在接 口 0、 接口 1 接口 N对应的接收存储子单元 RxO— Mem、 Rxl—(TxO—Mem, Txl Mem TxN—Mem). The logic module stores the data sent by the receiving interface 0 and the interface 1 interface N when the data sent by the external interface is stored in the receiving storage unit, and is respectively stored in the interface 0 and the interface 1 interface N. Receiving storage subunits RxO—Mem, Rxl—
Mem RxN— Mem中, 以供处理器处理; 以及查询各外部接口 (接口 0、接口 1 接口 N )对应的发送存储子单元(TxO— Mem、Txl— Mem Mem RxN—Mem for processing by the processor; and querying the sending storage subunits corresponding to each external interface (interface 0, interface 1 interface N) (TxO—Mem, Txl—Mem
TxN_ Mem ) , 在查询到某一外部接口对应的发送存储子单元中有数据需要 发送时, 获取所述数据并经对应的外部接口发送出去。 所述处理器, 所述处理器主要完成对存储器中的 RxO— Mem、 Rxl— TxN_Mem), when it is found that there is data in the sending storage sub-unit corresponding to an external interface, the data is acquired and sent through the corresponding external interface. The processor, the processor mainly completes RxO-Mem, Rxl in the memory-
Mem RxN— Mem、 TxO— Mem、 Txl— Mem TxN— Mem的数 据处理。 即, 在将需要发送至所述外部接口的数据存储至所述发送存储单元 中时, 是将需要发送至各外部接口的数据分别存储至该各外部接口对应的发 送存储子单元中; 在查询所述接收存储单元时, 是分别查询各外部接口对应 的接收存储子单元, 在查询到某一外部接口对应的接收存储子单元中有数据 需要接收, 则获取所述数据。 Mem RxN—Mem, TxO—Mem, Txl—Mem TxN—Mem data processing. That is, when data to be sent to the external interface is stored in the transmission storage unit, data that needs to be sent to each external interface is separately stored in a transmission storage subunit corresponding to each external interface; When the storage unit is received, the receiving storage sub-unit corresponding to each external interface is separately queried, and when data is received in the receiving storage sub-unit corresponding to an external interface, the data is acquired.
其中: 各外部接口对应的接收存储子单元(RxO— Mem、 Rxl— Mem RxN Where: the receiving storage subunit corresponding to each external interface (RxO—Mem, Rxl—Mem RxN
Mem ) 包 括 接 收 数 据 存 储 子 单 元 ( Rx0_Data_Mem 、Mem ) includes receiving data storage subunits ( Rx0_Data_Mem ,
Rxl— Data— Mem RxN— Data— Mem ) 和 接 收 地 址 存 储 子 单 元Rxl—Data— Mem RxN—Data—Mem and receive address storage subunit
( RxO— Info— Mem、 Rxl— Info— Mem RxN— Info— Mem ) ; 各外部接口对应 的发送存储子单元( TxO— Mem、 Txl— Mem TxN— Mem ) 包括发送数据 存储子单元( TxO_Data_Mem、 Txl Data Mem TxN Data Mem )和发送 地址存储子单元(TxO— Info— Mem、 Txl— Info— Mem TxN— Info— Mem ) ; 所述逻辑模块, 在将从各外部接口接收到的数据分别存储在该各外部接 口对应的接收存储子单元中时, 是将该各外部接口的数据分别存储在该各外 部接口对应的接收数据存储子单元中, 以及还将该各外部接口的数据的存储 位置信息和数据长度信息分别存储在该各外部接口对应的接收地址存储子单 元中; ( RxO— Info— Mem, Rxl—Info— Mem RxN— Info— Mem ; The transmit storage subunits corresponding to each external interface (TxO—Mem, Txl—Mem TxN—Mem) include the transmit data storage subunit (TxO_Data_Mem, Txl) Data Mem TxN Data Mem ) and a transmission address storage subunit (TxO—Info—Mem, Txl—Info—Mem TxN—Info—Mem); the logic module stores data received from each external interface in the When receiving the storage subunits corresponding to the external interfaces, the data of the external interfaces are respectively stored in the received data storage subunits corresponding to the external interfaces, and the storage location information of the data of the external interfaces is further The data length information is respectively stored in the receiving address storage subunit corresponding to each external interface;
所述逻辑模块, 在分别查询各外部接口对应的发送存储子单元时, 是分 别查询该各外部接口对应的发送地址存储子单元, 如果查询到为某一外部接 口对应的发送地址存储子单元中包含存储位置信息和数据长度信息, 则根据 所述存储位置信息和数据长度信息从该外部接口对应的发送数据存储子单元 获取数据, 然后将获取到的数据发送至该外部接口, 以及还将该外部接口对 应的发送地址存储子单元清空; 所述处理器, 在分别查询该各外部接口对应的接收存储子单元时, 是分 别查询该各外部接口对应的接收地址存储子单元, 如果查询到某一外部接口 对应的接收地址存储子单元中包括存储位置信息和数据长度信息, 则根据所 述存储位置信息和数据长度信息从该外部接口对应的接收数据存储子单元中 读取数据, 以及还将该外部接口对应的接收地址存储子单元清空; 所述处理器, 在将需要发送至各外部接口的数据分别存储至该各外部接 口对应的发送存储子单元中时, 是将需要发送至各外部接口的数据分别存储 至该各外部接口对应的发送数据存储子单元中, 以及还将需要发送至该各外 部接口的数据的存储位置信息和数据长度信息分别写入该各外部接口对应的 发送地址存储子单元中。 其中, 各外部接口对应的发送地址存储子单元承载的信息可以如图 2所 示, 其中 , Tx Length 字段表示所述存储器中 TxO— Data— Mem、The logic module is configured to separately query the sending storage subunits corresponding to the external interfaces. Querying the sending address storage sub-unit corresponding to each external interface, if the storage location information and the data length information included in the sending address storage sub-unit corresponding to an external interface are queried, according to the storage location information and the data length information Obtaining data from the sending data storage subunit corresponding to the external interface, and then sending the acquired data to the external interface, and also clearing the sending address storage subunit corresponding to the external interface; the processor separately querying the When receiving the storage sub-unit corresponding to each external interface, the receiving address storage sub-unit corresponding to each external interface is separately queried, and if the storage address sub-unit corresponding to the external interface is included, the storage location information and the data length information are included. And reading data from the received data storage subunit corresponding to the external interface according to the storage location information and the data length information, and also clearing the receiving address storage subunit corresponding to the external interface; the processor, where Data sent to each external interface is stored separately When stored in the transmission storage subunit corresponding to each external interface, the data to be sent to each external interface is separately stored in the transmission data storage subunit corresponding to each external interface, and also needs to be sent to the external The storage location information and the data length information of the data of the interface are respectively written in the transmission address storage subunits corresponding to the respective external interfaces. The information carried by the sending address storage subunit corresponding to each external interface may be as shown in FIG. 2, where the Tx Length field indicates TxO_Data_Mem in the memory,
Txl— Data— Mem TxN— Data— Mem单元中存储的数据的长度; Tx StartTxl—Data— Mem TxN—Data—the length of data stored in the Mem unit; Tx Start
Address Ptr表示 TxO— Data— Mem、 Txl— Data— Mem TxN— Data— Mem单 元中数据的起始存储地址。 其中, 各外部接口对应的接收地址存储子单元承载的信息可以如图 3所 示, 其中 , Rx Length 字段表示所述存储器中 RxO— Data— Mem、Address Ptr indicates the starting storage address of the data in the TxO—Data—Mem, Txl—Data—Mem TxN—Data—Mem unit. The information carried by the receiving address storage subunit corresponding to each external interface may be as shown in FIG. 3, where the Rx Length field indicates RxO_Data_Mem in the memory,
Rxl— Data— Mem RxN— Data— Mem 单元中存储数据的长度; Rx StartRxl—Data— Mem RxN—Data—the length of data stored in the Mem unit; Rx Start
Address Ptr表示 RxO— Data— Mem、 Rxl— Data— Mem、 、 RxN— Data— Mem 单元中数据的起始存储地址。 釆用上述方法, 通过对存储有需要发送至外部接口的数据的存储位置信 息和长度信息的发送地址存储子单元进行查询即可判断出处理器是否有需要 发送至某一外部接口的数据, 以及通过对存储有接收到的外部接口的数据的 存储位置信息和长度信息的接收地址存储子单元进行查询即可判断出是否有 某一外部接口的数据已经存储至存储器可供处理器使用了。 上述方法还包括: 所述逻辑模块, 在接收到某一外部接口的数据后, 先查询该外部接口对 应的接收地址存储子单元, 如果其为空, 才将该外部接口的数据存储至该外 部接口对应的接收数据存储子单元中; 所述处理器, 在需要发送数据至某一外部接口时, 先查询该外部接口对 应的发送地址存储子单元, 如果其为空, 才将需要发送至该外部接口的数据 存储至该外部接口对应的发送数据存储子单元中。 下面以具有 PCIE接口的处理器为例说明本发明透明传输方法, 该系统 中所述处理器至少具有一 PCIE接口,所述处理器经所述 PCIE接口与所述逻 辑模块相连, 该方法包括: 所述逻辑模块, 在将该各外部接口的数据分别存储在该各外部接口对应 的接收数据存储子单元中时, 是向所述处理器发送 DMA写请求和该各外部 接口的数据, 通过 DMA写请求控制所述处理器将该各外部接口的数据分别 写入该各外部接口对应的接收数据存储子单元中, 以及将该各外部接口的数 据的长度和存储位置信息写入该各外部接口对应的接收地址存储子单元中; 所述逻辑模块,在分别查询该各外部接口对应的发送地址存储子单元时, 是向所述处理器发送 DMA读写请求, 先通过 DMA读请求控制所述处理器 查询该各外部接口对应的发送地址存储子单元, 并在查询到某一外部接口对 应的发送地址存储子单元中包含存储位置信息和数据长度信息时, 根据所述 存储位置信息和数据长度信息从该外部接口对应的发送数据存储子单元中读 取数据, 然后通过 DMA写请求控制所述处理器清空该外部接口对应的接收 地址存储子单元。 其中: 所述逻辑模块包括依次相连的接口处理模块、 直接存储器存取(DMA ) 模块、 PCIE收发处理器以及 PCIE IP核, 所述接口处理模块还与所述 PCIE 收发处理器经 PCIE地址数据总线相连,所述 DMA模块包括 DMA请求队列 单元和 DMA命令产生单元, 其中: 所述接口处理模块接收一个或者多个外部接口发送来的数据, 在接收到 某一外部接口的数据后, 产生并发送控制所述处理器将该各外部接口的数据 分别写入该各外部接口对应的接收数据存储子单元中的 DMA写请求至所述 DMA请求队列单元; 所述 DMA请求队列单元接收到该 DMA写请求后将其 加入 DMA请求队列,在该 DMA写请求出队时将其发送至所述 DMA命令产 生单元, 由所述 DMA命令产生单元产生相应的 DMA写命令后发送至所述 PCIE收发处理器; 所述 PCIE收发处理器在接收到控制所述处理器将该各外 部接口的数据分别写入该各外部接口对应的接收数据存储子单元中的 DMA 写命令后, 经所述 PCIE地址数据总线获取所述接口处理模块接收到的该外 部接口的数据, 将获取到的数据以及所述 DMA写命令经所述 PCIE IP核和 所述处理器的 PCIE接口发送至所述处理器;所述处理器执行该 DMA写命令, 将该外部接口的数据写入该外部接口对应的接收数据存储子单元中, 并将该 外部接口的数据的存储位置信息和数据长度信息写入该外部接口对应的接收 地址存储子单元中; 所述接口处理模块产生并发送控制所述处理器查询各外部接口对应的发 送地址存储子单元的 DMA读请求至所述 DMA请求队列单元; 所述 DMA 请求队列单元接收到该 DMA读请求后将其加入 DMA请求队列,在该 DMA 读请求出队时将其发送至所述 DMA命令产生单元, 由所述 DMA命令产生 发处理器在接收到制所述处理器查询各外部接口对应的发送地址存储子单元 的 DMA读命令后,将该 DMA读命令经所述 PCIE IP核和所述处理器的 PCIE 接口发送至所述处理器; 所述处理器执行该 DMA读命令, 查询所述存储器 中各外部接口对应的发送地址存储子单元, 经所述 PCIE IP核和所述 PCIE 收发处理器和所述 PCIE地址数据总线向所述接口处理模块返回所述 DMA 读请求对应的应答; 所述接口处理模块在接收到指示某一外部接口对应的发 送地址存储子单元中有存储位置信息和数据长度信息的应答后, 产生并发送 控制所述处理器根据该存储位置信息和数据长度信息从该外部接口对应的发 送数据存储子单元中获取数据的 DMA读请求至所述 DMA请求队列单元; 所述 DMA请求队列单元接收到该 DMA读请求后将其加入 DMA请求队列, 在该 DMA读请求出队时将其发送至所述 DMA命令产生单元, 由所述 DMA Address Ptr represents the starting storage address of the data in the RxO—Data—Mem, Rxl—Data—Mem, and RxN—Data—Mem units. Using the above method, by querying the storage address storage subunit storing the storage location information and the length information of the data that needs to be sent to the external interface, it can be determined whether the processor has data to be sent to an external interface, and By storing data with the received external interface The receiving address storage sub-unit storing the location information and the length information can perform a query to determine whether data of a certain external interface has been stored in the memory for the processor to use. The method further includes: after receiving the data of an external interface, querying the receiving address storage subunit corresponding to the external interface, and if the space is empty, storing the data of the external interface to the external The receiving data storage subunit corresponding to the interface; the processor, when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, and if it is empty, it needs to be sent to the The data of the external interface is stored in the transmission data storage subunit corresponding to the external interface. The following is a description of the transparent transmission method of the present invention by using a processor having a PCIE interface. The processor has at least one PCIE interface, and the processor is connected to the logic module via the PCIE interface. The method includes: The logic module sends the DMA write request and the data of each external interface to the processor when the data of each external interface is stored in the received data storage subunit corresponding to each external interface, by using DMA Writing a request to the processor to write data of each external interface into the receiving data storage subunit corresponding to each external interface, and writing data length and storage location information of each external interface to the external interfaces Corresponding receiving address storage sub-unit; the logic module, when separately querying the sending address storage sub-unit corresponding to each external interface, sending a DMA read/write request to the processor, first controlling the DMA read request The processor queries the sending address storage subunit corresponding to each external interface, and queries the sending corresponding to an external interface. When the location storage subunit includes the storage location information and the data length information, the data is read from the transmission data storage subunit corresponding to the external interface according to the storage location information and the data length information, and then the processing is controlled by a DMA write request. The device clears the receiving address storage subunit corresponding to the external interface. The logic module includes an interface processing module, a direct memory access (DMA) module, a PCIE transceiver processor, and a PCIE IP core, and the interface processing module is further connected to the PCIE transceiver processor via a PCIE address data bus. Connected, the DMA module includes a DMA request queue a unit and a DMA command generating unit, wherein: the interface processing module receives data sent by one or more external interfaces, and after receiving data of an external interface, generates and sends a control to the processor to the external interfaces. The data is respectively written into the DMA write request unit in the receive data storage subunit corresponding to each external interface to the DMA request queue unit; the DMA request queue unit receives the DMA write request and adds it to the DMA request queue, The DMA write request is sent to the DMA command generating unit when it is dequeued, and is generated by the DMA command generating unit to generate a corresponding DMA write command, and then sent to the PCIE transceiver processor; the PCIE transceiver processor receives the same Controlling, by the processor, the data of each external interface is respectively written into the DMA write command in the receiving data storage subunit corresponding to each external interface, and acquiring the received by the interface processing module via the PCIE address data bus Data of the external interface, sending the acquired data and the DMA write command to the PCIE IP core and the PCIE interface of the processor to the The processor executes the DMA write command, writes the data of the external interface into the receiving data storage subunit corresponding to the external interface, and writes the storage location information and the data length information of the data of the external interface. Entering a receiving address storage sub-unit corresponding to the external interface; the interface processing module generates and sends a DMA read request for controlling the processor to query a sending address storage sub-unit corresponding to each external interface to the DMA request queue unit; After receiving the DMA read request, the DMA request queue unit adds it to the DMA request queue, and sends the DMA read request to the DMA command generating unit when the DMA read request is dequeued, and the DMA command generating processor receives the DMA command. After the processor queries the DMA read command of the sending address storage subunit corresponding to each external interface, the DMA read command is sent to the processor via the PCIE IP core and the PCIE interface of the processor; The processor executes the DMA read command, and queries a sending address storage subunit corresponding to each external interface in the memory, and the PCIE IP core and the PCIE Transceiver processor and said PCIE address data bus returning a response corresponding to said DMA read request to said interface processing module; said interface processing module receiving a storage location in said send address storage subunit corresponding to an external interface After the response of the information and the data length information, generating and transmitting a DMA read request for controlling the processor to acquire data from the transmit data storage subunit corresponding to the external interface according to the storage location information and the data length information to the DMA request queue unit; The DMA request queue unit adds the DMA read request to the DMA request queue, and sends the DMA read request to the DMA command generating unit when the DMA read request is dequeued, by the DMA
PCIE 收发处理器在控制所述处理器根据该存储位置信息和数据长度信息从 该外部接口对应的发送数据存储子单元中获取数据的 DMA读命令后, 将该 DMA读命令经 PCIE IP核和所述处理器的 PCIE接口发送至所述处理器, 所 述处理器执行该 DMA读命令, 根据该存储位置信息和数据长度信息从该外 部接口对应的发送数据存储子单元中读取数据, 并将读取到的数据经所述处 理器的 PCIE接口、 PCIE IP核、 所述 PCIE收发处理器以及所述 PCIE地址 数据总线发送至所述接口处理模块; 所述接口处理模块在接收到需要发送至 某一外部接口的数据后, 将其发送至对应的外部接口。 该方法还包括: 所述逻辑模块, 在接收到某一外部接口的数据后, 先查询该外部接口对 应的接收地址存储子单元, 如果其为空, 才将该外部接口的数据存储至该外 部接口对应的接收数据存储子单元中; 所述处理器, 在需要发送数据至某一外部接口时, 先查询该外部接口对 应的发送地址存储子单元, 如果其为空, 才将需要发送至该外部接口的数据 存储至该外部接口对应的发送数据存储子单元中。 上述方法还包括: 还以一交换模块将所述处理器与一个或者多个所述逻 辑模块相连接, 以实现接口扩展。 所述交换器主要是一个桥接作用, 完成处 理器的接口数据和逻辑模块的接口数据的转发功能, 其可以将所述处理器与 一个或者多个所述逻辑模块相连接, 以实现接口扩展。 釆用本发明实施例上述方法, 主要由所述逻辑模块承担透明传输处理, 处理器只需要执行接收到的 DMA读写命令即可,不需要参与透明传输控制, 即, 处理器通过对所述存储器中 RxO— Info— Mem、 RxO— Data— Mem、 TxO— Info— Mem 、 TxO— Data— Mem , Rxl— Info— Mem 、 Rxl— Data— Mem 、The PCIE transceiver processor controls the DMA read command of the data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and passes the DMA read command to the PCIE IP core and the Sending, to the processor, a PCIE interface of the processor, the processor executing the DMA read command, and reading data from the sending data storage subunit corresponding to the external interface according to the storage location information and the data length information, and The read data is sent to the interface processing module via the PCIE interface of the processor, the PCIE IP core, the PCIE transceiver processor, and the PCIE address data bus; the interface processing module needs to send to the receiving After the data of an external interface is sent to the corresponding external interface. The method further includes: after receiving the data of an external interface, querying the receiving address storage sub-unit corresponding to the external interface, and if the space is empty, storing the data of the external interface to the external The receiving data storage subunit corresponding to the interface; the processor, when the data needs to be sent to an external interface, first query the sending address storage subunit corresponding to the external interface, and if it is empty, it needs to be sent to the The data of the external interface is stored in the transmission data storage subunit corresponding to the external interface. The above method further includes: connecting the processor to one or more of the logic modules in a switch module to implement interface expansion. The switch is mainly a bridging function, and completes the interface data of the processor and the forwarding function of the interface data of the logic module, which can connect the processor with one or more of the logic modules to implement interface expansion. According to the foregoing method of the embodiment of the present invention, the logic module is mainly responsible for transparent transmission processing, and the processor only needs to execute the received DMA read/write command, and does not need to participate in transparent transmission control, that is, the processor passes the RxO in the memory - Info - Mem, RxO - Data - Mem, TxO - Info - Mem, TxO - Data - Mem, Rxl - Info - Mem, Rxl - Data - Mem,
Txl— Info— Mem、 Txl— Data— Mem, , RxN— Info— Mem、 RxN— Data— Mem、Txl—Info— Mem, Txl— Data— Mem, , RxN— Info— Mem, RxN—Data— Mem,
TxN— Info— Mem、 TxN— Data— Mem数据的处理即可从存储器上读取到外部接 口发送来的数据, 将需要发送的数据存储在存储器上供本发明所述逻辑模块 发送至对应接口。 TxN—Info—Mem, TxN—Data—Mem data can be read from the memory to the external interface The data sent by the port stores the data to be sent on the memory for the logic module of the present invention to send to the corresponding interface.
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现。 相应地, 上述实施例中的各模块单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。 当然, 本发明还可有其他多种实施例, 在不背离本发明精神及其实质的 些相应的改变和变形都应属于本发明所附的权利要求的保护范围。 One of ordinary skill in the art will appreciate that all or a portion of the above steps may be accomplished by a program instructing the associated hardware, such as a read-only memory, a magnetic disk, or an optical disk. Alternatively, all or part of the steps of the above embodiments may also be implemented using one or more integrated circuits. Correspondingly, each module unit in the above embodiment may be implemented in the form of hardware or in the form of a software function module. The invention is not limited to any specific form of combination of hardware and software. The invention may, of course, be embodied in various other forms and modifications without departing from the spirit and scope of the invention.
工业实用性 本发明提供的一种数据透明传输的方法及系统, 在处理器的接口与其它 各种接口之间提供一个数据透明传输的功能, 在数据传输的过程中, 不需要 处理器的参与, 有效解决了嵌入式系统中接口资源不足的问题。 Industrial Applicability The present invention provides a data transparent transmission method and system, which provides a transparent data transmission function between an interface of a processor and various other interfaces, and does not require the participation of a processor in the process of data transmission. , effectively solve the problem of insufficient interface resources in the embedded system.

Claims

权 利 要 求 书 Claim
1、一种数据透明传输的系统,所述系统包括处理器、存储器和逻辑模块, 其中: 所述存储器, 包括接收存储单元和发送存储单元; 所述逻辑模块与外部接口相连, 所述逻辑模块设置为: 接收所述外部接 口发送来的数据, 并将外部接口发送来的数据存储至所述接收存储单元中; 以及查询所述发送数据存储单元, 在查询到所述发送存储单元中有数据需要 发送时,获取需要发送的数据并将所述需要发送的数据发送至所述外部接口; 所述处理器设置为: 将需要发送至所述外部接口的数据存储至所述发送 存储单元中; 以及查询所述接收存储单元, 在查询到所述接收存储单元中有 数据需要接收, 则获取所述需要接收的数据。 A system for transparent transmission of data, the system comprising a processor, a memory and a logic module, wherein: the memory comprises a receiving storage unit and a transmitting storage unit; the logic module is connected to an external interface, the logic module The method is configured to: receive data sent by the external interface, and store data sent by the external interface into the receiving storage unit; and query the sending data storage unit, and query data in the sending storage unit When the transmission is required, the data to be sent is acquired and the data to be sent is sent to the external interface; the processor is configured to: store data that needs to be sent to the external interface into the sending storage unit; And querying the receiving storage unit, and acquiring data that needs to be received after querying that the receiving storage unit has data to be received.
2、 如权利要求 1所述系统, 其中: 所述接收存储单元包括与每一外部接口一一对应的接收存储子单元, 所 述发送存储单元包括与每一个外部接口一一对应的发送存储子单元; 所述外 部接口的数量为一个或者多个; 所述逻辑模块是设置为按如下方式将外部接口发送来的数据存储至所述 接收存储单元中: 将从各外部接口接收到的数据分别存储在各外部接口对应 的接收存储子单元中; 所述逻辑模块是设置为按如下方式查询所述发送存储 单元, 在查询到所述发送存储单元中有数据需要发送时, 获取需要发送的数 据并将所述需要发送的数据发送至所述外部接口: 分别查询各外部接口对应 的发送存储子单元, 在查询到某一外部接口对应的发送存储子单元中有数据 需要发送时, 获取所述需要发送的数据并将所述需要发送的数据发送至该外 部接口; 所述处理器是设置为按如下方式: 将需要发送至所述外部接口的数据存 储至所述发送存储单元中: 将需要发送至各外部接口的数据分别存储至各外 部接口对应的发送存储子单元中; 所述处理器是设置为按如下方式查询所述 接收存储单元, 在查询到所述接收存储单元中有数据需要接收, 则获取所述 需要接收的数据: 分别查询各外部接口对应的接收存储子单元, 在查询到某 一外部接口对应的接收存储子单元中有数据需要接收, 则获取所述需要接收 的数据。 2. The system according to claim 1, wherein: said receiving storage unit comprises a receiving storage subunit corresponding to each external interface, said transmitting storage unit comprising a transmitting storage unit corresponding to each external interface in one-to-one correspondence The number of the external interfaces is one or more; the logic module is configured to store data sent by the external interface into the receiving storage unit as follows: data received from each external interface respectively Storing in the receiving storage subunit corresponding to each external interface; the logic module is configured to query the sending storage unit in the following manner, and obtain data to be sent when there is data in the sending storage unit that needs to be sent. Sending the data to be sent to the external interface: respectively, querying a sending storage subunit corresponding to each external interface, and acquiring the data when the data is to be sent in the sending storage subunit corresponding to an external interface. Data to be sent and the data to be sent is sent to the external interface; The processor is configured to: store data that needs to be sent to the external interface to the sending storage unit: store data that needs to be sent to each external interface to a sending storage subunit corresponding to each external interface The processor is configured to query the query as follows Receiving a storage unit, if there is data in the receiving storage unit that needs to be received, acquiring the data that needs to be received: separately querying a receiving storage subunit corresponding to each external interface, and querying a receiving storage corresponding to an external interface If there is data in the subunit that needs to be received, the data to be received is acquired.
3、 如权利要求 2所述的系统, 其中: 所述接收存储子单元包括接收数据存储子单元和接收地址存储子单元; 所述发送存储子单元包括发送数据存储子单元和发送地址存储子单元; 所述逻辑模块是设置为按如下方式: 将从各外部接口接收到的数据分别 存储在该各外部接口对应的接收存储子单元中: 将各外部接口的数据分别存 储在各外部接口对应的接收数据存储子单元中, 以及将各外部接口的数据的 存储位置信息和数据长度信息分别存储在各外部接口对应的接收地址存储子 单元中; 3. The system of claim 2, wherein: the receiving storage subunit comprises a receiving data storage subunit and a receiving address storage subunit; the transmitting storage subunit comprising a transmitting data storage subunit and a sending address storage subunit The logic module is configured to: store data received from each external interface in a receiving storage subunit corresponding to each external interface: store data of each external interface in each external interface Receiving the data storage subunit, and storing the storage location information and the data length information of the data of each external interface in the receiving address storage subunit corresponding to each external interface;
所述逻辑模块是设置为按如下方式: 分别查询各外部接口对应的发送存 储子单元, 在查询到某一外部接口对应的发送存储子单元中有数据需要发送 时, 获取所述需要发送的数据并将所述需要发送的数据发送至该外部接口: 分别查询各外部接口对应的发送地址存储子单元, 如果查询到为某一外部接 口对应的发送地址存储子单元中包含存储位置信息和数据长度信息, 则根据 所述存储位置信息和数据长度信息从该外部接口对应的发送数据存储子单元 获取数据, 然后将获取到的数据发送至该外部接口, 以及将该外部接口对应 的发送地址存储子单元清空; 所述处理器是设置为按如下方式分别查询各外部接口对应的接收存储子 单元, 在查询到某一外部接口对应的接收存储子单元中有数据需要接收, 则 获取所述需要接收的数据: 分别查询该各外部接口对应的接收地址存储子单 元, 如果查询到某一外部接口对应的接收地址存储子单元中包括存储位置信 息和数据长度信息, 则根据所述存储位置信息和数据长度信息从该外部接口 对应的接收数据存储子单元中读取数据, 以及将该外部接口对应的接收地址 存储子单元清空; 所述处理器是设置为按如下方式将需要发送至各外部接口的数据分别存 储至各外部接口对应的发送存储子单元中: 将需要发送至各外部接口的数据 分别存储至该各外部接口对应的发送数据存储子单元中, 以及将需要发送至 该各外部接口的数据的存储位置信息和数据长度信息分别写入该各外部接口 对应的发送地址存储子单元中。 The logic module is configured to: query the sending storage subunit corresponding to each external interface separately, and obtain the data to be sent when the data to be sent is sent in the sending storage subunit corresponding to an external interface. And sending the data to be sent to the external interface: respectively querying a sending address storage subunit corresponding to each external interface, and if the query is to send a storage address corresponding to an external interface, the storage sub-unit includes storage location information and a data length And acquiring information from the transmission data storage subunit corresponding to the external interface according to the storage location information and the data length information, and then sending the acquired data to the external interface, and sending a storage address corresponding to the external interface. The unit is emptied; the processor is configured to separately query the receiving storage subunits corresponding to the external interfaces according to the following manner, and if the data is to be received in the receiving storage subunit corresponding to an external interface, the required receiving is obtained. Data: query each external interface pair separately a receiving address storage subunit, if the storage location information and the data length information included in the receiving address storage subunit corresponding to a certain external interface are queried, the receiving data corresponding to the external interface according to the storage location information and the data length information Reading data in the storage subunit, and clearing the receiving address storage subunit corresponding to the external interface; the processor is configured to separately store data to be sent to each external interface as follows Storing in the transmission storage subunit corresponding to each external interface: storing data that needs to be sent to each external interface to the transmission data storage subunit corresponding to each external interface, and data to be sent to the external interfaces The storage location information and the data length information are respectively written in the transmission address storage subunits corresponding to the respective external interfaces.
4、 如权利要求 3所述的系统, 其中: 所述处理器至少包括一高速外设组件互连(PCIE )接口, 所述处理器经 所述 PCIE接口与所述逻辑模块相连; 所述逻辑模块是设置为按如下方式将各外部接口的数据分别存储在该各 外部接口对应的接收数据存储子单元中, 以及将各外部接口的数据的存储位 置信息和数据长度信息分别存储在各外部接口对应的接收地址存储子单元 中: 向所述处理器发送直接存储器存取(DMA )写请求和所述各外部接口的 数据, 通过 DMA写请求控制所述处理器将所述各外部接口的数据分别写入 所述各外部接口对应的接收数据存储子单元中, 以及将所述各外部接口的数 据长度信息和存储位置信息写入该各外部接口对应的接收地址存储子单元 中; 所述逻辑模块是设置为按如下方式分别查询各外部接口对应的发送地址 存储子单元: 向所述处理器发送 DMA读写请求, 先通过 DMA读请求控制 所述处理器查询所述各外部接口对应的发送地址存储子单元; 以及所述逻辑 模块是设置为按如下方式将该外部接口对应的发送地址存储子单元清空: 通 过 DMA 写请求控制所述处理器清空该外部接口对应的接收地址存储子单 元。 4. The system of claim 3, wherein: said processor comprises at least a high speed peripheral component interconnect (PCIE) interface, said processor being coupled to said logic module via said PCIE interface; said logic The module is configured to store data of each external interface in a receiving data storage subunit corresponding to each external interface, and store storage location information and data length information of each external interface in each external interface, respectively. Corresponding receiving address storage subunit: sending a direct memory access (DMA) write request and data of each external interface to the processor, and controlling, by the DMA write request, the data of the external interface by the processor Writing the data length sub-units corresponding to the external interfaces, and writing the data length information and the storage location information of the external interfaces into the receiving address storage sub-units corresponding to the external interfaces; The module is configured to separately query the sending address storage subunits corresponding to the external interfaces as follows: Transmitting, by the processor, a DMA read/write request, first controlling, by the DMA read request, the processor to query a sending address storage subunit corresponding to each external interface; and the logic module is configured to correspond to the external interface as follows The transmit address storage subunit is emptied: the DMA write request is used to control the processor to clear the receive address storage subunit corresponding to the external interface.
5、 如权利要求 4所述的系统, 其中: 所述逻辑模块包括依次相连的接口处理模块、 DMA模块、 PCIE收发处 理模块以及 PCIE IP核, 所述接口处理模块还与所述 PCIE收发处理模块经 PCIE地址数据总线相连, 其中: 所述接口处理模块设置为: 与一个或者多个外部接口相连接, 在接收到 各外部接口的数据后, 产生并发送控制所述处理器将该各外部接口的数据分 别写入该各外部接口对应的接收数据存储子单元中的 DMA 写请求至所述 DMA模块; 产生并发送控制所述处理器查询各外部接口对应的发送地址存 储子单元的 DMA读请求至所述 DMA模块;在从所述 PCIE地址数据总线接 收到用以指示某一外部接口的发送地址存储子单元中有存储位置信息和数据 长度信息的应答时, 产生并发送控制所述处理器根据所述存储位置信息和数 据长度信息从该外部接口对应的发送数据存储子单元中读取数据的 DMA读 请求; 以及在从所述 PCIE地址数据总线接收到需要发送至某一外部接口的 数据后, 将该数据发送至对应的外部接口, 产生并发送控制所述处理器将该 外部接口对应的发送地址存储子单元清空的 DMA写请求; 所述 DMA模块包括 DMA请求队列单元和 DMA命令产生单元, 其中: 所述 DMA请求队列单元设置为: 对接收到的 DMA读写请求进行排序; 所 述 DMA命令产生单元设置为:按照所述 DMA请求队列单元中的 DMA读写 请求的排序顺序生成对应的 DMA读写命令, 并将所述 DMA命令发送至所 述 PCIE收发处理器; 所述 PCIE收发处理器设置为:将所述 DMA模块发送来的 DMA读写命 令发送至所述 PCIE IP核; 将所述 PCIE IP核发送来的控制所述处理器查询 各外部接口对应的发送地址存储子单元的 DMA读请求对应的应答经所述 PCIE地址数据总线发送至所述接口处理模块;在接收到控制所述处理器将该 各外部接口的数据分别写入该各外部接口对应的接收数据存储子单元中的 DMA写命令后,经所述 PCIE地址数据总线获取所述接口处理模块接收到的 该外部接口数据并将其发送至所述 PCIE IP核; 以及在接收到所述 PCIE IP 核发送来的需要发送至某一外部接口的数据后, 将其经所述 PCIE地址数据 总线发送至所述接口处理模块; 所述 PCIE IP核集成有物理层, 数据链路层, 事务层的功能, 所述 PCIE IP核设置为: 在接收到所述 PCIE收发处理器发送来的 DMA读写请求后, 将其发送至所述处理器; 在接收到所述处理器发送来的查询各外部接口对应 的发送地址存储子单元的 DMA读请求对应的应答发送至所述 PCIE收发处理 器; 在接收到所述 PCIE收发处理器发送来的某一外部接口的数据后, 将发 送至所述处理器; 以及在接收到所述处理器发送来的需要发送至某一外部接 口的数据后, 将其发送至所述 PCIE收发处理器。 5. The system of claim 4, wherein: the logic module comprises an interface processing module, a DMA module, a PCIE transceiver processing module, and a PCIE IP core, which are sequentially connected, the interface processing module and the PCIE transceiver processing module. Connected via a PCIE address data bus, wherein: the interface processing module is configured to: connect to one or more external interfaces, and after receiving data of each external interface, generate and send control to the processor to the external interfaces Data score Writing a DMA write request in the receive data storage sub-unit corresponding to each external interface to the DMA module; generating and transmitting a DMA read request to control the processor to query the transmit address storage sub-unit corresponding to each external interface a DMA module; when receiving a response from the PCIE address data bus to indicate storage location information and data length information in a transmission address storage subunit of an external interface, generating and transmitting control of the processor according to the Determining, by the storage location information and the data length information, a DMA read request for reading data from a transmit data storage subunit corresponding to the external interface; and after receiving data to be sent to an external interface from the PCIE address data bus, Sending the data to the corresponding external interface, generating and transmitting a DMA write request for controlling the processor to clear the sending address storage subunit corresponding to the external interface; the DMA module includes a DMA request queue unit and a DMA command generating unit, Wherein: the DMA request queue unit is set to: sort the received DMA read and write requests; The DMA command generating unit is configured to: generate a corresponding DMA read/write command according to a sort order of the DMA read/write request in the DMA request queue unit, and send the DMA command to the PCIE transceiver processor; the PCIE The transceiver processor is configured to: send a DMA read/write command sent by the DMA module to the PCIE IP core; and send the PCIE IP core to control the processor to query a sending address storage device corresponding to each external interface. Sending a response corresponding to the DMA read request of the unit to the interface processing module via the PCIE address data bus; and receiving, by the processor, the data of each external interface is respectively written into the received data storage corresponding to each external interface After the DMA write command in the subunit, acquiring the external interface data received by the interface processing module via the PCIE address data bus and transmitting the same to the PCIE IP core; and receiving the PCIE IP core transmission After the data needs to be sent to an external interface, it is sent to the interface processing module via the PCIE address data bus; the PCIE IP core is integrated with the object The function of the layer, the data link layer, and the transaction layer, the PCIE IP core is configured to: after receiving the DMA read/write request sent by the PCIE transceiver processor, send the DMA read/write request to the processor; Sending, by the processor, a response corresponding to the DMA read request of the sending address storage subunit corresponding to each external interface to the PCIE transceiver processor; receiving an external interface sent by the PCIE transceiver processor After the data is sent to the processor; and after receiving the need to send the processor to send to an external connection After the data of the port, it is sent to the PCIE transceiver processor.
6、 如权利要求 3-5中任何一项所述的系统, 其中: 所述逻辑模块是设置为: 在接收到某一外部接口的数据后, 先查询该外 部接口对应的接收地址存储子单元, 如果该外部接口对应的接收地址存储子 单元为空, 才将该外部接口的数据存储至该外部接口对应的接收数据存储子 单元中; 6. The system according to any one of claims 3-5, wherein: the logic module is configured to: after receiving data of an external interface, first query a receiving address storage subunit corresponding to the external interface If the receiving address corresponding to the external interface is empty, the data of the external interface is stored in the receiving data storage subunit corresponding to the external interface;
所述处理器是设置为: 在需要发送数据至某一外部接口时, 先查询该外 部接口对应的发送地址存储子单元, 如果该外部接口对应的发送地址存储子 单元为空, 才将需要发送至该外部接口的数据存储至该外部接口对应的发送 数据存储子单元中。  The processor is configured to: when the data needs to be sent to an external interface, first query the sending address storage sub-unit corresponding to the external interface, and if the sending address storage sub-unit corresponding to the external interface is empty, the processor needs to send The data to the external interface is stored in the transmit data storage subunit corresponding to the external interface.
7、一种应用权利要求 1所述的系统进行数据透明传输的方法,该方法包 括: 7. A method of applying the system of claim 1 for data transparent transmission, the method comprising:
逻辑模块与外部接口相连, 接收所述外部接口发送来的数据, 并将外部 接口发送来的数据存储至接收存储单元中; 处理器查询所述接收存储单元, 在查询到所述接收存储单元中有数据需要接收,则获取所述需要接收的数据; 以及 所述处理器将需要发送至所述外部接口的数据存储至发送存储单元中; 所述逻辑模块查询所述发送存储单元, 在查询到所述发送存储单元中有数据 需要发送时, 获取需要发送的数据并将所述需要发送的数据发送至所述外部 接口。  The logic module is connected to the external interface, receives the data sent by the external interface, and stores the data sent by the external interface into the receiving storage unit; the processor queries the receiving storage unit, and queries the receiving storage unit And acquiring, by the processor, the data that needs to be received; and the processor storing the data that needs to be sent to the external interface into the sending storage unit; the logic module querying the sending storage unit, in the query When there is data in the sending storage unit that needs to be sent, the data that needs to be sent is acquired and the data that needs to be sent is sent to the external interface.
8、 如权利要求 7所述的方法, 其中: 所述接收存储单元包括与每一外部接口一一对应的接收存储子单元, 所 述发送存储单元包括与每一个外部接口一一对应的发送存储子单元; 所述外 部接口的数量为一个或者多个; 逻辑模块将外部接口发送来的数据存储至接收存储单元中的步骤包括: 将从各外部接口接收到的数据分别存储在所述各外部接口对应的接收存储子 单元中; 所述逻辑模块查询所述发送存储单元, 在查询到所述发送存储单元 中有数据需要发送时, 获取需要发送的数据并将所述需要发送的数据发送至 所述外部接口的步骤包括: 分别查询各外部接口对应的发送存储子单元, 在 查询到某一外部接口对应的发送存储子单元中有数据需要发送时, 获取所述 需要发送的数据并将所述需要发送的数据发送至该外部接口; 所述处理器将需要发送至所述外部接口的数据存储至所述发送存储单元 中的步骤包括: 将需要发送至各外部接口的数据分别存储至各外部接口对应 的发送存储子单元中; 所述处理器查询所述接收存储单元, 在查询到所述接 收存储单元中有数据需要接收, 则获取所述需要接收的数据的步骤包括: 分 别查询各外部接口对应的接收存储子单元, 在查询到某一外部接口对应的接 收存储子单元中有数据需要接收, 则获取所述需要接收的数据。 8. The method according to claim 7, wherein: the receiving storage unit comprises a receiving storage subunit corresponding to each external interface, the transmitting storage unit comprising a one-to-one corresponding sending storage corresponding to each external interface. a subunit; the number of the external interfaces is one or more; the logic module storing the data sent by the external interface into the receiving storage unit comprises: storing data received from each external interface separately in the external unit Receiver corresponding to the interface In the unit, the logic module queries the sending storage unit, and when the data to be sent in the sending storage unit is queried, the step of acquiring data to be sent and sending the data to be sent to the external interface is performed. The method includes: querying, respectively, a sending storage sub-unit corresponding to each external interface, and when data is sent to be sent in a sending storage sub-unit corresponding to an external interface, acquiring the data to be sent and sending the data to be sent Up to the external interface; the step of the processor storing data that needs to be sent to the external interface to the sending storage unit comprises: storing data that needs to be sent to each external interface to a sending storage corresponding to each external interface In the subunit, the processor queries the receiving storage unit, and if there is data in the receiving storage unit that needs to be received, the step of acquiring the data to be received includes: separately querying the receiving storage corresponding to each external interface Subunit, in the receiving storage subunit corresponding to an external interface There are data to receive, then the acquired data needs to receive.
9、 如权利要求 8所述的方法, 其中: 所述接收存储子单元包括接收数据存储子单元和接收地址存储子单元; 所述发送存储子单元包括发送数据存储子单元和发送地址存储子单元; 所述逻辑模块将从各外部接口接收到的数据分别存储在所述各外部接口 对应的接收存储子单元中的步骤包括: 将所述各外部接口的数据分别存储在 所述各外部接口对应的接收数据存储子单元中, 以及将所述各外部接口的数 据的存储位置信息和数据长度信息分别存储在该各外部接口对应的接收地址 存储子单元中; 所述逻辑模块分别查询各外部接口对应的发送存储子单元, 在查询到某 一外部接口对应的发送存储子单元中有数据需要发送时, 获取所述需要发送 的数据并将所述需要发送的数据发送至该外部接口的步骤包括: 分别查询所 述各外部接口对应的发送地址存储子单元, 如果查询到为某一外部接口对应 的发送地址存储子单元中包含存储位置信息和数据长度信息, 则根据所述存 储位置信息和数据长度信息从该外部接口对应的发送数据存储子单元获取数 据, 然后将获取到的数据发送至该外部接口, 以及将该外部接口对应的发送 地址存储子单元清空; 所述处理器分别查询各外部接口对应的接收存储子单元, 在查询到某一 外部接口对应的接收存储子单元中有数据需要接收, 则获取所述需要接收的 数据的步骤包括: 分别查询所述各外部接口对应的接收地址存储子单元, 如 果查询到某一外部接口对应的接收地址存储子单元中包括存储位置信息和数 据长度信息, 则根据所述存储位置信息和数据长度信息从该外部接口对应的 接收数据存储子单元中读取数据, 以及将该外部接口对应的接收地址存储子 单元清空; 所述处理器将需要发送至各外部接口的数据分别存储至各外部接口对应 的发送存储子单元中的步骤包括: 将需要发送至各外部接口的数据分别存储 至所述各外部接口对应的发送数据存储子单元中, 以及将需要发送至该各外 部接口的数据的存储位置信息和数据长度信息分别写入该各外部接口对应的 发送地址存储子单元中。 9. The method of claim 8, wherein: the receiving storage subunit comprises a receiving data storage subunit and a receiving address storage subunit; the transmitting storage subunit comprising a transmitting data storage subunit and a sending address storage subunit The step of storing, by the logic module, the data received from the external interfaces in the receiving storage subunits corresponding to the external interfaces, respectively: storing the data of the external interfaces in the external interfaces respectively. And the storage location information and the data length information of the data of each external interface are respectively stored in the receiving address storage subunit corresponding to each external interface; the logic module separately queries each external interface And corresponding to the sending storage subunit, when the data is sent to the sending storage subunit corresponding to the certain external interface, the step of acquiring the data to be sent and sending the data to be sent to the external interface includes: : separately querying the sending address storage subunit corresponding to each external interface If the storage location information and the data length information included in the sending address storage sub-unit corresponding to an external interface are queried, the data is obtained from the sending data storage sub-unit corresponding to the external interface according to the storage location information and the data length information. And then sending the obtained data to the external interface, and clearing the sending address storage subunit corresponding to the external interface; the processor separately querying the receiving storage subunit corresponding to each external interface, and querying a certain The step of obtaining the data to be received by the receiving storage sub-unit corresponding to the external interface includes: separately querying the receiving address storage sub-unit corresponding to each external interface, if the corresponding external interface is queried The storage address storage subunit includes storage location information and data length information, and then reads data from the received data storage subunit corresponding to the external interface according to the storage location information and the data length information, and receives the corresponding external interface. The address storage subunit is emptied; the processor storing the data that needs to be sent to each external interface to the transmission storage subunit corresponding to each external interface, respectively, includes: storing data that needs to be sent to each external interface to the The storage data storage subunit corresponding to each external interface, and the storage location information and the data length information of the data to be transmitted to the external interfaces are respectively written in the transmission address storage subunits corresponding to the respective external interfaces.
10、 如权利要求 9所述的方法, 其中, 该系统中所述处理器至少包括一 高速外设组件互连 ( PCIE )接口, 所述处理器经所述 PCIE接口与所述逻辑 模块相连, 其中: 所述逻辑模块将所述各外部接口的数据分别存储在所述各外部接口对应 的接收数据存储子单元中, 以及将所述各外部接口的数据的存储位置信息和 数据长度信息分别存储在该各外部接口对应的接收地址存储子单元中的步骤 包括: 向所述处理器发送直接存储器存取(DMA )写请求和该各外部接口的 数据, 通过 DMA写请求控制所述处理器将该各外部接口的数据分别写入该 各外部接口对应的接收数据存储子单元中, 以及将该各外部接口的数据长度 信息和存储位置信息写入该各外部接口对应的接收地址存储子单元中; 所述逻辑模块分别查询该各外部接口对应的发送地址存储子单元的步骤 包括: 向所述处理器发送 DMA读写请求, 先通过 DMA读请求控制所述处 理器查询该各外部接口对应的发送地址存储子单元; 所述逻辑模块将该外部 接口对应的发送地址存储子单元清空的步骤包括: 通过 DMA写请求控制所 述处理器清空该外部接口对应的接收地址存储子单元。 10. The method of claim 9, wherein the processor in the system comprises at least a high speed peripheral component interconnect (PCIE) interface, the processor being connected to the logic module via the PCIE interface, The logic module stores the data of each external interface in a receiving data storage subunit corresponding to each external interface, and stores storage location information and data length information of the data of each external interface separately. The step of receiving the sub-units corresponding to the external interfaces includes: transmitting a direct memory access (DMA) write request to the processor and data of the external interfaces, and controlling the processor by using a DMA write request The data of each external interface is respectively written into the receiving data storage subunit corresponding to each external interface, and the data length information and the storage location information of each external interface are written into the receiving address storage subunit corresponding to each external interface. The step of the logic module separately querying the sending address storage subunits corresponding to the external interfaces includes: Sending a DMA read/write request to the processor, first controlling, by the DMA read request, the processor to query a sending address storage subunit corresponding to each external interface; the logic module clearing the sending address storage subunit corresponding to the external interface The steps include: controlling, by the DMA write request, the processor to clear the receiving address storage subunit corresponding to the external interface.
11、如权利要求 10所述的方法, 其中, 所述逻辑模块包括依次相连的接 口处理模块、 DMA模块、 PCIE收发处理器以及 PCIE IP核, 所述接口处理 模块还与所述 PCIE收发处理器经 PCIE地址数据总线相连, 所述 DMA模块 包括 DMA请求队列单元和 DMA命令产生单元, 该方法还包括: 所述接口处理模块接收一个或者多个外部接口发送来的数据, 在接收到 某一外部接口的数据后, 产生并发送控制所述处理器将该各外部接口的数据 分别写入该各外部接口对应的接收数据存储子单元中的 DMA写请求至所述 DMA请求队列单元; 所述 DMA请求队列单元接收到该 DMA写请求后将其 加入 DMA请求队列,在该 DMA写请求出队时将其发送至所述 DMA命令产 生单元, 由所述 DMA命令产生单元产生相应的 DMA写命令后发送至所述 PCIE收发处理器; 所述 PCIE收发处理器在接收到控制所述处理器将该各外 部接口的数据分别写入该各外部接口对应的接收数据存储子单元中的 DMA 写命令后, 经所述 PCIE地址数据总线获取所述接口处理模块接收到的该外 部接口的数据, 将获取到的数据以及所述 DMA写命令经所述 PCIE IP核和 所述处理器的 PCIE接口发送至所述处理器;所述处理器执行该 DMA写命令, 将该外部接口的数据写入该外部接口对应的接收数据存储子单元中, 并将该 外部接口的数据的存储位置信息和数据长度信息写入该外部接口对应的接收 地址存储子单元中; 所述接口处理模块产生并发送控制所述处理器查询各外部接口对应的发 送地址存储子单元的 DMA读请求至所述 DMA请求队列单元; 所述 DMA 请求队列单元接收到该 DMA读请求后将其加入 DMA请求队列,在该 DMA 读请求出队时将其发送至所述 DMA命令产生单元, 由所述 DMA命令产生 发处理器在接收到制所述处理器查询各外部接口对应的发送地址存储子单元 的 DMA读命令后,将该 DMA读命令经所述 PCIE IP核和所述处理器的 PCIE 接口发送至所述处理器; 所述处理器执行该 DMA读命令, 查询所述存储器 中各外部接口对应的发送地址存储子单元, 经所述 PCIE IP核和所述 PCIE 收发处理器和所述 PCIE地址数据总线向所述接口处理模块返回所述 DMA 读请求对应的应答; 所述接口处理模块在接收到指示某一外部接口对应的发 送地址存储子单元中有存储位置信息和数据长度信息的应答后, 产生并发送 控制所述处理器根据该存储位置信息和数据长度信息从该外部接口对应的发 送数据存储子单元中获取数据的 DMA读请求至所述 DMA请求队列单元; 所述 DMA请求队列单元接收到该 DMA读请求后将其加入 DMA请求队列, 在该 DMA读请求出队时将其发送至所述 DMA命令产生单元, 由所述 DMA The method according to claim 10, wherein the logic module comprises a connection connected in sequence a port processing module, a DMA module, a PCIE transceiver processor, and a PCIE IP core, the interface processing module is further connected to the PCIE transceiver processor via a PCIE address data bus, and the DMA module includes a DMA request queue unit and a DMA command generation unit The method further includes: the interface processing module receiving data sent by one or more external interfaces, and after receiving data of an external interface, generating and transmitting, respectively, controlling, by the processor, data of each external interface Writing a DMA write request in the receive data storage sub-unit corresponding to each external interface to the DMA request queue unit; the DMA request queue unit adds the DMA write request to the DMA request queue, and writes the DMA request queue in the DMA request queue Sending a request to the DMA command generating unit, sending a corresponding DMA write command to the PCIE transceiver processor after the DMA command generating unit sends the team; the PCIE transceiver processor receiving the control After the processor writes the data of each external interface to the DMA write command in the receiving data storage subunit corresponding to each external interface, Obtaining, by the PCIE address data bus, the data of the external interface received by the interface processing module, and sending the acquired data and the DMA write command to the PCIE IP core and the PCIE interface of the processor to the The processor executes the DMA write command, writes the data of the external interface into the receiving data storage subunit corresponding to the external interface, and writes the storage location information and the data length information of the data of the external interface. Entering a receiving address storage sub-unit corresponding to the external interface; the interface processing module generates and sends a DMA read request for controlling the processor to query a sending address storage sub-unit corresponding to each external interface to the DMA request queue unit; After receiving the DMA read request, the DMA request queue unit adds it to the DMA request queue, and sends the DMA read request to the DMA command generating unit when the DMA read request is dequeued, and the DMA command generating processor receives the DMA command. After the processor queries the DMA read command of the sending address storage subunit corresponding to each external interface, the DMA read command is passed through the PCIE IP core and The PCIE interface of the processor is sent to the processor; the processor executes the DMA read command, and queries a sending address storage subunit corresponding to each external interface in the memory, and the PCIE IP core and the PCIE Transceiver processor and said PCIE address data bus returning a response corresponding to said DMA read request to said interface processing module; said interface processing module receiving a signal indicating that an external interface corresponds After the address storage subunit has a response to store the location information and the data length information, generate and send the control to acquire data from the transmit data storage subunit corresponding to the external interface according to the storage location information and the data length information. a DMA read request to the DMA request queue unit; the DMA request queue unit adds the DMA read request to the DMA request queue, and sends the DMA read request to the DMA command generating unit when the DMA read request is dequeued By the DMA
PCIE 收发处理器在控制所述处理器根据该存储位置信息和数据长度信息从 该外部接口对应的发送数据存储子单元中获取数据的 DMA读命令后, 将该 DMA读命令经 PCIE IP核和所述处理器的 PCIE接口发送至所述处理器, 所 述处理器执行该 DMA读命令, 根据该存储位置信息和数据长度信息从该外 部接口对应的发送数据存储子单元中读取数据, 并将读取到的数据经所述处 理器的 PCIE接口、 PCIE IP核、 所述 PCIE收发处理器以及所述 PCIE地址 数据总线发送至所述接口处理模块; 所述接口处理模块在接收到需要发送至 某一外部接口的数据后, 将其发送至对应的外部接口。 The PCIE transceiver processor controls the DMA read command of the data from the transmit data storage sub-unit corresponding to the external interface according to the storage location information and the data length information, and passes the DMA read command to the PCIE IP core and the Sending, to the processor, a PCIE interface of the processor, the processor executing the DMA read command, and reading data from the sending data storage subunit corresponding to the external interface according to the storage location information and the data length information, and The read data is sent to the interface processing module via the PCIE interface of the processor, the PCIE IP core, the PCIE transceiver processor, and the PCIE address data bus; the interface processing module needs to send to the receiving After the data of an external interface is sent to the corresponding external interface.
12、 如权利要求 9-11中任一项所述的方法, 其中: 所述逻辑模块将所述各外部接口的数据分别存储在所述各外部接口对应 的接收数据存储子单元中的步骤中, 所述逻辑模块是在接收到某一外部接口 的数据后, 先查询该外部接口对应的接收地址存储子单元, 如果该外部接口 对应的接收地址存储子单元为空, 才将该外部接口的数据存储至该外部接口 对应的接收数据存储子单元中; 所述处理器将需要发送至各外部接口的数据分别存储至所述各外部接口 对应的发送数据存储子单元中的步骤中, 所述处理器在需要发送数据至某一 外部接口时, 先查询该外部接口对应的发送地址存储子单元, 如果该外部接 口对应的发送地址存储子单元为空, 才将需要发送至该外部接口的数据存储 至该外部接口对应的发送数据存储子单元中。 The method according to any one of claims 9-11, wherein: the logic module stores the data of each external interface in a step of respectively receiving the data storage sub-unit corresponding to each external interface. After receiving the data of an external interface, the logic module first queries the receiving address storage subunit corresponding to the external interface, and if the receiving address corresponding to the external interface is empty, the external interface is The data is stored in the receiving data storage subunit corresponding to the external interface; the processor stores the data that needs to be sent to each external interface into the sending data storage subunit corresponding to each external interface, When the processor needs to send data to an external interface, the processor first queries the sending address storage sub-unit corresponding to the external interface, and if the sending address storage sub-unit corresponding to the external interface is empty, the data to be sent to the external interface is required. Stored in the transmit data storage subunit corresponding to the external interface.
PCT/CN2011/074495 2010-07-30 2011-05-23 Data transparent transmission method and system WO2012013080A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010245507.5 2010-07-30
CN201010245507.5A CN101901199B (en) 2010-07-30 2010-07-30 Method and system for data transparent transmission

Publications (1)

Publication Number Publication Date
WO2012013080A1 true WO2012013080A1 (en) 2012-02-02

Family

ID=43226744

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074495 WO2012013080A1 (en) 2010-07-30 2011-05-23 Data transparent transmission method and system

Country Status (2)

Country Link
CN (1) CN101901199B (en)
WO (1) WO2012013080A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328520A (en) * 2020-09-30 2021-02-05 郑州信大捷安信息技术股份有限公司 PCIE equipment, and data transmission method and system based on PCIE equipment

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101901199B (en) * 2010-07-30 2015-04-01 中兴通讯股份有限公司 Method and system for data transparent transmission
US9405718B2 (en) * 2013-02-28 2016-08-02 Intel Corporation Leveraging an enumeration and/or configuration mechanism of one interconnect protocol for a different interconnect protocol
CN104580009B (en) * 2015-01-28 2018-08-21 华为技术有限公司 Chip forwards the method and device of data
CN104765701B (en) * 2015-03-24 2018-05-29 华为技术有限公司 Data access method and equipment
CN109992543A (en) * 2019-04-02 2019-07-09 山东超越数控电子股份有限公司 A kind of PCI-E data efficient transmission method based on ZYZQ-7000

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5671443A (en) * 1995-02-21 1997-09-23 International Business Machines Corporation Direct memory access acceleration device for use in a data processing system
CN1851678A (en) * 2006-06-08 2006-10-25 杭州华为三康技术有限公司 Method for transmitting data between internal memory and digital signal processor
CN101901199A (en) * 2010-07-30 2010-12-01 中兴通讯股份有限公司 Method and system for data transparent transmission

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101222430B (en) * 2008-01-24 2011-01-19 中兴通讯股份有限公司 High-speed multi-protocol data transmission system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5671443A (en) * 1995-02-21 1997-09-23 International Business Machines Corporation Direct memory access acceleration device for use in a data processing system
CN1851678A (en) * 2006-06-08 2006-10-25 杭州华为三康技术有限公司 Method for transmitting data between internal memory and digital signal processor
CN101901199A (en) * 2010-07-30 2010-12-01 中兴通讯股份有限公司 Method and system for data transparent transmission

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328520A (en) * 2020-09-30 2021-02-05 郑州信大捷安信息技术股份有限公司 PCIE equipment, and data transmission method and system based on PCIE equipment
CN112328520B (en) * 2020-09-30 2022-02-11 郑州信大捷安信息技术股份有限公司 PCIE equipment, and data transmission method and system based on PCIE equipment

Also Published As

Publication number Publication date
CN101901199B (en) 2015-04-01
CN101901199A (en) 2010-12-01

Similar Documents

Publication Publication Date Title
US9430432B2 (en) Optimized multi-root input output virtualization aware switch
JP5917474B2 (en) System and routing method using integrated multi-transfer media connector
CN102023953B (en) Control method of system having many inter-integrated circuit (I2C) buses
AU2007278728B2 (en) Method and apparatus for distributing usb hub functions across a network
CN102023954B (en) Device with multiple I2C buses, processor, system main board and industrial controlled computer
WO2012013080A1 (en) Data transparent transmission method and system
US20190058675A1 (en) Heterogeneous Packet-Based Transport
KR101699784B1 (en) Bus system and operating method thereof
CN106959935B (en) Method compatible with I2C communication and IPMB communication
TW201217983A (en) Register access in distributed virtual bridge environment
TW201508489A (en) PCIE tunneling through SAS
KR20130071782A (en) Bus bridge apparatus
US20050174877A1 (en) Bus arrangement and method thereof
TW201926062A (en) Staggered transmissions on a multi-drop half-duplex bus
CN107643993B (en) Bus conversion interface, working method of bus conversion interface and communication equipment
US7564860B2 (en) Apparatus and method for workflow-based routing in a distributed architecture router
CN102207920B (en) Conversion bridge for conversion from BVCI (basic virtual component interface) bus to AHB (advanced high performance bus)
JP2003256351A (en) Usb hub
US20080313365A1 (en) Controlling write transactions between initiators and recipients via interconnect logic
CN110971621B (en) Embedded multi-CPU interconnection circuit based on SDIO interface, interconnection method and driving method
US20230388251A1 (en) Tightly-Coupled, Loosely Connected Heterogeneous Packet Based Transport
CN117222994A (en) I2C bus architecture using shared clock and dedicated data lines
US8913527B2 (en) Multiple die communication system
CN109600457B (en) PHY-MAC interface control device and method with one mapping at most
JP2000224208A (en) Packet transfer controller and packet transfer method

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: 11811782

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: 11811782

Country of ref document: EP

Kind code of ref document: A1