Patent Description:
A peripheral component interconnect express (peripheral component interconnect express, PCIe) standard is a high-speed serial computer expansion bus standard. The standard is widely applied in devices such as a personal computer and a server. A device performing communication according to the PCIe standard may be referred to as a PCIe device. When the PCIe device performs communication according to the PCIe standard, a high-speed serial link causes electromagnetic interference to another device due to features such as a high frequency and a centralized spectrum. To reduce the electromagnetic interference to the another device, the PCIe device may enable a spread spectrum clock (spread spectrum clock, SSC) function. In other words, the PCIe device modulates a reference clock by using a low frequency. In this case, a noise spectrum is dispersed, to reduce the electromagnetic interference to the another device. A typical communication system by using the PCIe standard may be shown in <FIG>. In <FIG>, a PCIe root complex (root complex, RC) may be considered as a host, and a PCIe endpoint (endpoint, EP) may be considered as an external device connected to the host. A retimer (retimer) is separately connected to the PCIe RC and the PCIe EP and is configured to extend a communication distance between the PCIe RC and the PCIe EP. In the system shown in <FIG>, two-way data exchange may be performed between any two directly connected components. For example, the PCIe RC may serve as a transmit end, and the retimer may serve as a receive end; or the retimer may serve as a transmit end, and the PCIe RC may serve as a receive end; or the PCIe EP may serve as a transmit end, and the retimer may serve as a receive end; or the retimer may serve as a transmit end, and the PCIe EP may serve as a receive end.

In the system shown in <FIG>, the PCIe RC, the PCIe EP, and the retimer use different reference clocks. This scenario may be referred to as an independent clock scenario. In the independent clock scenario, when the transmit end in the system enables the SSC function, the receive end needs to support SSC clock data recovery (clock data recovery, CDR). In other words, the receive end may perform clock data recovery (which may indicate that the receive end has an SSC capability) on spread spectrum data sent by the transmit end. In the existing PCIe protocol, a hardware and software procedure in which the transmit end and the receive end negotiate the SSC capability is not defined. Generally, the transmit end determines based on a parameter value predefined in software whether the receive end has the SSC capability, and the transmit end replaces firmware based on related information to adapt to a capability of the receive end.

Therefore, a negotiation mechanism between the transmit end and the receive end is urgently needed, so that the transmit end and the receive end can dynamically negotiate the SSC capability.

<CIT> discloses a peripheral component interconnect express (PCIe) device for supporting a separate reference clock with independent spread spectrum clocking (SSC) (SRIS), the PCIe device comprising: a connector in a structure to be connected to a PCIe host and configured to receive a first reference clock signal from the PCIe host; a clock signal generator configured to generate a second reference clock signal; and a selection circuit configured to determine whether the first reference clock signal is being supplied through the connector, and transmit one of the first reference clock signal and the second reference clock signal to a transceiver based on the determination.

<NPL>, provides specifications to enable separate Refelk with Independent Spread Spectrum Clocking (SSC) architecture.

Embodiments of this application provide a spread spectrum clock negotiation method, and a peripheral component interconnect express device and system, to implement dynamic negotiation between a transmit end and a receive end on an SSC capability in the peripheral component interconnect express system.

According to a first aspect, an embodiment of this application provides a spread spectrum clock negotiation method. The method includes the following steps: A first peripheral component interconnect express PCIe device receives first indication information sent by a second PCIe device. The first indication information is used to indicate whether the second PCIe device has a spread spectrum clock capability. The first PCIe device determines, based on the first indication information, whether to perform spread spectrum clock on a reference clock of the first PCIe device.

In the spread spectrum clock negotiation method provided in the first aspect, because the second PCIe device sends, to the first PCIe device, the first indication information used to indicate whether the second PCIe device has the spread spectrum clock capability, the first PCIe device may determine, based on the first indication information, whether to perform spread spectrum clock on the reference clock of the first PCIe device. If the first indication information indicates that the second PCIe device has the spread spectrum clock capability, the first PCIe device may enable an SSC function to complete dynamic negotiation between the first PCIe device and the second PCIe device on the SSC capability.

