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

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

Info

Publication number
WO2021147050A1
WO2021147050A1 PCT/CN2020/073925 CN2020073925W WO2021147050A1 WO 2021147050 A1 WO2021147050 A1 WO 2021147050A1 CN 2020073925 W CN2020073925 W CN 2020073925W WO 2021147050 A1 WO2021147050 A1 WO 2021147050A1
Authority
WO
WIPO (PCT)
Prior art keywords
field
encapsulation
data
tlp
node
Prior art date
Application number
PCT/CN2020/073925
Other languages
English (en)
French (fr)
Inventor
万蕾
鲍鹏鑫
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202080003143.1A priority Critical patent/CN113498596B/zh
Priority to PCT/CN2020/073925 priority patent/WO2021147050A1/zh
Priority to EP20915035.8A priority patent/EP4080839B1/en
Publication of WO2021147050A1 publication Critical patent/WO2021147050A1/zh
Priority to US17/870,535 priority patent/US20220358075A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/35Switches specially adapted for specific applications
    • H04L49/351Switches specially adapted for specific applications for local area network [LAN], e.g. Ethernet switches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4204Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
    • G06F13/4221Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus being an input/output bus, e.g. ISA bus, EISA bus, PCI bus, SCSI bus
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4265Bus transfer protocol, e.g. handshake; Synchronisation on a point to point bus
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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, which is widely used in computers, test instruments and other equipment.
  • the main components of the PCIe system are the root node (Root), the switch node (Switch) and the end node (Endpoint).
  • Root is responsible for managing all buses and nodes in the PCIe system, and is the bridge between the central processing unit (CPU) and Endpoint communication in the PCIe system;
  • Switch acts as a data forwarding node, connecting Switch and EndPoint;
  • EndPoint is the end device, such as peripherals (Peripheral). In the PCIe system, EndPoint and EndPoint cannot communicate directly, and must go through Root.
  • the present application provides a PCIe-based data transmission method and device, which can enable Endpoints in the PCIe system to communicate without Root, thereby reducing the complexity of the in-vehicle network.
  • an embodiment of the present application provides a PCIe-based data transmission method, including: a first node encapsulates data into a transaction layer packet (transaction layer packet, TLP) and then sends it to a second node.
  • TLP includes a packet header and An extension header, where the packet header includes a first field and a second field.
  • the first field, the second field and the extension header are used to indicate first encapsulation information, and the first encapsulation information includes a data type of the data and at least one encapsulation corresponding to the data type parameter.
  • the embodiment of the present application uses the first field, the second field and the extension header to indicate the information required for data transmission, such as the data type, the encapsulation parameters corresponding to the data type, etc., so that end nodes can communicate even if they do not go through Root. , Which can reduce the complexity of the in-vehicle network.
  • the value of the bit set indicates the data type, and the bit set includes the bits of the first field and the bits of the second field; the extension header carries at least one encapsulation parameter.
  • the first field and the second field are jointly encoded, so that the TLP can instruct the transmission data as the required information, so that the end nodes can communicate even if they do not go through Root.
  • the first field indicates the data type
  • the second field indicates the first parameter set
  • the extension header of the data packet carries the second parameter set
  • the first parameter set includes at least one encapsulation parameter part of the encapsulation Parameters
  • the second parameter set includes other encapsulation parameters excluding some encapsulation parameters in the at least one encapsulation parameter.
  • the first field and the second field are separately indicated, so that the destination node can determine whether to adopt the solution provided in this application when parsing one of the fields.
  • the first field is a type (Type) field
  • the second field is a reserved bit.
  • the header further includes a third field, the third field carries second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type. .
  • the TLP can indicate more packaging information.
  • the third field is byte 4 to byte 15 or byte 4 to byte 11 of the header. Since the contents of bytes 4 to 15 or bytes 4 to 11 of the packet header are different according to the Type field, when the first encapsulation information is indicated by the Type field and reserved bits, the third field can be used to carry a part Or all package parameters.
  • the data type includes at least one of the following: image, audio, control information, stream write (SWRITE), and security.
  • the encapsulation parameters corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
  • the packaging parameters corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
  • the encapsulation parameters corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
  • the security-corresponding encapsulation parameters may include: message type, format indication, encryption or not.
  • the encapsulation parameters corresponding to SWRITE may include: alignment.
  • the first field is a reserved value.
  • the reserved value is used to make the PCIe system compatible with the original data transmission method and the data transmission method provided in this application.
  • the TLP can carry the information of the destination node, such as the address of the destination node, the identification (ID) of the destination node, and so on.
  • the second node can determine the routing path according to the information of the destination node, so that it can send to the destination node according to the routing path without going through Root.
  • an embodiment of the present application provides a PCIe-based data transmission method, including: a second node receives a first TLP sent by a first node; a second node sends a second TLP to a third node; wherein, the TLP includes The packet header and the extension header, where the first field of the packet header, the second field of the packet header, and the extension header are used to indicate the first encapsulation information, and the first encapsulation information includes the data type of the data carried by the TLP and at least one encapsulation parameter corresponding to the data type , TLP includes the first TLP and/or the second TLP.
  • the embodiment of the present application uses the first field of the header, the second field of the header, and the extension header to indicate the information required for data transmission, such as the data type, the encapsulation information corresponding to the data type, etc., so that even if the end nodes do not go through Root, Communication can also be carried out, which can reduce the complexity of the in-vehicle network.
  • first TLP and the second TLP may be the same TLP, or the first TLP and the second TLP may also be different TLPs.
  • the first TLP and the second TLP contain the same data, or the content of the data is the same.
  • the value of the bit set indicates the data type, and the bit set includes the bits of the first field and the bits of the second field; the extension header carries at least one encapsulation parameter.
  • the first field and the second field are jointly encoded, so that the TLP can instruct the transmission data as the required information, so that the end nodes can communicate even if they do not go through Root.
  • the first field indicates the data type
  • the second field indicates the first parameter set
  • the extension header of the data packet carries the second parameter set
  • the first parameter set includes at least one encapsulation parameter part of the encapsulation Parameters
  • the second parameter set includes other encapsulation parameters excluding some encapsulation parameters in the at least one encapsulation parameter.
  • the first field and the second field are separately indicated, so that the third node can determine whether to adopt the solution provided in this application when parsing one of the fields.
  • the first field is a Type field
  • the second field is a reserved bit.
  • the header further includes a third field, the third field carries second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type. .
  • the TLP can indicate more packaging information.
  • the third field is byte 4 to byte 15 or byte 4 to byte 11 of the header. Since the contents of bytes 4 to 15 or bytes 4 to 11 of the packet header are different according to the Type field, when the first encapsulation information is indicated by the Type field and reserved bits, the third field can be used to carry a part Or all package parameters.
  • the data type includes at least one of the following: image, audio, control information, SWRITE, and security.
  • the encapsulation parameters corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
  • the packaging parameters corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
  • the encapsulation parameters corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
  • the security-corresponding encapsulation parameters may include: message type, format indication, encryption or not.
  • the encapsulation parameters corresponding to SWRITE may include: alignment.
  • the first field is a reserved value.
  • the reserved value is used to make the PCIe system compatible with the original data transmission method and the data transmission method provided in this application.
  • the first TLP may carry the identity information of the third node, such as the address of the third node, the ID of the third node, and so on.
  • the second node can determine the routing path according to the information of the third node, so that it can send to the third node according to the routing path without going through Root.
  • the second node may select the routing path based on the identity information of the third node.
  • the second node sending the second TLP to the third node includes: the second node sending the second TLP to the third node according to the routing path.
  • the second node can determine the routing path according to the information of the third node, so that it can send to the third node according to the routing path without going through Root.
  • an embodiment of the present application provides a PCIe-based data receiving method, including: a third node receives a TLP sent by a second node.
  • the TLP includes a packet header and an extension header.
  • the packet header includes a first field and a second field.
  • the first field, the second field, and the extension header are used to indicate the first encapsulation information.
  • the first encapsulation information includes the data type of the data carried by the TLP and at least one encapsulation parameter corresponding to the data type; the third node is based on the first encapsulation information pair TLP obtains the data.
  • the embodiment of the application uses the first field, the second field and the extension header to indicate the information needed to transmit the data, such as the data type, the encapsulation information corresponding to the data type, etc., so that end nodes can communicate even if they do not go through Root. , Which can reduce the complexity of the in-vehicle network.
  • the value of the bit set indicates the data type, and the bit set includes the bits of the first field and the bits of the second field; the extension header carries at least one encapsulation parameter.
  • the first field and the second field are jointly encoded, so that the TLP can instruct the transmission data as the required information, so that the end nodes can communicate even if they do not go through Root.
  • the first field indicates the data type
  • the second field indicates the first parameter set
  • the extension header of the data packet carries the second parameter set
  • the first parameter set includes at least one encapsulation parameter part of the encapsulation Parameters
  • the second parameter set includes other encapsulation parameters excluding some encapsulation parameters in the at least one encapsulation parameter.
  • the first field and the second field are separately indicated, so that the third node can determine whether to adopt the solution provided in this application when parsing one of the fields.
  • the first field is a Type field
  • the second field is a reserved bit.
  • the data type includes at least one of the following: image, audio, control information, SWRITE, and security.
  • the encapsulation parameters corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
  • the packaging parameters corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
  • the encapsulation parameters corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
  • the security-corresponding encapsulation parameters may include: message type, format indication, encryption or not.
  • the encapsulation parameters corresponding to SWRITE may include: alignment.
  • the first field is a reserved value.
  • the reserved value is used to make the PCIe system compatible with the original data transmission method and the data transmission method provided in this application.
  • the third node when the third node obtains data from the TLP based on the first packaging information, the format of the data may be determined based on the first packaging information, and the data may be obtained based on the format.
  • the third node can parse the TLP Header, obtain the type and format of the image, and obtain the data.
  • the header further includes a third field, the third field carries second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type. .
  • the TLP can indicate more packaging information.
  • the third field is byte 4 to byte 15 or byte 4 to byte 11 of the header. Since the contents of bytes 4 to 15 or bytes 4 to 11 of the packet header are different according to the Type field, when the first encapsulation information is indicated by the Type field and reserved bits, the third field can be used to carry a part Or all package parameters.
  • the third node when the third node obtains data based on the first encapsulation information, the format of the data may be determined based on the first encapsulation information and the second encapsulation information, and the data is obtained based on the format.
  • the third node can parse the TLP Header, obtain the type and format of the image, and obtain the data.
  • the present application provides a PCIe-based data transmission device, which may be a communication device, or a chip or chipset in the communication device, where the communication device may be the first node or the second node It can also be the third 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.).
  • a PCIe-based data transmission device which includes a processor, and may also include a communication interface and 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 present application also provides a computer-readable storage medium.
  • the computer-readable storage medium stores instructions that, when run on a computer, cause the computer to execute the above-mentioned first aspect or any one of the designs in the first aspect.
  • a data transmission method according to any one of the second aspect or the second aspect, the third aspect or the third aspect.
  • the present application also provides a computer program product including instructions, which when run on a computer, cause the computer to execute any of the above-mentioned designs in the first aspect or the first aspect, the second aspect or the second aspect.
  • a computer program product including instructions, which when run on a computer, cause the computer to execute any of the above-mentioned designs in the first aspect or the first aspect, the second aspect or the second aspect.
  • the present application also provides a PCIe system, which includes a first node, a second node, and a third node, wherein the first node can perform the corresponding function in the first aspect, and the second node can perform the above For the corresponding function in the second aspect, the third node can perform the corresponding function in the 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 first aspect or the first aspect, the second aspect, or the first aspect of the embodiment of the present application.
  • Coupled in the embodiments of the present application means that two components are directly or indirectly combined with each other.
  • 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 system based on a PCIe system provided by an embodiment of the 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 indicating first package information according to an embodiment of the application.
  • FIG. 8 is a schematic diagram of an 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 another schematic diagram of indicating first packaging information provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of an image service provided by an embodiment of the application.
  • FIG. 12 is a schematic diagram of another image service provided by an embodiment of this application.
  • FIG. 13 is a schematic diagram of the architecture of a PCIe system provided by an embodiment of the application.
  • FIG. 14 is a schematic structural diagram of a 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 the application.
  • PCIe is a high-speed short-distance communication interface, which is widely used in computers, test instruments and other equipment. At present, because PCIe can quickly read and write memory directly and provide large-bandwidth communication, some car companies have extended its transmission distance as a large data communication port in the car's intranet. However, due to the limitations of the PCIe working mechanism, it cannot be fully applicable to all scenarios in the in-vehicle network.
  • Root shown as the root node in Figure 1
  • Switch shown as the switch node in Figure 1
  • Endpoint shown as the end node in Figure 1
  • Root is responsible for managing all buses (shown by black lines in Figure 1) and nodes in the PCIe system. It is a bridge between the CPU and other devices in the system. The CPU communicates with all devices through Root.
  • Switch acts as a bridge to connect Root, other Switches, and Endpoints, and acts as a data forwarding node.
  • Endpoint is an end device, such as a peripheral, which is responsible for sending or receiving data.
  • Figure 2 shows a communication system including two PCIe systems.
  • the two PCIe systems can communicate through a non-transparent bridge (NTB).
  • NTB non-transparent bridge
  • NTB can be deployed on the Switch. Since the devices in a PCIe system are managed independently by their own roots, the addresses and IDs of the devices in different PCIe systems will conflict. In order to allow the two systems to connect and communicate normally, it needs to be performed between the two systems. Bridge conversion, address or ID translation, NTB can be responsible for address or ID conversion, so that the two PCIe systems communicate with each other.
  • Endpoint and Endpoint cannot communicate directly, and must go through Root, because only Root knows what functions are in the Endpoint and what types of data are supported.
  • the functions of the Endpoint in the PCIe system such as supported data types and formats, are stored in the configuration space of the Endpoint, and only Root has the authority to read the configuration space of the Endpoint, and other Endpoints and Switches have no permission to read. Therefore, only Root knows the data type and format information supported by Endpoint, and cannot be obtained by other nodes.
  • the Endpoint in the PCIe system does not know the data types and formats supported by other Endpoints, and cannot communicate without Root.
  • Endpoint1 and Endpoint2 are connected to a Switch, they cannot communicate directly through the Switch. Endpoint1/2 must communicate with Root first, and Endpoint2/1 can be found through Root. For example, Endpoint1 sends data to Endpoint2 The process is: Endpoint1 sends data to Switch1, Switch1 sends the data to Root, Root determines that the data receiver is Endpoint2 according to the functions of each Endpoint, Root sends the data to Switch1, and Switch1 sends the data to Endpoint2.
  • Root communication between Endpoints in the PCIe system makes it not suitable for many scenarios in the car intranet.
  • the ring car intranet requires the sensor to be directly connected to the gateway, and the sensor data is exchanged and forwarded by the gateway/switch on the ring network.
  • this in-vehicle network architecture requires that sensor data can be forwarded in any direction through the gateway/switch to provide communication link redundancy, thereby ensuring the safety of in-vehicle communication, so the in-vehicle ring network needs to use other interfaces .
  • This situation has led to the existence of multiple transmission interfaces in the vehicle intranet, and information exchange between various interfaces requires interface conversion. The conversion between different interfaces has led to a significant increase in the complexity of the vehicle intranet.
  • the embodiments of the present application provide a PCIe-based data transmission method and device, which are used to solve the problem that the mechanism of Root communication between Endpoints in the prior art causes multiple transmission interfaces in the intranet and the complexity of the intranet Big problem.
  • the method and the device are based on the same technical idea. Since the principles of the method and the device to solve the problem are similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
  • the embodiments of the present application provide a PCIe-based data transmission method and device, which can be applied to an in-vehicle network, especially an autonomous vehicle in-vehicle network, and can also be applied to PCIe systems of other devices.
  • TLP may be as shown in FIG. 3, and may include TLP prefix (TLP Prefixes), TLP header (TLP Header), data payload (Data Payload), and TLP digest (TLP Digest).
  • TLP Prefixes can be H bytes (Byte), and H is an integer greater than 0;
  • the length of TLP Header can be composed of 12/16 bytes, which is used to indicate the PCIe service type;
  • Data Payload is the data part, and the length can be 0-4K Byte;
  • TLP Digest length can be 4 bytes, and the indicated content can be end-to-end 32bit cyclic redundancy check (ECRC), for example, ECRC can be cyclic redundancy check ( The cyclic redundancy check, CRC) check code is used to check whether the data packet is transmitted correctly.
  • ECRC cyclic redundancy check
  • the structure of the TLP Header may be as shown in Figure 4, including:
  • the length of this field can be 3 bits (bit), which is used to indicate the length of the TLP Header and whether the TLP has a Data Payload part.
  • TLP Header length is the first length and TLP contains Data Payload
  • TLP Header length is the first length and TLP does not contain Data Payload
  • TLP Header length is The second length and the TLP includes Data Payload
  • the TLP Header length is the second length and the TLP does not include Data Payload.
  • the Fmt field may also indicate the TLP prefix (Prefix).
  • the Fmt field includes 3 bits and a total of 8 status values. Among them, 5 of the 8 status values can be used to indicate the above 5 types of information, and the remaining 3 status values are reserved. For example, the five status values of 000, 001, 010, 011, and 100 can be used to indicate the above five types of information, and the remaining three status values of 101, 110, and 111 are reserved.
  • Type (Type) field 5 bits, used to indicate the service type of the TLP.
  • PCIe services 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. In PCI Express Base Specification Revision 5.0 Version 1.0, 19 status values are used to indicate the service type of TLP, and the remaining 13 status values are reserve.
  • T9/T8 reserved bits.
  • Priority (traffic class, TC) field: used to indicate scheduling priority.
  • TLP attributes may refer to TLP processing methods, such as ordering processing (Ordering), hardware coherency management (snoop), and so on.
  • Lightweight notification (LN) field Lightweight notification, a simple read and write method defined by PCIe.
  • TLP processing hints TLP processing hints, TH field: used to indicate whether there are PH (Processing Hints) at the end of the TLP Header.
  • TLP digest indication (indicates presence of TLP Digest, TD) field: used to indicate whether the TLP tail contains a TLP digest.
  • Poisoned data used to indicate whether it is poisoned data.
  • Address type used to indicate whether the address needs to be translated.
  • Length Used to indicate the length of the Data Payload, which can use 4 bytes as the minimum unit.
  • Byte4-Byte7 According to the service type definition, that is, according to the service type indicated by the Type field, Byte4-Byte7 can indicate the corresponding content of the service type.
  • Byte8-Byte15 Fill in the address or ID according to the different content of the routing method.
  • Byte8-Byte11 can be filled with the address of the destination node or the ID of the destination node
  • Byte12-Byte15 can be filled with the address of the source node or the ID of the source node.
  • Byte8-Byte11 can be filled with the address of the source node or the ID of the source node
  • Byte12-Byte15 can be filled with the address of the destination node or the ID of the destination node.
  • the structure of the 12Byte TLP Header is similar to that of the 16Byte TLP Header.
  • Byte4-Byte7 in the 16Byte TLP Header are defined according to the service type, and Byte8-Byte15 fills in the address information
  • the 12Byte TLP Header contains Byte4- Byte7 is defined according to the service type, and Byte8-Byte11 fills in address information.
  • the method provided in the embodiments of the present application is based on the TLP structure disclosed in the PCI Express Base Specification Revision 5.0 Version 1.0.
  • the "reserved value” involved in the embodiments of this application may refer to the unused state values in PCI Express Base Specification Revision 5.0 Version 1.0, for example, the three state values of 101, 110, and 111 in the Fmt field, "reserved value” "Can also be called “reserve value”.
  • the "reserved bits” mentioned in the embodiments of this application may refer to the unused bits of the TLP in PCI Express Base Specification Revision 5.0 Version 1.0, for example, T8/T9 of the TLP Header, and the "reserved bits” may also be referred to as “reserved bits”. "Reserved bits”, “reserved bits”, etc.
  • the "reserved value" involved in the embodiments of the present application may also refer to unused bits of the TLP in the corresponding evolved version, which is not limited in the embodiments of the present application.
  • the data type can include but is not limited to: image, audio, control information, SWRITE, security, etc.
  • the encapsulation parameters corresponding to the data type can be used to characterize the attributes of the data type.
  • the encapsulation parameters can include but are not limited to the following four types of parameters:
  • Image data type RAW, RGB, YUV, embedded data, compressed image, object contour (Object) in the image, etc.;
  • Pixel quantization depth such as 12, 20, 24, etc.
  • Resolution such as 1080P, 2K, 4K, etc.
  • Segment indication information The image sensor outputs one line of images at a time. For images with high resolution, TLP cannot transmit one line of images at a time, and one line of images needs to be divided into several TLPs for transmission.
  • the segment indication information is used to indicate which segment of the current line is the current TLP.
  • the encapsulation parameters can, but are not limited to, include the following 4 parameters:
  • 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/channels used to indicate how many channels/channels the current data packet contains.
  • the encapsulation parameters can, but are not limited to, include the following two types of parameters:
  • Control information types such as integrated circuit bus (inter-integrated circuit, I2C), 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 quantity of each type of control information For example, the current data packet contains 3 I2C and 8 GPIO.
  • the encapsulation parameters can include, but are not limited to, the following three parameters:
  • Message type The establishment of security requires multiple message interactions, and each interaction message has a different type, such as authentication messages, encrypted messages, etc.;
  • Encrypted or not Whether the current data packet is encrypted.
  • the encapsulation parameters can include, but are not limited to, one of the following parameters:
  • Alignment use 4 bytes as the smallest unit to align, or 8 bytes as the smallest unit to align.
  • the foregoing data type is only an exemplary description, and is not limited to the data types listed in the embodiments of the present application in specific implementation.
  • the encapsulation parameters corresponding to the above data types are only an exemplary description. In specific implementations, the above data types may also correspond to other encapsulation parameters, which are not specifically limited here.
  • data type is only an exemplary naming, and it can also be named other in specific implementation, for example, it can also be referred to as data service type, or the data type can also be referred to as A.
  • A has the same or similar meaning as the data type in the embodiment of this application, A can be understood as the data type in the embodiment of this application.
  • Encapsulation parameter is only an exemplary naming. In specific implementations, it can also be named other, such as attributes, attribute parameters, etc., or it can also be referred to as B, as long as B is encapsulated in the embodiment of this application.
  • the parameters have the same or similar meanings, and B can be understood as the encapsulation parameter in the embodiment of the application.
  • At least one refers to one or more, and “multiple” refers to two or more than two.
  • “And/or” describes the association relationship of the associated object, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
  • the character “/” generally indicates that the associated objects are in an “or” relationship.
  • “The following at least one (item)” or similar expressions refers to any combination of these items, including any combination of a single item (a) or a plurality of items (a).
  • At least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c It can be single or multiple.
  • This application provides a PCIe-based data transmission method, which can be applied to a PCIe system, for example, the PCIe system as shown in FIG. 1 or the PCIe system as shown in FIG. 2 and so on. As shown in Figure 5, the method includes:
  • the first node encapsulates data into a TLP, where the TLP includes a TLP Header and an extension header.
  • the first field of the TLP Header, the second field of the TLP Header, and the extension header are used to indicate the first encapsulation information, and the first encapsulation information includes the data type of the data and at least one encapsulation parameter corresponding to the data type.
  • the first node may be an end node in the PCIe system, or may be a switching node in the PCIe system.
  • the extension header may include 4 ⁇ n bytes between TLP Header and Data Payload, and n is an integer greater than or equal to 1.
  • unused bits can be reserved.
  • extension header is only an exemplary naming, and in subsequent evolved versions, it can also be named other, such as A. If A can realize the function of the "extended header”, A can also be understood as an implementation of this application.
  • extended header in the example.
  • TLP may also include Data Payload, and data may be carried in the Data Payload part of TLP.
  • the first node may be an end node or a chip in the end node.
  • the first node may be a transmission node (such as TX/RX) in the end node.
  • TX/RX a transmission node
  • the structure of the camera can be as shown in Figure 6, including a lens, a complementary metal oxide semiconductor (COMS), TX/RX, etc., where COMS is used to collect images through the lens Data, and sent out through TX/RX.
  • the first node can be Camera or TX/RX in Camera.
  • the data encapsulated by the first node can be data collected by itself, for example, the first node is Camera, and the encapsulated data can be image data collected by Camera, etc.
  • the first node is a microphone.
  • the data to be encapsulated may be audio data collected by a microphone and so on.
  • the first node is a transmission node in the end node
  • the data packaged by the first node can be the data collected by the sensor chip in the end node. Taking Figure 6 as an example, the data packaged by the first node can be the image collected by COMS data.
  • the first node may extract data encapsulation parameters.
  • the first node can determine the image data type, pixel quantization depth, resolution, etc. of the collected image data, and can calculate according to the image data type, pixel quantization depth, resolution, etc. Based on 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 segmentation mode of the image can be determined, so that the segmentation indication information can be determined according to the segmentation mode.
  • the first node can receive the image data collected by COMS.
  • the image data display carries the image data type, pixel quantization depth, resolution and other packaging parameters.
  • the first node can be based on the image data Carrying image data type, pixel quantization depth, resolution, etc., calculate the amount of data per line of the image, combined with the maximum data carrying capacity of each TLP of PCIe, you can get the number of TLPs required to transmit a line of image, and then determine the image segmentation method. Therefore, the segment indication information can be determined according to the segment mode.
  • the first field may be the Type field
  • the second field may be reserved bits.
  • the second field is the T8 field in FIG. 4, and for example, the second field is the T9 field in FIG.
  • the second field includes the T8 field and the T9 field in FIG. 4.
  • the first field and the second field may also be other fields, which are not specifically limited here.
  • the following takes the first field as the Type field and the second field as the T9 field as an example for description.
  • the reserved value of the Type field and all the state values of the T9 field can be used to indicate the encapsulation information.
  • the type field of 00011, 00110, 00111, 01000, 01001, 01111, 11000 ⁇ 11010, 11100 ⁇ The 13 state values of 11111 and the 2 state values of 0 and 1 in the T9 field, therefore, a total of 2 ⁇ 13 state values can indicate encapsulation information.
  • the first field of the TLP Header, the second field of the TLP Header, and the extended header indicate the first encapsulation information
  • the first field of the TLP Header and the second field of the TLP Header can be used to indicate the data type
  • the extended header can be used to indicate the data type.
  • the header carries the packaging parameters in the first packaging information, as shown in FIG. 7.
  • the Type field and the T9 field can be uniformly coded (or jointly coded) to indicate the data type, that is, the data type is indicated by the value of the bit set.
  • the bit set includes 5 bits of the Type field and the value of the T9 field. 1 bit, so that the data type can be indicated by the state value (such as 000010, etc.) of these 6 bits, and the encapsulation parameter in the first encapsulation information is carried by the extension header.
  • the Type field and T9 field can be uniformly coded to indicate image services, and the extension header carries image data type, pixel quantization depth, resolution, and segmentation indication information, as shown in Figure 8.
  • the reserved value of the Type field or the state value of the T9 field may be used to indicate the data type
  • the extension header may be used to carry the encapsulation parameters in the first encapsulation information.
  • the reserved value of the Type field can be used to indicate the image service
  • the extension header carries image data type, pixel quantization depth, resolution, and segment indication information, as shown in FIG. 9.
  • the first field of the TLP Header, the second field of the TLP Header, and the extended header indicate the first encapsulation information
  • the first field of the TLP Header and the second field of the TLP Header can be used to indicate the data type and the second field.
  • One part of the encapsulation parameters of the encapsulation information uses the extension header to carry another part of the encapsulation parameters of the first encapsulation information, as shown in FIG. 10.
  • the Type field and the T9 field may be uniformly coded (or jointly coded) to indicate the data type and part of the encapsulation parameters, that is, the value of the bit set indicates the data type and part of the encapsulation parameters of the first encapsulation information
  • the bit set includes 5 bits of the Type field and 1 bit of the T9 field, so that the state value of these 6 bits (such as 000010, etc.) can be used to indicate the data type and part of the encapsulation parameters of the first encapsulation information.
  • the extension header is used to carry the first encapsulation parameter. A package parameter of another part of the package information. Taking image data as an example, the Type field and the T9 field can be uniformly coded to indicate the image service and image data type, and the extension header carries pixel quantization depth, resolution, and segmentation indication information, as shown in FIG. 11.
  • the Type field and the T9 field can be indicated separately. It can also be understood that the Type field and the T9 field indicate different content.
  • the Type field can be used to indicate the data type
  • the T9 field can be used to indicate the first encapsulation information. Part of the encapsulation parameter of the first encapsulation information is carried by the extension header.
  • the Type field may be used to indicate a part of the encapsulation parameters of the first encapsulation information
  • the T9 field may be used to indicate the data type
  • the extension header may be used to carry another part of the encapsulation parameters of the first encapsulation information.
  • the reserved value of the Type field can be used to indicate the image service
  • the T9 field can be used to indicate the image data type
  • the extension header carries pixel quantization depth, resolution, and segmentation indication information, as shown in FIG. 12.
  • the TLP may also carry indication information indicating whether the TLP is encrypted, or it may also be understood that whether the TLP is encrypted is an encapsulation parameter corresponding to the data type.
  • the type indicated by the Type field may be the original PCIe type, or may be the data type involved in the embodiment of the present application.
  • the first encapsulation information may include all encapsulation parameters corresponding to the data type, and may also include a part of encapsulation parameters corresponding to the data type.
  • the TLP Header may further include a third field.
  • the third field may be Byte4-Byte15 of the 16-Byte TLP Header or Byte4-Byte11 of the 12-Byte TLP Header.
  • the third field may carry another part of encapsulation parameters corresponding to the data type. It can also be understood that the third field may carry the second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
  • a format of a service of image, audio, control information, SWRITE, and security can be indicated. Or, it can also indicate multiple formats of one service of image, audio, control information, SWRITE, and security. Or, it can also indicate multiple formats of images, audio, control information, SWRITE, and multiple services in security. Or, it can also indicate images, audio, control information, SWRITE, and security of multiple services mix (such as images with security protection, etc.). Or other business types and formats, I won't list them all here.
  • the TLP may also carry the identity information of the destination node (hereinafter collectively referred to as the third node), such as the address and ID of the third node.
  • the TLP may also carry the identity information of the first node, such as the address and ID of the first node.
  • An example is that if the length of the TLP Header is 16 Bytes, Byte8-Byte 15 of the TLP Header can carry the identity information of the first node and 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 third node.
  • the third node may be an end node in the PCIe system or a switching node in the PCIe system.
  • the first node sends a TLP to the second node.
  • the second node receives the TLP sent by the first node.
  • the second node may be an end node in the PCIe system, or may be a switching node in the PCIe system.
  • the second node may be a switching node connected to the first node in the PCIe system.
  • S503 The second node sends the TLP to the third node.
  • the third node receives the TLP sent by the second node.
  • the TLP sent by the second node and the TLP sent by the first node are the same TLP, that is, after receiving the TLP sent by the first node, the second node forwards the TLP to the third node.
  • the TLP sent by the second node and the TLP sent by the first node are different TLPs, that is, after receiving the TLP sent by the first node, the second node processes the TLP, for example, the TLP
  • the source node information is modified from the identity information of the first node to the identity information of the second node, etc., and then the processed TLP is sent to the third node, where the TLP sent by the second node is the same as the TLP sent by the first node
  • the data and package information carried are the same.
  • the TLP sent by the second node carries data and encapsulation information
  • the second node may determine the routing path based on the identity information of the third node. Therefore, the second node can send the TLP to the third node according to the routing path.
  • the third node obtains data based on the TLP sent to the second node based on the first encapsulation information.
  • the third node decapsulates the TLP sent by the second node based on the first encapsulation information to obtain the data.
  • the third node may obtain the data type and the encapsulation parameters corresponding to the data type from the received TLP, determine the format of the data carried by the TLP according to the data type and the encapsulation parameters corresponding to the data type, and based on the data type and the encapsulation parameters corresponding to the data type.
  • the format decapsulates the TLP.
  • the third node may determine the data type and the encapsulation parameters corresponding to the data type according to the Type field, reserved bits, and extension header of the TLP Header. For example, as shown in Figure 8, the third node can determine that the data carried by the TLP is an image service according to the Type field and the T9 field of the TLP Header, and obtain the image data type, pixel quantization depth, and resolution of the image data carried by the TLP according to the extension header. Rate and segment indication information.
  • the third node can determine the data type and some encapsulation parameters corresponding to the data type according to the Type field, reserved bits, and extension header of the TLP Header, and determine the remaining data type corresponding to the third field of the TLP Header Package parameters. For example, the third node may determine that the data carried by the TLP is an image service according to the Type field and reserved bits of the TLP Header, obtain the image data type of the image data carried by the TLP according to the third field of the TLP Header, and obtain the TLP according to the extension header The pixel quantization depth, resolution, and segmentation indication information of the carried image data.
  • the following describes the data transmission process in detail with reference to the PCIe system shown in FIG. 13.
  • Camera1/Camera2 can transmit data to Switch1 and Switch2 through the data transmission method performed by the first node in the above embodiment
  • Switch1 can transmit data to Switch2 through the data transmission method performed by the second node in the above embodiment
  • Switch2 can use the above
  • the data transmission method executed by the second node in the embodiment transmits data to the Display
  • the Display can obtain the data through the data transmission method executed by the third node in the foregoing embodiment.
  • the process of Camera1 transmitting data to Display is as follows:
  • A1 Camera1 calculates the amount of data per line of the image according to the output image type (such as RGB, YUV, etc.), the number of quantized bits per pixel, and the image resolution (such as 2K, 4K, etc.), combined with the maximum data carrying capacity of each PCIe TLP The quantity determines the number of TLPs needed to transmit a line of image, and then determines the image segmentation method.
  • the output image type such as RGB, YUV, etc.
  • the number of quantized bits per pixel such as 2K, 4K, etc.
  • Camera1 encapsulates the collected image data into TLP.
  • Camera1 can encapsulate data in any of the following eight ways:
  • Camera1 can use a state value (such as 000010) after unified encoding of the Type field of the TLP Header and the T9 field to indicate that the data type is an image service, and use the extension header to indicate the image data type of the image data, the pixel quantization depth of the image data, The resolution of the image data and the segmentation indication information of the image data are shown in Figure 8.
  • Camera1 fills the data into the Data Payload of TLP.
  • Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • Camera1 can use a reserved value of the Type field of the TLP Header (such as 00011) or a status value of the T9 field to indicate that the data type is image service, and use the extension header to indicate the image data type of the image data and the pixel quantization of the image data Depth, resolution of image data, and segmentation indication information of image data. Take a reserved value of the Type field indicating that the data type is an image service as an example, as shown in FIG. 9. Camera1 fills the data into the Data Payload of TLP. Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • a reserved value of the Type field of the TLP Header such as 00011
  • a status value of the T9 field to indicate that the data type is image service
  • the extension header to indicate the image data type of the image data and the pixel quantization of the image data Depth, resolution of image data, and segmentation indication information of image data.
  • Camera1 can use the Type field of the TLP Header and a state value (such as 000010) after unified encoding of T9 to indicate: the data type is the image service, the image data type of the image data, and the extended header is used to indicate the pixel quantization depth of the image data, The resolution of the image data and the segmentation indication information of the image data are shown in Figure 11.
  • Camera1 fills the data into the Data Payload of TLP.
  • Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • Camera1 can use a reserved value in the Type field of the TLP Header (such as 00011) to indicate that the data type is image service, the T9 field indicates the image data type of the image data, and the extension header is used to indicate the pixel quantization depth of the image data and the image data Resolution and segmentation indication information of image data are shown in Figure 12.
  • Camera1 fills the data into the Data Payload of TLP.
  • Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • Camera1 can use a state value (such as 000010) after unified encoding of the Type field of the TLP Header and the T9 field to indicate that the data type is image service, and Byte 4 to Byte 15 of the TLP Header indicate the image data type of the image data.
  • the header indicates the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Camera1 fills the data into the Data Payload of TLP.
  • Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • Camera1 can use a reserved value of the Type field of the TLP Header (such as 00011) or a status value of the T9 field to indicate that the data type is image service, and Byte 4 to Byte 15 of the TLP Header indicate the image data type of the image data.
  • Use the extended header to indicate the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Camera1 fills the data into the Data Payload of TLP.
  • Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • Method 7 Camera1 can use the Type field of TLP Header and a state value (such as 000010) after unified coding of T9 to indicate: the data type is image service, image data type of image data, and Byte 4 ⁇ Byte 15 of TLP Header indicate image data
  • the pixel quantization depth of uses the extension header to indicate the resolution of the image data, and the segmentation indication information of the image data.
  • Camera1 fills the data into the Data Payload of TLP.
  • Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • Method 8 Camera1 can use a reserved value in the Type field of the TLP Header (such as 00011) to indicate that the data type is image service, the T9 field indicates the image data type of the image data, and the Byte 4 ⁇ Byte 15 of the TLP Header indicate the pixel quantization of the image data. Depth, use the extended header to indicate the resolution of the image data and the segmentation indication information of the image data. Camera1 fills the data into the Data Payload of TLP. Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
  • the Type field can use a reserved value.
  • the following is an example of using a reserved value in the Type field in the above eight modes for description.
  • Switch1 After Switch1 receives the TLP, it detects the TLP Header and parses the Type field. If the status value of the Type field is the status value used in PCI Express Base Specification Revision 5.0 Version 1.0, it will be processed according to the original PCIe mechanism, that is, the TLP will be sent to Root. , And then Root determines the receiving side node according to the configuration space of each end node visited, and then sends the TLP to the receiving side node. If the Type field is defined in this embodiment of the application, the routing information in Switch1 is searched according to the identity information of the second node in the TLP, and the TLP is forwarded to Switch2 according to the corresponding routing path.
  • Switch2 After Switch2 receives the data, it detects the TLP Header and parses the Type field. If the status value of the Type field is the status value used in PCI Express Base Specification Revision 5.0 Version 1.0, it will be processed according to the original PCIe mechanism, that is, TLP will be sent to Root , And then Root determines the receiving side node according to the configuration space of each end node visited, and then sends the TLP to the receiving side node. If the Type field is the content defined in the embodiment of this application, the routing information in Switch2 is searched according to the identity information of the second node in the TLP, and the TLP is sent to the Display according to the corresponding routing path.
  • the Display After the Display receives the TLP, it parses the TLP Header and Data Payload, obtains the type and format of the image, and restores a complete image according to the segmentation instructions, and transmits the data to the display screen for display.
  • Display can obtain the type and format of the image in the following ways: Display parses the Type field and T9 field of the TLP Header, and determines the data type as an image according to the 6-bit state value (such as 000010), and analyzes the extension The header determines the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Display parses the Type field and T9 field of the TLP Header, and determines the data type as an image according to the 6-bit state value (such as 000010), and analyzes the extension
  • the header determines the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Display can obtain the type and format of the image in the following ways: Display parses the Type field of the TLP Header, determines the data type as an image according to the 5-bit state value (such as 00011), and parses the extension header to determine the image The image data type of the data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Display can obtain the type and format of the image in the following ways: Display parses the Type field and T9 field of the TLP Header, and determines the data type as image and image data according to the 6-bit state value (such as 000010) Analyze the extension header to determine the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • the 6-bit state value such as 000010
  • Display can obtain the type and format of the image in the following ways: Display parses the Type field of the TLP Header, and determines the data type as an image according to the 5-bit state value (such as 00011), or Display parses TLP
  • the T9 field of the Header according to the T9 field, determines that the data type is an image.
  • the T9 field of the TLP Header is parsed, and the image data type of the image data is determined according to the T9 field.
  • Analyze the extension header to determine the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Display can obtain the type and format of the image in the following manner: Display parses the Type field and T9 field of the TLP Header, and determines that the data type is an image based on the 6-bit state value (such as 000010). Analyze Byte 8-Byte 15 of the TLP Header, and determine the image data type of the image data according to Byte 8-Byte 15. Analyze the extension header to determine the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • the Display can obtain the type and format of the image in the following manner: Display parses the Type field of the TLP Header, and determines the data type as an image according to the 5-bit state value (such as 00011). Analyze Byte 8-Byte 15 of the TLP Header, and determine the image data type of the image data according to Byte 8-Byte 15. Analyze the extension header to determine the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
  • Display can obtain the type and format of the image in the following ways: Display parses the Type field and T9 field of the TLP Header, and determines the data type as image and image data according to the 6-bit state value (such as 000010) The image data type. Analyze Byte 8 ⁇ Byte 15 of the TLP Header, and determine the pixel quantization depth of the image data according to Byte 8 ⁇ Byte 15. Analyze the extension header to determine the resolution of the image data and the segmentation indication information of the image data.
  • Display can obtain the type and format of the image in the following manner: Display parses the Type field of the TLP Header, and determines that the data type is an image according to the 5-bit state value (such as 00011). The T9 field of the TLP Header is parsed, and the image data type of the image data is determined according to the T9 field. Analyze Byte 8 ⁇ Byte 15 of the TLP Header, and determine the pixel quantization depth of the image data according to Byte 8 ⁇ Byte 15. Analyze the extension header to determine the resolution of the image data and the segmentation indication information of the image data.
  • the embodiment of the application uses the Type field, the T9 field, and the extension header to indicate the information required for data transmission, such as the data type, the encapsulation information corresponding to the data type, etc., so that the Endpoints can communicate even if they do not go through Root. Reduce the complexity of the in-vehicle network.
  • the PCIe system can be compatible with the original PCIe data transmission method and the data transmission method provided in the embodiment of the present application.
  • the embodiment of the present application provides a data transmission device.
  • the structure of the device may be as shown in FIG. 14, including a processing unit 1401 and a communication unit 1402.
  • the data transmission device may be specifically used to implement the method executed by the first node in the embodiments of FIG. 5 to FIG. 12.
  • the device may be the first node itself, or the chip or chip in the first node. A part of a group or chip used to perform related method functions.
  • the processing unit 1401 is configured to encapsulate data into TLP.
  • the TLP includes a packet header and an extended header.
  • the packet header includes a first field and a second field.
  • the first field, the second field and the extended header are used to indicate the first encapsulation information.
  • the first encapsulation information includes the data type of the data and at least one encapsulation parameter corresponding to the data type;
  • the communication unit 1402 is configured to send the TLP to the second node.
  • the value of the bit set indicates the data type
  • the bit set includes the bits of the first field and the bits of the second field
  • the extension header carries at least one encapsulation parameter
  • the first field indicates the data type
  • the second field indicates the first parameter set
  • the extension header of the data packet carries the second parameter set
  • the first parameter set includes part of the encapsulation parameters in at least one encapsulation parameter
  • the second parameter set includes other encapsulation parameters in the at least one encapsulation parameter except for the partial encapsulation parameters.
  • the first field can be a Type field, and the second field is a reserved bit.
  • the packet header may further include a third field, the third field carries second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
  • the third field may be byte 4 to byte 15 or byte 4 to byte 11 of the packet header.
  • the data type may include at least one of the following: image, audio, control information, SWRITE, and security.
  • the first field is a reserved value.
  • the data transmission device may be specifically used to implement the method executed by the third node in the embodiments of FIG. 5 to FIG. 12.
  • the device may be the third node itself, or the chip or chip in the third node.
  • the communication unit 1402 is configured to receive the TLP sent by the second node.
  • the TLP includes a packet header and an extended header.
  • the packet header includes a first field and a second field.
  • the first field, the second field and the extended header are used to indicate the first
  • the encapsulation information, the first encapsulation information includes the data type of the data carried by the TLP and at least one encapsulation parameter corresponding to the data type; the processing unit 1401 is configured to obtain data for the TLP based on the first encapsulation information.
  • the value of the bit set indicates the data type
  • the bit set includes the bits of the first field and the bits of the second field
  • the extension header carries at least one encapsulation parameter
  • the first field indicates the data type
  • the second field indicates the first parameter set
  • the extension header of the data packet carries the second parameter set
  • the first parameter set includes at least one encapsulation parameter part of the encapsulation Parameters
  • the second parameter set includes other encapsulation parameters excluding some encapsulation parameters in the at least one encapsulation parameter.
  • the first field can be a Type field, and the second field is a reserved bit.
  • the data type may include at least one of the following: image, audio, control information, SWRITE, and security.
  • the first field is a reserved value.
  • the processing unit 1401 when the processing unit 1401 obtains data based on the first encapsulation information, it is specifically configured to: determine the format of the data based on the first encapsulation information; and obtain the data based on the format.
  • the packet header may further include a third field, the third field carries second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
  • the third field may be byte 4 to byte 15 or byte 4 to byte 11 of the packet header.
  • the processing unit 1401 when obtaining data based on the first packaging information, is specifically configured to: determine the format of the data according to the first packaging information and the second packaging information; and obtain the data based on the format.
  • the embodiment of the present application also provides a data transmission device.
  • the structure of the device may be as shown in FIG. 15, including a processing unit 1501, a first communication unit 1502, and a second communication unit 1503.
  • the data transmission device may be specifically used to implement the method executed by the second node in the embodiments of FIG. 5 to FIG. 12.
  • the device may be the second node itself, or the chip or chip in the second node. A part of a group or chip used to perform related method functions.
  • the first communication unit 1502 is used for transmitting data with the first node; the second communication unit 1503 is used for transmitting data with the third node; the processing unit 1501 is used for receiving the first communication unit 1502 A first TLP sent by a node; and a second TLP sent to a third node through the second communication unit 1503; wherein the TLP includes a packet header and an extension header, wherein the first field of the packet header, the second field of the packet header, and the extension header are used
  • the first encapsulation information includes the data type of the data carried by the TLP and at least one encapsulation parameter corresponding to the data type, and the TLP includes the first TLP and the second TLP.
  • the value of the bit set indicates the data type
  • the bit set includes the bits of the first field and the bits of the second field
  • the extension header carries at least one encapsulation parameter
  • the first field indicates the data type
  • the second field indicates the first parameter set
  • the extension header of the data packet carries the second parameter set
  • the first parameter set includes at least one encapsulation parameter part of the encapsulation Parameters
  • the second parameter set includes other encapsulation parameters excluding some encapsulation parameters in the at least one encapsulation parameter.
  • the first field can be a Type field, and the second field is a reserved bit.
  • the packet header may further include a third field, the third field carries second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
  • the third field may be byte 4 to byte 42 or byte 4 to byte 38 of the packet header.
  • Data types can include: image, audio, control information, SWRITE, and security.
  • the first field may be a reserved value.
  • the first TLP carries the identity information of the third node; the processing unit 1501 is further configured to: before sending the second TLP to the third node through the second communication unit 1503, select based on the identity information of the third node Routing path; the processing unit 1501, when sending the second TLP to the third node through the second communication unit 1503, is specifically configured to: send the second TLP to the third node according to the routing path.
  • 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 may be as shown in FIG. 16, and the device may be an end node or a chip in the end node.
  • the device may include a processor 1601, a communication interface 1602, and a memory 1603.
  • the processing unit 1401 may be a processor 1601.
  • the communication unit 1402 may be a communication interface 1602.
  • the processor 1601 may be a CPU, or a digital processing unit, and so on.
  • the communication interface 1602 may be a transceiver, an interface circuit such as a transceiver circuit, etc., or a transceiver chip, and so on.
  • the device also includes a memory 1603, which is used to store programs 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 1401, which will not be repeated here in this application.
  • the communication interface 1602 is specifically configured to perform the actions of the above-mentioned communication unit 1402, which will not be repeated here in this application.
  • connection medium between the aforementioned communication interface 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 communication interface 1602 are connected by a bus 1604.
  • the bus is represented by a thick line in FIG. 16, and the connection modes between other components are only for schematic illustration. , Is not limited.
  • the bus can be divided into address bus, data bus, 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 data transmission device may be as shown in FIG. 17, and the device may be a switching node or a chip in a switching node.
  • the device may include a processor 1701, a communication interface 1702a, a communication interface 1702b, and a memory 1703.
  • the processing unit 1501 may be a processor 1701.
  • the first communication unit 1502 may be a communication interface 1702a.
  • the second communication unit 1503 may be a communication interface 1702b.
  • the processor 1701 may be a CPU, or a digital processing unit, and so on.
  • the communication interface 1702a and the communication interface 1702b may be a transceiver, an interface circuit such as a transceiver circuit, etc., or a transceiver chip, and so on.
  • the device also includes a memory 1703, which is used to store programs executed by the processor 1701.
  • the memory 1703 may be a non-volatile memory, such as HDD or SS), etc., or may also be a volatile memory, such as RAM.
  • the memory 1703 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 1701 is configured to execute the program code stored in the memory 1703, and is specifically configured to execute the actions of the aforementioned processing unit 1501, which will not be repeated in this application.
  • the communication interface 1702a is specifically configured to perform the actions of the above-mentioned first communication unit 1502, which will not be repeated in this application.
  • the communication interface 1702b is specifically configured to perform the actions of the above-mentioned second communication unit 1503, which will not be repeated in this application.
  • the embodiment of the present application does not limit the specific connection medium between the communication interface 1702a, the communication interface 1702b, the processor 1701, and the memory 1703.
  • the memory 1703, the processor 1701, the communication interface 1702a, and the communication interface 1702b are connected by a bus 1704.
  • the bus is represented by a thick line in FIG. 17.
  • the connection mode between other components is only The schematic description is not intended to be limiting.
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 17, but it does not mean that there is only one bus or one type of bus.
  • the embodiment of the present invention also provides 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 direct 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 that the computer or other programmable equipment is executed
  • 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)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Communication Control (AREA)

