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

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

Info

Publication number
WO2021147046A1
WO2021147046A1 PCT/CN2020/073921 CN2020073921W WO2021147046A1 WO 2021147046 A1 WO2021147046 A1 WO 2021147046A1 CN 2020073921 W CN2020073921 W CN 2020073921W WO 2021147046 A1 WO2021147046 A1 WO 2021147046A1
Authority
WO
WIPO (PCT)
Prior art keywords
tlp
field
data type
attribute information
header
Prior art date
Application number
PCT/CN2020/073921
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 CN202080002472.4A priority Critical patent/CN113498510A/zh
Priority to PCT/CN2020/073921 priority patent/WO2021147046A1/zh
Priority to EP20916055.5A priority patent/EP4080375A4/en
Publication of WO2021147046A1 publication Critical patent/WO2021147046A1/zh
Priority to US17/871,396 priority patent/US11995020B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • 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/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
    • G06F13/4295Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus using an embedded synchronisation
    • 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. Because PCIe can quickly read and write memory directly and provide large-bandwidth communication, some car companies extend its transmission distance and use it as a large data communication port in the car's intranet.
  • the PCIe system includes a root node (Root complex, also referred to as Root), a switch node (Switch), and an end node (Endpoint).
  • Root is responsible for managing all buses and nodes in the PCIe system
  • the Switch is used as a data forwarding node.
  • Endpoint is the end node that can send or receive data.
  • Root knows what functions each Endpoint has and what type of data is being transmitted, and any two Endpoints do not know the function of each other and what type of data is transmitted, so any two Two Endpoints cannot communicate directly, and must go through Root to communicate.
  • the Root communication mechanism must be used between the two Endpoints in the PCIe system, which leads to the need to use other transmission interfaces in the vehicle intranet. If there are multiple transmission interfaces in the vehicle intranet, the information exchange between the various transmission interfaces requires interface conversion , Resulting in a substantial increase in the complexity of the in-vehicle network, especially in high-speed communication scenarios.
  • the embodiments of the present application provide a PCIe-based data transmission method and device, so that any two Endpoints in the PCIe system can 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.
  • the method includes: a first node obtains a transaction layer data packet TLP, and then sends the TLP to a second node.
  • TLP includes TLP header, TLP extension header and data.
  • TLP header includes Type field, Fmt field and reserved bits.
  • Type field, Fmt field, reserved bits and TLP extension header are used to indicate the data type and data type of the data. Corresponding at least one attribute information.
  • the first node may be an end node or a switching node.
  • the Type field, Fmt field, reserved bits and TLP extension header in the TLP indicate the information required for data transmission, that is, the data type of the data and at least one attribute information corresponding to the data type, so that the PCIe system Communication can be achieved between any two end nodes without Root, which can reduce the complexity of the in-vehicle network.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type
  • the TLP extension header indicates the third attribute information of the data type.
  • Type field, Fmt field, reserved bits, and TLP extension header can be separated to indicate different information, so that another node communicating with the first node can parse any of these four fields to determine the use of It is the scheme of the embodiment of this application.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the Type field, Fmt field and reserved bits in the TLP header can be jointly coded to indicate the data type.
  • the way the TLP extension header indicates the attribute information corresponding to the data type can be realized in the first TLP.
  • the information required to transmit data can be communicated between any two end nodes in the PCIe system without Root, thereby reducing the complexity of the in-vehicle network.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header are divided into At least two sets of fields, the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding difference in the data type
  • the attribute information of the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the reserved bits include the 9th or 13th bit of the TLP header.
  • the Type field, the Fmt field, and the reserved bits can be divided into two groups of fields.
  • the first group of fields is used to indicate the data type, and the second The group fields respectively indicate attribute information corresponding to the data type, and the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • the reserved bits include the 9th and 13th bits of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header can be divided into two groups of fields. , The first group of fields are used to indicate the data type, the second group of fields respectively indicate the attribute information corresponding to the data type, and the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • the Type field, the Fmt field, the 9th bit of the TLP header and the 13th bit of the TLP header can be arbitrarily combined into two or three groups of fields, each of which indicates different information.
  • the information required for data transmission can be indicated in the first TLP, so that any two end nodes in the PCIe system can communicate without Root, thereby reducing the complexity of the in-vehicle network.
  • the values of the Type field and/or the Fmt field are reserved values.
  • the PCIe system can be compatible with the traditional data transmission method in the PCIe system and the data transmission method provided in the embodiments of the present application.
  • the TLP header further includes a first field, and the first field indicates other attribute information corresponding to the data type except at least one attribute information.
  • the first TLP can indicate more attribute information.
  • the first field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header.
  • 16 bytes or 12 bytes can be included in the TLP header, and the first field is used to indicate part or all of the attribute information of the data type.
  • the first field also includes the identifier of the third node.
  • the second node that receives the first TLP can determine the routing path according to the identifier of the third node, so that it does not need to go through Root, and the TLP can be accurately sent to the destination node through the determined routing path.
  • the data type includes any one or more of image, audio, control information, write data stream SWRITE, and security.
  • the attribute information corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
  • the attribute information corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
  • the attribute information corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
  • the attribute information corresponding to security may include: message type, format indication, and whether to encrypt.
  • the attribute information corresponding to SWRITE may include: alignment.
  • an embodiment of the present application provides a PCIe-based data transmission method.
  • the method includes: a second node receives a first transaction layer data packet TLP from the first node; and the second node sends a second node to the third node.
  • TLP includes: a second node receives a first transaction layer data packet TLP from the first node; and the second node sends a second node to the third node.
  • TLP among them, the TLP header in the TLP includes the Type field, the Fmt field, and reserved bits.
  • the Type field, the Fmt field, the reserved bits and the TLP extension header in the TLP are used to indicate the data type of the data and at least one corresponding to the data type Attribute information, the TLP includes the first TLP and/or the second TLP.
  • first TLP and the second TLP may be the same TLP, or may be different TLPs, or it is understood that the content of the data included in the first TLP and the second TLP is the same.
  • the second node may be an end node or a switching node.
  • the Type field, Fmt field, reserved bits and TLP extension header in the TLP indicate the information required for data transmission, that is, the data type of the data and at least one attribute information corresponding to the data type, so that the PCIe system Communication can be achieved between any two end nodes without Root, which can reduce the complexity of the in-vehicle network.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type
  • the TLP extension header indicates the third attribute information of the data type.
  • Type field, Fmt field, reserved bits, and TLP extension header can be separated to indicate different information, so that another node communicating with the first node can parse any of these four fields to determine the use of Is the solution provided by this application.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the Type field, Fmt field and reserved bits in the TLP header can be jointly coded to indicate the data type.
  • the way the TLP extension header indicates the attribute information corresponding to the data type can be realized in the first TLP.
  • the information required to transmit data can be communicated between any two end nodes in the PCIe system without Root, thereby reducing the complexity of the in-vehicle network.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header are divided into At least two sets of fields, the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding difference in the data type
  • the attribute information of the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the reserved bits include the 9th or 13th bit of the TLP header.
  • the Type field, the Fmt field, and the reserved bits can be divided into two groups of fields.
  • the first group of fields is used to indicate the data type, and the second The group fields respectively indicate attribute information corresponding to the data type, and the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • the reserved bits include the 9th and 13th bits of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header can be divided into two groups of fields. , The first group of fields are used to indicate the data type, the second group of fields respectively indicate the attribute information corresponding to the data type, and the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • the Type field, the Fmt field, the 9th bit of the TLP header and the 13th bit of the TLP header can be arbitrarily combined into two or three groups of fields, each of which indicates different information.
  • the information required for data transmission can be indicated in the first TLP, so that any two end nodes in the PCIe system can communicate without Root, thereby reducing the complexity of the in-vehicle network.
  • the values of the Type field and/or the Fmt field are reserved values.
  • the PCIe system can be compatible with the traditional data transmission method in the PCIe system and the data transmission method provided in the embodiments of the present application.
  • the TLP header further includes a first field, and the first field indicates other attribute information corresponding to the data type except at least one attribute information.
  • the first TLP can indicate more attribute information.
  • the first field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header.
  • 16 bytes or 12 bytes can be included in the TLP header, and the first field is used to indicate part or all of the attribute information of the data type.
  • the first field also includes the identifier of the third node; before the second node sends the second TLP to the third node, it also includes: the second node determines the route according to the identifier and routing information of the third node Path; the second node sends the second TLP to the third node according to the routing path.
  • the second node that receives the first TLP can determine the routing path according to the identifier of the third node, so that it does not need to go through Root, and the TLP can be accurately sent to the destination node through the determined routing path.
  • the data type includes any one or more of image, audio, control information, write data stream SWRITE, and security.
  • the attribute information corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
  • the attribute information corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
  • the attribute information corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
  • the attribute information corresponding to security may include: message type, format indication, and whether to encrypt.
  • the attribute information corresponding to SWRITE may include: alignment.
  • an embodiment of the present application provides a PCIe-based data transmission method.
  • the method includes: a third node receives a transaction layer data packet TLP from a second node; wherein the TLP includes a TLP header, a TLP extension header, and data
  • the TLP header includes the Type field, the Fmt field, and reserved bits.
  • the Type field, the Fmt field, the reserved bits, and the TLP extension header are used to indicate the data type of the data and at least one attribute information corresponding to the data type; the third node according to the data At least one attribute information corresponding to the data type and the data type obtains the data in the TLP.
  • the third node may be an end node or a switching node.
  • the Type field, Fmt field, reserved bits and TLP extension header in the TLP indicate the information required for data transmission, that is, the data type of the data and at least one attribute information corresponding to the data type, so that the PCIe system Communication can be achieved between any two end nodes without Root, which can reduce the complexity of the in-vehicle network.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type
  • the TLP extension header indicates the third attribute information of the data type.
  • Type field, Fmt field, reserved bits, and TLP extension header can be separated to indicate different information, so that another node communicating with the first node can parse any of these four fields to determine the use of Is the solution provided by this application.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the Type field, Fmt field and reserved bits in the TLP header can be jointly coded to indicate the data type.
  • the way the TLP extension header indicates the attribute information corresponding to the data type can be realized in the first TLP.
  • the information required to transmit data can be communicated between any two end nodes in the PCIe system without Root, thereby reducing the complexity of the in-vehicle network.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header are divided into At least two sets of fields, the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding difference in the data type
  • the attribute information of the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the reserved bits include the 9th or 13th bit of the TLP header.
  • the Type field, the Fmt field, and the reserved bits can be divided into two groups of fields.
  • the first group of fields is used to indicate the data type, and the second The group fields respectively indicate attribute information corresponding to the data type, and the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • the reserved bits include the 9th and 13th bits of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header can be divided into two groups of fields. , The first group of fields are used to indicate the data type, the second group of fields respectively indicate the attribute information corresponding to the data type, and the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • the Type field, the Fmt field, the 9th bit of the TLP header and the 13th bit of the TLP header can be arbitrarily combined into two or three groups of fields, each of which indicates different information.
  • the information required for data transmission can be indicated in the first TLP, so that any two end nodes in the PCIe system can communicate without Root, thereby reducing the complexity of the in-vehicle network.
  • the values of the Type field and/or the Fmt field are reserved values.
  • the PCIe system can be compatible with the traditional data transmission method in the PCIe system and the data transmission method provided in the embodiments of the present application.
  • the TLP header further includes a first field, and the first field indicates other attribute information corresponding to the data type except at least one attribute information.
  • the first TLP can indicate more attribute information.
  • the first field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header.
  • the first field can be used to indicate part or all of the attribute information of the data type in a TLP header with a length of 16 bytes or a TLP header with a length of 12 bytes.
  • the first field also includes the identifier of the third node.
  • the second node that receives the first TLP can determine the routing path according to the identifier of the third node, so that it does not need to go through Root, and the TLP can be accurately sent to the destination node through the determined routing path.
  • the data type includes any one or more of image, audio, control information, write data stream SWRITE, and security.
  • the attribute information corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
  • the attribute information corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
  • the attribute information corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
  • the attribute information corresponding to security may include: message type, format indication, and whether to encrypt.
  • the attribute information corresponding to SWRITE may include: alignment.
  • the present application provides a PCIe-based data transmission device.
  • the device may be a communication device, or a chip or chipset in the communication device.
  • the communication device may be the first node or the second node.
  • the node can also be the third node.
  • the device may include a processing unit and a communication unit.
  • the processing unit may be a processor, and the communication 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 may be a processor, and the communication unit may 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/or a memory.
  • the communication interface is used to transmit information, and/or messages, and/or data between the device and other devices.
  • the memory is used to store computer-executable instructions.
  • the processor executes the computer-executable instructions stored in the memory, so that the device executes any design or second aspect of the first aspect or the first aspect described above. Or any design in the second aspect, the third aspect, or any design method in the third aspect.
  • 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.
  • 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 The method of 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. Any design in the second aspect, the third aspect, or any design method in the third aspect.
  • 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. 3a is a schematic diagram of the TLP structure provided by an embodiment of the application.
  • FIG. 3b is a schematic diagram of another TLP structure 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 flowchart of a PCIe-based data transmission method 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 information carried in a TLP provided by an embodiment of this application.
  • FIG. 8 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 9 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 10 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 11 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 12 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 13 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 14 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • TLP 15 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 16 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 17 is a schematic diagram of information carried by another TLP provided by an embodiment of this application.
  • FIG. 18 is a schematic diagram of the architecture of a PCIe system provided by an embodiment of the application.
  • FIG. 19 is a schematic structural diagram of a data transmission device provided by an embodiment of this application.
  • FIG. 20 is a schematic structural diagram of another PCIe-based data transmission device provided by an embodiment of the application.
  • FIG. 1 is a schematic diagram of the architecture of a PCIe system provided by an embodiment of the application.
  • the main components of the PCIe system are the root node (Root complex, also referred to as Root), switch node (Switch), and end node (Endpoint).
  • Root is responsible for managing all buses in the system (as shown in the figure).
  • Root is the bridge between the central processing unit (CPU) and other devices in the system.
  • the CPU does not belong to the PCIe system, and the interface between the CPU and the root node in the PCIe system It is also not a PCIe interface.
  • the communication between the CPU and all devices in the PCIe system must go through Root.
  • Switch can be used as a bridge to connect Root, other Switches, and Endpoints, and Endpoint, as an end node, such as a peripheral, can send or receive data.
  • FIG. 2 is a schematic diagram of the architecture of another PCIe system provided by an embodiment of the application.
  • the nodes of each PCIe system are independently managed by its own Root.
  • Root 1 and Root 2 belong to two PCIe systems.
  • Root 1 manages Switch1 and EndPoint1, EndPoint2, Switch2, EndPoint3 and other nodes
  • Root2 manages Switch3, EndPoint4 and other nodes. Since the two PCIe systems have independently assigned addresses and IDs, the addresses and IDs of devices in different PCIe systems will conflict.
  • bridge conversion between the two systems is required. For example, two PCIe systems are connected through a Switch with a non-transparent bridge (NTB), and the NTB performs address or ID conversion so that the two PCIe systems can communicate with each other.
  • NTB non-transparent bridge
  • Endpoint and Endpoint cannot communicate directly, they must go through Root, because only Root knows what functions are in each Endpoint and what type of data is being transmitted, and any two Endpoints do not know each other's functions, and What type of business data is being transmitted.
  • 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 does not know the data types and formats supported by other Endpoints. Therefore, it cannot communicate without Root.
  • Endpoint 1 and Endpoint 2 are connected to the same switch 1, but the two cannot communicate directly through Switch 1.
  • Endpoint 1 needs to send data packets through switch 1 first
  • Root determines that the data packet needs to be sent to Endpoint 2 according to the data types supported by each Endpoint, and then Root sends the data packet to Endpoint 2 through switch 1.
  • Endpoint1 and Endpoint3 are respectively connected to different switches, but the two must also communicate with each other through Root.
  • Root communication between any two Endpoints in the PCIe system makes it unsuitable 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 passes through the ring network.
  • the gateway/switch performs switching and forwarding transmission to different computing/display units.
  • This in-vehicle network architecture requires sensor data to be forwarded in any direction through the gateway/switch to provide communication link redundancy, thereby ensuring the safety of in-vehicle communication.
  • Other interfaces are required for the in-vehicle ring network. This situation leads to the existence of multiple transmission interfaces in the vehicle intranet.
  • the information exchange between various interfaces requires interface conversion.
  • the conversion between different interfaces leads to a significant increase in the complexity of the vehicle intranet, especially in high-speed communication scenarios. The situation is more serious.
  • the embodiments of the present application provide a PCIe-based data transmission method and device, which are used to solve the problem of multiple transmission interfaces in the vehicle intranet caused by the Root communication mechanism between any two Endpoints in the prior art.
  • the problem of network complexity Among them, 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.
  • transaction layer packet transmission layer packet, TLP
  • PCIe basic specification revision 5.0 version 1.0 PCI Express Base Specification Revision 5.0 Version 1.0
  • TLP Header which is mainly composed of three parts: TLP Header, Data Payload, and TLP Digest.
  • the length of the TLP Header can be 12 or 16 bytes (Byte), which is used to indicate the PCIe service type; Data Payload is the data part, and the length can be 0-4K Byte;
  • the TLP summary can be the cyclic redundancy check code (end -to-end 32bit cyclic redundancy check, ECRC), the length can be 4 bytes, where ECRC is a cyclic redundancy check (cyclic redundancy check, CRC) check code, used to check whether the data packet transmission is correct or not.
  • the TLP may also include TLP prefixes (TLP Prefixes), and the length of the TLP prefix may be H bytes, where H is a positive integer.
  • the structure of the TLP Header can be as shown in Figure 4, which mainly includes:
  • the format (format, Fmt) field includes 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 and TLP Header length Is the first length and TLP does not include Data Payload, TLP Header length is the second length, TLP includes Data Payload, TLP Header length is the second length, and TLP does not include Data Payload, where the first length is 12 bytes, and the first length is 12 bytes. Second, the length is 16 bytes.
  • the Fmt field can also indicate the TLP prefix (Prefixes).
  • the Fmt field includes 3 bits, and there can be a total of 8 status values. 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 values. For example, the five state values of 000, 001, 010, 011, and 100 can be used to indicate the above-mentioned five kinds of information, and the remaining three state values of 101, 110, and 111 are reserved values.
  • Type (Type) field including 5bit, used to indicate the service type of TLP, of which there are 6 types of service, namely: memory (Memory) read/write, input/output (input/output, I/O) read/ Write, configuration (Configuration) read/write, message (Message) request, completion (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 reserved values.
  • 00000, 00001, 00010, 00100, 00101, 11011, 10000 ⁇ 10111, 01010, 01011, 01100, 01101, 01110 can be used to indicate the service type of the above TLP, and the remaining 13 status values are 0011, 00110, 00111, 01000, 01001, 01111, 11000 ⁇ 11010, 11100 ⁇ 11111 are reserved values.
  • T9/T8 reserved bits, where T9 is the 9th bit of the TLP header, and T8 is the 13th bit of the TLP header.
  • Priority (traffic class, TC) field: used to indicate scheduling priority.
  • the attribute (attributes, Attr) field used to indicate the TLP attribute, and the TLP attribute may be processing types such as ordering processing (Ordering), hardware coherency management (Snoop), etc.
  • 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 12-Byte TLP Header is similar to the 16-Byte TLP Header, the difference is that the 16-Byte TLP Header corresponds to a 64-bit address, and the 12-Byte TLP Header corresponds to a 32-bit address.
  • the method provided in the embodiments of the present application is based on the traditional TLP structure disclosed in the PCI Express Base Specification Revision 5.0 Version 1.0.
  • the structure of the first TLP and the second TLP involved in the embodiments of this application are different from the traditional TLP structure disclosed in the PCI Express Base Specification Revision 5.0 Version 1.0 in that: on the basis of the traditional TLP structure, the first TLP In the structure of the second TLP and the second TLP, a TLP extension header is also included between the TLP header and the data payload.
  • the length of the data payload is 0-N bytes, and N is a positive integer. It should be noted that the first TLP and the second TLP have the same length as the traditional TLP.
  • the TLP extension header occupies only the length of the Data Payload part of the traditional TLP. Taking the first TLP as an example, the first TLP The sum of the length of the TLP extension header and the length of the data payload (Data Payload) is the same as the length of the traditional TLP (Data Payload) (4K bytes). The length of the TLP extension header is not limited, and theoretically less than 4096 Just bytes.
  • the "reserved value" involved in the application embodiment may refer to the unused state value 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 can also be referred to as " Reserved 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 called “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.
  • 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.
  • ordinal numbers such as “first” and “second” are used to distinguish multiple objects, and cannot be understood as indicating or implying the relative importance of multiple objects. Nor can it be understood as indicating or implying order, priority, etc.
  • FIG. 5 is a flowchart of a PCIe-based data transmission method provided by this application.
  • the method may be applied to a PCIe system, such as the PCIe system shown in FIG. 1 or the PCIe system shown in FIG. 2. As shown in Figure 5, the method includes:
  • Step 501 The first node obtains a first transaction layer data packet TLP, where the first TLP includes a TLP header, a TLP extension header, and data.
  • the TLP header includes a Type field, an Fmt field, and reserved bits.
  • the reserved bits and the TLP extension header are used to indicate the data type of the data and at least one attribute information corresponding to the data type.
  • the data can be carried in the Data Payload part of the TLP.
  • the first node may be an end node in the PCIe system, or may be a switching node in the PCIe system.
  • the first node may be an end node or a chip.
  • the first node may be a transceiver unit (TX/RX) in the end node.
  • TX/RX transceiver unit
  • the structure of the Camera can be as shown in Figure 6, including a lens, a complementary metal oxide semiconductor (COMS), and a transceiver unit (TX/RX).
  • COMS is used to pass through The lens collects image data and sends it out through TX in the transceiver unit.
  • the first node can be the Camera or the transceiver unit in the Camera.
  • the data encapsulated by the first node can be data collected by itself, for example, the first node is Camera, the encapsulated data can be image data collected by Camera, etc., and the first node is a microphone.
  • the encapsulated data may be audio data collected by a microphone, etc.
  • the first node is the transceiver unit 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 data type may include, but is not limited to, the following types: image, audio, control information, stream write (SWRITE), security, and so on.
  • the data type in the first TLP may be any one of the foregoing data types or a combination of any multiple data types.
  • the attribute information corresponding to the data type may include, but is not limited to, the following four types:
  • Image data type RAW, RGB, YUV, embedded data, etc.
  • Pixel bit quantization depth such as 12, 20, 24, etc.
  • Resolution such as 1080P, 2K, 4K, etc.
  • Segmentation indication information The image sensor (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 attribute information corresponding to the data type may include but is not limited to the following four types:
  • 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 packet data contains.
  • the attribute information corresponding to the data type may include but is not limited to the following two types:
  • 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 attribute information corresponding to the data type may include but is not limited to the following three types:
  • 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 Whether the current data packet is encrypted.
  • the attribute information corresponding to the data type may include but is not limited to the following:
  • Alignment use 4 bytes as the smallest unit to align, or 8 bytes as the smallest unit to align.
  • each data type described above 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 attribute information corresponding to each data type described above is only an exemplary description. In specific implementation, each data type described above may also correspond to other attribute information, which is not specifically limited here.
  • the "data type” is only an exemplary naming, and it may also be named other names in specific implementations, for example, it may be referred to as a data service type.
  • the "attribute information” is only an exemplary naming, and may be named other names in specific implementations, for example, it may be called an attribute.
  • the first node may first obtain the data type of the data and the attribute information corresponding to the data type, and then encapsulate the data according to the data type of the data and the attribute information corresponding to the data type to obtain the first node. TLP.
  • the first node can determine the image data type (such as RGB, YUV, etc.), pixel quantization depth, image resolution, etc. of the collected image data, and according to the image data type, pixel
  • the quantization depth, image resolution, etc. can calculate the data volume of each line of the image, combined with the maximum data carrying capacity of each first TLP, the number of first TLPs required for each line of the transmitted image can be obtained, and then the image segmentation method can be determined. Therefore, the segment indication information can be determined according to the segment mode.
  • the first node can receive image data collected by COMS.
  • the image data display carries image data type, pixel quantization depth, image resolution, etc.
  • Attribute information the first node can calculate the data volume of each line of the image according to the image data type, pixel quantization depth, resolution, etc. carried in the image data, and combine with the maximum data carrying capacity of each first TLP of PCIe to obtain the transmission image
  • the number of first TLPs required for a row determines the segmentation mode of the image, so that the segmentation indication information can be determined according to the segmentation mode.
  • the value of the Type field and/or the Fmt field is a reserved value.
  • the Type field and the Fmt field may indicate different information in the first TLP, and may also jointly code to indicate the same information in the first TLP.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the value of the Type field is a reserved value
  • the value of the Fmt field is all status values
  • the reserved value of the Type field can be used to indicate the data type
  • all the status values of the Fmt field are used to indicate the first attribute information
  • Use 13 reserved values such as 00011, 00110, 00111, 01000, 01001, 01111, 11000 ⁇ 11010, 11100 ⁇ 11111 in the Type field to indicate the data type
  • the value of the Type field is all status values
  • the value of the Fmt field is the reserved value, that is, all status values of the Type field can be used to indicate the data type
  • the reserved value of the Fmt field is used to indicate the first attribute information
  • a total of 32 status values from 00000 to 11111 in the Type field are used to indicate the data type
  • three reserved values such as 101, 110, and 111 in the Fmt field are used to indicate the first attribute information.
  • the value of the Type field is a reserved value
  • the value of the Fmt field is a reserved value
  • the reserved value of the Type field can be used to indicate the data type
  • the reserved value of the Fmt field can be used to indicate the first attribute information
  • Use 13 reserved values such as 00011, 00110, 00111, 01000, 01001, 01111, 11000 ⁇ 11010, 11100 ⁇ 11111 in the Type field to indicate the data type
  • use 3 reserved values such as 101, 110, 111 in the Fmt field to indicate the first Property information.
  • the Type field, the Fmt field, the reserved bits, and the TLP extension header are used to indicate the data type of the data and at least one attribute information corresponding to the data type.
  • Implementation mode 1 Type field, Fmt field, reserved bits and TLP extension header respectively indicate different information.
  • the Type field indicates the data type
  • the Fmt field, reserved bits, and TLP extension header respectively indicate different attribute information of the data type.
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type.
  • the TLP extension header indicates the third attribute information of the data type, as shown in FIG. 7.
  • the reserved bit can be one bit, that is, the 9th bit of the TLP header or the 13th bit of the TLP header, or two bits, that is, the 9th bit and the 13th bit of the TLP header.
  • the data type is an image
  • the first attribute information is an image data type
  • the second attribute information is encryption
  • the third attribute information is pixel quantization depth, graphics resolution, segmentation indication information, and the like.
  • the Type field indicates the data type
  • the Fmt field indicates the attribute information of the first TLP
  • the reserved bits and the TLP extension header respectively indicate different attribute information of the data type
  • the attributes corresponding to the data type carried by the first TLP The information includes the first attribute information and the second attribute information as an example
  • the reserved bit indicates the first attribute information of the data type
  • the TLP extension header indicates the second attribute information of the data type, as shown in FIG. 8.
  • the Fmt field is used to indicate the encapsulation mode of the first TLP.
  • the five state values of 000, 001, 010, 011, and 100 in the Fmt field are used to indicate that the first TLP is encapsulated in the traditional mode, and 101 in the Fmt field is used.
  • the three reserved values of, 110 and 111 indicate that the first TLP adopts the mode encapsulation provided by this application.
  • the Fmt field can indicate the encapsulation mode of the first TLP.
  • 101 represents the encapsulation mode provided in this application, that is It is different from the traditional TLP encapsulation mode disclosed in the above PCI Express Base Specification Revision 5.0 Version 1.0;
  • the Type field indicates that the data type is image/security, for example, 00001 indicates that the service is an image, 00000 indicates an encrypted message established; reserved bits indicate an image service Whether to encrypt, for example, 1 means encryption, 0 means unencrypted;
  • TLP extension header indicates image data type/security information type, pixel quantization depth/message format, image segmentation indication information/reservation.
  • the Type field, the Fmt field, and the reserved bits are jointly encoded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the reserved bit can be one bit, that is, the 9th bit of the TLP header or the 13th bit of the TLP header, or two bits, that is, the 9th bit and the 13th bit of the TLP header.
  • the TLP extension header may indicate the type and format of the message.
  • the reserved bit as the 9th bit of the TLP header as an example, as shown in Figure 11, 5 bits of the Type field, 3 bits of the Fmt field, and 1 bit of the reserved bit, a total of 9 bits can indicate the data type.
  • the security here includes encryption and interface authentication.
  • the TLP extension header can indicate the safety message type and message format. It should be noted that the TLP in the embodiment of the present application uses 4 bytes as the minimum unit, indicating that bits with less than 4 bytes in the field are reserved.
  • Implementation mode 3 The reserved bits include the 9th or 13th bit of the TLP header.
  • the Type field, the Fmt field, and the reserved bits are divided into at least two groups of fields, each of the at least two groups of fields, and the TLP extension The headers respectively indicate different information.
  • At least one group of fields includes at least two fields, so that any combination of two fields can indicate one type of information, and different groups of fields indicate different information.
  • the Type field, the Fmt field, and the 9th bit of the TLP header can be divided into two groups of fields. If the 9th bit of the Type field, Fmt field, and TLP header is divided into three groups of fields, then the 9th bit of the Type field, Fmt field, and TLP header are each divided into one group, which is the same as the first implementation above. Here No longer.
  • the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding data type.
  • the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the Type field, the Fmt field, and the reserved bits can be divided into at least two groups of specific grouping methods.
  • the possible grouping methods include :
  • Grouping mode A1 one of which is the Type field, and the other is the Fmt field and the 9th bit of the TLP header.
  • the Type field may indicate the data type
  • the Fmt field and the 9th bit of the TLP header indicate the first attribute information corresponding to the data type
  • the TLP extension header indicates the second attribute information of the data type.
  • the Fmt field and the 9th bit of the TLP header indicate the data type
  • the Type field indicates the first attribute information corresponding to the data type.
  • the specific information indicated by each field is not limited here.
  • Grouping mode A2 one of which is the Type field and the Fmt field, and the other is the 9th bit of the TLP header.
  • the Type field and the Fmt field may indicate the data type
  • the 9th bit of the TLP header indicates the first attribute information corresponding to the data type
  • the TLP extension header indicates the second attribute information of the data type.
  • the 9th bit of the TLP header may also indicate the data type
  • the Type field and the Fmt field indicate the first attribute information corresponding to the data type.
  • the specific information indicated by each field is not limited here.
  • Grouping mode A3 one group is the Type field and the 9th bit of the TLP header, and the other group is the Fmt field.
  • the Type field and the 9th bit of the TLP header may indicate the data type
  • the Fmt field indicates the first attribute information corresponding to the data type
  • the TLP extension header indicates the second attribute information of the data type.
  • the Fmt field may also indicate the data type
  • the Type field and the 9th bit of the TLP header indicate the first attribute information corresponding to the data type.
  • the specific information indicated by each field is not limited here.
  • the first set of fields in the at least two sets of fields are used to indicate the data type
  • the second set of fields indicate the attribute information of the first TLP
  • the TLP extension header indicates the attribute information corresponding to the data type. It may also be that the first set of fields is used to indicate the data type, the second set of fields indicate the attribute information corresponding to the data type, and the TLP extension header indicates the attribute information of the first TLP.
  • the first group of fields is the Fmt field, indicating the attribute information of the first TLP
  • the second group of fields is the Type field and the 9th bit of the TLP header jointly coded to indicate the data type
  • the TLP extension header indicates the data
  • the attribute information corresponding to the type can indicate the encapsulation mode of the first TLP.
  • 101 represents the encapsulation mode provided for this application, which is the same as the traditional TLP disclosed in PCI Express Base Specification Revision 5.0 Version 1.0.
  • the encapsulation mode is different; the Type field and the 9th bit of the TLP header are jointly coded to indicate that the data type is an image, for example, 000001 indicates that the service is an image, and the TLP extension header indicates the image data type, pixel quantization depth, and image segmentation indication information.
  • the reserved bits include the 9th and 13th bits of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header and the 13th bit of the TLP header are divided into at least two groups of fields, at least Each of the two sets of fields and the TLP extension header respectively indicate different information.
  • the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding data type.
  • the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the Type field, the Fmt field, the 9th bit and the 13th bit of the TLP header can be divided into at least two groups of specific grouping methods.
  • One method is Type field, Fmt field, TLP.
  • the 9th bit of the header and the 13th bit of the TLP header can be divided into two groups of fields, such as the first group of fields and the second group of fields.
  • the possible grouping methods include:
  • Grouping method B1 the first group of fields includes one field, and the second group of fields includes three fields. There are four division methods in total.
  • the first group of fields is the Fmt field
  • the second group of fields is the Type field, the 9th bit of the TLP header, and the 13th bit of the TLP header.
  • the first group of fields is the Type field
  • the second group of fields is the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header. I won't list them all here.
  • the first group of fields includes two fields, and the second group of fields includes two other fields except the first group of fields. There are a total of six division methods.
  • the first group of fields are the Type field and the Fmt field
  • the second group of fields are the 9th bit of the TLP header and the 13th bit of the TLP header.
  • the first group of fields are the Fmt field and the 9th bit of the TLP header
  • the second group of fields are the Type field and the 13th bit of the TLP header. I won't list them all here.
  • the first group of fields can be used to indicate the data type
  • the second group of fields can be used to indicate the attribute information corresponding to the data type
  • the TLP extension header indicates the corresponding data type. Attribute information other than the attribute information indicated by the second group of fields.
  • the first set of fields is used to indicate the data type
  • the second set of fields indicates the attribute information of the first TLP
  • the TLP extension header indicates the attribute information corresponding to the data type. It may also be that the first set of fields is used to indicate the data type, the second set of fields indicate the attribute information corresponding to the data type, and the TLP extension header indicates the attribute information of the first TLP.
  • the first group of fields is the Type field, the 9th bit of the TLP header, and the 13th bit of the TLP header.
  • Joint coding indicates the data type.
  • the second group of fields is the Fmt field, indicating the first TLP.
  • the attribute information of the TLP extension header indicates the attribute information corresponding to the data type.
  • the Fmt field can indicate the encapsulation mode of the first TLP.
  • 101 represents the encapsulation mode provided for this application, which is the same as the traditional TLP disclosed in PCI Express Base Specification Revision 5.0 Version 1.0.
  • the encapsulation mode is different; the Type field, the 9th bit and the 13th bit of the TLP header are jointly coded to indicate that the data type is an image, for example, 000001 indicates that the service is an image, and the TLP extension header indicates the image data type, pixel quantization depth, and image segmentation indication information.
  • Type field the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header can be divided into three groups of fields, such as the first group of fields, the second group of fields, and the third group of fields.
  • the possible grouping methods include:
  • Grouping mode B3 the first group of fields is the Type field, the second group of fields is the Fmt field, and the third group of fields is the 9th bit of the TLP header and the 13th bit of the TLP header.
  • Grouping mode B4 the first group of fields is the Type field, the second group of fields is the Fmt field and the 9th bit of the TLP header, and the third group of fields is the 13th bit of the TLP header.
  • Grouping mode B5 the first group of fields is the Type field, the second group of fields is the Fmt field and the 13th bit of the TLP header, and the third group of fields is the 9th bit of the TLP header.
  • Grouping mode B6 the first group of fields is the Type field and the Fmt field, the second group of fields is the 13th bit of the TLP header, and the third group of fields is the 9th bit of the TLP header.
  • the first group of fields are the Type field and the 9th bit of the TLP header
  • the second group of fields are the Fmt field
  • the third group of fields are the 13th bit of the TLP header.
  • Grouping mode B8 the first group of fields is the Type field and the 13th bit of the TLP header, the second group of fields is the Fmt field, and the third group of fields is the 14th bit of the TLP header.
  • the first group of fields can be used to indicate the data type
  • the second group of fields can be used to indicate the first attribute information corresponding to the data type
  • the third group of fields can be used To indicate the second attribute information corresponding to the data type
  • the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the second group of fields and the third group of fields.
  • the first set of fields is used to indicate the data type
  • the second set of fields indicates the attribute information of the first TLP
  • the third set of fields can be used to indicate the attribute information corresponding to the data type
  • the TLP extension header indicates the data type.
  • Corresponding attribute information other than the attribute information indicated by the third group of fields It can also be the first group of fields to indicate the data type, the second group of fields to indicate the attribute information corresponding to the data type, and the third field to indicate other attribute information corresponding to the data type except the attribute information indicated by the second group of fields.
  • TLP The extension header indicates the attribute information of the first TLP.
  • the TLP header may further include a first field.
  • the first field may be Byte4-Byte15 of the 16-Byte TLP header, or may be Byte4-Byte11 of the 12-Byte TLP header.
  • the data type of the data and at least one attribute information corresponding to the data type can be indicated through the Type field, Fmt field, reserved bits, and TLP extension header, and the first field does not carry attribute information corresponding to the data type.
  • the specific indication manners of the four fields, such as the Type field, the Fmt field, the reserved bits, and the TLP extension header indication, can be referred to the foregoing implementation manner 1 to implementation manner 4, which will not be repeated here.
  • the Type field, Fmt field, reserved bits, and TLP extension header can be used to indicate the data type of the data and part of the attribute information corresponding to the data type, and the first field can indicate another part of the attribute information corresponding to the data type.
  • Information for example, the Type field, the Fmt field, reserved bits, and the TLP extension header indicate the data type of the data and at least one attribute information corresponding to the data type, and the first field indicates other attributes other than the at least one attribute information corresponding to the data type. information.
  • the body indication modes of the four fields such as the Type field, the Fmt field, the reserved bits, and the TLP extension header indication can be referred to the foregoing implementation manner 1 to implementation manner 4, which will not be repeated here.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type
  • the TLP extension header indicates a part of attribute information corresponding to the data type. Take Byte4-Byte15 of the TLP header whose first field is 16 Bytes as an example.
  • the Type field, Fmt field, and reserved bits are jointly coded to indicate that the data type is image.
  • the TLP extension header indicates the image data type.
  • the fields indicate pixel quantization depth, resolution, segmentation indication information, etc.
  • the data type of the data can be indicated through the Type field, the Fmt field, reserved bits, and the TLP extension header, and the attribute information corresponding to the data type is indicated through the first field, that is, the Type field, the Fmt field, and the preset
  • the four fields such as reserved bits and TLP extension header indication do not carry attribute information corresponding to the data type, and all attribute information corresponding to the data type is carried in the first field.
  • 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 first TLP may also carry the identity information of the destination node, that is, the identity of the third node, which may be the address or ID of the third node.
  • the first field may carry the identity of the third node.
  • the first TLP may also carry the identity information of the first node, that is, the identity of the first node, which may be the address or ID of the first node.
  • the first field may carry the identity of the first node.
  • the third node may be an end node in the PCIe system or a switching node in the PCIe system.
  • Step 502 The first node sends the first TLP to the second node.
  • the second node receives the first TLP from the first node.
  • the second node can be connected to 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 and the second node respectively.
  • Step 503 The second node sends a second TLP to the third node.
  • the third node receives the second TLP from the second node.
  • the first TLP is the same as the second TLP, that is, after the second node receives the first TLP from the first node, it is forwarded to the third node through the first TLP.
  • the first TLP is different from the second TLP, that is, after the second node receives the first TLP from the first node, it processes the first TLP, for example, the first TLP
  • the identity information of the source node is modified from the identity of the first node to the identity of the second node, and the second TLP is obtained, and then the second TLP is sent to the third node, where the second TLP sent by the second node is the same as that of the first node
  • the sent first TLP carries the same data, data type, and attribute information corresponding to the data type. It should be understood that related content such as the data, data type, and attribute information corresponding to the data type carried by the second TLP can be referred to the above-mentioned related description for the first TLP, which will not be repeated here.
  • the first TLP also includes the identification of the third node.
  • the second node may also determine the routing path according to the identification and routing information of the third node; The node sends the second TLP.
  • Step 504 The third node obtains data according to the data type of the data and at least one attribute information corresponding to the data type.
  • the third node parses the second TLP to obtain data.
  • the third node may obtain the data type of the data and at least one attribute information corresponding to the data type from the received second TLP, and determine according to the data type of the data and at least one attribute information corresponding to the data type.
  • the encapsulation format of the data payload carried in the second TLP, and then the data payload in the second TLP is decapsulated to obtain the data.
  • the third node may determine the data type of the data and the attribute information corresponding to the data type according to the Fmt field, the Type field, and the reserved bits in the TLP header, and the TLP extension header.
  • the third node may determine the data type of the data and part of the attribute information corresponding to the data type according to the Fmt field, the Type field, and reserved bits in the TLP header, and the TLP extension header.
  • the field determines another part of the attribute information corresponding to the data type.
  • the third node may determine the data type of the data according to the Fmt field, the Type field, and reserved bits in the TLP header, and the TLP extension header, and determine the attribute information corresponding to the data type according to the first field in the TLP header .
  • FIG. 18 is a schematic diagram of the architecture of another PCIe system provided by an embodiment of the application.
  • the PCIe system includes a root node, a switch node (Switch) 1 connected to the root node (Root), a Switch2 connected to Switch1, a camera (Camera) 1, Camera 2, and a display (Display ).
  • switch switch node
  • Switch2 connected to Switch1
  • Camera Camera1/Camera2
  • Display Display
  • Camera1/Camera2 can transmit data to Switch1 by executing the method executed by the first node
  • Switch1 can transmit data to Switch2 by executing the method executed by the second node
  • Display can transmit data by executing the method executed by the third node. Method to get the data.
  • Camera1 takes Camera1 to transmit data to Display as an example.
  • the specific data transmission process is as follows:
  • Camera1 can calculate the amount of data in each 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.), combining with each first TLP of PCIe
  • the maximum data carrying capacity determines the number of first TLPs required to transmit the data of each line of the image, and then determines the image segmentation mode.
  • the first TLP can adopt a variety of packaging methods, including but not limited to the following:
  • Encapsulation method 1 Camera1 can use the Type field in the TLP header to indicate that the data type is image, the Fmt field to indicate the image data type, and the reserved bits (including the 9th bit and/or 13th bit in the TLP header) indicate whether Encryption, the TLP extension header indicates the pixel quantization depth, graphics resolution, segmentation indication information, etc., Camera1 fills the data into the data payload of the first TLP, and Camera1 displays its own identity information (such as the address/ID of Camera1) and Display The identity information (such as Display address/ID) is filled in Byte 8 ⁇ Byte 15 of the TLP header.
  • Camera1 can use the Type field in the TLP header to indicate that the data type is image, and the Fmt field to indicate the encapsulation mode of the first TLP, and reserved bits (including the 9th bit and/or 13th bit in the TLP header) ) Indicates whether to encrypt, the TLP extension header indicates the image data type, pixel quantization depth, graphics resolution, segmentation indication information, etc.
  • Camera1 fills the data into the data payload of the first TLP, and Camera1 expresses its own identity information (such as Camera1 The address/ID of the display and the identity information of the Display (such as the address/ID of the Display) are filled into Byte8 ⁇ Byte15 of the TLP header.
  • Camera1 can use 9 bits (reserved bits include the 9th or 13th bit in the TLP header) or 10 bits (reserved) obtained by joint encoding of the Type field, Fmt field and reserved bits The bits include the 9th and 13th bits in the TLP header).
  • the state value indicates that the data type is image.
  • Use the TLP extension header to indicate the image data type, pixel quantization depth, graphics resolution, segmentation indication information, etc. Camera1 will The data is filled into the data payload of the first TLP, and Camera1 fills its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) into Byte 8 ⁇ Byte 15 of the TLP header.
  • Camera1 can use the Type field, Fmt field and a reserved bit (the reserved bit is the 9th bit or 13th bit in the TLP header) for joint coding of any two fields. The value indicates that the data type is image, and the remaining field indicates the image data type.
  • Camera1 can use the Type field, Fmt field, the 9th bit in the TLP header, and the 13th bit in the TLP header, a total of four fields are divided into two groups of fields, one of which is used to indicate data The type is image, another set of fields is used to indicate the type of image data, and the TLP extension header is used to indicate the pixel quantization depth, graphics resolution, segmentation indication information, etc., Camera1 fills the data into the data payload of the first TLP, and Camera1 It means that its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) are filled into Byte 8 ⁇ Byte 15 of the TLP header.
  • identity information such as the address/ID of Camera1
  • the identity information of the Display such as the address/ID of the Display
  • Camera1 can use the Type field, Fmt field, the 9th bit in the TLP header, and the 13th bit in the TLP header, a total of four fields are divided into three groups of fields, and the first group of fields is used to indicate the data type For images, use the second set of fields to indicate the image data type, use the third set of fields to indicate the pixel quantization depth, and use the TLP extension header to indicate graphics resolution, segmentation indication information, etc., Camera1 fills the data into the data payload of the first TLP Camera1 fills the Byte 8 ⁇ Byte 15 of the TLP header with its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display).
  • identity information such as the address/ID of Camera1
  • the identity information of the Display such as the address/ID of the Display
  • Camera1 can use the Type field in the TLP header to indicate that the data type is image, the Fmt field to indicate the image data type, and the reserved bits (including the 9th bit and/or the 13th bit in the TLP header) indicate whether Encryption, the TLP extension header indicates the pixel quantization depth, and the Byte 4 ⁇ Byte 15 of the TLP header are used to indicate the graphics resolution, segmentation indication information, etc.
  • Camera1 fills the data into the data payload of the first TLP, and Camera1 expresses its own identity information (Such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) are filled into Byte 8 ⁇ Byte 15 of the TLP header.
  • Encapsulation mode eight Camera1 can use Type field, Fmt field and reserved bits to jointly encode 9 bits (reserved bits include the 9th or 13th bit in the TLP header) or 10 bits (reserved) Bits include the 9th and 13th bits in the TLP header.)
  • the state value indicates that the data type is image
  • the TLP extension header is used to indicate the image data type
  • the Byte 4 ⁇ Byte 15 of the TLP header are used to indicate the pixel quantization depth and image resolution.
  • Camera1 fills the data into the data payload of the first TLP, Camera1 fills its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) Byte 8 ⁇ Byte 15 to the TLP header.
  • identity information such as the address/ID of Camera1
  • identity information of the Display such as the address/ID of the Display
  • Camera1 can use the Type field, Fmt field and a reserved bit (the reserved bit is the 9th or 13th bit in the TLP header) for joint encoding.
  • the value indicates that the data type is image, the remaining field indicates the image data type, the TLP extension header is used to indicate the pixel quantization depth, the Byte 4 ⁇ Byte 15 of the TLP header is used to indicate the graphics resolution, segmentation information, etc., and Camera1 fills the data to In the data payload of the first TLP, Camera1 fills its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) into Byte 8-Byte 15 of the TLP header.
  • identity information such as the address/ID of Camera1
  • the identity information of the Display such as the address/ID of the Display
  • Camera1 can use the Type field, Fmt field, the 9th bit in the TLP header, and the 13th bit in the TLP header, a total of four fields are divided into two groups of fields, one of which is used to indicate data
  • the type is image
  • another set of fields is used to indicate the type of image data
  • the TLP extension header is used to indicate the pixel quantization depth
  • Byte 4 to Byte 15 of the TLP header is used to indicate the graphics resolution, segmentation information, etc.
  • Camera1 fills the data to In the data payload of the first TLP
  • Camera1 fills its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) into Byte 8-Byte 15 of the TLP header.
  • Camera1 can use the Type field, the Fmt field, the 9th bit in the TLP header, and the 13th bit in the TLP header, a total of four fields are divided into three groups of fields, and the first group of fields is used to indicate the data type For images, use the second set of fields to indicate the image data type, use the third set of fields to indicate the pixel quantization depth, use the TLP extension header to indicate the graphics resolution, and use Byte 4 to Byte 15 of the TLP header to indicate segmentation information, etc.
  • Camera1 will The data is filled into the data payload of the first TLP, and Camera1 fills its own identity information (such as the address/ID of Camera1) and the identity information of the Display (such as the address/ID of the Display) into Byte 8 ⁇ Byte 15 of the TLP header.
  • identity information such as the address/ID of Camera1
  • identity information of the Display such as the address/ID of the Display
  • Camera1 can use the Type field, Fmt field, reserved bits (including the 9th bit and/or 13th bit in the TLP header), and the state value obtained by the joint encoding of the TLP extension header to indicate that the data type is image Byte 4 ⁇ Byte 15 of the TLP header are used to indicate the image data type, pixel quantization depth, resolution, segmentation indication information, etc.
  • Camera1 fills the data into the data payload of the first TLP, and Camera1 expresses its own identity information (such as The address/ID of Camera1) and the identity information of Display (such as the address/ID of Display) are filled in Byte8 ⁇ Byte 15 of the TLP header.
  • Camera1 sends the first TLP to Switch1.
  • Switch1 After Switch1 receives the first TLP, it parses the Fmt field from the TLP header of the first TLP. If the status value of the Fmt field is the status value used in PCI Express Base Specification Revision 5.0 Version 1.0, it will follow the original PCIe mechanism Processing, that is, forward the first TLP to Root, and then Root determines the receiving end node according to the function of each end node, and then sends the first TLP to the receiving end node. If the Fmt field is the content defined in the embodiment of this application, Switch1 searches for its own stored routing information according to the identity information of the Display in the first TLP, and then encapsulates the data into the second TLP according to the encapsulation method provided in the embodiment of this application. The found routing path sends the second TLP to Switch2.
  • Switch2 After Switch2 receives the first TLP or the second TLP, it parses the Fmt field from the TLP header. If the status value of the Fmt field is the status value used in PCI Express Base Specification Revision 5.0 Version 1.0, it will follow the original PCIe mechanism Processing, that is, sending the first TLP to Root, and then Root determines the receiving end node according to the function of each end node, and then sending the first TLP to the receiving end node. If the Fmt field is the content defined in the embodiment of this application, Switch2 searches for its own stored routing information according to the identity information of the Display in the second TLP, and sends the second TLP to the Display according to the found routing path.
  • process S6 after the Display receives the first TLP or the second TLP, it obtains the type and format of the image from the TLP header and the TLP extension header, and restores a complete image according to the segment indication information, and transmits the data to the display screen for display .
  • the specific implementation of the type and format of the image obtained by Display from the TLP header and the TLP extension header is related to the encapsulation method of the first TLP or the second TLP received. For ease of understanding, only a few examples are listed. :
  • Display parses the data type from the Type field to be an image, and separately reads the Fmt field and reserved bits (including the 9th in the TLP header). Bits and/or 13th bit), the TLP extension header respectively parses out the image data type, whether it is encrypted, indicates the pixel quantization depth, graphics resolution, segmentation indication information, etc.
  • Display includes 9 bits from the Type field, the Fmt field, and the reserved bits (the reserved bits include the 9th in the TLP header).
  • Bits or 13th bits) or 10 bits (reserved bits include the 9th and 13th bits in the TLP header) state value resolves the data type to be an image, and resolves the image data type from the TLP extension header , Pixel quantization depth, graphics resolution, segmentation indication information, etc.
  • Display parses the data type from the Type field as an image, parses the image data type from the Fmt field, and obtains the image data type from the reserved bits (including The 9th bit and/or 13th bit in the TLP header) parse to indicate whether to encrypt, analyze the pixel quantization depth from the TLP extension header, and analyze the graphics resolution and segmentation instructions from Byte 4 to Byte 15 of the TLP header Information etc.
  • the first TLP to encapsulate data using the encapsulation method 8 in process S2 as an example, Display 9 bits obtained by joint encoding from the Type field, the Fmt field, and the reserved bits (the reserved bits include the TLP header).
  • the state value of the 9th bit or 13th bit in the TLP header) or 10 bits (reserved bits include the 9th bit and the 13th bit in the TLP header) is analyzed to find out that the data type is image, which is parsed from the TLP extension header Output the image data type, and analyze the pixel quantization depth, graphics resolution, segmentation indication information, etc. from Byte 4 to Byte 15 of the TLP header.
  • Display starts with the Type field, the Fmt field, and reserved bits (including the 9th bit and/or the first bit in the TLP header). 13 bits) and the state value obtained by the joint encoding of the TLP extension header analyzes the data type as an image, and analyzes the image data type, pixel quantization depth, resolution, segmentation indication information, etc. from Byte 4 to Byte 15 of the TLP header.
  • the Type field, Fmt field, reserved bits and TLP extension header in the TLP header indicate the information required for communication with the other end node, such as the data type and at least one attribute corresponding to the data type. In this way, any two end nodes in the PCIe system can communicate without Root, which can reduce the complexity of the in-vehicle network.
  • the encapsulation mode of TLP can be displayed or implicitly indicated, so that the PCIe system can be compatible with the traditional data transmission method in the PCIe system and the method provided in the embodiments of this application. Data transmission method.
  • the foregoing embodiment mainly introduces the solution provided by the embodiment of the present application from the perspective of the interaction between the first node, the second node, and the third node.
  • the first node, the second node, and the third node may include hardware structures and/or software modules corresponding to each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
  • the embodiment of the present application can divide the first node, the second node, and the third node into functional units according to the above method examples.
  • each functional unit can be divided corresponding to each function, or two or more functions can be integrated.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • FIG. 19 shows a schematic structural diagram of a PCIe-based data transmission device involved in an embodiment of the present application.
  • the apparatus 1900 may include: a processing unit 1901 and a communication unit 1902.
  • the processing unit 1901 is used to control and manage the actions of the device 1900.
  • the communication unit 1902 is used to support communication between the apparatus 1900 and other devices.
  • the communication unit 1902 may also be referred to as a transceiver unit, and may include a receiving unit and/or a sending unit, which are used to perform receiving and sending operations, respectively.
  • the device 1900 may further include a storage unit 1903 for storing program codes and/or data of the device 1900.
  • the apparatus 1900 may be the first node in any of the foregoing embodiments (or a chip or chipset or a part of a chip used to perform related method functions) provided in the first node, and the first node may communicate with the first node through the PCIe bus. Two-node connection.
  • the processing unit 1901 may support the apparatus 1900 to perform the actions of the first node in the above method examples; or, the processing unit 1901 may mainly perform the internal actions of the first node in the method examples, and the communication unit 1902 may support the apparatus 1900 and the second node. Communication between nodes.
  • the processing unit 1901 is configured to obtain a transaction layer data packet TLP; where the TLP includes a TLP header, a TLP extension header, and data, and the TLP header includes a Type field, an Fmt field, and reserved bits, and the Type field and the Fmt field , The reserved bits and the TLP extension header are used to indicate the data type of the data and at least one attribute information corresponding to the data type; the communication unit 1902 is used to send TLP to the second node.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type
  • the TLP extension header indicates the third attribute information of the data type.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header are divided into At least two sets of fields, the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding difference in the data type
  • the attribute information of the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the values of the Type field and/or the Fmt field are reserved values.
  • the TLP header further includes a first field, and the first field indicates other attribute information corresponding to the data type except at least one attribute information.
  • the first field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header.
  • the first field also includes the identifier of the third node.
  • the data type includes any one or more of image, audio, control information, write data stream SWRITE, and security.
  • the apparatus 1900 may be the second node in any of the above embodiments (or a chip or chipset or a part of a chip used to perform related method functions in the second node.
  • the processing unit 1901 may support the apparatus 1900 to execute The actions of the second node in the foregoing method examples; or, the processing unit 1901 mainly executes the internal actions of the second node in the method examples, and the communication unit 1902 can support the apparatus 1900 and other nodes (such as the first node, the third node, Other second nodes).
  • the communication unit 1902 may include a first communication unit and a second communication unit, where:
  • the first communication unit is used to receive the first transaction layer data packet TLP from the first node; the second communication unit is used to send the second TLP to the third node; wherein the TLP header in the TLP includes the Type field and the Fmt field As well as reserved bits, the Type field, the Fmt field, the reserved bits, and the TLP extension header in the TLP are used to indicate the data type of the data and at least one attribute information corresponding to the data type, and the TLP includes the first TLP and/or the second TLP.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type
  • the TLP extension header indicates the third attribute information of the data type.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header are divided into At least two sets of fields, the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding difference in the data type
  • the attribute information of the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the values of the Type field and/or the Fmt field are reserved values.
  • the TLP header further includes a first field, and the first field indicates other attribute information corresponding to the data type except at least one attribute information.
  • the first field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header.
  • the first field further includes the identification of the third node; the processing unit 1901 is configured to: determine the routing path according to the identification and routing information of the third node; the second communication unit is configured to determine the routing path according to the routing path , Send the second TLP to the third node.
  • the data type includes any one or more of image, audio, control information, write data stream SWRITE, and security.
  • the device 1900 may be the third node in any of the above embodiments (or a chip or chipset or a part of a chip used to perform related method functions) provided in the third node, and the third node may communicate with the third node through the PCIe bus. Two-node connection.
  • the processing unit 1901 may support the apparatus 1900 to perform the actions of the third node in the above method examples; or, the processing unit 1901 may mainly perform the internal actions of the third node in the method examples, and the communication unit 1902 may support the apparatus 1900 and the second node. Communication between nodes.
  • the communication unit 1902 is configured to receive a transaction layer data packet TLP from the second node; wherein the TLP includes a TLP header, a TLP extension header and data, and the TLP header includes a Type field, an Fmt field and reserved bits, The Type field, the Fmt field, the reserved bits and the TLP extension header are used to indicate the data type of the data and at least one attribute information corresponding to the data type; the processing unit 1901 is used to indicate at least one attribute information corresponding to the data type and the data type of the data ,get data.
  • the Type field indicates the data type
  • the Fmt field indicates the first attribute information of the data type
  • the reserved bits indicate the second attribute information of the data type
  • the TLP extension header indicates the third attribute information of the data type.
  • the Type field, the Fmt field, and the reserved bits are jointly coded to indicate the data type, and the TLP extension header is used to indicate at least one attribute information corresponding to the data type.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the reserved bits include the 9th bit and/or the 13th bit of the TLP header.
  • the Type field, the Fmt field, the 9th bit of the TLP header, and the 13th bit of the TLP header are divided into At least two sets of fields, the first set of fields in the at least two sets of fields is used to indicate the data type, and each set of fields in the at least two sets of fields except the first set of fields indicates the corresponding difference in the data type
  • the attribute information of the TLP extension header indicates other attribute information corresponding to the data type except the attribute information indicated by the at least two sets of fields.
  • the values of the Type field and/or the Fmt field are reserved values.
  • the TLP header further includes a first field, and the first field indicates other attribute information corresponding to the data type except at least one attribute information.
  • the first field is byte 4 to byte 15 or byte 4 to byte 11 of the TLP header.
  • the first field also includes the identifier of the third node.
  • the data type includes any one or more of image, audio, control information, write data stream SWRITE, and security.
  • each unit in the device can be all implemented in the form of software called by processing elements; they can also be all implemented in the form of hardware; part of the units can also be implemented in the form of software called by the processing elements, and some of the units can be implemented in the form of hardware.
  • each unit can be a separate processing element, or it can be integrated in a certain chip of the device for implementation.
  • it can also be stored in the memory in the form of a program, which is called and executed by a certain processing element of the device. Function.
  • each step of the above method or each of the above units may be implemented by an integrated logic circuit of hardware in a processor element or implemented in a form of being called by software through a processing element.
  • the unit in any of the above devices may be one or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASIC), or, one or Multiple microprocessors (digital singnal processors, DSP), or, one or more field programmable gate arrays (FPGA), or a combination of at least two of these integrated circuits.
  • ASIC application specific integrated circuits
  • DSP digital singnal processors
  • FPGA field programmable gate arrays
  • the unit in the device can be implemented in the form of a processing element scheduler
  • the processing element can be a processor, such as a general-purpose CPU, or other processors that can call programs.
  • these units can be integrated together and implemented in the form of a system-on-a-chip (SOC).
  • SOC system-on-a-chip
  • the above receiving unit is an interface circuit of the device for receiving signals from other devices.
  • the receiving unit is an interface circuit used by the chip to receive signals from other chips or devices.
  • the above unit for sending is an interface circuit of the device for sending signals to other devices.
  • the sending unit is an interface circuit used by the chip to send signals to other chips or devices.
  • FIG. 20 is a schematic structural diagram of another PCIe-based data transmission apparatus provided by an embodiment of the application.
  • the apparatus 2000 may be the first node, the second node, or the third node in the foregoing embodiment.
  • the device 2000 includes a processor 2002, a communication interface 2003, and a memory 2001 or a coupling relationship with the memory 2001.
  • the device 2000 may further include a communication line 2004.
  • the communication interface 2003, the processor 2002, and the memory 2001 may be connected to each other through a communication line 2004, and the communication line 2004 may be a PCIe bus.
  • the communication line 2004 can be divided into an address bus, a data bus, a control bus, and so on. For ease of presentation, only one thick line is used to represent in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the processor 2002 may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application.
  • the function of the processor 2002 may be the same as the function of the processing unit described in FIG. 19.
  • Communication interface 2003 using any device such as a transceiver to communicate with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), Wired access network, etc.
  • RAN radio access network
  • WLAN wireless local area networks
  • Wired access network etc.
  • the function of the communication interface 2003 may be the same as the function of the communication unit described in FIG. 19.
  • the memory 2001 can be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, RAM or other types of dynamic storage devices that can store information and instructions, or it can be an electronic device.
  • Erasable programmable read-only memory electrically erasable programmable read-only memory, EEPROM
  • compact disc read-only memory, CD-ROM
  • optical disc storage including compact discs, laser discs, optical discs, Digital Universal Disc, Blu-ray Disc, etc.
  • magnetic disk storage media or other magnetic storage devices or any other media 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 not limited to this.
  • the memory can exist independently and is connected to the processor through the communication line 2004.
  • the memory can also be integrated with the processor.
  • the memory 2001 may have the same function as the storage unit described in FIG. 8.
  • the memory 2001 is used to store computer-executable instructions for executing the solution of the present application, and the processor 2002 controls the execution.
  • the processor 2002 is configured to execute computer-executable instructions stored in the memory 2001, so as to implement the method provided in the foregoing embodiment of the present application.
  • the computer-executable instructions in the embodiments of the present application may also be referred to as application program codes, which are not specifically limited in the embodiments of the present application.
  • the embodiments of the present application also provide a computer-readable storage medium for storing computer software instructions required to execute the above-mentioned processor, which contains a program required to execute the above-mentioned processor.
  • this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • These computer program instructions can also be loaded on a computer or other programmable data processing equipment, so that a series of operation steps are executed on the computer or other programmable equipment to produce computer-implemented processing, so as to execute on the computer or other programmable equipment.
  • the instructions provide steps for implementing the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Small-Scale Networks (AREA)
  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