In a possible design, that the first PCIe device determines, based on the first indication information, whether to perform spread spectrum clock on the reference clock of the first PCIe device may be implemented in the following manner: The first PCIe device performs spread spectrum clock on the reference clock when the first indication information indicates that the second PCIe device has the spread spectrum clock capability.

In addition, after the first PCIe device performs spread spectrum clock on the reference clock, the first PCIe device may send data to the second PCIe device based on the reference clock obtained after the spread spectrum clock.

In the foregoing solution, after the first PCIe device enables the SSC function, the first PCIe device may send the data to the second PCIe device based on the reference clock obtained after the spread spectrum clock, to reduce electromagnetic interference to another device in a data transmission process. After receiving the data, the second PCIe device can trace and recover data with a large frequency offset, to complete data parsing.

That the first PCIe device receives the first indication information sent by the second PCIe device includes: The first PCIe device receives a first SKP ordered set sent by the second PCIe device. The first SKP ordered set carries the first indication information. The first PCIe device parses the first SKP ordered set to obtain the first indication information. In the foregoing solution, the first SKP ordered set is used to carry the first indication information, to reduce signaling exchange between the first PCIe device and the second PCIe device. Specifically, the first indication information may be carried by using a Vender defined field in the first SKP ordered set.

In a possible design, the method further includes: The first PCIe device receives second indication information sent by the second PCIe device. The second indication information is used to indicate whether the second PCIe device supports transmission/reception of an SKP ordered set at a specified rate less than a preset rate.

In a PCIe system, an SKP ordered set is sent between two PCIe devices at a high rate, to eliminate a frequency offset between the two PCIe devices. The high rate may be considered as the preset rate. After the first PCIe device and the second PCIe both enable the SSC function, a system bandwidth may be reduced if the first PCIe device and the second PCIe device still send an SKP ordered set at the preset rate. Therefore, in this embodiment of this application, if the second indication information received by the first PCIe device indicates that the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate less than the preset rate, the first PCIe device may periodically send a second SKP ordered set to the second PCIe device at the specified rate, thereby reducing reduction probability of the system bandwidth.

Further, after the first PCIe device receives the second indication information sent by the second PCIe device, the first PCIe device may periodically send the second SKP ordered set to the second PCIe device at the specified rate when the second indication information indicates that the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate.

In a possible design, that the first PCIe device receives the second indication information sent by the second PCIe device includes: The first PCIe device receives the first SKP ordered set sent by the second PCIe device. The first SKP ordered set carries the second indication information. The first PCIe device parses the first SKP ordered set to obtain the second indication information.

In the foregoing solution, the first SKP ordered set may be used to carry the second indication information, to reduce signaling exchange between the first PCIe device and the second PCIe device. Specifically, the second indication information may be carried by using a Vender defined field in the first SKP ordered set.

According to a second aspect, an example useful for understanding the invention provides a spread spectrum clock negotiation method. The method includes the following steps: A second peripheral component interconnect express PCIe device generates first indication information. The first indication information is used to indicate whether the second PCIe device has a spread spectrum clock capability. The second PCIe device sends the first indication information to a first PCIe device.

In the spread spectrum clock negotiation method provided in the second aspect, because the second PCIe device sends, to the first PCIe device, the first indication information used to indicate whether the second PCIe device has the spread spectrum clock capability, the first PCIe device may determine, based on the first indication information, whether to perform spread spectrum clock on a reference clock of the first PCIe device. If the first indication information indicates that the second PCIe device has the spread spectrum clock capability, the first PCIe device may enable an SSC function to complete dynamic negotiation between the first PCIe device and the second PCIe device on the SSC capability. Specifically, that the second PCIe device sends the first indication information to the first PCIe device includes: The second PCIe device sends a first SKP ordered set to the first PCIe device. The first SKP ordered set carries the first indication information.

In the foregoing solution, the first SKP ordered set may be used to carry the first indication information, to reduce signaling exchange between the first PCIe device and the second PCIe device.

In addition, after the second PCIe device sends the first indication information to the first PCIe device, the second PCIe device may receive data sent by the first PCIe device based on the reference clock obtained after the spread spectrum clock.