Abstract

本申请公开了一种基于PCIe的数据传输方法及装置,可以使PCIe***中的Endpoint无需经过根节点(Root)进行通信,从而用于降低车内网复杂度。该方法包括:第一节点将数据封装成TLP后向第二节点进行发送,TLP包括包头以及扩展头,其中,包头包括第一字段和第二字段,第一字段、第二字段和扩展头用于指示第一封装信息,第一封装信息包括数据的数据类型以及数据类型对应的至少一个封装参数。本申请实施例通过利用第一字段、第二字段和扩展头指示传输数据所需要的信息,如数据类型、数据类型对应的封装参数等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。

Description

一种基于PCIe的数据传输方法及装置 技术领域
本申请涉及通信技术领域,尤其涉及一种基于***组件互连传递(peripheral component interconnect express,PCIe)的数据传输方法及装置。
背景技术
PCIe是一种高速短距离通信接口,广泛应用在计算机、测试仪器等设备中。PCIe***的主要组成单元有根节点(Root)、交换节点(Switch)和端节点(Endpoint)。Root负责管理PCIe***中所有总线和节点,是中央处理单元(central processing unit,CPU)和PCIe***中Endpoint通信的桥梁;Switch作为数据转发节点,连接Switch和EndPoint;EndPoint为端设备,如外设(Peripheral)。PCIe***中EndPoint与EndPoint之间不能直接通信,必须经过Root。
PCIe***中EndPoint之间通信必须通过Root的机制,导致车内网中存在多种传输接口,各种接口之间进行信息交互需要接口转换,不同接口之间的转换导致车内网复杂度大幅提升,尤其是在高速通信场景中。
发明内容
本申请提供一种基于PCIe的数据传输方法及装置,可以使得PCIe***中的Endpoint之间可以不通过Root进行通信,从而降低车内网复杂度。
第一方面,本申请实施例提供了一种基于PCIe的数据传输方法,包括:第一节点将数据封装成事务层包(transaction layer packet,TLP)后向第二节点进行发送,TLP包括包头以及扩展头,其中,包头包括第一字段和第二字段,第一字段、第二字段和扩展头用于指示第一封装信息,第一封装信息包括数据的数据类型以及数据类型对应的至少一个封装参数。本申请实施例通过利用第一字段、第二字段和扩展头指示传输数据所需要的信息,如数据类型、数据类型对应的封装参数等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
在一种可能的设计中,比特集合的取值指示数据类型,比特集合包括第一字段的比特以及第二字段的比特;扩展头携带至少一个封装参数。上述设计中通过将第一字段和第二字段联合编码的方式,使得TLP可以指示传输数据做需要的信息而使得端节点之间即使不经过Root,也可以进行通信。
在一种可能的设计中,第一字段指示数据类型,第二字段指示第一参数集合;数据包的扩展头携带第二参数集合;其中,第一参数集合包括至少一个封装参数中的部分封装参数,第二参数集合包括至少一个封装参数中除部分封装参数以外的其它封装参数。上述设计中通过将第一字段和第二字段分开指示的方式,使得目的端节点在解析在其中一个字段时可以判断是否采用本申请提供的方案。
在一种可能的设计中,第一字段为类型(Type)字段,第二字段为预留比特位。上述设计中,通过复用Type字段和预留比特位,使得TLP结构的改动较小。
在一种可能的设计中,包头还包括第三字段,第三字段携带第二封装信息,第二封装 信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。通过上述设计,使得TLP可以指示更多的封装信息。
在一种可能的设计中,第三字段为包头的字节4~字节15或字节4~字节11。由于包头的字节4~字节15或字节4~字节11根据Type字段不同指示的内容不同,在通过Type字段和预留比特位指示第一封装信息时,可以使用第三字段携带一部分或者全部的封装参数。
在一种可能的设计中,数据类型包括如下至少一项:图像、音频、控制类信息、流写(stream write,SWRITE)、安全。
在一种可能的设计中,图像对应的封装参数可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的封装参数可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的封装参数可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的封装参数可以包括:消息类型、格式指示、加密与否。
在一种可能的设计中,SWRITE对应的封装参数可以包括:对齐方式。
在一种可能的设计中,第一字段为预留值。上述设计中,通过使用预留值,使得PCIe***可以兼容原有数据传输方法和本申请提供的数据传输方法。
在一种可能的设计中,TLP中可以携带目的端节点的信息,如目的端节点的地址、目的端节点的身份标识(identification,ID)等。通过上述设计,第二节点可以根据目的端节点的信息确定路由路径,从而可以根据路由路径向目的端节点进行发送,而不需要经过Root。
第二方面,本申请实施例提供了一种基于PCIe的数据传输方法,包括:第二节点接收第一节点发送的第一TLP;第二节点向第三节点发送第二TLP;其中,TLP包括包头以及扩展头,其中,包头的第一字段、包头的第二字段以及扩展头用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数,TLP包括第一TLP和/或第二TLP。本申请实施例通过利用包头的第一字段、包头的第二字段以及扩展头指示传输数据所需要的信息,如数据类型、数据类型对应的封装信息等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
在一种可能的设计中,第一TLP和第二TLP可以为同一个TLP,或者,第一TLP和第二TLP也可以为不同的TLP。
在一种可能的设计中,第一TLP第二TLP包含的数据相同,或者数据的内容相同。
在一种可能的设计中,比特集合的取值指示数据类型,比特集合包括第一字段的比特以及第二字段的比特;扩展头携带至少一个封装参数。上述设计中通过将第一字段和第二字段联合编码的方式,使得TLP可以指示传输数据做需要的信息而使得端节点之间即使不经过Root,也可以进行通信。
在一种可能的设计中,第一字段指示数据类型,第二字段指示第一参数集合;数据包的扩展头携带第二参数集合;其中,第一参数集合包括至少一个封装参数中的部分封装参数,第二参数集合包括至少一个封装参数中除部分封装参数以外的其它封装参数。上述设计中通过将第一字段和第二字段分开指示的方式,使得第三节点在解析在其中一个字段时 可以判断是否采用本申请提供的方案。
在一种可能的设计中,第一字段为Type字段,第二字段为预留比特位。上述设计中,通过复用Type字段和预留比特位,使得TLP结构的改动较小。
在一种可能的设计中,包头还包括第三字段,第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。通过上述设计,使得TLP可以指示更多的封装信息。
在一种可能的设计中,第三字段为包头的字节4~字节15或字节4~字节11。由于包头的字节4~字节15或字节4~字节11根据Type字段不同指示的内容不同,在通过Type字段和预留比特位指示第一封装信息时,可以使用第三字段携带一部分或者全部的封装参数。
在一种可能的设计中,数据类型包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
在一种可能的设计中,图像对应的封装参数可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的封装参数可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的封装参数可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的封装参数可以包括:消息类型、格式指示、加密与否。
在一种可能的设计中,SWRITE对应的封装参数可以包括:对齐方式。
在一种可能的设计中,第一字段为预留值。上述设计中,通过使用预留值,使得PCIe***可以兼容原有数据传输方法和本申请提供的数据传输方法。
在一种可能的设计中,第一TLP中可以携带第三节点的身份信息,如第三节点的地址、第三节点的ID等。通过上述设计,第二节点可以根据第三节点的信息确定路由路径,从而可以根据路由路径向第三节点进行发送,而不需要经过Root。
在一种可能的设计中,在第二节点向第三节点发送第二TLP之前,第二节点可以基于第三节点的身份信息选择路由路径。第二节点向第三节点发送第二TLP,包括:第二节点按照路由路径向第三节点发送第二TLP。通过上述设计,第二节点可以根据第三节点的信息确定路由路径,从而可以根据路由路径向第三节点进行发送,而不需要经过Root。
第三方面,本申请实施例提供了一种基于PCIe的数据接收方法,包括:第三节点接收第二节点发送的TLP,TLP包括包头以及扩展头,其中,包头包括第一字段和第二字段,第一字段、第二字段和扩展头用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数;第三节点基于第一封装信息对TLP获得数据。本申请实施例通过利用第一字段、第二字段和扩展头指示传输数据所需要的信息,如数据类型、数据类型对应的封装信息等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
在一种可能的设计中,比特集合的取值指示数据类型,比特集合包括第一字段的比特以及第二字段的比特;扩展头携带至少一个封装参数。上述设计中通过将第一字段和第二字段联合编码的方式,使得TLP可以指示传输数据做需要的信息而使得端节点之间即使不经过Root,也可以进行通信。
在一种可能的设计中,第一字段指示数据类型,第二字段指示第一参数集合;数据包的扩展头携带第二参数集合;其中,第一参数集合包括至少一个封装参数中的部分封装参数,第二参数集合包括至少一个封装参数中除部分封装参数以外的其它封装参数。上述设计中通过将第一字段和第二字段分开指示的方式,使得第三节点在解析在其中一个字段时可以判断是否采用本申请提供的方案。
在一种可能的设计中,第一字段为Type字段,第二字段为预留比特位。上述设计中,通过复用Type字段和预留比特位,使得TLP结构的改动较小。
在一种可能的设计中,数据类型包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
在一种可能的设计中,图像对应的封装参数可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的封装参数可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的封装参数可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的封装参数可以包括:消息类型、格式指示、加密与否。
在一种可能的设计中,SWRITE对应的封装参数可以包括:对齐方式。
在一种可能的设计中,第一字段为预留值。上述设计中,通过使用预留值,使得PCIe***可以兼容原有数据传输方法和本申请提供的数据传输方法。
在一种可能的设计中,第三节点基于第一封装信息对TLP获得数据时,可以基于第一封装信息确定数据的格式,并基于格式获得数据。通过上述设计,第三节点可以解析TLP Header,获取图像的类型和格式,从而得到数据。
在一种可能的设计中,包头还包括第三字段,第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。通过上述设计,使得TLP可以指示更多的封装信息。
在一种可能的设计中,第三字段为包头的字节4~字节15或字节4~字节11。由于包头的字节4~字节15或字节4~字节11根据Type字段不同指示的内容不同,在通过Type字段和预留比特位指示第一封装信息时,可以使用第三字段携带一部分或者全部的封装参数。
在一种可能的设计中,第三节点基于第一封装信息获得数据时,可以基于第一封装信息以及第二封装信息确定数据的格式,并基于格式获得数据。通过上述设计,第三节点可以解析TLP Header,获取图像的类型和格式,从而得到数据。
第四方面,本申请提供一种基于PCIe的数据传输装置,该装置可以是通信设备,也可以是通信设备内的芯片或芯片组,其中,通信设备可以为第一节点也可以是第二节点也可以是第三节点。该装置可以包括处理单元和收发单元。当该装置是通信设备时,该处理单元可以是处理器,该收发单元可以是收发器;该装置还可以包括存储模块,该存储模块可以是存储器;该存储模块用于存储指令,该处理单元执行该存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。当该装置是通信设备内的 芯片或芯片组时,该处理单元可以是处理器,该收发单元可以是输入/输出接口、管脚或电路等;该处理单元执行存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。该存储模块可以是该芯片或芯片组内的存储模块(例如,寄存器、缓存等),也可以是该网络设备内的位于该芯片或芯片组外部的存储模块(例如,只读存储器、随机存取存储器等)。
第五方面,提供了一种基于PCIe的数据传输装置,包括:处理器,还可以包括通信接口和存储器。通信接口用于该装置与其它装置之间传输信息、和/或消息、和/或数据。该存储器用于存储计算机执行指令,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行如上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
第六方面,本申请还提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
第七方面,本申请还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
第八方面,本申请还提供一种PCIe***,该***包括第一节点、第二节点、第三节点,其中,第一节点可以执行上述第一方面中相应的功能,第二节点可以执行上述第二方面中相应的功能,第三节点可以执行上述第三方面中相应的功能。
第九方面,本申请实施例提供的一种芯片,芯片包括至少一个处理器和通信接口,处理器与存储器耦合,用于读取存储器中存储的计算机程序以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
第十方面,本申请实施例提供一种芯片,包括通信接口和至少一个处理器,所述处理器运行以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
需要说明的是,本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
附图说明
图1为本申请实施例提供的一种PCIe***的架构示意图;
图2为本申请实施例提供的另一种PCIe***的架构示意图;
图3为本申请实施例提供的一种TLP的结构示意图;
图4为本申请实施例提供的一种TLP头的结构示意图;
图5为本申请实施例提供的一种基于PCIe***的数据传输***的流程示意图;
图6为本申请实施例提供的一种摄像头的结构示意图;
图7为本申请实施例提供的一种指示第一封装信息的示意图;
图8为本申请实施例提供的一种图像业务的示意图;
图9为本申请实施例提供的另一种图像业务的示意图;
图10为本申请实施例提供的另一种指示第一封装信息的示意图;
图11为本申请实施例提供的一种图像业务的示意图;
图12为本申请实施例提供的另一种图像业务的示意图;
图13为本申请实施例提供的一种PCIe***的架构示意图;
图14为本申请实施例提供的一种数据传输装置的结构示意图;
图15为本申请实施例提供的另一种数据传输装置的结构示意图;
图16为本申请实施例提供的另一种数据传输装置的结构示意图;
图17为本申请实施例提供的另一种数据传输装置的结构示意图。
具体实施方式
PCIe是一种高速短距离通信接口,广泛应用在计算机、测试仪器等设备中。目前,由于PCIe可以快速直接读写内存,提供大带宽通信,一些车企将其传输距离加长,作为车内网大数据量通信端口。但是由于PCIe工作机制的限制,不能完全适用于车内网所有场景。
如图1所示为一个PCIe***,***的主要组成单元有Root(图1中示出为根节点)、Switch(图1中示出为交换节点)和Endpoint(图1中示出为端节点)。Root负责管理PCIe***中所有总线(图1中以黑色连线示出)和节点,是CPU和***中其它设备通信的桥梁,CPU同所有的设备通信经过Root。Switch作为桥梁连接Root、其它Switch、以及Endpoint,作为数据转发的节点。Endpoint为端设备,如外设(peripheral),负责发送或者接收数据。
如图2所示为包括两个PCIe***的通信***,两个PCIe***可以通过非透明桥(non-transparent bridge,NTB)进行通信。NTB可以部署在Switch上。由于一个PCIe***中的设备都有各自的Root独立管理,因此不同的PCIe***中的设备的地址和ID会有冲突,为了能让两个***连接并且正常通信,需要在两个***之间进行桥接转换,进行地址,或ID的翻译,NTB可以负责地址或者ID转换,使两个PCIe***相互通信。
PCIe***中Endpoint与Endpoint之间不能直接通信,必须经过Root,因为只有Root知道Endpoint中有哪些功能,支持什么类型的数据。PCIe***中的Endpoint的功能,如支持的数据类型、格式等信息都存放在Endpoint的配置空间中,且只有Root有权限去读取Endpoint的配置空间,其它Endpoint和Switch均无权限读取。因此Endpoint支持的数据类型、格式信息只有Root知道,其它节点无法获取。而PCIe***中Endpoint不知道其它Endpoint支持的数据类型、格式,不经过Root无法进行通信。
如图1中,虽然Endpoint1与Endpoint2连接在一个Switch上,但两者是不能直接通过Switch通信的,Endpoint1/2必须先同Root通信,经Root才能找到Endpoint2/1,例如,Endpoint1向Endpoint2发送数据的过程为,Endpoint1将数据发送给Switch1,Switch1将该数据发送给Root,Root根据各个Endpoint的功能确定数据接收方为Endpoint2,Root将数据发送给Switch1,Switch1将数据发送给Endpoint2。
PCIe***中Endpoint之间通过Root通信的机制导致其不能适用于车内网很多场景,如环形车内网要求传感器直接连接在网关上,传感器的数据经环网上的网关/交换机进行交换转发传输到不同的计算/显示单元,这种车内网架构要求传感器数据可以经网关/交换机向任意方向转发,以提供通信链路冗余,从而保证车内通信安全,因此车内环网需使用其它接口。这种情况导致车内网中存在多种传输接口,各种接口之间进行信息交互需要接口 转换,不同接口之间的转换导致车内网复杂度大幅提升。
基于此,本申请实施例提供一种基于PCIe的数据传输方法及装置,用于解决现有技术中Endpoint之间通过Root通信的机制导致车内网中存在多种传输接口,车内网复杂度较大的问题。其中,方法和装置是基于同一技术构思的,由于方法及设备解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。本申请实施例提供一种基于PCIe的数据传输方法及装置,可以应用于车内网,特别是自动驾驶汽车车内网,也可以应用于其它设备的PCIe***。
为了方便理解本申请实施例,下面对PCIe基础规范修订5.0版本1.0(PCI Express Base Specification Revision 5.0 Version 1.0)中TLP的结构进行说明。
TLP的结构可以如图3所示,可以包括TLP前缀(TLP Prefixes)、TLP头(TLP Header)、数据负荷(Data Payload)、TLP摘要(TLP Digest)。其中,TLP Prefixes长度可以为H字节(Byte),H为大于0的整数;TLP Header长度可以为12/16个字节组成,用于指示PCIe业务类型;Data Payload为数据部分,长度可以为0-4K Byte;TLP Digest长度可以为4字节,指示的内容可以为循环冗余校验码(end-to-end 32bit cyclic redundancy check,ECRC),例如,ECRC可以为循环冗余校验(cyclic redundancy check,CRC)校验码,用于校验数据包传输正确与否。
其中,以16Byte的TLP Header为例,TLP Header的结构可以如图4所示,包括:
格式(format,Fmt)字段:该字段的长度可以为3比特(bit),用于指示TLP Header长度以及TLP是否有Data Payload部分,TLP Header长度有2种,TLP是否包含Data Payload有是和否2种情况,因此,Fmt字段可以指示4种信息,分别为:TLP Header长度为第一种长度且TLP包含Data Payload、TLP Header长度为第一种长度且TLP不包含Data Payload、TLP Header长度为第二种长度且TLP包含Data Payload、TLP Header长度为第二种长度且TLP不包含Data Payload,此外,Fmt字段还可以指示TLP前缀(Prefix)。Fmt字段包括3bit,共8个状态值,其中,8个状态值中的5个状态值可以用来指示上述5种信息,剩下3个状态值为保留(reserve)。例如,000、001、010、011、100这5个状态值可以用于指示上述5种信息,剩下101、110、111这3个状态值为保留(reserve)。
类型(Type)字段:5bit,用于指示TLP的业务类型。PCIe业务类型有6大类,分别为:存储器(Memory)读/写、输入/输出(input/output,I/O)读/写、配置(Configuration)读/写、消息(Message)请求、结束(Completion)、原子操作。Type字段包括5bit,共32个状态值,PCI Express Base Specification Revision 5.0 Version 1.0中使用其中的19个状态值指示TLP的业务类型,剩下13个状态值为reserve。例如,可以使用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。
T9/T8:预留bit。
优先级(traffic class,TC)字段:用于指示调度优先级。
属性(attributes,Attr)字段:用于指示TLP属性。其中,TLP属性可以指TLP处理方式,例如订购处理(Ordering)、硬件一致性管理(Hardware coherency management(snoop))等等。
轻量级指示(lightweight notification,LN)字段:轻量级指示,PCIe定义的一种简单 读写方式。
TLP处理提示(TLP processing hints,TH)字段:用于指示TLP Header尾部是否有PH(Processing Hints)。
TLP摘要指示(indicates presence of TLP Digest,TD)字段:用于指示TLP尾部是否包含TLP摘要。
中毒数据(poisoned data,EP):用于指示是否为中毒数据。
地址类型(address type,AT):用于指示地址是否需要翻译。
长度(Length):用于指示Data Payload长度,可以以4字节为最小单位。
Byte4-Byte7:根据业务类型定义,即根据Type字段指示的业务类型,Byte4-Byte7可以指示该业务类型相应的内容。
Byte8-Byte15:根据路由方式不同内容不同,填充地址或者ID。其中,Byte8-Byte11可以填充目的节点的地址或者目的节点的ID,Byte12-Byte15可以填充源节点的地址或者源节点的ID。或者,Byte8-Byte11可以填充源节点的地址或者源节点的ID,Byte12-Byte15可以填充目的节点的地址或者目的节点的ID。
可以理解的,12Byte的TLP Header的结构与16Byte的TLP Header的结构类型类似,区别在于16Byte的TLP Header中Byte4-Byte7根据业务类型定义,Byte8-Byte15填充地址信息,而12Byte的TLP Header中Byte4-Byte7根据业务类型定义,Byte8-Byte11填充地址信息。
本申请实施例提供的方法基于该PCI Express Base Specification Revision 5.0 Version 1.0公开的TLP结构。本申请实施例中涉及的“预留值”可以指PCI Express Base Specification Revision 5.0 Version 1.0中未被使用的状态值,例如,Fmt字段的101、110、111这3个状态值,“预留值”也可以称为“reserve值”。本申请实施例中涉及的“预留bit”可以指PCI Express Base Specification Revision 5.0 Version 1.0中TLP未被使用的比特位,例如,TLP Header的T8/T9,“预留比特”也可以称为“保留比特位”、“预留比特位”等。
可以理解的,在后续演进版本中,本申请实施例中涉及的“预留值”也可以指对应演进版本中TLP未被使用的比特位,本申请实施例不作限制。
下面介绍与本申请实施例相关的术语:
数据类型可以但不限于包括:图像、音频、控制类信息、SWRITE、安全等。
数据类型对应的封装参数可以用于表征数据类型的属性。例如,若数据类型为图像,则封装参数可以但不限于包括如下4种参数:
图像数据类型:RAW、RGB、YUV、嵌入式数据(embedded data)、压缩图像、图像中目标轮廓(Object)等;
像素量化深度:如12、20、24等;
分辨率:如1080P、2K、4K等;
分段指示信息:图像感光(sensor)一次输出一行图像,对于分辨率高的图像TLP无法一次传输一行图像,需将一行图像分成若干个TLP传输。分段指示信息用于指示当前TLP是当前行的第几段。
若数据类型为音频,则封装参数可以但不限于包括如下4种参数:
采样量化格式:如浮点量化,整数量化等;
采样频率:如24KHz,48KHz等;
量化深度:如每个采样8bit,12bit等;
声道数/通道数:用于指示当前数据包包含几个声道/通道。
若数据类型为控制类信息,则封装参数可以但不限于包括如下2种参数:
控制类信息类型:如集成电路总线(inter-integrated circuit,I2C)、通用输入/输出(general-purpose input/output,GPIO)、串行外设接口(serial peripheral interface,SPI)等;
每类控制信息数量:例如当前数据包包含3路I2C,8路GPIO。
若数据类型为安全,则封装参数可以但不限于包括如下3种参数:
消息类型:建立安全需要多条消息交互,每条交互消息的类型不同,如鉴权消息、加密消息等;
格式指示:消息中的bit如何分组,每个组表示什么意思;
加密与否:当前数据包是否加密。
若数据类型为SWRITE,则封装参数可以但不限于包括如下1种参数:
对齐方式:以4字节为最小单位对齐,还是8字节为最小单位对齐。
上述数据类型仅是一种示例性说明,在具体实施中并不限于本申请实施例列举的数据类型。上述各个数据类型对应的封装参数仅是一种示例性说明,在具体实施中,上述各数据类型也可以对应其它的封装参数,这里不做具体限定。
可以理解的,本申请实施例中,“数据类型”仅是一种示例性命名,在具体实施中也可以命名为其它,如也可以称为数据业务类型等,或者,数据类型也可以称为A,只要A与本申请实施例中数据类型具有相同或相似的含义可以将A理解为本申请实施例中的数据类型。“封装参数”仅是一种示例性命名,在具体实施中也可以命名为其它,如也可以称为属性、属性参数等,或者,也可以称为B,只要B与本申请实施例中封装参数具有相同或相似的含义可以将B理解为本申请实施例中的封装参数。
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a、b、c可以是单个,也可以是多个。
需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
下面将结合附图,对本申请实施例进行详细描述。
本申请提供一种基于PCIe的数据传输方法,该方法可以应用于PCIe***,例如,如图1所示的PCIe***,或者如图2所示的PCIe***等等。如图5所示,该方法包括:
S501,第一节点将数据封装成TLP,其中,TLP包括TLP Header与扩展头。TLP Header的第一字段、TLP Header的第二字段以及扩展头用于指示第一封装信息,第一封装信息包括该数据的数据类型以及数据类型对应的至少一个封装参数。其中,第一节点可以为PCIe***中的端节点,也可以为PCIe***中的交换节点。
一种示例性说明中,扩展头可以包括TLP Header与Data Payload之间的4×n个字节,n为大于或等于1的整数。
一种实现方式中,若扩展头包括的比特位未填充完,则可以预留未使用的比特位。
应理解,“扩展头”仅是一种示例性命名,在后续演进版本中,也可以命名为其它,如A,若A能实现“扩展头”的功能,也可以将A理解为本申请实施例中的“扩展头”。
TLP还可以包括Data Payload,数据可以携带在TLP的Data Payload部分。
在一些实施例中,第一节点可以是端节点也可以是端节点中的芯片,例如第一节点可以是端节点中传输节点(如TX/RX)等。以摄像机(Camera)为例,Camera的结构可以如图6所示,包括镜头(lens)、感光元件(complementary metal oxide semiconductor,COMS)以及TX/RX等等,其中,COMS用于通过镜头采集图像数据,并通过TX/RX发送出去。第一节点可以是Camera,也可以是Camera中TX/RX。若第一节点是端节点,第一节点进行封装的数据可以是自身采集的数据,例如,第一节点是Camera,进行封装的数据可以是Camera采集的图像数据等等,第一节点是麦克风,进行封装的数据可以是麦克风采集的音频数据等等。若第一节点是端节点中的传输节点,第一节点进行封装的数据可以是端节点中传感芯片采集的数据,以图6为例,第一节点进行封装的数据可以是COMS采集的图像数据。
在一种可能的实施方式中,在步骤S501之前,第一节点可以提取数据的封装参数。以图6为例,若第一节点为Camera,第一节点可以确定所采集图像数据的图像数据类型、像素量化深度、分辨率等,并根据图像数据类型、像素量化深度、分辨率等可以计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量可得出传输一行图像需要TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。若第一节点为Camera中的TX/RX,第一节点可以接收COMS采集的图像数据,该图像数据显示携带图像数据类型、像素量化深度、分辨率等封装参数,第一节点可以根据该图像数据携带的图像数据类型、像素量化深度、分辨率等计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量可得出传输一行图像需要TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。
示例性的,第一字段可以为Type字段,第二字段可以为预留比特位,例如,第二字段为图4中的T8字段,又例如第二字段为图4中的T9字段,再例如第二字段包括图4中的T8字段和T9字段。当然,第一字段、第二字段也可以为其它字段,这里不做具体限定。为了描述上的方便,下面以第一字段为Type字段,第二字段为T9字段为例进行说明。
一种示例性说明中,可以使用Type字段的预留值和T9字段的所有状态值指示封装信息,例如,使用Type字段的00011、00110、00111、01000、01001、01111、11000~11010、11100~11111这13个状态值,以及T9字段的0和1共2个状态值,因此,共2×13个状态值可以指示封装信息。
一种实现方式中,TLP Header的第一字段、TLP Header的第二字段以及扩展头指示第一封装信息时,可以使用TLP Header的第一字段、TLP Header的第二字段指示数据类型,使用扩展头携带第一封装信息中的封装参数,如图7所示。
在一些实施例中,可以将Type字段和T9字段进行统一编码(或者联合编码)后指示数据类型,即通过比特集合的取值指示数据类型,比特集合包括Type字段的5个比特以及T9字段的1个比特,从而可以通过这6个比特的状态值(如000010等)指示数据类型,使用扩展头携带第一封装信息中的封装参数。以图像数据为例,可以将Type字段和T9字段进行统一编码后指示图像业务,扩展头携带图像数据类型、像素量化深度、分辨率、分 段指示信息,如图8所示。
在另一些实施例中,可以使用Type字段的预留值或者T9字段的状态值可以指示数据类型,使用扩展头携带第一封装信息中的封装参数。以图像数据为例,可以使用Type字段的预留值指示图像业务,扩展头携带图像数据类型、像素量化深度、分辨率、分段指示信息,如图9所示。
另一种实现方式中,TLP Header的第一字段、TLP Header的第二字段以及扩展头指示第一封装信息时,可以使用TLP Header的第一字段、TLP Header的第二字段指示数据类型以及第一封装信息的一部分封装参数,使用扩展头携带第一封装信息的另一部分封装参数,如图10所示。
在一些实施例中,可以将Type字段和T9字段进行统一编码(或者联合编码)后指示数据类型以及一部分封装参数,即通过比特集合的取值指示数据类型以及第一封装信息的一部分封装参数,比特集合包括Type字段的5个比特以及T9字段的1个比特,从而可以通过这6个比特的状态值(如000010等)指示数据类型以及第一封装信息的一部分封装参数,使用扩展头携带第一封装信息的另一部分封装参数。以图像数据为例,可以将Type字段和T9字段进行统一编码后指示图像业务以及图像数据类型,扩展头携带像素量化深度、分辨率、分段指示信息,如图11所示。
在另一些实施例中,可以使用Type字段与T9字段分开指示的方式,也可以理解为Type字段与T9字段指示内容不同,例如,可以使用Type字段指示数据类型,使用T9字段指示第一封装信息的一部分封装参数,使用扩展头携带第一封装信息的另一部分封装参数。又例如,可以使用Type字段指示第一封装信息的一部分封装参数,使用T9字段指示数据类型,使用扩展头携带第一封装信息的另一部分封装参数。以图像业务为例,可以使用Type字段的预留值指示图像业务,可以使用T9字段指示图像数据类型,扩展头携带像素量化深度、分辨率、分段指示信息,如图12所示。
一种示例性说明中,TLP还可以携带指示TLP是否加密的指示信息,或者,也可以理解为,是否加密为数据类型对应的一个封装参数。其中,TLP指示TLP是否加密时,Type字段指示的类型可以为PCIe原有类型,也可以是本申请实施例中涉及的数据类型。
第一封装信息可以包括数据类型对应的所有封装参数,也可以包括数据类型对应的一部分封装参数。
在一些实施例中,TLP Header还可以包括第三字段,示例性的,第三字段可以是16Byte的TLP Header的Byte4-Byte15,也可以是12Byte的TLP Header的Byte4-Byte11。第三字段可以携带数据类型对应的另一部分封装参数。也可以理解为,第三字段可以携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
通过上述方式可以指示图像、音频、控制类信息、SWRITE、安全中的一种业务的一种格式。或者,也可以指示图像、音频、控制类信息、SWRITE、安全中的一种业务的多种格式。或者,也可以指示图像、音频、控制类信息、SWRITE、安全中的多种业务的多种格式。或者,还可以指示图像、音频、控制类信息、SWRITE、安全中的多种业务混合(如带安全保护的图像等等)。或是其它业务类型及格式,这里不再一一列举。
此外,TLP中还可以携带目的节点(下面统一称为第三节点)的身份信息,例如第三节点的地址、ID等。TLP中还可以携带第一节点的身份信息,例如第一节点的地址、ID 等。一种示例为,若TLP Header的长度为16Byte,则TLP Header的Byte8-Byte15可以携带第一节点、第三节点的身份信息。若TLP Header的长度为12Byte,则TLP Header的Byte8-Byte11可以携带第一节点、第三节点的身份信息。其中,第三节点可以为PCIe***中的端节点,也可以为PCIe***中的交换节点。
S502,第一节点向第二节点发送TLP。相应的,第二节点接收第一节点发送的该TLP。其中,第二节点可以为PCIe***中的端节点,也可以为PCIe***中的交换节点。一种示例性说明中,第二节点可以为PCIe***中第一节点连接的交换节点。
S503,第二节点向第三节点发送TLP。相应的,第三节点接收第二节点发送的TLP。
一种实现方式中,第二节点发送的TLP与第一节点发送的TLP为同一个TLP,即,第二节点在接收到第一节点发送的TLP后,将该TLP转发给第三节点。
另一种实现方式中,第二节点发送的TLP与第一节点发送的TLP为不同TLP,即,第二节点在接收到第一节点发送的TLP后,对该TLP进行处理,例如将该TLP的源节点信息由第一节点的身份信息修改为第二节点的身份信息等等,然后将经过处理后的TLP发送给第三节点,其中,第二节点发送的TLP与第一节点发送的TLP所携带的数据、封装信息相同。第二节点发送的TLP携带数据、封装信息的方式可以参阅上述步骤S501的相关描述,这里不再赘述。
在一些实施例中,在步骤S503之前,第二节点可以基于第三节点的身份信息确定路由路径。从而,第二节点可以按照该路由路径向第三节点发送TLP。
S504,第三节点基于第一封装信息对第二节点发送的TLP获得数据。
具体的,第三节点基于第一封装信息对第二节点发送的TLP进行解封装,获得数据。
在一种可能的实施方式中,第三节点可以从接收到TLP中获取数据类型以及数据类型对应的封装参数,根据数据类型以及数据类型对应的封装参数确定TLP所携带数据的格式,并基于该格式对TLP进行解封装。
一种实现方式中,第三节点可以根据TLP Header的Type字段、预留比特位和扩展头确定数据类型以及数据类型对应的封装参数。例如,如图8所示,第三节点可以根据TLP Header的Type字段和T9字段确定TLP所携带数据为图像业务,并根据扩展头获取TLP所携带图像数据的图像数据类型、像素量化深度、分辨率、分段指示信息。
另一种实现方式中,第三节点可以根据TLP Header的Type字段、预留比特位和扩展头确定数据类型以及数据类型对应的部分封装参数,根据TLP Header的第三字段确定数据类型对应的剩余封装参数。例如,第三节点可以根据TLP Header的Type字段、预留比特位确定TLP所携带数据为图像业务,根据TLP Header的第三字段获取TLP所携带图像数据的图像数据类型,并根据扩展头获取TLP所携带图像数据的像素量化深度、分辨率、分段指示信息。
为了更好的理解本申请实施例提供的方案,下面结合图13所示的PCIe***,对数据传输过程进行具体描述。如图13所示,Camera 1(图13示出为摄像头1,其它Camera类似)或Camera 2拍摄的内容要显示到显示器(Display)上。Camera1/Camera2可以通过上述实施例中第一节点执行的数据传输方法将数据传输到Switch1和Switch2,Switch1可以通过上述实施例中第二节点执行的数据传输方法将数据传输到Switch2,Switch2可以通过上述实施例中第二节点执行的数据传输方法将数据传输到Display,Display可以通过上述实施例中第三节点执行的数据传输方法获取数据。下面以TLP Header的长度为16Byte、 预留比特位为T9字段为例,Camera1向Display传输数据的过程如下:
A1,Camera1根据输出的图像类型(如RGB、YUV等),每像素量化bit数,图像分辨率(如2K、4K等),计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量确定传输一行图像需要TLP的数量,进而决定图像的分段方式。
A2,Camera1将采集的图像数据封装成TLP。
示例性的,Camera1可以按照如下八种方式中任一种方式封装数据:
方式一:Camera1可以使用TLP Header的Type字段与T9字段统一编码后的一个状态值(如000010)指示数据类型为图像业务,使用扩展头指示图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图8所示。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式二:Camera1可以使用TLP Header的Type字段的一个预留值(如00011)或者T9字段的一个状态值指示数据类型为图像业务,使用扩展头指示图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。以Type字段的一个预留值指示数据类型为图像业务为例,如图9所示。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式三:Camera1可以使用TLP Header的Type字段与T9统一编码后的一个状态值(如000010)指示:数据类型为图像业务、图像数据的图像数据类型,使用扩展头指示图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图11所示。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式四:Camera1可以使用TLP Header的Type字段一个预留值(如00011)指示数据类型为图像业务,T9字段指示图像数据的图像数据类型,使用扩展头指示图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图12所示。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式五:Camera1可以使用TLP Header的Type字段与T9字段统一编码后的一个状态值(如000010)指示数据类型为图像业务,TLP Header的Byte 4~Byte 15指示图像数据的图像数据类型,使用扩展头指示图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式六:Camera1可以使用TLP Header的Type字段的一个预留值(如00011)或者T9字段的一个状态值指示数据类型为图像业务,TLP Header的Byte 4~Byte 15指示图像数据的图像数据类型,使用扩展头指示图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。以Type字段的一个预留值指示数据类型为图像业务为例。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式七:Camera1可以使用TLP Header的Type字段与T9统一编码后的一个状态值(如000010)指示:数据类型为图像业务、图像数据的图像数据类型,TLP Header的Byte 4~Byte  15指示图像数据的像素量化深度,使用扩展头指示图像数据的分辨率、图像数据的分段指示信息。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式八:Camera1可以使用TLP Header的Type字段一个预留值(如00011)指示数据类型为图像业务,T9字段指示图像数据的图像数据类型,TLP Header的Byte 4~Byte 15指示图像数据的像素量化深度,使用扩展头指示图像数据的分辨率、图像数据的分段指示信息。Camera1将数据填充到TLP的Data Payload。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
上述八种方式中,Type字段可以使用预留值。下面以上述八种方式中Type字段使用预留值为例进行说明。
A3,Camera1将TLP发给Switch1。
A4,Switch1收到TLP后,检测TLP Header,解析Type字段,如果Type字段的状态值为是PCI Express Base Specification Revision 5.0 Version 1.0中使用的状态值,则按照原PCIe机制处理,即将TLP发送给Root,然后由Root根据访问各个端节点的配置空间确定接收侧节点,然后将TLP发送给接收侧节点。如果Type字段为本申请实施例定义的内容,则根据TLP中的第二节点的身份信息去搜索Switch1中的路由信息,按照对应的路由路径把TLP转发到Switch2。
A5,Switch2收到数据后,检测TLP Header,解析Type字段,如果Type字段的状态值为是PCI Express Base Specification Revision 5.0 Version 1.0中使用的状态值,则按照原PCIe机制处理,即将TLP发送给Root,然后由Root根据访问各个端节点的配置空间确定接收侧节点,然后将TLP发送给接收侧节点。如果Type字段为本申请实施例定义的内容,则根据TLP中的第二节点的身份信息去搜索Switch2中的路由信息,按照对应的路由路径把TLP发送给Display。
A6,Display收到TLP后,解析TLP Header以及Data Payload,获取图像的类型和格式,并根据分段指示信息恢复一幅完整的图像,将数据传到显示屏上显示。
对应步骤A2中的方式一,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段与T9字段,根据这6比特的状态值(如000010)确定数据类型为图像,解析扩展头确定图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式二,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段,根据这5比特的状态值(如00011)确定数据类型为图像,解析扩展头确定图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式三,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段与T9字段,根据这6比特的状态值(如000010)确定数据类型为图像以及图像数据的图像数据类型,解析扩展头确定图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式四,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段,根据这5比特的状态值(如00011)确定数据类型为图像,或者,Display解析TLP Header的T9字段,根据T9字段确定数据类型为图像。解析TLP  Header的T9字段,根据T9字段确定图像数据的图像数据类型。解析扩展头确定图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式五,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段与T9字段,根据这6比特的状态值(如000010)确定数据类型为图像。解析TLP Header的Byte 8~Byte 15,根据Byte 8~Byte 15确定图像数据的图像数据类型。解析扩展头确定图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式六,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段,根据这5比特的状态值(如00011)确定数据类型为图像。解析TLP Header的Byte 8~Byte 15,根据Byte 8~Byte 15确定图像数据的图像数据类型。解析扩展头确定图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式七,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段与T9字段,根据这6比特的状态值(如000010)确定数据类型为图像以及图像数据的图像数据类型。解析TLP Header的Byte 8~Byte 15,根据Byte 8~Byte 15确定图像数据的像素量化深度。解析扩展头确定图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式八,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Type字段,根据这5比特的状态值(如00011)确定数据类型为图像。解析TLP Header的T9字段,根据T9字段确定图像数据的图像数据类型。解析TLP Header的Byte 8~Byte 15,根据Byte 8~Byte 15确定图像数据的像素量化深度。解析扩展头确定图像数据的分辨率、图像数据的分段指示信息。
本申请实施例通过利用Type字段与T9字段、扩展头指示传输数据所需要的信息,如数据类型、数据类型对应的封装信息等,使得Endpoint之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
并且,通过使用Type字段的预留值使得PCIe***可以兼容PCIe原有数据传输方法以及本申请实施例提供的数据传输方法。
基于与方法实施例的同一技术构思,本申请实施例提供一种数据传输装置。该装置的结构可以如图14所示,包括处理单元1401以及通信单元1402。
一种实现方式中,数据传输装置具体可以用于实现图5至图12的实施例中第一节点执行的方法,该装置可以是第一节点本身,也可以是第一节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,处理单元1401,用于将数据封装成TLP,TLP包括包头以及扩展头,其中,包头包括第一字段和第二字段,第一字段、第二字段和扩展头用于指示第一封装信息,第一封装信息包括数据的数据类型以及数据类型对应的至少一个封装参数;通信单元1402,用于向第二节点发送TLP。
一种示例性说明中,比特集合的取值指示数据类型,比特集合包括第一字段的比特以及第二字段的比特;扩展头携带至少一个封装参数。
另一种示例性说明中,第一字段指示数据类型,第二字段指示第一参数集合;数据包的扩展头携带第二参数集合;
其中,第一参数集合包括至少一个封装参数中的部分封装参数,第二参数集合包括至少一个封装参数中除部分封装参数以外的其它封装参数。
第一字段可以为Type字段,第二字段为预留比特位。
包头还可以包括第三字段,第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
一种实施方式中,第三字段可以为包头的字节4~字节15或字节4~字节11。
数据类型可以包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
示例性的,第一字段为预留值。
另一种实现方式中,数据传输装置具体可以用于实现图5至图12的实施例中第三节点执行的方法,该装置可以是第三节点本身,也可以是第三节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,通信单元1402,用于接收第二节点发送的TLP,TLP包括包头以及扩展头,其中,包头包括第一字段和第二字段,第一字段、第二字段和扩展头用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数;处理单元1401,用于基于第一封装信息对TLP获得数据。
一种示例性说明中,比特集合的取值指示数据类型,比特集合包括第一字段的比特以及第二字段的比特;扩展头携带至少一个封装参数。
另一种示例性说明中,第一字段指示数据类型,第二字段指示第一参数集合;数据包的扩展头携带第二参数集合;其中,第一参数集合包括至少一个封装参数中的部分封装参数,第二参数集合包括至少一个封装参数中除部分封装参数以外的其它封装参数。
第一字段可以为Type字段,第二字段为预留比特位。
数据类型可以包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
示例性的,第一字段为预留值。
一种可能的实施方式中,处理单元1401,在基于第一封装信息获得数据时,具体用于:基于第一封装信息确定数据的格式;基于格式获得数据。
包头还可以包括第三字段,第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
示例性的,第三字段可以为包头的字节4~字节15或字节4~字节11。
一种可能的实施方式中,处理单元1401,在基于第一封装信息获得数据时,具体用于:根据第一封装信息以及第二封装信息确定数据的格式;基于格式获得数据。
本申请实施例还提供一种数据传输装置。该装置的结构可以如图15所示,包括处理单元1501以及第一通信单元1502、第二通信单元1503。一种实现方式中,数据传输装置具体可以用于实现图5至图12的实施例中第二节点执行的方法,该装置可以是第二节点本身,也可以是第二节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,第一通信单元1502,用于与第一节点之间传输数据;第二通信单元1503,用于与第三节点之间传输数据;处理单元1501,用于通过第一通信单元1502接收第一节点发送的第一TLP;并通过第二通信单元1503向第三节点发送第二TLP;其中,TLP包括包头以及扩展头,其中,包头的第一字段、包头的第二字段以及扩展头用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数,TLP包括第一TLP以及第二TLP。
一种示例性说明中,比特集合的取值指示数据类型,比特集合包括第一字段的比特以及第二字段的比特;扩展头携带至少一个封装参数。
另一种示例性说明中,第一字段指示数据类型,第二字段指示第一参数集合;数据包 的扩展头携带第二参数集合;其中,第一参数集合包括至少一个封装参数中的部分封装参数,第二参数集合包括至少一个封装参数中除部分封装参数以外的其它封装参数。
第一字段可以为Type字段,第二字段为预留比特位。
包头还可以包括第三字段,第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
第三字段可以为包头的字节4~字节42或字节4~字节38。
数据类型可以包括:图像、音频、控制类信息、SWRITE、安全。
示例性的,第一字段可以为预留值。
一种实施方式中,第一TLP携带第三节点的身份信息;处理单元1501,还用于:在通过第二通信单元1503向第三节点发送第二TLP之前,基于第三节点的身份信息选择路由路径;处理单元1501,在通过第二通信单元1503向第三节点发送第二TLP时,具体用于:按照路由路径向第三节点发送第二TLP。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。可以理解的是,本申请实施例中各个模块的功能或者实现可以进一步参考方法实施例的相关描述。
一种可能的方式中,数据传输装置可以如图16所示,该装置可以是端节点或者端节点中的芯片。该装置可以包括处理器1601,通信接口1602,存储器1603。其中,处理单元1401可以为处理器1601。通信单元1402可以为通信接口1602。
处理器1601,可以是一个CPU,或者为数字处理单元等等。通信接口1602可以是收发器、也可以为接口电路如收发电路等、也可以为收发芯片等等。该装置还包括:存储器1603,用于存储处理器1601执行的程序。存储器1603可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器1603是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。
处理器1601用于执行存储器1603存储的程序代码,具体用于执行上述处理单元1401的动作,本申请在此不再赘述。通信接口1602具体用于执行上述通信单元1402的动作,本申请在此不再赘述。
本申请实施例中不限定上述通信接口1602、处理器1601以及存储器1603之间的具体连接介质。本申请实施例在图16中以存储器1603、处理器1601以及通信接口1602之间通过总线1604连接,总线在图16中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图16中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
一种可能的方式中,数据传输装置可以如图17所示,该装置可以是交换节点或者交换节点中的芯片。该装置可以包括处理器1701,通信接口1702a,通信接口1702b,存储器1703。其中,处理单元1501可以为处理器1701。第一通信单元1502可以为通信接口1702a。第二通信单元1503可以为通信接口1702b。
处理器1701,可以是一个CPU,或者为数字处理单元等等。通信接口1702a,通信接 口1702b可以是收发器、也可以为接口电路如收发电路等、也可以为收发芯片等等。该装置还包括:存储器1703,用于存储处理器1701执行的程序。存储器1703可以是非易失性存储器,比如HDD或SS)等,还可以是volatile memory,例如RAM。存储器1703是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其它介质,但不限于此。
处理器1701用于执行存储器1703存储的程序代码,具体用于执行上述处理单元1501的动作,本申请在此不再赘述。通信接口1702a具体用于执行上述第一通信单元1502的动作,本申请在此不再赘述。通信接口1702b具体用于执行上述第二通信单元1503的动作,本申请在此不再赘述。
本申请实施例中不限定上述通信接口1702a、通信接口1702b、处理器1701以及存储器1703之间的具体连接介质。本申请实施例在图17中以存储器1703、处理器1701以及通信接口1702a、通信接口1702b之间通过总线1704连接,总线在图17中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图17中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本发明实施例还提供了一种计算机可读存储介质,用于存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其它可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其它可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其它可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其它可编程数据处理设备上,使得在计算机或其它可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其它可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (56)

  1. 一种基于***组件互连传递PCIe的数据传输方法,其特征在于,包括:
    第一节点将数据封装成事务层包TLP,所述TLP包括包头以及扩展头,其中,所述包头包括第一字段和第二字段,所述第一字段、所述第二字段和所述扩展头用于指示第一封装信息,所述第一封装信息包括所述数据的数据类型以及所述数据类型对应的至少一个封装参数;
    所述第一节点向第二节点发送所述TLP。
  2. 如权利要求1所述的方法,其特征在于,比特集合的取值指示所述数据类型,所述比特集合包括所述第一字段的比特以及所述第二字段的比特;
    所述扩展头携带所述至少一个封装参数。
  3. 如权利要求1所述的方法,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示第一参数集合;
    所述数据包的扩展头携带第二参数集合;
    其中,所述第一参数集合包括所述至少一个封装参数中的部分封装参数,所述第二参数集合包括所述至少一个封装参数中除所述部分封装参数以外的其它封装参数。
  4. 如权利要求1至3任一项所述的方法,其特征在于,所述第一字段为类型Type字段,所述第二字段为预留比特位。
  5. 如权利要求1至4任一项所述的方法,其特征在于,所述包头还包括第三字段,所述第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
  6. 如权利要求5所述的方法,其特征在于,所述第三字段为所述包头的字节4~字节15或字节4~字节11。
  7. 如权利要求1至6任一项所述的方法,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
  8. 如权利要求1至7任一项所述的方法,其特征在于,所述第一字段为预留值。
  9. 一种基于***组件互连传递PCIe的数据传输方法,其特征在于,包括:
    第二节点接收第一节点发送的第一事务层包TLP;
    所述第二节点向第三节点发送第二TLP;
    其中,TLP包括包头以及扩展头,其中,所述包头的第一字段、所述包头的第二字段以及所述扩展头用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数,所述TLP包括所述第一TLP和/或所述第二TLP。
  10. 如权利要求9所述的方法,其特征在于,比特集合的取值指示所述数据类型,所述比特集合包括所述第一字段的比特以及所述第二字段的比特;
    所述扩展头携带所述至少一个封装参数。
  11. 如权利要求9所述的方法,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示第一参数集合;
    所述数据包的扩展头携带第二参数集合;
    其中,所述第一参数集合包括所述至少一个封装参数中的部分封装参数,所述第二参 数集合包括所述至少一个封装参数中除所述部分封装参数以外的其它封装参数。
  12. 如权利要求9至11任一项所述的方法,其特征在于,所述第一字段为类型Type字段,所述第二字段为预留比特位。
  13. 如权利要求9至12任一项所述的方法,其特征在于,所述包头还包括第三字段,所述第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
  14. 如权利要求13所述的方法,其特征在于,所述第三字段为所述包头的字节4~字节15或字节4~字节11。
  15. 如权利要求9至14任一项所述的方法,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
  16. 如权利要求9至15任一项所述的方法,其特征在于,所述第一字段为预留值。
  17. 如权利要求9至16任一项所述的方法,其特征在于,在所述第二节点向第三节点发送所述第二TLP之前,还包括:
    所述第一TLP携带所述第三节点的身份信息,所述第二节点基于所述第三节点的身份信息选择路由路径;
    所述第二节点向第三节点发送所述第二TLP,包括:
    所述第二节点按照所述路由路径向所述第三节点发送所述第二TLP。
  18. 一种基于***组件互连传递PCIe的数据传输方法,其特征在于,包括:
    第三节点接收第二节点发送的事务层包TLP,所述TLP包括包头以及扩展头,其中,所述包头包括第一字段和第二字段,所述第一字段、所述第二字段和所述扩展头用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数;
    所述第三节点基于所述第一封装信息对所述TLP获得所述数据。
  19. 如权利要求18所述的方法,其特征在于,比特集合的取值指示所述数据类型,所述比特集合包括所述第一字段的比特以及所述第二字段的比特;
    所述扩展头携带所述至少一个封装参数。
  20. 如权利要求18所述的方法,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示第一参数集合;
    所述数据包的扩展头携带第二参数集合;
    其中,所述第一参数集合包括所述至少一个封装参数中的部分封装参数,所述第二参数集合包括所述至少一个封装参数中除所述部分封装参数以外的其它封装参数。
  21. 如权利要求18至20任一项所述的方法,其特征在于,所述第一字段为类型Type字段,所述第二字段为预留比特位。
  22. 如权利要求18至21任一项所述的方法,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
  23. 如权利要求18至22任一项所述的方法,其特征在于,所述第一字段为预留值。
  24. 如权利要求18至23任一项所述的方法,其特征在于,所述第三节点基于所述第一封装信息获得所述数据,包括:
    所述第三节点基于所述第一封装信息确定所述数据的格式;
    所述第三节点基于所述格式获得所述数据。
  25. 如权利要求18至23任一项所述的方法,其特征在于,所述包头还包括第三字段,所述第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
  26. 如权利要求25所述的方法,其特征在于,所述第三字段为所述包头的字节4~字节15或字节4~字节11。
  27. 如权利要求25或26所述的方法,其特征在于,所述第三节点基于所述第一封装信息获得所述数据,包括:
    所述第三节点根据所述第一封装信息以及所述第二封装信息确定所述数据的格式;
    所述第三节点基于所述格式获得所述数据。
  28. 一种基于***组件互连传递PCIe的数据传输装置,其特征在于,包括:
    处理单元,用于将数据封装成事务层包TLP,所述TLP包括包头以及扩展头,其中,所述包头包括第一字段和第二字段,所述第一字段、所述第二字段和所述扩展头用于指示第一封装信息,所述第一封装信息包括所述数据的数据类型以及所述数据类型对应的至少一个封装参数;
    通信单元,用于向第二节点发送所述TLP。
  29. 如权利要求28所述的装置,其特征在于,比特集合的取值指示所述数据类型,所述比特集合包括所述第一字段的比特以及所述第二字段的比特;
    所述扩展头携带所述至少一个封装参数。
  30. 如权利要求28所述的装置,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示第一参数集合;
    所述数据包的扩展头携带第二参数集合;
    其中,所述第一参数集合包括所述至少一个封装参数中的部分封装参数,所述第二参数集合包括所述至少一个封装参数中除所述部分封装参数以外的其它封装参数。
  31. 如权利要求28至30任一项所述的装置,其特征在于,所述第一字段为类型Type字段,所述第二字段为预留比特位。
  32. 如权利要求28至31任一项所述的装置,其特征在于,所述包头还包括第三字段,所述第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
  33. 如权利要求32所述的装置,其特征在于,所述第三字段为所述包头的字节4~字节15或字节4~字节11。
  34. 如权利要求28至33任一项所述的装置,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
  35. 如权利要求28至34任一项所述的装置,其特征在于,所述第一字段为预留值。
  36. 一种基于***组件互连传递PCIe的数据传输装置,其特征在于,包括:
    第一通信单元,用于与第一节点之间传输数据;
    第二通信单元,用于与第三节点之间传输数据;
    处理单元,用于通过所述第一通信单元接收所述第一节点发送的第一事务层包TLP;并通过所述第二通信单元向所述第三节点发送第二TLP;
    其中,TLP包括包头以及扩展头,其中,所述包头的第一字段、所述包头的第二字段以及所述扩展头用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数 据类型以及所述数据类型对应的至少一个封装参数,所述TLP包括所述第一TLP和/或所述第二TLP。
  37. 如权利要求36所述的装置,其特征在于,比特集合的取值指示所述数据类型,所述比特集合包括所述第一字段的比特以及所述第二字段的比特;
    所述扩展头携带所述至少一个封装参数。
  38. 如权利要求36所述的装置,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示第一参数集合;
    所述数据包的扩展头携带第二参数集合;
    其中,所述第一参数集合包括所述至少一个封装参数中的部分封装参数,所述第二参数集合包括所述至少一个封装参数中除所述部分封装参数以外的其它封装参数。
  39. 如权利要求36至38任一项所述的装置,其特征在于,所述第一字段为类型Type字段,所述第二字段为预留比特位。
  40. 如权利要求36至39任一项所述的装置,其特征在于,所述包头还包括第三字段,所述第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
  41. 如权利要求40所述的装置,其特征在于,所述第三字段为所述包头的字节4~字节42或字节4~字节38。
  42. 如权利要求36至41任一项所述的装置,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
  43. 如权利要求36至42任一项所述的装置,其特征在于,所述第一字段为预留值。
  44. 如权利要求36至43任一项所述的装置,其特征在于,所述第一TLP携带所述第三节点的身份信息;
    所述处理单元,还用于:在通过所述第二通信单元向第三节点发送所述第二TLP之前,基于所述第三节点的身份信息选择路由路径;
    所述处理单元,在通过所述第二通信单元向第三节点发送所述第二TLP时,具体用于:按照所述路由路径向所述第二节点发送所述第二TLP。
  45. 一种基于***组件互连传递PCIe的数据传输装置,其特征在于,包括:
    通信单元,用于接收第二节点发送的事务层包TLP,所述TLP包括包头以及扩展头,其中,所述包头包括第一字段和第二字段,所述第一字段、所述第二字段和所述扩展头用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数;
    处理单元,用于基于所述第一封装信息获得所述数据。
  46. 如权利要求45所述的装置,其特征在于,比特集合的取值指示所述数据类型,所述比特集合包括所述第一字段的比特以及所述第二字段的比特;
    所述扩展头携带所述至少一个封装参数。
  47. 如权利要求45所述的装置,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示第一参数集合;
    所述数据包的扩展头携带第二参数集合;
    其中,所述第一参数集合包括所述至少一个封装参数中的部分封装参数,所述第二参数集合包括所述至少一个封装参数中除所述部分封装参数以外的其它封装参数。
  48. 如权利要求45至47任一项所述的装置,其特征在于,所述第一字段为类型Type字段,所述第二字段为预留比特位。
  49. 如权利要求45至48任一项所述的装置,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
  50. 如权利要求45至49任一项所述的装置,其特征在于,所述第一字段为预留值。
  51. 如权利要求45至50任一项所述的装置,其特征在于,所述处理单元,在基于所述第一封装信息获得所述数据,具体用于:
    基于所述第一封装信息确定所述数据的格式;
    基于所述格式获得所述数据。
  52. 如权利要求45至50任一项所述的装置,其特征在于,所述包头还包括第三字段,所述第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
  53. 如权利要求52所述的装置,其特征在于,所述第三字段为所述包头的字节4~字节15或字节4~字节11。
  54. 如权利要求52或53所述的装置,其特征在于,处理单元,在基于所述第一封装信息获得所述数据时,具体用于:
    根据所述第一封装信息以及所述第二封装信息确定所述数据的格式;
    基于所述格式获得所述数据。
  55. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储程序或指令,所述程序或所述指令在被一个或多个处理器读取并执行时可实现权利要求1至27任一项所述的方法。
  56. 一种计算机程序产品,其特征在于,当所述计算机程序产品在端节点上运行时,使得所述端节点执行权利要求1至8任一项所述的方法,或者,使得所述端节点执行权利要求18至27任一项所述的方法;或者
    当所述计算机程序产品在交换节点上运行时,使得所述交换节点执行权利要求9至17任一项所述的方法。