本申请实施例公开了一种PCIe的数据传输方法及装置,其中,该方法包括第一节点获得事务层数据包TLP,其中,TLP包括TLP头、TLP扩展头和数据,TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息。本申请实施例通过TLP中的Type字段、Fmt字段、预留比特和TLP扩展头指示传输数据所需要的信息,即数据的数据类型和数据类型对应的至少一个属性信息,这样可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。

Description

一种PCIe的数据传输方法及装置 技术领域
本申请涉及通信技术领域,尤其涉及一种基于外围组件互连传递(peripheral component interconnect express,PCIe)的数据传输方法及装置。
背景技术
PCIe是一种高速短距离通信接口,广泛应用于计算机、测试仪器等设备中。由于PCIe可以快速直接读写内存,提供大带宽通信,一些车企将其传输距离加长,作为车内网大数据量通信端口。PCIe系统包括根节点(Root complex,也可简称为Root)、交换节点(Switch)和端节点(Endpoint),其中,Root负责管理PCIe系统中的所有总线和节点,Switch作为数据转发的节点,可作为连接Root、其它Switch、以及Endpoint等节点的桥梁,Endpoint为端节点可以发送或接收数据。
现有的PCIe系统,只有Root知道各个Endpoint有哪些功能,传输的是什么业务类型的数据,而任两个Endpoint之间并不知道对方的功能,以及传输的什么业务类型的数据,所以任两个Endpoint之间不能直接进行通信,必须经过Root才能通信。PCIe系统中两个Endpoint之间必须通过Root通信的机制,导致车内网中需要使用其它的传输接口,如果车内网中存在多种传输接口,各种传输接口之间进行信息交互需要接口转换,导致车内网的复杂度大幅提升,尤其是在高速通信场景中这种情况更为严重。
发明内容
本申请实施例提供一种基于PCIe的数据传输方法及装置,以便PCIe系统中的任两个Endpoint之间可以不通过Root进行通信,进而降低车内网的复杂度。
第一方面,本申请实施例提供了一种基于PCIe的数据传输方法,该方法包括:第一节点获得事务层数据包TLP,然后向第二节点发送该TLP。其中,TLP包括TLP头、TLP扩展头和数据,TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP扩展头用于指示该数据的数据类型和数据类型对应的至少一个属性信息。
其中,第一节点可以为端节点,也可以为交换节点。
基于该方案,通过TLP中的Type字段、Fmt字段、预留比特和TLP扩展头指示传输数据所需要的信息,即数据的数据类型和数据类型对应的至少一个属性信息,这样可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息。
通过该设计,可以将Type字段、Fmt字段、预留比特和TLP扩展头分开指示不同的信息,使得与第一节点通信的另一节点可以在解析这四个字段中的任一个字段来确定采用的是本申请实施例的方案。
在一种可能的设计中,Type字段、Fmt字段和预留比特联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。
通过该设计,可以将TLP头中的Type字段、Fmt字段和预留比特这三个字段联合编码指示数据类型,TLP扩展头指示数据类型对应的属性信息的方式,可以实现在第一TLP中指示传输数据所需要的信息,从而可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在一个示例中,预留比特包括TLP头的第9个比特或第13个比特,Type字段、Fmt字段、预留比特可以分为两组字段,第一组字段用于指示数据类型,第二组字段分别指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
在另一个示例中,预留比特包括TLP头的第9个比特和第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特可以分为两组字段,第一组字段用于指示数据类型,第二组字段分别指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
通过上述设计,可以通过将Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特四个字段任意组合成两组或三组字段,每组字段分别指示不同的信息,可以实现在第一TLP中指示传输数据所需要的信息,从而可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,Type字段和/或Fmt字段的值为预留值。
通过该设计,通过使用Type字段和/或Fmt字段的预留值,可以使得PCIe系统可以兼容PCIe系统中传统的数据传输方法以及本申请实施例提供的数据传输方法。
在一种可能的设计中,TLP头还包括第一字段,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。
通过该设计,可以使得第一TLP可以指示更多的属性信息。
在一种可能的设计中,第一字段为TLP头的字节4~字节15或字节4~字节11。
通过该设计,可以在TLP头包括16个字节或12个字节,使用第一字段指示数据类型的部分或全部的属性信息。
在一种可能的设计中,第一字段还包括第三节点的标识。
通过该设计,可以使得接收到第一TLP的第二节点根据该第三节点的标识确定路由路径,从而不需要经过Root,通过确定的路由路径可准确的向目的节点发送TLP。
在一种可能的设计中,数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
在一种可能的设计中,图像对应的属性信息可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的属性信息可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的属性信息可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的属性信息可以包括:消息类型、格式指示、是否加密。
在一种可能的设计中,SWRITE对应的属性信息可以包括:对齐方式。
第二方面,本申请实施例提供了一种基于PCIe的数据传输方法,该方法包括:第二节点接收来自第一节点的第一事务层数据包TLP;第二节点向第三节点发送第二TLP;其中,TLP中的TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP中的TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息,TLP包括第一TLP和/或第二TLP。
此处,第一TLP和第二TLP可以为同一个TLP,也可以为不同的TLP,或者理解为第一TLP和第二TLP包括的数据的内容相同。其中,第二节点可以为端节点,也可以为交换节点。
基于该方案,通过TLP中的Type字段、Fmt字段、预留比特和TLP扩展头指示传输数据所需要的信息,即数据的数据类型和数据类型对应的至少一个属性信息,这样可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息。
通过该设计,可以将Type字段、Fmt字段、预留比特和TLP扩展头分开指示不同的信息,使得与第一节点通信的另一节点可以在解析这四个字段中的任一个字段来确定采用的是本申请提供的方案。
在一种可能的设计中,Type字段、Fmt字段和预留比特联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。
通过该设计,可以将TLP头中的Type字段、Fmt字段和预留比特这三个字段联合编码指示数据类型,TLP扩展头指示数据类型对应的属性信息的方式,可以实现在第一TLP中指示传输数据所需要的信息,从而可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在一个示例中,预留比特包括TLP头的第9个比特或第13个比特,Type字段、Fmt字段、预留比特可以分为两组字段,第一组字段用于指示数据类型,第二组字段分别指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
在另一个示例中,预留比特包括TLP头的第9个比特和第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特可以分为两组字段,第一组字段用于 指示数据类型,第二组字段分别指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
通过上述设计,可以通过将Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特四个字段任意组合成两组或三组字段,每组字段分别指示不同的信息,可以实现在第一TLP中指示传输数据所需要的信息,从而可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,Type字段和/或Fmt字段的值为预留值。
通过该设计,通过使用Type字段和/或Fmt字段的预留值,可以使得PCIe系统可以兼容PCIe系统中传统的数据传输方法以及本申请实施例提供的数据传输方法。
在一种可能的设计中,TLP头还包括第一字段,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。
通过该设计,可以使得第一TLP可以指示更多的属性信息。
在一种可能的设计中,第一字段为TLP头的字节4~字节15或字节4~字节11。
通过该设计,可以在TLP头包括16个字节或12个字节,使用第一字段指示数据类型的部分或全部的属性信息。
在一种可能的设计中,第一字段还包括第三节点的标识;第二节点向第三节点发送第二TLP之前,还包括:第二节点根据第三节点的标识和路由信息,确定路由路径;第二节点根据路由路径,向第三节点发送第二TLP。
通过该设计,可以使得接收到第一TLP的第二节点根据该第三节点的标识确定路由路径,从而不需要经过Root,通过确定的路由路径可准确的向目的节点发送TLP。
在一种可能的设计中,数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
在一种可能的设计中,图像对应的属性信息可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的属性信息可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的属性信息可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的属性信息可以包括:消息类型、格式指示、是否加密。
在一种可能的设计中,SWRITE对应的属性信息可以包括:对齐方式。
第三方面,本申请实施例提供了一种基于PCIe的数据传输方法,该方法包括:第三节点接收来自第二节点的事务层数据包TLP;其中,TLP包括TLP头、TLP扩展头和数据,TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息;第三节点根据数据的数据类型和数据类型对应的至少一个属性信息,获得TLP中的数据。
其中,第三节点可以为端节点,也可以为交换节点。
基于该方案,通过TLP中的Type字段、Fmt字段、预留比特和TLP扩展头指示传输数据所需要的信息,即数据的数据类型和数据类型对应的至少一个属性信息,这样可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂 度。
在一种可能的设计中,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息。
通过该设计,可以将Type字段、Fmt字段、预留比特和TLP扩展头分开指示不同的信息,使得与第一节点通信的另一节点可以在解析这四个字段中的任一个字段来确定采用的是本申请提供的方案。
在一种可能的设计中,Type字段、Fmt字段和预留比特联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。
通过该设计,可以将TLP头中的Type字段、Fmt字段和预留比特这三个字段联合编码指示数据类型,TLP扩展头指示数据类型对应的属性信息的方式,可以实现在第一TLP中指示传输数据所需要的信息,从而可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在一个示例中,预留比特包括TLP头的第9个比特或第13个比特,Type字段、Fmt字段、预留比特可以分为两组字段,第一组字段用于指示数据类型,第二组字段分别指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
在另一个示例中,预留比特包括TLP头的第9个比特和第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特可以分为两组字段,第一组字段用于指示数据类型,第二组字段分别指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
通过上述设计,可以通过将Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特四个字段任意组合成两组或三组字段,每组字段分别指示不同的信息,可以实现在第一TLP中指示传输数据所需要的信息,从而可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
在一种可能的设计中,Type字段和/或Fmt字段的值为预留值。
通过该设计,通过使用Type字段和/或Fmt字段的预留值,可以使得PCIe系统可以兼容PCIe系统中传统的数据传输方法以及本申请实施例提供的数据传输方法。
在一种可能的设计中,TLP头还包括第一字段,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。
通过该设计,可以使得第一TLP可以指示更多的属性信息。
在一种可能的设计中,第一字段为TLP头的字节4~字节15或字节4~字节11。
通过该设计,可以在长度为16个字节的TLP头或者在长度为12个字节的TLP头中,使用第一字段指示数据类型的部分或全部的属性信息。
在一种可能的设计中,第一字段还包括第三节点的标识。
通过该设计,可以使得接收到第一TLP的第二节点根据该第三节点的标识确定路由路径,从而不需要经过Root,通过确定的路由路径可准确的向目的端节点发送TLP。
在一种可能的设计中,数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
在一种可能的设计中,图像对应的属性信息可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的属性信息可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的属性信息可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的属性信息可以包括:消息类型、格式指示、是否加密。
在一种可能的设计中,SWRITE对应的属性信息可以包括:对齐方式。
第四方面,本申请提供一种基于PCIe的数据传输装置,该装置可以是通信设备,也可以是通信设备内的芯片或芯片组,其中,通信设备可以为第一节点,也可以是第二节点,也可以是第三节点。该装置可以包括处理单元和通信单元。当该装置是通信设备时,该处理单元可以是处理器,该通信单元可以是收发器;该装置还可以包括存储模块,该存储模块可以是存储器;该存储模块用于存储指令,该处理单元执行该存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。当该装置是通信设备内的芯片或芯片组时,该处理单元可以是处理器,该通信单元可以是输入/输出接口、管脚或电路等;该处理单元执行存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。该存储模块可以是该芯片或芯片组内的存储模块(例如,寄存器、缓存等),也可以是该网络设备内的位于该芯片或芯片组外部的存储模块(例如,只读存储器、随机存取存储器等)。
第五方面,提供了一种基于PCIe的数据传输装置,包括:处理器,还可以包括通信接口和/或存储器。通信接口用于该装置与其他装置之间传输信息、和/或消息、和/或数据。该存储器用于存储计算机执行指令,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行如上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的方法。
第六方面,本申请还提供一种计算机可读存储介质,计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的方法。
第七方面,本申请还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的方法。
第八方面,本申请还提供一种PCIe系统,该系统包括第一节点、第二节点和第三节点,其中,第一节点可以执行上述第一方面中相应的功能,第二节点可以执行上述第二方面中相应的功能,第三节点可以执行上述第三方面中相应的功能。
第九方面,本申请实施例提供的一种芯片,芯片包括至少一个处理器和通信接口,处理器与存储器耦合,用于读取存储器中存储的计算机程序以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的方法。
第十方面,本申请实施例提供一种芯片,包括通信接口和至少一个处理器,所述处理器运行以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的方法。
需要说明的是,本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
附图说明
图1为本申请实施例提供的一种PCIe系统的架构示意图;
图2为本申请实施例提供的另一种PCIe系统的架构示意图;
图3a为本申请实施例提供的TLP结构示意图;
图3b为本申请实施例提供的另一种TLP结构示意图;
图4为本申请实施例提供的TLP头的结构示意图;
图5为本申请实施例提供的一种基于PCIe的数据传输方法的流程图;
图6为本申请实施例提供的摄像机的结构示意图;
图7为本申请实施例提供的一种TLP携带的信息示意图;
图8为本申请实施例提供的另一种TLP携带的信息示意图;
图9为本申请实施例提供的另一种TLP携带的信息示意图;
图10为本申请实施例提供的另一种TLP携带的信息示意图;
图11为本申请实施例提供的另一种TLP携带的信息示意图;
图12为本申请实施例提供的另一种TLP携带的信息示意图;
图13为本申请实施例提供的另一种TLP携带的信息示意图;
图14为本申请实施例提供的另一种TLP携带的信息示意图;
图15为本申请实施例提供的另一种TLP携带的信息示意图;
图16为本申请实施例提供的另一种TLP携带的信息示意图;
图17为本申请实施例提供的另一种TLP携带的信息示意图;
图18为本申请实施例提供的一种PCIe系统的架构示意图;
图19为本申请实施例提供的一种数据传输装置的结构示意图;
图20为本申请实施例提供的另一种基于PCIe的数据传输装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
图1为本申请实施例提供的一种PCIe系统的架构示意图。如图1所示,PCIe系统的主要组成单元有根节点(Root complex,也可简称Root)、交换节点(Switch)和端节点 (Endpoint),其中,Root负责管理系统中的所有总线(如图1中的粗黑线)和各节点,Root是中央处理单元(central processing unit,CPU)和系统中其他设备通信的桥梁,CPU不属于PCIe系统,CPU与PCIe系统中的根节点之间的接口也不是PCIe接口,CPU同PCIe系统中的所有设备通信必须经过Root。Switch作为数据转发的节点,可作为连接Root、其它Switch、以及Endpoint等设备的桥梁,Endpoint作为端节点,如外设(peripheral),可以发送或接收数据。
图2为本申请实施例提供的另一种PCIe系统的架构示意图。如图2所示的两个PCIe系统,每个PCIe系统的节点都由各自的Root独立管理,如图2所示,Root 1和Root 2分属于两个PCIe系统,其中,Root 1管理Switch1、EndPoint1、EndPoint2、Switch2、EndPoint3等节点,Root 2管理Switch3、EndPoint4等节点。由于两个PCIe系统具有独立分配的地址和ID,不同的PCIe系统中的设备的地址和ID会有冲突,为了能让两个PCIe系统连接并且正常通信,需要在两个系统之间进行桥接转换,例如,两个PCIe系统之间通过带有非透明桥(non-transparent bridge,NTB)的Switch相连,由NTB进行地址或ID的转换,使两个PCIe系统可以相互通信。
PCIe系统中Endpoint与Endpoint之间不能直接通信,必须经过Root,因为只有Root知道各个Endpoint中有哪些功能,传输的是什么类型的数据,而任两个Endpoint之间并不知道对方的功能,以及传输的什么业务类型的数据。PCIe系统中的Endpoint的功能,如支持的数据类型、格式等信息都存放在Endpoint的配置空间中,且只有Root有权限去读取Endpoint的配置空间,其它Endpoint和Switch均无权限读取。因此Endpoint支持的数据类型、格式信息只有Root知道,其它节点无法获取。而PCIe系统中Endpoint不知道其它Endpoint支持的数据类型、格式,因此,不经过Root无法进行通信。
例如图1中,Endpoint 1与Endpoint 2连接在同一个switch 1上,但是二者不能直接通过Switch 1通信,以Endpoint 1向Endpoint 2发送数据包为例,Endpoint 1需要先通过switch1将数据包发送给Root,由Root根据各个Endpoint支持的数据类型,确定需要将数据包发送给Endpoint 2,然后Root将该数据包通过switch 1发送给Endpoint 2。再例如图1中,Endpoint1与Endpoint3分别连接不同的switch,但是二者之间也必须通过Root才能实现通信。
PCIe系统中的这种任两个Endpoint之间必须通过Root通信的机制,导致其不能适用于车内网很多场景,如环形车内网要求传感器直接连接在网关上,传感器的数据经环网上的网关/交换机进行交换转发传输到不同的计算/显示单元,这种车内网架构要求传感器数据可以经网关/交换机向任意方向转发,以提供通信链路冗余,从而保证车内通信安全,因此车内环网需使用其他接口。这种情况导致车内网中存在多种传输接口,各种接口之间进行信息交互需要接口转换,不同接口之间的转换导致车内网复杂度大幅提升,尤其是在高速通信场景中这种情况更为严重。
基于此,本申请实施例提供一种基于PCIe的数据传输方法及装置,用于解决现有技术中任两个Endpoint之间通过Root通信的机制导致车内网中存在多种传输接口,车内网复杂度较大的问题。其中,方法和装置是基于同一技术构思的,由于方法及设备解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。本申请实施例提供一种基于PCIe的数据传输方法及装置,可以应用于车内网,特别是自动驾驶汽车车内网,也可以应用于其他设备的PCIe系统。
为了方便理解本申请实施例,下面对PCIe基础规范修订5.0版本1.0(PCI Express Base Specification Revision 5.0 Version 1.0)中事务层数据包(transmission layer packet,TLP)的结构进行说明。
参见图3a,为TLP的结构,主要由TLP头(TLP Header)、数据载荷(Data Payload)和TLP摘要(TLP Digest)这3部分组成。TLP Header的长度可以为12或16个字节(Byte)组成,用于指示PCIe业务类型;Data Payload为数据部分,长度可以为0-4K Byte;TLP摘要可以为循环冗余校验码(end-to-end 32bit cyclic redundancy check,ECRC),长度可以为4字节,其中,ECRC为循环冗余校验(cyclic redundancy check,CRC)校验码,用于校验数据包传输正确与否。可选的,如图3a所示,TLP还可以包括TLP前缀(TLP Prefixes),TLP前缀的长度可以为H字节,其中,H为正整数。
其中,以16 Byte的TLP Header为例,TLP Header的结构可以如图4所示,主要包括:
格式(format,Fmt)字段:包括3比特(bit),用于指示TLP Header长度以及TLP是否有Data Payload部分。TLP Header长度有2种,TLP是否包含Data Payload主要有是和否两种情况,因此,Fmt字段可以指示4种信息,分别为:TLP Header长度为第一长度且TLP包含Data Payload、TLP Header长度为第一长度且TLP不包含Data Payload、TLP Header长度为第二长度且TLP包含Data Payload、TLP Header长度为第二长度且TLP不包含Data Payload,其中,第一长度为12个字节,第二长度为16个字节,此外,Fmt字段还可以指示TLP前缀(Prefixes)。
Fmt字段包括3 bit,共可有8个状态值,这8个状态值中的5个状态值可以用来指示上述5种信息,剩下3个状态值为预留(reserved)值。例如,000、001、010、011、100这5个状态值可以用于指示上述提及的5种信息,剩下的101、110、111这3个状态值为预留(reserved)值。
类型(Type)字段:包括5bit,用于指示TLP的业务类型,其中业务类型有6大类,分别为:存储器(Memory)读/写、输入/输出(input/output,I/O)读/写、配置(Configuration)读/写、消息(Message)请求、结束(Completion)、原子操作。Type字段包括5 bit,共32个状态值,PCI Express Base Specification Revision 5.0 Version 1.0中使用其中的19个状态值指示TLP的业务类型,剩下13个状态值为预留(reserved)值。例如,可以使用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为预留(reserved)值。
T9/T8:为预留bit,其中,T9为TLP头的第9比特,T8为TLP头的第13比特。
优先级(traffic class,TC)字段:用于指示调度优先级。
属性(attributes,Attr)字段:用于指示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。
可以理解的,12 Byte的TLP Header的结构与16 Byte的TLP Header的结构类型类似,区别在于16 Byte的TLP Header对应64位地址,而12 Byte的TLP Header对应32位地址。
本申请实施例提供的方法基于该PCI Express Base Specification Revision 5.0 Version 1.0公开的传统的TLP结构。本申请实施例中涉及的第一TLP和第二TLP的结构与上述PCI Express Base Specification Revision 5.0 Version 1.0公开的传统的TLP结构不同之处在于:在传统的TLP的结构的基础上,第一TLP和第二TLP的结构中TLP头与数据载荷之间还包括TLP扩展头,如图3b所示,数据载荷的长度为0-N字节,N为正整数。需要说明的是,第一TLP、第二TLP与传统的TLP的长度相同,TLP扩展头占用的只是传统TLP中的数据载荷(Data Payload)部分的长度,以第一TLP为例,第一TLP中的TLP扩展头与数据载荷(Data Payload)的长度之和与传统的TLP中的数据载荷(Data Payload)长度(4K字节)相同,其中,TLP扩展头的长度不作限制,理论上小于4096字节即可。申请实施例中涉及的“预留值”可以指PCI Express Base Specification Revision 5.0 Version 1.0中未被使用的状态值,例如,Fmt字段的101、110、111这3个状态值,也可以称为“预留值”。本申请实施例中涉及的“预留比特”可以指PCI Express Base Specification Revision 5.0 Version1.0中TLP未被使用的比特位,例如,TLP Header的T8/T9,“预留比特”也可以称为“保留比特位”、“预留比特位”等。
可以理解的,在后续演进版本中,本申请实施例中涉及的“预留值”也可以指对应演进版本中TLP未被使用的比特位,本申请实施例不作限制。
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,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可以是单个,也可以是多个。
以及,除非有特别说明,在本申请的描述中,“第一”、“第二”等序数词是用于对多个对象进行区分,不能理解为指示或暗示多个对象的相对重要性,也不能理解为指示或暗示顺序、优先级等。
下面将结合附图,对本申请实施例进行详细描述。
图5为本申请提供一种基于PCIe的数据传输方法的流程图,该方法可以应用于PCIe系统,例如图1所示的PCIe系统,或者图2所示的PCIe系统。如图5所示,该方法包括:
步骤501,第一节点获得第一事务层数据包TLP,其中,第一TLP包括TLP头、TLP扩展头和数据,TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息。数据可以携带在TLP的Data Payload部分。
其中,第一节点可以为PCIe系统中的端节点,也可以为PCIe系统中的交换节点。
本申请实施例中,第一节点可以是端节点也可以是芯片,例如第一节点可以是端节点中收发单元(TX/RX)。以摄像机(Camera)为例,Camera的结构可以如图6所示,包括镜头(lens)、感光元件(complementary metal oxide semiconductor,COMS)以及收发单元(TX/RX)等,其中,COMS用于通过镜头采集图像数据,并通过收发单元中的TX发送出去。第一节点可以是Camera,也可以是Camera中收发单元。若第一节点是端节点,第一节点进行封装的数据可以是自身采集的数据,例如,第一节点是Camera,进行封装的数据可以是Camera采集的图像数据等,第一节点是麦克风,进行封装的数据可以是麦克风采集的音频数据等。若第一节点是端节点中的收发单元,第一节点进行封装的数据可以是端节点中传感芯片采集的数据,以图6为例,第一节点进行封装的数据可以是COMS采集的图像数据。
在步骤501中,数据类型可以包括但不限于以下几种:图像、音频、控制类信息、写数据流(stream write,SWRITE)、安全等。第一TLP中的数据类型可以是上述任一种数据类型或任多种数据类型的组合。
在一个示例中,以数据类型为图像为例,数据类型对应的属性信息可以但不限于包括如下4种:
图像数据类型:RAW、RGB、YUV、嵌入式数据(embedded data)等;
像素比特量化深度:如12、20、24等;
分辨率:如1080P、2K、4K等;
分段指示信息:图像传感器(sensor)一次输出一行图像,对于分辨率高的图像TLP无法一次传输一行图像,需将一行图像分成若干个TLP传输。分段指示信息用于指示当前TLP是当前行的第几段。
在另一个示例中,以数据类型为音频为例,数据类型对应的属性信息可以包括但不限于如下四种:
采样量化格式:如浮点量化,整数量化等;
采样频率:如24KHz,48KHz等;
量化深度:如每个采样8bit,12bit等;
声道数/通道数:用于指示当前数据包数据包含几个声道/通道。
在又一个示例中,以数据类型为控制类信息为例,数据类型对应的属性信息可以包括但不限于如下两种:
控制类信息类型:如集成电路总线(inter-integrated circuit,I2C)、通用输入/输出(general-purpose input/output,GPIO)、串行外设接口(serial peripheral interface,SPI)等;
每类控制信息数量:例如当前数据包包含3路I2C,8路GPIO。
在又一个示例中,以数据类型为安全为例,数据类型对应的属性信息可以包括但不限 于如下三种:
消息类型:建立安全需要多条消息交互,每条交互消息的类型不同,如鉴权消息、加密消息等;
格式指示:消息中的bit如何分组,每个组表示什么意思;
是否加密:当前数据包是否加密。
在又一个示例中,以数据类型为SWRITE为例,数据类型对应的属性信息可以包括但不限于如下一种:
对齐方式:以4字节为最小单位对齐,还是8字节为最小单位对齐。
上述数据类型仅是一种示例性说明,在具体实施中并不限于本申请实施例列举的数据类型。上述各个数据类型对应的属性信息仅是一种示例性说明,在具体实施中,上述各数据类型也可以对应其他的属性信息,这里不做具体限定。
可以理解的是,本申请实施例中,“数据类型”仅是一种示例性命名,在具体实施中也可以命名为其它名称,例如可以称为数据业务类型。“属性信息”仅是一种示例性命名,在具体实施中也可以命名为其它名称,例如可以称为属性。
一种可实现上述步骤501的方式中,第一节点可以先获取数据的数据类型以及数据类型对应的属性信息,然后根据数据的数据类型以及数据类型对应的属性信息,对数据进行封装得到第一TLP。
以第一节点为图6中的Camera为例,第一节点可以确定所采集图像数据的图像数据类型(如RGB、YUV等)、像素量化深度、图像分辨率等,并根据图像数据类型、像素量化深度、图像分辨率等可以计算出图像每一行数据量,结合每个第一TLP最大的数据承载量可得出传输图像每一行所需要第一TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。
以第一节点为图6中的Camera中的收发单元(TX/RX)为例,第一节点可以接收COMS采集的图像数据,该图像数据显示携带图像数据类型、像素量化深度、图像分辨率等属性信息,第一节点可以根据该图像数据携带的图像数据类型、像素量化深度、分辨率等计算出图像每一行数据量,结合PCIe每个第一TLP最大的数据承载量可得出传输图像每一行所需要第一TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。
在一种可能的实现方式中,Type字段和/或Fmt字段的值为预留值。其中,Type字段和Fmt字段可以指示第一TLP中的不同的信息,也可以联合编码指示第一TLP中的同一信息。
以Type字段和Fmt字段分别指示第一TLP中的不同的信息为例,例如,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,对Type字段和Fmt字段的取值进行说明。
作为一个示例,Type字段的值为预留值,Fmt字段的值为所有状态值,即可以使用Type字段的预留值指示数据类型,使用Fmt字段的所有状态值指示第一属性信息,例如,使用Type字段的00011、00110、00111、01000、01001、01111、11000~11010、11100~11111等13个预留值指示数据类型,使用Fmt字段的000~111总共8个状态值,来指示第一属性信息。
作为另一个示例,Type字段的值为所有状态值,Fmt字段的值为预留值,即可以使用 Type字段所有状态值指示数据类型,使用Fmt字段的预留值指示第一属性信息,例如,使用Type字段的00000~11111共32个状态值指示数据类型,使用Fmt字段的101,110,111等3个预留值,来指示第一属性信息。
作为又一个示例,Type字段的值为预留值,Fmt字段的值为预留值,即可以使用Type字段的预留值指示数据类型,使用Fmt字段的预留值指示第一属性信息,例如,使用Type字段的00011、00110、00111、01000、01001、01111、11000~11010、11100~11111等13个预留值指示数据类型,使用Fmt字段的101,110,111等3个预留值,来指示第一属性信息。
本申请实施例中,Type字段、Fmt字段、预留比特和TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息,有多种可能的实现方式,下面分别进行说明。
实现方式一,Type字段、Fmt字段、预留比特和TLP扩展头分别指示不同的信息。
在一些实施例中,Type字段指示数据类型,Fmt字段、预留比特和TLP扩展头分别指示数据类型的不同属性信息。以第一TLP携带的数据类型对应的属性信息包括第一属性信息、第二属性信息以及第三属性信息为例,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息,如图7所示。其中,预留比特可以为一个比特,即TLP头的第9个比特或TLP头的第13个比特,也可以为两个比特,即包括TLP头的第9个比特和第13个比特。
作为一个示例,数据类型为图像、第一属性信息为图像数据类型,第二属性信息为加密,第三属性信息为像素量化深度、图形分辨率、分段指示信息等。
在其它一些实施例中,Type字段指示数据类型,Fmt字段指示第一TLP的属性信息,预留比特和TLP扩展头分别指示数据类型的不同属性信息,以第一TLP携带的数据类型对应的属性信息包括第一属性信息和第二属性信息为例,预留比特指示数据类型的第一属性信息,TLP扩展头指示数据类型的第二属性信息,如图8所示。在一个示例中,使用Fmt字段指示第一TLP的封装模式,例如,采用Fmt字段的000、001、010、011、100这5个状态值指示第一TLP采用传统模式封装,采用Fmt字段的101、110、111这3个预留值指示第一TLP采用本申请提供的模式封装。
作为一个示例,以预留比特为TLP头的第9个比特为例,如图9所示,Fmt字段可以指示第一TLP的封装模式,例如用101表示封装模式为本申请提供的模式,即与上述PCI Express Base Specification Revision 5.0 Version 1.0公开的传统的TLP的封装模式不同;Type字段指示数据类型为图像/安全,例如00001指示业务为图像,00000表示加密建立的消息;预留比特表示图像业务是否加密,例如1表示加密,0表示未加密;TLP扩展头指示图像数据类型/安全信息类型、像素量化深度/消息格式、图像分段指示信息/预留。
实现方式二,Type字段、Fmt字段与预留比特进行联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。其中,预留比特可以为一个比特,即TLP头的第9个比特或TLP头的第13个比特,也可以为两个比特,即包括TLP头的第9个比特和第13个比特。
在一些实施例中,以预留比特为TLP头的第9个比特为例,Type字段的5个比特、Fmt字段的3个比特与预留比特的1个比特总共9个比特,可以通过对这9个比特进行联合编码(例如110000001)指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息,如图10所示。
示例性的,以数据类型为安全为例,可以在Fmt字段、Type字段、预留比特统一编码指示为安全建立消息时,TLP扩展头指示消息的类别与格式。以预留比特为TLP头的第9个比特为例,如图11所示,Type字段的5个比特、Fmt字段的3个比特与预留比特的1个比特总共9个比特可以指示数据类型为安全,此处的安全包含加密和接口鉴权。TLP扩展头可以指示安全消息类型和消息格式等。需要注意的是,本申请实施例中的TLP以4字节为最小单位,指示字段不足4字节的比特位预留。
实现方式三,预留比特包括TLP头的第9个比特或第13个比特,Type字段、Fmt字段、预留比特分为至少两组字段,至少两组字段中的每组字段、以及TLP扩展头分别指示不同的信息。
其中,至少有一组字段包括至少两个字段,这样可以有任意两个字段组合指示一种信息,不同组字段指示不同的信息。在这种情况下,可以Type字段、Fmt字段和TLP头的第9个比特分为两组字段。如果Type字段、Fmt字段和TLP头的第9个比特分为三组字段,那么Type字段、Fmt字段、TLP头的第9个比特各自分为一组,即与上述实现方式一相同,此处不再赘述。
在一些实施例中,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在该实施例中,Type字段、Fmt字段、预留比特分为至少两组字段的具体分组方式可以有多种,以预留比特包括TLP头的第9个比特为例,可能的分组方式包括:
分组方式A1,其中一组为Type字段,另一组为Fmt字段和TLP头的第9个比特。
示例性的,如图12所示,Type字段可以指示数据类型,Fmt字段和TLP头的第9个比特指示数据类型对应的第一属性信息,TLP扩展头指示数据类型的第二属性信息。当然,也可以是Fmt字段和TLP头的第9个比特指示数据类型,Type字段指示数据类型对应的第一属性信息,此处对各字段指示的具体信息不作限制。
分组方式A2,其中一组为Type字段和Fmt字段,另一组为TLP头的第9个比特。
示例性的,如图13所示,Type字段和Fmt字段可以指示数据类型,TLP头的第9个比特指示数据类型对应的第一属性信息,TLP扩展头指示数据类型的第二属性信息。当然,也可以是TLP头的第9个比特指示数据类型,Type字段和Fmt字段指示数据类型对应的第一属性信息,此处对各字段指示的具体信息不作限制。
分组方式A3,其中一组为Type字段和TLP头的第9个比特,另一组为Fmt字段。
示例性的,如图14所示,Type字段和TLP头的第9个比特可以指示数据类型,Fmt字段指示数据类型对应的第一属性信息,TLP扩展头指示数据类型的第二属性信息。当然,也可以是Fmt字段指示数据类型,Type字段和TLP头的第9个比特指示数据类型对应的第一属性信息,此处对各字段指示的具体信息不作限制。
在其它一些实施例中,至少两组字段中的第一组字段用于指示数据类型,第二组字段指示第一TLP的属性信息,TLP扩展头指示数据类型对应的属性信息。也可以是第一组字段用于指示数据类型,第二组字段指示数据类型对应的属性信息,TLP扩展头指示第一TLP的属性信息。
以上述分组方式A3为例,第一组字段为Fmt字段,指示第一TLP的属性信息,第二组字段为Type字段和TLP头的第9个比特联合编码指示数据类型,TLP扩展头指示数据 类型对应的属性信息。示例的,如图15所示,Fmt字段可以指示第一TLP的封装模式,例如用101表示封装模式为本申请提供的模式,即与上述PCI Express Base Specification Revision 5.0 Version 1.0公开的传统的TLP的封装模式不同;Type字段和TLP头的第9个比特联合编码指示数据类型为图像,例如000001指示业务为图像,TLP扩展头指示图像数据类型、像素量化深度、图像分段指示信息。
实现方式四,预留比特包括TLP头的第9个比特和第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的每组字段、以及TLP扩展头分别指示不同的信息。
在一些实施例中,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在该实施例中,Type字段、Fmt字段、TLP头的第9个比特和第13个比特分为至少两组字段的具体分组方式可以有多种,一种方式为Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特可以分为两组字段,例如分为第一组字段和第二组字段,可能的分组方式包括:
分组方式B1,第一组字段包括一个字段,第二组字段包括三个字段,总共有四种划分方式。
例如,第一组字段为Fmt字段,第二组字段为Type字段、TLP头的第9个比特和TLP头的第13个比特。又例如,第一组字段为Type字段,第二组字段为Fmt字段、TLP头的第9个比特和TLP头的第13个比特。此处不再一一列举。
分组方式B2,第一组字段包括两个字段,第二组字段包括除第一组字段之外的另外两个字段,总共有六种划分方式。
例如,第一组字段为Type字段和Fmt字段,第二组字段为TLP头的第9个比特和TLP头的第13个比特。又例如,第一组字段为Fmt字段和TLP头的第9个比特,第二组字段为Type字段和TLP头的第13个比特。此处不再一一列举。
基于上述分组方式B1和分组方式B2,在一些实施例中,第一组字段可以用于指示数据类型,第二组字段可以用于指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息。
在其它一些实施例中,第一组字段用于指示数据类型,第二组字段指示第一TLP的属性信息,TLP扩展头指示数据类型对应的属性信息。也可以是第一组字段用于指示数据类型,第二组字段指示数据类型对应的属性信息,TLP扩展头指示第一TLP的属性信息。
以上述分组方式B1为例,第一组字段为Type字段、TLP头的第9个比特和TLP头的第13个比特,联合编码指示数据类型,第二组字段为Fmt字段,指示第一TLP的属性信息,TLP扩展头指示数据类型对应的属性信息。示例的,如图16所示,Fmt字段可以指示第一TLP的封装模式,例如用101表示封装模式为本申请提供的模式,即与上述PCI Express Base Specification Revision 5.0 Version 1.0公开的传统的TLP的封装模式不同;Type字段、TLP头的第9个比特和第13个比特联合编码指示数据类型为图像,例如000001指示业务为图像,TLP扩展头指示图像数据类型、像素量化深度、图像分段指示信息。
另一种方式为Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特可以分为三组字段,例如分为第一组字段、第二组字段和第三组字段,可能的分组方式包括:
分组方式B3,第一组字段为Type字段,第二组字段为Fmt字段,第三组字段为TLP头的第9个比特和TLP头的第13个比特。
分组方式B4,第一组字段为Type字段,第二组字段为Fmt字段和TLP头的第9个比特,第三组字段为TLP头的第13个比特。
分组方式B5,第一组字段为Type字段,第二组字段为Fmt字段和TLP头的第13个比特,第三组字段为TLP头的第9个比特。
分组方式B6,第一组字段为Type字段和Fmt字段,第二组字段为TLP头的第13个比特,第三组字段为TLP头的第9个比特。
分组方式B7,第一组字段为Type字段和TLP头的第9个比特,第二组字段为Fmt字段,第三组字段为TLP头的第13个比特。
分组方式B8,第一组字段为Type字段和TLP头的第13个比特,第二组字段为Fmt字段,第三组字段为TLP头的第14个比特。
基于上述分组方式B3至分组方式B8,在一些实施例中,第一组字段可以用于指示数据类型,第二组字段可以用于指示数据类型对应的第一属性信息,第三组字段可以用于指示数据类型对应的第二属性信息,TLP扩展头指示数据类型对应的除第二组字段和第三组字段指示的属性信息之外的其它属性信息。
在其它一些实施例中,第一组字段用于指示数据类型,第二组字段指示第一TLP的属性信息,第三组字段可以用于指示数据类型对应的属性信息,TLP扩展头指示数据类型对应的除第三组字段指示的属性信息之外的其它属性信息。也可以是第一组字段用于指示数据类型,第二组字段指示数据类型对应的属性信息,第三字段指示数据类型对应的除第二组字段指示的属性信息之外的其它属性信息,TLP扩展头指示第一TLP的属性信息。
在其它一些实施例中,TLP头还可以包括第一字段,示例性的,第一字段可以是16 Byte的TLP头的Byte4-Byte15,也可以是12 Byte的TLP头的Byte4-Byte11。
一种可能的实现方式中,可以通过Type字段、Fmt字段、预留比特和TLP扩展头指示数据的数据类型和数据类型对应的至少一个属性信息,第一字段不携带数据类型对应的属性信息。Type字段、Fmt字段、预留比特和TLP扩展头指示等四个字段的具体指示方式可以参见上述实现方式一至实现方式四,此处不再赘述。
另一种可能的实现方式中,可以通过Type字段、Fmt字段、预留比特和TLP扩展头指示数据的数据类型和数据类型对应的一部分属性信息,通过第一字段指示数据类型对应的另一部分属性信息,例如,Type字段、Fmt字段、预留比特和TLP扩展头指示数据的数据类型和数据类型对应的至少一个属性信息,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。Type字段、Fmt字段、预留比特和TLP扩展头指示等四个字段的体指示方式可以参见上述实现方式一至实现方式四,此处不再赘述。
示例性的,Type字段、Fmt字段、预留比特联合编码指示数据类型,TLP扩展头指示该数据类型对应的一部分属性信息。以第一字段为16 Byte的TLP头的Byte4-Byte15为例,如图17所示,Type字段、Fmt字段、预留比特联合编码指示数据类型为图像,TLP扩展头指示图像数据类型,第一字段指示像素量化深度、分辨率、分段指示信息等。
又一种可能的实现方式中,可以通过Type字段、Fmt字段、预留比特和TLP扩展头指示数据的数据类型,通过第一字段指示数据类型对应的属性信息,即Type字段、Fmt字段、预留比特和TLP扩展头指示等四个字段不携带数据类型对应的属性信息,数据类型 对应的属性信息全部携带在第一字段中。
通过上述各种实现方式可以指示图像、音频、控制类信息、SWRITE、安全中的一种业务的一种格式。或者,也可以指示图像、音频、控制类信息、SWRITE、安全中的一种业务的多种格式。或者,也可以指示图像、音频、控制类信息、SWRITE、安全中的多种业务的多种格式。或者,还可以指示图像、音频、控制类信息、SWRITE、安全中的多种业务混合(如带安全保护的图像等等)。或是其他业务类型及格式,这里不再一一列举。
基于上述实施例,第一TLP中还可以携带目的节点的身份信息,即第三节点的标识,可以为第三节点的地址或ID,示例性的,第一字段可以携带第三节点的标识。第一TLP中还可以携带第一节点的身份信息,即第一节点的标识,可以为第一节点的地址或ID,示例性的,第一字段可以携带第一节点的标识。
其中,第三节点可以为PCIe系统中的端节点,也可以为PCIe系统中的交换节点。
步骤502,第一节点向第二节点发送第一TLP。相应的,第二节点接收来自第一节点的第一TLP。其中,第二节点可以与第一节点连接。
其中,第二节点可以为PCIe系统中的端节点,也可以为PCIe系统中的交换节点。示例的,第二节点可以是分别与第一节点和第二节点连接的交换节点。
步骤503,第二节点向第三节点发送第二TLP。相应的,第三节点接收来自第二节点的第二TLP。
在一种可能的实现方式中,第一TLP与第二TLP相同,即第二节点接收来自第一节点的第一TLP后,经该第一TLP转发给第三节点。
在另一种可能的实现方式中,第一TLP与第二TLP不相同,即第二节点接收来自第一节点的第一TLP后,对该第一TLP进行处理,例如,将该第一TLP的源节点的身份信息由第一节点的标识修改为第二节点的标识,得到第二TLP,然后将第二TLP发送给第三节点,其中,第二节点发送的第二TLP与第一节点发送的第一TLP所携带的数据、数据类型以及数据类型对应的属性信息相同。应理解,第二TLP携带的数据、数据类型以及数据类型对应的属性信息等相关内容可参见上述针对第一TLP的相关描述,此处不再赘述。
在一些实施例中,第一TLP还包括第三节点的标识,在步骤503之前,第二节点还可以根据第三节点的标识和路由信息,确定路由路径;然后,根据路由路径,向第三节点发送第二TLP。
步骤504,第三节点根据数据的数据类型和数据类型对应的至少一个属性信息,获得数据。
具体的,第三节点对第二TLP进行解析得到数据。
作为一种可能的实现方式,第三节点可以从接收到的第二TLP中获取数据的数据类型和数据类型对应的至少一个属性信息,根据数据的数据类型和数据类型对应的至少一个属性信息确定第二TLP中携带的数据载荷的封装格式,然后对第二TLP中的数据载荷进行解封装得到数据。
作为一种示例,第三节点可以根据TLP头中的Fmt字段、Type字段和预留比特,以及TLP扩展头确定数据的数据类型以及数据类型对应的属性信息。
作为另一种示例,第三节点可以根据TLP头中的Fmt字段、Type字段和预留比特,以及TLP扩展头确定数据的数据类型以及数据类型对应的一部分属性信息,根据TLP头中的第一字段确定数据类型对应的另一部分属性信息。
作为又一种示例,第三节点可以根据TLP头中的Fmt字段、Type字段和预留比特,以及TLP扩展头确定数据的数据类型,根据TLP头中的第一字段确定数据类型对应的属性信息。
下面结合具体示例,对PCIe系统中的数据传输过程进行介绍。
图18为本申请实施例提供的另一PCIe系统的架构示意图。如图18所示,PCIe系统包括根节点,与根节点(Root)连接的交换节点(Switch)1,与Switch1连接的Switch2、摄像机(Camera)1、Camera 2、以及与Switch2连接的显示器(Display)。其中,Camera1和Camera 2拍摄的内容要显示到Display上。Camera1/Camera2可以通过Switch1和Switch2将数据传输给Display,而不需要经过Root。其中,Camera1/Camera2可以通过执行上述第一节点执行的方法将数据传输给Switch1,Switch1可以通过执行上述第二节点执行的方法将数据传输给Switch2,Display可以通过执行上述第三节点执行的数据传输方法获取数据。
下面以Camera1向Display传输数据为例进行说明,具体传输数据的过程如下:
过程S1,Camera1根据输出的图像类型(如RGB、YUV等),每像素量化bit数,图像分辨率(如2K、4K等),可计算出图像每一行数据量,结合PCIe每个第一TLP最大的数据承载量确定传输图像每一行数据量所需要第一TLP的数量,进而决定图像的分段方式。
过程S2,Camera1将采集的图像数据封装成第一TLP。第一TLP采用的封装方式可以有多种,包括但不限于以下几种:
封装方式一,Camera1可以使用TLP头中的Type字段指示数据类型为图像,使用Fmt字段指示图像数据类型,预留比特(包括TLP头中的第9个比特和/或第13个比特)指示是否加密,TLP扩展头指示像素量化深度、图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式二,Camera1可以使用TLP头中的Type字段指示数据类型为图像,使用Fmt字段指示第一TLP的封装模式,预留比特(包括TLP头中的第9个比特和/或第13个比特)指示是否加密,TLP扩展头指示图像数据类型、像素量化深度、图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte8~Byte 15。
封装方式三,Camera1可以使用Type字段、Fmt字段与预留比特进行联合编码得到的9个比特(预留比特包括TLP头中的第9个比特或第13个比特)或10个比特(预留比特包括TLP头中的第9个比特和第13个比特)的状态值指示数据类型为图像,使用TLP扩展头指示图像数据类型、像素量化深度、图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式四,Camera1可以使用Type字段、Fmt字段与一个预留比特(该一个预留比特为TLP头中的第9个比特或第13个比特)中的任两个字段进行联合编码得到的状态值指示数据类型为图像,剩余的一个字段指示图像数据类型,使用TLP扩展头指示像素量化深度、图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display 的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式五,Camera1可以使用Type字段、Fmt字段、TLP头中的第9个比特、以及TLP头中的第13个比特共四个字段分为两组字段,使用其中一组字段用于指示数据类型为图像,使用另一组字段用于指示图像数据类型,使用TLP扩展头指示像素量化深度、图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式六,Camera1可以使用Type字段、Fmt字段、TLP头中的第9个比特、以及TLP头中的第13个比特共四个字段分为三组字段,使用其中第一组字段指示数据类型为图像,使用第二组字段指示图像数据类型,使用第三组字段指示像素量化深度,使用TLP扩展头指示图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式七,Camera1可以使用TLP头中的Type字段指示数据类型为图像,使用Fmt字段指示图像数据类型,预留比特(包括TLP头中的第9个比特和/或第13个比特)指示是否加密,TLP扩展头指示像素量化深度,使用TLP头的Byte 4~Byte 15指示图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式八,Camera1可以使用Type字段、Fmt字段与预留比特进行联合编码得到的9个比特(预留比特包括TLP头中的第9个比特或第13个比特)或10个比特(预留比特包括TLP头中的第9个比特和第13个比特)的状态值指示数据类型为图像,使用TLP扩展头指示图像数据类型,使用TLP头的Byte 4~Byte 15指示像素量化深度、图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式九,Camera1可以使用Type字段、Fmt字段与一个预留比特(该一个预留比特为TLP头中的第9个比特或第13个比特)中的任两个字段进行联合编码得到的状态值指示数据类型为图像,剩余的一个字段指示图像数据类型,使用TLP扩展头指示像素量化深度,使用TLP头的Byte 4~Byte 15指示图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式十,Camera1可以使用Type字段、Fmt字段、TLP头中的第9个比特、以及TLP头中的第13个比特共四个字段分为两组字段,使用其中一组字段用于指示数据类型为图像,使用另一组字段用于指示图像数据类型,使用TLP扩展头指示像素量化深度,使用TLP头的Byte 4~Byte 15指示图形分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式十一,Camera1可以使用Type字段、Fmt字段、TLP头中的第9个比特、以及TLP头中的第13个比特共四个字段分为三组字段,使用第一组字段指示数据类型为图 像,使用第二组字段指示图像数据类型,使用第三组字段指示像素量化深度,使用TLP扩展头指示图形分辨率,使用TLP头的Byte 4~Byte 15指示分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte 8~Byte 15。
封装方式十二,Camera1可以使用Type字段、Fmt字段、预留比特(包括TLP头中的第9个比特和/或第13个比特)、TLP扩展头联合编码得到的状态值指示数据类型为图像,使用TLP头的Byte 4~Byte 15指示图像数据类型、像素量化深度、分辨率、分段指示信息等,Camera1将数据填充到第一TLP的数据载荷中,Camera1把表示自己的身份信息(如Camera1的地址/ID)和Display的身份信息(如Display的地址/ID)填充到TLP头的Byte8~Byte 15。
过程S3,Camera1将第一TLP发送给Switch1。
过程S4,Switch1收到第一TLP后,从第一TLP的TLP头中解析Fmt字段,如果Fmt字段的状态值为是PCI Express Base Specification Revision 5.0 Version 1.0中使用的状态值,则按照原PCIe机制处理,即将第一TLP转发给Root,然后由Root根据各个端节点的功能确定接收端节点,然后将第一TLP发送给接收端节点。如果Fmt字段为本申请实施例定义的内容,则Switch1根据第一TLP中的Display的身份信息查找自身存储的路由信息,然后按照本申请实施例提供的封装方式将数据封装成第二TLP,按照找到的路由路径把第二TLP发送给Switch2。
过程S5,Switch2收到第一TLP或第二TLP后,从TLP头中解析Fmt字段,如果Fmt字段的状态值为是PCI Express Base Specification Revision 5.0 Version 1.0中使用的状态值,则按照原PCIe机制处理,即将第一TLP发送给Root,然后由Root根据各个端节点的功能确定接收端节点,然后将第一TLP发送给接收端节点。如果Fmt字段为本申请实施例定义的内容,则Switch2根据第二TLP中的Display的身份信息查找自身存储的路由信息,按照找到的路由路径将第二TLP发送给Display。
过程S6,Display收到第一TLP或第二TLP后,从TLP头和TLP扩展头获取图像的类型和格式,并根据分段指示信息恢复一幅完整的图像,将数据传到显示屏上显示。
此处,Display从TLP头和TLP扩展头获取图像的类型和格式的具体实现方式,与收到的第一TLP或第二TLP的封装方式有关,为便于理解,仅示例性的列举几个示例:
作为一个示例,以第一TLP采用过程S2中的封装方式一对数据进行封装为例,Display从Type字段解析出数据类型为图像,分别从Fmt字段、预留比特(包括TLP头中的第9个比特和/或第13个比特)、TLP扩展头中分别解析出图像数据类型、是否加密、指示像素量化深度、图形分辨率、分段指示信息等。
作为另一个示例,以第一TLP采用过程S2中的封装方式三对数据进行封装为例,Display从Type字段、Fmt字段与预留比特共9个比特(预留比特包括TLP头中的第9个比特或第13个比特)或10个比特(预留比特包括TLP头中的第9个比特和第13个比特)的状态值解析出数据类型为图像,从TLP扩展头解析出图像数据类型、像素量化深度、图形分辨率、分段指示信息等。
作为又一个示例,以第一TLP采用过程S2中的封装方式七对数据进行封装为例,Display从Type字段解析出数据类型为图像,从Fmt字段解析出图像数据类型,从预留比特(包括TLP头中的第9个比特和/或第13个比特)解析出指示是否加密,从TLP扩展头 解析出像素量化深度,从TLP头的Byte 4~Byte 15解析出图形分辨率、分段指示信息等。
作为又一个示例,以第一TLP采用过程S2中的封装方式八对数据进行封装为例,Display从Type字段、Fmt字段与预留比特进行联合编码得到的9个比特(预留比特包括TLP头中的第9个比特或第13个比特)或10个比特(预留比特包括TLP头中的第9个比特和第13个比特)的状态值解析出数据类型为图像,从TLP扩展头解析出图像数据类型,从TLP头的Byte 4~Byte 15解析出像素量化深度、图形分辨率、分段指示信息等。
作为又一个示例,以第一TLP采用过程S2中的封装方式十二对数据进行封装为例,Display从Type字段、Fmt字段、预留比特(包括TLP头中的第9个比特和/或第13个比特)、TLP扩展头联合编码得到的状态值解析出数据类型为图像,从TLP头的Byte 4~Byte15解析出图像数据类型、像素量化深度、分辨率、分段指示信息等。
本申请实施例中,通过TLP头中的Type字段、Fmt字段、预留比特和TLP扩展头指示与另一端节点之间通信所需要的信息,如数据的数据类型和数据类型对应的至少一个属性信息,这样可以使PCIe系统中的任两个端节点之间不通过Root也能实现通信,从而可以降低车内网的复杂度。
通过上述示例,通过使用Fmt字段和/或Type字段的预留值,可以显示或隐式的指示TLP的封装模式,使得PCIe系统可以兼容PCIe系统中传统的数据传输方法以及本申请实施例提供的数据传输方法。
上述实施例主要从第一节点、第二节点和第三节点之间交互的角度对本申请实施例提供的方案进行了介绍。可以理解的是,为了实现上述功能,第一节点、第二节点和第三节点可以包括执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请的实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。
本申请实施例可以根据上述方法示例对第一节点、第二节点和第三节点进行功能单元的划分,例如,可以对应各个功能划分各个功能单元,也可以将两个或两个以上的功能集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
在采用集成的单元的情况下,图19示出了本申请实施例中所涉及的一种基于PCIe的数据传输装置的结构示意图。如图19所示,装置1900可以包括:处理单元1901和通信单元1902。处理单元1901用于对装置1900的动作进行控制管理。通信单元1902用于支持装置1900与其他设备的通信。可选地,通信单元1902也可称为收发单元,可以包括接收单元和/或发送单元,分别用于执行接收和发送操作。装置1900还可以包括存储单元1903,用于存储装置1900的程序代码和/或数据。
该装置1900可以为上述任一实施例中的第一节点(或设置在第一节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分),第一节点可以通过PCIe总线与第二节点连接。其中,处理单元1901可以支持装置1900执行上文中各方法示例中第一节点的动作; 或者,处理单元1901主要执行方法示例中的第一节点的内部动作,通信单元1902可以支持装置1900与第二节点之间的通信。
在一个实施例中,处理单元1901,用于获得事务层数据包TLP;其中,TLP包括TLP头、TLP扩展头和数据,TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息;通信单元1902,用于向第二节点发送TLP。
在一种可能的设计中,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息。
在一种可能的设计中,Type字段、Fmt字段和预留比特联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在一种可能的设计中,Type字段和/或Fmt字段的值为预留值。
在一种可能的设计中,TLP头还包括第一字段,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。
在一种可能的设计中,第一字段为TLP头的字节4~字节15或字节4~字节11。
在一种可能的设计中,第一字段还包括第三节点的标识。
在一种可能的设计中,数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
该装置1900可以为上述任一实施例中的第二节点(或设置在第二节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,处理单元1901可以支持装置1900执行上文中各方法示例中第二节点的动作;或者,处理单元1901主要执行方法示例中的第二节点的内部动作,通信单元1902可以支持装置1900与其它节点(比如第一节点、第三节点、其它第二节点)之间的通信。
在一个实施例中,通信单元1902可以包括第一通信单元和第二通信单元,其中:
第一通信单元,用于接收来自第一节点的第一事务层数据包TLP;第二通信单元,用于向第三节点发送第二TLP;其中,TLP中的TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP中的TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息,TLP包括第一TLP和/或第二TLP。
在一种可能的设计中,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息。
在一种可能的设计中,Type字段、Fmt字段和预留比特联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特,Type字 段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在一种可能的设计中,Type字段和/或Fmt字段的值为预留值。
在一种可能的设计中,TLP头还包括第一字段,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。
在一种可能的设计中,第一字段为TLP头的字节4~字节15或字节4~字节11。
在一种可能的设计中,第一字段还包括第三节点的标识;处理单元1901,用于:根据第三节点的标识和路由信息,确定路由路径;第二通信单元,用于根据路由路径,向第三节点发送第二TLP。
在一种可能的设计中,数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
该装置1900可以为上述任一实施例中的第三节点(或设置在第三节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分),第三节点可以通过PCIe总线与第二节点连接。其中,处理单元1901可以支持装置1900执行上文中各方法示例中第三节点的动作;或者,处理单元1901主要执行方法示例中的第三节点的内部动作,通信单元1902可以支持装置1900与第二节点之间的通信。
在一个实施例中,通信单元1902,用于接收来自第二节点的事务层数据包TLP;其中,TLP包括TLP头、TLP扩展头和数据,TLP头包括Type字段、Fmt字段和预留比特,Type字段、Fmt字段、预留比特和TLP扩展头用于指示数据的数据类型和数据类型对应的至少一个属性信息;处理单元1901,用于根据数据的数据类型和数据类型对应的至少一个属性信息,获得数据。
在一种可能的设计中,Type字段指示数据类型,Fmt字段指示数据类型的第一属性信息,预留比特指示数据类型的第二属性信息,TLP扩展头指示数据类型的第三属性信息。
在一种可能的设计中,Type字段、Fmt字段和预留比特联合编码用于指示数据类型,TLP扩展头用于指示数据类型对应的至少一个属性信息。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特。
在一种可能的设计中,预留比特包括TLP头的第9个比特和/或第13个比特,Type字段、Fmt字段、TLP头的第9个比特和TLP头的第13个比特分为至少两组字段,至少两组字段中的第一组字段用于指示数据类型,至少两组字段中的除第一组字段之外的其它组字段中的每组字段分别指示数据类型对应的不同的属性信息,TLP扩展头指示数据类型对应的除至少两组字段指示的属性信息之外的其它属性信息。
在一种可能的设计中,Type字段和/或Fmt字段的值为预留值。
在一种可能的设计中,TLP头还包括第一字段,第一字段指示数据类型对应的除至少一个属性信息之外的其它属性信息。
在一种可能的设计中,第一字段为TLP头的字节4~字节15或字节4~字节11。
在一种可能的设计中,第一字段还包括第三节点的标识。
在一种可能的设计中,数据类型包括图像、音频、控制类信息、写数据流SWRITE、 安全中的任一项或多项。
应理解以上装置中单元的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且装置中的单元可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分单元以软件通过处理元件调用的形式实现,部分单元以硬件的形式实现。例如,各个单元可以为单独设立的处理元件,也可以集成在装置的某一个芯片中实现,此外,也可以以程序的形式存储于存储器中,由装置的某一个处理元件调用并执行该单元的功能。此外这些单元全部或部分可以集成在一起,也可以独立实现。这里的处理元件又可以成为处理器,可以是一种具有信号的处理能力的集成电路。在实现过程中,上述方法的各步骤或以上各个单元可以通过处理器元件中的硬件的集成逻辑电路实现或者以软件通过处理元件调用的形式实现。
在一个例子中,以上任一装置中的单元可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(application specific integrated circuit,ASIC),或,一个或多个微处理器(digital singnal processor,DSP),或,一个或者多个现场可编程门阵列(field Programmable gate Array,FPGA),或这些集成电路形式中至少两种的组合。再如,当装置中的单元可以通过处理元件调度程序的形式实现时,该处理元件可以是处理器,比如通用CPU,或其它可以调用程序的处理器。再如,这些单元可以集成在一起,以片上系统(system-on-a-chip,SOC)的形式实现。
以上用于接收的单元是一种该装置的接口电路,用于从其它装置接收信号。例如,当该装置以芯片的方式实现时,该接收单元是该芯片用于从其它芯片或装置接收信号的接口电路。以上用于发送的单元是一种该装置的接口电路,用于向其它装置发送信号。例如,当该装置以芯片的方式实现时,该发送单元是该芯片用于向其它芯片或装置发送信号的接口电路。
图20为本申请实施例提供的另一种基于PCIe的数据传输装置的结构示意图,该装置2000可以是上述实施例中的第一节点、第二节点或者第三节点。该装置2000包括:处理器2002、还可以包括通信接口2003,还可以包括存储器2001或者与存储器2001存在耦合关系。可选的,装置2000还可以包括通信线路2004。其中,通信接口2003、处理器2002以及存储器2001可以通过通信线路2004相互连接,通信线路2004可以是PCIe总线。通信线路2004可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
处理器2002可以是一个CPU,微处理器,ASIC,或一个或多个用于控制本申请方案程序执行的集成电路。处理器2002的功能可以和图19中所描述的处理单元的功能相同。
通信接口2003,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(radio access network,RAN),无线局域网(wireless local area networks,WLAN),有线接入网等。通信接口2003的功能可以和图19中所描述的通信单元的功能相同。
存储器2001可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其它类型的静态存储设备,RAM或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(electrically erasable programmable read-only memory, EEPROM)、只读光盘(compact disc read-only memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过通信线路2004与处理器相连接。存储器也可以和处理器集成在一起。存储器2001可以和图8中所描述的存储单元的功能相同。
其中,存储器2001用于存储执行本申请方案的计算机执行指令,并由处理器2002来控制执行。处理器2002用于执行存储器2001中存储的计算机执行指令,从而实现本申请上述实施例提供的方法。
可选的,本申请实施例中的计算机执行指令也可以称之为应用程序代码,本申请实施例对此不作具体限定。
本申请实施例还提供了一种计算机可读存储介质,用于存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (61)

  1. 一种基于外围组件互连传递PCIe的数据传输方法,其特征在于,所述方法包括:
    第一节点获得事务层数据包TLP;其中,所述TLP包括TLP头、TLP扩展头和数据,所述TLP头包括Type字段、Fmt字段和预留比特,所述Type字段、所述Fmt字段、所述预留比特和所述TLP扩展头用于指示所述数据的数据类型和所述数据类型对应的至少一个属性信息;
    所述第一节点向第二节点发送所述TLP。
  2. 如权利要求1所述的方法,其特征在于,所述Type字段指示所述数据类型,所述Fmt字段指示所述数据类型的第一属性信息,所述预留比特指示所述数据类型的第二属性信息,所述TLP扩展头指示所述数据类型的第三属性信息。
  3. 如权利要求1所述的方法,其特征在于,所述Type字段、所述Fmt字段和所述预留比特联合编码用于指示所述数据类型,所述TLP扩展头用于指示所述数据类型对应的至少一个属性信息。
  4. 如权利要求1-3任一项所述的方法,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特。
  5. 如权利要求1所述的方法,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特,所述Type字段、所述Fmt字段、所述TLP头的第9个比特和所述TLP头的第13个比特分为至少两组字段,所述至少两组字段中的第一组字段用于指示所述数据类型,所述至少两组字段中的除所述第一组字段之外的其它组字段中的每组字段分别指示所述数据类型对应的不同的属性信息,所述TLP扩展头指示所述数据类型对应的除所述至少两组字段指示的属性信息之外的其它属性信息。
  6. 如权利要求1-5任一项所述的方法,其特征在于,所述Type字段和/或所述Fmt字段的值为预留值。
  7. 如权利要求1-6任一项所述的方法,其特征在于,所述TLP头还包括第一字段,所述第一字段指示所述数据类型对应的除所述至少一个属性信息之外的其它属性信息。
  8. 如权利要求7所述方法,其特征在于,所述第一字段为所述TLP头的字节4~字节15或字节4~字节11。
  9. 如权利要求7或8所述的方法,其特征在于,所述第一字段还包括所述第三节点的标识。
  10. 如权利要求1-9任一项所述的方法,其特征在于,所述数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
  11. 一种基于外围组件互连传递PCIe的数据传输方法,其特征在于,所述方法包括:
    第二节点接收来自第一节点的第一事务层数据包TLP;
    所述第二节点向第三节点发送第二TLP;
    其中,TLP中的TLP头包括Type字段、Fmt字段和预留比特,所述Type字段、所述Fmt字段、所述预留比特和所述TLP中的TLP扩展头用于指示所述数据的数据类型和所述数据类型对应的至少一个属性信息,所述TLP包括所述第一TLP和/或所述第二TLP。
  12. 如权利要求11所述的方法,其特征在于,所述Type字段指示所述数据类型,所述Fmt字段指示所述数据类型的第一属性信息,所述预留比特指示所述数据类型的第二属 性信息,所述TLP扩展头指示所述数据类型的第三属性信息。
  13. 如权利要求11所述的方法,其特征在于,所述Type字段、所述Fmt字段和预留比特联合编码用于指示所述数据类型,所述TLP扩展头用于指示所述数据类型对应的至少一个属性信息。
  14. 如权利要求11-13任一项所述的方法,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特。
  15. 如权利要求11所述的方法,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特,所述Type字段、所述Fmt字段、所述TLP头的第9个比特和所述TLP头的第13个比特分为至少两组字段,所述至少两组字段中的第一组字段用于指示所述数据类型,所述至少两组字段中的除所述第一组字段之外的其它组字段中的每组字段分别指示所述数据类型对应的不同的属性信息,所述TLP扩展头指示所述数据类型对应的除所述至少两组字段指示的属性信息之外的其它属性信息。
  16. 如权利要求11-15任一项所述的方法,其特征在于,所述Type字段和/或所述Fmt字段的值为预留值。
  17. 如权利要求11-16任一项所述的方法,其特征在于,所述TLP头还包括第一字段,所述第一字段指示所述数据类型对应的除所述至少一个属性信息之外的其它属性信息。
  18. 如权利要求17所述方法,其特征在于,所述第一字段为所述TLP头的字节4~字节15或字节4~字节11。
  19. 如权利要求17或18所述的方法,其特征在于,所述第一字段还包括所述第三节点的标识;
    所述第二节点向所述第三节点发送所述第二TLP之前,还包括:
    所述第二节点根据所述第三节点的标识和路由信息,确定路由路径;
    所述第二节点根据所述路由路径,向所述第三节点发送所述第二TLP。
  20. 如权利要求11-19任一项所述的方法,其特征在于,所述数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
  21. 一种基于外围组件互连传递PCIe的数据传输方法,其特征在于,所述方法包括:
    第三节点接收来自第二节点的事务层数据包TLP;其中,所述TLP包括TLP头、TLP扩展头和数据,所述TLP头包括Type字段、Fmt字段和预留比特,所述Type字段、所述Fmt字段、所述预留比特和所述TLP扩展头用于指示所述数据的数据类型和所述数据类型对应的至少一个属性信息;
    所述第三节点根据所述数据的数据类型和所述数据类型对应的至少一个属性信息,获得所述数据。
  22. 如权利要求21所述的方法,其特征在于,所述Type字段指示所述数据类型,所述Fmt字段指示所述数据类型的第一属性信息,所述预留比特指示所述数据类型的第二属性信息,所述TLP扩展头指示所述数据类型的第三属性信息。
  23. 如权利要求21所述的方法,其特征在于,所述Type字段、所述Fmt字段和所述预留比特联合编码用于指示所述数据类型,所述TLP扩展头用于指示所述数据类型对应的至少一个属性信息。
  24. 如权利要求21-23所述的方法,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特。
  25. 如权利要求21所述的方法,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特,所述Type字段、所述Fmt字段、所述TLP头的第9个比特和所述TLP头的第13个比特分为至少两组字段,所述至少两组字段中的第一组字段用于指示所述数据类型,所述至少两组字段中的除所述第一组字段之外的其它组字段中的每组字段分别指示所述数据类型对应的不同的属性信息,所述TLP扩展头指示所述数据类型对应的除所述至少两组字段指示的属性信息之外的其它属性信息。
  26. 如权利要求21-25任一项所述的方法,其特征在于,所述Type字段和/或所述Fmt字段的值为预留值。
  27. 如权利要求21-26任一项所述的方法,其特征在于,所述TLP头还包括第一字段,所述第一字段指示所述数据类型对应的除所述至少一个属性信息之外的其它属性信息。
  28. 如权利要求27所述方法,其特征在于,所述第一字段为所述TLP头的字节4~字节15或字节4~字节11。
  29. 如权利要求27或28所述的方法,其特征在于,所述第一字段还包括所述第三节点的标识。
  30. 如权利要求21-29任一项所述的方法,其特征在于,所述数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
  31. 一种基于外围组件互连传递PCIe的数据传输装置,其特征在于,包括:
    处理单元,用于获得事务层数据包TLP;其中,所述TLP包括TLP头、TLP扩展头和数据,所述TLP头包括Type字段、Fmt字段和预留比特,所述Type字段、所述Fmt字段、所述预留比特和所述TLP扩展头用于指示所述数据的数据类型和所述数据类型对应的至少一个属性信息;
    通信单元,用于向第二节点发送所述TLP。
  32. 如权利要求31所述的装置,其特征在于,所述Type字段指示所述数据类型,所述Fmt字段指示所述数据类型的第一属性信息,所述预留比特指示所述数据类型的第二属性信息,所述TLP扩展头指示所述数据类型的第三属性信息。
  33. 如权利要求31所述的装置,其特征在于,所述Type字段、所述Fmt字段和所述预留比特联合编码用于指示所述数据类型,所述TLP扩展头用于指示所述数据类型对应的至少一个属性信息。
  34. 如权利要求31-33任一项所述的装置,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特。
  35. 如权利要求31所述的装置,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特,所述Type字段、所述Fmt字段、所述TLP头的第9个比特和所述TLP头的第13个比特分为至少两组字段,所述至少两组字段中的第一组字段用于指示所述数据类型,所述至少两组字段中的除所述第一组字段之外的其它组字段中的每组字段分别指示所述数据类型对应的不同的属性信息,所述TLP扩展头指示所述数据类型对应的除所述至少两组字段指示的属性信息之外的其它属性信息。
  36. 如权利要求31-35任一项所述的装置,其特征在于,所述Type字段和/或所述Fmt字段的值为预留值。
  37. 如权利要求31-36任一项所述的装置,其特征在于,所述TLP头还包括第一字段,所述第一字段指示所述数据类型对应的除所述至少一个属性信息之外的其它属性信息。
  38. 如权利要求37所述装置,其特征在于,所述第一字段为所述TLP头的字节4~字节15或字节4~字节11。
  39. 如权利要求37或38所述的装置,其特征在于,所述第一字段还包括所述第三节点的标识。
  40. 如权利要求31-39任一项所述的装置,其特征在于,所述数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
  41. 一种基于外围组件互连传递PCIe的数据传输装置,其特征在于,包括:
    第一通信单元,用于接收来自第一节点的第一事务层数据包TLP;
    第二通信单元,用于向第三节点发送第二TLP;
    其中,TLP中的TLP头包括Type字段、Fmt字段和预留比特,所述Type字段、所述Fmt字段、所述预留比特和所述TLP中的TLP扩展头用于指示所述数据的数据类型和所述数据类型对应的至少一个属性信息,所述TLP包括所述第一TLP和/或所述第二TLP。
  42. 如权利要求41所述的装置,其特征在于,所述Type字段指示所述数据类型,所述Fmt字段指示所述数据类型的第一属性信息,所述预留比特指示所述数据类型的第二属性信息,所述TLP扩展头指示所述数据类型的第三属性信息。
  43. 如权利要求41所述的装置,其特征在于,所述Type字段、所述Fmt字段和预留比特联合编码用于指示所述数据类型,所述TLP扩展头用于指示所述数据类型对应的至少一个属性信息。
  44. 如权利要求41-43任一项所述的装置,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特。
  45. 如权利要求41所述的装置,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特,所述Type字段、所述Fmt字段、所述TLP头的第9个比特和所述TLP头的第13个比特分为至少两组字段,所述至少两组字段中的第一组字段用于指示所述数据类型,所述至少两组字段中的除所述第一组字段之外的其它组字段中的每组字段分别指示所述数据类型对应的不同的属性信息,所述TLP扩展头指示所述数据类型对应的除所述至少两组字段指示的属性信息之外的其它属性信息。
  46. 如权利要求41-45任一项所述的装置,其特征在于,所述Type字段和/或所述Fmt字段的值为预留值。
  47. 如权利要求41-46任一项所述的装置,其特征在于,所述TLP头还包括第一字段,所述第一字段指示所述数据类型对应的除所述至少一个属性信息之外的其它属性信息。
  48. 如权利要求47所述装置,其特征在于,所述第一字段为所述TLP头的字节4~字节15或字节4~字节11。
  49. 如权利要求47或48所述的装置,其特征在于,所述第一字段还包括所述第三节点的标识;所述装置还包括处理单元;
    所述处理单元,用于:
    根据所述第三节点的标识和路由信息,确定路由路径;
    所述第二通信单元,用于根据所述路由路径,向所述第三节点发送所述第二TLP。
  50. 如权利要求41-49任一项所述的装置,其特征在于,所述数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
  51. 一种基于外围组件互连传递PCIe的数据传输装置,其特征在于,包括:
    通信单元,用于接收来自第二节点的事务层数据包TLP;其中,所述TLP包括TLP头、TLP扩展头和数据,所述TLP头包括Type字段、Fmt字段和预留比特,所述Type字段、所述Fmt字段、所述预留比特和所述TLP扩展头用于指示所述数据的数据类型和所述数据类型对应的至少一个属性信息;
    处理单元,用于根据所述数据的数据类型和所述数据类型对应的至少一个属性信息,获得所述数据。
  52. 如权利要求51所述的装置,其特征在于,所述Type字段指示所述数据类型,所述Fmt字段指示所述数据类型的第一属性信息,所述预留比特指示所述数据类型的第二属性信息,所述TLP扩展头指示所述数据类型的第三属性信息。
  53. 如权利要求51所述的装置,其特征在于,所述Type字段、所述Fmt字段和所述预留比特联合编码用于指示所述数据类型,所述TLP扩展头用于指示所述数据类型对应的至少一个属性信息。
  54. 如权利要求51-53所述的装置,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特。
  55. 如权利要求51所述的装置,其特征在于,所述预留比特包括所述TLP头的第9个比特和/或第13个比特,所述Type字段、所述Fmt字段、所述TLP头的第9个比特和所述TLP头的第13个比特分为至少两组字段,所述至少两组字段中的第一组字段用于指示所述数据类型,所述至少两组字段中的除所述第一组字段之外的其它组字段中的每组字段分别指示所述数据类型对应的不同的属性信息,所述TLP扩展头指示所述数据类型对应的除所述至少两组字段指示的属性信息之外的其它属性信息。
  56. 如权利要求51-55任一项所述的装置,其特征在于,所述Type字段和/或所述Fmt字段的值为预留值。
  57. 如权利要求51-56任一项所述的装置,其特征在于,所述TLP头还包括第一字段,所述第一字段指示所述数据类型对应的除所述至少一个属性信息之外的其它属性信息。
  58. 如权利要求57所述装置,其特征在于,所述第一字段为所述TLP头的字节4~字节15或字节4~字节11。
  59. 如权利要求57或58所述的装置,其特征在于,所述第一字段还包括所述第三节点的标识。
  60. 如权利要求51-59任一项所述的装置,其特征在于,所述数据类型包括图像、音频、控制类信息、写数据流SWRITE、安全中的任一项或多项。
  61. 一种计算机可读存储介质,其特征在于,用于存储指令,当所述指令被计算机运行时,使得所述计算机执行如权利要求1-10任一项所述的方法,或执行如权利要求11-20任一项所述的方法,或执行如权利要求21-30任一项所述的方法。
PCT/CN2020/073921 2020-01-22 2020-01-22 一种PCIe的数据传输方法及装置 WO2021147046A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN202080002472.4A CN113498510A (zh) 2020-01-22 2020-01-22 一种PCIe的数据传输方法及装置
PCT/CN2020/073921 WO2021147046A1 (zh) 2020-01-22 2020-01-22 一种PCIe的数据传输方法及装置
EP20916055.5A EP4080375A4 (en) 2020-01-22 2020-01-22 PCIE BASED DATA TRANSFER METHOD AND DEVICE
US17/871,396 US11995020B2 (en) 2020-01-22 2022-07-22 PCIe data transmission method and apparatus

Applications Claiming Priority (1)

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

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/871,396 Continuation US11995020B2 (en) 2020-01-22 2022-07-22 PCIe data transmission method and apparatus

Publications (1)

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

Family

ID=76991998

Family Applications (1)

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

Country Status (4)

Country Link
US (1) US11995020B2 (zh)
EP (1) EP4080375A4 (zh)
CN (1) CN113498510A (zh)
WO (1) WO2021147046A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112748948B (zh) * 2021-01-07 2022-06-07 苏州浪潮智能科技有限公司 PCIe switch工作模式更新方法及相关组件
CN114915499B (zh) * 2022-07-15 2022-10-28 飞腾信息技术有限公司 数据传输方法、相关装置、系统及计算机可读存储介质
CN115333861B (zh) * 2022-10-12 2023-02-07 飞腾信息技术有限公司 数据传输方法、相关设备及计算机可读存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130259053A1 (en) * 2012-03-29 2013-10-03 Fujitsu Limited Switch, information processing apparatus, and communication control method
CN108471384A (zh) * 2018-07-02 2018-08-31 北京百度网讯科技有限公司 用于端到端通信的报文转发的方法和装置
CN109410117A (zh) * 2018-11-05 2019-03-01 英业达科技有限公司 图形处理器系统
US10445280B2 (en) * 2016-10-12 2019-10-15 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. PCIe switch for aggregating a large number of endpoint devices

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101832797B1 (ko) * 2013-07-31 2018-04-13 인텔 코포레이션 Usb 디바이스와의 mctp 통신을 수행하기 위한 방법, 장치 및 시스템
US9280290B2 (en) * 2014-02-12 2016-03-08 Oracle International Corporation Method for steering DMA write requests to cache memory
US10089275B2 (en) * 2015-06-22 2018-10-02 Qualcomm Incorporated Communicating transaction-specific attributes in a peripheral component interconnect express (PCIe) system
US10795400B2 (en) * 2018-04-30 2020-10-06 Qualcomm Incorporated Time synchronization for clocks separated by a communication link

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130259053A1 (en) * 2012-03-29 2013-10-03 Fujitsu Limited Switch, information processing apparatus, and communication control method
US10445280B2 (en) * 2016-10-12 2019-10-15 Lenovo Enterprise Solutions (Singapore) Pte. Ltd. PCIe switch for aggregating a large number of endpoint devices
CN108471384A (zh) * 2018-07-02 2018-08-31 北京百度网讯科技有限公司 用于端到端通信的报文转发的方法和装置
CN109410117A (zh) * 2018-11-05 2019-03-01 英业达科技有限公司 图形处理器系统

Non-Patent Citations (1)

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

Also Published As

Publication number Publication date
US11995020B2 (en) 2024-05-28
EP4080375A4 (en) 2022-12-21
EP4080375A1 (en) 2022-10-26
US20220374385A1 (en) 2022-11-24
CN113498510A (zh) 2021-10-12

Similar Documents

Publication Publication Date Title
US10884965B2 (en) PCI express tunneling over a multi-protocol I/O interconnect
WO2021147050A1 (zh) 一种基于PCIe的数据传输方法及装置
WO2021147046A1 (zh) 一种PCIe的数据传输方法及装置
US9025495B1 (en) Flexible routing engine for a PCI express switch and method of use
JP2015109679A (ja) 拡張ヘッダを用いたパケット送信
WO2021147045A1 (zh) 一种基于PCIe的数据传输方法及装置
US20220368781A1 (en) PCIe-Based Data Transmission Method and Apparatus
US20220358074A1 (en) PCIe-Based Data Transmission Method, Apparatus, and System
US20220365899A1 (en) PCIe-Based Data Transmission Method, Apparatus, and System
US20220358070A1 (en) Pcie-based data transmission method and apparatus
WO2023125212A1 (zh) 数据传输方法、装置、设备及介质
US20180176118A1 (en) Method, apparatus and system for hierarchical network on chip routing
KR20240046830A (ko) 칩-대-칩 인터페이스를 위한 온-디맨드 패킷화
US20220365895A1 (en) Pcie-based data transmission method and apparatus
CN118210749A (zh) 基于SerDes的AXI3总线片间桥接方法及系统

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2020916055

Country of ref document: EP

Effective date: 20220721

NENP Non-entry into the national phase

Ref country code: DE