In a possible design, the method further includes: The second PCIe device generates second indication information. The second indication information is used to indicate whether the second PCIe device supports transmission/reception of an SKP ordered set at a specified rate less than a preset rate. The second PCIe device sends the second indication information to the first PCIe device.

In the foregoing solution, if the second indication information received by the first PCIe device indicates that the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate less than the preset rate, the first PCIe device may periodically send a second SKP ordered set to the second PCIe device at the specified rate, thereby reducing reduction probability of a system bandwidth.

Further, that the second PCIe device sends the second indication information to the first PCIe device includes: The second PCIe device sends the first SKP ordered set to the first PCIe device. The first SKP ordered set carries the second indication information.

In the foregoing solution, the first SKP ordered set may be used to carry the second indication information, to reduce signaling exchange between the first PCIe device and the second PCIe device.

In addition, before the second PCIe device sends the first indication information to the first PCIe device, the method further includes: The second PCIe device performs spread spectrum clock on a reference clock of the second PCIe device.

In the foregoing solution, if the second PCIe device has the SSC capability, before the second PCIe device sends the first indication information to the first PCIe device, the second PCIe device may first perform spread spectrum clock on the reference clock of the second PCIe device (that is, enable the SSC function). In this way, after the first PCIe device receives the first indication information and enables the SSC function based on the first indication information, the first PCIe device and the second PCIe device both enable the SSC function. Therefore, the first PCIe device and the second PCIe device may perform two-way data exchange based on the reference clock obtained after the spread spectrum clock.

According to a third aspect, an embodiment of this application further provides a PCIe device. For beneficial effects, refer to descriptions in the first aspect. A structure of the PCIe device includes a processor, and may further include a transmitter and a receiver. The processor is configured to support the PCIe device in executing a corresponding function in the method in the foregoing first aspect. The transceiver is configured to communicate with another PCIe device.

According to a fourth aspect, an example useful for understanding the invention of this application further provides a PCIe device. For beneficial effects, refer to descriptions in the second aspect. A structure of the PCIe device includes a processor, and may further include a transmitter and a receiver. The processor is configured to support the PCIe device in executing a corresponding function in the method in the foregoing second aspect. The transceiver is configured to communicate with another PCIe device.

According to a fifth aspect, this application further provides a PCIe system. The PCIe system includes the PCIe device provided in the third aspect and the PCIe device provided in the fourth aspect.

According to a sixth aspect, this application further provides a computer readable storage medium. The computer readable storage medium stores instructions. When the instructions are run on a computer, the computer is enabled to perform the method according to the foregoing aspects.

According to a seventh aspect, this application further provides a computer program product including instructions. When the instructions are run on a computer, the computer is enabled to perform the method according to the foregoing aspects.

According to an eighth aspect, this application further provides a computer chip. The chip is connected to a memory. The chip is configured to read and execute a software program stored in the memory, to perform the method according to the foregoing aspects.

Embodiments of this application may be applied to a PCIe system shown in <FIG>. A PCIe RC is a host, and a PCIe EP is an external device. A retimer is separately connected to the PCIe RC and the PCIe EP and is configured to extend a communication distance between the PCIe RC and the PCIe EP. In the PCIe system, communication is performed between the EP and the retimer and between the RC and the retimer both according to the PCIe standard.

In the PCIe system shown in <FIG>, two-way data exchange may be performed between any two directly connected components. For example, the PCIe RC may serve as a transmit end, and the retimer may serve as a receive end; or the retimer may serve as a transmit end, and the PCIe RC may serve as a receive end; or the PCIe EP may serve as a transmit end, and the retimer may serve as a receive end; or the retimer may serve as a transmit end, and the PCIe EP may serve as a receive end. Any component shown in <FIG> includes a transmitter (transmitter) and a receiver (receiver) to send and receive data. The PCIe protocol specifies that exchanged data is differential data when the components in the PCIe system exchange data.

It should be noted that, in actual application, the PCIe system may not include a retimer, that is, the PCIe RC is directly connected to the PCIe EP; or the PCIe system may include a plurality of (for example, two) retimers, and the plurality of retimers are cascaded to extend the communication distance between the PCIe RC and the PCIe EP to a greater extent.

