WO2021147051A1 - 一种基于PCIe的数据传输方法及装置 - Google Patents
一种基于PCIe的数据传输方法及装置 Download PDFInfo
- Publication number
- WO2021147051A1 WO2021147051A1 PCT/CN2020/073926 CN2020073926W WO2021147051A1 WO 2021147051 A1 WO2021147051 A1 WO 2021147051A1 CN 2020073926 W CN2020073926 W CN 2020073926W WO 2021147051 A1 WO2021147051 A1 WO 2021147051A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- field
- node
- data
- tlp
- encapsulation
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4204—Bus transfer protocol, e.g. handshake; Synchronisation on a parallel bus
- G06F13/4221—Bus 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4265—Bus transfer protocol, e.g. handshake; Synchronisation on a point to point bus
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
- H04L45/745—Address table lookup; Address filtering
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0026—PCI express
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L2212/00—Encapsulation of packets
Definitions
- This application relates to the field of communication technology, and in particular to a data transmission method and device based on peripheral component interconnect express (PCIe).
- PCIe peripheral component interconnect express
- PCIe is a high-speed short-distance communication interface, which is widely used in computers, test instruments and other equipment.
- the main components of the PCIe system are the root node (Root), the switch node (Switch) and the end node (Endpoint).
- Root is responsible for managing all buses and nodes in the PCIe system, and is the bridge between the central processing unit (CPU) and Endpoint communication in the PCIe system;
- Switch acts as a data forwarding node, connecting Switch and Endpoint;
- Endpoint is an end device, such as peripherals (Peripheral). In the PCIe system, Endpoint and Endpoint cannot communicate directly, and must go through Root.
- Root communication between Endpoints in the PCIe system results in a variety of transmission interfaces in the vehicle intranet.
- 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 present application provides a PCIe-based data transmission method and device, which can enable Endpoints in the PCIe system to communicate without Root, thereby reducing the complexity of the in-vehicle network.
- an embodiment of the application provides a PCIe-based data transmission method, including: a first node encapsulates data into a transaction layer packet (transaction layer packet, TLP) and then sends it to a second node, where the TLP includes The header part, the first field and the second field of the header part are used to indicate the first encapsulation information, and the first encapsulation information includes the data type of the data and at least one encapsulation parameter corresponding to the data type.
- the embodiment of the application uses the first field and the second field to indicate the information required for data transmission, such as the data type, the encapsulation parameters corresponding to the data type, etc., so that end nodes can communicate even if they do not pass through the root root node. This can reduce the complexity of the in-vehicle network.
- the value of the bit set indicates the first encapsulation information
- the bit set includes the bits of the first field and the bits of the second field.
- the first field and the second field are jointly encoded, so that the TLP can instruct the transmission data as the required information, so that the end nodes can communicate even if they do not go through Root.
- the first field indicates the data type
- the second field indicates at least one encapsulation parameter.
- the first field and the second field are separately indicated, so that the destination node can determine whether to adopt the solution provided in this application when parsing one of the fields.
- the first field is a type (Type) field
- the second field is an Fmt field
- the first field is the Fmt field
- the second field is the Type field.
- the third field of the header part carries the second encapsulation information
- the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
- the third field is byte 4 to byte 15 or byte 4 to byte 11 of the header part. Since bytes 4 to 15 or bytes 4 to 11 of the header part indicate different contents according to the Type field, when the Type field and Fmt field are used to indicate the first encapsulation information, the third field can be used to carry a part or All package parameters.
- the data type includes at least one of the following: image, audio, control information, stream write (SWRITE), and security.
- the encapsulation parameters corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
- the packaging parameters corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
- the encapsulation parameters corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
- the security-corresponding encapsulation parameters may include: message type, format indication, encryption or not.
- the encapsulation parameters corresponding to SWRITE may include: alignment.
- the first field is a reserved value.
- the second field is a reserved value.
- both the first field and the second field are reserved values.
- the reserved value is used to make the PCIe system compatible with the original data transmission method and the data transmission method provided in this application.
- the TLP can carry the information of the destination node, such as the address of the destination node, the identification (ID) of the destination node, and so on.
- the second node can determine the routing path according to the information of the destination node, so that it can send to the destination node according to the routing path without going through Root.
- an embodiment of the present application provides a PCIe-based data transmission method, including: a second node receives a first TLP sent by a first node; a second node sends a second TLP to a third node; where the TLP The first and second fields of the header part are used to indicate the first encapsulation information.
- the first encapsulation information includes the data type of the data carried by the TLP and at least one encapsulation parameter corresponding to the data type.
- the TLP includes the first TLP and/or the second TLP.
- the first field and the second field are used to indicate the information required to transmit data, such as data type, encapsulation information corresponding to the data type, etc., so that end nodes can communicate even if they do not go through Root. Reduce the complexity of the in-vehicle network.
- first TLP and the second TLP may be the same TLP, or the first TLP and the second TLP may also be different TLPs.
- the data or content of the data included in the first TLP and the second TLP are the same.
- the value of the bit set indicates the first encapsulation information
- the bit set includes the bits of the first field and the bits of the second field.
- the first field and the second field are jointly encoded, so that the TLP can instruct the transmission data as the required information, so that the end nodes can communicate even if they do not go through Root.
- the first field indicates the data type
- the second field indicates at least one encapsulation parameter.
- the first field and the second field are separately indicated, so that the third node can determine whether to adopt the solution provided in this application when parsing one of the fields.
- the first field is the Type field and the second field is the Fmt field; alternatively, the first field is the Fmt field and the second field is the Type field.
- the TLP structure is changed less.
- the third field of the header part carries the second encapsulation information
- the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
- the third field is byte 4 to byte 15 or byte 4 to byte 11 of the header part. Since bytes 4 to 15 or bytes 4 to 11 of the header part indicate different contents according to the Type field, when the Type field and Fmt field are used to indicate the first encapsulation information, the third field can be used to carry a part or All package parameters.
- the data type includes at least one of the following: image, audio, control information, SWRITE, and security.
- the encapsulation parameters corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
- the packaging parameters corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
- the encapsulation parameters corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
- the security-corresponding encapsulation parameters may include: message type, format indication, encryption or not.
- the encapsulation parameters corresponding to SWRITE may include: alignment.
- the first field is a reserved value.
- the second field is a reserved value.
- both the first field and the second field are reserved values.
- the reserved value is used to make the PCIe system compatible with the original data transmission method and the data transmission method provided in this application.
- the first TLP carries the identity information of the third node
- the second node determines the routing path based on the identity information of the third node.
- the second node sending the second TLP to the third node includes: the second node sending the second TLP to the third node according to the routing path.
- an embodiment of the present application provides a PCIe-based data receiving method, including: a third node receives a TLP sent by a second node, and the first field and the second field of the header portion of the TLP are used to indicate the first encapsulation Information, the first encapsulation information includes the data type of the data carried by the TLP and at least one encapsulation parameter corresponding to the data type; the third node obtains the data based on the first encapsulation information.
- the first field and the second field are used to indicate the information required to transmit data, such as data type, encapsulation information corresponding to the data type, etc., so that end nodes can communicate even if they do not go through Root. Reduce the complexity of the in-vehicle network.
- the value of the bit set indicates the first encapsulation information
- the bit set includes the bits of the first field and the bits of the second field.
- the first field and the second field are jointly encoded, so that the TLP can instruct the transmission data as the required information, so that the end nodes can communicate even if they do not go through Root.
- the first field indicates the data type
- the second field indicates at least one encapsulation parameter.
- the first field and the second field are separately indicated, so that the destination node can determine whether to adopt the solution provided in this application when parsing one of the fields.
- the first field is the Type field and the second field is the Fmt field; alternatively, the first field is the Fmt field and the second field is the Type field.
- the TLP structure is changed less.
- the data type includes at least one of the following: image, audio, control information, SWRITE, and security.
- the encapsulation parameters corresponding to the image may include: image data type, pixel bit quantization depth, resolution, and segmentation indication information.
- the packaging parameters corresponding to the audio may include: sampling quantization format, sampling frequency, quantization depth, number of channels/number of channels.
- the encapsulation parameters corresponding to the control information may include: the type of the control information and the quantity of each type of control information.
- the security-corresponding encapsulation parameters may include: message type, format indication, encryption or not.
- the encapsulation parameters corresponding to SWRITE may include: alignment.
- the first field is a reserved value.
- the second field is a reserved value.
- both the first field and the second field are reserved values.
- the reserved value is used to make the PCIe system compatible with the original data transmission method and the data transmission method provided in this application.
- the third node obtaining data based on the first encapsulation information includes: the third node determines a format of the data based on the first encapsulation information; and the third node obtains the data based on the format.
- the third node can parse the TLP Header, obtain the type and format of the image, and obtain the data.
- the third field of the header part carries the second encapsulation information
- the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
- the third field is byte 4 to byte 15 or byte 4 to byte 11 of the header part. Since bytes 4 to 15 or bytes 4 to 11 of the header part indicate different contents according to the Type field, when the Type field and Fmt field are used to indicate the first encapsulation information, the third field can be used to carry a part or All package parameters.
- the third node obtains data based on the first encapsulation information, including: the third node determines the format of the data according to the first encapsulation information and the second encapsulation information; the third node obtains the data from the TLP based on the format .
- the third node can parse the TLP Header, obtain the type and format of the image, and obtain the data.
- the TLP can carry information about the third node, such as the address of the third node, the ID of the third node, and so on.
- the second node can determine the routing path according to the information of the third node, so that it can send to the third node according to the routing path without going through Root.
- the present application provides a PCIe-based data transmission device, which may be a communication device, or a chip or chipset in the communication device, where the communication device may be the first node or the second node It can also be the third node.
- the device may include a processing unit and a transceiving unit.
- the processing unit may be a processor, and the transceiving unit may be a transceiver; the device may also include a storage module, and the storage module may be a memory; the storage module is used to store instructions, and the processing unit Execute the instructions stored in the storage module to make the first node execute the corresponding function in the first aspect, or the processing unit executes the instructions stored in the storage module to make the second node execute the corresponding function in the second aspect. Or, the processing unit executes the instructions stored in the storage module, so that the third node executes the corresponding function in the third aspect.
- the processing unit can be a processor, and the transceiver unit can be an input/output interface, a pin or a circuit, etc.; the processing unit executes the instructions stored in the storage module to Make the first node execute the corresponding function in the first aspect, or the processing unit executes the instructions stored in the storage module, so that the second node executes the corresponding function in the second aspect, or the processing unit executes the storage module
- the stored instructions enable the third node to perform the corresponding function in the above-mentioned third aspect.
- the storage module may be a storage module (for example, register, cache, etc.) in the chip or chipset, or a storage module (for example, read-only memory, random access memory, etc.) located outside the chip or chipset in the network device. Fetch memory, etc.).
- a PCIe-based data transmission device which includes a processor, a communication interface, and a memory.
- the communication interface is used to transmit information, and/or messages, and/or data between the device and other devices.
- the memory is used to store computer-executable instructions.
- the processor executes the computer-executable instructions stored in the memory, so that the device executes any design or second aspect of the first aspect or the first aspect described above. Or the data transmission method described in any design of the second aspect, the third aspect or any of the third aspects.
- this application also provides a computer-readable storage medium having instructions stored in the computer-readable storage medium, which when run on a computer, cause the computer to execute any one of the above-mentioned first aspect or 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.
- the data transmission method according to any one of the first design, the third aspect, or the third 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.
- an embodiment of the present application provides a chip, the chip includes at least one processor and a communication interface, the processor is coupled with the memory, and is configured to read a computer program stored in the memory to execute the embodiment of the present application
- the data transmission method according to the first aspect or any one of the first aspect, the second aspect or the second aspect, the third aspect or 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 design, second or second aspect of the first aspect or the first aspect of the embodiments of the present application The data transmission method of any one of the designs, the third aspect, or 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. 3 is a schematic structural diagram of a TLP provided by an embodiment of the application.
- FIG. 4 is a schematic structural diagram of a TLP header provided by an embodiment of the application.
- FIG. 5 is a schematic flowchart of a data transmission system based on a PCIe system provided by an embodiment of the application;
- FIG. 6 is a schematic structural diagram of a camera provided by an embodiment of the application.
- FIG. 7 is a schematic diagram of indicating first package information according to an embodiment of the application.
- FIG. 8 is a schematic diagram of another type of first packaging information provided by an embodiment of this application.
- FIG. 9 is a schematic diagram of an image service provided by an embodiment of the application.
- FIG. 10 is a schematic diagram of another image service provided by an embodiment of this application.
- FIG. 11 is a schematic diagram of another image service provided by an embodiment of this application.
- FIG. 12 is a schematic diagram of another image service provided by an embodiment of this application.
- FIG. 13 is a schematic diagram of another image service provided by an embodiment of this application.
- FIG. 14 is a schematic diagram of another image service provided by an embodiment of this application.
- FIG. 15 is a schematic diagram of another image service provided by an embodiment of this application.
- FIG. 16 is a schematic diagram of the architecture of a PCIe system provided by an embodiment of the application.
- FIG. 17 is a schematic structural diagram of a data transmission device provided by an embodiment of this application.
- FIG. 18 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
- FIG. 19 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
- FIG. 20 is a schematic structural diagram of another data transmission device provided by an embodiment of this application.
- PCIe is a high-speed short-distance communication interface, which is widely used in computers, test instruments and other equipment. At present, because PCIe can quickly read and write memory directly and provide large-bandwidth communication, some car companies have extended its transmission distance as a large data communication port in the car's intranet. However, due to the limitations of the PCIe working mechanism, it cannot be fully applicable to all scenarios in the in-vehicle network.
- Root shown as the root node in Figure 1
- Switch shown as the switch node in Figure 1
- Endpoint shown as the end node in Figure 1
- Root is responsible for managing all buses (shown as black lines in Figure 1) and nodes in the PCIe system. It is a bridge between the CPU and other devices in the system. The CPU communicates with all devices through Root.
- Switch acts as a bridge to connect Root, other Switches, and Endpoints, and acts as a data forwarding node.
- Endpoint is an end device, such as a peripheral, which is responsible for sending or receiving data.
- Figure 2 shows a communication system including two PCIe systems.
- the two PCIe systems can communicate through a non-transparent bridge (NTB).
- NTB non-transparent bridge
- NTB can be deployed on the Switch. Since the devices in a PCIe system are managed independently by their own roots, the addresses and IDs of the devices in different PCIe systems will conflict. In order to allow the two systems to connect and communicate normally, it needs to be performed between the two systems. Bridge conversion, address or ID translation, NTB can be responsible for address or ID conversion, so that the two PCIe systems communicate with each other.
- Endpoint and Endpoint cannot communicate directly, and must go through Root, because only Root knows what functions are in the Endpoint and what types of data are supported.
- the functions of the Endpoint in the PCIe system such as supported data types and formats, are stored in the configuration space of the Endpoint, and only Root has the permission to read the configuration space of the Endpoint, and other Endpoints and Switches have no permission to read. Therefore, only Root knows the data type and format information supported by Endpoint, and cannot be obtained by other nodes.
- the Endpoint in the PCIe system does not know the data types and formats supported by other Endpoints, and cannot communicate without Root.
- Endpoint1 and Endpoint2 are connected to a Switch, they cannot communicate directly through the Switch. Endpoint1/2 must communicate with Root first, and Endpoint2/1 can be found through Root. For example, Endpoint1 sends data to Endpoint2 The process is: Endpoint1 sends data to Switch1, Switch1 sends the data to Root, Root determines that the data receiver is Endpoint2 according to the functions of each Endpoint, Root sends the data to Switch1, and Switch1 sends the data to Endpoint2.
- Root communication between Endpoints in the PCIe system makes it not suitable for many scenarios in the car intranet.
- the ring car intranet requires the sensor to be directly connected to the gateway, and the sensor data is exchanged and forwarded by the gateway/switch on the ring network.
- this in-vehicle network architecture requires that sensor data can be forwarded in any direction through the gateway/switch to provide communication link redundancy, thereby ensuring the safety of in-vehicle communication, so the in-vehicle ring network needs to use other interfaces .
- This situation leads to the existence of multiple transmission interfaces in the vehicle intranet, and information exchange between various interfaces requires interface conversion, and the conversion between different interfaces leads to a significant increase in the complexity of the vehicle intranet.
- the embodiments of the present application provide a PCIe-based data transmission method and device, which are used to solve the problem that the mechanism of Root communication between Endpoints in the prior art causes multiple transmission interfaces in the intranet and the complexity of the intranet Big problem.
- the method and the device are based on the same technical idea. Since the principles of the method and the device to solve the problem are similar, the implementation of the device and the method can be referred to each other, and the repetition will not be repeated.
- the embodiments of the present application provide a PCIe-based data transmission method and device, which can be applied to an in-vehicle network, especially an autonomous vehicle in-vehicle network, and can also be applied to PCIe systems of other devices.
- TLP may be as shown in FIG. 3, and may include TLP prefix (TLP Prefixes), TLP header (TLP Header), data payload (Data Payload), and TLP digest (TLP Digest).
- TLP Prefixes can be H bytes (Byte), and H is an integer greater than 0;
- the length of TLP Header can be composed of 12/16 bytes, which is used to indicate the PCIe service type;
- Data Payload is the data part, and the length can be 0-4K Byte;
- TLP Digest length can be 4 bytes, and the indicated content can be end-to-end 32bit cyclic redundancy check (ECRC), for example, ECRC can be cyclic redundancy check ( The cyclic redundancy check, CRC) check code is used to check whether the data packet is transmitted correctly.
- ECRC cyclic redundancy check
- the structure of the TLP Header may be as shown in Figure 4, including:
- the length of this field can be 3 bits (bit), which is used to indicate the length of the TLP Header and whether the TLP has a Data Payload part.
- TLP Header length is the first length and TLP contains Data Payload
- TLP Header length is the first length and TLP does not contain Data Payload
- TLP Header length is The second length and the TLP includes Data Payload
- the TLP Header length is the second length and the TLP does not include Data Payload.
- the Fmt field may also indicate the TLP prefix (Prefix).
- the Fmt field includes 3 bits and a total of 8 status values.
- 8 status values 5 status values can be used to indicate the above 5 types of information, and the remaining 3 status values are reserved.
- the five status values of 000, 001, 010, 011, and 100 can be used to indicate the above five types of information, and the remaining three status values of 101, 110, and 111 are reserved.
- Type (Type) field 5 bits, used to indicate the service type of the TLP.
- PCIe services There are 6 types of PCIe services, namely: memory (Memory) read/write, input/output (input/output, I/O) read/write, configuration (Configuration) read/write, message (Message) request, end (Completion), atomic operation.
- the Type field includes 5 bits and a total of 32 status values. In PCI Express Base Specification Revision 5.0 Version 1.0, 19 status values are used to indicate the service type of TLP, and the remaining 13 status values are reserved.
- T9/T8 reserved bits.
- Priority (traffic class, TC) field: used to indicate scheduling priority.
- TLP attributes may refer to TLP processing methods, such as ordering processing (Ordering), hardware coherency management (snoop), and so on.
- Lightweight notification (LN) field Lightweight notification, a simple read and write method defined by PCIe.
- TLP processing hints TLP processing hints, TH field: used to indicate whether there are PH (Processing Hints) at the end of the TLP Header.
- TLP digest indication (indicates presence of TLP Digest, TD) field: used to indicate whether the TLP tail contains a TLP digest.
- Poisoned data used to indicate whether it is poisoned data.
- Address type used to indicate whether the address needs to be translated.
- Length Used to indicate the length of the Data Payload, which can use 4 bytes as the minimum unit.
- Byte4-Byte7 According to the service type definition, that is, according to the service type indicated by the Type field, Byte4-Byte7 can indicate the corresponding content of the service type.
- Byte8-Byte15 Fill in the address or ID according to the different content of the routing method.
- Byte8-Byte11 can be filled with the address of the destination node or the ID of the destination node
- Byte12-Byte15 can be filled with the address of the source node or the ID of the source node.
- Byte8-Byte11 can be filled with the address of the source node or the ID of the source node
- Byte12-Byte15 can be filled with the address of the destination node or the ID of the destination node.
- the structure of the 12Byte TLP Header is similar to that of the 16Byte TLP Header.
- Byte4-Byte7 in the 16Byte TLP Header are defined according to the service type, and Byte8-Byte15 fills in the address information
- the 12Byte TLP Header contains Byte4- Byte7 is defined according to the service type, and Byte8-Byte11 fills in address information.
- the method provided in the embodiments of the present application is based on the TLP structure disclosed in the PCI Express Base Specification Revision 5.0 Version 1.0.
- the "reserved value” involved in the embodiments of this application may refer to the unused state values in PCI Express Base Specification Revision 5.0 Version 1.0, for example, the three state values of 101, 110, and 111 in the Fmt field, "reserved value” "Can also be called “reserve value”.
- the "reserved bits” mentioned in the embodiments of this application may refer to the unused bits of the TLP in PCI Express Base Specification Revision 5.0 Version 1.0, for example, T8/T9 of the TLP Header, and the "reserved bits” may also be referred to as “reserved bits”. "Reserved bits”, “reserved bits”, etc.
- the "reserved value" involved in the embodiments of the present application may also refer to unused bits of the TLP in the corresponding evolved version, which is not limited in the embodiments of the present application.
- the data type can include but is not limited to: image, audio, control information, SWRITE, security, etc.
- the encapsulation parameters corresponding to the data type can be used to characterize the attributes of the data type.
- the encapsulation parameters can include but are not limited to the following four types of parameters:
- Image data type RAW, RGB, YUV, embedded data, compressed image, object contour (Object) in the image, etc.;
- Pixel bit quantization depth such as 12, 20, 24, etc.
- Resolution such as 1080P, 2K, 4K, etc.
- Segment indication information The image sensor outputs one line of images at a time. For images with high resolution, TLP cannot transmit one line of images at a time, and one line of images needs to be divided into several TLPs for transmission.
- the segment indication information is used to indicate which segment of the current line is the current TLP.
- the encapsulation parameters can, but are not limited to, include the following 4 parameters:
- Sampling quantization format such as floating point quantization, integer quantization, etc.
- Sampling frequency such as 24KHz, 48KHz, etc.
- Quantization depth such as 8bit, 12bit, etc. per sample
- Number of channels/channels used to indicate how many channels/channels the current data packet contains.
- the encapsulation parameters can, but are not limited to, include the following two types of parameters:
- Control information types such as integrated circuit bus (inter-integrated circuit, I2C), general-purpose input/output (GPIO), serial peripheral interface (serial peripheral interface, SPI), etc.;
- I2C integrated circuit bus
- GPIO general-purpose input/output
- SPI serial peripheral interface
- the quantity of each type of control information For example, the current data packet contains 3 I2C and 8 GPIO.
- the encapsulation parameters can include, but are not limited to, the following three parameters:
- Message type The establishment of security requires multiple message interactions, and each interaction message has a different type, such as authentication messages, encrypted messages, etc.;
- Encrypted or not Whether the current data packet is encrypted.
- the encapsulation parameters can include, but are not limited to, one of the following parameters:
- Alignment use 4 bytes as the smallest unit to align, or 8 bytes as the smallest unit to align.
- the foregoing data type is only an exemplary description, and is not limited to the data types listed in the embodiments of the present application in specific implementation.
- the encapsulation parameters corresponding to the above data types are only an exemplary description. In specific implementation, the above data types may also correspond to other encapsulation parameters, which is not specifically limited here.
- data type is only an exemplary naming, and it can also be named other in specific implementation, for example, it can also be referred to as data service type, or the data type can also be referred to as A.
- A has the same or similar meaning as the data type in the embodiment of this application, A can be understood as the data type in the embodiment of this application.
- Encapsulation parameter is only an exemplary naming. In specific implementations, it can also be named other, for example, it can also be called attribute, attribute parameter, etc., or it can also be called B, as long as B is encapsulated in the embodiment of this application.
- the parameters have the same or similar meanings, and B can be understood as the encapsulation parameter in the embodiment of the application.
- At least one refers to one or more, and “multiple” refers to two or more than two.
- “And/or” describes the association relationship of the associated object, indicating that there can be three relationships, for example, A and/or B, which can mean: A alone exists, A and B exist at the same time, and B exists alone, where A, B can be singular or plural.
- the character “/” generally indicates that the associated objects are in an “or” relationship.
- “The following at least one (item)” or similar expressions refers to any combination of these items, including any combination of a single item (a) or a plurality of items (a).
- At least one of a, b, or c can mean: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, c It can be single or multiple.
- This application provides a PCIe-based data transmission method, which can be applied to a PCIe system, for example, the PCIe system as shown in FIG. 1 or the PCIe system as shown in FIG. 2 and so on. As shown in Figure 5, the method includes:
- the first node encapsulates data into a TLP, where the TLP includes a TLP Header.
- the first field and the second field of the TLP Header are used to indicate the first encapsulation information, and the first encapsulation information includes the data type of the data and at least one encapsulation parameter corresponding to the data type.
- the first node may be an end node in the PCIe system, or may be a switching node in the PCIe system.
- the data can be carried in the Data Payload part of the TLP.
- the first node may be an end node or a chip in the end node.
- the first node may be a transmission node (such as TX/RX) in the end node.
- TX/RX a transmission node
- the structure of the camera can be as shown in Figure 6, including a lens, a complementary metal oxide semiconductor (COMS), TX/RX, etc., where COMS is used to collect images through the lens Data, and sent out through TX/RX.
- the first node can be Camera or TX/RX in Camera.
- the data encapsulated by the first node can be data collected by itself, for example, the first node is Camera, and the encapsulated data can be image data collected by Camera, etc.
- the first node is a microphone.
- the data to be encapsulated may be audio data collected by a microphone and so on.
- the first node is a transmission node in the end node
- the data packaged by the first node can be the data collected by the sensor chip in the end node. Taking Figure 6 as an example, the data packaged by the first node can be the image collected by COMS data.
- the first node may extract data encapsulation parameters.
- the first node can determine the image data type, pixel quantization depth, resolution, etc. of the collected image data, and can calculate according to the image data type, pixel quantization depth, resolution, etc. Based on the data volume of each line of the image, combined with the maximum data carrying capacity of each PCIe TLP, the number of TLPs required to transmit a line of image can be obtained, and then the segmentation mode of the image can be determined, so that the segmentation indication information can be determined according to the segmentation mode.
- the first node can receive the image data collected by COMS.
- the image data display carries the image data type, pixel quantization depth, resolution and other packaging parameters.
- the first node can be based on the image data Carrying image data type, pixel quantization depth, resolution, etc., calculate the amount of data per line of the image, combined with the maximum data carrying capacity of each TLP of PCIe, you can get the number of TLPs required to transmit a line of image, and then determine the image segmentation method. Therefore, the segment indication information can be determined according to the segment mode.
- the first field may be the Type field
- the second field may be the Fmt field
- the first field is the Fmt field
- the second field is the Type field
- the first field and the second field may also be other fields, which are not specifically limited here.
- the following takes the first field as the Fmt field and the second field as the Type field as an example for description.
- the reserved value of the Fmt field and all the status values of the Type field can be used to indicate the first encapsulation information.
- three status values of 101, 110, and 111 in the Fmt field, and 32 00000 to 11111 in the Type field can be used.
- the state value therefore, a total of 3 ⁇ 32 state values can indicate the first package information.
- all the state values of the Fmt field and the reserved value of the Type field can be used to indicate the first encapsulation information.
- a total of 8 state values from 000 to 111 in the Fmt field are used, and 00011, in the Type field.
- the reserved value of the Fmt field and the reserved value of the Type field may be used to indicate the first encapsulation information.
- the three state values of 101, 110, and 111 of the Fmt field and the 00011, 00110, and 00111 of the Type field may be used.
- the Fmt field and the Type field can be uniformly coded (or jointly coded) to indicate the first encapsulation information, that is, the first encapsulation information is indicated by the value of the bit set, and the bit set includes 3 bits of the Fmt field. And the 5 bits of the Type field, so that the state value of these 8 bits (such as 10100000, etc.) can be used to indicate the first encapsulation information, as shown in FIG. 7.
- the data type of the data and at least one encapsulation parameter corresponding to the data type can be bound to obtain multiple information sets.
- the information set 1 includes: data type is image, image type is YUV, image The resolution is 2K, the pixel quantization depth is 12, the current TLP is the first paragraph of the current line
- the information set 2 includes: the data type is image, the image type is YUV, the image resolution is 2K, the pixel quantization depth is 12, the current TLP It is the second paragraph of the current line.
- Information set 3 includes: the data type is image, the image type is RGB, the image resolution is 4K, the pixel quantization depth is 12, the current TLP is the first paragraph of the current line, and so on.
- the information set is indicated by the state value of the bit set, so that the receiving node can determine the corresponding information set according to the bit set.
- the Fmt field and the Type field may indicate different information.
- the Fmt field may indicate a data type
- the Type field may indicate at least one encapsulation parameter corresponding to the data type, as shown in FIG. 8.
- the Fmt field may indicate that the data type is security, for example, 101 represents a security service.
- the Type field can indicate the message type, for example, 00000 indicates the encryption establishment message, 00001 indicates the interface authentication message, 00010 indicates the image encryption data, 00011 indicates the encrypted memory read, and so on.
- the TLP Header may further include a third field.
- the third field may be Byte4-Byte15 of the TLP Header of 16 Bytes, or Byte4-Byte11 of the TLP Header of 12 Bytes.
- the TLP Header may indicate the data type and the encapsulation parameter corresponding to the data type through the Fmt field and the Type field.
- the third field may not carry encapsulation parameters.
- the Fmt field and the Type field can indicate the data type and the encapsulation parameter corresponding to the data type by means of joint coding, or alternatively, the Fmt field and the Type field can be separately indicated to indicate the data type and the encapsulation parameter corresponding to the data type.
- the Fmt field indicates the data type
- the reserved value of the Type field indicates the encapsulation parameter corresponding to the data type.
- the Fmt field and the Type field indicate: image service, image data type, pixel quantization depth, resolution, and segment indication information, as shown in FIG. 9 or FIG. 10.
- the TLP Header may indicate the data type and a part of the encapsulation parameters corresponding to the data type through the Fmt field and the Type field, and carry another part of the encapsulation parameters corresponding to the data type through the third field.
- the third field may carry the second encapsulation information, and the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
- the Fmt field and the Type field can indicate the data type and a part of the encapsulation parameters corresponding to the data type by means of joint coding, or the Fmt field and the Type field can be separately indicated to indicate the data type and a part of the data type.
- Encapsulation parameters for example, the Fmt field indicates the data type, and the reserved value of the Type field indicates a part of the encapsulation parameter corresponding to the data type.
- the Fmt field and the Type field indicate: image service, image data type, and the third field indicates: pixel quantization depth, resolution, and segmentation indication information, as shown in FIG. 11 or FIG. 12. It should be understood that FIG. 11 or FIG. 12 is only an exemplary illustration, and does not specifically limit the length of each encapsulation parameter and the position in the TLP Header.
- the TLP Header may indicate the data type through the Fmt field and the Type field, and carry the encapsulation parameter corresponding to the data type through the third field.
- the Fmt field and the Type field may not indicate the encapsulation parameter.
- the Fmt field and the Type field can indicate the data type in a joint coding manner, or the reserved value of the Fmt field can also be used to indicate the data type, or the reserved value of the Type field can also be used to indicate the data type.
- the Fmt field and the Type field indicate: image service
- the third field indicates: image data type, pixel quantization depth, resolution, and segment indication information, as shown in FIG. 13.
- the reserved value of the Fmt field indicates: image service
- the third field indicates: image data type, pixel quantization depth, resolution, and segment indication information, as shown in FIG. 14.
- the reserved value of the Type field indicates: image service
- the third field indicates: image data type, pixel quantization depth, resolution, and segment indication information, as shown in FIG. 15. It should be understood that FIG. 14 or FIG. 15 is only an exemplary illustration, and does not specifically limit the length of each encapsulation parameter and the position in the TLP Header.
- a format of a service of image, audio, control information, SWRITE, and security can be indicated. Or, it can also indicate multiple formats of one service of image, audio, control information, SWRITE, and security. Or, it can also indicate multiple formats of images, audio, control information, SWRITE, and multiple services in security. Or, it can also indicate images, audio, control information, SWRITE, and security of multiple services mix (such as images with security protection, etc.). Or other business types and formats, I won’t list them all here.
- the TLP may also carry the identity information of the destination node (hereinafter collectively referred to as the third node), such as the address and ID of the third node.
- the TLP may also carry the identity information of the first node, such as the address and ID of the first node.
- An example is that if the length of the TLP Header is 16 Bytes, Byte8-Byte15 of the TLP Header can carry the identity information of the first node and the third node. If the length of the TLP Header is 12 Bytes, Byte8-Byte11 of the TLP Header can carry the identity information of the first node and the third node.
- the third node may be an end node in the PCIe system or a switching node in the PCIe system.
- the first node sends a TLP to the second node.
- the second node receives the TLP sent by the first node.
- the second node may be an end node in the PCIe system, or may be a switching node in the PCIe system.
- the second node may be a switching node connected to the first node in the PCIe system.
- S503 The second node sends the TLP to the third node.
- the third node receives the TLP sent by the second node.
- the TLP sent by the second node and the TLP sent by the first node are the same TLP, that is, after receiving the TLP sent by the first node, the second node forwards the TLP to the third node.
- the TLP sent by the second node and the TLP sent by the first node are different TLPs, that is, after receiving the TLP sent by the first node, the second node processes the TLP, for example, the TLP
- the source node information is modified from the identity information of the first node to the identity information of the second node, etc., and then the processed TLP is sent to the third node, where the TLP sent by the second node is the same as the TLP sent by the first node
- the carried data or the content of the data is the same, and the package information can also be the same.
- the TLP sent by the second node carries data and encapsulation information, reference may be made to the relevant description of the above step S501, which will not be repeated here.
- the second node may determine the routing path based on the identity information of the third node. Therefore, the second node can send the TLP to the third node according to the routing path.
- S504 The third node obtains data based on the first packaging information.
- the third node decapsulates the TLP sent by the second node based on the first encapsulation information to obtain the data.
- the third node may obtain the data type and the encapsulation parameters corresponding to the data type from the received TLP, determine the format of the data carried by the TLP according to the data type and the encapsulation parameters corresponding to the data type, and based on the data type and the encapsulation parameters corresponding to the data type.
- the format decapsulates the TLP.
- the third node may determine the data type and the encapsulation parameters corresponding to the data type according to the Fmt field and the Type field of the TLP Header. For example, as shown in Figure 9, the third node can determine that the data carried by the TLP is an image service according to the Fmt field and the Type field of the TLP Header, and obtain the image data type, pixel quantization depth, resolution, and classification of the image data carried by the TLP. Segment instructions.
- the third node may determine the data type and some encapsulation parameters corresponding to the data type according to the Fmt field and the Type field of the TLP Header, and determine the remaining encapsulation parameters corresponding to the data type according to the third field of the TLP Header. For example, as shown in Figure 11, the third node can determine that the data carried by the TLP is an image service according to the Fmt field and the Type field of the TLP Header, and obtain the image data type of the image data carried by the TLP. The third field acquires the pixel quantization depth, resolution, and segmentation indication information of the image data carried by the TLP.
- the third node may determine the data type according to the Fmt field and the Type field of the TLP Header, and determine the encapsulation parameter corresponding to the data type according to the third field of the TLP Header. For example, as shown in Figure 13, the third node can determine that the data carried by the TLP is an image service according to the Fmt field and the Type field of the TLP Header, and obtain the image data type and pixel of the image data carried by the TLP according to the third field of the TLP Header Quantize depth, resolution, and segment indication information.
- the following describes the data transmission process in detail with reference to the PCIe system shown in FIG. 16.
- Camera1/Camera2 can transmit data to Switch1 and Switch2 through the data transmission method performed by the first node in the above embodiment
- Switch1 can transmit data to Switch2 through the data transmission method performed by the second node in the above embodiment
- Switch2 can use the above
- the data transmission method executed by the second node in the embodiment transmits data to the Display, and the Display can obtain the data through the data transmission method executed by the third node in the foregoing embodiment.
- the process of Camera1 transmitting data to Display is as follows:
- A1 Camera1 calculates the amount of data per line of the image according to the output image type (such as RGB, YUV, etc.), the number of quantized bits per pixel, and the image resolution (such as 2K, 4K, etc.), combined with the maximum data carrying capacity of each PCIe TLP The quantity determines the number of TLPs needed to transmit a line of image, and then determines the image segmentation method.
- the output image type such as RGB, YUV, etc.
- the number of quantized bits per pixel such as 2K, 4K, etc.
- Camera1 encapsulates the collected image data into TLP.
- Camera1 can encapsulate data in any of the following six ways:
- Camera1 can use a state value (such as 10100000) after unified encoding of the Fmt field and the Type field of the TLP Header to indicate the information required for image transmission, such as image service, image data type of image data, and image data.
- a state value such as 10100000
- the pixel quantization depth, the resolution of the image data, and the segmentation indication information of the image data are shown in FIG. 9.
- Camera1 fills the data into the Data Payload part of the TLP.
- Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
- Method 2 Camera1 can use a state value (such as 10100100) after unified encoding of the Fmt field and the Type field of the TLP Header: the data type is the image data type of the image service and the image data.
- the Byte 4 ⁇ Byte 15 of the TLP Header to indicate : The pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data, as shown in Figure 11.
- Camera1 fills the data into the Data Payload part of the TLP.
- Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
- Camera1 can use a state value (such as 10101001) after unified encoding of the Fmt field and Type field of the TLP Header to indicate: the data type is image service, and use Byte 4 to Byte 15 of the TLP Header to indicate: the image data type of the image data , The pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data are shown in Figure 13.
- Camera1 fills the data into the Data Payload part of the TLP.
- Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
- Camera1 can use the Fmt field of the TLP Header to indicate: the data type is image service, and the Type field indicates: the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data , As shown in Figure 10. Camera1 fills the data into the Data Payload part of the TLP. Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
- identity information such as ID, address
- Camera1 can use the Fmt field of the TLP Header to indicate: the data type is image service, the Type field indicates: the image data type of the image data, use the Byte 4 ⁇ Byte 15 of the TLP Header to indicate: the pixel quantization depth of the image data, image data The resolution of the image data and the segmentation indication information of the image data are shown in Figure 12.
- Camera1 fills the data into the Data Payload part of the TLP.
- Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
- At least one of the Fmt field and the Type field can use a reserved value.
- the following is an example of using the reserved value in the Fmt field in the above five modes for description.
- Camera1 can use the reserved value of the Fmt field of the TLP Header or the reserved value of the Type field to indicate: the data type is image, use the Byte 4 ⁇ Byte 15 of the TLP Header to indicate: the image data type of the image data, the image data Pixel quantization depth, image data resolution, image data segmentation indication information.
- the reserved value indication of the Fmt field the data type is an image as an example, as shown in FIG. 14.
- Camera1 fills the data into the Data Payload part of the TLP.
- Camera1 fills its own identity information (such as ID, address) and display identity information into Byte 8 to Byte 15 of the TLP Header.
- Switch1 After Switch1 receives the TLP, it detects the TLP Header and parses the Fmt field. 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 be processed according to the original PCIe mechanism, that is, the TLP will be sent to Root. , And then Root determines the receiving side node according to the configuration space of each end node visited, and then sends the TLP to the receiving side node. If the Fmt field is the content defined in the embodiment of this application, the routing information in Switch1 is searched according to the identity information of the Display in the TLP, and the TLP is forwarded to Switch2 according to the corresponding routing path.
- Switch2 After Switch2 receives the data, it detects the TLP Header and parses the Fmt field. 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 be processed according to the original PCIe mechanism, that is, the TLP will be sent to Root. , And then Root determines the receiving side node according to the configuration space of each end node visited, and then sends the TLP to the receiving side node. If the Fmt field is the content defined in the embodiment of this application, the routing information in Switch2 is searched according to the identity information of the Display in the TLP, and the TLP is sent to the Display according to the corresponding routing path.
- the Display After the Display receives the TLP, it parses the TLP Header, obtains the type and format of the image, and restores a complete image according to the segment instruction information, and transmits the data to the display for display.
- Display can obtain the type and format of the image in the following ways: Display parses the Fmt field and Type field of the TLP Header, and determines the data type as image or image data according to the 8-bit state value (such as 10100000) The image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
- the 8-bit state value such as 10100000
- Display can obtain the type and format of the image in the following ways: Display parses the Fmt field and Type field of the TLP Header, and determines the data type as image or image data according to the 8-bit state value (such as 10100100) The image data type. Analyze Byte 4 to Byte 15 of the TLP Header to determine the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
- Display can obtain the type and format of the image in the following ways: Display parses the Fmt field and Type field of the TLP Header, determines the data type as an image according to the 8-bit state value (such as 10101001), and parses the TLP Byte 4 to Byte 15 of the header determine the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
- Display can obtain the type and format of the image in the following manner: Display parses the Fmt field of the TLP Header, and determines the data type as an image according to the state value of the Fmt field. Analyze the Type field of the TLP Header, and determine the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data according to the state value of the Type field.
- Display can obtain the type and format of the image in the following manner: Display parses the Fmt field of the TLP Header, and determines the data type as an image according to the state value of the Fmt field. Parse the Type field of the TLP Header, and determine the image data type of the image data according to the state value of the Type field. Analyze Byte 4 to Byte 15 of the TLP Header to determine the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
- the Display can obtain the type and format of the image in the following manner: Display parses the Fmt field of the TLP Header, and determines the data type as an image according to the state value of the Fmt field. Analyze Byte 4 to Byte 15 of the TLP Header to determine the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
- the Display parses the Type field of the TLP Header, and determines that the data type is an image according to the state value of the Type field. Analyze Byte 4 to Byte 15 of the TLP Header to determine the image data type of the image data, the pixel quantization depth of the image data, the resolution of the image data, and the segmentation indication information of the image data.
- the embodiment of the application uses the Fmt field and the Type field to indicate the information required for data transmission, such as the data type, the encapsulation information corresponding to the data type, etc., so that the Endpoints can communicate even if they do not go through Root, thereby reducing the in-car Network complexity.
- the PCIe system can be compatible with the original PCIe data transmission method and the data transmission method provided in the embodiment of the present application.
- the embodiment of the present application provides a data transmission device.
- the structure of the device may be as shown in FIG. 17, including a processing unit 1701 and a communication unit 1702.
- the data transmission device may be specifically used to implement the method executed by the first node in the embodiments of FIG. 5 to FIG. 16.
- the device may be the first node itself, or the chip or chip in the first node. A part of a group or chip used to perform related method functions.
- the processing unit 1701 is configured to encapsulate data into TLP, where the TLP includes a header part, the first field and the second field of the header part are used to indicate the first encapsulation information, and the first encapsulation information includes the data type and the data At least one encapsulation parameter corresponding to the type; the communication unit 1702 is configured to send TLP to the second node.
- the value of the bit set indicates the first encapsulation information
- the bit set includes the bits of the first field and the bits of the second field.
- the first field indicates the data type
- the second field indicates at least one encapsulation parameter
- the first field may be a Type field and the second field may be an Fmt field; or, the first field may be an Fmt field and the second field may be a Type field.
- the third field of the header part carries second encapsulation information
- the second encapsulation information includes encapsulation parameters corresponding to the data type other than encapsulation parameters included in the first encapsulation information.
- the third field may be byte 4 to byte 15 or byte 4 to byte 11 of the header part.
- the data type can include, but is not limited to, at least one of the following: image, audio, control information, SWRITE, and security.
- the first field is a reserved value.
- the second field is a reserved value.
- both the first field and the second field are reserved values.
- the data transmission device may be specifically used to implement the method executed by the third node in the embodiments of FIG. 5 to FIG. 16.
- the device may be the third node itself, or the chip or chip in the third node.
- the communication unit 1702 is configured to receive the TLP sent by the second node.
- the first field and the second field of the header portion of the TLP are used to indicate the first encapsulation information.
- the first encapsulation information includes the data type and data of the data carried by the TLP. At least one encapsulation parameter corresponding to the type; the processing unit 1701 is configured to obtain data based on the first encapsulation information.
- the value of the bit set indicates the first encapsulation information
- the bit set includes the bits of the first field and the bits of the second field.
- the first field indicates the data type
- the second field indicates at least one encapsulation parameter
- the first field may be a Type field and the second field may be an Fmt field; or, the first field may be an Fmt field and the second field may be a Type field.
- the data type can include, but is not limited to, at least one of the following: image, audio, control information, SWRITE, and security.
- the first field is a reserved value.
- the second field is a reserved value.
- both the first field and the second field are reserved values.
- the processing unit 1701 when obtaining data based on the first encapsulation information, may be specifically configured to: determine the format of the data based on the first encapsulation information; and obtain the data based on the format.
- the third field of the header part carries the second encapsulation information
- the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
- the third field may be byte 4 to byte 15 or byte 4 to byte 11 of the header part.
- the processing unit 1701 when the processing unit 1701 obtains data from the TLP based on the first encapsulation information, it may also be specifically configured to: determine the format of the data according to the first encapsulation information and the second encapsulation information; and obtain the data format based on the format. data.
- the embodiment of the present application also provides a data transmission device.
- the structure of the device may be as shown in FIG. 18, including a processing unit 1801, a first communication unit 1802, and a second communication unit 1803.
- the data transmission device may be specifically used to implement the method executed by the second node in the embodiments of FIG. 5 to FIG. 16.
- the device may be the second node itself, or the chip or chip in the second node. A part of a group or chip used to perform related method functions.
- the first communication unit 1802 is used for transmitting data with the first node
- the second communication unit 1803 is used for transmitting data with the third node
- the processing unit 1801 is used for receiving the first communication unit 1802.
- the TLP includes the first TLP and/or the second TLP.
- the value of the bit set indicates the first encapsulation information
- the bit set includes the bits of the first field and the bits of the second field.
- the first field indicates the data type
- the second field indicates at least one encapsulation parameter
- the first field may be a Type field and the second field may be an Fmt field; or, the first field may be an Fmt field and the second field may be a Type field.
- the third field of the header part carries the second encapsulation information
- the second encapsulation information includes other encapsulation parameters other than the encapsulation parameters included in the first encapsulation information among the encapsulation parameters corresponding to the data type.
- the third field may be byte 4 to byte 15 or byte 4 to byte 11 of the header part.
- the data type can include, but is not limited to, at least one of the following: image, audio, control information, SWRITE, and security.
- the first field is a reserved value.
- the second field is a reserved value.
- both the first field and the second field are reserved values.
- the first TLP may also carry the identity information of the third node.
- the processing unit 1801 may be further configured to: before sending the second TLP to the third node through the second communication unit 1803, determine the routing path based on the identity information of the third node; When the three nodes send the second TLP, it is specifically used to send the second TLP to the third node according to the routing path.
- the division of modules in the embodiments of this application is illustrative, and it is only a logical function division. In actual implementation, there may be other division methods.
- the functional modules in the various embodiments of this application can be integrated into one process. In the device, it can also exist alone physically, or two or more modules can be integrated into one module.
- the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It can be understood that the function or implementation of each module in the embodiment of the present application may further refer to the related description of the method embodiment.
- the data transmission device may be as shown in FIG. 19, and the device may be an end node or a chip in the end node.
- the device may include a processor 1901, a communication interface 1902, and a memory 1903.
- the processing unit 1701 may be a processor 1901.
- the communication unit 1702 may be a communication interface 1902.
- the processor 1901 may be a CPU, or a digital processing unit, and so on.
- the communication interface 1902 may be a transceiver, an interface circuit such as a transceiver circuit, etc., or a transceiver chip, and so on.
- the device also includes: a memory 1903, which is used to store a program executed by the processor 1901.
- the memory 1903 may be a non-volatile memory, such as a hard disk drive (HDD) or a solid-state drive (SSD), etc., and may also be a volatile memory (volatile memory), such as random access memory (random access memory). -access memory, RAM).
- the memory 1903 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited thereto.
- the processor 1901 is configured to execute the program code stored in the memory 1903, and is specifically configured to execute the actions of the aforementioned processing unit 1701, which will not be repeated in this application.
- the communication interface 1902 is specifically configured to perform the actions of the above-mentioned communication unit 1702, which will not be repeated in this application.
- the embodiment of the present application does not limit the specific connection medium between the communication interface 1902, the processor 1901, and the memory 1903.
- the memory 1903, the processor 1901, and the communication interface 1902 are connected by a bus 1904.
- the bus is represented by a thick line in FIG. 19, and the connection mode between other components is only for schematic illustration. , Is not limited.
- the bus 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. 19, but it does not mean that there is only one bus or one type of bus.
- the data transmission device may be as shown in FIG. 20, and the device may be a switching node or a chip in a switching node.
- the device may include a processor 2001, a communication interface 2002a, a communication interface 2002b, and a memory 2003.
- the processing unit 1801 may be a processor 2001.
- the first communication unit 1802 may be a communication interface 2002a.
- the second communication unit 1803 may be a communication interface 2002b.
- the processor 2001 may be a CPU, or a digital processing unit, and so on.
- the communication interface 2002a and the communication interface 2002b may be a transceiver, an interface circuit such as a transceiver circuit, etc., or a transceiver chip, etc.
- the device also includes: a memory 2003 for storing programs executed by the processor 2001.
- the memory 2003 may be a non-volatile memory, such as HDD or SS), etc., or may also be a volatile memory, such as RAM.
- the memory 2003 is any other medium that can be used to carry or store desired program codes in the form of instructions or data structures and that can be accessed by a computer, but is not limited to this.
- the processor 2001 is configured to execute the program code stored in the memory 2003, and is specifically configured to execute the actions of the above-mentioned processing unit 1801, which will not be repeated in this application.
- the communication interface 2002a is specifically configured to perform the actions of the above-mentioned first communication unit 1802, which will not be repeated here in this application.
- the communication interface 2002b is specifically configured to perform the actions of the above-mentioned second communication unit 1803, which will not be repeated here in this application.
- the embodiment of the present application does not limit the specific connection medium between the communication interface 2002a, the communication interface 2002b, the processor 2001, and the memory 2003.
- the memory 2003, the processor 2001, the communication interface 2002a, and the communication interface 2002b are connected by a bus 2004.
- the bus is represented by a thick line in FIG. 20.
- the connection mode between other components is only The schematic description is not intended to be limiting.
- the bus 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 embodiment of the present invention also provides a computer-readable storage medium for storing computer software instructions required to execute the above-mentioned processor, which contains a program required to execute the above-mentioned processor.
- this application can be provided as methods, systems, or computer program products. Therefore, this application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
- computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
- These computer program instructions can also be stored in a computer-readable memory that can 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)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Communication Control (AREA)
- Information Transfer Systems (AREA)
Abstract
本申请公开了一种基于PCIe的数据传输方法及装置,可以使PCIe***中的Endpoint无需经过根节点(Root)进行通信,从而降低车内网复杂度。该方法包括:第一节点将数据封装成事务层包TLP后向第二节点发送TLP,其中,TLP包括包头部分,包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括数据的数据类型以及数据类型对应的至少一个封装参数。本申请实施例通过利用第一字段与第二字段指示传输数据所需要的信息,如数据类型、数据类型对应的封装参数等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
Description
本申请涉及通信技术领域,尤其涉及一种基于***组件互连传递(peripheral component interconnect express,PCIe)的数据传输方法及装置。
PCIe是一种高速短距离通信接口,广泛应用在计算机、测试仪器等设备中。PCIe***的主要组成单元有根节点(Root)、交换节点(Switch)和端节点(Endpoint)。Root负责管理PCIe***中所有总线和节点,是中央处理单元(central processing unit,CPU)和PCIe***中Endpoint通信的桥梁;Switch作为数据转发节点,连接Switch和Endpoint;Endpoint为端设备,如外设(Peripheral)。PCIe***中Endpoint与Endpoint之间不能直接通信,必须经过Root。
PCIe***中Endpoint之间通过Root通信的机制,导致车内网中存在多种传输接口,各种接口之间进行信息交互需要接口转换,不同接口之间的转换导致车内网复杂度大幅提升,尤其是在高速通信场景中。
发明内容
本申请提供一种基于PCIe的数据传输方法及装置,可以使得PCIe***中的Endpoint之间可以不通过Root进行通信,从而降低车内网复杂度。
第一方面,本申请实施例提供了一种基于PCIe的数据传输方法,包括:第一节点将数据封装成事务层包(transaction layer packet,TLP)后向第二节点进行发送,其中,TLP包括包头部分,包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括数据的数据类型以及数据类型对应的至少一个封装参数。本申请实施例通过利用第一字段与第二字段指示传输数据所需要的信息,如数据类型、数据类型对应的封装参数等,使端节点之间即使不经过根Root节点,也可以进行通信,从而可以降低车内网复杂度。
在一种可能的设计中,比特集合的取值指示第一封装信息,比特集合包括第一字段的比特以及第二字段的比特。上述设计中通过将第一字段和第二字段联合编码的方式,使得TLP可以指示传输数据做需要的信息而使得端节点之间即使不经过Root,也可以进行通信。
在一种可能的设计中,第一字段指示数据类型,第二字段指示至少一个封装参数。上述设计中通过将第一字段和第二字段分开指示的方式,使得目的端节点在解析在其中一个字段时可以判断是否采用本申请提供的方案。
在一种可能的设计中,第一字段为类型(Type)字段,第二字段为Fmt字段。或者,第一字段为Fmt字段,第二字段为Type字段。上述设计中,通过复用Type字段和Fmt字段,使得TLP结构的改动较小。
在一种可能的设计中,包头部分的第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。通过上述设计,使得TLP可以指示更多的封装信息。
在一种可能的设计中,第三字段为包头部分的字节4~字节15或字节4~字节11。由于 包头部分的字节4~字节15或字节4~字节11根据Type字段不同指示的内容不同,在通过Type字段和Fmt字段指示第一封装信息时,可以使用第三字段携带一部分或者全部的封装参数。
在一种可能的设计中,数据类型包括如下至少一项:图像、音频、控制类信息、流写(stream write,SWRITE)、安全。
在一种可能的设计中,图像对应的封装参数可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的封装参数可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的封装参数可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的封装参数可以包括:消息类型、格式指示、加密与否。
在一种可能的设计中,SWRITE对应的封装参数可以包括:对齐方式。
在一种可能的设计中,第一字段为预留值。或者,第二字段为预留值。或者,第一字段和第二字段均为预留值。上述设计中,通过使用预留值,使得PCIe***可以兼容原有数据传输方法和本申请提供的数据传输方法。
在一种可能的设计中,TLP中可以携带目的端节点的信息,如目的端节点的地址、目的端节点的身份标识(identification,ID)等。通过上述设计,第二节点可以根据目的端节点的信息确定路由路径,从而可以根据路由路径向目的端节点进行发送,而不需要经过Root。
第二方面,本申请实施例提供了一种基于PCIe的数据传输方法,包括:第二节点接收第一节点发送的第一TLP;第二节点向第三节点发送第二TLP;其中,TLP的包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数,TLP包括第一TLP和/或第二TLP。本申请实施例通过利用第一字段与第二字段指示传输数据所需要的信息,如数据类型、数据类型对应的封装信息等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
在一种可能的设计中,第一TLP和第二TLP可以为同一个TLP,或者,第一TLP和第二TLP也可以为不同的TLP。
在一种可能的设计中,第一TLP和第二TLP中包括的数据或数据的内容相同。
在一种可能的设计中,比特集合的取值指示第一封装信息,比特集合包括第一字段的比特以及第二字段的比特。上述设计中通过将第一字段和第二字段联合编码的方式,使得TLP可以指示传输数据做需要的信息而使得端节点之间即使不经过Root,也可以进行通信。
在一种可能的设计中,第一字段指示数据类型,第二字段指示至少一个封装参数。上述设计中通过将第一字段和第二字段分开指示的方式,使得第三节点在解析在其中一个字段时可以判断是否采用本申请提供的方案。
在一种可能的设计中,第一字段为Type字段,第二字段为Fmt字段;或者,第一字段为Fmt字段,第二字段为Type字段。上述设计中,通过复用Type字段和Fmt字段,使得TLP结构的改动较小。
在一种可能的设计中,包头部分的第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。通过上述设计,使得TLP可以指示更多的封装信息。
在一种可能的设计中,第三字段为包头部分的字节4~字节15或字节4~字节11。由于包头部分的字节4~字节15或字节4~字节11根据Type字段不同指示的内容不同,在通过Type字段和Fmt字段指示第一封装信息时,可以使用第三字段携带一部分或者全部的封装参数。
在一种可能的设计中,数据类型包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
在一种可能的设计中,图像对应的封装参数可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的封装参数可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的封装参数可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的封装参数可以包括:消息类型、格式指示、加密与否。
在一种可能的设计中,SWRITE对应的封装参数可以包括:对齐方式。
在一种可能的设计中,第一字段为预留值。或者,第二字段为预留值。或者,第一字段和第二字段均为预留值。上述设计中,通过使用预留值,使得PCIe***可以兼容原有数据传输方法和本申请提供的数据传输方法。
在一种可能的设计中,第一TLP携带第三节点的身份信息,在第二节点向第三节点发送第二TLP之前,第二节点基于第三节点的身份信息确定路由路径。第二节点向第三节点发送第二TLP,包括:第二节点按照路由路径向第三节点发送第二TLP。通过上述设计,第二节点可以根据第三节点的信息确定路由路径,从而可以根据路由路径向第三节点进行发送,而不需要经过Root。
第三方面,本申请实施例提供了一种基于PCIe的数据接收方法,包括:第三节点接收第二节点发送的TLP,TLP的包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数;第三节点基于第一封装信息获得数据。本申请实施例通过利用第一字段与第二字段指示传输数据所需要的信息,如数据类型、数据类型对应的封装信息等,使端节点之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
在一种可能的设计中,比特集合的取值指示第一封装信息,比特集合包括第一字段的比特以及第二字段的比特。上述设计中通过将第一字段和第二字段联合编码的方式,使得TLP可以指示传输数据做需要的信息而使得端节点之间即使不经过Root,也可以进行通信。
在一种可能的设计中,第一字段指示数据类型,第二字段指示至少一个封装参数。上述设计中通过将第一字段和第二字段分开指示的方式,使得目的节点在解析在其中一个字段时可以判断是否采用本申请提供的方案。
在一种可能的设计中,第一字段为Type字段,第二字段为Fmt字段;或者,第一字段为Fmt字段,第二字段为Type字段。上述设计中,通过复用Type字段和Fmt字段,使 得TLP结构的改动较小。
在一种可能的设计中,数据类型包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
在一种可能的设计中,图像对应的封装参数可以包括:图像数据类型、像素比特量化深度、分辨率、分段指示信息。
在一种可能的设计中,音频对应的封装参数可以包括:采样量化格式、采样频率、量化深度、道数/通道数。
在一种可能的设计中,控制类信息对应的封装参数可以包括:控制类信息类型、每类控制信息数量。
在一种可能的设计中,安全对应的封装参数可以包括:消息类型、格式指示、加密与否。
在一种可能的设计中,SWRITE对应的封装参数可以包括:对齐方式。
在一种可能的设计中,第一字段为预留值。或者,第二字段为预留值。或者,第一字段和第二字段均为预留值。上述设计中,通过使用预留值,使得PCIe***可以兼容原有数据传输方法和本申请提供的数据传输方法。
在一种可能的设计中,第三节点基于第一封装信息获得数据,包括:第三节点基于第一封装信息确定数据的格式;第三节点基于格式获得所述数据。通过上述设计,第三节点可以解析TLP Header,获取图像的类型和格式,从而得到数据。
在一种可能的设计中,包头部分的第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。通过上述设计,使得TLP可以指示更多的封装信息。
在一种可能的设计中,第三字段为包头部分的字节4~字节15或字节4~字节11。由于包头部分的字节4~字节15或字节4~字节11根据Type字段不同指示的内容不同,在通过Type字段和Fmt字段指示第一封装信息时,可以使用第三字段携带一部分或者全部的封装参数。
在一种可能的设计中,第三节点基于第一封装信息获得数据,包括:第三节点根据第一封装信息以及第二封装信息确定数据的格式;第三节点基于格式对TLP获得所述数据。通过上述设计,第三节点可以解析TLP Header,获取图像的类型和格式,从而得到数据。
在一种可能的设计中,TLP中可以携带第三节点的信息,如第三节点的地址、第三节点的ID等。通过上述设计,第二节点可以根据第三节点的信息确定路由路径,从而可以根据路由路径向第三节点进行发送,而不需要经过Root。
第四方面,本申请提供一种基于PCIe的数据传输装置,该装置可以是通信设备,也可以是通信设备内的芯片或芯片组,其中,通信设备可以为第一节点也可以是第二节点也可以是第三节点。该装置可以包括处理单元和收发单元。当该装置是通信设备时,该处理单元可以是处理器,该收发单元可以是收发器;该装置还可以包括存储模块,该存储模块可以是存储器;该存储模块用于存储指令,该处理单元执行该存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行该存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。当该装置是通信设备内的芯片或芯片组时,该处理单元可以是处理器,该收发单元可以是输入/输出接口、管脚或电 路等;该处理单元执行存储模块所存储的指令,以使第一节点执行上述第一方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第二节点执行上述第二方面中相应的功能,或者,该处理单元执行存储模块所存储的指令,以使第三节点执行上述第三方面中相应的功能。该存储模块可以是该芯片或芯片组内的存储模块(例如,寄存器、缓存等),也可以是该网络设备内的位于该芯片或芯片组外部的存储模块(例如,只读存储器、随机存取存储器等)。
第五方面,提供了一种基于PCIe的数据传输装置,包括:处理器、通信接口和存储器。通信接口用于该装置与其他装置之间传输信息、和/或消息、和/或数据。该存储器用于存储计算机执行指令,当该装置运行时,该处理器执行该存储器存储的该计算机执行指令,以使该装置执行如上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计所述的数据传输方法。
第六方面,本申请还提供一种计算机可读存储介质,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计所述的数据传输方法。
第七方面,本申请还提供一种包括指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计所述的数据传输方法。
第八方面,本申请还提供一种PCIe***,该***包括第一节点、第二节点、第三节点,其中,第一节点可以执行上述第一方面中相应的功能,第二节点可以执行上述第二方面中相应的功能,第三节点可以执行上述第三方面中相应的功能。
第九方面,本申请实施例提供的一种芯片,所述芯片包括至少一个处理器和通信接口,所述处理器与存储器耦合,用于读取存储器中存储的计算机程序以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计所述的数据传输方法。
第十方面,本申请实施例提供一种芯片,包括通信接口和至少一个处理器,处理器运行以执行本申请实施例第一方面或第一方面中任一设计、第二方面或第二方面中任一设计、第三方面或第三方面中任一设计的数据传输方法。
需要说明的是,本申请实施例中“耦合”是指两个部件彼此直接或间接地结合。
图1为本申请实施例提供的一种PCIe***的架构示意图;
图2为本申请实施例提供的另一种PCIe***的架构示意图;
图3为本申请实施例提供的一种TLP的结构示意图;
图4为本申请实施例提供的一种TLP头的结构示意图;
图5为本申请实施例提供的一种基于PCIe***的数据传输***的流程示意图;
图6为本申请实施例提供的一种摄像头的结构示意图;
图7为本申请实施例提供的一种指示第一封装信息的示意图;
图8为本申请实施例提供的另一种第一封装信息的示意图;
图9为本申请实施例提供的一种图像业务的示意图;
图10为本申请实施例提供的另一种图像业务的示意图;
图11为本申请实施例提供的另一种图像业务的示意图;
图12为本申请实施例提供的另一种图像业务的示意图;
图13为本申请实施例提供的另一种图像业务的示意图;
图14为本申请实施例提供的另一种图像业务的示意图;
图15为本申请实施例提供的另一种图像业务的示意图;
图16为本申请实施例提供的一种PCIe***的架构示意图;
图17为本申请实施例提供的一种数据传输装置的结构示意图;
图18为本申请实施例提供的另一种数据传输装置的结构示意图;
图19为本申请实施例提供的另一种数据传输装置的结构示意图;
图20为本申请实施例提供的另一种数据传输装置的结构示意图。
PCIe是一种高速短距离通信接口,广泛应用在计算机、测试仪器等设备中。目前,由于PCIe可以快速直接读写内存,提供大带宽通信,一些车企将其传输距离加长,作为车内网大数据量通信端口。但是由于PCIe工作机制的限制,不能完全适用于车内网所有场景。
如图1所示为一个PCIe***,***的主要组成单元有Root(图1中示出为根节点)、Switch(图1中示出为交换节点)和Endpoint(图1中示出为端节点)。Root负责管理PCIe***中所有总线(图1中以黑色连线示出)和节点,是CPU和***中其他设备通信的桥梁,CPU同所有的设备通信经过Root。Switch作为桥梁连接Root、其他Switch、以及Endpoint,作为数据转发的节点。Endpoint为端设备,如外设(peripheral),负责发送或者接收数据。
如图2所示为包括两个PCIe***的通信***,两个PCIe***可以通过非透明桥(non-transparent bridge,NTB)进行通信。NTB可以部署在Switch上。由于一个PCIe***中的设备都有各自的Root独立管理,因此不同的PCIe***中的设备的地址和ID会有冲突,为了能让两个***连接并且正常通信,需要在两个***之间进行桥接转换,进行地址,或ID的翻译,NTB可以负责地址或者ID转换,使两个PCIe***相互通信。
PCIe***中Endpoint与Endpoint之间不能直接通信,必须经过Root,因为只有Root知道Endpoint中有哪些功能,支持什么类型的数据。PCIe***中的Endpoint的功能,如支持的数据类型、格式等信息都存放在Endpoint的配置空间中,且只有Root有权限去读取Endpoint的配置空间,其他Endpoint和Switch均无权限读取。因此Endpoint支持的数据类型、格式信息只有Root知道,其他节点无法获取。而PCIe***中Endpoint不知道其他Endpoint支持的数据类型、格式,不经过Root无法进行通信。
如图1中,虽然Endpoint1与Endpoint2连接在一个Switch上,但两者是不能直接通过Switch通信的,Endpoint1/2必须先同Root通信,经Root才能找到Endpoint2/1,例如,Endpoint1向Endpoint2发送数据的过程为,Endpoint1将数据发送给Switch1,Switch1将该数据发送给Root,Root根据各个Endpoint的功能确定数据接收方为Endpoint2,Root将数据发送给Switch1,Switch1将数据发送给Endpoint2。
PCIe***中Endpoint之间通过Root通信的机制导致其不能适用于车内网很多场景,如环形车内网要求传感器直接连接在网关上,传感器的数据经环网上的网关/交换机进行交换转发传输到不同的计算/显示单元,这种车内网架构要求传感器数据可以经网关/交换机 向任意方向转发,以提供通信链路冗余,从而保证车内通信安全,因此车内环网需使用其他接口。这种情况导致车内网中存在多种传输接口,各种接口之间进行信息交互需要接口转换,不同接口之间的转换导致车内网复杂度大幅提升。
基于此,本申请实施例提供一种基于PCIe的数据传输方法及装置,用于解决现有技术中Endpoint之间通过Root通信的机制导致车内网中存在多种传输接口,车内网复杂度较大的问题。其中,方法和装置是基于同一技术构思的,由于方法及设备解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。本申请实施例提供一种基于PCIe的数据传输方法及装置,可以应用于车内网,特别是自动驾驶汽车车内网,也可以应用于其他设备的PCIe***。
为了方便理解本申请实施例,下面对PCIe基础规范修订5.0版本1.0(PCI Express Base Specification Revision 5.0 Version 1.0)中TLP的结构进行说明。
TLP的结构可以如图3所示,可以包括TLP前缀(TLP Prefixes)、TLP头(TLP Header)、数据负荷(Data Payload)、TLP摘要(TLP Digest)。其中,TLP Prefixes长度可以为H字节(Byte),H为大于0的整数;TLP Header长度可以为12/16个字节组成,用于指示PCIe业务类型;Data Payload为数据部分,长度可以为0-4K Byte;TLP Digest长度可以为4字节,指示的内容可以为循环冗余校验码(end-to-end 32bit cyclic redundancy check,ECRC),例如,ECRC可以为循环冗余校验(cyclic redundancy check,CRC)校验码,用于校验数据包传输正确与否。
其中,以16Byte的TLP Header为例,TLP Header的结构可以如图4所示,包括:
格式(format,Fmt)字段:该字段的长度可以为3比特(bit),用于指示TLP Header长度以及TLP是否有Data Payload部分,TLP Header长度有2种,TLP是否包含Data Payload有是和否2种情况,因此,Fmt字段可以指示4种信息,分别为:TLP Header长度为第一种长度且TLP包含Data Payload、TLP Header长度为第一种长度且TLP不包含Data Payload、TLP Header长度为第二种长度且TLP包含Data Payload、TLP Header长度为第二种长度且TLP不包含Data Payload,此外,Fmt字段还可以指示TLP前缀(Prefix)。Fmt字段包括3bit,共8个状态值,其中,8个状态值中的5个状态值可以用来指示上述5种信息,剩下3个状态值为保留(reserved)。例如,000、001、010、011、100这5个状态值可以用于指示上述5种信息,剩下101、110、111这3个状态值为保留(reserved)。
类型(Type)字段:5bit,用于指示TLP的业务类型。PCIe业务类型有6大类,分别为:存储器(Memory)读/写、输入/输出(input/output,I/O)读/写、配置(Configuration)读/写、消息(Message)请求、结束(Completion)、原子操作。Type字段包括5bit,共32个状态值,PCI Express Base Specification Revision 5.0 Version 1.0中使用其中的19个状态值指示TLP的业务类型,剩下13个状态值为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为reserve。
T9/T8:预留bit。
优先级(traffic class,TC)字段:用于指示调度优先级。
属性(attributes,Attr)字段:用于指示TLP属性。其中,TLP属性可以指TLP处理方式,例如订购处理(Ordering)、硬件一致性管理(Hardware coherency management(snoop)) 等等。
轻量级指示(lightweight notification,LN)字段:轻量级指示,PCIe定义的一种简单读写方式。
TLP处理提示(TLP processing hints,TH)字段:用于指示TLP Header尾部是否有PH(Processing Hints)。
TLP摘要指示(indicates presence of TLP Digest,TD)字段:用于指示TLP尾部是否包含TLP摘要。
中毒数据(poisoned data,EP):用于指示是否为中毒数据。
地址类型(address type,AT):用于指示地址是否需要翻译。
长度(Length):用于指示Data Payload长度,可以以4字节为最小单位。
Byte4-Byte7:根据业务类型定义,即根据Type字段指示的业务类型,Byte4-Byte7可以指示该业务类型相应的内容。
Byte8-Byte15:根据路由方式不同内容不同,填充地址或者ID。其中,Byte8-Byte11可以填充目的节点的地址或者目的节点的ID,Byte12-Byte15可以填充源节点的地址或者源节点的ID。或者,Byte8-Byte11可以填充源节点的地址或者源节点的ID,Byte12-Byte15可以填充目的节点的地址或者目的节点的ID。
可以理解的,12Byte的TLP Header的结构与16Byte的TLP Header的结构类型类似,区别在于16Byte的TLP Header中Byte4-Byte7根据业务类型定义,Byte8-Byte15填充地址信息,而12Byte的TLP Header中Byte4-Byte7根据业务类型定义,Byte8-Byte11填充地址信息。
本申请实施例提供的方法基于该PCI Express Base Specification Revision 5.0 Version 1.0公开的TLP结构。本申请实施例中涉及的“预留值”可以指PCI Express Base Specification Revision 5.0 Version 1.0中未被使用的状态值,例如,Fmt字段的101、110、111这3个状态值,“预留值”也可以称为“reserve值”。本申请实施例中涉及的“预留bit”可以指PCI Express Base Specification Revision 5.0 Version 1.0中TLP未被使用的比特位,例如,TLP Header的T8/T9,“预留比特”也可以称为“保留比特位”、“预留比特位”等。
可以理解的,在后续演进版本中,本申请实施例中涉及的“预留值”也可以指对应演进版本中TLP未被使用的比特位,本申请实施例不作限制。
下面介绍与本申请实施例相关的术语:
数据类型可以但不限于包括:图像、音频、控制类信息、SWRITE、安全等。
数据类型对应的封装参数可以用于表征数据类型的属性。例如,若数据类型为图像,则封装参数可以但不限于包括如下4种参数:
图像数据类型:RAW、RGB、YUV、嵌入式数据(embedded data)、压缩图像、图像中目标轮廓(Object)等;
像素比特量化深度:如12、20、24等;
分辨率:如1080P、2K、4K等;
分段指示信息:图像感光(sensor)一次输出一行图像,对于分辨率高的图像TLP无法一次传输一行图像,需将一行图像分成若干个TLP传输。分段指示信息用于指示当前TLP是当前行的第几段。
若数据类型为音频,则封装参数可以但不限于包括如下4种参数:
采样量化格式:如浮点量化,整数量化等;
采样频率:如24KHz,48KHz等;
量化深度:如每个采样8bit,12bit等;
声道数/通道数:用于指示当前数据包包含几个声道/通道。
若数据类型为控制类信息,则封装参数可以但不限于包括如下2种参数:
控制类信息类型:如集成电路总线(inter-integrated circuit,I2C)、通用输入/输出(general-purpose input/output,GPIO)、串行外设接口(serial peripheral interface,SPI)等;
每类控制信息数量:例如当前数据包包含3路I2C,8路GPIO。
若数据类型为安全,则封装参数可以但不限于包括如下3种参数:
消息类型:建立安全需要多条消息交互,每条交互消息的类型不同,如鉴权消息、加密消息等;
格式指示:消息中的bit如何分组,每个组表示什么意思;
加密与否:当前数据包是否加密。
若数据类型为SWRITE,则封装参数可以但不限于包括如下1种参数:
对齐方式:以4字节为最小单位对齐,还是8字节为最小单位对齐。
上述数据类型仅是一种示例性说明,在具体实施中并不限于本申请实施例列举的数据类型。上述各个数据类型对应的封装参数仅是一种示例性说明,在具体实施中,上述各数据类型也可以对应其他的封装参数,这里不做具体限定。
可以理解的,本申请实施例中,“数据类型”仅是一种示例性命名,在具体实施中也可以命名为其他,如也可以称为数据业务类型等,或者,数据类型也可以称为A,只要A与本申请实施例中数据类型具有相同或相似的含义可以将A理解为本申请实施例中的数据类型。“封装参数”仅是一种示例性命名,在具体实施中也可以命名为其他,如也可以称为属性、属性参数等,或者,也可以称为B,只要B与本申请实施例中封装参数具有相同或相似的含义可以将B理解为本申请实施例中的封装参数。
应理解,本申请实施例中“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一(项)个”或其类似表达,是指的这些项中的任意组合,包括单项(个)或复数项(个)的任意组合。例如,a、b或c中的至少一项(个),可以表示:a,b,c,a和b,a和c,b和c,或a、b和c,其中a、b、c可以是单个,也可以是多个。
需要理解的是,在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
下面将结合附图,对本申请实施例进行详细描述。
本申请提供一种基于PCIe的数据传输方法,该方法可以应用于PCIe***,例如,如图1所示的PCIe***,或者如图2所示的PCIe***等等。如图5所示,该方法包括:
S501,第一节点将数据封装成TLP,其中,TLP包括TLP Header。TLP Header的第一字段和第二字段用于指示第一封装信息,第一封装信息包括该数据的数据类型以及数据类型对应的至少一个封装参数。其中,第一节点可以为PCIe***中的端节点,也可以为PCIe***中的交换节点。
数据可以携带在TLP的Data Payload部分。
在一些实施例中,第一节点可以是端节点也可以是端节点中的芯片,例如第一节点可以是端节点中传输节点(如TX/RX)等。以摄像机(Camera)为例,Camera的结构可以如图6所示,包括镜头(lens)、感光元件(complementary metal oxide semiconductor,COMS)以及TX/RX等等,其中,COMS用于通过镜头采集图像数据,并通过TX/RX发送出去。第一节点可以是Camera,也可以是Camera中TX/RX。若第一节点是端节点,第一节点进行封装的数据可以是自身采集的数据,例如,第一节点是Camera,进行封装的数据可以是Camera采集的图像数据等等,第一节点是麦克风,进行封装的数据可以是麦克风采集的音频数据等等。若第一节点是端节点中的传输节点,第一节点进行封装的数据可以是端节点中传感芯片采集的数据,以图6为例,第一节点进行封装的数据可以是COMS采集的图像数据。
在一种可能的实施方式中,在步骤S501之前,第一节点可以提取数据的封装参数。以图6为例,若第一节点为Camera,第一节点可以确定所采集图像数据的图像数据类型、像素量化深度、分辨率等,并根据图像数据类型、像素量化深度、分辨率等可以计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量可得出传输一行图像需要TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。若第一节点为Camera中的TX/RX,第一节点可以接收COMS采集的图像数据,该图像数据显示携带图像数据类型、像素量化深度、分辨率等封装参数,第一节点可以根据该图像数据携带的图像数据类型、像素量化深度、分辨率等计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量可得出传输一行图像需要TLP的数量,进而决定图像的分段方式,从而可以根据分段方式确定分段指示信息。
示例性的,第一字段可以为Type字段,第二字段可以为Fmt字段。或者,第一字段为Fmt字段,第二字段为Type字段。当然,第一字段、第二字段也可以为其他字段,这里不做具体限定。为了描述上的方便,下面以第一字段为Fmt字段,第二字段为Type字段为例进行说明。
一种示例性说明中,可以使用Fmt字段的预留值和Type字段的所有状态值指示第一封装信息,例如,使用Fmt字段的101,110,111三个状态值,以及Type字段的00000~11111共32个状态值,因此,共3×32个状态值可以指示第一封装信息。
另一种示例性说明中,可以使用Fmt字段的所有状态值和Type字段的预留值指示第一封装信息,例如,使用Fmt字段的000~111共8个状态值,以及Type字段的00011、00110、00111、01000、01001、01111、11000~11010、11100~11111这13个状态值,因此,共8×13个状态值可以指示第一封装信息。
又一种示例性说明中,可以使用Fmt字段的预留值和Type字段的预留值指示第一封装信息,例如,使用Fmt字段的101,110,111三个状态值,以及Type字段的00011、00110、00111、01000、01001、01111、11000~11010、11100~11111这13个状态值,因此,共3×13个状态值可以指示第一封装信息。
一种实现方式中,可以将Fmt字段和Type字段进行统一编码(或者联合编码)后指示第一封装信息,即通过比特集合的取值指示第一封装信息,比特集合包括Fmt字段的3个比特以及Type字段的5个比特,从而可以通过这8个比特的状态值(如10100000等)指示第一封装信息,如图7所示。
这种实现方式中,可以将数据的数据类型以及数据类型对应的至少一个封装参数进行绑定后,得到多个信息集合,其中,信息集合1包括:数据类型为图像、图像类型为YUV、图像分辨率为2K、像素量化深度为12、当前TLP是当前行的第1段,信息集合2包括:数据类型为图像、图像类型为YUV、图像分辨率为2K、像素量化深度为12、当前TLP是当前行的第2段,信息集合3包括:数据类型为图像、图像类型为RGB、图像分辨率为4K、像素量化深度为12、当前TLP是当前行的第1段,等等。通过比特集合的状态值指示信息集合,从而接收侧节点可以根据比特集合确定对应的信息集合。
另一种实现方式中,Fmt字段和Type字段可以指示不同的信息,例如,Fmt字段可以指示数据类型,Type字段可以指示该数据类型对应的至少一个封装参数,如图8所示。示例性的,以数据类型为安全为例,Fmt字段可以指示数据类型为安全,例如101表示安全业务。Type字段可以指示消息类型,例如00000指示加密建立消息,00001表示接口鉴权消息,00010表示图像加密数据,00011表示加密的memory读等等。
在一些实施例中,TLP Header还可以包括第三字段,示例性的,第三字段可以是16 Byte的TLP Header的Byte4-Byte15,也可以是12Byte的TLP Header的Byte4-Byte11。
一种可能的实施方式中,TLP Header可以通过Fmt字段和Type字段指示数据类型以及该数据类型对应的封装参数。这种实施方式中,第三字段可以不携带封装参数。其中,Fmt字段和Type字段可以通过联合编码的方式指示数据类型以及该数据类型对应的封装参数,或者,也可以使用Fmt字段和Type字段分开指示的方式指示数据类型以及该数据类型对应的封装参数,例如,Fmt字段指示数据类型,Type字段的预留值指示该数据类型对应的封装参数。以数据类型为图像为例,Fmt字段和Type字段指示:图像业务、图像数据类型、像素量化深度、分辨率、分段指示信息,如图9或图10所示。
另一种可能的实施方式中,TLP Header可以通过Fmt字段和Type字段指示数据类型以及该数据类型对应的一部分封装参数,通过第三字段携带数据类型对应的另一部分封装参数。也可以理解为,第三字段可以携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。其中,Fmt字段和Type字段可以通过联合编码的方式指示数据类型以及该数据类型对应的一部分封装参数,或者,也可以使用Fmt字段和Type字段分开指示的方式指示数据类型以及该数据类型对应的一部分封装参数,例如,Fmt字段指示数据类型,Type字段的预留值指示该数据类型对应的一部分封装参数。以数据类型为图像为例,Fmt字段和Type字段指示:图像业务、图像数据类型,第三字段指示:像素量化深度、分辨率、分段指示信息,如图11或图12所示。应理解,图11或图12仅是一种示例性说明,并不对各个封装参数的长度以及在TLP Header中的位置进行具体限定。
又一种可能的实施方式中,TLP Header可以通过Fmt字段和Type字段指示数据类型,通过第三字段携带数据类型对应的封装参数。这种实施方式中,Fmt字段和Type字段可以不指示封装参数。其中,Fmt字段和Type字段可以通过联合编码的方式指示数据类型,或者,也可以使用Fmt字段的预留值指示数据类型,或者,也可以使用Type字段的预留值指示数据类型。以数据类型为图像为例,Fmt字段和Type字段指示:图像业务,第三字段指示:图像数据类型、像素量化深度、分辨率、分段指示信息,如图13所示。或者,Fmt字段的预留值指示:图像业务,第三字段指示:图像数据类型、像素量化深度、分辨率、分段指示信息,如图14所示。或者,Type字段的预留值指示:图像业务,第三字段指示: 图像数据类型、像素量化深度、分辨率、分段指示信息,如图15所示。应理解,图14或图15仅是一种示例性说明,并不对各个封装参数的长度以及在TLP Header中的位置进行具体限定。
通过上述方式可以指示图像、音频、控制类信息、SWRITE、安全中的一种业务的一种格式。或者,也可以指示图像、音频、控制类信息、SWRITE、安全中的一种业务的多种格式。或者,也可以指示图像、音频、控制类信息、SWRITE、安全中的多种业务的多种格式。或者,还可以指示图像、音频、控制类信息、SWRITE、安全中的多种业务混合(如带安全保护的图像等等)。或是其他业务类型及格式,这里不再一一列举。
此外,TLP中还可以携带目的节点(下面统一称为第三节点)的身份信息,例如第三节点的地址、ID等。TLP中还可以携带第一节点的身份信息,例如第一节点的地址、ID等。一种示例为,若TLP Header的长度为16 Byte,则TLP Header的Byte8-Byte15可以携带第一节点、第三节点的身份信息。若TLP Header的长度为12 Byte,则TLP Header的Byte8-Byte11可以携带第一节点、第三节点的身份信息。其中,第三节点可以为PCIe***中的端节点,也可以为PCIe***中的交换节点。
S502,第一节点向第二节点发送TLP。相应的,第二节点接收第一节点发送的该TLP。其中,第二节点可以为PCIe***中的端节点,也可以为PCIe***中的交换节点。一种示例性说明中,第二节点可以为PCIe***中第一节点连接的交换节点。
S503,第二节点向第三节点发送TLP。相应的,第三节点接收第二节点发送的TLP。
一种实现方式中,第二节点发送的TLP与第一节点发送的TLP为同一个TLP,即,第二节点在接收到第一节点发送的TLP后,将该TLP转发给第三节点。
另一种实现方式中,第二节点发送的TLP与第一节点发送的TLP为不同TLP,即,第二节点在接收到第一节点发送的TLP后,对该TLP进行处理,例如将该TLP的源节点信息由第一节点的身份信息修改为第二节点的身份信息等等,然后将经过处理后的TLP发送给第三节点,其中,第二节点发送的TLP与第一节点发送的TLP所携带的数据或数据的内容相同,封装信息也可以相同。第二节点发送的TLP携带数据、封装信息的方式可以参阅上述步骤S501的相关描述,这里不再赘述。
在一些实施例中,在步骤S503之前,第二节点可以基于第三节点的身份信息确定路由路径。从而,第二节点可以按照该路由路径向第三节点发送TLP。
S504,第三节点基于第一封装信息获得数据。
具体的,第三节点基于第一封装信息对第二节点发送的TLP进行解封装,获得数据。
在一种可能的实施方式中,第三节点可以从接收到TLP中获取数据类型以及数据类型对应的封装参数,根据数据类型以及数据类型对应的封装参数确定TLP所携带数据的格式,并基于该格式对TLP进行解封装。
一种实现方式中,第三节点可以根据TLP Header的Fmt字段和Type字段确定数据类型以及数据类型对应的封装参数。例如,如图9所示,第三节点可以根据TLP Header的Fmt字段和Type字段确定TLP所携带数据为图像业务,并获取TLP所携带图像数据的图像数据类型、像素量化深度、分辨率、分段指示信息。
另一种实现方式中,第三节点可以根据TLP Header的Fmt字段和Type字段确定数据类型以及数据类型对应的部分封装参数,根据TLP Header的第三字段确定数据类型对应的剩余封装参数。例如,如图11所示,第三节点可以根据TLP Header的Fmt字段和Type 字段确定TLP所携带数据为图像业务,并获取TLP所携带图像数据的图像数据类型,第三节点可以根据TLP Header的第三字段获取TLP所携带图像数据的像素量化深度、分辨率、分段指示信息。
又一种实现方式中,第三节点可以根据TLP Header的Fmt字段和Type字段确定数据类型,根据TLP Header的第三字段确定数据类型对应的封装参数。例如,如图13所示,第三节点可以根据TLP Header的Fmt字段和Type字段确定TLP所携带数据为图像业务,并根据TLP Header的第三字段获取TLP所携带图像数据的图像数据类型、像素量化深度、分辨率、分段指示信息。
为了更好的理解本申请实施例提供的方案,下面结合图16所示的PCIe***,对数据传输过程进行具体描述。如图16所示,Camera 1(图16示出为摄像头1,其他Camera类似)或Camera 2拍摄的内容要显示到显示器(Display)上。Camera1/Camera2可以通过上述实施例中第一节点执行的数据传输方法将数据传输到Switch1和Switch2,Switch1可以通过上述实施例中第二节点执行的数据传输方法将数据传输到Switch2,Switch2可以通过上述实施例中第二节点执行的数据传输方法将数据传输到Display,Display可以通过上述实施例中第三节点执行的数据传输方法获取数据。下面以TLP Header的长度为16Byte为例,Camera1向Display传输数据的过程如下:
A1,Camera1根据输出的图像类型(如RGB、YUV等),每像素量化bit数,图像分辨率(如2K、4K等),计算出图像每一行数据量,结合PCIe每个TLP最大的数据承载量确定传输一行图像需要TLP的数量,进而决定图像的分段方式。
A2,Camera1将采集的图像数据封装成TLP。
示例性的,Camera1可以按照如下六种方式中任一种方式封装数据:
方式一:Camera1可以使用TLP Header的Fmt字段与Type字段统一编码后的一个状态值(如10100000)指示图像传输所需的信息,如数据类型为图像业务、图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图9所示。Camera1将数据填充到TLP的Data Payload部分。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式二:Camera1可以使用TLP Header的Fmt字段与Type字段统一编码后的一个状态值(如10100100)指示:数据类型为图像业务、图像数据的图像数据类型,使用TLP Header的Byte 4~Byte 15指示:图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图11所示。Camera1将数据填充到TLP的Data Payload部分。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式三,Camera1可以使用TLP Header的Fmt字段与Type字段统一编码后的一个状态值(如10101001)指示:数据类型为图像业务,使用TLP Header的Byte 4~Byte 15指示:图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图13所示。Camera1将数据填充到TLP的Data Payload部分。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式四:Camera1可以使用TLP Header的Fmt字段指示:数据类型为图像业务,Type字段指示:图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图 像数据的分段指示信息,如图10所示。Camera1将数据填充到TLP的Data Payload部分。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
方式五:Camera1可以使用TLP Header的Fmt字段指示:数据类型为图像业务,Type字段指示:图像数据的图像数据类型,使用TLP Header的Byte 4~Byte 15指示:图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息,如图12所示。Camera1将数据填充到TLP的Data Payload部分。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
上述五种方式中,Fmt字段与Type字段中至少一项可以使用预留值。下面以上述五种方式中Fmt字段使用预留值为例进行说明。
方式六:Camera1可以使用TLP Header的Fmt字段的预留值或者Type字段的预留值指示:数据类型为图像,使用TLP Header的Byte 4~Byte 15指示:图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。以Fmt字段的预留值指示:数据类型为图像为例,如图14所示。以Type字段的预留值指示:数据类型为图像为例,如图15所示。Camera1将数据填充到TLP的Data Payload部分。Camera1把表示自己的身份信息(如ID,地址)和Display的身份信息填充到TLP Header的Byte 8~Byte 15。
A3,Camera1将TLP发给Switch1。
A4,Switch1收到TLP后,检测TLP Header,解析Fmt字段,如果Fmt字段的状态值为是PCI Express Base Specification Revision 5.0 Version 1.0中使用的状态值,则按照原PCIe机制处理,即将TLP发送给Root,然后由Root根据访问各个端节点的配置空间确定接收侧节点,然后将TLP发送给接收侧节点。如果Fmt字段为本申请实施例定义的内容,则根据TLP中的Display的身份信息去搜索Switch1中的路由信息,按照对应的路由路径把TLP转发到Switch2。
A5,Switch2收到数据后,检测TLP Header,解析Fmt字段,如果Fmt字段的状态值为是PCI Express Base Specification Revision 5.0 Version 1.0中使用的状态值,则按照原PCIe机制处理,即将TLP发送给Root,然后由Root根据访问各个端节点的配置空间确定接收侧节点,然后将TLP发送给接收侧节点。如果Fmt字段为本申请实施例定义的内容,则根据TLP中的Display的身份信息去搜索Switch2中的路由信息,按照对应的路由路径把TLP发送给Display。
A6,Display收到TLP后,解析TLP Header,获取图像的类型和格式,并根据分段指示信息恢复一幅完整的图像,将数据传到显示屏上显示。
对应步骤A2中的方式一,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Fmt字段与Type字段,根据这8比特的状态值(如10100000)确定数据类型为图像、图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式二,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Fmt字段与Type字段,根据这8比特的状态值(如10100100)确定数据类型为图像、图像数据的图像数据类型。解析TLP Header的Byte 4~Byte 15确定图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式三,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Fmt字段与Type字段,根据这8比特的状态值(如10101001)确定数据类型为图像,解析TLP Header的Byte 4~Byte 15确定图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式四,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Fmt字段,根据Fmt字段的状态值确定数据类型为图像。解析TLP Header的Type字段,根据Type字段的状态值确定图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式五,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Fmt字段,根据Fmt字段的状态值确定数据类型为图像。解析TLP Header的Type字段,根据Type字段的状态值确定图像数据的图像数据类型。解析TLP Header的Byte 4~Byte 15确定图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
对应步骤A2中的方式六,Display可以通过如下方式获取图像的类型和格式:Display解析TLP Header的Fmt字段,根据Fmt字段的状态值确定数据类型为图像。解析TLP Header的Byte 4~Byte 15确定图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
或者,Display解析TLP Header的Type字段,根据Type字段的状态值确定数据类型为图像。解析TLP Header的Byte 4~Byte 15确定图像数据的图像数据类型、图像数据的像素量化深度、图像数据的分辨率、图像数据的分段指示信息。
本申请实施例通过利用Fmt字段与Type字段指示传输数据所需要的信息,如数据类型、数据类型对应的封装信息等,使得Endpoint之间即使不经过Root,也可以进行通信,从而可以降低车内网复杂度。
并且,通过使用Fmt字段、Type字段的预留值使得PCIe***可以兼容PCIe原有数据传输方法以及本申请实施例提供的数据传输方法。
基于与方法实施例的同一技术构思,本申请实施例提供一种数据传输装置。该装置的结构可以如图17所示,包括处理单元1701以及通信单元1702。
一种实现方式中,数据传输装置具体可以用于实现图5至图16的实施例中第一节点执行的方法,该装置可以是第一节点本身,也可以是第一节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,处理单元1701,用于将数据封装成TLP,其中,TLP包括包头部分,包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括数据的数据类型以及数据类型对应的至少一个封装参数;通信单元1702,用于向第二节点发送TLP。
一种示例性说明中,比特集合的取值指示第一封装信息,比特集合包括第一字段的比特以及第二字段的比特。
另一种示例性说明中,第一字段指示数据类型,第二字段指示至少一个封装参数。
第一字段可以为Type字段,第二字段为Fmt字段;或者,第一字段可以为Fmt字段,第二字段为Type字段。
一种实施方式中,包头部分的第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
第三字段可以为包头部分的字节4~字节15或字节4~字节11。
数据类型可以但不限于包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
第一字段为预留值。或者,第二字段为预留值。或者,第一字段和第二字段均为预留值。
另一种实现方式中,数据传输装置具体可以用于实现图5至图16的实施例中第三节点执行的方法,该装置可以是第三节点本身,也可以是第三节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,通信单元1702,用于接收第二节点发送的TLP,TLP的包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数;处理单元1701,用于基于第一封装信息获得数据。
一种示例性说明中,比特集合的取值指示第一封装信息,比特集合包括第一字段的比特以及第二字段的比特。
另一种示例性说明中,第一字段指示数据类型,第二字段指示至少一个封装参数。
第一字段可以为Type字段,第二字段为Fmt字段;或者,第一字段可以为Fmt字段,第二字段为Type字段。
数据类型可以但不限于包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
第一字段为预留值。或者,第二字段为预留值。或者,第一字段和第二字段均为预留值。
一种可能的实施方式中,处理单元1701,在基于第一封装信息获得数据时,可以具体用于:基于第一封装信息确定数据的格式;基于格式获得所述数据。
一种实施方式中,包头部分的第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
第三字段可以为包头部分的字节4~字节15或字节4~字节11。
一种可能的实施方式中,处理单元1701,在基于第一封装信息对TLP获得数据时,也可以具体用于:根据第一封装信息以及第二封装信息确定数据的格式;基于格式获得所述数据。
本申请实施例还提供一种数据传输装置。该装置的结构可以如图18所示,包括处理单元1801以及第一通信单元1802、第二通信单元1803。一种实现方式中,数据传输装置具体可以用于实现图5至图16的实施例中第二节点执行的方法,该装置可以是第二节点本身,也可以是第二节点中的芯片或芯片组或芯片中用于执行相关方法功能的一部分。其中,第一通信单元1802,用于与第一节点之间传输数据;第二通信单元1803,用于与第三节点之间传输数据;处理单元1801,用于通过第一通信单元1802接收第一节点发送的第一TLP;并通过第二通信单元1803向第三节点发送第二TLP;其中,TLP的包头部分的第一字段和第二字段用于指示第一封装信息,第一封装信息包括TLP所携带数据的数据类型以及数据类型对应的至少一个封装参数,TLP包括第一TLP和/或第二TLP。
一种示例性说明中,比特集合的取值指示第一封装信息,比特集合包括第一字段的比特以及第二字段的比特。
另一种示例性说明中,第一字段指示数据类型,第二字段指示至少一个封装参数。
第一字段可以为Type字段,第二字段为Fmt字段;或者,第一字段可以为Fmt字段,第二字段为Type字段。
一种实施方式中,包头部分的第三字段携带第二封装信息,第二封装信息包括数据类型对应的封装参数中除第一封装信息所包括封装参数以外的其它封装参数。
第三字段可以为包头部分的字节4~字节15或字节4~字节11。
数据类型可以但不限于包括如下至少一项:图像、音频、控制类信息、SWRITE、安全。
第一字段为预留值。或者,第二字段为预留值。或者,第一字段和第二字段均为预留值。
一种实施方式中,第一TLP还可以携带第三节点的身份信息。
处理单元1801,还可以用于:在通过第二通信单元1803向第三节点发送第二TLP之前,基于第三节点的身份信息确定路由路径;处理单元1801,在通过第二通信单元1803向第三节点发送第二TLP时,具体用于:按照路由路径向第三节点发送第二TLP。
本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理器中,也可以是单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。可以理解的是,本申请实施例中各个模块的功能或者实现可以进一步参考方法实施例的相关描述。
一种可能的方式中,数据传输装置可以如图19所示,该装置可以是端节点或者端节点中的芯片。该装置可以包括处理器1901,还可以包括通信接口1902,存储器1903。其中,处理单元1701可以为处理器1901。通信单元1702可以为通信接口1902。
处理器1901,可以是一个CPU,或者为数字处理单元等等。通信接口1902可以是收发器、也可以为接口电路如收发电路等、也可以为收发芯片等等。该装置还包括:存储器1903,用于存储处理器1901执行的程序。存储器1903可以是非易失性存储器,比如硬盘(hard disk drive,HDD)或固态硬盘(solid-state drive,SSD)等,还可以是易失性存储器(volatile memory),例如随机存取存储器(random-access memory,RAM)。存储器1903是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
处理器1901用于执行存储器1903存储的程序代码,具体用于执行上述处理单元1701的动作,本申请在此不再赘述。通信接口1902具体用于执行上述通信单元1702的动作,本申请在此不再赘述。
本申请实施例中不限定上述通信接口1902、处理器1901以及存储器1903之间的具体连接介质。本申请实施例在图19中以存储器1903、处理器1901以及通信接口1902之间通过总线1904连接,总线在图19中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
一种可能的方式中,数据传输装置可以如图20所示,该装置可以是交换节点或者交换节点中的芯片。该装置可以包括处理器2001,通信接口2002a,通信接口2002b,存储器2003。其中,处理单元1801可以为处理器2001。第一通信单元1802可以为通信接口2002a。第二通信单元1803可以为通信接口2002b。
处理器2001,可以是一个CPU,或者为数字处理单元等等。通信接口2002a,通信接口2002b可以是收发器、也可以为接口电路如收发电路等、也可以为收发芯片等等。该装置还包括:存储器2003,用于存储处理器2001执行的程序。存储器2003可以是非易失性存储器,比如HDD或SS)等,还可以是volatile memory,例如RAM。存储器2003是能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。
处理器2001用于执行存储器2003存储的程序代码,具体用于执行上述处理单元1801的动作,本申请在此不再赘述。通信接口2002a具体用于执行上述第一通信单元1802的动作,本申请在此不再赘述。通信接口2002b具体用于执行上述第二通信单元1803的动作,本申请在此不再赘述。
本申请实施例中不限定上述通信接口2002a、通信接口2002b、处理器2001以及存储器2003之间的具体连接介质。本申请实施例在图20中以存储器2003、处理器2001以及通信接口2002a、通信接口2002b之间通过总线2004连接,总线在图20中以粗线表示,其它部件之间的连接方式,仅是进行示意性说明,并不引以为限。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
本发明实施例还提供了一种计算机可读存储介质,用于存储为执行上述处理器所需执行的计算机软件指令,其包含用于执行上述处理器所需执行的程序。
本领域内的技术人员应明白,本申请的实施例可提供为方法、***、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。
Claims (56)
- 一种基于***组件互连传递PCIe的数据传输方法,其特征在于,包括:第一节点将数据封装成事务层包TLP,其中,所述TLP包括包头部分,所述包头部分的第一字段和第二字段用于指示第一封装信息,所述第一封装信息包括所述数据的数据类型以及所述数据类型对应的至少一个封装参数;所述第一节点向第二节点发送所述TLP。
- 如权利要求1所述的方法,其特征在于,比特集合的取值指示所述第一封装信息,所述比特集合包括所述第一字段的比特以及所述第二字段的比特。
- 如权利要求1所述的方法,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示所述至少一个封装参数。
- 如权利要求1至3任一项所述的方法,其特征在于,所述第一字段为类型Type字段,所述第二字段为Fmt字段;或者,所述第一字段为Fmt字段,所述第二字段为Type字段。
- 如权利要求1至4任一项所述的方法,其特征在于,所述包头部分的第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
- 如权利要求5所述的方法,其特征在于,所述第三字段为所述包头部分的字节4~字节15或字节4~字节11。
- 如权利要求1至6任一项所述的方法,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
- 如权利要求1至7任一项所述的方法,其特征在于,所述第一字段为预留值,和/或,所述第二字段为预留值。
- 一种基于***组件互连传递PCIe的数据传输方法,其特征在于,包括:第二节点接收第一节点发送的第一事务层包TLP;所述第二节点向第三节点发送第二TLP;其中,TLP的包头部分的第一字段和第二字段用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数,所述TLP包括所述第一TLP和/或所述第二TLP。
- 如权利要求9所述的方法,其特征在于,比特集合的取值指示所述第一封装信息,所述比特集合包括所述第一字段的比特以及所述第二字段的比特。
- 如权利要求9所述的方法,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示所述至少一个封装参数。
- 如权利要求9至11任一项所述的方法,其特征在于,所述第一字段为类型Type字段,所述第二字段为Fmt字段;或者,所述第一字段为Fmt字段,所述第二字段为Type字段。
- 如权利要求9至12任一项所述的方法,其特征在于,所述包头部分的第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
- 如权利要求13所述的方法,其特征在于,所述第三字段为所述包头部分的字节 4~字节15或字节4~字节11。
- 如权利要求9至14任一项所述的方法,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
- 如权利要求9至15任一项所述的方法,其特征在于,所述第一字段为预留值,和/或,所述第二字段为预留值。
- 如权利要求9至16任一项所述的方法,其特征在于,在所述第二节点向第三节点发送所述第二TLP之前,还包括:所述第一TLP携带所述第三节点的身份信息,所述第二节点基于所述第三节点的身份信息确定路由路径;所述第二节点向第三节点发送所述第二TLP,包括:所述第二节点按照所述路由路径向所述第三节点发送所述第二TLP。
- 一种基于***组件互连传递PCIe的数据接收方法,其特征在于,包括:第三节点接收第二节点发送的事务层包TLP,所述TLP的包头部分的第一字段和第二字段用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数;所述第三节点基于所述第一封装信息获得所述数据。
- 如权利要求18所述的方法,其特征在于,比特集合的取值指示所述第一封装信息,所述比特集合包括所述第一字段的比特以及所述第二字段的比特。
- 如权利要求18所述的方法,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示所述至少一个封装参数。
- 如权利要求18至20任一项所述的方法,其特征在于,所述第一字段为类型Type字段,所述第二字段为Fmt字段;或者,所述第一字段为Fmt字段,所述第二字段为Type字段。
- 如权利要求18至21任一项所述的方法,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
- 如权利要求18至22任一项所述的方法,其特征在于,所述第一字段为预留值,和/或,所述第二字段为预留值。
- 如权利要求18至23任一项所述的方法,其特征在于,所述第三节点获得所述数据,包括:所述第三节点基于所述第一封装信息确定所述数据的格式;所述第三节点基于所述格式获得所述数据。
- 如权利要求18至23任一项所述的方法,其特征在于,所述包头部分的第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
- 如权利要求25所述的方法,其特征在于,所述第三字段为所述包头部分的字节4~字节15或字节4~字节11。
- 如权利要求25或26所述的方法,其特征在于,所述第三节点基于所述第一封装信息获得所述数据,包括:所述第三节点根据所述第一封装信息以及所述第二封装信息确定所述数据的格式;所述第三节点基于所述格式获得所述数据。
- 一种基于***组件互连传递PCIe的数据传输装置,其特征在于,包括:处理单元,用于将数据封装成事务层包TLP,其中,所述TLP包括包头部分,所述包头部分的第一字段和第二字段用于指示第一封装信息,所述第一封装信息包括所述数据的数据类型以及所述数据类型对应的至少一个封装参数;通信单元,用于向第二节点发送所述TLP。
- 如权利要求28所述的装置,其特征在于,比特集合的取值指示所述第一封装信息,所述比特集合包括所述第一字段的比特以及所述第二字段的比特。
- 如权利要求28所述的装置,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示所述至少一个封装参数。
- 如权利要求28至30任一项所述的装置,其特征在于,所述第一字段为类型Type字段,所述第二字段为Fmt字段;或者,所述第一字段为Fmt字段,所述第二字段为Type字段。
- 如权利要求28至31任一项所述的装置,其特征在于,所述包头部分的第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
- 如权利要求32所述的装置,其特征在于,所述第三字段为所述包头部分的字节4~字节15或字节4~字节11。
- 如权利要求28至33任一项所述的装置,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
- 如权利要求28至34任一项所述的装置,其特征在于,所述第一字段为预留值,和/或,所述第二字段为预留值。
- 一种基于***组件互连传递PCIe的数据传输装置,其特征在于,包括:第一通信单元,用于与第一节点之间传输数据;第二通信单元,用于与第三节点之间传输数据;处理单元,用于通过所述第一通信单元接收所述第一节点发送的第一事务层包TLP;并通过所述第二通信单元向所述第三节点发送第二TLP;其中,TLP的包头部分的第一字段和第二字段用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数,所述TLP包括所述第一TLP和/或所述第二TLP。
- 如权利要求36所述的装置,其特征在于,比特集合的取值指示所述第一封装信息,所述比特集合包括所述第一字段的比特以及所述第二字段的比特。
- 如权利要求36所述的装置,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示所述至少一个封装参数。
- 如权利要求36至38任一项所述的装置,其特征在于,所述第一字段为类型Type字段,所述第二字段为Fmt字段;或者,所述第一字段为Fmt字段,所述第二字段为Type字段。
- 如权利要求36至39任一项所述的装置,其特征在于,所述包头部分的第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
- 如权利要求40所述的装置,其特征在于,所述第三字段为所述包头部分的字节 4~字节15或字节4~字节11。
- 如权利要求36至41任一项所述的装置,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
- 如权利要求36至42任一项所述的装置,其特征在于,所述第一字段为预留值,和/或,所述第二字段为预留值。
- 如权利要求36至43任一项所述的装置,其特征在于,所述第一TLP携带所述第三节点的身份信息,所述处理单元,还用于:在通过所述第二通信单元向所述第三节点发送所述第二TLP之前,基于所述第三节点的身份信息确定路由路径;所述处理单元,在通过所述第二通信单元向所述第三节点发送所述第二TLP时,具体用于:按照所述路由路径向所述第三节点发送所述第二TLP。
- 一种基于***组件互连传递PCIe的数据接收装置,其特征在于,包括:通信单元,用于接收第二节点发送的事务层包TLP,所述TLP的包头部分的第一字段和第二字段用于指示第一封装信息,所述第一封装信息包括所述TLP所携带数据的数据类型以及所述数据类型对应的至少一个封装参数;处理单元,用于基于所述第一封装信息获得所述数据。
- 如权利要求45所述的装置,其特征在于,比特集合的取值指示所述第一封装信息,所述比特集合包括所述第一字段的比特以及所述第二字段的比特。
- 如权利要求45所述的装置,其特征在于,所述第一字段指示所述数据类型,所述第二字段指示所述至少一个封装参数。
- 如权利要求45至47任一项所述的装置,其特征在于,所述第一字段为类型Type字段,所述第二字段为Fmt字段;或者,所述第一字段为Fmt字段,所述第二字段为Type字段。
- 如权利要求45至48任一项所述的装置,其特征在于,所述数据类型包括如下至少一项:图像、音频、控制类信息、流写SWRITE、安全。
- 如权利要求45至49任一项所述的装置,其特征在于,所述第一字段为预留值,和/或,所述第二字段为预留值。
- 如权利要求45至50任一项所述的装置,其特征在于,所述处理单元,具体用于:基于所述第一封装信息确定所述数据的格式;基于所述格式获得所述数据。
- 如权利要求45至50任一项所述的装置,其特征在于,所述包头部分的第三字段携带第二封装信息,所述第二封装信息包括所述数据类型对应的封装参数中除所述第一封装信息所包括封装参数以外的其它封装参数。
- 如权利要求52所述的装置,其特征在于,所述第三字段为所述包头部分的字节4~字节15或字节4~字节11。
- 如权利要求52或53所述的装置,其特征在于,所述处理单元具体用于:根据所述第一封装信息以及所述第二封装信息确定所述数据的格式;基于所述格式获得所述数据。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质中存储程序或 指令,所述程序或所述指令在被一个或多个处理器读取并执行时可实现权利要求1至27任一项所述的方法。
- 一种计算机程序产品,其特征在于,当所述计算机程序产品在端节点上运行时,使得所述端节点执行权利要求1至8任一项所述的方法,或者,使得所述端节点执行权利要求18至27任一项所述的方法;或者当所述计算机程序产品在交换节点上运行时,使得所述交换节点执行权利要求9至17任一项所述的方法。
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP20915621.5A EP4080840A4 (en) | 2020-01-22 | 2020-01-22 | DATA TRANSFER METHOD AND DEVICE BASED ON PCIE |
CN202080003177.0A CN113498597B (zh) | 2020-01-22 | 2020-01-22 | 一种基于PCIe的数据传输方法及装置 |
PCT/CN2020/073926 WO2021147051A1 (zh) | 2020-01-22 | 2020-01-22 | 一种基于PCIe的数据传输方法及装置 |
US17/870,494 US20220368781A1 (en) | 2020-01-22 | 2022-07-21 | PCIe-Based Data Transmission Method and Apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2020/073926 WO2021147051A1 (zh) | 2020-01-22 | 2020-01-22 | 一种基于PCIe的数据传输方法及装置 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US17/870,494 Continuation US20220368781A1 (en) | 2020-01-22 | 2022-07-21 | PCIe-Based Data Transmission Method and Apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021147051A1 true WO2021147051A1 (zh) | 2021-07-29 |
Family
ID=76992024
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/073926 WO2021147051A1 (zh) | 2020-01-22 | 2020-01-22 | 一种基于PCIe的数据传输方法及装置 |
Country Status (4)
Country | Link |
---|---|
US (1) | US20220368781A1 (zh) |
EP (1) | EP4080840A4 (zh) |
CN (1) | CN113498597B (zh) |
WO (1) | WO2021147051A1 (zh) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114285917B (zh) * | 2021-12-29 | 2023-03-10 | 无锡众星微***技术有限公司 | 一种基于PCIe NTB的多主机通讯方法和装置 |
CN115632976A (zh) * | 2022-10-25 | 2023-01-20 | 深圳市楠菲微电子有限公司 | 一种pcie事务层报文生成方法、装置及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060161707A1 (en) * | 2005-01-20 | 2006-07-20 | Dot Hill Systems Corporation | Method for efficient inter-processor communication in an active-active RAID system using PCI-express links |
CN103023824A (zh) * | 2012-12-11 | 2013-04-03 | 华为技术有限公司 | 基于周边组件接口快速通道PCIe的数据传输***及方法 |
CN103532807A (zh) * | 2013-10-12 | 2014-01-22 | 江苏华丽网络工程有限公司 | 一种用于pcie数据服务质量管理的技术 |
US20140281104A1 (en) * | 2013-03-15 | 2014-09-18 | Sofin Raskin | System and method of sending pci express data over ethernet connection |
CN105185414A (zh) * | 2015-09-15 | 2015-12-23 | 北京京存技术有限公司 | 一种测试方法和装置 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7849252B2 (en) * | 2008-05-30 | 2010-12-07 | Intel Corporation | Providing a prefix for a packet header |
CN102821082A (zh) * | 2011-06-10 | 2012-12-12 | 成都市华为赛门铁克科技有限公司 | 一种数据传输方法、装置和*** |
US20140372660A1 (en) * | 2013-06-14 | 2014-12-18 | National Instruments Corporation | Packet Routing Based on Packet Type in Peripheral Component Interconnect Express Bus Systems |
CN105378694B (zh) * | 2013-07-31 | 2019-05-14 | 英特尔公司 | 用于执行与通用串行总线(usb)装置的管理组件传输协议(mctp)通信的方法、设备和*** |
US9280290B2 (en) * | 2014-02-12 | 2016-03-08 | Oracle International Corporation | Method for steering DMA write requests to cache memory |
CN110389711B (zh) * | 2018-04-20 | 2023-04-04 | 伊姆西Ip控股有限责任公司 | 帮助端点设备实现sr-iov功能的方法、设备和非瞬态计算机可读介质 |
-
2020
- 2020-01-22 WO PCT/CN2020/073926 patent/WO2021147051A1/zh unknown
- 2020-01-22 EP EP20915621.5A patent/EP4080840A4/en active Pending
- 2020-01-22 CN CN202080003177.0A patent/CN113498597B/zh active Active
-
2022
- 2022-07-21 US US17/870,494 patent/US20220368781A1/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20060161707A1 (en) * | 2005-01-20 | 2006-07-20 | Dot Hill Systems Corporation | Method for efficient inter-processor communication in an active-active RAID system using PCI-express links |
CN103023824A (zh) * | 2012-12-11 | 2013-04-03 | 华为技术有限公司 | 基于周边组件接口快速通道PCIe的数据传输***及方法 |
US20140281104A1 (en) * | 2013-03-15 | 2014-09-18 | Sofin Raskin | System and method of sending pci express data over ethernet connection |
CN103532807A (zh) * | 2013-10-12 | 2014-01-22 | 江苏华丽网络工程有限公司 | 一种用于pcie数据服务质量管理的技术 |
CN105185414A (zh) * | 2015-09-15 | 2015-12-23 | 北京京存技术有限公司 | 一种测试方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
CN113498597B (zh) | 2022-10-28 |
EP4080840A1 (en) | 2022-10-26 |
CN113498597A (zh) | 2021-10-12 |
US20220368781A1 (en) | 2022-11-17 |
EP4080840A4 (en) | 2022-12-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021147050A1 (zh) | 一种基于PCIe的数据传输方法及装置 | |
US10387348B2 (en) | PCI express tunneling over a multi-protocol I/O interconnect | |
US11995020B2 (en) | PCIe data transmission method and apparatus | |
WO2021147045A1 (zh) | 一种基于PCIe的数据传输方法及装置 | |
US20220368781A1 (en) | PCIe-Based Data Transmission Method and Apparatus | |
US20220358074A1 (en) | PCIe-Based Data Transmission Method, Apparatus, and System | |
US20220358070A1 (en) | Pcie-based data transmission method and apparatus | |
US20220365899A1 (en) | PCIe-Based Data Transmission Method, Apparatus, and System | |
US20220365895A1 (en) | Pcie-based data transmission method and apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20915621 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2020915621 Country of ref document: EP Effective date: 20220722 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |