WO2021147045A1 - 一种基于PCIe的数据传输方法及装置 - Google Patents

一种基于PCIe的数据传输方法及装置 Download PDF

Info

Publication number
WO2021147045A1
WO2021147045A1 PCT/CN2020/073920 CN2020073920W WO2021147045A1 WO 2021147045 A1 WO2021147045 A1 WO 2021147045A1 CN 2020073920 W CN2020073920 W CN 2020073920W WO 2021147045 A1 WO2021147045 A1 WO 2021147045A1
Authority
WO
WIPO (PCT)
Prior art keywords
tlp
field
type
data
node
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2020/073920
Other languages
English (en)
French (fr)
Inventor
万蕾
鲍鹏鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to PCT/CN2020/073920 priority Critical patent/WO2021147045A1/zh
Priority to EP20915619.9A priority patent/EP4084423A4/en
Priority to CN202080002611.3A priority patent/CN113498595B/zh
Publication of WO2021147045A1 publication Critical patent/WO2021147045A1/zh
Priority to US17/870,406 priority patent/US20220368564A1/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4295Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using an embedded synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • H04L45/306Route determination based on the nature of the carried application
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0026PCI express

Definitions

  • This application relates to the field of communication technology, and in particular to a data transmission method and device based on peripheral component interconnect express (PCIe).
  • PCIe peripheral component interconnect express
  • PCIe is a high-speed short-distance communication interface that can quickly read and write memory, supports large-bandwidth communications, and is widely used in computers, test instruments and other equipment.
  • the main components of the PCIe system include a root complex (Root), a switch and an endpoint.
  • Root is used to manage all buses and all nodes in the PCIe system. It is the communication bridge between nodes in the PCIe system.
  • the nodes are end nodes or switching nodes; a switching node can connect to the root complex, other switching nodes, and
  • the end node is a data forwarding node in the PCIe system; the end node is an end device, such as a peripheral device, which is used to receive data or send data.
  • Root and nodes themselves have the right to read the configuration space of the node, and the configuration space is used to store the function of the node (such as what data type the node supports, etc.), address, or identity
  • No other nodes in the PCIe system have the right to read information such as identity (ID).
  • ID identity
  • the embodiments of the present application provide a PCIe-based data transmission method and device, so that the communication between nodes in the PCIe system does not go through Root, thereby reducing the complexity of communication between nodes.
  • an embodiment of the present application provides a PCIe-based data transmission method, including: a first node encapsulates first data into a first transaction layer packet TLP, and the TLP header of the first TLP includes a first field, and the first field It is used to indicate the data type of the first data, and then the first node sends the first TLP to the second node.
  • the data type includes at least one of the following: image type, video type, control type, security type, and SWRITE type.
  • the first node may be an end node or a switching node
  • the second node may be an end node or a switching node
  • the first field of the TLP header is used to indicate the information required for data transmission, such as the data type.
  • the first node may be an end node or a switching node
  • the second node may be an end node
  • It can also be a switching node, so that the communication between the end nodes in the PCIe system, the communication between the switching nodes, and the communication between the end node and the switching node do not go through the root, which can reduce the various aspects of the PCIe system.
  • the complexity of communication between nodes is used to indicate the information required for data transmission, such as the data type.
  • the first field may also be used to indicate at least one parameter information corresponding to the data type.
  • the first field included in the TLP header is used to indicate at least one parameter information corresponding to the data type, so that the communication between nodes does not go through Root.
  • the first field is the Type field in the TLP header of the first TLP.
  • the Type field in the TLP header is used to indicate the information required for data transmission, so that there is no need to modify the TLP structure, so that the communication between nodes does not go through Root.
  • the value of the first field is a reserved value.
  • the value of the first field is a reserved value, so that the TLP can be compatible with the original data transmission method and the data transmission method provided in the embodiment of the present application, and there is no need to change the TLP structure.
  • the TLP header of the first TLP further includes a second field, and the second field may be used to indicate the identity information of the third node, and the third node is the destination device of the first TLP.
  • the second field of the TLP header is used to indicate the identity information of the target device, so that the intermediate node (for example, a switching node connected to the first node) can analyze the identity information of the target device according to the target device Determine the routing path based on the identity information of, and send the first data to the destination device based on the routing path, so that it does not go through Root.
  • the second field when the first field is only used to indicate the data type of the first data, the second field is also used to indicate at least one parameter information corresponding to the data type.
  • the second field when the first field is only used to indicate the data type, the second field may be used to indicate at least one parameter information corresponding to the data type, so that end nodes do not communicate through Root.
  • the second field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header of the first TLP.
  • the contents indicated by byte 4 to byte 15 or byte 4 to byte 11 of the TLP header are different according to the Type field.
  • the first field indicates the data type
  • the byte 4 to byte 15 or word can be used.
  • Section 4 to byte 11 indicate the identity information of the target device, or indicate the identity information of the target device and at least one parameter information corresponding to the data type.
  • an embodiment of the present application provides a PCIe data transmission method based on the interconnection of peripheral components, including: a second node receives a first transaction layer packet TLP from the first node, and the first TLP includes first data; , The second node sends a second TLP to the third node, the second TLP includes the first data; wherein, the TLP header of the TLP includes a first field, the first field is used to indicate the data type of the first data, and the TLP includes the first data A TLP, and/or a second TLP.
  • the data type includes at least one of the following: image type, video type, control type, security type, and SWRITE type.
  • the second TLP including the first data can be understood as the second TLP and the first TLP including the same data content.
  • the first node may be an end node or a switching node
  • the second node may be a switching node
  • the first field of the TLP header is used to indicate the information required for data transmission, such as the data type.
  • the first node may be an end node or a switching node
  • the second node may be an end node or It is a switching node.
  • the third node can be an end node or a switching node. This can realize communication between end nodes, between switching nodes, and between end nodes and switching nodes without Root, thereby reducing the PCIe system The complexity of communication between nodes.
  • the first field is also used to indicate at least one parameter information corresponding to the data type.
  • the first field of the TLP header can be used to indicate information required for data transmission, such as at least one parameter information corresponding to the data type, so that the communication between nodes does not go through Root.
  • the first field is the Type field in the TLP header.
  • the Type field in the TLP header is used to indicate the information required for data transmission, so that there is no need to change the TLP structure, and the communication between nodes can also be prevented from going through Root.
  • the value of the first field is a reserved value.
  • the value of the first field is a reserved value, so that the TLP can be compatible with the original data transmission method and the data transmission method provided in the embodiment of the present application, and there is no need to change the TLP structure.
  • the TLP header further includes a second field, and the second field is used to indicate the identity information of the third node.
  • the second field of the TLP header is used to indicate the identity information of the target device, so that the intermediate node (for example, a switching node connected to the first node) can analyze the identity information of the target device according to the target device Determine the routing path based on the identity information of, and send the first data to the destination device based on the routing path, so that it does not go through Root.
  • the second field when the first field is only used to indicate the data type of the first data, the second field is also used to indicate at least one parameter information corresponding to the data type.
  • the second field when the first field is only used to indicate the data type, the second field may be used to indicate at least one parameter information corresponding to the data type, so that end nodes do not communicate through Root.
  • the second field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header of the TLP packet.
  • the contents indicated by byte 4 to byte 15 or byte 4 to byte 11 of the TLP header are different depending on the Type field.
  • the byte 4 to word can be used Section 15 or byte 4 to byte 11 indicates the identity information of the target device, or indicates the identity information of the target device and at least one parameter information corresponding to the data type.
  • the second node sending the second TLP to the third node includes: the second node determines the routing path according to the identity information of the third node; the second node sends the second TLP to the third node according to the routing path The third node.
  • the switching node determines the routing path based on the identity information of the target device (that is, the third node), and then sends the first data to the third node based on the routing path. This eliminates the need to go through Root, thereby reducing the number of nodes in the PCIe system. The complexity of communication with nodes.
  • an embodiment of the present application provides a PCIe data transmission method based on the interconnection of peripheral components, including: a third node receives a second transaction layer packet TLP from a second node, the second TLP includes the first data, and the second TLP includes the first data.
  • the TLP header of the second TLP includes a first field, the first field is used to indicate the data type of the first data, and the first data is obtained based on the first field.
  • the data type includes at least one of the following: image type, video type, control type, security type, and SWRITE type.
  • the second node may be an end node or a switching node
  • the third node may be an end node or a switching node
  • the first field of the TLP header is used to indicate the information required for data transmission, such as the data type.
  • the third node can be an end node or a switching node, and the second node can be an end node or a switching node. In this way, it is possible to communicate between end nodes, between switching nodes, and between end nodes and switching nodes without Root, thereby reducing the complexity of communication between nodes in the PCIe system.
  • the first field is also used to indicate at least one parameter information corresponding to the data type.
  • the first field of the TLP header can be used to indicate information required for data transmission, such as at least one parameter information corresponding to the data type, so that the communication between nodes does not go through Root.
  • the first field is the Type field in the second TLP header.
  • the Type field in the TLP header is used to indicate the information required for data transmission, so that there is no need to change the TLP structure, and the communication between nodes can also be prevented from going through Root.
  • the value of the first field is a reserved value.
  • the value of the first field is a reserved value, so that the TLP can be compatible with the original data transmission method and the data transmission method provided in the embodiment of the present application, and there is no need to change the TLP structure.
  • the second TLP header further includes a second field, and the second field is used to indicate the identity information of the third node.
  • the second field may be used to indicate at least one parameter information corresponding to the data type, so that the nodes do not communicate through Root.
  • the second field when the first field is only used to indicate the data type of the first data, the second field is also used to indicate at least one parameter information corresponding to the data type.
  • the second field when the first field is only used to indicate the data type, the second field may be used to indicate at least one parameter information corresponding to the data type, so that the nodes do not communicate through Root.
  • the second field is byte 4 to byte 15 or byte 4 to byte 11 of the second TLP header.
  • the contents indicated by byte 4 to byte 15 or byte 4 to byte 11 of the TLP header are different depending on the Type field.
  • the byte 4 to word can be used Section 15 or byte 4 to byte 11 indicates the identity information of the target device, or indicates the identity information of the target device and at least one parameter information corresponding to the data type.
  • an embodiment of the present application provides a PCIe-based data transmission device.
  • the device may be a communication device, or a chip or chipset in the communication device.
  • the communication device may be a first node or a second node. Or any one of the third nodes, that is, the communication device can be an end node or a switching node.
  • the device may include a processing unit and a transceiving unit.
  • the processing unit may be a processor, and the transceiving unit may be a transceiver; the device may also include a storage module, and the storage module may be a memory; the storage module is used to store instructions, and the processing unit Execute the instructions stored in the storage module to make the first node execute the corresponding function in the first aspect, or the processing unit executes the instructions stored in the storage module to make the second node execute the corresponding function in the second aspect. Or, the processing unit executes the instructions stored in the storage module, so that the third node executes the corresponding function in the third aspect.
  • the processing unit can be a processor, and the transceiver unit can be an input/output interface, a pin or a circuit, etc.; the processing unit executes the instructions stored in the storage module to Make the first node execute the corresponding function in the first aspect, or the processing unit executes the instructions stored in the storage module, so that the second node executes the corresponding function in the second aspect, or the processing unit executes the storage module
  • the stored instructions enable the third node to perform the corresponding function in the above-mentioned third aspect.
  • the storage module may be a storage module (for example, register, cache, etc.) in the chip or chipset, or a storage module (for example, read-only memory, random access memory, etc.) located outside the chip or chipset in the network device. Fetch memory, etc.).
  • an embodiment of the present application provides a PCIe-based data transmission device, which includes a processor, and may also include a communication interface and/or a memory.
  • the communication interface is used to transmit information, and/or messages, and/or data between the device and other devices.
  • the memory is used to store computer-executable instructions.
  • the processor executes the computer-executable instructions stored in the memory, so that the device executes any design or second aspect of the first aspect or the first aspect described above. Or the data transmission method of any design in the second aspect, the third aspect or any one of the third aspects.
  • the embodiments of the present application also provide a computer-readable storage medium.
  • the computer-readable storage medium is used to store computer instructions.
  • the computer instructions run on the computer, the computer executes the first aspect or the first aspect described above.
  • the present application also provides a computer program product including instructions.
  • the computer program product is used to store computer instructions.
  • the computer instructions run on a computer, the computer executes the first aspect or any one of the first aspects. Possible design, any possible design of the second aspect or the second aspect, the third aspect or any possible design of the data transmission method of the third aspect.
  • the present application also provides a PCIe system, which includes a first node, a second node, and a third node.
  • the first node is an end node
  • the second node is a switching node
  • the third node is an end node.
  • the first node can perform the corresponding function in the above first aspect
  • the second node can perform the corresponding function in the above second aspect
  • the third node can perform the corresponding function in the above third aspect.
  • a chip provided by an embodiment of the present application.
  • the chip includes at least one processor and a communication interface.
  • the processor is coupled to the memory and is used to read a computer program stored in the memory to execute the first aspect or A data transmission method according to any design in the first aspect, any design in the second aspect or the second aspect, the third aspect or any design in the third aspect.
  • an embodiment of the present application provides a chip, including a communication interface and at least one processor, and the processor runs to execute any one of the possible designs, the second aspect, or the second aspect of the first aspect or the first aspect of the embodiments of the present application.
  • FIG. 1 is a schematic diagram of the architecture of a PCIe system provided by an embodiment of the application
  • FIG. 2 is a schematic diagram of the architecture of another PCIe system provided by an embodiment of the application.
  • FIG. 3 is a schematic structural diagram of a TLP provided by an embodiment of the application.
  • FIG. 4 is a schematic structural diagram of a TLP header provided by an embodiment of the application.
  • FIG. 5 is a schematic flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 6 is a schematic structural diagram of a camera provided by an embodiment of the application.
  • FIG. 7 is a schematic diagram of an image service provided by an embodiment of the application.
  • FIG. 8 is a schematic diagram of another image service provided by an embodiment of this application.
  • FIG. 9 is a schematic diagram of another image service provided by an embodiment of this application.
  • FIG. 10 is a schematic diagram of another image service provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of the architecture of a PCIe system provided by an embodiment of the application.
  • FIG. 12 is a schematic flowchart of a data transmission method provided by an embodiment of this application.
  • FIG. 13 is a schematic structural diagram of a data transmission device provided by an embodiment of this application.
  • FIG. 14 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
  • 15 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
  • FIG. 16 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
  • FIG. 17 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
  • FIG. 18 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
  • a plurality of in the embodiments of the present application refers to two or more than two. In view of this, “a plurality of” may also be understood as “at least two” in the embodiments of the present application. "At least one" can be understood as one or more, for example, one, two or more. For example, including at least one refers to including one, two or more, and does not limit which ones are included. For example, including at least one of A, B, and C, then the included can be A, B, C, A and B, A and C, B and C, or A and B and C.
  • ordinal numbers such as “first” and “second” mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority, or importance of multiple objects.
  • FIG. 1 is a schematic structural diagram of a PCIe system provided by an embodiment of this application.
  • the PCIe system may include a root complex (shown as root complex 1 in Figure 1), at least one switching node (including switching node 1 and switching node 2 in Figure 1), and at least one end node (Figure 1). 1 includes end node 1, end node 2, and end node 3).
  • the root complex 1 is responsible for managing all the buses (shown in thick black lines in Figure 1), switching nodes and end nodes in the PCIe system 100. It is the communication bridge between the various nodes in the PCIe system 100 and is also the PCIe system 100. The communication bridge between each node in the CPU and the CPU.
  • the switching node as a bridge connecting one or more of the root complex, other switching nodes, and end nodes, is a node for data forwarding.
  • the switching node 1 connects the root complex 1, the switching node 2, the end node 1, and the end node. Node 2.
  • An end node is an end device, such as a peripheral device, which is responsible for sending data or receiving data.
  • the interface between the CPU 1 and the root complex 1 is not PCIe, and does not belong to the PCIe system 100.
  • the CPU 1 can establish a connection relationship with the entity where the PCIe system 100 is located (for example, computer equipment, vehicles, etc.), or it can be located in the same entity as the PCIe system 100, and is used to receive data sent by each node in the PCIe system 100. Process the received data, such as format conversion, image rendering, etc.
  • FIG. 2 is a schematic diagram of the structure of two PCIe systems.
  • One of the two PCIe systems is, for example, the PCIe system 100 shown in FIG. 1, and the other PCIe system is the PCIe system 200.
  • the PCIe system 200 may include a root complex 2, a switching node 3, and an end node 4. Each node in the PCIe system 200 needs to communicate with the CPU 2 through the root complex 2.
  • the interface between the CPU 2 and the root complex 2 is not PCIe, and does not belong to the PCIe system 200.
  • the CPU 2 can establish a connection relationship with the entity where the PCIe system 200 is located (such as computer equipment, vehicles, etc.), or it can be located in the same entity as the PCIe system 200, and is used to receive data sent by each node in the PCIe system 200. Process the received data, such as format conversion, image rendering, etc.
  • the addresses and/or IDs of the nodes in a PCIe system are independently allocated by the root complexes in the PCIe system , Means that the address and/or ID assigned by a root complex can only be unique within the PCIe system where the root complex is located.
  • the addresses and/or IDs of nodes may overlap. Therefore, there may be address and/or ID conflicts in different PCIe systems. For example, root complex 1 in PCIe system 100 allocates address 1 to end node 1.
  • NTB non-transparent bridge
  • nodes cannot communicate directly with each other and must pass through the root complex, because the nodes in a PCIe system are independently managed by their respective root complexes, and only the root complex and the node itself have the authority to read the node No other nodes have permission to read the configuration space.
  • the configuration space of a node is used to store information such as the function, address, or ID of the node, and the function of a node includes, for example, the data types supported by the node or the supported data formats.
  • a node does not know the data type or format supported by other nodes, so it does not pass between the end node and the end node, between the switching node and the switching node, and between the end node and the switching node in the PCIe system.
  • the root complex cannot communicate directly.
  • TLP transaction layer packet
  • FIG. 3 is a schematic structural diagram of a TLP provided in an embodiment of this application.
  • a TLP mainly consists of one or more optional TLP prefixes (TLP Prefixes), a TLP header (TLP Header), a data payload (Data Payload), and an optional TLP digest (TLP Digest) composition.
  • TLP Prefixes TLP Prefixes
  • TLP Header TLP header
  • Data Payload data payload
  • TLP Digest TLP digest
  • the length of the TLP prefix is H byte (byte), which is used to transfer messages between the two ends of PCIe or between the sending device and the receiving device.
  • H is an integer greater than or equal to 0;
  • the length can be 12 bytes or 16 bytes, used to indicate the PCIe service type, address and other information;
  • the length of the data payload can be 0 ⁇ 4K bytes, used to carry data;
  • the length of the TLP summary can be 4 words Section, whether a TLP needs a TLP digest is determined by the TLP digest indication (indicates presence of TLP Digest, TD) field in the TLP header. For example, if the receiving device supports end-to-end cyclic redundancy check code (end-to-end cyclic redundancy check code). redundancy check, ECRC), the TLP summary is used to place the ECRC.
  • FIG. 4 is a schematic diagram of a structure of a TLP header provided by an embodiment of this application.
  • the length of the TLP header is 16 bytes as an example.
  • the TLP header includes:
  • Fmt field The length of this field can be 3 bits, which is used to indicate the length of the TLP header and whether the TLP has a data payload.
  • the length of the TLP header is 12 bytes or 16 bytes. Whether the TLP contains the data payload or not. Therefore, the Fmt field can indicate 4 kinds of information. They are: the length of the TLP header is 12 bytes and TLP contains data payload, TLP header length is 12 bytes and TLP does not contain data payload, TLP header length is 16 bytes and TLP contains data payload, TLP header length is 16 bytes and TLP does not contain data payload.
  • the Fmt field can also indicate the TLP prefix.
  • the Fmt field includes 3 bits and a total of 8 status values.
  • 8 status values 5 status values can be used to indicate the above 5 types of information, and the remaining 3 status values are reserved.
  • the five state values of 000, 001, 010, 011, and 100 can be used to indicate the above five types of information, and the remaining three state values of 101, 110, and 111 are reserved.
  • Type field The length of the Type field can be 5 bits, which is used to indicate the PCIe service type, address, ID and other information. There are 6 types of PCIe services, namely: memory (memory) read/write, input/output (input/output, I/O) read/write, configuration (configuration) read/write, message (message) request, end ( completion), atomic operation.
  • the Type field includes 5 bits and a total of 32 status values. For example, in PCI Express Base Specification Revision 5.0 Version 1.0, 19 status values are used to indicate the PCIe service type, and the remaining 13 status values are reserved.
  • Traffic class (TC) field used to indicate the priority of scheduling traffic.
  • the TC field includes 3 bits and a total of 8 status values, corresponding to 8 levels, namely 0-7.
  • the TC field defaults to 0 (corresponding to The status value is 000). The higher the number, the higher the priority.
  • Attributes (Attr) field used to indicate TLP attributes.
  • TLP attributes are, for example, ordering attributes, or hardware coherency management attributes.
  • Lightweight notification (LN) field Lightweight notification, a simple read and write method defined by PCIe.
  • TLP processing hints (TH) field used to indicate whether there are processing hints at the head and tail of the TLP.
  • TD field used to indicate whether the TLP tail contains a TLP digest, or ECRC, etc.
  • Poisoned data used to indicate whether the data carried in the data payload field in the current TLP is poisoned data.
  • Address type used to indicate whether the address carried by the current TLP needs to be translated.
  • Length used to indicate the length of the data payload field in the current TLP, for example, 4 bytes as the minimum unit.
  • Byte4 ⁇ Byte7 According to the service type definition, that is, Byte4 ⁇ Byte7 can indicate the content corresponding to the PCIe service type indicated by the Type field.
  • Byte8 ⁇ Byte15 Fill in different addresses or IDs according to different routing methods. Among them, Byte8 ⁇ Byte11 can fill the address of the destination node or the ID of the destination node, and Byte12 ⁇ Byte15 can fill the address of the source node or the ID of the source node. Or, Byte8 ⁇ Byte11 can be filled with the address of the source node or the ID of the source node, and Byte12 ⁇ Byte15 can be filled with the address of the destination node or the ID of the destination node.
  • the structure of the 12-byte TLP header is similar to that of the 16-byte TLP header.
  • the difference is that Byte4-Byte7 in the 16-byte TLP header is defined according to the service type, and Byte8-Byte15 fills in the address information.
  • Byte4-Byte7 in the 12-byte TLP header are defined according to the service type, and Byte8-Byte11 fills in address information.
  • the "reserved value” involved in the embodiments of the present application may refer to the unused state value of each field in the TLP, for example, 00011, 00110, 00111, 01000, 01001, 01111, 11000 ⁇ 11010 in the Type field.
  • the "reserved value” can also be referred to as the “reserve value” or the “reserved state value”.
  • the "used state value" mentioned in the embodiments of this application may refer to the state value of each field in the TLP, for example, 00000, 00001, 00010, 00100, 00101, 11011, 10000-10111, 01010, 01011 in the Type field , 01100, 01101, 01110 these 19 state values.
  • the "reserved value" involved in the embodiment of this application may also refer to the unused state value of the TLP in the corresponding evolved version, which is not limited in the embodiment of this application.
  • Root communication between nodes in the PCIe system will lead to a significant increase in the complexity of communication between nodes in the PCIe system.
  • end node 1 and end node 2 are connected to switch node 1, the two cannot directly communicate through switch node 1.
  • End node 1 must first communicate with root complex 1 and pass through the root complex.
  • Body 1 can find end node 2, or end node 2 must first communicate with root complex 1, and then end node 1 can be found via root complex 1.
  • end node 1 sends data to end node 2, the specific process can be: end node 1 sends the data to switching node 1, switching node 1 sends the data to root complex 1, root complex 1 according to each end node ( For example, the function of end node 2 or end node 3) determines that the data receiver is end node 2.
  • the data is image data, or the type of the data is image type
  • root complex 1 determines the need according to the type of data Send the data to the end node with display or playback function.
  • the root complex 1 determines that the end node 2 has the display function, so the root complex 1 can send the data to the switching node 1, and the switching node 1 sends the data to the end. Node 2.
  • the embodiments of the present application provide a PCIe-based data transmission method and device, so that the communication between nodes in the PCIe system does not pass through the root complex, thereby reducing the complexity of the communication between the nodes in the PCIe system Spend.
  • the method and device provided in the embodiments of the present application are based on the same technical concept. Since the method and the device have similar principles for solving the problem, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
  • the method provided by the embodiments of the present application can be applied to the intranet of a car, especially the intranet of an autonomous vehicle, and of course can also be applied to the PCIe system of other devices.
  • FIG. 5 is a flowchart of a PCIe-based data transmission method provided by an embodiment of this application.
  • the method may be applied to a PCIe system.
  • the method may be applied to the PCIe system 100 shown in FIG.
  • the following uses the PCIe system 100 as an example to describe the data transmission method provided in the embodiment of the present application.
  • the method flow includes:
  • the first node encapsulates the first data into a first TLP, where the TLP header of the first TLP includes a first field, and the first field is used to indicate a data type of the first data.
  • the first node may be an end node or a chip in an end node in the PCIe system 100, or may be a switching node or a chip in a switching node in the PCIe system 100.
  • the first node may be the end node 1 of the PCIe system 100, or a transmission node in the end node 1, such as transmit/receive (TX/RX) and so on.
  • TX/RX transmit/receive
  • the camera can include a lens, a photosensitive element, such as complementary metal oxide semiconductor (CMOS), TX/RX, etc., COMS is used to pass the lens
  • CMOS complementary metal oxide semiconductor
  • TX/RX complementary metal oxide semiconductor
  • COMS COMS is used to pass the lens
  • the image data is collected and sent to other nodes in the PCIe system 100 through TX/RX, that is, the first node can be a camera, or it can be a TX/RX in the camera.
  • the first node may encapsulate the first data in the data payload of the first TLP.
  • the first data encapsulated by the first node may be data collected by the first node.
  • the first node is a camera
  • the first data may be image data collected by the camera, etc., and then the camera sends the collected image data to the second node.
  • the first node is the transmission node in the end node
  • the first data encapsulated by the first node may be image data collected by the transmission chip in the end node, and then the transmission node in the end node sends the collected image data to the first node.
  • the first field of the TLP header of the first TLP can be used to indicate the information required to transmit the first data, so that the first data does not go through the root compound.
  • the body is transmitted to other nodes.
  • the information required by the TLP to transmit the first data may include the type of the first data, and the type of the data may include: image type, audio type, control type, SWRITE type, or security type, etc.
  • the image type is used to indicate that the data transmitted by TLP is image data
  • the audio type is used to indicate that the data transmitted by TLP is audio data
  • the control type is used to indicate that the TLP carries control information
  • the SWRITE type is used to indicate that the TLP transmits
  • the alignment of data for example, reads and writes with 4 bytes as the minimum unit
  • the security type is used to indicate that the TLP carries security information, such as the corresponding key in the case of encryption.
  • the first field may be the Type field in the TLP header, that is, the first node uses the Type field of the TLP header of the first TLP to indicate the type of the first data.
  • the reserved value (or called the reserved state) of the Type field may be used to indicate the data type of the first data.
  • the reserved value or called the reserved state
  • the reserved value of the Type field may be used to indicate the data type of the first data.
  • the Type field is only used to indicate the data type, as shown in Figure 7, so it can be compatible with the original data transmission method and the data transmission method provided in the embodiment of this application. .
  • the receiving node can determine data transmission according to whether the state value is a reserved state value method.
  • the receiving node can determine the data transmission method as the original data transmission method and the PCIe service type according to the state value; when the state value is the reserved state value, the receiving node The data transmission method and the data type provided in this embodiment of the application can be determined according to the state value.
  • the TLP header of the first TLP further includes a second field, which may be used to indicate the identity information of the destination device (denoted as the third node) of the first TLP, for example, the third node Address, ID, etc.
  • the second field may also be used to indicate the identity information of the first node, such as the address and ID of the first node.
  • the third node may be an end node in the PCIe system 100 or a switching node in the PCIe system 100.
  • the second field may be Byte4-Byte15 in the 16-byte TLP header, or Byte4-Byte11 in the 12-byte TLP header. If the length of the TLP header is 16 bytes, Byte8-Byte15 of the TLP header can carry the identity information of the first node and the identity information of the third node. If the length of the TLP header is 12 bytes, Byte8-Byte11 of the TLP header can carry the identity information of the first node and the identity information of the third node.
  • the first node may extract parameter information of the first data, and the parameter information corresponds to the data type and may be used to characterize the attribute of the data type.
  • At least one parameter information corresponding to the data type can be as follows:
  • the parameter information corresponding to the image type can include one or more of the following information: image data type, for example, raw image format, RGB, YUV, embedded Embedded data, compressed images, object contours in images, etc.; pixel bit quantization depth, such as 12, 20, 24, etc.; resolution, such as 1080P, 2K, 4K, etc.; segment indication information, image sensitivity
  • image data type for example, raw image format, RGB, YUV, embedded Embedded data, compressed images, object contours in images, etc.
  • pixel bit quantization depth such as 12, 20, 24, etc.
  • resolution such as 1080P, 2K, 4K, etc.
  • segment indication information image sensitivity
  • the parameter information corresponding to the audio type may include one or more of the following information: sampling quantization format, such as floating point quantization, integer quantization, etc.; sampling frequency, such as 24KHz, 48KHz, etc.; quantization Depth, such as 8bit, 12bit, etc. per sample; number of channels/number of channels, the number of channels is used to indicate how many channels the current TLP includes, and the number of channels is used to indicate how many channels the current TLP includes.
  • sampling quantization format such as floating point quantization, integer quantization, etc.
  • sampling frequency such as 24KHz, 48KHz, etc.
  • quantization Depth such as 8bit, 12bit, etc. per sample
  • number of channels/number of channels the number of channels is used to indicate how many channels the current TLP includes, and the number of channels is used to indicate how many channels the current TLP includes.
  • control information type such as integrated circuit bus (inter-integrated circuit, I2C), universal input/output (General-purpose input/output (GPIO), serial peripheral interface (serial peripheral interface, SPI), etc.
  • I2C integrated circuit bus
  • GPIO General-purpose input/output
  • SPI serial peripheral interface
  • the parameter information corresponding to the security type may include one or more of the following information: message type, establishing security requires multiple message interactions, and each interaction message has a different type, such as authentication messages , Encrypted messages, etc.; format instructions, how the bits in the message are grouped, and what each group means; the key information corresponding to the data carried by the current TLP in the case of encryption.
  • the parameter information corresponding to the SWRITE type may include the following information: the alignment mode, whether the alignment is the minimum unit of 4 bytes or the minimum unit of 8 bytes.
  • parameter information is only an exemplary naming, and it can also be named other in specific implementations, such as attributes, attribute parameters, encapsulation parameters, etc., or also It can be called A. As long as A has the same or similar meaning as the parameter information in the embodiment of the present application, A can be understood as the parameter information in the embodiment of the present application.
  • the first node can determine the image data type, pixel quantization depth, resolution, etc. of the collected image data, and can be based on the image data type, pixel quantization depth, resolution, etc. Calculate the data volume of each line of the image, combined with the maximum data carrying capacity of each PCIe TLP, the number of TLPs required to transmit a line of image can be obtained, and then the image segmentation method can be determined, so that the segmentation indication information can be determined according to the segmentation method. If the first node is the TX/RX in the camera, the first node can receive the image data collected by CMOS.
  • the image data includes image data type, pixel quantization depth, resolution and other parameter information.
  • the first node can be based on the image data Include the image data type, pixel quantization depth, resolution, etc. to calculate the data volume of each line of the image, combined with the maximum data carrying capacity of each TLP of PCIe, the number of TLPs required to transmit a line of image can be obtained, and then the image segmentation method is determined. Therefore, the segment indication information can be determined according to the segment mode.
  • the first field in the TLP header may be used to indicate the data type and at least one parameter information corresponding to the data type.
  • the 13 reserved state values of the Type field may be used to indicate the data type and at least one parameter information corresponding to the data type.
  • the information set 1 includes the data type being image type, image type being YUV, The image resolution is 2K, the pixel quantization depth is 12, and the current TLP is the first paragraph of the current line;
  • the information set 2 includes: data type is image type, image type is YUV, image resolution is 2K, pixel quantization depth is 12, The current TLP is the second segment of the current line;
  • the information set 3 includes: the data type is image type, the image type is RGB, the image resolution is 4K, the pixel quantization depth is 12, and the current TLP is the first segment of the current line.
  • the reserved state value of the Type field is used to indicate the image type, image data type, pixel quantization depth, resolution, and segmentation indication information, as shown in FIG. 8. It should be understood that FIG. 8 is only an exemplary illustration, and does not specifically limit the length of each parameter information and the position in the TLP header.
  • the first field may be used to indicate the data type
  • the second field may be used to indicate at least one parameter information corresponding to the data type.
  • the 13 reserved state values of the Type field may be used to indicate the data type
  • the second field indicates at least one parameter information corresponding to the data type.
  • the Type field may not indicate parameter information.
  • the reserved state value of the Type field is used to indicate the image type
  • the second field is used to indicate the image data type, pixel quantization depth, resolution, and segmentation indication information, as shown in the figure 9 shown. It should be understood that FIG. 9 is only an exemplary illustration, and does not specifically limit the length of each parameter information and the position in the TLP header.
  • the first resource may be used to indicate the data type and the first parameter information
  • the second field indicates the second parameter information
  • the second parameter information is the parameter information corresponding to the data type except the first parameter information
  • Other parameter information that is, the first field and the second field are used to indicate different parameter information corresponding to the data type.
  • the 13 reserved state values of the Type field may be used to indicate the data type and the first parameter information
  • the second field may indicate the second parameter information.
  • the reserved state value of the Type field is used to indicate the image type and image data type
  • the second field indicates the pixel quantization depth, resolution, and segmentation indication information, as shown in Figure 10. Shown. It should be understood that FIG. 10 is only an exemplary illustration, and does not specifically limit the length of each parameter information and the position in the TLP header.
  • a format of one data type among image type, audio type, control type, SWRITE type, and security type can be indicated in the above-mentioned manner.
  • multiple formats of one data type among image type, audio type, control type, SWRITE type, and security type may also be indicated.
  • multiple formats of multiple data types among image type, audio type, control type, SWRITE type, and security type may also be indicated.
  • it may also indicate a mixture of multiple data types among image type, audio type, control type, SWRITE type, and security type (for example, security information in image format, audio data with security information, etc.).
  • other data types and formats which are not limited in the embodiment of the present application.
  • S502 The first node sends the first TLP to the second node.
  • the second node may be an end node or a chip in an end node in the PCIe system 100, and may also be a switching node or a chip in a switching node in the PCIe system 100.
  • the second node may be a switching node that has a connection relationship with the first node. For example, if the first node is an end node 1, the second node is a switching node 1.
  • the second node receives the first TLP from the first node, and obtains the identity information of the third node by decapsulating the first TLP.
  • the second node determines the routing path according to the identity information of the third node, so as to The routing path will send the second TLP to the third node.
  • the first TLP received by the second node and the second TLP sent by the second node are the same TLP, that is, after receiving the first TLP sent by the first node, the second node will The first TLP is forwarded to the third node.
  • the first TLP received by the second node and the second TLP sent by the second node are different TLPs, that is, after receiving the first TLP sent by the first node, the second node
  • the first TLP performs processing, for example, the identity information of the source node of the first TLP is modified from the identity information of the first node to the identity information of the second node, etc., and then the processed second TLP is sent to the third node, where ,
  • the first TLP received by the second node is the same as the first data and parameter information carried in the second TLP sent by the second node.
  • the second TLP sent by the second node carries the first data and parameter information
  • the third node obtains the first data based on the first field.
  • the third node receives the second TLP from the second node, decapsulates the second TLP to obtain the first field in the second TLP header, and then obtains the first data based on the first field.
  • the third node may determine the data type and the parameter information corresponding to the data type according to the Type field of the TLP header. For example, as shown in FIG. 8, the third node may determine the data type of the first data as the image type, and the image data type, pixel quantization depth, resolution, and segmentation of the first data according to the state value of the Type field of the TLP header. Instructions.
  • the third node may determine the data type according to the Type field of the TLP header, and determine at least one parameter information corresponding to the data type according to the second field of the TLP header. For example, as shown in Figure 9, the third node can determine the data type of the first data as the image type according to the state value of the Type field of the TLP header, and determine the image data type and pixel quantization of the first data according to the second field of the TLP header. Depth, resolution, and segment indication information.
  • the third node may determine the data type and the first parameter information according to the Type field of the TLP header, and determine the second parameter information according to the second field of the TLP header, where the second parameter information is corresponding to the data type Parameter information other than the first parameter information in the parameter information.
  • the third node may determine the data type of the first data as the image type according to the state value of the Type field of the TLP header, the image data type of the first data, and determine the first data type according to the second field of the TLP header.
  • the pixel quantization depth, resolution, and segment indication information of the data are examples of the data.
  • the transmission method shown in FIG. 5 may be applied to a single PCIe system as shown in FIG. 1, and may also be applied to a single PCIe system as shown in FIG. 2, which is not limited in the embodiment of the present application.
  • the first node may be the end node 3
  • the second node may be the switching node 2
  • the third node may be the end node 4
  • the first data is from the end node 3.
  • the process of transmission to end node 4 includes:
  • the end node 3 sends the first TLP to the switching node 2.
  • the first TLP includes the first data.
  • the Type field of the TLP header of the first TLP indicates the data type and parameter information, and the second field of the TLP header indicates the end node 3.
  • the identity information of and the identity information of the end node 4 (see S501 for the specific encapsulation method, which will not be repeated here);
  • the switching node 2 After receiving the first TLP, the switching node 2 decapsulates the TLP header of the first TLP to obtain the identity information of the end node 4, and sends the first TLP to the NTB in the switching node according to the identity information of the end node 4;
  • A3 After the NTB in the switching node 2 receives the first TLP, it decapsulates the TLP header of the first TLP to obtain the identity information of the end node 4, and can translate/convert the identity information of the end node 4 to obtain the second TLP
  • the second TLP is sent to the NTB in the switching node 3.
  • the second TLP includes the first data.
  • the Type field of the TLP header of the second TLP indicates the data type and parameter information.
  • the second field of the TLP header indicates the end node 3
  • the first TLP and the second TLP can be the same or different; for example, the NTB in the switching node 2 reverses/converts the identity information of the end node 4, and finds the identity information in the switching node 3.
  • the second TLP is different from the first TLP; if the NTB in the switching node 2 NTB does not modify the identity information of the end node 4 to the identity information identifiable by the PCIe system 200, then the second TLP is the same as the first TLP;
  • A4 After the NTB in the switching node 3 receives the second TLP, it decapsulates the TLP header of the first TLP to obtain the identity information of the end node 4, and can translate/convert the identity information of the end node 4 to obtain the third TLP And send the third TLP to the NTB in the switching node 3.
  • the third TLP includes the first data
  • the Type field of the TLP header of the third TLP indicates the data type and parameter information
  • the second field of the TLP header indicates the end node 3
  • the identity information, and the identity information of the end node 4, the third TLP and the second TLP may be the same or different (similar to the above step A3, the first TLP and the second TLP may be the same or different);
  • the switching node 3 After receiving the third TLP, the switching node 3 decapsulates the TLP header of the third TLP to obtain the identity information of the end node 4, and sends the third TLP to the end node 4 according to the identity information of the end node 4; After receiving the third TLP, decapsulate the TLP header of the third TLP to obtain the Type field, and obtain the first data based on the Type field (see S504 for the specific data acquisition process, which will not be repeated here), thereby completing the cross-PCIe system data transmission.
  • NTB's translation/conversion of identity information can refer to the prior art, which is not limited in the embodiment of the present application.
  • the PCIe system 300 includes a root complex 1, a switching node 1, a camera 1, a camera 2, a switching node 2 connected to the switching node 1, and a display connected to the switching node 2 (Display) 3.
  • the camera 1 sends the captured image data to the display 3 for display.
  • the camera 1 transmits the image data obtained by shooting to the switching node 1 and the switch 2 through the method executed by the first node in the above-mentioned embodiment (or the process shown in FIG. 5); the switching node 2 can adopt the above-mentioned embodiment (or The method executed by the second node in the process shown in FIG. 5 is to transmit the image data to the display 3 for display; the display 3 can be obtained by the method executed by the third node in the above embodiment (or the process shown in FIG. 5) The image data. Taking the length of the TLP header as 16 bytes, the TLP received by the switching nodes 1 and 2 is the same as the TLP sent as an example. Please refer to Fig. 12 for the specific process of the camera 1 transmitting the image data to the display 3 for display.
  • the camera 1 can perform shooting in response to a shooting instruction (for example, triggered by a shooting button of the camera 1) to obtain image data.
  • a shooting instruction for example, triggered by a shooting button of the camera 1.
  • the camera 1 determines the data type of the image data as the image type and the parameter information of the image data according to the image data. For example, the type of image data (such as RGB, YUV, etc.), the number of quantized bits per pixel, and the image resolution (such as 2K, 4K, etc.). You can also calculate the data volume of each line of the image, determine the number of TLPs required to transmit a line of image according to the maximum data volume carried by each PCIe TLP, and then determine the image segmentation mode, and then determine the segmentation indication information.
  • the type of image data such as RGB, YUV, etc.
  • the number of quantized bits per pixel such as 2K, 4K, etc.
  • the image resolution such as 2K, 4K, etc.
  • the camera 1 can encapsulate image data into TLP in any of the following three ways:
  • the Type field of the TLP header can be used to indicate the information required to transmit the image data, such as data type: image type, image data parameter information: image data type, pixel quantization depth, resolution, segmentation indication information, etc. If the reserved value of the Type field is used to indicate the data type and parameter information, as shown in Figure 8. Further, the camera 1 fills the image data into the data payload, and fills its own identity information (such as ID, address, etc.) and the identity information (such as ID, address, etc.) of the display 3 into Byte 8-Byte 15 of the TLP header.
  • identity information such as ID, address, etc.
  • the Type field and the second field of the TLP header can be used to indicate the information required to transmit the image data, where the Type field indicates the data type image type, and the second field (for example, Byte 4 to Byte 15) indicates the parameters of the image data Information, such as data type: image type, image data parameter information: image data type, pixel quantization depth, resolution, segmentation indication information, etc. If the reserved value of the Type field is used to indicate the data type, as shown in FIG. 9. Further, the camera 1 fills the image data into the data payload, and fills its own identity information (such as ID, address, etc.) and the identity information (such as ID, address, etc.) of the display 3 into Byte 8-Byte 15 of the TLP header.
  • the second field for example, Byte 4 to Byte 15
  • the reserved value of the Type field is used to indicate the data type, as shown in FIG. 9.
  • the camera 1 fills the image data into the data payload, and fills its own identity information (such as ID,
  • the Type field and the second field of the TLP header can be used to indicate the information required to transmit the image data, where the Type field indicates the data type, the image type and some parameter information of the image data, and the second field (for example, Byte4 ⁇ Byte 15) ) Indicates remaining parameter information of the image data, such as data type: image type, partial parameter information of image data: image data type, remaining parameter information of image data: pixel quantization depth, resolution, segmentation indication information, etc. If the reserved value of the Type field is used to indicate the data type and part of the parameter information, as shown in FIG. 10.
  • the camera 1 fills the image data into the data payload, and fills its own identity information (such as ID, address, etc.) and the identity information (such as ID, address, etc.) of the display 3 into Byte 8-Byte 15 of the TLP header.
  • identity information such as ID, address, etc.
  • identity information such as ID, address, etc.
  • Camera 1 sends the TLP to the switching node 1 connected to camera 1.
  • the switching node 1 After receiving the TLP, the switching node 1 detects the TLP header and parses the Type field.
  • the routing path is determined according to the identity information of the display 2 in the TLP, and the TLP is sent to the switching node 2 connected to the display 2 according to the routing path.
  • switching node 1 determines that the Type field is defined by the existing PCIe system, it will be processed according to the existing PCIe system working mechanism, that is, TLP is sent to root complex 1, and then root complex 1 Visit the configuration space of each end node (for example, camera 2 and display 3) to determine the receiving side node, and then send the TLP to the receiving side node or a switching node that has a connection relationship with the receiving side node.
  • the switching node 2 After receiving the TLP, the switching node 2 detects the TLP header and parses the Type field.
  • switch node 2 determines that the Type field is defined in the existing PCIe system, it will be processed according to the existing PCIe system working mechanism, that is, TLP will be sent to root complex 1, and then root complex 1
  • the receiving side node is determined according to the configuration space of each end node (such as the camera 2 and the display 3), and then the TLP is sent to the receiving side node or a switching node that has a connection relationship with the receiving side node.
  • the display 2 After the display 2 receives the TLP, it detects the TLP header, parses the Type field, obtains the data type and parameter information of the image data, restores a complete image according to the parameter information (such as segmentation indication information, etc.), and displays it on the display Display the image.
  • the parameter information such as segmentation indication information, etc.
  • the display 3 can decapsulate the TLP as follows:
  • the display 3 parses the Type field of the TLP header, and determines the data type as the image type according to the state value of the Type field, and the parameter information of the image data, such as the image data type of the image data, the pixel quantization depth of the image data , The resolution of the image data, the segmentation indication information of the image data, etc.
  • the display 3 parses the Type field of the TLP header, and determines the data type as the image type according to the state value of the Type field; parses Byte 4 ⁇ Byte 15 of the TLP header to determine the parameter information of the image data, such as the image of the image data Data type, pixel quantization depth of image data, resolution of image data, segmentation indication information of image data, etc.
  • the display 3 parses the Type field of the TLP header, and determines the data type as the image type and some parameter information of the image data according to the state value of the Type field, such as the image data type of the image data, etc.; parses the Byte of the TLP header 4 ⁇ Byte 15 Determine the remaining parameter information of the image data, such as the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • the Type field is used to indicate the information required by TLP to transmit data, such as data type, parameter information corresponding to the data type, etc., so that the communication between nodes in the PCIe system (for example, terminal).
  • the communication between the node and the end node, or the communication between the switching node and the switching node, or the communication between the end node and the switching node) does not pass through the root complex, which can reduce the communication between the nodes in the PCIe system. Communication complexity.
  • the embodiment of the present application provides a data transmission device.
  • the structure of the device may be as shown in FIG. 13, including a processing unit 1301 and a sending unit 1302.
  • the data transmission device 1300 may be specifically used to implement the method executed by the first node in the embodiments of FIG. 5 to FIG. 12.
  • the device 1300 may be the first node itself, or may be a chip or a chipset or a chip in the first node. Used to perform a part of the related method function.
  • the processing unit 1301 is configured to encapsulate the first data into a first TLP, the TLP header of the first TLP includes a first field, and the first field is used to indicate the data type of the first data; the sending unit 1302 is configured to send The two nodes send the first TLP.
  • the data type includes at least one of the following: image type, video type, control type, security type, and stream write (SWRITE) type.
  • the first field is also used to indicate at least one parameter information corresponding to the data type.
  • the first field is the Type field in the TLP header of the first TLP.
  • the value of the first field is a reserved value.
  • the TLP header of the first TLP further includes a second field, the second field is used to indicate the identity information of the third node, and the third node is the destination device of the first TLP.
  • the second field is also used to indicate at least one parameter information corresponding to the data type.
  • the second field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header of the first TLP.
  • the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It can be understood that the function or implementation of each module in the embodiment of the present application may further refer to the related description of the method embodiment.
  • the data transmission device 1400 may be as shown in FIG. 14, and the device 1400 may be an end node or a chip in an end node.
  • the device 1400 may include a processor 1401, a transceiver 1402, and a memory 1403.
  • the processing unit 1301 may be a processor 1401.
  • the sending unit 1302 may be a transceiver 1402.
  • the processor 1401 may be a CPU or a digital processing unit.
  • the transceiver 1402 may be a communication interface, an interface circuit such as a transceiver circuit, etc., or a transceiver chip.
  • the device 1400 further includes: a memory 1403, configured to store a program executed by the processor 1401.
  • the memory 1403 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and may also be a volatile memory, such as random access memory (random access memory). -access memory, RAM).
  • the memory 1403 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the processor 1401 is configured to execute the program code stored in the memory 1403, and is specifically configured to execute the actions of the above-mentioned processing unit 1301, which will not be repeated in this application.
  • the transceiver 1402 is specifically configured to perform the actions of the sending unit 1302 described above, which will not be repeated in this application.
  • the embodiment of the present application does not limit the specific connection medium between the transceiver 1402, the processor 1401, and the memory 1403.
  • the memory 1403, the processor 1401, and the transceiver 1402 are connected by a bus 1404.
  • the bus is represented by a thick line in FIG. 14, and the connection mode between other components is only for schematic illustration. , Is not limited.
  • the bus 1404 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 14, but it does not mean that there is only one bus or one type of bus.
  • an embodiment of the present application provides a data transmission device 1500.
  • the structure of the device 1500 may be as shown in FIG. 15, including a receiving unit 1501, a sending unit 1502, and a processing unit 1503.
  • the data transmission device 1500 can implement the method executed by the second node in the embodiments of FIG. 5 to FIG. 12.
  • the device 1500 may be the second node itself, or may be a chip or a chipset or a chip used for execution in the second node. Part of the related method function.
  • the receiving unit 1501 is configured to receive the first transaction layer packet TLP from the first node, the first TLP includes the first data;
  • the transmitting unit 1502 is configured to send the second TLP to the third node, the second TLP includes the first Data; where the TLP header of the TLP includes a first field, the first field is used to indicate the data type of the first data, and the TLP includes the first TLP and/or the second TLP.
  • the data type includes at least one of the following: image type, video type, control type, security type, and stream write (SWRITE) type.
  • the second TLP including the first data may be understood as the second TLP and the second TLP including the same data content.
  • the first field is also used to indicate at least one parameter information corresponding to the data type.
  • the first field is the Type field in the TLP header.
  • the value of the first field is a reserved value.
  • the TLP header further includes a second field, and the second field is used to indicate the identity information of the third node.
  • the second field is also used to indicate at least one parameter information corresponding to the data type.
  • the second field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header of the TLP packet.
  • the apparatus 1500 further includes a processing unit 1503.
  • the processing unit 1503 is configured to: determine a routing path according to the identity information of the third node; and the sending unit 1502 is specifically configured to: Two TLPs are sent to the third node.
  • the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It can be understood that the function or implementation of each module in the embodiment of the present application may further refer to the related description of the method embodiment.
  • the data transmission apparatus 1600 may be as shown in FIG. 16, and the apparatus 1600 may be an end node or a chip in an end node.
  • the apparatus 1600 may include a processor 1601, a transceiver 1602, and a memory 1603.
  • the processing unit 1503 may be a processor 1601.
  • the receiving unit 1501 and the sending unit 1502 may be a transceiver 1602.
  • the processor 1601 may be a CPU or a digital processing unit.
  • the transceiver 1602 may be a communication interface, an interface circuit such as a transceiver circuit, etc., or a transceiver chip.
  • the device 1600 further includes: a memory 1603, configured to store a program executed by the processor 1601.
  • the memory 1603 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and may also be a volatile memory (volatile memory), such as random access memory (random access memory). -access memory, RAM).
  • the memory 1603 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the processor 1601 is configured to execute the program code stored in the memory 1603, and is specifically configured to execute the actions of the above-mentioned processing unit 1503, which will not be repeated in this application.
  • the transceiver 1602 is specifically configured to perform the actions of the receiving unit 1501 and the sending unit 1502 described above, which will not be repeated in this application.
  • connection medium between the foregoing transceiver 1602, the processor 1601, and the memory 1603 is not limited in the embodiment of the present application.
  • the memory 1603, the processor 1601, and the transceiver 1602 are connected by a bus 1604.
  • the bus is represented by a thick line in FIG. 16, and the connection mode between other components is only for schematic illustration. , Is not limited.
  • the bus 1604 can be divided into an address bus, a data bus, a control bus, and so on. For ease of representation, only one thick line is used in FIG. 16, but it does not mean that there is only one bus or one type of bus.
  • the embodiment of the present application provides a data transmission device.
  • the structure of the device may be as shown in FIG. 17, including a receiving unit 1701 and a processing unit 1702.
  • the data transmission device 1700 may be specifically used to implement the method executed by the third node in the embodiments of FIG. 5 to FIG. 12.
  • the device 1700 may be the third node itself, or may be a chip or a chipset or a chip in the third node. Used to perform a part of the related method function.
  • the receiving unit 1701 is configured to receive the second transaction layer packet TLP from the second node, the second TLP includes the first data, the TLP header of the second TLP includes the first field, and the first field is used to indicate the value of the first data Data type; the processing unit 1702 is configured to obtain the first data based on the first field.
  • the data type includes at least one of the following: image type, video type, control type, security type, and stream write (SWRITE) type.
  • the first field is also used to indicate at least one parameter information corresponding to the data type.
  • the first field is the Type field in the second TLP header.
  • the value of the first field is a reserved value.
  • the second TLP header further includes a second field, and the second field is used to indicate the identity information of the third node.
  • the second field is also used to indicate at least one parameter information corresponding to the data type.
  • the second field is byte 4 to byte 15 or byte 4 to byte 11 of the second TLP header.
  • the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods.
  • the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It can be understood that the function or implementation of each module in the embodiment of the present application may further refer to the related description of the method embodiment.
  • the data transmission device 1800 may be as shown in FIG. 18, and the device 1800 may be an end node or a chip in an end node.
  • the apparatus 1800 may include a processor 1801, a transceiver 1802, and a memory 1803.
  • the processing unit 1702 may be a processor 1801.
  • the receiving unit 1701 may be a transceiver 1802.
  • the processor 1801 may be a CPU or a digital processing unit.
  • the transceiver 1802 may be a communication interface, an interface circuit such as a transceiver circuit, etc., or a transceiver chip.
  • the device 1800 further includes: a memory 1803, configured to store a program executed by the processor 1801.
  • the memory 1803 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and may also be a volatile memory (volatile memory), such as random access memory (random access memory). -access memory, RAM).
  • the memory 1803 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
  • the processor 1801 is configured to execute the program code stored in the memory 1803, and is specifically configured to execute the actions of the aforementioned processing unit 1702, which will not be repeated in this application.
  • the transceiver 1802 is specifically configured to perform the actions of the above-mentioned receiving unit 1701, which will not be repeated in this application.
  • the embodiment of the present application does not limit the specific connection medium between the transceiver 1802, the processor 1801, and the memory 1803.
  • the memory 1803, the processor 1801, and the transceiver 1802 are connected by a bus 1804.
  • the bus is represented by a thick line in FIG. 18.
  • the connection mode between other components is only for schematic illustration. , Is not limited.
  • the bus 1804 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used in FIG. 18 to represent, but it does not mean that there is only one bus or one type of bus.
  • the embodiments of the present application also provide a computer-readable storage medium for storing computer software instructions required to execute the above-mentioned processor, which contains a program required to execute the above-mentioned processor.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (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

本申请公开了一种基于PCIe的数据传输方法及装置,可以使得PCIe系统中节点与节点之间的通信无需经过根复合体,例如端节点与端节点之间的通信,或者交换节点与交换节点之间的通信,或者交换节点与端节点之间的通信。该方法包括:第一节点将第一数据封装成第一TLP并向第二节点发送第一TLP,其中,第一TLP的TLP头包括第一字段,该第一字段用于指示第一数据的数据类型,该数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、SWRITE类型。本申请实施例中通过使用TLP头的第一字段指示传输数据所需的信息,例如数据类型,可以使得节点之间无需经过根复合体进行通信,从而降低PCIe系统内的通信复杂度。

Description

一种基于PCIe的数据传输方法及装置 技术领域
本申请涉及通信技术领域,尤其涉及一种基于外围组件互连传递(peripheral component interconnect express,PCIe)的数据传输方法及装置。
背景技术
PCIe是一种高速短距离通信接口,可以快速读写内存,支持大宽带通信,广泛应用于计算机、测试仪器等设备中。
PCIe系统的主要组成单元包括根复合体(root complex,Root)、交换节点(switch)以及端节点(endpoint)。其中,Root用于管理PCIe系统中的所有总线和所有节点,是PCIe系统中节点与节点之间通信的桥梁,节点为端节点或交换节点;一个交换节点可以连接根复合体、其他交换节点以及端节点,是PCIe系统中数据的转发节点;端节点为端设备,例如外围设备(peripheral)等,用于接收数据或发送数据。在PCIe系统中,只有Root以及节点(例如端节点、交换节点)自身有权限读取节点的配置空间,配置空间用于存储节点的功能(例如节点支持何种数据类型等)、地址、或身份标识(identity,ID)等信息,PCIe系统中的其他节点均无权读取。意味着,在PCIe系统中只有Root知道各节点的功能、地址等信息。因此端节点与端节点之间、交换节点与交换节点之间、以及端节点与交换节点之间不能直接通信,必须经过Root。由于PCIe系统中节点与节点之间的通信必须经过Root,这样会大幅度提升节点与节点之间的通信复杂度。
发明内容
本申请实施例提供一种基于PCIe的数据传输方法及装置,用以使得PCIe系统中的节点与节点之间的通信不经过Root,从而可以降低节点与节点之间的通信复杂度。
第一方面,本申请实施例提供一种基于PCIe的数据传输方法,包括:第一节点将第一数据封装成第一事务层包TLP,第一TLP的TLP头包括第一字段,第一字段用于指示第一数据的数据类型,然后第一节点将该第一TLP发送给第二节点。
一种可能的设计中,数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型。
在一种可能的设计中,第一节点可以是端节点、也可以是交换节点,第二节点可以是端节点、也可以是交换节点。
本申请实施例中,通过使用TLP头的第一字段来指示传输数据所需的信息,例如数据类型,该第一节点可以是端节点,也可以是交换节点,该第二节点可以是端节点,也可以是交换节点,这样就可以使得PCIe系统中的端节点之间的通信,交换节点之间的通信,以及端节点与交换节点之间的通信不经过Root,从而可以降低PCIe系统中各节点之间的通信复杂度。
在一种可能的设计中,第一字段还可以用于指示数据类型对应的至少一个参数信息。上述设计中,通过使用TLP头所包括的第一字段来指示数据类型对应的至少一个参数信息,可以使得节点之间的通信不经过Root。
在一种可能的设计中,第一字段为第一TLP的TLP头中的类型Type字段。上述设计中,通过使用TLP头中的Type字段来指示传输数据所需的信息,这样无需改动TLP结构,可以使得节点之间的通信不经过Root。
在一种可能的设计中,第一字段的值为预留值。在上述设计中,第一字段的值为预留值,这样TLP就可以兼容原有数据传输方法和本申请实施例提供的数据传输方法,且无需改动TLP结构。
在一种可能的设计中,第一TLP的TLP头还包括第二字段,该第二字段可以用于指示第三节点的身份信息,该第三节点为第一TLP的目的设备。上述设计中,通过使用TLP头的第二字段指示目的设备的身份信息,这样中间节点(例如与第一节点有连接关系的交换节点)在解析出该目的设备的身份信息后,可以根据目的设备的身份信息确定路由路径,并基于路由路径将第一数据发送给目的设备,从而可以不经过Root。
在一种可能的设计中,在第一字段仅用于指示第一数据的数据类型时,第二字段还用于指示数据类型对应的至少一个参数信息。上述设计中,在第一字段仅用于指示数据类型时,可以通过第二字段指示数据类型对应的至少一个参数信息,以使得端节点之间不经过Root进行通信。
在一种可能的设计中,第二字段为第一TLP的TLP头的字节4~字节15或字节4~字节11。TLP头的字节4~字节15或字节4~字节11根据Type字段的不同而指示的内容不同,在第一字段指示数据类型时,可以使用该字节4~字节15或字节4~字节11指示目的设备的身份信息,或者指示目的设备的身份信息以及数据类型所对应的至少一个参数信息。
第二方面,本申请实施例提供一种基于外围组件互连传递PCIe的数据传输方法,包括:第二节点接收来自第一节点的第一事务层包TLP,第一TLP包括第一数据;然后,第二节点向第三节点发送第二TLP,该第二TLP包括第一数据;其中,TLP的TLP头包括第一字段,第一字段用于指示第一数据的数据类型,该TLP包括第一TLP、和/或第二TLP。
在一种可能的设计中,数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型。
在一种可能的设计中,第二TLP包括第一数据可以理解为第二TLP与第一TLP包括的数据的内容相同。
在一种可能的设计中,第一节点可以为端节点、也可以为交换节点,第二节点可以为交换节点。
本申请实施例中,通过使用TLP头的第一字段指示传输数据所需要的信息,例如数据类型,该第一节点可以是端节点也可以是交换节点,该第二节点可以是端节点也可以是交换节点,该第三节点可以是端节点也可以是交换节点,这样可以实现端节点之间、交换节点之间、以及端节点与交换节点之间不经过Root进行通信,从而可以降低PCIe系统中节点与节点之间的通信复杂度。
在一种可能的设计中,第一字段还用于指示数据类型对应的至少一个参数信息。上述设计中,可以使用TLP头的第一字段指示传输数据所需要的信息,例如数据类型对应的至少一个参数信息,可以使得节点之间的通信不经过Root。
在一种可能的设计中,第一字段为TLP头中的类型Type字段。上述设计中,通过使用TLP头中的Type字段来指示传输数据所需的信息,这样无需改动TLP结构,也可以使得节点之间的通信不经过Root。
在一种可能的设计中,第一字段的值为预留值。在上述设计中,第一字段的值为预留值,这样TLP就可以兼容原有数据传输方法和本申请实施例提供的数据传输方法,且无需改动TLP结构。
在一种可能的设计中,TLP头还包括第二字段,第二字段用于指示第三节点的身份信息。上述设计中,通过使用TLP头的第二字段指示目的设备的身份信息,这样中间节点(例如与第一节点有连接关系的交换节点)在解析出该目的设备的身份信息后,可以根据目的设备的身份信息确定路由路径,并基于路由路径将第一数据发送给目的设备,从而可以不经过Root。
在一种可能的设计中,在第一字段仅用于指示第一数据的数据类型时,第二字段还用于指示数据类型对应的至少一个参数信息。上述设计中,在第一字段仅用于指示数据类型时,可以通过第二字段指示数据类型对应的至少一个参数信息,以使得端节点之间不经过Root进行通信。
在一种可能的设计中,第二字段为TLP包的TLP头的字节4~字节15或字节4~字节11。上述设计中,TLP头的字节4~字节15或字节4~字节11根据Type字段的不同而指示的内容不同,在第一字段指示数据类型时,可以使用该字节4~字节15或字节4~字节11指示目的设备的身份信息,或者指示目的设备的身份信息以及数据类型所对应的至少一个参数信息。
在一种可能的设计中,第二节点向第三节点发送第二TLP,包括:第二节点根据第三节点的身份信息,确定路由路径;第二节点根据路由路径,将第二TLP发送给第三节点。上述设计中,交换节点根据目标设备(即第三节点)的身份信息确定路由路径,再基于路由路径将第一数据发送给第三节点,这样就不需要经过Root,从而能降低PCIe系统中节点与节点之间的通信复杂度。
第三方面,本申请实施例提供一种基于外围组件互连传递PCIe的数据传输方法,包括:第三节点接收来自第二节点的第二事务层包TLP,第二TLP包括第一数据,第二TLP的TLP头包括第一字段,第一字段用于指示第一数据的数据类型,并基于第一字段获得第一数据。
在一种可能的设计中,数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型。
在一种可能的设计中,第二节点可以为端节点、也可以为交换节点,第三节点可以为端节点、也可以为交换节点。
本申请实施例中,通过使用TLP头的第一字段指示传输数据所需要的信息,例如数据类型,第三节点可以是端节点也可以是交换节点,第二节点可以是端节点也可以是交换节点,这样可以实现端节点之间、交换节点之间、以及端节点与交换节点之间不通过Root就可以进行通信,从而降低PCIe系统中节点与节点之间的通信复杂度。
在一种可能的设计中,第一字段还用于指示数据类型对应的至少一个参数信息。上述设计中,可以使用TLP头的第一字段指示传输数据所需要的信息,例如数据类型对应的至少一个参数信息,可以使得节点之间的通信不经过Root。
在一种可能的设计中,第一字段为第二TLP头中的类型Type字段。上述设计中,通过使用TLP头中的Type字段来指示传输数据所需的信息,这样无需改动TLP结构,也可以使得节点之间的通信不经过Root。
在一种可能的设计中,第一字段的值为预留值。在上述设计中,第一字段的值为预留值,这样TLP就可以兼容原有数据传输方法和本申请实施例提供的数据传输方法,且无需改动TLP结构。
在一种可能的设计中,第二TLP头还包括第二字段,第二字段用于指示第三节点的身份信息。上述设计中,在第一字段仅用于指示数据类型时,可以通过第二字段指示数据类型对应的至少一个参数信息,以使得节点之间不经过Root进行通信。
在一种可能的设计中,在第一字段仅用于指示第一数据的数据类型时,第二字段还用于指示数据类型对应的至少一个参数信息。上述设计中,在第一字段仅用于指示数据类型时,可以通过第二字段指示数据类型对应的至少一个参数信息,以使得节点之间不经过Root进行通信。
在一种可能的设计中,第二字段为第二TLP头的字节4~字节15或字节4~字节11。上述设计中,TLP头的字节4~字节15或字节4~字节11根据Type字段的不同而指示的内容不同,在第一字段指示数据类型时,可以使用该字节4~字节15或字节4~字节11指示目的设备的身份信息,或者指示目的设备的身份信息以及数据类型所对应的至少一个参数信息。
第四方面,本申请实施例提供一种基于PCIe的数据传输装置,该装置可以是通信设备,也可以是通信设备内的芯片或芯片组,其中,通信设备可以为第一节点、第二节点或第三节点中的任一个,也就是说该通信设备可以是端节点也可以是交换节点。该装置可以包括处理单元和收发单元。当该装置是通信设备时,该处理单元可以是处理器,该收发单元可以是收发器;该装置还可以包括存储模块,该存储模块可以是存储器;该存储模块用于存储指令,该处理单元执行该存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。当该装置是通信设备内的芯片或芯片组时,该处理单元可以是处理器,该收发单元可以是输入/输出接口、管脚或电路等;该处理单元执行存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。该存储模块可以是该芯片或芯片组内的存储模块(例如,寄存器、缓存等),也可以是该网络设备内的位于该芯片或芯片组外部的存储模块(例如,只读存储器、随机存取存储器等)。
第五方面,本申请实施例提供一种基于PCIe的数据传输装置,包括:处理器,还可以包括通信接口和/或存储器。通信接口用于该装置与其他装置之间传输信息、和/或消息、和/或数据。该存储器用于存储计算机执行指令,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行如上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
第六方面,本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质用于存储计算机指令,当计算机指令在计算机上运行时,使得计算机执行上述第一方面或第一方面中任意一种可能的设计、第二方面或第二方面中任意一种可能的设计、第三方面或第三方面中任意一种可能的设计的数据传输方法。
第七方面,本申请还提供一种包括指令的计算机程序产品,计算机程序产品用于存储 计算机指令,当计算机指令在计算机上运行时,使得计算机执行上述第一方面或第一方面中任意一种可能的设计、第二方面或第二方面中任意一种可能的设计、第三方面或第三方面中任意一种可能的设计的数据传输方法。
第八方面,本申请还提供一种PCIe系统,该系统包括第一节点、第二节点、第三节点,例如,第一节点为端节点,第二节点为交换节点,第三节点为端节点,其中,第一节点可以执行上述第一方面中相应的功能,第二节点可以执行上述第二方面中相应的功能,第三节点可以执行上述第三方面中相应的功能。
第九方面,本申请实施例提供的一种芯片,芯片包括至少一个处理器和通信接口,处理器与存储器耦合,用于读取存储器中存储的计算机程序以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
第十方面,本申请实施例提供一种芯片,包括通信接口和至少一个处理器,处理器运行以执行本申请实施例第一方面或第一方面中任意一种可能的设计、第二方面或第二方面中任意一种可能的设计、第三方面或第三方面中任意一种可能的设计的数据传输方法。
附图说明
图1为本申请实施例提供的一种PCIe系统的架构示意图;
图2为本申请实施例提供的另一种PCIe系统的架构示意图;
图3为本申请实施例提供的一种TLP的结构示意图;
图4为本申请实施例提供的一种TLP头的结构示意图;
图5为本申请实施例提供的一种数据传输方法的流程示意图;
图6为本申请实施例提供的一种摄像头的结构示意图;
图7为本申请实施例提供的一种图像业务的示意图;
图8为本申请实施例提供的另一种图像业务的示意图;
图9为本申请实施例提供的另一种图像业务的示意图;
图10为本申请实施例提供的另一种图像业务的示意图;
图11为本申请实施例提供的一种PCIe系统的架构示意图;
图12为本申请实施例提供的一种数据传输方法的流程示意图;
图13为本申请实施例提供的一种数据传输装置的结构示意图;
图14为本申请实施例提供的另一种数据传输装置的结构示意图;
图15为本申请实施例提供的另一种数据传输装置的结构示意图;
图16为本申请实施例提供的另一种数据传输装置的结构示意图;
图17为本申请实施例提供的另一种数据传输装置的结构示意图;
图18为本申请实施例提供的另一种数据传输装置的结构示意图。
具体实施方式
为了使本申请实施例的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施例作进一步地详细描述。
需要说明的是,本申请实施例中“多个”是指两个或两个以上,鉴于此,本申请实施例中也可以将“多个”理解为“至少两个”。“至少一个”,可理解为一个或多个,例如理解为一个、两个或更多个。例如,包括至少一个,是指包括一个、两个或更多个,而且不限制包括的是哪几个,例如,包括A、B和C中的至少一个,那么包括的可以是A、B、C、A和B、A和C、B和C、或A和B和C。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。
除非有相反的说明,本申请实施例提及“第一”、“第二”等序数词用于对多个对象进行区分,不用于限定多个对象的顺序、时序、优先级或者重要程度。
为便于技术人员理解,下面先结合附图对申请实施例所涉及的PCIe系统进行说明。
PCIe是一种高速短距离通信接口,广泛应用于计算机、测试仪器等设备中。PCIe可以快速读写内存,支持大宽带通信,一些车企将其传输距离加长,可以作为车内网大数据量通信接口。请参见图1,为本申请实施例提供的PCIe系统的一种结构示意图。如图1所示,PCIe系统可以包括一个根复合体(图1示出为根复合体1)、至少一个交换节点(图1中包括交换节点1和交换节点2)和至少一个端节点(图1中包括端节点1、端节点2以及端节点3)。
其中,根复合体1负责管理PCIe系统100中的所有总线(图1中以粗黑色连线示出)、交换节点和端节点,是PCIe系统100中各节点间通信的桥梁,也是PCIe系统100中各节点与CPU 1通信的桥梁。交换节点作为桥梁连接根复合体、其他交换节点、以及端节点中的一种或多种,是数据转发的节点,例如,交换节点1连接根复合体1、交换节点2、端节点1以及端节点2。端节点为端设备,如外围设备等,负责发送数据或者接收数据。
需要说明的是,CPU 1与根复合体1之间的接口不是PCIe,不属于PCIe系统100。该CPU 1可以与PCIe系统100所在的实体(例如计算机设备,车辆等)建立连接关系,也可以与PCIe系统100位于同一个实体中,用于接收PCIe系统100中各节点发送的数据,还可以对接收到的数据进行处理,例如进行格式转换、图像渲染等。
请参见图2,为两个PCIe系统的结构示意图。该两个该PCIe系统中的一个PCIe系统例如为图1所示的PCIe系统100,另一个PCIe系统为PCIe系统200。PCIe系统200可以包括根复合体2、交换节点3以及端节点4,PCIe系统200中各节点需经过根复合体2与CPU2通信。
需要说明的是,CPU 2与根复合体2之间的接口不是PCIe,不属于PCIe系统200。该CPU 2可以与PCIe系统200所在的实体(例如计算机设备,车辆等)建立连接关系,也可以与PCIe系统200位于同一个实体中,用于接收PCIe系统200中各节点发送的数据,还可以对接收到的数据进行处理,例如进行格式转换、图像渲染等。
由于一个PCIe系统中的节点(端节点或交换节点)都有各自的根复合体独立管理,一个PCIe系统中的节点的地址、和/或ID等皆由该PCIe系统中的根复合体独立分配,意味着,一个根复合体分配的地址、和/或ID只能在该根复合体所在的PCIe系统内具有唯一性。但在不同的PCIe系统中,节点的地址、和/或ID可能有重叠情况,因此在不同的PCIe系统中可能存在地址、和/或ID冲突。例如PCIe系统100中的根复合体1为端节点1分配地址1,地址1分别在PCIe系统100中和PCIe系统200中唯一,那么PCIe系统200中的 根复合体2也可以为端节点4分配该地址1,这样端节点1和端节点4具有相同的地址,从而导致端节点1和端节点2的地址冲突。为了实现两个PCIe系统的通信,需要在两个PCIe系统之间进行桥接转换,进行地址或ID的翻译。例如,可以在PCIe系统100和PCIe系统200部署非透明桥(non-transparent bridge,NTB),NTB能够进行地址的转换或翻译,或者进行ID的转换或翻译,从而实现两个PCIe系统的通信。
在PCIe系统中,节点与节点之间不能直接通信,必须经过根复合体,因为一个PCIe系统中的节点由各自的根复合体独立管理,只有根复合体和节点自身有权限去读取该节点的配置空间,其他节点均无权限读取。一个节点的配置空间用于存储该节点的功能、地址、或ID等信息,一个节点的功能例如包括该节点支持的数据类型、或支持的数据格式等。而PCIe系统中,一个节点不知道其他节点支持的数据类型或格式等,因此在PCIe系统中端节点与端节点之间、交换节点与交换节点之间、以及端节点与交换节点之间不经过根复合体无法直接通信。
在PCIe系统中,各节点之间通过PCIe接口传输数据,PCIe协议中将用于传输数据的数据包称为事务层包(transaction layer packet,TLP)。请参见图3,为本申请实施例提供的TLP的一种结构示意图。如图3所示,一个TLP主要由一个或多个可选的TLP前缀(TLP Prefixes)、一个TLP头(TLP Header)、一个数据载荷(Data Payload)以及一个可选的TLP摘要(TLP Digest)组成。其中,TLP前缀的长度为H字节(byte),用于在PCIe的两端传递消息,或者用于在发送设备和接收设备之间传递消息,H为大于或等于0的整数;TLP头的长度可以是12字节,也可以是16字节,用于指示PCIe业务类型、地址等信息;数据载荷的长度可以为0~4K字节,用于承载数据;TLP摘要的长度可以是4字节,一个TLP是否需要TLP摘要由TLP头中的TLP摘要指示(indicates presence of TLP Digest,TD)字段决定,例如,如果接收设备支持端到端循环冗余校验码(end-to-end cyclic redundancy check,ECRC)的校验功能,则TLP摘要用于放置ECRC。
请参见图4,为本申请实施例提供的TLP头的一种结构示意图,该图中以TLP头的长度是16字节为例。如图4所示,TLP头包括:
1)格式(format,Fmt)字段:该字段的长度可以为3比特(bit),用于指示TLP头的长度以及TLP是否有数据载荷。TLP头的长度有12字节或16字节2种情况,TLP是否包含数据载荷有或否2种情况,因此,Fmt字段可以指示4种信息,分别为:TLP头的长度为12字节且TLP包含数据载荷、TLP头长度为12字节且TLP不包含数据载荷、TLP头的长度为16字节且TLP包含数据载荷、TLP头的长度为16字节且TLP不包含数据载荷。此外,Fmt字段还可以指示TLP前缀。Fmt字段包括3bit,共8个状态值,其中,8个状态值中的5个状态值可以用来指示上述5种信息,剩下3个状态值预留(reserved)。例如,000、001、010、011、100这5个状态值可以用于指示上述5种信息,剩下101、110、111这3个状态值预留。
2)类型(Type)字段:Type字段的长度可以为5bit,用于指示PCIe的业务类型、地址、ID等信息。PCIe业务类型有6种,分别为:存储器(memory)读/写、输入/输出(input/output,I/O)读/写、配置(configuration)读/写、消息(message)请求、结束(completion)、原子操作。Type字段包括5bit,共32个状态值,例如,PCI Express Base Specification Revision 5.0 Version 1.0中使用其中的19个状态值指示PCIe的业务类型,剩下13个状态值为预留。例如,可以使用00000、00001、00010、00100、00101、11011、10000~10111、01010、01011、 01100、01101、01110来指示TLP的业务类型,剩下的13个状态值00011、00110、00111、01000、01001、01111、11000~11010、11100~11111为reserve。
3)T9/T8:预留比特。
4)流量等级(traffic class,TC)字段:用于指示调度流量的优先级,TC字段包括3比特,共8个状态值,对应8个等级,即0~7,TC字段默认为0(对应的状态值为000)。数字越大,优先级越高。
5)属性(attributes,Attr)字段:用于指示TLP属性,例如,TLP属性例如为订购(ordering)属性,或硬件一致性管理(hardware coherency management)属性等。
6)轻量级指示(lightweight notification,LN)字段:轻量级指示,PCIe定义的一种简单读写方式。
7)TLP处理提示(TLP processing hints,TH)字段:用于指示TLP头尾部是否有处理提示。
8)TD字段:用于指示TLP尾部是否包含TLP摘要、或ECRC等。
9)中毒数据(poisoned data,EP):用于指示当前TLP中数据载荷字段所承载的数据是否为中毒数据。
10)地址类型(address type,AT):用于指示当前TLP携带的地址是否需要翻译。
11)长度(length):用于指示当前TLP中数据载荷字段的长度,例如以4字节为最小单位。
12)Byte4~Byte7:根据业务类型定义,即Byte4~Byte7可以指示Type字段所指示的PCIe的业务类型相应的内容。
13)Byte8~Byte15:根据路由方式的不同填充不同的地址或者ID。其中,Byte8~Byte11可以填充目的节点的地址或者目的节点的ID,Byte12~Byte15可以填充源节点的地址或者源节点的ID。或者,Byte8~Byte11可以填充源节点的地址或者源节点的ID,Byte12~Byte15可以填充目的节点的地址或者目的节点的ID。
需要说明的是,12字节的TLP头的结构与16字节的TLP头的结构类型类似,区别在于16字节的TLP头中Byte4-Byte7根据业务类型定义,Byte8-Byte15填充地址信息,而12字节的TLP头中Byte4-Byte7根据业务类型定义,Byte8-Byte11填充地址信息。
需要说明的是,本申请实施例中涉及的“预留值”可以指TLP中各字段未被使用的状态值,例如,Type字段的00011、00110、00111、01000、01001、01111、11000~11010、11100~11111这13个状态值,“预留值”也可以称为“reserve值”,还可以称为“预留状态值”。本申请实施例中涉及的“已使用的状态值”可以指TLP中各字段被使用的状态值,例如,Type字段的00000、00001、00010、00100、00101、11011、10000~10111、01010、01011,01100、01101、01110这19个状态值。
可以理解的,在后续演进版本中,本申请实施例中涉及的“预留值”也可以指对应演进版本中TLP未被使用的状态值,本申请实施例不作限制。
PCIe系统中节点之间必须通过Root通信的工作机制,会导致PCIe系统中节点与节点之间的通信复杂度大幅度提升。如图1或图2中,虽然端节点1与端节点2连接在交换节点1上,但两者是不能直接通过交换节点1通信的,端节点1必须先同根复合体1通信,经根复合体1才能找到端节点2,或者端节点2必须先同根复合体1通信,经根复合体1才能找到端节点1。例如,端节点1向端节点2发送数据,具体过程可以是:端节点1将 数据发送给交换节点1,交换节点1将该数据发送给根复合体1,根复合体1根据各个端节点(例如,端节点2或端节点3)的功能确定数据接收方为端节点2,例如该数据为图像数据,或者说该数据的类型为图像类型,根复合体1根据该数据的类型,确定需要将该数据发送给具备显示或播放功能的端节点,例如根复合体1确定端节点2具有显示功能,因此根复合体1可以将数据发送给交换节点1,交换节点1再将数据发送给端节点2。
鉴于此,本申请实施例提供一种基于PCIe的数据传输方法及装置,用以使得PCIe系统中节点与节点间的通信不经过根复合体,从而能降低PCIe系统中各节点之间的通信复杂度。
其中,本申请实施例提供的方法和装置是基于同一技术构思的,由于方法与装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。本申请实施例提供的方法可以应用于车内网,特别是自动驾驶汽车的车内网,当然也可以应用于其他设备的PCIe系统。
请参见图5,为本申请实施例提供的基于PCIe的数据传输方法的流程图,该方法可以应用于PCIe系统,例如,该方法可以应用于图1所示的PCIe系统100,也可以应用于图2所示的PCIe系统200。下面以应用于PCIe系统100为例,对本申请实施例提供的数据传输方法进行说明。如图5所示,该方法流程包括:
S501:第一节点将第一数据封装成第一TLP,其中,第一TLP的TLP头包括第一字段,该第一字段用于指示第一数据的数据类型。
第一节点可以是PCIe系统100中的端节点或端节点中的芯片,也可以是PCIe系统100中的交换节点或交换节点中的芯片。例如,第一节点可以是PCIe系统100的端节点1,也可以是端节点1中的传输节点,例如发送/接收(transport/receive,TX/RX)等。以摄像机(camera)为例,请参见图6,摄像机可以包括镜头(lens)、感光元件,例如互补金属氧化物半导体(complementary metal oxide semiconductor,CMOS)、以及TX/RX等,COMS用于通过镜头采集图像数据,并通过TX/RX发送给PCIe系统100中的其他节点,即第一节点可以是摄像机,也可以是摄像机中的TX/RX。
第一节点可以将第一数据封装在第一TLP的数据载荷中。若第一节点是端节点,第一节点封装的第一数据可以是第一节点所采集的数据。例如,第一节点是摄像机,第一数据可以是摄像机采集的图像数据等,然后摄像机将采集的图像数据发送给第二节点。再例如,第一节点是端节点中的传输节点,第一节点封装的第一数据可以是端节点中的传输芯片采集的图像数据,然后端节点中的传输节点将采集的图像数据发送给第二节点。以图6为例,第一数据可以是CMOS采集的图像数据,然后通过TX/RX发送给第二节点。
在S501中,第一节点将第一数据封装成第一TLP时,可以使用第一TLP的TLP头的第一字段来指示传输第一数据所需的信息,以使得第一数据不经过根复合体传输给其他节点。其中,TLP传输第一数据所需的信息可以包括第一数据的类型,数据的类型可以包括:图像类型,音频类型,控制类型,SWRITE类型,或安全类型等。其中,图像类型用于指示TLP所传输的数据为图像数据;音频类型用于指示TLP所传输的数据为音频数据;控制类型用于指示TLP承载控制类信息;SWRITE类型用于指示TLP所传输的数据的对齐方式,例如以4字节为最小单位进行读写;安全类型用于指示TLP承载安全类信息,例如加密的情况下所对应的密钥等。
其他在一种可能的实施方式中,第一字段可以是TLP头中的Type字段,即第一节点 使用第一TLP的TLP头的Type字段来指示第一数据的类型。
在一种示例性说明中,可以使用Type字段的预留值(或称为预留状态)指示第一数据的数据类型。例如,使用Type字段的00000、00001、00010、00100、00101、11011、10000~10111、01010、01011、01100、01101、01110这13个状态值中的任一状态值来指示第一数据的数据类型。这种实现方式中,由于这13个状态值未被使用,即Type字段仅用于指示数据类型,如图7所示,因此可以兼容原有数据传输方法和本申请实施例提供的数据传输方法。例如,使用00011指示图像类型,使用00110指示音频类型,使用00111指示控制类型,使用01000指示SWRITE类型,使用01001指示安全类型,从而接收侧节点可以根据状态值是否为预留状态值来确定数据传输方法。其中,状态值为已使用的状态值时,接收侧节点可以根据该状态值确定数据传输方法为原有的数据传输方法,以及PCIe的业务类型;状态值为预留状态值时,接收侧节点可以根据该状态值确定数据传输方法为本申请实施例所提供的数据传输方法,以及数据类型。
在一种可能的实施方式中,第一TLP的TLP头还包括第二字段,该第二字段可以用于指示第一TLP的目的设备(记为第三节点)的身份信息,例如第三节点的地址、ID等。该第二字段还可以用于指示第一节点的身份信息,例如第一节点的地址、ID等。其中,第三节点可以是PCIe系统100中的端节点,也可以是PCIe系统100中的交换节点。
示例性地,第二字段可以是16字节TLP头中的Byte4-Byte15,也可以是12字节TLP头中的Byte4-Byte11。若TLP头的长度为16字节,则TLP头的Byte8-Byte15可以携带第一节点的身份信息和第三节点的身份信息。若TLP头的长度为12字节,则TLP头的Byte8-Byte11可以携带第一节点身份信息和第三节点的身份信息。
在一种可能的实施方式中,第一节点可以提取第一数据的参数信息,该参数信息与数据类型对应,可以用于表征数据类型的属性。数据类型对应的至少一个参数信息可以如下所示:
1)数据类型为图像类型时,图像类型对应的参数信息可以包括如下信息中的一项或多项:图像数据类型,例如,未经加工的图像格式(raw image format)、RGB、YUV、嵌入式数据(embedded data)、压缩图像、图像中目标轮廓(Object)等;像素比特量化深度,例如12、20、24等;分辨率,例如1080P、2K、4K等;分段指示信息,图像感光器(sensor)一次输出一行图像,对于分辨率高的图像TLP无法一次传输一行图像,需使用若干个TLP传输一行图像,分段指示信息用于指示当前TLP是当前行的第几段。
2)数据类型为音频类型时,音频类型对应的参数信息可以包括如下信息中的一项或多项:采样量化格式,例如浮点量化,整数量化等;采样频率,例如24KHz,48KHz等;量化深度,例如每个采样8bit,12bit等;声道数/通道数,声道数用于指示当前TLP包括几个声道,通道数用于指示当前TLP包括几个通道。
3)数据类型为控制类型时,控制类型对应的参数信息可以包括如下信息中的一项或多项:控制类信息类型,例如集成电路总线(inter-integrated circuit,I2C)、通用输入/输出(general-purpose input/output,GPIO)、串行外设接口(serial peripheral interface,SPI)等;每类控制信息数量,例如当前TLP包括3路I2C,8路GPIO。
4)数据类型为安全类型时,安全类型对应的参数信息可以包括如下信息中的一项或多项:消息类型,建立安全需要多条消息交互,每条交互消息的类型不同,例如鉴权消息、加密消息等;格式指示,消息中的比特如何分组,每个组表示什么意思;当前TLP携带的 数据在加密的情况下所对应的密钥信息。
5)数据类型为SWRITE类型时,SWRITE类型对应的参数信息可以包括如下信息:对齐方式,是以4字节为最小单位对齐,还是以8字节为最小单位对齐。
可以理解的是,本申请实施例中,“参数信息”仅是一种示例性命名,在具体实施中也可以命名为其他,如也可以称为属性、属性参数、封装参数等,或者,也可以称为A,只要A与本申请实施例中参数信息具有相同或相似的含义可以将A理解为本申请实施例中的参数信息。
以图6为例,若第一节点为摄像机,第一节点可以确定所采集的图像数据的图像数据类型、像素量化深度、分辨率等,并根据图像数据类型、像素量化深度、分辨率等可以计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量可得出传输一行图像需要TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。若第一节点为摄像机中的TX/RX,第一节点可以接收CMOS所采集的图像数据,该图像数据包括图像数据类型、像素量化深度、分辨率等参数信息,第一节点可以根据该图像数据包括的图像数据类型、像素量化深度、分辨率等计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量可得出传输一行图像需要TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。
在一种示例中,可以使用TLP头中的第一字段指示数据类型以及数据类型对应的至少一个参数信息。具体地,可以使用Type字段的13个预留状态值指示数据类型以及数据类型对应的至少一个参数信息。这种实现方式中,可以将数据类型以及数据类型对应的至少一个参数信息进行绑定,在绑定后得到多个信息集合,例如,信息集合1包括数据类型为图像类型、图像类型为YUV、图像分辨率为2K、像素量化深度为12、当前TLP是当前行的第1段;信息集合2包括:数据类型为图像类型、图像类型为YUV、图像分辨率为2K、像素量化深度为12、当前TLP是当前行的第2段;信息集合3包括:数据类型为图像类型、图像类型为RGB、图像分辨率为4K、像素量化深度为12、当前TLP是当前行的第1段等。例如,以第一数据的数据类型为图像类型为例,使用Type字段的预留状态值指示图像类型、图像数据类型、像素量化深度、分辨率以及分段指示信息,如图8所示。应理解的是,图8仅是一种示例性说明,并不对各个参数信息的长度以及在TLP头中的位置进行具体限定。
在另一种示例中,可以使用第一字段指示数据类型,第二字段指示数据类型对应的至少一个参数信息。具体地,可以使用Type字段的13个预留状态值指示数据类型,第二字段指示数据类型对应的至少一个参数信息。这种实施方式中,Type字段可以不指示参数信息。例如,以第一数据的数据类型为图像类型为例,使用Type字段的预留状态值指示图像类型、使用第二字段指示图像数据类型、像素量化深度、分辨率以及分段指示信息,如图9所示。应理解的是,图9仅是一种示例性说明,并不对各个参数信息的长度以及在TLP头中的位置进行具体限定。
在另一种示例中,可以使用第一资源指示数据类型和第一参数信息,第二字段指示第二参数信息,其中,该第二参数信息为数据类型对应的参数信息中除第一参数信息之外的参数信息,也就是说,使用第一字段和第二字段分别指示数据类型对应的不同的参数信息。具体地,可以使用Type字段的13个预留状态值指示数据类型和第一参数信息,第二字段指示第二参数信息。例如,以第一数据的数据类型为图像类型为例,使用Type字段的预 留状态值指示图像类型、图像数据类型,第二字段指示像素量化深度、分辨率、分段指示信息,如图10所示。应理解的是,图10仅是一种示例性说明,并不对各个参数信息的长度以及在TLP头中的位置进行具体限定。
需要说明的是,本申请实施例中通过上述方式可以指示图像类型、音频类型、控制类型、SWRITE类型、安全类型中的一种数据类型的一种格式。或者,也可以指示图像类型、音频类型、控制类型、SWRITE类型、安全类型中的一种数据类型的多种格式。或者,也可以指示图像类型、音频类型、控制类型、SWRITE类型、安全类型中的多种数据类型的多种格式。或者,还可以指示图像类型、音频类型、控制类型、SWRITE类型、安全类型中的多种数据类型混合(例如图像格式的安全信息、带安全信息的音频数据等)。或是其他数据类型及格式,本申请实施例对此不作限定。
S502:第一节点向第二节点发送第一TLP。
其中,第二节点可以是PCIe系统100中的端节点或端节点中的芯片,也可以是PCIe系统100中的交换节点或交换节点中的芯片。在一种示例中,第二节点可以是与第一节点有连接关系的交换节点,例如,如果第一节点是端节点1,则第二节点是交换节点1。
S503:第二节点接收到第一TLP后,向第三节点发送第二TLP。
具体地,第二节点接收来自第一节点的第一TLP,通过对第一TLP进行解封装,得到第三节点的身份信息,第二节点根据第三节点的身份信息,确定路由路径,从而根据路由路将向第三节点发送第二TLP。
在一种可能的实施方式中,第二节点接收的第一TLP与第二节点发送的第二TLP为同一个TLP,即,第二节点在接收到第一节点发送的第一TLP后,将该第一TLP转发给第三节点。
在另一种可能的实施方式中,第二节点接收的第一TLP与第二节点发送的第二TLP为不同TLP,即,第二节点在接收到第一节点发送的第一TLP后,对第一TLP进行处理,例如将该第一TLP的源节点的身份信息由第一节点的身份信息修改为第二节点的身份信息等,然后将处理得到的第二TLP发送给第三节点,其中,第二节点接收的第一TLP与第二节点发送的第二TLP所携带的第一数据、参数信息相同。第二节点发送的第二TLP携带第一数据、参数信息的方式可以参阅上述步骤S501的相关描述,在此不再赘述。
S504:第三节点基于第一字段获得第一数据。
具体地,第三节点接收到来自第二节点的第二TLP,对该第二TLP进行解封装得到第二TLP头中的第一字段,进而基于第一字段获得第一数据。
在一种示例中,第三节点可以根据TLP头的Type字段确定数据类型以及数据类型对应的参数信息。例如,如图8所示,第三节点可以根据TLP头的Type字段的状态值确定第一数据的数据类型为图像类型,以及第一数据的图像数据类型、像素量化深度、分辨率以及分段指示信息。
在另一种示例中,第三节点可以根据TLP头的Type字段确定数据类型,根据TLP头的第二字段确定该数据类型对应的至少一个参数信息。例如,如图9所示,第三节点可以根据TLP头的Type字段的状态值确定第一数据的数据类型为图像类型,根据TLP头的第二字段确定第一数据的图像数据类型、像素量化深度、分辨率、分段指示信息。
在另一种示例中,第三节点可以根据TLP头的Type字段确定数据类型和第一参数信息,根据TLP头的第二字段确定第二参数信息,其中,第二参数信息为数据类型对应的参 数信息中除第一参数信息之外的参数信息。例如,如图10所示,第三节点可以根据TLP头的Type字段的状态值确定第一数据的数据类型为图像类型,第一数据的图像数据类型,根据TLP头的第二字段确定第一数据的像素量化深度、分辨率、分段指示信息。
需要说明的是,图5所示的传输方法可以应用于如图1所示的单个PCIe系统中,也可以应用于如图2所示的单个PCIe系统中,本申请实施例对此不作限定。
以图2所示的PCIe系统100和PCIe系统200为例,第一节点可以是端节点3,第二节点可以是交换节点2,第三节点可以是端节点4,第一数据从端节点3传输到端节点4的流程包括:
A1:端节点3将第一TLP发送给交换节点2,第一TLP包括第一数据,第一TLP的TLP头的Type字段指示数据类型和参数信息,该TLP头的第二字段指示端节点3的身份信息,以及端节点4的身份信息(具体封装方式可参见S501,在此不再赘述);
A2:交换节点2接收到第一TLP后,对第一TLP的TLP头进行解封装得到端节点4的身份信息,根据端节点4的身份信息将第一TLP发送给交换节点中的NTB;
A3:交换节点2中的NTB接收到第一TLP后,对第一TLP的TLP头进行解封装得到端节点4的身份信息,可以对端节点4的身份信息进行翻译/转换,得到第二TLP并将第二TLP发送给交换节点3中的NTB,第二TLP包括第一数据,第二TLP的TLP头的Type字段指示数据类型和参数信息,该TLP头的第二字段指示端节点3的身份信息,以及端节点4的身份信息,第一TLP与第二TLP可以相同也可以不同;例如,交换节点2中的NTB对端节点4的身份信息进行翻转/转换,找到交换节点3中的NTB,在翻转/转换过程中,如果交换节点2中的NTB将端节点4的身份信息修改为PCIe系统200可识别的身份信息,则第二TLP与第一TLP不同;如果交换节点2中的NTB没有将端节点4的身份信息修改为PCIe系统200可识别的身份信息,则第二TLP与第一TLP相同;
A4:交换节点3中的NTB接收到第二TLP后,对第一TLP的TLP头进行解封装得到端节点4的身份信息,可以对端节点4的身份信息进行翻译/转换,得到第三TLP并将第三TLP发送给交换节点3中的NTB,第三TLP包括第一数据,第三TLP的TLP头的Type字段指示数据类型和参数信息,该TLP头的第二字段指示端节点3的身份信息,以及端节点4的身份信息,第三TLP与第二TLP可以相同也可以不同(类似上述步骤A3中第一TLP与第二TLP可以相同也可以不同);
A5:交换节点3接收到第三TLP后,对第三TLP的TLP头进行解封装得到端节点4的身份信息,根据端节点4的身份信息将第三TLP发送给端节点4;端节点4接收到第三TLP后,对第三TLP的TLP头解封装得到Type字段,并基于Type字段获得第一数据(具体数据获取过程可参见S504,在此不再赘述),从而完成跨PCIe系统的数据传输。
需要说明的是,NTB对身份信息的翻译/转换的具体实现过程可参见现有技术,本申请实施例对此不作限定。
下面结合图11所示的PCIe系统,对数据传输过程进行具体描述。请参见图11,PCIe系统300中包括根复合体1,交换节点1,与交换节点1具有连接关系的摄像机(Camera)1、摄像机2、交换节点2,以及与交换节点2具有连接关系的显示器(Display)3。摄像机1将拍摄的图像数据发送到显示器3上进行显示。
其中,摄像机1通过上述实施例(或图5所示的流程)中第一节点执行的方法,将拍摄得到的图像数据传输到交换节点1和交换机2;交换节点2可以通过上述实施例(或图 5所示的流程)中第二节点执行的方法,将图像数据传输到显示器3上进行显示;显示器3可以通过上述实施例(或图5所示的流程)中第三节点执行的方法获取该图像数据。以TLP头的长度为16字节,交换节点1、2接收到TLP与发送的TLP相同为例,请参见图12,为摄像机1将图像数据传输到显示器3进行显示的具体过程。
S10:摄像机1拍摄得到图像数据。
摄像机1可以响应于拍摄指令(例如通过摄像机1的拍摄按键触发)进行拍摄,从而得到图像数据。
S11:摄像机1根据图像数据,确定图像数据的数据类型为图像类型,以及图像数据的参数信息。例如,图像数据类型(如RGB、YUV等),每像素量化bit数,图像分辨率(如2K、4K等)。还可以计算出图像每一行的数据量,根据PCIe每个TLP承载的最大数据量确定传输一行图像需要TLP的数量,然后决定图像的分段方式,进而确定分段指示信息。
S12:摄像机1将图像数据封装成TLP。
示例性地,摄像机1可以按照如下三种方式中的任一种方式将图像数据封装成TLP:
方式1,可以使用TLP头的Type字段指示传输该图像数据所需的信息,例如数据类型:图像类型,图像数据的参数信息:图像数据类型、像素量化深度、分辨率、分段指示信息等。若使用Type字段的预留值指示数据类型和参数信息,则如图8所示。进一步地,摄像机1将图像数据填充到数据载荷中,将自己的身份信息(例如ID、地址等)以及显示器3的身份信息(例如ID、地址等)填充到TLP头的Byte 8~Byte 15。
方式2,可以使用TLP头的Type字段以及第二字段指示传输该图像数据所需的信息,其中,Type字段指示数据类型图像类型,第二字段(例如Byte 4~Byte 15)指示图像数据的参数信息,例如数据类型:图像类型,图像数据的参数信息:图像数据类型、像素量化深度、分辨率、分段指示信息等。若使用Type字段的预留值指示数据类型,则如图9所示。进一步地,摄像机1将图像数据填充到数据载荷中,将自己的身份信息(例如ID、地址等)以及显示器3的身份信息(例如ID、地址等)填充到TLP头的Byte 8~Byte 15。
方式3,可以使用TLP头的Type字段以及第二字段指示传输该图像数据所需的信息,其中,Type字段指示数据类型图像类型和图像数据的部分参数信息,第二字段(例如Byte4~Byte 15)指示图像数据的剩余参数信息,例如数据类型:图像类型,图像数据的部分参数信息:图像数据类型,图像数据的剩余参数信息:像素量化深度、分辨率、分段指示信息等。若使用Type字段的预留值指示数据类型和部分参数信息,则如图10所示。进一步地,摄像机1将图像数据填充到数据载荷中,将自己的身份信息(例如ID、地址等)以及显示器3的身份信息(例如ID、地址等)填充到TLP头的Byte 8~Byte 15。
S13:摄像机1将TLP发给与摄像机1有连接关系的交换节点1。
S14:交换节点1接收到TLP后,检测TLP头,解析Type字段。
S15:在确定Type字段为本申请实施例定义的内容后,根据TLP中显示器2的身份信息确定路由路径,并根据路由路径将TLP发送给与显示器2有连接关系的交换节点2。
在S14~S15中,如果交换节点1确定Type字段为是现有PCIe系统定义的内容,则按照现有PCIe系统工作机制进行处理,即将TLP发送给根复合体1,然后由根复合体1根据访问各个端节点(例如摄像机2和显示器3)的配置空间确定接收侧节点,然后将TLP发送给接收侧节点或与接收侧节点有连接关系的交换节点。
S16:交换节点2接收到TLP后,检测TLP头,解析Type字段。
S17:在确定Type字段为本申请实施例定义的内容后,根据TLP中显示器2的身份信息,将TLP发送给显示器2。
在S16~S17中,如果交换节点2确定Type字段为是现有PCIe系统中定义的内容,则按照现有PCIe系统工作机制进行处理,即将TLP发送给根复合体1,然后由根复合体1根据访问各个端节点(例如摄像机2和显示器3)的配置空间确定接收侧节点,然后将TLP发送给接收侧节点或与接收侧节点有连接关系的交换节点。
S18:显示器2接收到TLP后,检测TLP头,解析Type字段,获得图像数据的数据类型和参数信息,根据参数信息(例如分段指示信息等)恢复一幅完整的图像,并在显示屏上显示图像。
示例性地,对于S12中的三种封装方式,显示器3可以按照如下方式对TLP进行解封装:
对应S12中的方式1,显示器3解析TLP头的Type字段,根据Type字段的状态值确定数据类型为图像类型,以及图像数据的参数信息,例如图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息等。
对应S12中的方式2,显示器3解析TLP头的Type字段,根据Type字段的状态值确定数据类型为图像类型;解析TLP头的Byte 4~Byte 15确定图像数据的参数信息,例如图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息等。
对应S12中的方式3,显示器3解析TLP头的Type字段,根据Type字段的状态值确定数据类型为图像类型以及图像数据的部分参数信息,例如图像数据的图像数据类型等;解析TLP头的Byte 4~Byte 15确定图像数据的剩余参数信息,例如图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息等。
本申请的上述实施例中,通过使用Type字段指示TLP传输数据所需要的信息,例如数据类型、数据类型对应的参数信息等,这样可以使得PCIe系统中节点与节点之间的通信(例如,端节点与端节点之间的通信,或者,交换节点与交换节点之间的通信,或者,端节点与交换节点之间的通信)不经过根复合体,从而可以降低PCIe系统中各节点之间的通信复杂度。
基于与方法实施例的同一技术构思,本申请实施例提供一种数据传输装置。该装置的结构可以如图13所示,包括处理单元1301以及发送单元1302。
数据传输装置1300具体可以用于实现图5至图12的实施例中第一节点执行的方法,该装置1300可以是第一节点本身,也可以是第一节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,处理单元1301,用于将第一数据封装成第一TLP,第一TLP的TLP头包括第一字段,第一字段用于指示第一数据的数据类型;发送单元1302,用于向第二节点发送第一TLP。
在一种可能的实施方式中,数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型。
在另一种可能的实施方式中,第一字段还用于指示数据类型对应的至少一个参数信息。
在另一种可能的实施方式中,第一字段为第一TLP的TLP头中的类型Type字段。
在另一种可能的实施方式中,第一字段的值为预留值。
在另一种可能的实施方式中,第一TLP的TLP头还包括第二字段,第二字段用于指示第三节点的身份信息,第三节点为第一TLP的目的设备。
在另一种可能的实施方式中,在第一字段仅用于指示第一数据的数据类型时,第二字段还用于指示数据类型对应的至少一个参数信息。
在另一种可能的实施方式中,第二字段为第一TLP的TLP头的字节4~字节15或字节4~字节11。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。可以理解的是,本申请实施例中各个模块的功能或者实现可以进一步参考方法实施例的相关描述。
在一种可能的实施方式中,数据传输装置1400可以如图14所示,该装置1400可以是端节点或者端节点中的芯片。该装置1400可以包括处理器1401,还可以包括收发器1402,存储器1403。其中,处理单元1301可以为处理器1401。发送单元1302可以为收发器1402。
处理器1401,可以是一个CPU,或者为数字处理单元等。收发器1402可以是通信接口、也可以为接口电路如收发电路等、也可以为收发芯片等。该装置1400还包括:存储器1403,用于存储处理器1401执行的程序。存储器1403可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器1403是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
处理器1401用于执行存储器1403存储的程序代码,具体用于执行上述处理单元1301的动作,本申请在此不再赘述。收发器1402具体用于执行上述发送单元1302的动作,本申请在此不再赘述。
本申请实施例中不限定上述收发器1402、处理器1401以及存储器1403之间的具体连接介质。本申请实施例在图14中以存储器1403、处理器1401以及收发器1402之间通过总线1404连接,总线在图14中以粗线表示,其他部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线1404可以分为地址总线、数据总线、控制总线等。为便于表示,图14中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
基于与方法实施例的同一技术构思,本申请实施例提供一种数据传输装置1500。该装置1500的结构可以如图15所示,包括接收单元1501、发送单元1502以及处理单元1503。
数据传输装置1500可以实现图5至图12的实施例中第二节点执行的方法,该装置1500可以是第二节点本身,也可以是第二节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,接收单元1501,用于接收来自第一节点的第一事务层包TLP,第一TLP包括第一数据;发送单元1502,用于向第三节点发送第二TLP,第二TLP包括第一数据;其中,TLP的TLP头包括第一字段,第一字段用于指示第一数据的数据类型,TLP包括第一TLP、和/或第二TLP。
在一种可能的实施方式中,数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型。
在一种可能的实施方式中,第二TLP包括第一数据可以理解为第二TLP与第二TLP 包括的数据的内容相同。
在另一种可能的实施方式中,第一字段还用于指示数据类型对应的至少一个参数信息。
在另一种可能的实施方式中,第一字段为TLP头中的类型Type字段。
在另一种可能的实施方式中,第一字段的值为预留值。
在另一种可能的实施方式中,TLP头还包括第二字段,第二字段用于指示第三节点的身份信息。
在另一种可能的实施方式中,在第一字段仅用于指示第一数据的数据类型时,第二字段还用于指示数据类型对应的至少一个参数信息。
在另一种可能的实施方式中,第二字段为TLP包的TLP头的字节4~字节15或字节4~字节11。
在另一种可能的实施方式中,装置1500还包括处理单元1503,处理单元1503用于:根据第三节点的身份信息,确定路由路径;发送单元1502,具体用于:根据路由路径,将第二TLP发送给第三节点。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。可以理解的是,本申请实施例中各个模块的功能或者实现可以进一步参考方法实施例的相关描述。
在一种可能的实施方式中,数据传输装置1600可以如图16所示,该装置1600可以是端节点或者端节点中的芯片。该装置1600可以包括处理器1601,还可以包括收发器1602,存储器1603。其中,处理单元1503可以为处理器1601。接收单元1501和发送单元1502可以为收发器1602。
处理器1601,可以是一个CPU,或者为数字处理单元等。收发器1602可以是通信接口、也可以为接口电路如收发电路等、也可以为收发芯片等。该装置1600还包括:存储器1603,用于存储处理器1601执行的程序。存储器1603可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器1603是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
处理器1601用于执行存储器1603存储的程序代码,具体用于执行上述处理单元1503的动作,本申请在此不再赘述。收发器1602具体用于执行上述接收单元1501和发送单元1502的动作,本申请在此不再赘述。
本申请实施例中不限定上述收发器1602、处理器1601以及存储器1603之间的具体连接介质。本申请实施例在图16中以存储器1603、处理器1601以及收发器1602之间通过总线1604连接,总线在图16中以粗线表示,其他部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线1604可以分为地址总线、数据总线、控制总线等。为便于表示,图16中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
基于与方法实施例的同一技术构思,本申请实施例提供一种数据传输装置。该装置的结构可以如图17所示,包括接收单元1701以及处理单元1702。
数据传输装置1700具体可以用于实现图5至图12的实施例中第三节点执行的方法, 该装置1700可以是第三节点本身,也可以是第三节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,接收单元1701,用于接收来自第二节点的第二事务层包TLP,第二TLP包括第一数据,第二TLP的TLP头包括第一字段,第一字段用于指示第一数据的数据类型;处理单元1702,用于基于第一字段获得第一数据。
在一种可能的实施方式中,数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型。
在一种可能的实施方式中,第一字段还用于指示数据类型对应的至少一个参数信息。
在另一种可能的实施方式中,第一字段为第二TLP头中的类型Type字段。
在另一种可能的实施方式中,第一字段的值为预留值。
在另一种可能的实施方式中,第二TLP头还包括第二字段,第二字段用于指示第三节点的身份信息。
在另一种可能的实施方式中,在第一字段仅用于指示第一数据的数据类型时,第二字段还用于指示数据类型对应的至少一个参数信息。
在另一种可能的实施方式中,第二字段为第二TLP头的字节4~字节15或字节4~字节11。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。可以理解的是,本申请实施例中各个模块的功能或者实现可以进一步参考方法实施例的相关描述。
在一种可能的实施方式中,数据传输装置1800可以如图18所示,该装置1800可以是端节点或者端节点中的芯片。该装置1800可以包括处理器1801,还可以包括收发器1802,存储器1803。其中,处理单元1702可以为处理器1801。接收单元1701可以为收发器1802。
处理器1801,可以是一个CPU,或者为数字处理单元等。收发器1802可以是通信接口、也可以为接口电路如收发电路等、也可以为收发芯片等。该装置1800还包括:存储器1803,用于存储处理器1801执行的程序。存储器1803可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器1803是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
处理器1801用于执行存储器1803存储的程序代码,具体用于执行上述处理单元1702的动作,本申请在此不再赘述。收发器1802具体用于执行上述接收单元1701的动作,本申请在此不再赘述。
本申请实施例中不限定上述收发器1802、处理器1801以及存储器1803之间的具体连接介质。本申请实施例在图18中以存储器1803、处理器1801以及收发器1802之间通过总线1804连接,总线在图18中以粗线表示,其他部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线1804可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本申请实施例还提供了一种计算机可读存储介质,用于存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (46)

  1. 一种基于外围组件互连传递PCIe的数据传输方法,其特征在于,包括:
    第一节点将第一数据封装成第一事务层包TLP,所述第一TLP的TLP头包括第一字段,所述第一字段用于指示所述第一数据的数据类型,所述数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型;
    所述第一节点向第二节点发送所述第一TLP。
  2. 根据权利要求1所述的方法,其特征在于,所述第一字段还用于指示所述数据类型对应的至少一个参数信息。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一字段为所述第一TLP的TLP头中的类型Type字段。
  4. 根据权利要求1~3中任一项所述的方法,其特征在于,所述第一字段的值为预留值。
  5. 根据权利要求1~4中任一项所述的方法,其特征在于,所述第一TLP的TLP头还包括第二字段,所述第二字段用于指示第三节点的身份信息,所述第三节点为所述第一TLP的目的设备。
  6. 根据权利要求5所述的方法,其特征在于,在所述第一字段仅用于指示所述第一数据的数据类型时,所述第二字段还用于指示所述数据类型对应的至少一个参数信息。
  7. 根据权利要求5或6所述的方法,其特征在于,所述第二字段为所述第一TLP的TLP头的字节4~字节15或字节4~字节11。
  8. 一种基于外围组件互连传递PCIe的数据传输方法,其特征在于,包括:
    第二节点接收来自第一节点的第一事务层包TLP,所述第一TLP包括第一数据;
    所述第二节点向第三节点发送第二TLP,所述第二TLP包括所述第一数据;
    其中,TLP的TLP头包括第一字段,所述第一字段用于指示所述第一数据的数据类型,所述数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型,所述TLP包括所述第一TLP、和/或所述第二TLP。
  9. 根据权利要求8所述的方法,其特征在于,所述第一字段还用于指示所述数据类型对应的至少一个参数信息。
  10. 根据权利要求8或9所述的方法,其特征在于,所述第一字段为所述TLP头中的类型Type字段。
  11. 根据权利要求8~10中任一项所述的方法,其特征在于,所述第一字段的值为预留值。
  12. 根据权利要求8~11中任一项所述的方法,其特征在于,所述TLP头还包括第二字段,所述第二字段用于指示所述第三节点的身份信息。
  13. 根据权利要求12所述的方法,其特征在于,在所述第一字段仅用于指示所述第一数据的数据类型时,所述第二字段还用于指示所述数据类型对应的至少一个参数信息。
  14. 根据权利要求12或13所述的方法,其特征在于,所述第二字段为所述TLP包的TLP头的字节4~字节15或字节4~字节11。
  15. 根据权利要求12~14中任一项所述的方法,其特征在于,所述第二节点向第三节点发送第二TLP,包括:
    所述第二节点根据所述第三节点的身份信息,确定路由路径;
    所述第二节点根据所述路由路径,将所述第二TLP发送给所述第三节点。
  16. 一种基于外围组件互连传递PCIe的数据传输方法,其特征在于,包括:
    第三节点接收来自第二节点的第二事务层包TLP,所述第二TLP包括第一数据,所述第二TLP的TLP头包括第一字段,所述第一字段用于指示所述第一数据的数据类型,所述数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型;
    所述第三节点基于所述第一字段获得所述第一数据。
  17. 根据权利要求16所述的方法,其特征在于,所述第一字段还用于指示所述数据类型对应的至少一个参数信息。
  18. 根据权利要求16或17所述的方法,其特征在于,所述第一字段为所述第二TLP头中的类型Type字段。
  19. 根据权利要求16~18中任一项所述的方法,其特征在于,所述第一字段的值为预留值。
  20. 根据权利要求16~19中任一项所述的方法,其特征在于,所述第二TLP头还包括第二字段,所述第二字段用于指示所述第三节点的身份信息。
  21. 根据权利要求20所述的方法,其特征在于,在所述第一字段仅用于指示所述第一数据的数据类型时,所述第二字段还用于指示所述数据类型对应的至少一个参数信息。
  22. 根据权利要求20或21所述的方法,其特征在于,所述第二字段为所述第二TLP头的字节4~字节15或字节4~字节11。
  23. 一种基于外围组件互连传递PCIe的数据传输装置,其特征在于,包括:
    处理单元,用于将第一数据封装成第一事务层包TLP,所述第一TLP的TLP头包括第一字段,所述第一字段用于指示所述第一数据的数据类型,所述数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型;
    发送单元,用于向第二节点发送所述第一TLP。
  24. 根据权利要求23所述的装置,其特征在于,所述第一字段还用于指示所述数据类型对应的至少一个参数信息。
  25. 根据权利要求23或24所述的装置,其特征在于,所述第一字段为所述第一TLP的TLP头中的类型Type字段。
  26. 根据权利要求23~25中任一项所述的装置,其特征在于,所述第一字段的值为预留值。
  27. 根据权利要求23~26中任一项所述的装置,其特征在于,所述第一TLP的TLP头还包括第二字段,所述第二字段用于指示第三节点的身份信息,所述第三节点为所述第一TLP的目的设备。
  28. 根据权利要求27所述的装置,其特征在于,在所述第一字段仅用于指示所述第一数据的数据类型时,所述第二字段还用于指示所述数据类型对应的至少一个参数信息。
  29. 根据权利要求27或28所述的装置,其特征在于,所述第二字段为所述第一TLP的TLP头的字节4~字节15或字节4~字节11。
  30. 一种基于外围组件互连传递PCIe的数据传输装置,其特征在于,包括:
    接收单元,用于接收来自第一节点的第一事务层包TLP,所述第一TLP包括第一数据;
    发送单元,用于向第三节点发送第二TLP,所述第二TLP包括所述第一数据;
    其中,TLP的TLP头包括第一字段,所述第一字段用于指示所述第一数据的数据类型,所述数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型,所述TLP包括所述第一TLP、和/或所述第二TLP。
  31. 根据权利要求30所述的装置,其特征在于,所述第一字段还用于指示所述数据类型对应的至少一个参数信息。
  32. 根据权利要求30或31所述的装置,其特征在于,所述第一字段为所述TLP头中的类型Type字段。
  33. 根据权利要求30~32中任一项所述的装置,其特征在于,所述第一字段的值为预留值。
  34. 根据权利要求30~33中任一项所述的装置,其特征在于,所述TLP头还包括第二字段,所述第二字段用于指示所述第三节点的身份信息。
  35. 根据权利要求34所述的装置,其特征在于,在所述第一字段仅用于指示所述第一数据的数据类型时,所述第二字段还用于指示所述数据类型对应的至少一个参数信息。
  36. 根据权利要求34或35所述的装置,其特征在于,所述第二字段为所述TLP包的TLP头的字节4~字节15或字节4~字节11。
  37. 根据权利要求34~36中任一项所述的装置,其特征在于,所述装置还包括处理单元,所述处理单元用于:
    根据所述第三节点的身份信息,确定路由路径;
    所述发送单元,具体用于:
    根据所述路由路径,将所述第二TLP发送给所述第三节点。
  38. 一种基于外围组件互连传递PCIe的数据传输装置,其特征在于,包括:
    接收单元,用于接收来自第二节点的第二事务层包TLP,所述第二TLP包括第一数据,所述第二TLP的TLP头包括第一字段,所述第一字段用于指示所述第一数据的数据类型,所述数据类型包括如下至少一项:图像类型、视频类型、控制类型、安全类型、流写(SWRITE)类型;
    处理单元,用于基于所述第一字段获得所述第一数据。
  39. 根据权利要求38所述的装置,其特征在于,所述第一字段还用于指示所述数据类型对应的至少一个参数信息。
  40. 根据权利要求38或39所述的装置,其特征在于,所述第一字段为所述第二TLP头中的类型Type字段。
  41. 根据权利要求38~40中任一项所述的装置,其特征在于,所述第一字段的值为预留值。
  42. 根据权利要求38~41中任一项所述的装置,其特征在于,所述第二TLP头还包括第二字段,所述第二字段用于指示所述第三节点的身份信息。
  43. 根据权利要求42所述的装置,其特征在于,在所述第一字段仅用于指示所述第一数据的数据类型时,所述第二字段还用于指示所述数据类型对应的至少一个参数信息。
  44. 根据权利要求42或43所述的装置,其特征在于,所述第二字段为所述第二TLP头的字节4~字节15或字节4~字节11。
  45. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储程序或指令,所述程序或所述指令在被一个或多个处理器读取并执行时可实现权利要求1~7、权 利要求8~15或权利要求16~22中任一项所述的方法。
  46. 一种计算机程序产品,其特征在于,当所述计算机程序产品在端节点上运行时,使得所述端节点执行权利要求1~7中任一项所述的方法,或者,使得所述端节点执行权利要求16~22中任一项所述的方法;或者,
    当所述计算机程序产品在交换节点上运行时,使得所述交换节点执行权利要求8~15中任一项所述的方法。