As described above, in the PCIe system, two-way data exchange may be performed between any two directly connected components. In an independent clock scenario, if the transmit end enables an SSC function, a reference clock of the transmit end is modulated based on a low-frequency clock. A frequency offset range is large. A frequency jitter of the clock is directly reflected in data sent by the transmit end. Therefore, the receive end needs to be capable of tracing and recovering the differential data with the large frequency offset. In other words, the receive end supports SSC CDR. For example, before the PCIe RC sends data to the retimer, the PCIe RC needs to learn whether the retimer supports SSC CDR, to determine whether to enable the SSC function. For another example, before the retimer sends data to the PCIe EP, the retimer needs to learn whether the PCIe EP supports SSC CDR, to determine whether to enable the SSC function.

Specifically, for the components in the PCIe system, enabling the SSC function may be implemented through enabling an SSC generator (SSC Generation) circuit module in the component.

In addition, in the PCIe system, when the SSC function is not enabled, a skip (Skip, SKP for short) ordered set is sent between any two directly connected components at a high rate. The SKP ordered set is used to eliminate a frequency offset between the two components. The SKP ordered set may also be referred to as a control SKP bitstream (that is, control SKP bitstream) or an SKP packet. Generally, the SKP ordered set is periodically sent. For example, the PCIe EP periodically sends the SKP ordered set to the retimer, and the retimer also periodically sends the SKP ordered set to the PCIe EP, to eliminate a frequency offset between the PCIe EP and the retimer.

After the two components performing data exchange both enable the SSC function, a system bandwidth may be reduced if the two components still send an SKP ordered set at a high rate. Therefore, in this embodiment of this application, the two components performing data exchange may negotiate the SSC function, and may further negotiate whether to support transmission/reception of an SKP ordered set at a low rate. For example, before the PCIe RC sends data to the retimer, the PCIe RC needs to learn whether the retimer supports transmission/reception of the SKP ordered set at the low rate. If the retimer supports transmission/reception of the SKP ordered set at the low rate, the PCIe RC may send the SKP ordered set to the retimer at a low rate, thereby reducing reduction probability of a bandwidth. Specifically, for the components in the PCIe system, sending the SKP ordered set may be implemented through enabling an SKP generator (SKP Generation) circuit module in the component.

The following further describes in detail embodiments of this application with reference to accompanying drawings. It should be noted that in embodiments of this application, "a plurality of" means two or more. In addition, in description of this application, terms such as "first" and "second" are merely used for distinguishing and description, but should not be understood as indicating or implying relative importance, or should not be understood as indicating or implying a sequence.

Embodiments of this application provide a spread spectrum clock negotiation method, and a peripheral component interconnect express device and system, to implement dynamic negotiation between a transmit end and a receive end on an SSC capability in a peripheral component interconnect express system.

<FIG> is a schematic flowchart of a spread spectrum clock negotiation method according to an embodiment of this application.

S201: A second PCIe device generates first indication information.

The first indication information is used to indicate whether the second PCIe device has a spread spectrum clock capability, that is, whether the second PCIe device supports SSC CDR (that is, whether the second PCIe device can perform clock data recovery on spread spectrum data sent by the first PCIe device).

S202: The second PCIe device sends the first indication information to the first PCIe device.

In this embodiment of this application, the first PCIe device and the second PCIe device may be any two different components in the PCIe system shown in <FIG>. For example, the first PCIe device is a PCIe EP, and the second PCIe device is a retimer; the first PCIe device is a PCIe RC, and the second PCIe device is a retimer; or the first PCIe device is a PCIe EP, and the second PCIe device is a PCIe RC. In other words, in the method shown in <FIG>, dynamic negotiation on the SSC capability can be implemented between any two components in the PCIe system.

S203: The first PCIe device determines, based on the first indication information, whether to perform spread spectrum clock on a reference clock of the first PCIe device.

Specifically, in step S203, the first PCIe device may perform spread spectrum clock on the reference clock of the first PCIe device when the first indication information indicates that the second PCIe device has the spread spectrum clock capability. In other words, the first PCIe device may modulate the reference clock by using a low frequency.

