Link width switching method, communication apparatus, and communication system
By sending logic blocks and status refresh patterns between communication devices, the link width is dynamically adjusted, which solves the problems of power consumption waste and low negotiation efficiency during link width adjustment in the existing technology, and achieves more refined power consumption. Management and efficient link width adjustment.
Patent Information
- Application Number
- PCT/CN2024/079008
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-06
- Filing Date
- 2024-02-28
- Publication Date
- 2024-09-12
AI Technical Summary
The existing technology has the problems of wasted power consumption and low negotiation efficiency when adjusting the link width, especially when the port status changes, resulting in wasted bandwidth and increased power consumption, and the link width adjustment is limited and difficult to control finely.
By sending logical blocks between the first device and the second device, including link width switching commands and status refresh patterns, the status of the sending channel is dynamically adjusted to flexibly switch the link width, reduce port power consumption, and improve power consumption. Management sophistication and negotiation efficiency.
The port power consumption between the first device and the second device is effectively reduced, the precision of power consumption management and negotiation efficiency are improved, the link width is flexibly adjusted, and bandwidth waste is avoided.
Smart Images

Figure CN2024079008_12092024_PF_FP_ABST
Abstract
Description
Link width switching method, communication device and communication system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on March 6, 2023, with application number 202310241857.1 and application name “A link width switching method, communication device and communication system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of communication technology, and in particular to a link width switching method, a communication device, and a communication system. Background Art
[0004] For data transmission, various interface devices are required. These interface devices consume power during data transmission, and the power consumption is closely related to the operating state of the interface devices. When data transmission is in the data transmission state, the power consumption is high. When no data is transmitted, the interface devices can be in a low power state, with low power consumption.
[0005] Port protocols are gradually becoming "tunnel-oriented," meaning that the same port can simultaneously transmit multiple types of data, such as general data and video data. This results in dynamic changes in data bandwidth during data transmission on the port. If the port status remains consistent during this period, bandwidth will be wasted and port power consumption will increase.
[0006] Summary of the Invention
[0007] Embodiments of the present application provide a link width switching method, a communication device, and a communication system to reduce power consumption between ports of different devices.
[0008] In a first aspect, embodiments of the present application provide a link width switching method, which can be performed by a first device or a module (such as a chip) applied to the first device. Taking the first device performing the method as an example, a logic block is sent to a second device, the logic block including a link width switching command, the link width switching command being used to adjust the state of a transmission channel from the first device to the second device; and a state refresh code pattern is sent to the second device, the state refresh code pattern being used to synchronize the link width switching command between the first device and the second device.
[0009] In the above scheme, the first device dynamically switches the link width according to its own bandwidth changes, and notifies the second device through a link width switching command, which can realize flexible switching of link width, reduce power consumption between the ports of the first device and the second device, and improve the precision of power consumption management and negotiation efficiency.
[0010] In one possible implementation method, the link width switching command is used to adjust the state of the sending channel from the first device to the second device, including: the link width switching command indicates the adjusted state of the sending channel from the first device to the second device, and the state includes the service transmission state and the electrical initial state.
[0011] In a possible implementation method, the logic block includes a link width switching command, including: the logic block includes a logic layer data packet, and the logic layer data packet includes the link width switching command.
[0012] In a possible implementation method, a logic block startup code pattern is periodically sent to the second device, where the logic block startup code pattern is used for clock synchronization and lock status check between the first device and the second device.
[0013] The above solution can ensure clock synchronization between the first device and the second device by sending the logic block start code pattern, which helps to correctly transmit data between the first device and the second device.
[0014] In a possible implementation method, the link width switching command is a channel reduction command, and the channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
[0015] In one possible implementation method, the transmission channel from the first device to the second device includes at least one first channel; an electrical initial code pattern is sent on the at least one first channel, and the electrical initial code pattern is used to indicate that the state of the at least one first channel is adjusted from a service transmission state to an electrical initial state; and the state of the at least one first channel is adjusted to the electrical initial state.
[0016] In a possible implementation method, the link width switching command is a channel increase command, and the channel increase command is used to increase the number of sending channels in a service transmission state in a sending channel from the first device to the second device.
[0017] In one possible implementation method, the transmission channel from the first device to the second device includes at least one second channel; an electrical initial exit code pattern is sent on the at least one second channel, where the electrical initial exit code pattern is used to indicate that the state of the second channel is adjusted from the electrical initial state to the service transmission state; and the state of the at least one second channel is adjusted to the service transmission state.
[0018] In a possible implementation method, a quick lock code pattern is sent on the at least one second channel, where the quick lock code pattern is used for the second device to quickly lock the at least one second channel.
[0019] The above solution can ensure that the channel status between the first device and the second device is quickly adjusted by sending a fast locking code pattern.
[0020] In one possible implementation method, the sending channel from the first device to the second device includes at least one target channel, and the target channel is a channel in a service transmission state; sending the logic block to the second device includes: sending the logic block on the at least one target channel.
[0021] When the transmission channel from the first device to the second device includes at least two target channels, each of the at least two target channels carries part of the information in the logic block.
[0022] In the above solution, the first device distributes the logic blocks to multiple channels for transmission, which can improve the transmission speed.
[0023] In a possible implementation method, the logic block further includes at least one transport layer data packet, and the transport layer data packet is used to carry business data.
[0024] In a second aspect, embodiments of the present application provide a link width switching method, which can be performed by a second device or a module (such as a chip) applied to the second device. Taking the second device performing the method as an example, the second device receives a logic block from a first device, wherein the logic block includes a link width switching command, wherein the link width switching command is used to adjust the state of the transmission channel from the first device to the second device; and receives a state refresh code pattern from the first device, wherein the state refresh code pattern is used to synchronize the link width switching command between the first device and the second device.
[0025] In the above scheme, the first device dynamically switches the link width according to its own bandwidth changes, and notifies the second device through a link width switching command, which can realize flexible switching of link width, reduce power consumption between the ports of the first device and the second device, and improve the precision of power consumption management and negotiation efficiency.
[0026] In one possible implementation method, the link width switching command is used to adjust the state of the sending channel from the first device to the second device, including: the link width switching command indicates the adjusted state of the sending channel from the first device to the second device, and the state includes the service transmission state and the electrical initial state.
[0027] In a possible implementation method, the logic block includes a link width switching command, including: the logic block includes a logic layer data packet, and the logic layer data packet includes the link width switching command.
[0028] In a possible implementation method, a logic block startup code pattern is periodically received from the first device, where the logic block startup code pattern is used for clock synchronization and lock status check between the first device and the second device.
[0029] The above solution can ensure clock synchronization between the first device and the second device by sending the logic block start code pattern, which helps to correctly transmit data between the first device and the second device.
[0030] In a possible implementation method, the link width switching command is a channel reduction command, and the channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
[0031] In one possible implementation method, the transmission channel from the first device to the second device includes at least one first channel; an electrical initial code pattern is received on the at least one first channel, and the electrical initial code pattern is used to indicate that the state of the at least one first channel is adjusted from a service transmission state to an electrical initial state; and the state of the at least one first channel is adjusted to the electrical initial state.
[0032] In a possible implementation method, the link width switching command is a channel increase command, and the channel increase command is used to increase the number of sending channels in a service transmission state in a sending channel from the first device to the second device.
[0033] In one possible implementation method, the transmission channel from the first device to the second device includes at least one second channel; an electrical initial exit code pattern is received on the at least one second channel, where the electrical initial exit code pattern is used to indicate that the state of the at least one second channel is adjusted from the electrical initial state to the service transmission state; and the state of the at least one second channel is adjusted to the service transmission state.
[0034] In a possible implementation method, a quick lock pattern is received on the second channel, where the quick lock pattern is used for the second device to quickly lock the second channel.
[0035] The above solution can ensure that the channel status between the first device and the second device is quickly adjusted by sending a fast locking code pattern.
[0036] In one possible implementation method, the sending channel from the first device to the second device includes at least one target channel, where the target channel is a channel in a service transmission state; and receiving the logic block from the first device includes: receiving the logic block on at least one target channel.
[0037] When the transmission channel from the first device to the second device includes at least two target channels, each of the at least two target channels carries part of the information in the logic block.
[0038] In the above solution, the first device distributes the logic block to multiple channels for transmission, so that the second device receives different parts of a logic block on multiple channels, which can improve the transmission speed.
[0039] In a possible implementation method, the logic block further includes at least one transport layer data packet, and the transport layer data packet is used to carry business data.
[0040] In a third aspect, an embodiment of the present application provides a link width switching method, which can be performed by a first device or a module (such as a chip) applied to the first device. Taking the first device performing the method as an example, an electrical initial exit code pattern is sent on the transmission channel from the first device to the second device, and the electrical initial exit code pattern is used to indicate that the state of the transmission channel from the first device to the second device is adjusted from the electrical initial state to the service transmission state; a fast lock code pattern is continuously sent on the transmission channel from the first device to the second device, and the fast lock code pattern is used by the second device to quickly lock the transmission channel from the first device to the second device.
[0041] In the above solution, the first device dynamically switches the link width according to the change of its own bandwidth, and opens all the transmission channels from the first device to the second device through the electrical initial exit code pattern and the fast lock code pattern, thereby realizing flexible switching of the link width, thereby reducing the power consumption between the ports of the first device and the second device, and improving the precision of power consumption management and negotiation efficiency.
[0042] In one possible implementation method, when the number of times the quick lock code is sent is greater than a first threshold, a state refresh code is sent on the sending channel from the first device to the second device, and the state refresh code is used for the sending channel from the first device to the second device to synchronously enter the service transmission state.
[0043] In a possible implementation method, after sending the state refresh code pattern, the state of the transmission channel from the first device to the second device is adjusted to a service transmission state.
[0044] In a fourth aspect, an embodiment of the present application provides a link width switching method, which can be performed by a second device or a module (such as a chip) applied to the second device. Taking the second device performing the method as an example, an electrical initial exit code pattern is received on the transmission channel from the first device to the second device, and the electrical initial exit code pattern is used to indicate that the state of the transmission channel from the first device to the second device is adjusted from the electrical initial state to the service transmission state; a fast lock code pattern is continuously received on the transmission channel from the first device to the second device, and the fast lock code pattern is used by the second device to quickly lock the transmission channel from the first device to the second device.
[0045] In the above solution, the first device dynamically switches the link width according to the change of its own bandwidth, and opens all the transmission channels from the first device to the second device through the electrical initial exit code pattern and the fast lock code pattern, thereby realizing flexible switching of the link width, thereby reducing the power consumption between the ports of the first device and the second device, and improving the precision of power consumption management and negotiation efficiency.
[0046] In a possible implementation method, a state refresh code pattern is received on a transmission channel from the first device to the second device, and the state refresh code pattern is used for the transmission channel from the first device to the second device to synchronously enter a service transmission state.
[0047] In a possible implementation method, after receiving the state refresh code pattern, the state of the transmission channel from the first device to the second device is adjusted to a service transmission state.
[0048] In a fifth aspect, an embodiment of the present application provides a communication device, which may be a first device or a module (such as a chip) for the first device. The device has the function of implementing any of the implementation methods of the first and third aspects above. The function can be implemented by hardware or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above functions.
[0049] In a sixth aspect, an embodiment of the present application provides a communication device, which may be a second device or a module (such as a chip) for the second device. The device has the function of implementing any of the implementation methods of the second and fourth aspects above. The function can be implemented by hardware or by hardware executing corresponding software implementations. The hardware or software includes one or more modules corresponding to the above functions.
[0050] In a seventh aspect, an embodiment of the present application provides a communication device, comprising a unit or means for executing each step of any implementation method in the above-mentioned first to fourth aspects.
[0051] In an eighth aspect, an embodiment of the present application provides a communication device, comprising a processor and an interface circuit, wherein the processor is configured to communicate with other devices via the interface circuit and execute any of the implementation methods described in the first to fourth aspects. The processor comprises one or more.
[0052] In a ninth aspect, an embodiment of the present application provides a communication device, comprising a processor coupled to a memory, the processor configured to call a program stored in the memory to execute any of the implementation methods described in aspects 1 to 4 above. The memory may be located within or outside the device, and the processor may be one or more.
[0053] In the tenth aspect, an embodiment of the present application provides a communication device, comprising a processor and a memory; the memory is used to store computer instructions, and when the device is running, the processor executes the computer instructions stored in the memory to enable the device to execute any implementation method in the above-mentioned first to fourth aspects.
[0054] In the eleventh aspect, an embodiment of the present application further provides a computer program product, which includes a computer program or instructions. When the computer program or instructions are run by a communication device, any implementation method in the above-mentioned first to fourth aspects is executed.
[0055] In the twelfth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when run on a communication device, enables any implementation method in the above-mentioned first to fourth aspects to be executed.
[0056] In the thirteenth aspect, an embodiment of the present application further provides a chip system, comprising: a processor for executing any implementation method in the above-mentioned first to fourth aspects.
[0057] In a fourteenth aspect, an embodiment of the present application further provides a communication system, which includes a first device for executing any implementation method of the above-mentioned first aspect, and a second device for executing any implementation method of the above-mentioned first aspect.
[0058] In the fifteenth aspect, an embodiment of the present application further provides a communication system, which includes a first device for executing any implementation method of the third aspect above, and a second device for executing any implementation method of the fourth aspect above.
[0059] In the sixteenth aspect, an embodiment of the present application also provides a link width switching method, including: a first device sends a logic block to a second device, the logic block including a link width switching command, the link width switching command being used to adjust the state of a sending channel from the first device to the second device; the second device receives the logic block; the first device sends a status refresh code pattern to the second device, the status refresh code pattern being used to synchronize the link width switching command between the first device and the second device; the second device receives the status refresh code pattern.
[0060] In the seventeenth aspect, an embodiment of the present application also provides a link width switching method, including: a first device sends an electrical initial exit code pattern on a sending channel from the first device to the second device, wherein the electrical initial exit code pattern is used to indicate that the state of the sending channel from the first device to the second device is adjusted from the electrical initial state to the service transmission state; the second device receives the electrical initial exit code pattern; the first device continuously sends a fast lock code pattern on the sending channel from the first device to the second device, wherein the fast lock code pattern is used by the second device to quickly lock the sending channel from the first device to the second device; the second device continuously receives the fast lock code pattern. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] FIG1 is a schematic diagram of a communication architecture applicable to an embodiment of the present application;
[0062] FIG2( a ) is a schematic diagram of a flow chart of a link width switching method provided in an embodiment of the present application;
[0063] FIG2( b ) is a flow chart of a link width switching method provided in an embodiment of the present application;
[0064] FIG3 is an example diagram of a first device sending an LLB and a second device receiving an LLB according to an embodiment of the present application;
[0065] FIG4( a ) is a structural diagram of a TLP according to an embodiment of the present application;
[0066] FIG4( b ) is a structural diagram of an LLP according to an embodiment of the present application;
[0067] FIG4( c ) is a structural diagram of an LLB provided in an embodiment of the present application;
[0068] FIG5 is a schematic diagram of link state transition provided in an embodiment of the present application;
[0069] FIG6( a ) is a schematic diagram of a full-speed state provided in an embodiment of the present application;
[0070] FIG6( b ) is a schematic diagram of a data transmission process according to an embodiment of the present application;
[0071] FIG6( c ) is an example diagram of channel allocation shown;
[0072] FIG6( d ) is an example diagram of channel allocation when an MUP sends an LLB according to an embodiment of the present application;
[0073] FIG6( e ) is a schematic diagram of service transmission in full-speed state provided by an embodiment of the present application;
[0074] FIG7( a ) is a schematic diagram of an MDP entering an idle state according to an embodiment of the present application;
[0075] FIG7( b ) is an example diagram of channel allocation when an MDP sends an LLB according to an embodiment of the present application;
[0076] FIG7( c ) is a schematic diagram of service transmission of an MDP in an idle state and an MUP in a full-speed state according to an embodiment of the present application;
[0077] FIG8( a ) is a schematic diagram of an MDP adjusting an idle state and an MUP entering an idle state according to an embodiment of the present application;
[0078] FIG8( b ) is an example diagram of channel allocation when an MDP sends an LLB according to an embodiment of the present application;
[0079] FIG8( c ) is an example diagram of channel allocation when an MUP sends an LLB according to an embodiment of the present application;
[0080] FIG8( d ) is a schematic diagram of service transmission of an MDP in an idle state and an MUP in an idle state provided by an embodiment of the present application;
[0081] FIG9( a ) is a schematic diagram of an MDP adjusting an idle state and an MUP entering a zero-speed state according to an embodiment of the present application;
[0082] FIG9( b ) is an example diagram of channel allocation when an MDP sends an LLB according to an embodiment of the present application;
[0083] FIG9( c ) is an example diagram of channel allocation when an MUP sends an LLB according to an embodiment of the present application;
[0084] FIG9( d ) is a schematic diagram of service transmission of an MDP in an idle state according to an embodiment of the present application;
[0085] FIG10( a ) is a schematic diagram of an MDP and MUP restored to full speed according to an embodiment of the present application;
[0086] FIG10( b ) is an example diagram of channel allocation when an MDP sends an LLB according to an embodiment of the present application;
[0087] FIG10( c ) is an example diagram of channel allocation when an MUP sends an LLB according to an embodiment of the present application;
[0088] FIG11( a ) is a diagram illustrating an example scenario in which a channel reduction command overwrites a channel reduction command provided in an embodiment of the present application;
[0089] FIG11( b ) is a diagram illustrating an example of a scenario in which a channel increase command overrides a channel decrease command according to an embodiment of the present application;
[0090] FIG11( c ) is a diagram illustrating an example of a scenario in which a channel reduction command overrides a channel increase command according to an embodiment of the present application;
[0091] FIG11( d ) is a diagram illustrating an example of a scenario in which a channel add command overwrites a channel add command provided in an embodiment of the present application;
[0092] FIG12 is a schematic structural diagram of a communication device provided in an embodiment of the present application;
[0093] FIG13 is a schematic diagram of the structure of a communication device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0094] Figure 1 is a schematic diagram of a communication architecture applicable to an embodiment of the present application, which includes a first device and a second device. When the first device acts as a transmitter and the second device acts as a receiver, the first device can be referred to as a transmitter device and the second device can be referred to as a receiver device. When the second device acts as a transmitter and the first device acts as a receiver, the second device can be referred to as a transmitter device and the first device can be referred to as a receiver device. This application does not limit the specific types of the first device and the second device, that is, the first device and the second device can be any type of device.
[0095] Peripheral Component Interconnect Express (PCIE) 6 introduces the L0p state to dynamically adjust the link width during data transmission to achieve the purpose of reducing power consumption. The L0p state means that part of the channels of the PCIE6 port are in the electrical idle state (EI), also known as the low-power state, and the other part of the channels are in the high-speed working state, so as to reduce the overall power consumption of the port while maintaining data transmission. In addition, PCIE can only support the adjustment of link width to x1, x2, x4, x8, and x16, that is, the number of channels in high-speed operation must be: 1, 2, 4, 8, or 16. The specific implementation steps of the L0p state are as follows:
[0096] (1) During the link training phase, the downstream port (DSP) and upstream port (USP) in the PCIE port negotiate with each other to confirm whether both the DSP and USP support the L0p state. Only when both support the L0p state can the link width be dynamically adjusted.
[0097] (2) During the service data transmission process, if the bandwidth of one of the two interconnected ports (i.e., a DSP and a USP) changes, a link width dynamic adjustment request can be initiated.
[0098] (3) After receiving the link width dynamic adjustment request, the peer end needs to determine whether the link width adjustment can be performed based on the actual situation of its own port. If it can, it will feedback an acknowledgment (ACK) to inform the peer end that the link width dynamic adjustment can be initiated. Otherwise, it will feedback a negative acknowledgment (NACK).
[0099] (4) Link width adjustment can only be initiated after both ends of the same link support dynamic link adjustment and reach a consensus. That is, the link width adjustment of the sending channel and the receiving channel of the PCIE port restrict each other. When the sending channel bandwidth decreases but the receiving bandwidth remains the same, the sending channel link width cannot be reduced.
[0100] The above-mentioned power consumption reduction scheme has the following shortcomings: First, the PCIE port is a full-duplex port. When the link width is adjusted, the DSP and USP restrict each other, and both DSP and USP need to be satisfied at the same time. For example: if the DSP bandwidth becomes smaller, it can be switched from x16 to x8, but the USP must work in the x16 state. In this case, both PCIE ports must work at x16, resulting in waste of DSP power consumption. Second, the link width only supports x1, x2, x4, x8, and x16, and the power consumption control precision is limited. For example: the current port only needs x5 bandwidth to meet the demand, but due to the link width limitation, the entire port can only work at x8, resulting in the waste of 3 channel bandwidths. Third, the adjustment of the PCIE port link width requires negotiation and confirmation between the sender and the receiver, and the negotiation efficiency is low.
[0101] Problems such as limited link width switching methods, insufficiently refined power consumption management, and low negotiation efficiency need to be addressed.
[0102] FIG2( a ) is a flow chart of a link width switching method provided in an embodiment of the present application. The method includes the following steps:
[0103] In step 201a, the first device sends a logical layer block (LLB) to the second device, and accordingly, the second device receives the LLB.
[0104] The LLB includes a link width switching command, which is used to adjust the state of a transmission channel from the first device to the second device. The link width switching command includes a lane down command and a lane up command.
[0105] In one implementation method, the LLB includes a logical layer packet (LLP), and the LLP includes the above-mentioned link width switching command. That is, the link width switching command is carried in the LLP of the LLB for transmission. Optionally, the LLB also includes at least one transport layer packet (TLP), and the TLP is used to carry business data. Figure 3 is an example diagram of a first device sending an LLB and a second device receiving an LLB provided by an embodiment of the present application. Among them, the first device encapsulates the control command (such as a link width switching command or other types of commands) into an LLP, and encapsulates the business data into a TLP, and then forms an LLB with the encapsulated LLP and TLP, and processes and sends the LLB to realize logical layer management and business data bandwidth sharing. The second device completes the reception and parsing of the LLB, parses out the LLP and TLP, and then parses out the control command from the LLP.
[0106] Figure 4(a) illustrates an example structure of a TLP provided in an embodiment of the present application. In this example, a TLP includes a packet type (PT) field, a packet length (PL) field, and several packet payload (PP) fields. The PP field can be used to carry service data. The PT, PL, and PP each occupy one byte, or 8 bits. In this example, the TLP does not contain a trailer structure.
[0107] Figure 4(b) is a diagram illustrating an example structure of an LLP provided in an embodiment of the present application. In this example, an LLP includes a packet type (PT) field, a packet length (PL) field, several packet payload (PP) fields, and one or more packet tail (PTL) fields. The PP field can be used to carry control commands. The PT, PL, PP, and PTL each occupy one byte. In this example, the LLP includes a packet tail structure for performing a cyclic redundancy check (CRC) on the transmitted data.
[0108] FIG4( c ) is a structural example diagram of an LLB provided in an embodiment of the present application. The LLB contains multiple LLPs and multiple TLPs. Among them, LLPs and TLPs are encapsulated in corresponding positions of the LLB in the order of generation. For example, in the example of FIG4( a ), the LLB includes LLP0, LLP1, LLP2, TLP0, LLP3, dummy data, TLP1, LLP5 and 10 Reed-Solomon codes (RS) in sequence, and the LLB occupies a total of 240 bytes. For another example, in other examples, an LLB includes TLP0, TLP1, LLP0, TLP2, TLP3, LLP1, TLP4, ... in sequence. Among them, dummy data (dummp) can be added to an LLP or TLP. The RS in the LLB is used for verification. In the LLB example of Figure 4(c), a single LLB is evenly distributed to 5 RS coding areas. At the transmitting end, each RS coding area is independently RS-encoded, and at the receiving end, each RS coding area is independently RS-decoded and error-corrected to protect the LLB data.
[0109] In one implementation, the link width switching command specifically indicates the adjusted state of the transmission channel from the first device to the second device, where the state includes a service transmission state and an electrical initialization state. The transmission channel in the service transmission state can be used to transmit data, while the transmission channel in the electrical initialization state cannot be used to transmit data.
[0110] The link status of a port of a device (such as the first device or the second device) includes full-speed status, idle-speed status, and zero-speed status.
[0111] 1) Full-speed status: All enabled channels in the logical layer are in high-speed logical layer status (LLSH), and the link is transmitting at the maximum bandwidth at the current rate. LLSH is also called the service transmission state, meaning that LLB can be transmitted normally.
[0112] For example, the transmission channels from the first device to the second device include transmission channels 0-5, for a total of six transmission channels. From the perspective of the second device, these six transmission channels are also referred to as six receiving channels from the second device to the first device. When transmission channels 0-5 are all in the service transmission state, the link of the port of the first device is in the full-speed state.
[0113] 2) Idle state: This refers to the situation where some of the logical layer-enabled channels are in LLSH state, while others are in LLSS state. The upper layer can control the number of logical layer channels that enter LLSS state, dynamically adjusting the data bandwidth of the transport layer. LLSS, also known as the electrical initialization state, means that no service data can be transmitted.
[0114] Taking the above 6 channels of the first device as an example, when some of the transmission channels 0-5 are in the service transmission state and the other transmission channels are in the electrical initial state, the link of the port of the first device is in the idle state.
[0115] 3) Zero-speed state means that all channels enabled by the logic layer are in LLSS state, and the logic layer suspends the main link service data transmission. At this time, the transport layer data bandwidth is equal to 0.
[0116] Taking the above 6 channels of the first device as an example, when the sending channels 0-5 are all in the electrical initial state, the link of the port of the first device is in the zero-speed state.
[0117] FIG5 is a schematic diagram of link state transitions provided in an embodiment of the present application. Specifically, the link states of a device port include full-speed, idle, and zero-speed states. The full-speed state and the idle state can be transitioned to each other, the full-speed state and the zero-speed state can be transitioned to each other, different idle states can be transitioned to each other, the idle state can be transitioned to the zero-speed state, but the zero-speed state cannot be transitioned to the idle state.
[0118] In one implementation method, the transmission channel from the first device to the second device includes at least one target channel, which is a channel in a service transmission state. In step 201a, the first device sends the logic block to the second device, specifically by sending the logic block on the at least one target channel. When the transmission channel from the first device to the second device includes at least two target channels, each of the at least two target channels carries part of the information in the logic block. Accordingly, the second device receives the logic block on the at least two target channels. This means that the logic block is distributed across the various target channels for transmission, which can improve transmission efficiency.
[0119] In one implementation, dynamic switching between link states between two devices is achieved through upper-layer control. During link data transmission, the first device controls the logic layer to reduce or increase the transmission link width based on the amount of data being transmitted. When the link transmission data bandwidth decreases, the logic layer can be controlled to reduce the link width; when the link transmission data bandwidth increases, the logic layer can be controlled to increase the link width.
[0120] In step 202a, the first device sends a state refresh code pattern to the second device, and the second device receives the state refresh code pattern accordingly.
[0121] The state refresh pattern (SRP) is used to synchronize the link width switching command between the first device and the second device. The state refresh pattern is also called a synchronization pattern.
[0122] In one implementation method, the first device may also periodically send a logical layer block start pattern (LLBSP) to the second device, where the LLBSP is used for clock synchronization and lock status check between the first device and the second device. Specifically:
[0123] 1) Clock Synchronization: There may be a slight deviation between the transmit clock of the first device and the receive clock of the second device. This deviation can cause a discrepancy between the transmit data rate of the first device and the receive data rate of the second device. This can lead to accumulation of data received by the second device (small amounts of accumulated data can be temporarily stored by adding a cache module). The LLBSP is periodically sent, and the second device completes the processing of the accumulated data while receiving the LLBSP, preventing the accumulated data from exceeding the cache module's buffering capacity and causing data loss.
[0124] 2) Lock Status Check: The LLBSP is periodically sent. The second device adjusts the block lock status based on the matching of the sampled data stream and the LLBSP to ensure subsequent correct reception and recognition of different logic blocks. Specifically, because logic blocks are continuously transmitted data streams, there is no way to distinguish between two consecutive logic blocks. They can only be distinguished by counting the start and end points. If a single bit of data is lost during data stream transmission, subsequent logic block recognition will be misaligned, resulting in an anomaly. To mitigate the impact of this anomaly, the LLBSP is periodically inserted to implement block lock adjustment, so that the logic blocks after the LLBSP can be correctly recognized.
[0125] Of course, the present application does not limit the LLBSP to having only the functions of clock synchronization and lock status check, and it may also have other functions in actual applications.
[0126] The following describes different implementation methods when the link width switching command is a channel increase command or a channel decrease command.
[0127] 1. The link width switching command is a channel reduction command
[0128] The channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
[0129] When the data transmission bandwidth of the link between the first and second devices decreases, the link width can be reduced. The upper layer of the first device sends a channel reduction command to the logic layer of the first device, specifying the link width after the channel reduction. The logic layer constructs an LLP based on the channel reduction command and sends it to the second device. It then controls the channels to be closed and starts to enter the electrical initial state. The first and second devices communicate link switching information through the LLP, achieving synchronized link switching using the state refresh code pattern.
[0130] In one implementation method, a transmission channel from a first device to a second device includes at least one first channel, where the first channel refers to a channel whose state needs to be adjusted from a service transmission state to an electrical initial state, also known as a transmission channel to be closed. The first device may send an electrical initialization pattern (EIP) on the at least one first channel, where the electrical initialization pattern is used to indicate that the state of the at least one first channel has been adjusted from a service transmission state to an electrical initial state.
[0131] 2. Link width switching command is a channel adding command
[0132] The channel adding command is used to increase the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
[0133] When the data transmission bandwidth of the link between the first and second devices increases, the link width can be increased. The upper layer of the first device sends a channel increase command to the logic layer of the first device, specifying the link width after the channel increase. The logic layer constructs an LLP based on the channel increase command and sends it to the second device. It then controls the channels to be enabled to exit the electrical initial state. The first and second devices communicate link switching information via the LLP, achieving synchronized link switching using a state refresh pattern.
[0134] In one implementation method, a transmission channel from a first device to a second device includes at least one second channel. The second channel is a channel that needs to adjust its state from an electrical initial state to a service transmission state, also known as a transmission channel to be enabled. The first device transmits an electrical idle exit pattern (EIEP) on the at least one second channel. The EIEP is used to indicate that the state of the second channel has been adjusted from the electrical initial state to the service transmission state.
[0135] In one implementation method, after sending the EIEP, the first device sends a fast lock pattern (FLP) on the at least one second channel. The fast lock pattern is used by the second device to quickly lock the at least one second channel. Specifically, fast locking includes: 1) clock locking, which enables the second device clock to correctly acquire the data stream sent by the first device. 2) block locking, which enables the second device to correctly identify the fast lock pattern from the received data stream and maintain the correct identification state. After the second channel subsequently enters the service transmission state, it can correctly identify and distinguish between the logical block start pattern (LLBSP) and different logical blocks (LLBs).
[0136] In the above scheme, the first device dynamically switches the link width according to its own bandwidth changes, and notifies the second device through a link width switching command, which can realize flexible switching of link width, reduce power consumption between the ports of the first device and the second device, and improve the precision of power consumption management and negotiation efficiency.
[0137] FIG2( b ) is a flow chart of a link width switching method provided in an embodiment of the present application. The method is applicable to a scenario where the link state of a device switches from zero speed to full speed. The method includes the following steps:
[0138] In step 201b, the first device sends an Electrical Initial Exit Pattern (EIEP) on a transmission channel from the first device to the second device. Correspondingly, the second device receives the Electrical Initial Exit Pattern on a transmission channel from the first device to the second device.
[0139] The electrical initial exit code type is used to indicate that the state of the transmission channel from the first device to the second device is adjusted from the electrical initial state to the service transmission state.
[0140] Specifically, when all the transmission channels from the first device to the second device are in the electrical initial state, the first device sends EIEP on all the transmission channels from the first device to the second device to trigger all the transmission channels to enter the service transmission state.
[0141] In step 202b, the first device continuously sends a fast lock pattern (FLP) on a transmission channel from the first device to the second device. Correspondingly, the second device continuously receives the fast lock pattern on a transmission channel from the first device to the second device.
[0142] The fast locking code pattern is used by the second device to quickly lock the transmission channel from the first device to the second device.
[0143] In one implementation, when the number of fast lock patterns sent exceeds a first threshold, the first device sends a state refresh pattern on the transmission channel from the first device to the second device. This state refresh pattern is used to synchronize the electrical initial exit pattern between the first and second devices. Correspondingly, the second device receives the state refresh pattern on the transmission channel from the first device to the second device. This state refresh pattern is also referred to as a state refresh pattern (SRP).
[0144] In one implementation method, after sending a state refresh code pattern, the first device adjusts the state of the transmission channel from the first device to the second device to the service transmission state. After receiving the state refresh code pattern, the second device adjusts the state of the transmission channel from the first device to the second device to the service transmission state.
[0145] In the above solution, the first device dynamically switches the link width according to the change of its own bandwidth, and opens all the transmission channels from the first device to the second device through the electrical initial exit code pattern and the fast lock code pattern, thereby realizing flexible switching of the link width, thereby reducing the power consumption between the ports of the first device and the second device, and improving the precision of power consumption management and negotiation efficiency.
[0146] The above process is described in detail below with reference to specific examples. In this example, the port of the first device is called the main downstream port (MDP), and the port of the second device is called the main upstream port (MUP). The maximum number of channels for the first device to send business data to the second device is 6, and the maximum number of channels for the second device to send business data to the first device is 2. Therefore, the channel configuration of the MDP is 6+2 mode, that is, 6 transmission channels (TX) + 2 reception channels (RX), and the channel configuration of the MUP is 2+6 mode, that is, 2 transmission channels + 6 reception channels. After the link is locked, the MDP can send data through a maximum of 6 channels and receive data through a maximum of 2 channels, and the MUP can send data through a maximum of 2 channels and receive data through a maximum of 6 channels. It should be noted that this is only an example, and the number of transmission channels and the number of reception channels of the device are not limited in actual applications.
[0147] The following describes in detail the link status change process between the MDP and MUP in different scenarios. Table 1 below shows an example of the change of the channel shutdown between the MDP and MUP.
[0148] It should be noted that channels 0-5 of the MDP refer to transmit channels 0-5 of the MDP, and correspondingly, receive channels 0-5 of the MUP. Channel 0-1 of the MUP refers to transmit channel 0-1 of the MUP, and correspondingly, receive channel 0-1 of the MDP. In the following examples, channels refer to transmit channels and are referred to simply as channels.
[0149] Table 1
[0150] The above scenarios 1 to 5 are given as examples in chronological order. The following is a detailed description of the above five scenarios.
[0151] In scenario 1, MDP and MUP enter full speed.
[0152] Figure 6(a) is a schematic diagram of the full-speed state provided by an embodiment of the present application. The MDP sends LLBs to the MUP on 6 channels, and inserts a logical block start code (LLBSP) every n LLBs, where n is a positive integer. Figure 6(b) is a schematic diagram of the data transmission process provided by an embodiment of the present application. Taking n=5 as an example, the MDP sends LLB0, LLB1, LLB2, LLB3, LLB4 on 6 channels in sequence, and then sends LLBSP0 on 6 channels, followed by LLB5, LLB6, LLB7, LLB8, LLB9 on 6 channels, and then sends LLBSP1 on 6 channels, and so on. Among them, the MDP sending LLB0 on 6 channels means that the bytes occupied by LLB0 are distributed to the 6 channels for transmission. For example, the structure of LLB0 is shown in Figure 4(c), which occupies 240 bytes (i.e., B0 to B239). Bytes B0, B6, B12, ..., B234 of LLB0 can be sent on channel 0, bytes B1, B7, B13, ..., B235 of LLB0 can be sent on channel 1, bytes B2, B8, B14, ..., B236 of LLB0 can be sent on channel 2, bytes B3, B9, B15, ..., B237 of LLB0 can be sent on channel 3, bytes B4, B10, B16, ..., B238 of LLB0 can be sent on channel 4, and bytes B5, B11, B17, ..., B239 of LLB0 can be sent on channel 5. The transmission method for other LLBs and LLBSPs is similar. When transmitted in this manner, the example in Figure 6(b) can be represented as the example channel allocation diagram shown in Figure 6(c).
[0153] After receiving data bit streams from the six channels, the MUP assembles an LLB or LLBSP. For LLBs, the MUP first stores the assembled LLBs in a cache for storage. The MUP then sequentially retrieves the LLBs from the cache for processing, such as parsing the LLB to obtain the LLP and TLP. For LLBSPs, the MUP does not need to cache the LLBSP. The LLBSP primarily adjusts the clock skew between the MDP and the MUP. For example, if the MDP sends LLBs too quickly and the MUP processes them insufficiently, the cache may become overpopulated with LLBs or even full, preventing further LLBs from being cached and resulting in data loss. If the MDP inserts an LLBSP after sending n LLBs, the MUP does not need to cache the LLBSP, allowing it to process the received LLBs as quickly as possible. This reduces the average rate at which the MDP sends LLBs, thereby ensuring clock synchronization between the MDP and the MUP. It should be noted that the MDP may insert one LLBSP or multiple LLBSPs after sending n LLBs, and this application does not limit this.
[0154] Similarly, the MUP sends LLBs to the MDP on two channels, and inserts an LLBSP every m LLBs, where m is a positive integer. Here, m may be equal to n or not. The way in which the MUP sends LLBs and LLBSPs is similar to the way in which the MDP sends LLBs and LLBSPs, and the way in which the MDP receives LLBs and LLBSPs is similar to the way in which the MUP receives LLBs and LLBSPs, and will not be described in detail. Figure 6(d) is an example diagram of channel allocation when the MUP sends LLBs provided in an embodiment of the present application. In this example, taking an LLB containing 240 bytes as an example, the MUP's sending channel 0 sends bytes B0, B2, ..., B238 of the LLB, and the MUP's sending channel 1 sends bytes B1, B3, ..., B239 of the LLB.
[0155] Figure 6(e) is a schematic diagram of service transmission at full speed according to an embodiment of the present application. It can be seen that all MDP transmission channels (i.e., six transmission channels) remain in the service transmission state, and all MUP transmission channels (i.e., two transmission channels) also remain in the service transmission state. In other words, channels 0-5 of the MDP are in the service transmission state, and channels 0-1 of the MUP are in the service transmission state.
[0156] In scenario 2, the MDP enters the idle state and the MUP maintains the full speed state.
[0157] After scenario 1, if the MDP's bandwidth requirements decrease, it can shut down some channels, such as four, to enter an idle state. Assuming the MDP decides to shut down channels 2-5, after shutting down channels 0-1, the MDP is in a service transmission state, while channels 2-5 are in an electrical initialization state.
[0158] Figure 7(a) is a schematic diagram of an MDP entering an idle state, as provided in an embodiment of the present application. Upon detecting that bandwidth demand is decreasing, the MDP can insert a lane down command in the LLB. This lane down command is a specific example of a control command and can be carried in the LLP. This lane down command is used to instruct the shutdown of four lanes.
[0159] For example, in combination with the LLP structure shown in FIG4( b ), an example of a channel reduction command and a channel increase command is given below, as shown in Table 2.
[0160] Table 2
[0161] In conjunction with the example in Table 2, if it is necessary to instruct to close channels 2-5, the 8-bit information of byte 2 (i.e., the third byte) of the LLP where the channel reduction command is located is: 01111100. Among them, 01111100 corresponds to bits 0 to 7 from right to left.
[0162] Figure 7(b) is an example diagram of channel allocation when an MDP sends an LLB, as provided in an embodiment of the present application. This example illustrates the process of an MDP changing from 6 transmission channels to 2 transmission channels. After initiating dynamic link width switching, service data transmission is maintained on channels 0-1, and when entering the LLBSP transmission interval, a status refresh pattern (SRP) is sent before sending the LLBSP. The SRP is used to indicate that the link width switching command has taken effect.
[0163] On channel 2-5, the MDP waits to enter the LLBSP sending interval after sending the LLB, stops sending the LLB after the start time of sending the LLBSP arrives, and replaces the LLBSP that needs to be sent with sending the SRP and electrical idle pattern (EIP), that is, instead of sending the LLBSP, it sends SRP and EIP. After the MDP sends the SRP and EIP on channel 2-5, the channel 2-5 enters the electrical initial state, and the MDP enters the idle state. Among them, the link width switching command includes a channel reduction command and a channel increase (lane up) command. In this example, the link width switching command refers to the channel reduction command. EIP is used to trigger entry into the electrical initial state.
[0164] After the MUP detects and parses the channel reduction command on channels 0-5, if SRP is detected on any channel among channels 0-5, the MUP determines that dynamic link width switching is effective. Therefore, after the MUP detects EIP on channel 2-5, it determines that the channel 2-5 enters the electrical initial state.
[0165] Figure 7(c) is a schematic diagram of service transmission in the MDP idle state and the MUP at full speed, as provided in an embodiment of the present application. It can be seen that channels 0-1 of the MDP are in service transmission mode, while channels 2-5 are in the electrical initialization mode. Channels 0-1 of the MUP are in service transmission mode.
[0166] In scenario three, the MDP adjusts the idle state and the MUP enters the idle state.
[0167] After Scenario 2 above, if the MDP's bandwidth demand decreases further, it can shut down another channel, such as Channel 1, to adjust to the idle state. Simultaneously, the MUP's bandwidth demand also decreases, and the MUP shuts down Channel 1, entering the idle state. After shutting down Channel 1, Channel 0 of the MDP enters the service transmission state, while Channels 1-5 enter the electrical initialization state. After shutting down Channel 1, Channel 0 of the MDP enters the service transmission state, while Channel 1 enters the electrical initialization state.
[0168] Figure 8(a) is a schematic diagram of the MDP adjusting the idle state and the MUP entering the idle state provided by an embodiment of the present application. When the MDP detects that the bandwidth demand is further reduced, it inserts a channel reduction command in the LLB, specifies the closure of channels 1-5, and starts dynamic switching of the link width. In conjunction with the example in Table 2, if it is necessary to indicate the closure of channels 1-5, the 8-bit information of byte 2 (i.e., the third byte) of the LLP where the channel reduction command is located is: 01111110. Among them, 01111110 corresponds to bits 0 to 7 from right to left.
[0169] Furthermore, when the MUP detects that the bandwidth demand is decreasing, it inserts a channel reduction command into the LLB, specifies the closure of channel 1, and starts dynamic switching of the link width. In conjunction with the example in Table 2, if it is necessary to indicate the closure of channel 1, the 8-bit information of byte 2 (i.e., the third byte) of the LLP where the channel reduction command is located is: 01xxxx10. Among them, 01xxxx10 corresponds to bits 0 to 7 from right to left. Among them, 'x' indicates that it can be any value, that is, it can be 0 or 1. When the MDP parses the 8-bit information, it does not need to pay attention to the specific values of bits 2-5.
[0170] Figure 8(b) illustrates an example of channel allocation when an MDP sends an LLB, as provided in an embodiment of the present application. This example illustrates the process of an MDP switching from two transmission channels to a single transmission channel. After dynamic link width switching is initiated, service data transmission is maintained on channel 0. When entering the LLBSP transmission interval, an SRP is sent before the LLBSP is sent.
[0171] On channel 1, after sending the LLB, the MDP waits for the LLBSP transmission interval to begin. After the LLBSP transmission start time arrives, the MDP stops sending the LLB and replaces the LLBSP with the SRP and EIP. In other words, instead of the LLBSP, the MDP sends the SRP and EIP. After the MDP sends the SRP and EIP on channel 1, channel 1 enters the electrical initialization state. Channels 2-5 remain in the electrical initialization state. At this point, the MDP completes the idle state adjustment. After the MUP detects and parses the channel reduction command on channels 0-1, if an SRP is detected on any of the channels 0-1, the MUP determines that dynamic link width switching is in effect. Therefore, the MUP determines that channel 1 enters the electrical initialization state after detecting the EIP on channel 1.
[0172] Figure 8(c) illustrates an example of channel allocation for an MUP transmitting an LLB, as provided in an embodiment of the present application. This example illustrates the process of an MUP switching from two transmission channels to a single transmission channel. The MUP disables MUP transmission channel 1 in a manner similar to the MDP channel reduction procedure, and will not be further described.
[0173] Figure 8(d) is a schematic diagram of service transmission in the MDP and MUP modes in idle state, as provided by an embodiment of the present application. It can be seen that channel 0 of the MDP is in service transmission mode, while channels 1-5 are in electrical initialization mode. Channel 0 of the MUP is in service transmission mode, while channel 1 is in electrical initialization mode.
[0174] In scenario four, the MDP adjusts the idle state and the MUP enters the zero-speed state.
[0175] After scenario three, if the MDP's bandwidth requirements increase, it can open two channels, for example, channels 1 and 2, to adjust to an idle state. Meanwhile, the MUP, having no data to transmit, enters a zero-speed state, further disabling channel 0, thereby shutting down all MUP transmit channels. After opening channels 1 and 2, channels 0 and 2 enter a service transmission state, while channels 3 and 5 enter an electrical initialization state. After disabling channel 0, channels 0 and 1 enter an electrical initialization state.
[0176] Figure 9(a) is a schematic diagram of the MDP adjusting the idle state and the MUP entering the zero-speed state provided by an embodiment of the present application. When the MDP detects that the bandwidth demand has increased, it inserts a channel increase command in the LLB, specifies the opening of channels 0-2 (that is, closing channels 3-5), and starts dynamic switching of the link width. Combined with the example in Table 2, if the MDP needs to indicate the opening of channels 0-2, the 8-bit information of byte 2 (that is, the third byte) of the LLP where the channel increase command is located is: 10111000. Among them, 10111000 corresponds to bits 0 to 7 from right to left.
[0177] Furthermore, when the MUP detects that the bandwidth demand is decreasing, it inserts a channel reduction command into the LLB, specifies the closure of channel 0-1, and starts dynamic switching of the link width. In conjunction with the example in Table 2, if it is necessary to indicate the closure of channel 0-1, the 8-bit information of byte 2 (i.e., the third byte) of the LLP where the channel reduction command is located is: 01xxxx11. Among them, 01xxxx11 corresponds to bits 0 to 7 from right to left. Among them, 'x' indicates that it can be any value, that is, it can be 0 or 1. When the MDP parses the 8-bit information, it does not need to pay attention to the specific values of bits 2-5.
[0178] Figure 9(b) illustrates an example of channel allocation when an MDP sends an LLB, as provided in an embodiment of the present application. This example illustrates the process of an MDP changing from one transmission channel to three. After dynamic link width switching is initiated, service data transmission is maintained on channel 0, and a channel add command is inserted into the LLB sent on channel 0. Furthermore, when entering the LLBSP transmission interval, an SRP is sent before sending the LLBSP.
[0179] After the MDP sends a channel add command on channel 0, it immediately initiates link fast lock. Specifically, the MDP sends the Electrical Initial Exit Pattern (EIEP) on channel 1-2, exits the electrical initial state, and then continuously sends the fast lock pattern (FLP) to quickly lock the link. When the MUP receives the channel add command on channel 0 and simultaneously detects the EIEP on channel 1-2, the MUP initiates the exit from the electrical initial state for channel 1-2. Simultaneously, the MUP detects the FLP on channel 1-2 to initiate link fast lock. The EIEP triggers the exit from the electrical initial state. The FLP is used to achieve channel fast lock between the MDP and the MUP. If the MDP sends a preset number of FLPs, the MDP sends an SRP during the LLBSP interval of channel 0-2, validating the channel add command. Subsequently, channel 0-2 resumes service transmission, and channel 0-2 then sends the LLBSP and LLB sequentially. The MUP detects the FLPs to perform fast lock. After lock is complete, if the SRP is detected, the channel add command is validated, and the MUP determines that channel 0-2 has resumed service data transmission.
[0180] Figure 9(c) is an example diagram of channel allocation when the MUP sends LLB according to an embodiment of the present application. This example shows the process of the MUP changing from 1 sending channel to 0 sending channels. When the MUP detects that the bandwidth demand is 0, it inserts a channel reduction command in the LLB, specifies the closure of channel 0-1, and starts dynamic switching of the link width. After the MUP's channel reduction command is sent, it waits to enter the LLBSP sending interval, and sends SRP and EIP in sequence on the sending channel 0. After the sending is completed, the channel 0 enters the electrical initial state, and the MUP's sending channel 1 maintains the electrical initial state. At this time, the MUP enters the zero-speed state. After the MDP detects and parses the channel reduction command on channel 0, it continues to detect SRP. After detecting SRP, the channel reduction command takes effect. Subsequently, after the MDP detects EIP on the receiving channel 0, the receiving channel 0 enters the electrical initial state.
[0181] Figure 9(d) is a schematic diagram of service transmission of the MDP in idle state according to an embodiment of the present application. It can be seen that channels 0-2 of the MDP are in service transmission mode, channels 3-5 are in electrical initialization mode, and channels 0-1 of the MUP are in electrical initialization mode.
[0182] In scenario five, both MDP and MUP return to full speed.
[0183] After the above scenario 4, if the bandwidth requirements of MDP and MUP increase, both need to be restored to full speed. This means that MDP needs to open 6 sending channels and MUP needs to open 2 sending channels.
[0184] Figure 10(a) is a schematic diagram of the MDP and MUP returning to full speed according to an embodiment of the present application. When the MDP detects an increase in bandwidth demand, it inserts a channel increase command into the LLB, specifies the opening of channels 0-5, and initiates dynamic link width switching. Referring to the example in Table 2, if the MDP needs to indicate the opening of channels 0-5, the 8-bit information in byte 2 (i.e., the third byte) of the LLP containing the channel increase command is: 10000000. 10000000 corresponds to bits 0 through 7 from right to left.
[0185] Figure 10(b) illustrates an example of channel allocation when an MDP sends an LLB, as provided in an embodiment of the present application. This example illustrates the process of an MDP changing from three transmission channels to six. After dynamic link width switching is initiated, service data transmission is maintained on channels 0-2, and a channel add command is inserted into the LLB sent on channels 0-2. Furthermore, when entering the LLBSP transmission interval, an SRP is sent before sending the LLBSP.
[0186] After the MDP sends a channel add command on channel 0-2, it immediately initiates fast link lock. Specifically, the MDP sends an EIEP on channels 3-5, exits the electrical initialization state, and then continuously sends FLPs to achieve fast link lock. When the MUP receives the channel add command on channel 0-2 and simultaneously detects an EIEP on channel 3-5, it initiates the exit of channel 3-5 from the electrical initialization state. Simultaneously, the MUP detects FLPs on channel 3-5 to initiate fast link lock. The EIEP triggers the exit from the electrical initialization state. FLPs enable fast link lock between the MDP and MUP. When the MDP reaches a preset threshold for sending FLPs, it sends an SRP during the LLBSP interval of channel 0-5, validating the channel add command. Subsequently, channels 0-5 resume service transmission, and channels 0-5 then sequentially send LLBSPs and LLBs. The MUP detects FLPs for fast link lock. After lock is complete, if it detects an SRP, it determines that the channel add command has taken effect and confirms that the receiving channel 0-5 has resumed service data transmission. The MDP's adjustment to full speed is complete.
[0187] Figure 10(c) is an example diagram of channel allocation when the MUP sends LLBs provided in an embodiment of the present application. This example shows the process of the MUP changing from 0 sending channels to 2 sending channels. The MUP currently has no channels for business data transmission, so the MUP cannot be restored to full speed through the channel increase command. When the MUP senses that there is new data to be sent, it starts fast locking and returns to full speed. All sending channels of the MUP send EIEP at the same time, and then send FLP to start link fast locking. After the MDP detects EIEP in the receiving channel, all receiving channels start fast locking. When the number of FLPs sent by the MUP reaches the preset threshold, it sends SRP and then returns to full speed. Each channel resumes business data transmission and sends LLBSP and LLB in sequence. If the MDP detects SRP after the fast locking is completed, it determines that the receiving channel has returned to full speed. The adjustment of the MUP to full speed state is completed.
[0188] Figure 6(e) shows a schematic diagram of service transmission between MDP and MUP at full speed. It can be seen that channels 0-5 of the MDP are in service transmission mode, while channels 0-1 of the MUP are in service transmission mode.
[0189] In the above example, the link width adjustment corresponding to MDP and MUP is independent of each other and does not require negotiation. It is controlled unilaterally by the transmitting device, making dynamic link width switching simple to implement. Furthermore, dynamic link width switching can cover 0 channels to the maximum channel (i.e., x0, x1, x2, x3, x4, x5, and x6), providing more flexible power consumption control and more precise power reduction control.
[0190] In the examples of scenarios 1 to 5 above, only one link width switching command (i.e., a channel reduction command or a channel increase command) is sent each time, but this application is not limited to sending only one link width switching command. In an embodiment of the present application, multiple link width switching commands are allowed to be sent before sending SRP for state synchronization to achieve command coverage. The following is an example of MDP. Assume that MDP currently opens sending channels 0-2 and closes sending channels 3-5. Based on this example, there are the following four scenarios.
[0191] Scenario a, the channel reduction command overrides the channel reduction command.
[0192] Figure 11(a) is an example diagram of a scenario in which a channel reduction command overwrites a channel reduction command provided in an embodiment of the present application. When the MDP detects that the bandwidth demand has become smaller, it inserts a channel reduction command in the LLB and specifies to close 5 channels (for example, specify to close channels 1-5); before entering the LLBSP interval, the MDP detects a change in bandwidth demand again, and the bandwidth demand indicates that 2 channels are required, so it is necessary to send a new channel reduction command to overwrite the previous channel reduction command. The new channel reduction command specifies to close 4 channels (for example, specify to close channels 2-5). During this period, the MDP maintains 3 channels (i.e., channels 0-2) to transmit business data. Waiting to enter the LLBSP sending interval, insert SRP and EIP in sequence into the sending channel 2. After the sending is completed, it enters the electrical initial state and the MDP completes the idle state adjustment. When the MUP receives the SRP, no matter how many link width switching commands have been received, it only determines that the most recently received link width switching command is valid. The current scenario corresponds to the last channel reduction command, and other commands are determined to be invalid commands.
[0193] In scenario b, the channel increase command overrides the channel decrease command.
[0194] Figure 11(b) is an example diagram of a scenario in which a channel increase command overwrites a channel decrease command provided in an embodiment of the present application. When the MDP detects that the bandwidth demand has become smaller, it inserts a channel reduction command in the LLB and specifies to close 5 channels (for example, specify to close channels 1-5); before entering the LLBSP interval, the MDP detects a change in bandwidth demand again, and the bandwidth demand indicates that 5 channels are needed, so it is necessary to send a new channel increase command to overwrite the previous channel reduction command. The new channel increase command specifies to open 5 channels (for example, specify to open channels 0-4). During this period, the MDP maintains 3 channels (i.e., channels 0-2) to transmit business data; the reopened channels 3-4 send EIEP, exit the electrical initial state, and then continue to send FLP to quickly lock the link. Waiting to enter the LLBSP sending interval, insert SRP and LLBSP in the sending channels 0-4 in sequence. After the sending is completed, channels 0-4 enter the business transmission stage, and the MDP completes the idle state adjustment. When MUP receives SRP, no matter how many link width switching commands it has received, it only determines that the most recently received link width switching command is valid. The current scenario corresponds to the last channel increase command, and other commands are determined to be invalid commands.
[0195] In scenario c, the channel decrease command overrides the channel increase command.
[0196] Figure 11(c) is an example diagram of a scenario in which a channel reduction command overwrites a channel increase command provided in an embodiment of the present application. When the MDP detects an increase in bandwidth demand, it inserts a channel increase command in the LLB and specifies the opening of 5 channels (for example, specifying the opening of channels 0-4); before entering the LLBSP interval, the MDP detects a change in bandwidth demand again, and the bandwidth demand indicates that 2 channels are required, so it is necessary to send a new channel reduction command to overwrite the previous channel increase command. The new channel reduction command specifies the closing of 4 channels (for example, specifying the closing of channels 2-5). During this period, the MDP maintains 3 channels (i.e., channels 0-2) to transmit business data. Waiting to enter the LLBSP sending interval, insert SRP and EIP in sequence into the sending channel 2. After the sending is completed, it enters the electrical initial state and the MDP completes the idle state adjustment. When the MUP receives the SRP, no matter how many link width switching commands have been received, it only determines that the most recently received link width switching command is valid. The current scenario corresponds to the last channel reduction command, and other commands are determined to be invalid commands.
[0197] In scenario d, the channel add command overrides the channel add command.
[0198] Figure 11 (d) is an example diagram of a scenario in which a channel increase command overwrites a channel increase command provided in an embodiment of the present application. When the MDP detects an increase in bandwidth demand, it inserts a channel increase command into the LLB and specifies that 4 channels are to be opened; before entering the LLBSP interval, the MDP detects a change in bandwidth demand again, and the bandwidth demand indicates that 6 channels are required, so a new channel increase command needs to be sent to overwrite the previous channel increase command. The new channel increase command specifies that 6 channels are to be opened (i.e., channels 0-5 are to be sent). During this period, the MDP maintains 3 channels (i.e., channels 0-2) to transmit business data; the reopened channels 3-5 send EIEP, exit the electrical initial state, and then continue to send FLP to quickly lock the link. Waiting to enter the LLBSP sending interval, SRP and LLBSP are inserted in sequence into the sending channels 0-5. After the sending is completed, channels 0-5 enter the business transmission phase, and the MDP completes the idle state adjustment. When the MUP receives the SRP, no matter how many link width switching commands have been received, only the most recently received link width switching command is determined to be valid. The current scenario corresponds to the last channel increase command, and other commands are determined to be invalid commands.
[0199] It is understandable that in order to implement the functions in the above embodiments, the first device or the second device includes hardware structures and / or software modules corresponding to the execution of each function. It should be readily apparent to those skilled in the art that, in combination with the units and method steps of each example described in the embodiments disclosed in this application, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in hardware or in a computer software-driven hardware manner depends on the specific application scenario and design constraints of the technical solution.
[0200] Figures 12 and 13 are schematic diagrams of the structures of possible communication devices provided in embodiments of the present application. These communication devices can be used to implement the functions of the first device or the second device in the above method embodiments, thereby also achieving the beneficial effects of the above method embodiments. In the embodiments of the present application, the communication device can be the first device or the second device, or a module (such as a chip) in the first device or the second device.
[0201] The communication device 1200 shown in Figure 12 includes a processing unit 1210 and a transceiver unit 1220. The communication device 1200 is used to implement the functions of the first device or the second device in the above method embodiment.
[0202] When the communication device 1200 is used to implement the function of the first device (or MDP) in the above method embodiment, the processing unit 1210 is used to control the transceiver unit 1220 to send a logic block to the second device, wherein the logic block includes a link width switching command, and the link width switching command is used to adjust the state of the sending channel from the first device to the second device; and send a state refresh code type to the second device, and the state refresh code type is used to synchronize the link width switching command between the first device and the second device.
[0203] In one possible implementation method, the link width switching command is used to adjust the state of the sending channel from the first device to the second device, including: the link width switching command indicates the adjusted state of the sending channel from the first device to the second device, and the state includes the service transmission state and the electrical initial state.
[0204] In a possible implementation method, the logic block includes a link width switching command, including: the logic block includes a logic layer data packet, and the logic layer data packet includes the link width switching command.
[0205] In a possible implementation method, the processing unit 1210 is further used to control the transceiver unit 1220 to periodically send a logic block startup code pattern to the second device, where the logic block startup code pattern is used for clock synchronization and lock status check between the first device and the second device.
[0206] In a possible implementation method, the link width switching command is a channel reduction command, and the channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
[0207] In one possible implementation method, the transmission channel from the first device to the second device includes at least one first channel; the processing unit 1210 is also used to control the transceiver unit 1220 to send an electrical initial code pattern on the at least one first channel, and the electrical initial code pattern is used to indicate that the state of the at least one first channel is adjusted from the service transmission state to the electrical initial state; and adjust the state of the at least one first channel to the electrical initial state.
[0208] In a possible implementation method, the link width switching command is a channel increase command, and the channel increase command is used to increase the number of sending channels in a service transmission state in a sending channel from the first device to the second device.
[0209] In one possible implementation method, the transmission channel from the first device to the second device includes at least one second channel; the processing unit 1210 is further used to control the transceiver unit 1220 to send an electrical initial exit code on the at least one second channel, where the electrical initial exit code is used to indicate that the state of the second channel is adjusted from the electrical initial state to the service transmission state; and adjust the state of the at least one second channel to the service transmission state.
[0210] In a possible implementation method, the processing unit 1210 is further configured to control the transceiver unit 1220 to send a quick lock pattern on the at least one second channel, where the quick lock pattern is used for the second device to quickly lock the at least one second channel.
[0211] In one possible implementation method, the sending channel from the first device to the second device includes at least one target channel, and the target channel is a channel in a service transmission state; the processing unit 1210 is specifically used to control the transceiver unit 1220 to send the logic block on at least one target channel.
[0212] In a possible implementation method, the logic block further includes at least one transport layer data packet, and the transport layer data packet is used to carry business data.
[0213] When the communication device 1200 is used to implement the function of the second device (or MUP) in the above method embodiment, the processing unit 1210 is used to control the transceiver unit 1220 to receive a logic block from the first device, wherein the logic block includes a link width switching command, and the link width switching command is used to adjust the state of the sending channel from the first device to the second device; receive a state refresh code type from the first device, and the state refresh code type is used to synchronize the link width switching command between the first device and the second device.
[0214] In one possible implementation method, the link width switching command is used to adjust the state of the sending channel from the first device to the second device, including: the link width switching command indicates the adjusted state of the sending channel from the first device to the second device, and the state includes the service transmission state and the electrical initial state.
[0215] In a possible implementation method, the logic block includes a link width switching command, including: the logic block includes a logic layer data packet, and the logic layer data packet includes the link width switching command.
[0216] In one possible implementation method, the processing unit 1210 is further used to control the transceiver unit 1220 to periodically receive a logic block startup code pattern from the first device, where the logic block startup code pattern is used for clock synchronization and lock status check between the first device and the second device.
[0217] In a possible implementation method, the link width switching command is a channel reduction command, and the channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
[0218] In one possible implementation method, the sending channel from the first device to the second device includes at least one first channel; the processing unit 1210 is also used to control the transceiver unit 1220 to receive an electrical initial code pattern on the at least one first channel, and the electrical initial code pattern is used to indicate that the state of the at least one first channel is adjusted from the service transmission state to the electrical initial state; and adjust the state of the at least one first channel to the electrical initial state.
[0219] In a possible implementation method, the link width switching command is a channel increase command, and the channel increase command is used to increase the number of sending channels in a service transmission state in a sending channel from the first device to the second device.
[0220] In one possible implementation method, the sending channel from the first device to the second device includes at least one second channel; the processing unit 1210 is further used to control the transceiver unit 1220 to receive an electrical initial exit code on the at least one second channel, where the electrical initial exit code is used to indicate that the state of the at least one second channel is adjusted from the electrical initial state to the service transmission state; and adjust the state of the at least one second channel to the service transmission state.
[0221] In a possible implementation method, the processing unit 1210 is further configured to control the transceiver unit 1220 to receive a fast lock pattern on the second channel, where the fast lock pattern is used for the second device to quickly lock the second channel.
[0222] In one possible implementation method, the sending channel from the first device to the second device includes at least one target channel, and the target channel is a channel in a service transmission state; the processing unit 1210 is specifically used to control the transceiver unit 1220 to receive the logic block on at least one target channel.
[0223] In a possible implementation method, the logic block further includes at least one transport layer data packet, and the transport layer data packet is used to carry business data.
[0224] When the communication device 1200 is used to implement the function of the first device (or MDP) in the above method embodiment, the processing unit 1210 is used to control the transceiver unit 1220 to send an electrical initial exit code on the sending channel from the first device to the second device, and the electrical initial exit code is used to indicate that the state of the sending channel from the first device to the second device is adjusted from the electrical initial state to the service transmission state; and continuously send a fast lock code on the sending channel from the first device to the second device, and the fast lock code is used by the second device to quickly lock the sending channel from the first device to the second device.
[0225] In one possible implementation method, the processing unit 1210 is also used to control the transceiver unit 1220 to send a status refresh code on the sending channel from the first device to the second device when the number of times the quick lock code is sent is greater than a first threshold. The status refresh code is used for the sending channel from the first device to the second device to synchronously enter the service transmission state.
[0226] In a possible implementation method, the processing unit 1210 is further configured to adjust the state of the transmission channel from the first device to the second device to a service transmission state after controlling the transceiver unit 1220 to send the state refresh code pattern.
[0227] When the communication device 1200 is used to implement the function of the second device (or MUP) in the above method embodiment, the processing unit 1210 is used to control the transceiver unit 1220 to receive an electrical initial exit code pattern on the sending channel from the first device to the second device, and the electrical initial exit code pattern is used to indicate that the state of the sending channel from the first device to the second device is adjusted from the electrical initial state to the service transmission state; and continuously receive a fast lock code pattern on the sending channel from the first device to the second device, and the fast lock code pattern is used by the second device to quickly lock the sending channel from the first device to the second device.
[0228] In one possible implementation method, the processing unit 1210 is also used to control the transceiver unit 1220 to receive a state refresh code on the sending channel from the first device to the second device, and the state refresh code is used for the sending channel from the first device to the second device to synchronously enter the service transmission state.
[0229] In a possible implementation method, the processing unit 1210 is further configured to adjust the state of the transmission channel from the first device to the second device to a service transmission state after the control transceiver unit 1220 receives the state refresh code pattern.
[0230] For a more detailed description of the processing unit 1210 and the transceiver unit 1220, reference can be made to the relevant description in the above method embodiment, which will not be repeated here.
[0231] The communication device 1300 shown in Figure 13 includes a processor 1310 and an interface circuit 1320. The processor 1310 and the interface circuit 1320 are coupled to each other. It is understood that the interface circuit 1320 can be a transceiver or an input / output interface. Optionally, the communication device 1300 may also include a memory 1330 for storing instructions executed by the processor 1310, or storing input data required by the processor 1310 to execute instructions, or storing data generated after the processor 1310 executes instructions.
[0232] When the communication device 1300 is used to implement the above method embodiment, the processor 1310 is used to implement the functions of the above processing unit 1210 , and the interface circuit 1320 is used to implement the functions of the above transceiver unit 1220 .
[0233] It is understood that the processor in the embodiments of the present application may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. The general-purpose processor may be a microprocessor or any conventional processor.
[0234] The method steps in the embodiments of the present application can be implemented by hardware or by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a random access memory, a flash memory, a read-only memory, a programmable read-only memory, an erasable programmable read-only memory, an electrically erasable programmable read-only memory, a register, a hard disk, a mobile hard disk, a compact disc read-only memory (CD-ROM) or any other form of storage medium well known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be an integral part of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in the first device or the second device. Of course, the processor and the storage medium can also be present in the first device or the second device as discrete components.
[0235] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer programs or instructions. A computer program (English: Computer Program) refers to a set of instructions that instruct an electronic computer or other device with message processing capabilities to perform each step of the operation, usually written in a certain programming language and running on a certain target architecture. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are executed in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a terminal device or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer program or instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via wired or wireless means. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that integrates one or more available media. The available medium may be a magnetic medium, such as a floppy disk, a hard disk, or a magnetic tape; an optical medium, such as a digital video disk; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium may be a volatile or non-volatile storage medium, or may include both volatile and non-volatile types of storage media.
[0236] In the various embodiments of the present application, unless otherwise specified or there is a logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other. The technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.
[0237] In this application, "at least one" means one or more, and "more" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. In the text description of this application, the character " / " generally indicates that the previous and next related objects are in an "or" relationship; in the formulas of this application, the character " / " indicates that the previous and next related objects are in a "division" relationship.
[0238] It is understood that the various numbers used in the embodiments of this application are merely for ease of description and are not intended to limit the scope of the embodiments of this application. The order of the sequence numbers of the above-mentioned processes does not necessarily imply a specific order of execution; the order of execution of the processes should be determined by their functions and inherent logic.
Claims
1. A link width switching method, It is characterized in that The first device or a module in the first device includes: Sending a logic block to a second device, wherein the logic block includes a link width switching command, and the link width switching command is used to adjust a state of a transmission channel from the first device to the second device; A state refresh code pattern is sent to the second device, where the state refresh code pattern is used for synchronization and effectiveness of the link width switching command between the first device and the second device.
2. The method according to claim 1, It is characterized in that The link width switching command is used to adjust the state of the transmission channel from the first device to the second device, including: The link width switching command indicates the adjusted state of the transmission channel from the first device to the second device, where the state includes a service transmission state and an electrical initial state.
3. The method according to claim 1 or 2, It is characterized in that The logic block includes a link width switching command, including: The logic block includes a logic layer data packet, and the logic layer data packet includes the link width switching command.
4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: A logic block startup code pattern is periodically sent to the second device, where the logic block startup code pattern is used for clock synchronization and lock status check between the first device and the second device.
5. The method according to any one of claims 1 to 4, It is characterized in that The method further comprises: The link width switching command is a channel reduction command, and the channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
6. The method according to claim 5, It is characterized in that The transmission channel from the first device to the second device includes at least one first channel; The method further comprises: Sending an electrical initial code pattern on the at least one first channel, wherein the electrical initial code pattern is used to indicate that the state of the at least one first channel is adjusted from a service transmission state to an electrical initial state; The state of the at least one first channel is adjusted to an electrical initial state.
7. The method according to any one of claims 1 to 4, It is characterized in that The link width switching command is a channel adding command, and the channel adding command is used to increase the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
8. The method according to claim 7, It is characterized in that The transmission channel from the first device to the second device includes at least one second channel; The method further comprises: Sending an electrical initial exit code pattern on the at least one second channel, wherein the electrical initial exit code pattern is used to indicate that the state of the second channel is adjusted from the electrical initial state to the service transmission state; The state of the at least one second channel is adjusted to a service transmission state.
9. The method according to claim 8, It is characterized in that The method further comprises: A fast lock code pattern is sent on the at least one second channel, where the fast lock code pattern is used for the second device to quickly lock the at least one second channel.
10. The method according to any one of claims 1 to 9, It is characterized in that The sending channel from the first device to the second device includes at least one target channel, and the target channel is a channel in a service transmission state; The sending of the logic block to the second device includes: The logic block is sent on at least one destination channel.
11. The method according to any one of claims 1 to 10, It is characterized in that The logic block also includes at least one transport layer data packet, and the transport layer data packet is used to carry business data.
12. A link width switching method, It is characterized in that The second device or a module in the second device includes: receiving a logic block from a first device, wherein the logic block includes a link width switching command, and the link width switching command is used to adjust a state of a transmission channel from the first device to the second device; A state refresh code pattern is received from the first device, where the state refresh code pattern is used for synchronizing and taking effect of the link width switching command between the first device and the second device.
13. The method according to claim 12, It is characterized in that The link width switching command is used to adjust the state of the transmission channel from the first device to the second device, including: The link width switching command indicates the adjusted state of the transmission channel from the first device to the second device, where the state includes a service transmission state and an electrical initial state.
14. The method according to claim 12 or 13, It is characterized in that The logic block includes a link width switching command, including: The logic block includes a logic layer data packet, and the logic layer data packet includes the link width switching command.
15. The method according to any one of claims 12 to 14, It is characterized in that The method further comprises: A logic block startup code pattern is periodically received from the first device, where the logic block startup code pattern is used for clock synchronization and lock status check between the first device and the second device.
16. The method according to any one of claims 12 to 15, It is characterized in that The method further comprises: The link width switching command is a channel reduction command, and the channel reduction command is used to reduce the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
17. The method of claim 16, It is characterized in that The transmission channel from the first device to the second device includes at least one first channel; The method further comprises: Receiving an electrical initial code pattern on the at least one first channel, the electrical initial code pattern being used to indicate that the state of the at least one first channel is adjusted from a service transmission state to an electrical initial state; The state of the at least one first channel is adjusted to an electrical initial state.
18. The method according to any one of claims 12 to 15, It is characterized in that The link width switching command is a channel adding command, and the channel adding command is used to increase the number of sending channels in a service transmission state among the sending channels from the first device to the second device.
19. The method of claim 18, It is characterized in that The transmission channel from the first device to the second device includes at least one second channel; The method further comprises: receiving an electrical initial exit code pattern on the at least one second channel, the electrical initial exit code pattern being used to indicate that the state of the at least one second channel is adjusted from an electrical initial state to a service transmission state; The state of the at least one second channel is adjusted to a service transmission state.
20. The method of claim 19, It is characterized in that The method further comprises: A fast lock pattern is received on the second channel, where the fast lock pattern is used for the second device to quickly lock the second channel.
21. The method according to any one of claims 12 to 20, It is characterized in that The sending channel from the first device to the second device includes at least one target channel, and the target channel is a channel in a service transmission state; The receiving logic block from the first device includes: The logic block is received on at least one target channel.
22. The method according to any one of claims 12 to 21, It is characterized in that The logic block also includes at least one transport layer data packet, and the transport layer data packet is used to carry business data.
23. A link width switching method, It is characterized in that The first device or a module in the first device includes: Sending an electrical initial exit code pattern on a transmission channel from the first device to the second device, where the electrical initial exit code pattern is used to indicate that a state of the transmission channel from the first device to the second device is adjusted from an electrical initial state to a service transmission state; A fast locking code pattern is continuously sent on a transmission channel from the first device to the second device, where the fast locking code pattern is used by the second device to quickly lock the transmission channel from the first device to the second device.
24. The method of claim 23, It is characterized in that The method further comprises: When the number of fast lock code patterns sent is greater than a first threshold, a state refresh code pattern is sent on a sending channel from the first device to the second device, and the state refresh code pattern is used for the sending channel from the first device to the second device to synchronously enter a service transmission state.
25. The method of claim 24, It is characterized in that The method further comprises: After sending the state refresh code pattern, the state of the transmission channel from the first device to the second device is adjusted to a service transmission state.
26. A link width switching method, It is characterized in that The second device or a module in the second device includes: receiving an electrical initial exit code pattern on a transmission channel from the first device to the second device, the electrical initial exit code pattern being used to indicate that a state of the transmission channel from the first device to the second device is adjusted from an electrical initial state to a service transmission state; A fast locking code pattern is continuously received on a transmission channel from the first device to the second device, where the fast locking code pattern is used by the second device to quickly lock the transmission channel from the first device to the second device.
27. The method of claim 26, It is characterized in that The method further comprises: A state refresh code pattern is received on a transmission channel from the first device to the second device, where the state refresh code pattern is used for the transmission channel from the first device to the second device to synchronously enter a service transmission state.
28. The method of claim 27, It is characterized in that The method further comprises: After receiving the state refresh code pattern, the state of the sending channel from the first device to the second device is adjusted to a service transmission state.
29. A communication device, It is characterized in that The method comprises a processor coupled to a memory, wherein the processor is used to call a program stored in the memory to execute the method described in any one of claims 1 to 11, or execute the method described in any one of claims 23 to 25.
30. A communication device, It is characterized in that The method comprises a processor coupled to a memory, wherein the processor is used to call a program stored in the memory to execute the method described in any one of claims 12 to 22, or execute the method described in any one of claims 26 to 28.
31. A computer-readable storage medium, It is characterized in that The storage medium stores a computer program or instruction, and when the computer program or instruction is executed by the communication device, the method as claimed in any one of claims 1 to 28 is implemented.
32. A communication system, It is characterized in that The method comprises a first device for executing the method as claimed in any one of claims 1 to 11, and a second device for executing the method as claimed in any one of claims 12 to 22.
33. A communication system, It is characterized in that It comprises a first device for executing the method as claimed in any one of claims 23 to 25, and a second device for executing the method as claimed in any one of claims 26 to 28.
Citation Information
Patent Citations
Method, system and apparatus for dynamically adjusting link
CN102257849A
Interface circuit and communication device
CN111585602A
PERIPHERAL COMPONENT INTERCONNECT EXPRESS (PCIe) SYSTEM AND METHOD OF OPERATING THE SAME
US20220327074A1
Method and apparatus for adjusting link width
WO2022156778A1