PCT/CN2020/073925 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置 WO2021147050A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202080003143.1A CN113498596B (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置
PCT/CN2020/073925 WO2021147050A1 (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置
EP20915035.8A EP4080839B1 (en) 2020-01-22 2020-01-22 Pcie-based data transmission method and apparatus
US17/870,535 US20220358075A1 (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/073925 WO2021147050A1 (zh) 2020-01-22 2020-01-22 一种基于PCIe的数据传输方法及装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/870,535 Continuation US20220358075A1 (en) 2020-01-22 2022-07-21 Pcie-based data transmission method and apparatus

Publications (1)

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

Family

ID=76992012

Family Applications (1)

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

Country Status (4)

Country Link
US (1) US20220358075A1 (zh)
EP (1) EP4080839B1 (zh)
CN (1) CN113498596B (zh)
WO (1) WO2021147050A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297198A (zh) * 2022-09-21 2022-11-04 中昊芯英(杭州)科技有限公司 数据处理方法、电路、介质和计算设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP4099637A4 (en) * 2020-02-27 2023-04-12 Huawei Technologies Co., Ltd. PCIE BASED COMMUNICATION METHOD AND DEVICE
CN114285917B (zh) * 2021-12-29 2023-03-10 无锡众星微***技术有限公司 一种基于PCIe NTB的多主机通讯方法和装置
CN115102780B (zh) * 2022-07-15 2022-12-06 飞腾信息技术有限公司 数据传输方法、相关装置、***及计算机可读存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821082A (zh) * 2011-06-10 2012-12-12 成都市华为赛门铁克科技有限公司 一种数据传输方法、装置和***
CN103023824A (zh) * 2012-12-11 2013-04-03 华为技术有限公司 基于周边组件接口快速通道PCIe的数据传输***及方法
CN107771325A (zh) * 2015-06-22 2018-03-06 高通股份有限公司 在高速***组件互连(pcie)***中传达因事务而异的属性
US20180101498A1 (en) * 2016-10-12 2018-04-12 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Pcie switch for aggregating a large number of endpoint devices
US20180307648A1 (en) * 2017-04-24 2018-10-25 Mangstor, Inc. PCIe SWITCH WITH DATA AND CONTROL PATH SYTOLIC ARRAY

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5473691A (en) * 1993-11-05 1995-12-05 Microsoft Corporation System and method for computer data transmission
US6917915B2 (en) * 2001-05-30 2005-07-12 Sony Corporation Memory sharing scheme in audio post-processing
US6944617B2 (en) * 2001-12-28 2005-09-13 Intel Corporation Communicating transaction types between agents in a computer system using packet headers including an extended type/extended length field
US7702827B2 (en) * 2007-06-29 2010-04-20 International Business Machines Corporation System and method for a credit based flow device that utilizes PCI express packets having modified headers wherein ID fields includes non-ID data
US8139575B2 (en) * 2007-06-29 2012-03-20 International Business Machines Corporation Device, system and method of modification of PCI express packet digest
US7849252B2 (en) * 2008-05-30 2010-12-07 Intel Corporation Providing a prefix for a packet header
US8441955B2 (en) * 2011-01-24 2013-05-14 Tektronix, Inc. Determining mobile video quality of experience and impact of video transcoding
CN105335227B (zh) * 2014-06-19 2019-01-08 华为技术有限公司 一种节点内的数据处理方法、装置和***
US11775470B2 (en) * 2019-11-20 2023-10-03 Intel Corporation Transaction layer packet format

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102821082A (zh) * 2011-06-10 2012-12-12 成都市华为赛门铁克科技有限公司 一种数据传输方法、装置和***
CN103023824A (zh) * 2012-12-11 2013-04-03 华为技术有限公司 基于周边组件接口快速通道PCIe的数据传输***及方法
CN107771325A (zh) * 2015-06-22 2018-03-06 高通股份有限公司 在高速***组件互连(pcie)***中传达因事务而异的属性
US20180101498A1 (en) * 2016-10-12 2018-04-12 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. Pcie switch for aggregating a large number of endpoint devices
US20180307648A1 (en) * 2017-04-24 2018-10-25 Mangstor, Inc. PCIe SWITCH WITH DATA AND CONTROL PATH SYTOLIC ARRAY

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4080839A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115297198A (zh) * 2022-09-21 2022-11-04 中昊芯英(杭州)科技有限公司 数据处理方法、电路、介质和计算设备
CN115297198B (zh) * 2022-09-21 2023-01-13 中昊芯英(杭州)科技有限公司 数据处理方法、电路、介质和计算设备

Also Published As

Publication number Publication date
EP4080839A1 (en) 2022-10-26
US20220358075A1 (en) 2022-11-10
EP4080839B1 (en) 2024-01-03
EP4080839A4 (en) 2023-01-04
CN113498596A (zh) 2021-10-12
CN113498596B (zh) 2022-10-11

Similar Documents

Publication Publication Date Title
WO2021147050A1 (zh) 一种基于PCIe的数据传输方法及装置
US10884965B2 (en) PCI express tunneling over a multi-protocol I/O interconnect
WO2021147045A1 (zh) 一种基于PCIe的数据传输方法及装置
US20220368781A1 (en) PCIe-Based Data Transmission Method and Apparatus
US20220358074A1 (en) PCIe-Based Data Transmission Method, Apparatus, and System
US20220358070A1 (en) Pcie-based data transmission method and apparatus
US20220365899A1 (en) PCIe-Based Data Transmission Method, Apparatus, and System
US11995020B2 (en) PCIe data transmission method and apparatus
US11636061B2 (en) On-demand packetization for a chip-to-chip interface
CN113498510B (zh) 一种PCIe的数据传输方法及装置
US20220365895A1 (en) Pcie-based data transmission method and apparatus

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020915035

Country of ref document: EP

Effective date: 20220722

NENP Non-entry into the national phase

Ref country code: DE