After the first PCIe device performs spread spectrum clock on the reference clock, the first PCIe device may send data to the second PCIe device based on the reference clock obtained after the spread spectrum clock. In this case, a noise spectrum is dispersed, to reduce electromagnetic interference to another device. Because the second PCIe device has the spread spectrum clock capability, after receiving the spread spectrum data sent by the first PCIe device, the second PCIe device may perform clock data recovery on the received data, to complete data exchange between the first PCIe device and the second PCIe device.

In actual application, the first indication information is carried in the first SKP ordered set sent by the second PCIe device to the first PCIe device. The first SKP ordered set may be periodically sent. In other words, that the first PCIe device receives the first indication information sent by the second PCIe device may use the following implementation: The first PCIe device receives the first SKP ordered set sent by the second PCIe device. The first SKP ordered set carries the first indication information. The first PCIe device parses the first SKP ordered set to obtain the first indication information.

In the PCIe protocol, a vender defined (Vender defined) field is defined in an SKP ordered set. The field may be used to carry private link control information. Specifically, the field includes eight bits, that is, payload [<NUM>:<NUM>]. In this embodiment of this application, the first indication information may be carried by using payload [<NUM>]. For example, when payload [<NUM>] is <NUM>, it indicates that the second PCIe device has the spread spectrum clock capability; or when payload [<NUM>] is <NUM>, it indicates that the second PCIe device does not have the spread spectrum clock capability. In addition, payload [<NUM>:<NUM>] is 0x1 to indicate that the Vender defined field carries SSC capability information of the second PCIe device. After receiving the first SKP ordered set, the first PCIe device may obtain the Vender defined field through parsing. When payload [<NUM>:<NUM>] is 0x1, the first PCIe device may learn that the Vender defined field carries the SSC capability information of the second PCIe device. Then, the first PCIe device may determine through parsing payload [<NUM>] whether the second PCIe device has the SSC capability.

In actual application, when parsing the first SKP ordered set, the first PCIe device may first perform cyclic redundancy check (cyclic redundancy check, CRC) on the first SKP ordered set. A specific manner of the CRC check is a conventional technology.

Certainly, in this embodiment of this application, the first indication information may also be carried in another message sent by the second PCIe device to the first PCIe device. Alternatively, the second PCIe device may directly send the first indication information to the first PCIe device. Bits occupied by the first indication information are not limited to the examples in the foregoing embodiment. A carrying manner and a specific format of the first indication information are not limited in this embodiment of this application.

It should be noted that, in actual application, if the second PCIe device has the SSC capability, before the second PCIe device sends the first indication information to the first PCIe device, the second PCIe device may first perform spread spectrum clock on the reference clock of the second PCIe device (that is, enable the SSC function). In this way, after the first PCIe device receives the first indication information and enables the SSC function based on the first indication information, the first PCIe device and the second PCIe device both enable the SSC function. Therefore, the first PCIe device and the second PCIe device may perform two-way data exchange based on the reference clock obtained after the spread spectrum clock.

In addition, in this embodiment of this application, the first PCIe device may further receive second indication information sent by the second PCIe device. The second indication information is used to indicate whether the second PCIe device supports transmission/reception of an SKP ordered set at a specified rate less than a preset rate (also may be referred to as whether the second PCIe device has a low-rate SKP capability).

As described above, in the PCIe system, an SKP ordered set is sent between two PCIe devices at a high rate, to eliminate a frequency offset between the two PCIe devices. The high rate may be considered as the preset rate. After the first PCIe device and the second PCIe both enable the SSC function, a system bandwidth may be reduced if the first PCIe device and the second PCIe device still send an SKP ordered set at the preset rate. Therefore, in this embodiment of this application, if the second indication information received by the first PCIe device indicates that the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate less than the preset rate, the first PCIe device may periodically send a second SKP ordered set to the second PCIe device at the specified rate, thereby reducing reduction probability of the system bandwidth.

It is not difficult to understand that a second SKP ordered set sent by the first PCIe device to the second PCIe device may also carry indication information indicating whether the first PCIe device supports transmission/reception of an SKP ordered set at a specified rate. After receiving the indication information, the second PCIe device may also send the first SKP ordered set to the first PCIe device at the specified rate. In this case, the first PCIe device and the second PCIe device both send the SKP ordered set at the specified rate lower than the preset rate, to reduce the system bandwidth.