PCT/CN2020/073920 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置 Ceased WO2021147045A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
PCT/CN2020/073920 WO2021147045A1 (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置
EP20915619.9A EP4084423A4 (en) 2020-01-22 2020-01-22 METHOD AND DEVICE FOR DATA TRANSMISSION ON PCIE BASE
CN202080002611.3A CN113498595B (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置
US17/870,406 US20220368564A1 (en) 2020-01-22 2022-07-21 PCIe-Based Data Transmission Method and Apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/073920 WO2021147045A1 (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/870,406 Continuation US20220368564A1 (en) 2020-01-22 2022-07-21 PCIe-Based Data Transmission Method and Apparatus

Publications (1)

Publication Number Publication Date
WO2021147045A1 true WO2021147045A1 (zh) 2021-07-29

Family

ID=76992003

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/073920 Ceased WO2021147045A1 (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置

Country Status (4)

Country Link
US (1) US20220368564A1 (zh)
EP (1) EP4084423A4 (zh)
CN (1) CN113498595B (zh)
WO (1) WO2021147045A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114925386A (zh) * 2022-07-15 2022-08-19 飞腾信息技术有限公司 数据处理方法、计算机设备、数据处理系统及存储介质

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113647058B (zh) * 2020-02-27 2022-12-30 华为技术有限公司 一种基于PCIe的通信方法及装置
CN117135295A (zh) * 2022-05-19 2023-11-28 浙江宇视科技有限公司 一种视频拼控方法和装置
CN114915499B (zh) * 2022-07-15 2022-10-28 飞腾信息技术有限公司 数据传输方法、相关装置、系统及计算机可读存储介质
CN119718765B (zh) * 2024-11-08 2025-10-28 苏州元脑智能科技有限公司 动态调节端对端循环冗余校验功能的方法、装置及设备

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060153078A1 (en) * 2004-12-28 2006-07-13 Kabushiki Kaisha Toshiba Receiver, transceiver, receiving method and transceiving method
CN103023824A (zh) * 2012-12-11 2013-04-03 华为技术有限公司 基于周边组件接口快速通道PCIe的数据传输系统及方法
CN103490852A (zh) * 2008-05-30 2014-01-01 英特尔公司 为分组报头提供前缀
CN105185414A (zh) * 2015-09-15 2015-12-23 北京京存技术有限公司 一种测试方法和装置

Family Cites Families (37)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7013354B1 (en) * 1998-10-05 2006-03-14 Canon Kabushiki Kaisha Channel protocol for IEEE 1394 data transmission
US7099318B2 (en) * 2001-12-28 2006-08-29 Intel Corporation Communicating message request transaction types between agents in a computer system using multiple message groups
US7475174B2 (en) * 2004-03-17 2009-01-06 Super Talent Electronics, Inc. Flash / phase-change memory in multi-ring topology using serial-link packet interface
US7471623B2 (en) * 2004-11-23 2008-12-30 Hewlett-Packard Development Company, L.P. Systems and methods for a unified computer system fabric
US7949794B2 (en) * 2006-11-02 2011-05-24 Intel Corporation PCI express enhancements and extensions
WO2014047941A1 (zh) * 2012-09-29 2014-04-03 华为技术有限公司 网络时延测量方法、装置和系统
CA2838836C (en) * 2012-10-27 2018-05-01 Huawei Technologies Co., Ltd. Method, device, system and storage medium for implementing packet transmission in pcie switching network
CN103117929B (zh) * 2013-01-31 2015-12-23 中国科学院计算技术研究所 一种基于PCIe数据交换的通信方法及系统
US9317465B2 (en) * 2013-03-15 2016-04-19 Janus Technologies, Inc. System and method of sending PCI express data over ethernet connection
US9319349B2 (en) * 2013-06-20 2016-04-19 Micron Technology, Inc. Encapsulation enabled PCIE virtualisation
CN103701680A (zh) * 2013-12-17 2014-04-02 杭州华为数字技术有限公司 一种跨PCIe域报文传输的方法、设备及系统
CN105793829B (zh) * 2013-12-23 2020-01-21 英特尔公司 用于集成组件互连的装置、方法和系统
US9280290B2 (en) * 2014-02-12 2016-03-08 Oracle International Corporation Method for steering DMA write requests to cache memory
CN105653481B (zh) * 2014-11-14 2019-03-26 华为技术有限公司 基于PCIe总线的数据传输方法和装置
US10176126B1 (en) * 2015-06-29 2019-01-08 Cadence Design Systems, Inc. Methods, systems, and computer program product for a PCI implementation handling multiple packets
US10073805B2 (en) * 2015-09-03 2018-09-11 Avago Technologies General Ip (Singapore) Pte. Ltd. Virtual expansion ROM in a PCIe environment
US10157153B2 (en) * 2016-02-03 2018-12-18 Qualcomm Incorporated Inline cryptographic engine (ICE) for peripheral component interconnect express (PCIe) systems
US10261936B2 (en) * 2017-04-24 2019-04-16 Exten Technologies, Inc. PCIe switch with data and control path systolic array
US10318476B2 (en) * 2017-05-24 2019-06-11 Netapp, Inc. Systems and methods for using resources in a networked computing environment
US10740000B2 (en) * 2018-03-08 2020-08-11 Western Digital Technologies, Inc. Adaptive transaction layer packet for latency balancing
JP2019164486A (ja) * 2018-03-19 2019-09-26 東芝メモリ株式会社 情報処理システム、情報処理方法及びメモリシステム
US11477049B2 (en) * 2018-08-02 2022-10-18 Xilinx, Inc. Logical transport over a fixed PCIE physical transport network
JP7103162B2 (ja) * 2018-10-30 2022-07-20 富士通株式会社 演算処理装置及び演算処理装置の制御方法
US11038749B2 (en) * 2018-12-24 2021-06-15 Intel Corporation Memory resource allocation in an end-point device
US11249837B2 (en) * 2019-03-01 2022-02-15 Intel Corporation Flit-based parallel-forward error correction and parity
US11593280B2 (en) * 2019-06-25 2023-02-28 Intel Corporation Predictive packet header compression
US11010095B2 (en) * 2019-07-25 2021-05-18 Western Digital Technologies, Inc. Dynamic and adaptive data read request scheduling
US11311800B2 (en) * 2019-08-09 2022-04-26 Sony Interactive Entertainment LLC Systems implementing high-speed data communication fabric for cloud gaming data storage and retrieval
CN112540941B (zh) * 2019-09-21 2024-09-20 华为技术有限公司 一种数据转发芯片及服务器
US11201838B2 (en) * 2019-09-25 2021-12-14 Intel Corporation System, apparatus and method for increasing efficiency of link communications
US11775470B2 (en) * 2019-11-20 2023-10-03 Intel Corporation Transaction layer packet format
EP4080839B1 (en) * 2020-01-22 2024-01-03 Huawei Technologies Co., Ltd. Pcie-based data transmission method and apparatus
WO2021147048A1 (zh) * 2020-01-22 2021-07-29 华为技术有限公司 一种基于PCIe的数据传输方法、装置及系统
EP4080845A4 (en) * 2020-01-22 2023-01-11 Huawei Technologies Co., Ltd. PCIE-BASED DATA TRANSMISSION METHOD AND APPARATUS
EP4080840B1 (en) * 2020-01-22 2025-09-10 Shenzhen Yinwang Intelligent Technologies Co., Ltd. Data transmission method and apparatus based on pcie
CN113498510B (zh) * 2020-01-22 2024-07-16 华为技术有限公司 一种PCIe的数据传输方法及装置
WO2021147049A1 (zh) * 2020-01-22 2021-07-29 华为技术有限公司 一种基于PCIe的数据传输方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060153078A1 (en) * 2004-12-28 2006-07-13 Kabushiki Kaisha Toshiba Receiver, transceiver, receiving method and transceiving method
CN103490852A (zh) * 2008-05-30 2014-01-01 英特尔公司 为分组报头提供前缀
CN103023824A (zh) * 2012-12-11 2013-04-03 华为技术有限公司 基于周边组件接口快速通道PCIe的数据传输系统及方法
CN105185414A (zh) * 2015-09-15 2015-12-23 北京京存技术有限公司 一种测试方法和装置

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114925386A (zh) * 2022-07-15 2022-08-19 飞腾信息技术有限公司 数据处理方法、计算机设备、数据处理系统及存储介质
CN114925386B (zh) * 2022-07-15 2022-10-25 飞腾信息技术有限公司 数据处理方法、计算机设备、数据处理系统及存储介质

Also Published As

Publication number Publication date
US20220368564A1 (en) 2022-11-17
EP4084423A4 (en) 2023-01-11
CN113498595A (zh) 2021-10-12
CN113498595B (zh) 2022-10-11
EP4084423A1 (en) 2022-11-02

Similar Documents

Publication Publication Date Title
US12147372B2 (en) PCIE-based data transmission method and apparatus
US12526351B2 (en) PCIe-based data transmission method and apparatus
US20220368564A1 (en) PCIe-Based Data Transmission Method and Apparatus
US11995020B2 (en) PCIe data transmission method and apparatus
US20220358070A1 (en) Pcie-based data transmission method and apparatus
US12147371B2 (en) PCIe-based data transmission method, apparatus, and system
US12147370B2 (en) PCIe-based data transmission method, apparatus, and system
US20220365895A1 (en) Pcie-based data transmission method and apparatus
WO2024227389A1 (zh) 数据传输系统、方法、装置、通信设备及存储介质
WO2024198573A1 (zh) 一种流量控制方法、装置及系统
CN114915499B (zh) 数据传输方法、相关装置、系统及计算机可读存储介质
EP4668699A1 (en) Transmission method and apparatus, and device and network
CN120416865A (zh) 通信系统和方法

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020915619

Country of ref document: EP

Effective date: 20220726

NENP Non-entry into the national phase

Ref country code: DE