Specifically, similar to the first indication information, the second indication information may also be carried in the first SKP ordered set sent by the second PCIe device to the first PCIe device. After receiving the first SKP ordered set, the first PCIe device may parse the first SKP ordered set to obtain the second indication information.

The second indication information may be carried by using a Vender defined field in the first SKP ordered set. For example, in the Vender defined field, when payload [<NUM>] is <NUM>, it indicates that the second PCIe device has the spread spectrum clock capability; or when payload [<NUM>] is <NUM>, it indicates that the second PCIe device does not have the spread spectrum clock capability. In addition, when payload [<NUM>] is <NUM>, it indicates that the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate; or when payload [<NUM>] is <NUM>, it indicates that the second PCIe device does not support transmission/reception of the SKP ordered set at the specified rate. In addition, payload [<NUM>:<NUM>] is 0x1 to indicate that the Vender defined field carries the SSC capability information and the low-rate SKP capability information of the second PCIe device.

<FIG> may show a specific procedure of a spread spectrum clock negotiation method according to an embodiment of this application.

S301: A second PCIe device sends a first SKP ordered set to a first PCIe device.

The first SKP ordered set carries first indication information and second indication information. The first indication information is used to indicate whether the second PCIe device has the spread spectrum clock capability. The second indication information is used to indicate whether the second PCIe device supports transmission/reception of an SKP ordered set at a specified rate less than a preset rate.

S302: The first PCIe device parses the first SKP ordered set to obtain the first indication information and the second indication information.

S303: The first PCIe device performs spread spectrum clock on a reference clock of the first PCIe device when the first indication information indicates that the second PCIe device has the spread spectrum clock capability and the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate.

S304: The first PCIe device sends data to the second PCIe device based on the reference clock obtained after the spread spectrum clock, and sends a second SKP ordered set to the second PCIe device at a specified rate.

The second SKP ordered set may be periodically sent.

It should be noted that the spread spectrum clock negotiation method shown in <FIG> may be considered as a specific example of the method shown in <FIG>. For implementations not described in detail on the spread spectrum clock negotiation method shown in <FIG>, refer to related descriptions in <FIG>. For example, it is assumed that the first PCIe device is a PCIe RC, and the second PCIe device is a PCIe EP. An interaction procedure between the PCIe RC and the PCIe EP may be shown in <FIG>.

In <FIG>, a serializer/deserializer (serializer and deserializer, SerDes) TX in the PCIe RC may be considered as a transmitter, and SerDes SSC CDR in the PCIe EP may be considered as a receiver supporting SSC CDR.

After the PCIe EP adds the SSC capability information and the low-rate SKP capability information of the PCIe EP into an SKP ordered set and sends the SKP ordered set to the PCIe RC, the PCIe RC parses the SKP ordered set, and learns that the PCIe EP has the SSC capability and the low-rate SKP capability. Then, the PCIe RC generates an SSC enabling signal and a low-rate SKP enabling signal. After receiving the SSC enabling signal, an SSC generator performs spread spectrum clock on a reference clock. The SerDes TX sends data based on the reference clock obtained after the spread spectrum clock. After receiving the low-rate SKP enabling signal, the SKP generator indicates the SerDes TX to send the SKP ordered set at the low rate. Data received by the SerDes SSC CDR in the PCIe EP is stored in an elastic buffer (elastic buffer).

In conclusion, in the spread spectrum clock negotiation method provided in this embodiment of this application, because the second PCIe device sends, to the first PCIe device, the first indication information used to indicate whether the second PCIe device has the spread spectrum clock capability, the first PCIe device may determine, based on the first indication information, whether to perform spread spectrum clock on the reference clock of the first PCIe device. If the first indication information indicates that the second PCIe device has the spread spectrum clock capability, the first PCIe device may enable the SSC function to complete dynamic negotiation between the first PCIe device and the second PCIe device on the SSC capability.

Further, after the first PCIe device enables the SSC function, the first PCIe device may send data to the second PCIe device based on the reference clock obtained after the spread spectrum clock, to reduce electromagnetic interference to another device in a data transmission process. After receiving the data, the second PCIe device can trace and recover data with a large frequency offset, to complete data parsing.

In actual application, the foregoing spread spectrum clock negotiation method may be implemented by using different circuit modules in the first PCIe device and the second PCIe device in a cooperative manner. As described above, each PCIe device includes a transmitter and a receiver. Specifically, each PCIe device may include the following several circuit modules.

<FIG> is a schematic diagram of an interaction procedure between two PCIe devices including the foregoing circuit modules.

In addition, the second PCIe device may further add, into the SKP packet, information indicating that the second PCIe device supports transmission of the SKP packet at the specified rate lower than the preset rate. After the SKP parsing module of the first PCIe device parses out the information, the SKP generator may be enabled.

It can be learned from the procedure in <FIG> that, in the solution provided in this embodiment of this application, an SSC auto-negotiation procedure may be implemented by using an original hardware module in a PCIe device. This solution does not depend on another interface on a board, to avoid obtaining an SSC capability of a peer end by using an external hardware interface and software in the conventional technologies, thereby implementing auto-negotiation of the SSC capability in a data exchange procedure between PCIe devices.

Specifically, a specific procedure in which the first PCIe device enables the SSC generator may be shown in <FIG>.

If the receive serial number is consistent with the serial number, discard the SKP packet.

There may be a plurality of transmit ports and a plurality of receive ports in the PCIe device. If a receive serial number in an SKP packet received by a port is inconsistent with a serial number of a current directly connected port of the PCIe device, it indicates that a port for sending the SKP packet is not the current directly connected port of the PCIe device and the SKP packet may be discarded.

<NUM>: If the receive serial number is consistent with the serial number of the current directly connected port, further determine a corresponding field in the payload of the SKP packet, to determine whether the second PCIe device supports the SSC CDR and whether the second PCIe device supports low-rate transmission/reception of the SKP.

<NUM>: If the second PCIe device supports the SSC CDR, enable the SSC generator If the second PCIe device supports the low-rate transmission/reception of the SKP, control a media access control (media access control, MAC) sublayer to send the SKP packet to the second PCIe device at a low rate.

Based on the same invention concept, an embodiment of this application further provides a peripheral component interconnect express device. As shown in <FIG>, the PCIe device <NUM> includes a receiver <NUM> and a processor <NUM>.

The receiver <NUM> is configured to receive first indication information sent by a second PCIe device. The first indication information is used to indicate whether the second PCIe device has a spread spectrum clock capability. The processor <NUM> is configured to determine, based on the first indication information, whether to perform spread spectrum clock on a reference clock of the PCIe device <NUM>.

Optionally, when the processor <NUM> determines based on the first indication information whether to perform spread spectrum clock on the reference clock of the PCIe device <NUM>, the processor <NUM> is specifically configured to: perform spread spectrum clock on the reference clock of the PCIe device <NUM> when the first indication information indicates that the second PCIe device has the spread spectrum clock capability.

In addition, the PCIe device <NUM> may further include a transmitter. After the processor <NUM> performs spread spectrum clock on the reference clock of the PCIe device <NUM>, the transmitter is configured to send data to the second PCIe device based on the reference clock obtained after the spread spectrum clock.

Optionally, when receiving the first indication information sent by the second PCIe device, the receiver <NUM> is specifically configured to receive a first SKP ordered set sent by the second PCIe device. The first SKP ordered set carries the first indication information. The processor <NUM> is further configured to parse the first SKP ordered set to obtain the first indication information.

In addition, the receiver <NUM> is further configured to receive second indication information sent by the second PCIe device. The second indication information is used to indicate whether the second PCIe device supports transmission/reception of an SKP ordered set at a specified rate less than a preset rate.

Optionally, the PCIe device <NUM> may further include a transmitter. After the receiver <NUM> receives the second indication information, the transmitter is configured to periodically send a second SKP ordered set to the second PCIe device at the specified rate when the second indication information indicates that the second PCIe device supports transmission/reception of the SKP ordered set at the specified rate.

Optionally, when receiving the second indication information sent by the second PCIe device, the receiver <NUM> is specifically configured to receive a first SKP ordered set sent by the second PCIe device. The first SKP ordered set carries the second indication information. The processor <NUM> is further configured to parse the first SKP ordered set to obtain the second indication information.

It should be noted that the PCIe device <NUM> may be configured to perform the method performed by the first PCIe device in the spread spectrum clock negotiation method shown in <FIG>. For implementations not described in detail about the PCIe device <NUM>, refer to related descriptions of the spread spectrum clock negotiation method shown in <FIG>.

In addition, in the PCIe device <NUM>, the receiver <NUM> may be considered as the receiver in the first PCIe device in <FIG>, the transmitter may be considered as the transmitter in the first PCIe device in <FIG>, and the processor <NUM> may be considered as a circuit module in the first PCIe device in <FIG> except the transmitter and the receiver.

Based on the same invention concept, an embodiment of this application further provides a peripheral component interconnect express device. As shown in <FIG>, the PCIe device <NUM> includes a processor <NUM> and a transmitter <NUM>. The processor <NUM> is configured to generate first indication information. The first indication information is used to indicate whether the PCIe device <NUM> has a spread spectrum clock capability. The transmitter <NUM> is configured to send the first indication information to a first PCIe device.

Specifically, when sending the first indication information to the first PCIe device, the transmitter <NUM> is specifically configured to send a first SKP ordered set to the first PCIe device. The first SKP ordered set carries the first indication information.

In addition, the PCIe device <NUM> further includes a receiver. After the transmitter <NUM> sends the first indication information to the first PCIe device, the receiver is configured to receive data sent by the first PCIe device based on a reference clock obtained after the spread spectrum clock.

Optionally, the processor <NUM> is further configured to generate second indication information. The second indication information is used to indicate whether the PCIe device <NUM> supports transmission/reception of an SKP ordered set at a specified rate less than a preset rate. The transmitter <NUM> is further configured to send the second indication information to the first PCIe device.

Optionally, when sending the second indication information to the first PCIe device, the transmitter <NUM> is specifically configured to send the first SKP ordered set to the first PCIe device. The first SKP ordered set carries the second indication information.

Optionally, the processor <NUM> is further configured to: before the transmitter <NUM> sends the first indication information to the first PCIe device, perform spread spectrum clock on the reference clock of the PCIe device <NUM>.

It should be noted that the PCIe device <NUM> may be configured to perform the method performed by the second PCIe device in the spread spectrum clock negotiation method shown in <FIG>. For implementations not described in detail about the PCIe device <NUM>, refer to related descriptions of the spread spectrum clock negotiation method shown in <FIG>.

In addition, in the PCIe device <NUM>, the receiver may be considered as the receiver in the second PCIe device in <FIG>, the transmitter <NUM> may be considered as the transmitter in the second PCIe device in <FIG>, and the processor <NUM> may be considered as a circuit module in the second PCIe device in <FIG> except the transmitter and the receiver.

Based on the same invention concept, an embodiment of this application further provides a peripheral component interconnect express system. As shown in <FIG>, the PCIe system <NUM> includes a first PCIe device <NUM> and a second PCIe device <NUM>. The second PCIe device <NUM> is configured to: generate first indication information, and send the first indication information to the first PCIe device <NUM>. The first indication information is used to indicate whether the second PCIe device <NUM> has a spread spectrum clock capability. The first PCIe device <NUM> is configured to determine, based on the first indication information, whether to perform spread spectrum clock on a reference clock of the first PCIe device <NUM>.

Claim 1:
A spread spectrum clock negotiation method, comprising:
receiving (S202), by a first peripheral component interconnect express, PCIe, device, first indication information sent by a second PCIe device, wherein the first indication information is used to indicate whether the second PCIe device has a spread spectrum clock capability; and
determining (S203), by the first PCIe device based on the first indication information, whether to perform spread spectrum clock on a reference clock of the first PCIe device,
wherein the receiving (S202), by a first PCIe device, first indication information sent by a second PCIe device comprises:
receiving (S301), by the first PCIe device, a first SKP ordered set sent by the second PCIe device, wherein the first SKP ordered set carries the first indication information; and
parsing (S302), by the first PCIe device, the first SKP ordered set to obtain the first indication information.