Ua link link control apparatus, method and ua link chip

CN122933792APending Publication Date: 2026-10-16常州楠菲微电子有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611407467.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0007]本申请提供了一种UALink链路控制装置、方法及UALink芯片,可以解决相关技术中存在的通过UALink芯片进行高速互联通信的过程中,存在功耗较高的问题

Benefits of technology

[0024]在上述技术方案中,可以利用事务层向数据链路层发送的数据量表征UALink芯片当前整体的数据传输需求,并基于连续多个流量监测窗口内的聚合流量确定是否需要调整参与数据传输的物理链路。在数据传输需求持续降低时,可以在保留数据传输通路的基础上减少处于打开状态的物理链路;在数据传输需求持续增大时,又能够重新打开此前关闭的物理链路。与此同时,在实际改变目标物理链路的链路状态之前,通过UALink芯片与目标UALink芯片之间进行链路协商,并在双方对链路状态调整达成一致后,再完成目标物理链路的状态调整以及后续待传输数据的调度。由此,使参与数据传输的物理链路能够根据实际数据传输需求动态变化,在满足当前数据传输需求的同时,减少无需持续处于打开状态的物理链路产生的功耗。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933792A_ABST
    Figure CN122933792A_ABST
Patent Text Reader

Abstract

The application provides a UALink link control device, method and UALink chip. The device is arranged in a data link layer of the UALink chip, and comprises a receiving buffer module, a traffic monitoring module, a link negotiation information sending module, a packet sending scheduling module and a link negotiation information analysis module. The traffic monitoring module obtains aggregate traffic according to the data volume sent by a transaction layer to the data link layer, and determines a target physical link and a target link state according to the aggregate traffic; the link negotiation information sending module generates a link negotiation request, which is sent to a target UALink chip by the packet sending scheduling module; the link negotiation information analysis module determines whether to agree to link state adjustment according to a link negotiation response returned by the target UALink chip; in the case of agreement, the packet sending scheduling module controls the physical layer to adjust the link state of the target physical link, and schedules the data to be transmitted to the physical link in an open state for transmission. The application can reduce the power consumption of the UALink chip when high-speed interconnection communication is performed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and more specifically, to a UALink link control device, method, and UALink chip. Background Technology

[0002] UALink (Ultra Accelerator Link) is a chip / board interconnect protocol designed for high-speed interconnection, low latency, and high reliability. It is specifically designed for high-speed interconnection scenarios of artificial intelligence accelerators such as graphics processing units (GPUs), data processing units (DPUs), and neural network processing units (NPUs), aiming to build an open and unified AI computing power interconnection ecosystem.

[0003] UALink employs a layered protocol architecture, comprising the UALink Protocol Level Interface (UPLI), Transaction Layer (TL), Data Link Layer (DL), and Physical Layer (PHY). The UALink Protocol Level Interface serves as the entry point for the entire interconnect protocol to the upper-layer hardware, handling high-level memory access transaction definitions and interfacing with the accelerator kernel, cache, and memory controller. The Transaction Layer is responsible for generating data packets and processing upper-layer business logic, including initiating and responding to read and write requests. The Data Link Layer is responsible for reliable transmission and flow control, including data packet acknowledgment, retransmission, and congestion control. The Physical Layer is responsible for the physical transmission and encoding / decoding of signals, enabling the transmission and reception of high-speed serial differential signals.

[0004] The UALink protocol features ultra-high bandwidth, extremely low latency, and low power consumption. It can be scaled to large-scale cluster interconnection of hundreds or even thousands of accelerator chips, making it one of the important foundational interconnection standards for realizing multi-chip collaborative computing and building large-scale AI computing power clusters. Unlike proprietary interconnection protocols such as NVLink, UALink, as an open standard, supports interconnection and interoperability between chips from different manufacturers, which helps promote the development of the heterogeneous AI computing ecosystem.

[0005] In practical applications, different graphics processing units (GPUs) can be interconnected through corresponding UALink chips to achieve high-speed data transmission and interaction between them. Here, a UALink chip refers to a chip that supports the UALink protocol.

[0006] However, as the scale of artificial intelligence computing continues to expand, the demand for data interaction between AI accelerators such as graphics processing units (GPUs) is constantly increasing, placing higher demands on the interconnect communication capabilities of the UALink chip. High-speed interconnect communication via the UALink chip also presents a problem of high power consumption. Summary of the Invention

[0007] This application provides a UALink link control device, method, and UALink chip, which can solve the problem of high power consumption in high-speed interconnection communication using UALink chips in related technologies. The technical solution is as follows:

[0008] According to one aspect of this application, a UALink link control device is disposed in the data link layer of a UALink chip. The UALink chip includes a transaction layer, the data link layer, and a physical layer. The physical layer includes multiple physical links, and the UALink chip is connected to a target UALink chip through the multiple physical links. The UALink link control device includes:

[0009] A receive cache module is used to receive and cache the data to be transmitted sent by the transaction layer;

[0010] The traffic monitoring module is used to monitor the amount of data sent from the transaction layer to the data link layer, obtain aggregated traffic, determine whether the physical link needs to be adjusted based on the aggregated traffic, and if it is determined that the physical link needs to be adjusted, determine the target physical link and the target link state of the target physical link from the multiple physical links; the target physical link is the physical link to be adjusted, and the target link state is used to characterize the state that the target physical link should be in after the adjustment;

[0011] The link negotiation information sending module is used to generate a link negotiation request based on the target physical link and the target link status, and send the link negotiation request to the packet scheduling module; the link negotiation request is used to request that the target physical link be adjusted from the current link status to the target link status;

[0012] The packet scheduling module is used to send the link negotiation request to the physical layer so that the link negotiation request is sent to the target UALink chip through the physical link;

[0013] The link negotiation information parsing module is used to obtain the link negotiation response from the target UALink chip, determine whether the link negotiation response indicates agreement to the link negotiation request, and send the determination result to the packet scheduling module.

[0014] The packet scheduling module is further configured to send a link state adjustment instruction to the physical layer when the determination result indicates agreement to the link negotiation request, so that the physical layer adjusts the target physical link from the current link state to the target link state according to the link state adjustment instruction;

[0015] The packet sending scheduling module is also used to obtain the data to be transmitted from the receiving buffer module, and after the target physical link is adjusted to the target link state, schedule the data to be transmitted to the physical link in the open state for transmission through the physical layer.

[0016] According to one aspect of this application, a UALink link control method is applied to a UALink chip, the UALink chip including a transaction layer, a data link layer, and a physical layer, the physical layer including multiple physical links, and the UALink chip connecting to a target UALink chip through the multiple physical links; the method includes:

[0017] Receive and buffer the data to be transmitted sent by the transaction layer;

[0018] The amount of data sent from the transaction layer to the data link layer is monitored to obtain aggregated traffic. Based on the aggregated traffic, it is determined whether the physical link needs to be adjusted. If it is determined that the physical link needs to be adjusted, a target physical link and its target link state are determined from the multiple physical links. The target physical link is the physical link to be adjusted, and the target link state is used to characterize the state that the target physical link should be in after the adjustment.

[0019] A link negotiation request is generated based on the target physical link and the target link state, and the link negotiation request is sent to the physical layer so that the link negotiation request is sent to the target UALink chip through the physical link; the link negotiation request is used to request that the target physical link be adjusted from the current link state to the target link state;

[0020] Obtain the link negotiation response from the target UALink chip, and determine whether the link negotiation response indicates agreement to the link negotiation request;

[0021] If the link negotiation response indicates agreement to the link negotiation request, a link state adjustment instruction is sent to the physical layer so that the physical layer adjusts the target physical link from the current link state to the target link state according to the link state adjustment instruction;

[0022] After the target physical link is adjusted to the target link state, the data to be transmitted is scheduled to be transmitted on the physical link that is in the open state.

[0023] According to one aspect of this application, a UALink chip includes the UALink link control device as described above.

[0024] In the above technical solution, the amount of data sent from the transaction layer to the data link layer can be used to characterize the overall data transmission demand of the UALink chip, and the aggregated traffic within multiple consecutive traffic monitoring windows can be used to determine whether the physical links participating in data transmission need to be adjusted. When the data transmission demand continues to decrease, the number of physical links in the open state can be reduced while maintaining the data transmission path; when the data transmission demand continues to increase, previously closed physical links can be reopened. Simultaneously, before actually changing the link state of the target physical link, link negotiation is conducted between the UALink chip and the target UALink chip. After both parties reach an agreement on the link state adjustment, the state adjustment of the target physical link and the scheduling of subsequent data to be transmitted are completed. Thus, the physical links participating in data transmission can dynamically change according to the actual data transmission demand, meeting the current data transmission requirements while reducing the power consumption of physical links that do not need to be continuously open. Attached Figure Description

[0025] Figure 1 This is a schematic diagram illustrating the connection relationship between a UALink chip and a target UALink chip according to an exemplary embodiment;

[0026] Figure 2 This is a structural block diagram of a UALink link control device according to an exemplary embodiment;

[0027] Figure 3 This is a schematic diagram illustrating a specific implementation of interconnecting GPUs via a UALink chip in an application scenario.

[0028] Figure 4 This is a timing diagram of a physical link shutdown negotiation process in an application scenario;

[0029] Figure 5 This diagram illustrates a data scheduling scenario where multiple physical links are all open.

[0030] Figure 6 This diagram illustrates a data scheduling scenario where one of the physical links is in a closed state.

[0031] Figure 7 This is a schematic diagram illustrating the specific implementation of a UALink link control device in an application scenario. Detailed Implementation

[0032] The present invention will now be described in further detail with reference to specific embodiments and accompanying drawings. Similar elements in different embodiments are referred to by associated similar element reference numerals. In the following embodiments, many details are described to facilitate a better understanding of this application. However, those skilled in the art will readily recognize that some features may be omitted in different situations, or may be replaced by other elements, materials, or methods. In some cases, certain operations related to this application are not shown or described in the specification. This is to avoid obscuring the core parts of this application with excessive description. For those skilled in the art, detailed description of these related operations is not necessary; they can fully understand the related operations based on the description in the specification and general technical knowledge in the art.

[0033] Furthermore, the features, operations, or characteristics described in the specification can be combined in any suitable manner to form various embodiments. At the same time, the steps or actions in the method description can be rearranged or adjusted in a manner obvious to those skilled in the art. Therefore, the various orders in the specification and drawings are only for the clear description of a particular embodiment and do not imply a necessary order, unless otherwise stated that a particular order must be followed.

[0034] The serial numbers assigned to components in this document, such as "first" and "second," are used only to distinguish the described objects and have no sequential or technical meaning. The terms "connection" and "linkage" used in this application, unless otherwise specified, include both direct and indirect connections (linkages).

[0035] The following is the research and development approach:

[0036] In interconnecting high-performance computing devices such as GPUs, the increasing amount of data that needs to be transferred between devices necessitates high-speed interconnects to improve data transmission capabilities. Therefore, the UALink chip can be applied to these interconnecting scenarios to enable data transmission between different GPUs or other computing devices.

[0037] Furthermore, to meet the demands of large data transmission and improve the reliability of inter-chip interconnects, multiple physical links are configured at the physical layer of the UALink chip, enabling the UALink chip to transmit data with another UALink chip through multiple physical links. By configuring multiple physical links, higher transmission bandwidth can be provided when data transmission demand is high, while data transmission can still be carried out through other physical links even when some physical links are unavailable.

[0038] However, further research into the actual operation of the UALink chip revealed that its data transmission requirements vary with workload. When data transmission demand is low, the actual amount of data to be transmitted is small, but multiple physical links may remain open, resulting in unnecessary power consumption. Furthermore, simply shutting down some physical links to reduce power consumption will limit the UALink chip's original transmission capacity when subsequent data transmission demands increase.

[0039] To address the aforementioned contradiction, the first thought is to move away from keeping all physical links constantly open. Instead, the number of physical links involved in data transmission can be dynamically adjusted based on the current service traffic of the UALink chip. When service traffic remains low, some physical links can be shut down to reduce power consumption; when service traffic increases again, the corresponding physical links can be reopened to restore the data transmission capacity of the UALink chip. This allows the number of physical links to dynamically change with actual data transmission needs, rather than remaining fixed.

[0040] However, further research into the aforementioned dynamic link adjustment method revealed that the physical link between UALink chips connects the two ends of the link. If only one end directly changes the physical link state based on its own service traffic, it may lead to inconsistencies in the two UALink chips' understanding of the currently available physical links, thus affecting subsequent data scheduling and transmission. Therefore, it is further proposed that after determining that a physical link adjustment is needed, the UALink chip and the target UALink chip should first negotiate the link. Only after confirming that the target UALink chip agrees to the corresponding link state adjustment should the target physical link be opened or closed, thereby enabling both ends of the link to conduct subsequent data transmission based on a consistent link state.

[0041] Further investigation revealed that even after two UALink chips have completed link negotiation, the physical link state cannot be switched immediately. This is because during link state adjustment, the receive buffer may still contain previously written but not yet transmitted data. If transmission is directly performed according to the adjusted physical link state, the data scheduling processes before and after the adjustment may overlap. Therefore, it is proposed that during link state adjustment, the transaction layer should first stop sending new data to be transmitted, and the data already buffered in the receive buffer should continue to be scheduled until the buffer is empty. Then, the corresponding link state and transmission mode switch should be completed, and the transmission of new data to be transmitted should resume. This establishes a complete and coordinated control mechanism within the UALink chip, encompassing service traffic monitoring, link negotiation, physical link state adjustment, and data scheduling.

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0043] Please see Figure 1 and Figure 2 This application provides a UALink link control device 100, which is disposed in the data link layer 1100 of a UALink chip 1000. The UALink chip 1000 includes a data link layer 1100, a transaction layer 1200, and a physical layer 1300. The physical layer 1300 includes multiple physical links, and the UALink chip 1000 is connected to a target UALink chip 2000 through the multiple physical links.

[0044] The transaction layer 1200 can provide data to be transmitted to the data link layer 1100; the data link layer 1100 can buffer, control link status, and schedule packets for the data to be transmitted provided by the transaction layer 1200; the physical layer 1300 can transmit data with the target UALink chip 2000 through multiple physical links. The multiple physical links can be in an open or closed state respectively. Physical links in the open state can participate in data transmission between the UALink chip 1000 and the target UALink chip 2000, while physical links in the closed state do not participate in the current data transmission. It should be noted that the physical layer 1300 in this application is a protocol layer within the UALink chip 1000, and this physical layer 1300 can correspond to multiple physical links.

[0045] Furthermore, the target UALink chip 2000 can refer to another UALink chip that establishes a communication connection with UALink chip 1000 through multiple physical links. This chip receives data to be transmitted, link negotiation requests, and other information sent by UALink chip 1000, and can return corresponding link negotiation responses to these requests. Thus, UALink chip 1000 and the target UALink chip 2000 can jointly form a group of mutually communicating UALink communication nodes, achieving data transmission and link status negotiation through multiple physical links between them.

[0046] It should be noted that the UALink chip 1000 and the target UALink chip 2000 are primarily used to distinguish different communication objects during the current link state adjustment process, and are not used to define a fixed master-slave relationship between them. For example, when the UALink chip 1000 initiates a link state adjustment, the UALink chip 1000 can be used as the sender of the link negotiation request, and the target UALink chip 2000 can be used as the receiver of the link negotiation request; in other link state adjustment processes, the target UALink chip 2000 can also initiate the corresponding link state adjustment.

[0047] In some implementations, the target UALink chip 2000 may have the same or corresponding protocol layer structure as the UALink chip 1000, such as including a transaction layer, data link layer, and physical layer. The data link layer of the target UALink chip 2000 may also be configured with a UALink link control device, enabling the target UALink chip 2000 to initiate link state adjustments based on its corresponding data transmission status, or to complete link negotiation and corresponding link state control after receiving a link negotiation request from the UALink chip 1000. Therefore, both UALink chips can participate in link state adjustments according to actual data transmission needs, without limiting link control to only one UALink chip.

[0048] In some application scenarios, multiple UALink chips can also be interconnected through a UALink interconnect chip. Specifically, a UALink interconnect chip can include multiple communication ports, each of which can be connected to a corresponding UALink chip, enabling communication connections between multiple UALink chips via the interconnect chip. For example, different graphics processors can be connected to their respective UALink chips, and each UALink chip can then be connected to different ports on the interconnect chip, thereby facilitating data exchange between multiple graphics processors. In this application, UALink chip 1000 and the target UALink chip 2000 can be any two of the multiple UALink chips that require data transmission or link state negotiation.

[0049] Figure 3 This diagram illustrates the architecture of GPU0 and GPU1 interconnected via a UALink chip in an embodiment of this application. Figure 3 As shown, Figure 3This illustration shows an architecture diagram of GPU0 and GPU1 interconnected via a UALink chip in an embodiment of this application. In this embodiment, GPU0 is connected to the UALink chip, and GPU1 is connected to a target UALink chip. The UALink chip and the target UALink chip are connected through multiple physical links, thereby forming a data transmission path between GPU0 and GPU1.

[0050] Specifically, a UALink chip can include a transaction layer, a data link layer, and a physical layer, and the target UALink chip can also include a corresponding transaction layer, data link layer, and physical layer. The physical layers of the UALink chip and the target UALink chip can be connected via multiple physical links, each of which can be used to transmit data between the two UALink chips. Taking data transmission from GPU0 to GPU1 as an example, the data to be transmitted generated by GPU0 can sequentially pass through the transaction layer, data link layer, and physical layer of the UALink chip, and be sent to the target UALink chip through an open physical link. After receiving the corresponding data, the target UALink chip can transmit the data to GPU1 through its physical layer, data link layer, and transaction layer. When GPU1 transmits data to GPU0, it can use the corresponding data transmission path.

[0051] In this embodiment, the UALink chip can act as one initiating link state adjustment, and the target UALink chip can act as the other initiating link negotiation with the UALink chip. For example, when the UALink chip determines that the link state of one of the physical links needs to be adjusted based on the current data transmission requirements, it can send a link negotiation request to the target UALink chip. After both parties complete the corresponding link negotiation, the link state of the target physical link is adjusted. It should be noted that the names of the UALink chip and the target UALink chip are only used to distinguish the two communication ends in a single link state adjustment process, and do not limit the fixed master-slave relationship between them. The target UALink chip can also be configured with the aforementioned UALink link control device and act as the initiator of other link state adjustment processes.

[0052] The UALink link control device 100, located at the data link layer 1100, can adjust the physical links participating in data transmission according to the current data transmission needs of the UALink chip 1000. Specifically, when the current data transmission demand is low, some physical links that are currently open can be switched to a closed state; when the data transmission demand increases, the physical links that are currently closed can be switched back to an open state. This allows the actual number of physical links participating in data transmission to change with the data transmission demand, without requiring all physical links to remain open at all times.

[0053] Specifically, the UALink link control device 100 includes a receive buffer module 110, a traffic monitoring module 120, a link negotiation information sending module 130, a packet scheduling module 140, and a link negotiation information parsing module 150.

[0054] The receive buffer module 110 is used to receive and buffer the data to be transmitted sent by the transaction layer 1200.

[0055] The data to be transmitted can be data processed by the transaction layer 1200 and then sent to the target UALink chip 2000 via the physical layer 1300. The receive buffer module 110 is located between the transaction layer 1200 and the packet scheduling module 140. It can temporarily store data to be transmitted that has not yet been scheduled to the physical layer 1300, thus enabling a connection between the data provision process of the transaction layer 1200 and the data transmission process of the physical layer 1300 through buffering. During normal data transmission, the packet scheduling module 140 can sequentially obtain the data to be transmitted from the receive buffer module 110 and schedule the data to be transmitted according to the current link status of each physical link.

[0056] The traffic monitoring module 120 is used to monitor the amount of data sent from the transaction layer 1200 to the data link layer 1100, obtain aggregated traffic, determine whether the physical link needs to be adjusted based on the aggregated traffic, and if it is determined that the physical link needs to be adjusted, determine the target physical link and the target link state of the target physical link from multiple physical links; the target physical link is the physical link to be adjusted, and the target link state is used to characterize the state that the target physical link should be in after the adjustment.

[0057] Aggregated traffic refers to the amount of data sent from the transaction layer 1200 to the data link layer 1100 within a defined traffic monitoring range and awaiting transmission through multiple physical links. It can be used to characterize the overall data transmission demand between the UALink chip 1000 and the target UALink chip 2000. Compared to judging solely based on the data volume currently carried by a single physical link, monitoring aggregated traffic allows for determining whether to change the number of physical links currently involved in data transmission based on the overall data transmission demand of multiple physical links, reducing the impact of specific packet scheduling methods on traffic assessment results.

[0058] Link state adjustment refers to switching at least one physical link between different link states. In this embodiment, the link state can include an open state and a closed state. Therefore, when the traffic monitoring module 120 determines that the current data transmission demand has decreased to a level that can be met by a small number of physical links, it can determine that some physical links need to be closed; when the traffic monitoring module 120 determines that the current data transmission demand has increased and the existing open physical links are unable to meet the corresponding data transmission demand, it can determine that the previously closed physical links need to be reopened.

[0059] The target physical link is used to determine which physical link the current link state adjustment applies to, and the target link state is used to determine the state of the target physical link after the adjustment. For example, when there are multiple open physical links and data transmission demand decreases, one of the open physical links can be designated as the target physical link, and its closed state can be designated as the target link state. Conversely, when some physical links are already closed and data transmission demand increases again, the closed physical links can be designated as the target physical links, and their open state can be designated as the target link state.

[0060] In some embodiments, the traffic monitoring module 120 includes a traffic statistics unit.

[0061] The traffic statistics unit is used to count the amount of data sent from the transaction layer 1200 to the data link layer 1100 according to the set traffic monitoring window, obtain the aggregated traffic corresponding to each traffic monitoring window, and obtain the aggregated traffic corresponding to a set number of consecutive traffic monitoring windows.

[0062] The traffic monitoring window is used to define the time range for each traffic statistics session. The length of the traffic monitoring window can be configured according to a set number of clock cycles, or it can be set according to the actual operating state of the UALink chip 1000. For any traffic monitoring window, the traffic statistics unit can count the total amount of data sent from the transaction layer 1200 to the data link layer 1100 within that traffic monitoring window, and determine this total amount of data as the aggregated traffic corresponding to that traffic monitoring window. For example, a traffic monitoring window can be set to 1024 clock cycles, and the amount of data within that traffic monitoring window can be counted every 1024 clock cycles to obtain the aggregated traffic corresponding to that traffic monitoring window. It should be noted that 1024 clock cycles is only an example used for illustrative purposes; the specific number of clock cycles corresponding to the traffic monitoring window can be configured according to actual application requirements, and this application does not impose a specific limitation on this.

[0063] The continuously set number of traffic monitoring windows is used to characterize the need to continuously observe traffic changes across multiple monitoring windows, rather than determining link status adjustments based solely on aggregated traffic within a single monitoring window. For example, setting the continuously set number to 3 allows the traffic statistics unit to sequentially acquire the aggregated traffic corresponding to three consecutive monitoring windows. If each monitoring window comprises 1024 clock cycles, the system can determine whether data transmission demand remains at a low or high level based on the three aggregated traffic flows generated over 3072 consecutive clock cycles. In other words, even if the aggregated traffic corresponding to one monitoring window meets the relevant traffic conditions, the system can continue to acquire the aggregated traffic for subsequent monitoring windows. Only when the aggregated traffic corresponding to three consecutive monitoring windows meets the relevant conditions is the continuity of the traffic status determined.

[0064] In some implementations, the traffic statistics unit can also record the aggregated traffic data to a register in the UALink chip 1000 for other units in the traffic monitoring module 120 to read. It should be noted that the specific location of the register and the data recording format can be determined based on the chip design, and this application does not impose specific limitations on them.

[0065] In some embodiments, the traffic monitoring module 120 further includes a status adjustment judgment unit.

[0066] The status adjustment judgment unit is used to determine whether the aggregated traffic continuously meets the link closing condition or the link opening condition based on the aggregated traffic corresponding to a continuously set number of traffic monitoring windows, and if the link closing condition or the link opening condition is continuously met, it determines that the physical link needs to be adjusted.

[0067] Specifically, the link-closing condition can be used to determine whether the current data transmission demand has continuously decreased to the point where the number of open physical links can be reduced; the link-opening condition can be used to determine whether the current data transmission demand has continuously increased to the point where the number of open physical links needs to be increased. The status adjustment judgment unit does not directly change the physical link status based on a single traffic change within a traffic monitoring window, but rather makes a judgment based on the aggregated traffic corresponding to multiple consecutive traffic monitoring windows.

[0068] For example, if aggregated traffic temporarily decreases within a certain traffic monitoring window, and then increases again in a subsequent traffic monitoring window, the current link status of each physical link can be maintained. Similarly, if aggregated traffic temporarily increases within a certain traffic monitoring window, and then decreases again in a subsequent traffic monitoring window, the current link status of each physical link can also be maintained. This reduces the likelihood that short-term traffic changes will directly trigger repeated link status adjustments for physical links.

[0069] In some embodiments, the traffic monitoring module 120 further includes a link closure determination unit.

[0070] The link closure determination unit is used to determine that the link closure condition is met when the aggregated traffic corresponding to a set number of consecutive traffic monitoring windows is less than the first traffic threshold and the number of physical links currently in the open state is greater than one. The unit then determines one of the physical links currently in the open state as the target physical link and determines the closed state as the target link state.

[0071] The first traffic threshold is used to determine whether the current data transmission demand has decreased to a level that reduces the traffic of open physical links. When the aggregated traffic corresponding to multiple consecutive traffic monitoring windows is less than the first traffic threshold, it indicates that the low data transmission demand has persisted for a certain period of time. Based on this, it is further determined whether the number of currently open physical links is greater than one. Even after closing one physical link, at least one open physical link can still be maintained for data transmission between the UALink chip 1000 and the target UALink chip 2000.

[0072] For example, UALink chip 1000 and target UALink chip 2000 include physical link 0 and physical link 1, both of which are currently open. The first traffic threshold can be set to one-third of the full bandwidth traffic, and the consecutive threshold number can be set to 3. If the aggregated traffic corresponding to three consecutive traffic monitoring windows is less than one-third of the full bandwidth traffic, it can be determined that the current low data transmission demand has persisted for some time. Since there are two open physical links at this time, meaning the number of currently open physical links is greater than one, it can be determined that the link closing condition is met. One physical link can be selected from physical link 0 and physical link 1 as the target physical link; for example, physical link 0 can be selected as the target physical link, and the closed state can be set as the target link state. After subsequent link negotiation and link state adjustment are completed, physical link 0 can be closed, and data transmission can continue using the open physical link 1.

[0073] Conversely, if only physical link 1 is open at this time, even if the aggregated traffic corresponding to three consecutive traffic monitoring windows is less than the first traffic threshold, it is no longer necessary to determine whether the link closure condition is met, thereby avoiding closing the only remaining open physical link and ensuring that the data transmission path between UALink chip 1000 and the target UALink chip 2000 is still maintained.

[0074] Therefore, when both of the above conditions are met, a physical link can be selected from the currently open physical links as the target physical link, and the closed state can be set as the target link state for that target physical link. If only one physical link is currently open, then even if the aggregated traffic remains below the first traffic threshold, that physical link can remain open to preserve the data transmission path between the UALink chip 1000 and the target UALink chip 2000.

[0075] In some embodiments, the traffic monitoring module 120 further includes a link open determination unit.

[0076] The link opening determination unit is used to determine that the link opening condition is met when the aggregated traffic corresponding to a set number of consecutive traffic monitoring windows is greater than the second traffic threshold, and there is a physical link in the closed state among multiple physical links. The unit then determines the physical link in the closed state as the target physical link and the open state as the target link state.

[0077] The second traffic threshold is used to determine whether the current data transmission demand has increased to the point where it is necessary to increase the traffic level of physical links that are currently open. When the aggregated traffic corresponding to multiple consecutive traffic monitoring windows is greater than the second traffic threshold, it indicates that the high data transmission demand has persisted for a certain period of time. If, at this time, there are physical links that are currently closed, then the closed physical links can be identified as target physical links, and the open state can be identified as the target link state, so that the target physical link can re-participate in data transmission after subsequent link negotiation.

[0078] The first and second traffic thresholds can be configured based on the full bandwidth traffic of the UALink chip 1000, the data transmission requirements that a single physical link can meet, and the actual application scenario. For example, the first traffic threshold can be set to one-third of the full bandwidth traffic, and the second traffic threshold can be set to two-thirds of the full bandwidth traffic. In other implementations, the data transmission requirements that a single physical link can meet can also be used as the basis for setting the traffic thresholds. This application does not limit the specific values ​​of the first and second traffic thresholds.

[0079] For example, the UALink chip 1000 and the target UALink chip 2000 include physical link 0 and physical link 1. After the aforementioned link closing process, physical link 0 is currently in a closed state, and physical link 1 is currently in an open state. The second traffic threshold can be set to two-thirds of the full bandwidth traffic, and the consecutive setting quantity can be set to 3. If the aggregated traffic corresponding to three consecutive traffic monitoring windows is greater than two-thirds of the full bandwidth traffic, it can be determined that the current high data transmission demand has lasted for a certain period of time. Since physical link 0 is currently in a closed state, meaning that there is a closed physical link among multiple physical links, it can be determined that the link opening condition is met. Physical link 0 is then identified as the target physical link, and the open state is identified as the target link state. After subsequent link negotiation and link state adjustment are completed, physical link 0 can be readjusted to the open state, enabling both physical link 0 and physical link 1 to participate in data transmission between UALink chip 1000 and the target UALink chip 2000 to accommodate the increased data transmission demand.

[0080] Correspondingly, if both physical link 0 and physical link 1 are currently open, even if the aggregated traffic corresponding to three consecutive traffic monitoring windows is greater than the second traffic threshold, there is no need to perform a link opening operation since there are no physical links in a closed state, and the current link status of each physical link can be maintained.

[0081] In some implementations, the second traffic threshold can be greater than the first traffic threshold, so that link closure and link opening correspond to different traffic judgment intervals. For example, the first traffic threshold can be one-third of the full bandwidth traffic, and the second traffic threshold can be two-thirds of the full bandwidth traffic. This maintains the current physical link state when the aggregated traffic is between the first and second traffic thresholds, reducing the possibility of frequent link state adjustments triggered when the aggregated traffic fluctuates within the critical range.

[0082] By setting a first traffic threshold to trigger link closure and a second traffic threshold to trigger link opening, we can determine whether data transmission demand is decreasing or increasing, thus enabling the physical link status to be adjusted according to actual data transmission needs.

[0083] In some embodiments, the traffic monitoring module 120 further includes a link determination unit.

[0084] The link determination unit is used to determine the target physical link from the currently open physical links according to a set rotation method when it is determined that the link closure condition is met, so that the target physical link determined when the link closure condition is met in two consecutive determinations is different.

[0085] The rotation method refers to the approach of selecting different physical links in rotation when link closure is triggered multiple times. Since multiple physical links are open, the data to be transmitted can be scheduled among these open links, and the data transmission load on each physical link can be relatively similar. If the same physical link is selected to be closed every time the link closure condition is met, that physical link may bear the brunt of more opening and closing operations.

[0086] Therefore, when multiple physical links exist that can be closed, the physical link previously identified as the target physical link can be recorded. When the link closure condition is met again, the target physical link can be determined from the other currently open physical links. For example, in the case of links 0 and 1, link 0 can be selected when link closure is first triggered. If link 0 is subsequently reopened and link closure is triggered again, link 1 can be selected. This allows multiple link state transitions to be distributed across different physical links, reducing the possibility of uneven aging due to differences in the number of state transitions between different physical links.

[0087] The link negotiation information sending module 130 is used to generate a link negotiation request based on the target physical link and the target link status, and send the link negotiation request to the packet scheduling module 140; the link negotiation request is used to request that the target physical link be adjusted from the current link status to the target link status.

[0088] The link negotiation request is used to send the link state adjustment requirement determined by the UALink chip 1000 to the target UALink chip 2000. The link negotiation request can at least indicate the target physical link for which link state adjustment is to be performed and the corresponding target link state. For example, when the target link state is closed, the link negotiation request can be used to request the target UALink chip 2000 to agree to close the target physical link; when the target link state is open, the link negotiation request can be used to request the target UALink chip 2000 to agree to open the target physical link.

[0089] It should be noted that the target physical link connects the UALink chip 1000 and the target UALink chip 2000, and its link status adjustment involves both ends of the physical link. Therefore, after the traffic monitoring module 120 determines the target physical link and its status, it does not directly change the link status of the target physical link. Instead, it first generates a link negotiation request through the link negotiation information sending module 130, so that the target UALink chip 2000 can be informed of the link status adjustment requirement.

[0090] The packet scheduling module 140 is used to send the link negotiation request to the physical layer 1300 so that the link negotiation request can be sent to the target UALink chip 2000 through the physical link.

[0091] Specifically, after the link negotiation information sending module 130 generates a link negotiation request, it can provide the link negotiation request to the packet scheduling module 140. The packet scheduling module 140 provides the link negotiation request to the physical layer 1300 and sends it to the target UALink chip 2000 through the currently open physical link that can be used for data transmission. Thus, the negotiation process before link state adjustment can be completed using the existing physical connection between the UALink chip 1000 and the target UALink chip 2000.

[0092] The link negotiation information parsing module 150 is used to obtain the link negotiation response from the target UALink chip 2000, determine whether the link negotiation response indicates agreement to the link negotiation request, and send the determination result to the packet scheduling module 140.

[0093] The link negotiation response is the response information returned by the target UALink chip 2000 in response to the link negotiation request. It can be used to indicate whether the target UALink chip 2000 agrees to the link state adjustment for the target physical link. When the link negotiation response indicates agreement to the link negotiation request, it means that the UALink chip 1000 and the target UALink chip 2000 have reached an agreement on the target physical link and its target link state. When the link negotiation response indicates disagreement to the link negotiation request, the current link state of the target physical link can be maintained, and the link state adjustment will not be performed.

[0094] The packet scheduling module 140 is also used to send a link state adjustment instruction to the physical layer 1300 when the determination result indicates agreement to the link negotiation request, so that the physical layer 1300 adjusts the target physical link from the current link state to the target link state according to the link state adjustment instruction.

[0095] The link state adjustment indicator is used to instruct the physical layer 1300 to perform state adjustments corresponding to the target physical link state. When the target link state is closed, the physical layer 1300 can use the link state adjustment indicator to make the target physical link withdraw from subsequent data transmission; when the target link state is open, the physical layer 1300 can use the link state adjustment indicator to make the target physical link re-participate in subsequent data transmission.

[0096] Figure 4 The diagram illustrates a specific implementation of a link negotiation process. Figure 4In the link negotiation process illustrated, for ease of explanation, the UALink chip 1000 that initiates the link negotiation request is referred to as the "local end," and the target UALink chip 2000 that receives the link negotiation request and returns the link negotiation response is referred to as the "peer end." It should be noted that the terms "local end" and "peer end" are only used to distinguish the two communication ends in the current link negotiation process and are not used to define a fixed master-slave relationship between the UALink chip 1000 and the target UALink chip 2000; in other link state adjustment processes, the target UALink chip 2000 can also initiate link negotiation as the local end.

[0097] like Figure 4 As shown, taking the adjustment of physical link 0 from an open state to a closed state as an example, the local end can send a link negotiation request to the peer end to request the closure of physical link 0. After receiving the link negotiation request, the peer end can return a link negotiation response to the local end. If the link negotiation response indicates that the peer end agrees to close physical link 0, the local end can further perform link state adjustment on physical link 0, changing it from an open state to a closed state. After physical link 0 is closed, subsequent data to be transmitted will no longer be transmitted through physical link 0, but can continue to be transmitted through physical links that are still in the open state. For example, if both physical link 0 and physical link 1 were originally in the open state, after physical link 0 is closed, data to be transmitted can continue to be transmitted through physical link 1.

[0098] Therefore, link status adjustment can be based on the link negotiation completed between UALink chip 1000 and target UALink chip 2000, reducing the possibility that inconsistent understanding of the availability status of the same target physical link by the two UALink chips may affect data transmission.

[0099] The packet scheduling module 140 is also used to obtain the data to be transmitted from the receiving buffer module 110, and after the target physical link is adjusted to the target link state, schedule the data to be transmitted to the physical link in the open state through the physical layer 1300 for transmission.

[0100] Specifically, after the target physical link completes its link state adjustment, the set of physical links currently in the open state may change. The packet scheduling module 140 can determine which physical links can continue to participate in data transmission based on the adjusted link states of each physical link, and ensure that the data to be transmitted obtained from the receiving buffer module 110 is transmitted only through the physical links in the open state. For example, if two physical links were originally in the open state and one of them is adjusted to the closed state, subsequent data to be transmitted can continue to be transmitted through the other physical link that is still in the open state; when the previously closed physical link is reopened, that physical link can re-participate in the transmission of subsequent data to be transmitted.

[0101] In some embodiments, after the link negotiation response indicates agreement to the link negotiation request, the transaction layer 1200 can be paused from continuing to write new data to be transmitted to the receive buffer module 110 before the actual switch of the physical link state. The received buffer module 110 will then send all the data already buffered there, and the subsequent transmission process will be completed after the receive buffer module 110 is empty. The transaction layer 1200 will then resume sending new data to be transmitted. Correspondingly, the receive buffer module 110 can output a buffer empty indication, and the link negotiation information parsing module 150 can control the transaction layer 1200 to resume data transmission based on the buffer empty indication. The specific implementation of this part will be further described in subsequent embodiments.

[0102] In some embodiments, the packet scheduling module 140 can also determine the specific scheduling method for the data to be transmitted based on the number of physical links currently in the open state. For example, when only one physical link is in the open state, the data to be transmitted can be scheduled to that physical link; when at least two physical links are in the open state, polling can be performed among the multiple open physical links, and the data to be transmitted can be scheduled according to the polling result. The specific switching process of the corresponding transmission mode will be further described in subsequent embodiments.

[0103] The UALink link control device described above can characterize the overall data transmission demand of the UALink chip by measuring the amount of data sent from the transaction layer to the data link layer, and determine whether to adjust the physical links involved in data transmission based on the aggregated traffic within multiple consecutive traffic monitoring windows. When data transmission demand continuously decreases, the number of open physical links can be reduced while maintaining data transmission paths; when data transmission demand continuously increases, previously closed physical links can be reopened. Simultaneously, before actually changing the link state of the target physical link, link negotiation is conducted between the UALink chip and the target UALink chip. Only after both parties reach an agreement on link state adjustment is the state adjustment of the target physical link and the scheduling of subsequent data to be transmitted completed. This allows the physical links involved in data transmission to dynamically change according to actual data transmission demand, meeting current data transmission requirements while reducing power consumption from physical links that do not need to remain continuously open.

[0104] In an exemplary embodiment, after the UALink chip 1000 and the target UALink chip 2000 complete link negotiation, in order to ensure that the data to be transmitted that has entered the receiving buffer module 110 before the link state adjustment and the data to be transmitted after the link state adjustment are transmitted according to the corresponding physical link state, the data transmission of the transaction layer 1200 can be controlled during the link state adjustment process.

[0105] Specifically, the link negotiation information parsing module 150 includes a transmission control unit, and the packet scheduling module 140 includes a buffered data scheduling unit.

[0106] The transmission control unit is configured to output a stop transmission instruction when the link negotiation response indicates agreement to the link negotiation request, so that the transaction layer 1200 stops sending new data to be transmitted to the receive buffer module 110.

[0107] The stop transmission instruction is used to pause the entry of new data to be transmitted into the receive buffer module 110, but not to stop the transmission of data already buffered in the receive buffer module 110. In other words, data to be transmitted that has entered the receive buffer module 110 before the stop transmission instruction is output can still be scheduled and transmitted, while after the stop transmission instruction is output, the transaction layer 1200 temporarily stops writing new data to be transmitted into the receive buffer module 110.

[0108] This is because when the link negotiation response indicates agreement to the link negotiation request, the target physical link is about to be adjusted from its current link state to the target link state. The physical links capable of participating in data transmission may change before and after the link state adjustment. For example, if the target physical link is adjusted from an open state to a closed state, before the adjustment, the target physical link could participate in the transmission of the data to be transmitted; however, after the adjustment, the target physical link no longer participates in the transmission of the data to be transmitted. By pausing the entry of new data to be transmitted into the receive buffer module 110, a corresponding processing boundary can be established between the data already buffered before the link state adjustment and the data rewritten after the adjustment.

[0109] The cached data scheduling unit is used to schedule the cached data to be transmitted in the receive cache module 110 after the transaction layer 1200 stops sending new data to be transmitted, until the receive cache module 110 is empty.

[0110] Specifically, after the transaction layer 1200 pauses writing new data to be transmitted to the receive buffer module 110, the buffer data scheduling unit can continue to retrieve the data to be transmitted that has been cached in the receive buffer module 110 before this, and schedule the data to be transmitted according to the current transmission method. Since no new data to be transmitted continues to enter the receive buffer module 110 at this time, as the cached data to be transmitted is continuously scheduled and transmitted, the data to be transmitted in the receive buffer module 110 gradually decreases until the receive buffer module 110 is empty.

[0111] For example, UALink chip 1000 and target UALink chip 2000 are connected via physical link 0 and physical link 1, both of which are currently open. When UALink chip 1000 requests to adjust physical link 0 to the closed state and receives a link negotiation response from target UALink chip 2000 indicating agreement to the link negotiation request, the transmission control unit can output a stop transmission instruction, causing transaction layer 1200 to stop writing new data to be transmitted to receive buffer module 110. For data to be transmitted that was already buffered in receive buffer module 110 before the stop transmission instruction was output, the buffer data scheduling unit can still continue to schedule it according to the transmission method when physical link 0 and physical link 1 are both open, until all the data to be transmitted has been transmitted.

[0112] The receive buffer module 110 is also used to output a buffer empty indication when the receive buffer module 110 is empty and the target physical link is adjusted to the target link state.

[0113] The empty buffer indicator indicates that the data to be transmitted that was buffered in the receive buffer module 110 before the transmission of new data was stopped has been scheduled. Therefore, the empty buffer indicator can serve as a basis for determining that the data transmission process before the link state adjustment has been completed. When the receive buffer module 110 is empty and the target physical link has been adjusted to the target link state, it can be determined that the data to be transmitted before the link state adjustment has been scheduled, and the target physical link has completed the corresponding link state adjustment. This allows the transaction layer 1200 to resume sending new data to the receive buffer module 110, so that subsequent data to be transmitted is scheduled according to the adjusted physical link state.

[0114] In some implementations, the receive buffer module 110 can use the fifo_empty signal to indicate whether it is empty. For example, fifo_empty=1 can indicate that the receive buffer module 110 is empty, indicating that the previously buffered data to be transmitted has been sent. It should be noted that the specific name of fifo_empty and its signal value are only used to illustrate one implementation method, and this application does not make any specific limitation on it.

[0115] The transmission control unit is also used to output a start transmission indication when an empty buffer indication is received, so that the transaction layer 1200 can resume sending new data to be transmitted to the receive buffer module 110.

[0116] Specifically, upon receiving an empty buffer indication, it can be determined that the data to be transmitted that entered the receive buffer module 110 before the link status adjustment has been scheduled. After the target physical link completes the corresponding link status adjustment, the transmit control unit can output a start transmit indication, causing the transaction layer 1200 to resume sending new data to be transmitted to the receive buffer module 110. Subsequently, the packet scheduling module 140 can schedule the data to be transmitted that re-enters the receive buffer module 110 according to the adjusted link status of each physical link.

[0117] Continuing with the example of closing physical link 0, after the receive buffer module 110 shows an empty indication, physical link 0 can be changed from the open state to the closed state. At this time, physical link 1 is still in the open state. After the transmit control unit outputs a start transmit indication, the transaction layer 1200 resends new data to be transmitted to the receive buffer module 110. Subsequent data to be transmitted can be scheduled according to the link state after physical link 0 is closed, and transmitted through physical link 1, which is still in the open state.

[0118] In some implementations, the transmit control unit can output a stop transmit indication via the stop_send_pkt signal and a start transmit indication via the start_send_pkt signal. For example, when the link negotiation response indicates agreement to the link negotiation request, the transaction layer 1200 can pause the transmission of new data to be transmitted via the stop_send_pkt signal; after receiving the fifo_empty signal, which indicates that the receive buffer module 110 is empty, the transaction layer 1200 can resume the transmission of new data to be transmitted via the start_send_pkt signal. The above signals are only used to illustrate one specific implementation of the stop transmit indication, start transmit indication, and buffer empty indication.

[0119] It should be noted that the above-described transmission control process can be applied not only to scenarios where the target physical link is changed from an open state to a closed state, but also to scenarios where the target physical link is changed from a closed state to an open state. When opening the target physical link, new data to be transmitted can also be paused after the link negotiation is completed, the data to be transmitted already cached in the receive buffer module 110 can be scheduled, and new data to be transmitted can be resumed after the corresponding link state adjustment is completed.

[0120] By using the above method, during the link state adjustment process, new data to be transmitted is first paused from entering the receiving buffer module 110, while the data already buffered in the receiving buffer module 110 is continued to be scheduled. New data to be transmitted is resumed only after the receiving buffer module 110 shows an empty indication. This allows the data to be transmitted that has already entered the receiving buffer module 110 before the link state adjustment to be transmitted first, and allows subsequent data to be transmitted that re-enters the receiving buffer module 110 to be scheduled according to the adjusted physical link state, thereby reducing the overlap between the link state switching process and the ongoing data transmission process.

[0121] In one embodiment, in order to match the transmission method of the data to be transmitted with the physical links that can actually participate in data transmission, the packet scheduling module 140 can determine the scheduling method of the data to be transmitted based on the number of physical links that are in the open state among multiple physical links.

[0122] Specifically, the packet scheduling module 140 includes a link scheduling unit.

[0123] The link scheduling unit is used to schedule the data to be transmitted to the physical link that is open when only one physical link among multiple physical links is open; and to poll among the physical links that are open when at least two physical links among multiple physical links are open, and schedule the data to be transmitted according to the polling result.

[0124] In this context, an open physical link refers to a physical link that is currently capable of participating in data transmission between the UALink chip 1000 and the target UALink chip 2000. The link scheduling unit can determine the set of physical links that can be used to send data based on the current link status of each physical link, and adopt an appropriate scheduling method based on the number of physical links in the set.

[0125] When only one physical link among multiple physical links is in the open state, the link scheduling unit can continuously schedule the data to be transmitted obtained from the receiving buffer module 110 to the open physical link, instead of scheduling the data to be transmitted to the closed physical link. Therefore, even after the target physical link is adjusted to the closed state, subsequent data to be transmitted can still continue to be transmitted through the remaining open physical links.

[0126] When at least two physical links are open, the link scheduling unit can sequentially determine the physical links for transmitting data among the open physical links according to a set polling order, and schedule different data to be transmitted to the corresponding physical links according to the polling results. Polling can be performed in a cyclical manner, selecting each open physical link in turn, so that all open physical links can participate in the transmission of data.

[0127] Please see Figure 5 , Figure 5 This illustrates a data scheduling method when both physical link 0 and physical link 1 are open. Taking the sequential transmission of data A1, B1, A2, B2, A3, B3, A4, B4, A5, B5, A6, B6… as an example, with both physical link 0 and physical link 1 open, the link scheduling unit can poll between physical link 0 and physical link 1, and schedule the data to be transmitted to the two physical links according to the polling results. For example, A1, A2, A3, A4, A5, A6… can be scheduled to physical link 0, and B1, B2, B3, B4, B5, B6… can be scheduled to physical link 1, thus allowing both physical links to participate in the transmission of the data.

[0128] It should be noted that, Figure 5 The polling process is illustrated using only two open physical links as an example. When there are three or more open physical links, the link scheduling unit can also select the physical link to send the data to be transmitted from among all the open physical links in a predetermined polling order. This application does not limit the number of physical links participating in the polling.

[0129] Please see Figure 6 , Figure 6 This illustrates a data scheduling method after physical link 0 is changed from an open state to a closed state. Figure 5 In the state shown, both physical link 0 and physical link 1 were originally in the open state; after physical link 0 completes its link state adjustment and enters the closed state, only physical link 1 can participate in the transmission of data to be transmitted. At this time, the link scheduling unit can stop polling between physical link 0 and physical link 1, and schedule subsequent data to be transmitted to physical link 1, which is still in the open state.

[0130] For example, such as Figure 6As shown, before physical link 0 is closed, A1 to A4 can be sent via physical link 0, and B1 to B4 can be sent via physical link 1. After physical link 0 is closed, subsequent data to be transmitted will no longer be scheduled to physical link 0, but can continue to be transmitted sequentially via physical link 1. Therefore, even if the adjustment of the link state causes a change in the number of physical links that can participate in data transmission, the link scheduling unit can still change the corresponding scheduling method according to the adjusted physical link state, so that subsequent data to be transmitted can only be sent through the physical links that are in the open state.

[0131] Accordingly, when a previously closed target physical link is readjusted to the open state, increasing the number of currently open physical links from one to at least two, the link scheduling unit can re-polle among the multiple open physical links and schedule subsequent data to be transmitted according to the polling results. Thus, the link scheduling method can switch between single-link scheduling and multi-link polling scheduling as the number of currently open physical links changes.

[0132] In some implementations, the current scheduling method can be characterized by the sending mode information. For example, the send_mode signal can be used to distinguish between different sending modes, such as sending only to physical link 0, sending only to physical link 1, and sending in a round-robin fashion to both physical links. It should be noted that the specific signal name and encoding method of send_mode are only used to illustrate one specific implementation, and this application does not limit the specific encoding of the sending mode information.

[0133] In this way, the link scheduling unit can select the appropriate data scheduling method based on the number of physical links currently in the open state. When multiple physical links are in the open state, data transmission is carried out through multiple physical links in a round-robin manner; when only one physical link remains in the open state after the link status adjustment, the data to be transmitted is scheduled to that physical link. Therefore, the scheduling method of the data to be transmitted can be matched with the actual available physical links after the link status adjustment, ensuring that data transmission can continue according to the current link status even after a physical link is opened or closed.

[0134] Please see Figure 7 , Figure 7 This paper illustrates a specific application scenario of the UALink link control device according to an embodiment of this application. In this scenario, taking data transmission between the UALink chip and the target UALink chip via physical link 0 and physical link 1 as an example, the paper explains the modules in the data link layer of the UALink chip and the signal interaction relationships between these modules. It should be noted that... Figure 7It is mainly used to illustrate the link state control related modules and their signal relationships, therefore some protocol layers in the UALink chip and the corresponding structure of the target UALink chip are omitted.

[0135] The transaction layer can write data to be transmitted to the receive buffer module. The receive buffer module can be implemented using a first-in, first-out (FIFO) buffer and outputs a "buffer empty" signal (fifo_empty) to the link negotiation information parsing module. When fifo_empty=1, it indicates that the receive buffer module is empty, meaning that the data to be transmitted previously written to the receive buffer module has been scheduled. The process of stopping the writing of new data to be transmitted, scheduling the data already buffered in the receive buffer module, and resuming transmission based on fifo_empty has been described in the previous embodiments and will not be repeated here.

[0136] The traffic monitoring module can perform traffic statistics based on the amount of data sent from the transaction layer to the data link layer, and record the aggregated traffic in the registers of the UALink chip. The traffic monitoring module can be configured with a traffic monitoring window, the number of continuously monitored traffic monitoring windows, a low traffic threshold (TH_LOW), and a high traffic threshold (TH_HIGH). The traffic monitoring window can be configured in clock cycles; the number of continuously monitored traffic monitoring windows limits the duration of the corresponding traffic status; TH_LOW determines whether to reduce the number of open physical links; and TH_HIGH determines whether to add open physical links. The traffic determination process described above has been illustrated in the preceding embodiments.

[0137] The traffic monitoring module can also output a link status indication signal, `channel_link_up`. `channel_link_up` can be a multi-bit signal, with its bit width corresponding to the number of physical links. Taking physical link 0 and physical link 1 as examples, `channel_link_up[1:0]` can be a 2-bit signal, where bit 0 corresponds to physical link 0 and bit 1 corresponds to physical link 1. For example, `channel_link_up[1:0]=2'b11` can indicate that both physical link 0 and physical link 1 are in or expected to be in an open state; `channel_link_up[1:0]=2'b10` can indicate that physical link 0 is in or expected to be in a closed state, and physical link 1 is in or expected to be in an open state; `channel_link_up[1:0]=2'b01` can indicate that physical link 0 is in or expected to be in an open state, and physical link 1 is in or expected to be in a closed state.

[0138] When both physical link 0 and physical link 1 are open, if the aggregated traffic remains below TH_LOW and the aforementioned link closure conditions are met, channel_link_up[1:0] can be changed from 2'b11 to 2'b10 to indicate that physical link 0 needs to be closed. If it is determined that physical link 1 needs to be closed this time according to the aforementioned rotation method, channel_link_up[1:0] can be changed from 2'b11 to 2'b01. When physical link 0 is already closed, if the aggregated traffic remains above TH_HIGH and the aforementioned link opening conditions are met, channel_link_up[1:0] can be restored from 2'b10 to 2'b11 to indicate that physical link 0 needs to be reopened.

[0139] The link negotiation information sending module can monitor changes in `channel_link_up` and generate a link negotiation message `channel_negotiation_message` based on these changes. `channel_negotiation_message` can include a command field and a link status field `channel_state`. The command field can occupy positions 1 through 0, indicating whether the current message is a link negotiation request or response; the channel_state field can occupy positions 3 and 2, indicating the target physical link and its status for this link negotiation.

[0140] For example, command=2'b00 can represent a link negotiation request, and command=2'b01 can represent a link negotiation response; channel_state=2'b01 can represent closing physical link 1, channel_state=2'b10 can represent closing physical link 0, channel_state=2'b11 can represent opening two physical links, and channel_state=2'b00 can be a reserved state. Based on the above encoding method, when channel_link_up[1:0] changes from 2'b11 to 2'b10, a channel_negotiation_message of 4'b1000 can be generated to request the closure of physical link 0; when channel_link_up[1:0] changes from 2'b11 to 2'b01, a channel_negotiation_message of 4'b0100 can be generated to request the closure of physical link 1; when channel_link_up[1:0] returns to 2'b11 from 2'b10 or 2'b01, a channel_negotiation_message of 4'b1100 can be generated to request the restoration of both physical links to the open state. The above field division and bit values ​​are used to illustrate one implementation of the link negotiation message and do not constitute a limitation on the specific encoding method of the link negotiation message.

[0141] After the link negotiation information sending module generates the channel_negotiation_message, it can provide it to the packet scheduling module, which then sends it to the target UALink chip through the currently open physical link. In addition to the link negotiation message, the packet scheduling module can also schedule the data to be transmitted in the receive buffer module according to the send_mode signal.

[0142] `send_mode[1:0]=2'b01` indicates sending data to be transmitted to physical link 0, `send_mode[1:0]=2'b10` indicates sending data to be transmitted to physical link 1, and `send_mode[1:0]=2'b11` indicates sending data to be transmitted in a round-robin fashion between physical link 0 and physical link 1. The specific scheduling process for when only one physical link is open and when at least two physical links are open has been combined with... Figure 5 and Figure 6 The explanation has already been provided and will not be repeated here.

[0143] The packet scheduling module and the physical layer can also configure link transmission buffers corresponding to different physical links. Taking physical link 0 and physical link 1 as examples, link 0 transmission buffers and link 1 transmission buffers can be configured separately. After the packet scheduling module determines the physical link corresponding to the data to be transmitted based on send_mode, it can write the data to be transmitted into the corresponding link transmission buffer, and then the physical layer sends it to the target UALink chip through the corresponding physical link. Therefore, the link transmission buffer can be used to buffer data that has completed physical link selection and is waiting to be transmitted through the corresponding physical link.

[0144] The link negotiation information parsing module can receive the channel_negotiation_message sent by the target UALink chip and perform corresponding processing based on whether the received channel_negotiation_message is a link negotiation request or a link negotiation response.

[0145] When the UALink chip initiates this link state adjustment, the `channel_negotiation_message` received by the link negotiation information parsing module can be the link negotiation response returned by the target UALink chip in response to the previous link negotiation request. The link negotiation information parsing module determines whether the target UALink chip agrees to this link state adjustment based on the link negotiation response. If the link negotiation response indicates agreement to the link negotiation request, the transaction layer can pause sending new data to be transmitted by using the `stop_send_pkt` signal. After the existing data to be transmitted in the receive buffer module has been scheduled, the subsequent link state and transmission mode switching is completed according to the `fifo_empty` signal. Finally, the transaction layer resumes sending new data to be transmitted by using the `start_send_pkt` signal.

[0146] When the UALink chip acts as the receiver of a link negotiation request, the link negotiation information parsing module can parse the link negotiation request sent by the target UALink chip, determine the target physical link and its state, and provide the corresponding link negotiation information to the link negotiation information sending module. This allows the link negotiation information sending module to generate a corresponding link negotiation response and return it to the target UALink chip. Therefore, the same UALink chip can act as both the initiator of a link state adjustment and the receiver when another UALink chip initiates a link state adjustment.

[0147] When the UALink chip agrees to the link state adjustment initiated by the target UALink chip, after returning the link negotiation response, the UALink chip can also pause the transaction layer from sending new data to be transmitted and continue scheduling the data already cached in the receive buffer module. After the receive buffer module is empty, it completes the corresponding physical link state and transmission mode adjustment according to the target link state corresponding to the link negotiation request, and resumes the transaction layer from sending new data to be transmitted. Thus, both ends of the physical link can complete the corresponding link state adjustment according to the negotiation result.

[0148] Taking the closure of physical link 0 as an example, in the initial state, both physical link 0 and physical link 1 are in the open state, and both channel_link_up[1:0] and send_mode[1:0] can be 2'b11. The packet scheduling module polls and schedules the data to be transmitted between physical link 0 and physical link 1. When the traffic monitoring module determines that the aggregated traffic is continuously lower than TH_LOW and the link closure condition is met, channel_link_up[1:0] can be changed from 2'b11 to 2'b10. The link negotiation information sending module generates a channel_negotiation_message requesting the closure of physical link 0 based on this change, and the packet scheduling module sends it to the target UALink chip.

[0149] After receiving a link negotiation request, the target UALink chip can return a link negotiation response. If the link negotiation response indicates that the target UALink chip does not agree to close physical link 0, the current link states of physical link 0 and physical link 1 can be maintained, and the original transmission mode can continue to be used. If the link negotiation response indicates that the target UALink chip agrees to close physical link 0, the closure of physical link 0 can be completed according to the aforementioned process of stopping transmission, emptying the buffer, and adjusting the link state, and send_mode[1:0] can be adjusted to 2'b10. After that, the data to be transmitted that newly enters the receive buffer module can be written into the transmission buffer of link 1 through the packet scheduling module and transmitted through physical link 1, which is still in the open state.

[0150] When physical link 0 is in the closed state, if the traffic monitoring module determines that the aggregated traffic is continuously higher than TH_HIGH and the link opening condition is met, channel_link_up[1:0] can be restored from 2'b10 to 2'b11. The link negotiation information sending module generates a channel_negotiation_message to request the reopening of physical link 0, and the packet scheduling module sends it to the target UALink chip. Since link opening is used to restore the corresponding transmission capacity when the physical link currently in the open state cannot meet the data transmission requirements, in this application scenario, the target UALink chip performs the corresponding link opening process after receiving the link opening request. Subsequently, physical link 0 can be readjusted to the open state, and send_mode[1:0] can be restored to 2'b11, so that the packet scheduling module can re-polulate between physical link 0 and physical link 1.

[0151] It should be noted that during the link closing process, since reducing the number of open physical links is not a necessary action to guarantee current data transmission, the target UALink chip can agree or disagree with the corresponding link closing request based on its own state. The link opening process, on the other hand, is used to restore physical links when the currently open physical links cannot meet increased data transmission demands. Therefore, in this application scenario, the peer performs the corresponding link opening process after receiving a link opening request. Thus, the link closing and link opening processes can employ corresponding negotiation methods to address different data transmission needs.

[0152] The data link layer may also include a data parsing and packaging module, which can be used to parse and package the data sent by the transaction layer and provide the processed data to be transmitted to the subsequent packet scheduling process. Figure 7 The modules directly related to link state control and their signal relationships are highlighted, therefore the data parsing and packaging module is not shown separately.

[0153] Furthermore, the UALink chip can also connect to the corresponding GPU via the UALink protocol-level interface. Data generated by the GPU can enter the transaction layer via the UALink protocol-level interface, and then be processed and transmitted sequentially through the transaction layer, data link layer, and physical layer. After receiving the corresponding data through the physical link, the target UALink chip can perform corresponding data processing and provide the data to its corresponding GPU. The connection relationship between the UALink chip, the target UALink chip, and the GPU has been explained with reference to the aforementioned figures and will not be repeated here.

[0154] Through the above application scenarios, it can be determined whether the physical link status needs to be adjusted based on the current data transmission requirements of the UALink chip. Once it is determined that link status adjustment is necessary, the corresponding link adjustment result is determined through link negotiation between the UALink chip and the target UALink chip. After both parties complete the link negotiation, the link status of the target physical link can be adjusted based on the processing status of the data to be transmitted in the receive buffer module. Data scheduling and transmission continue based on the adjusted link status of each physical link. Therefore, the link status adjustment of the physical links can be coordinated with the current data transmission requirements and the ongoing data transmission process, maintaining data transmission continuity while adjusting the physical links participating in data transmission according to actual data transmission needs.

[0155] In the aforementioned embodiments, the modules and units in the UALink link control device can be implemented using hardware circuits. Different modules or units can be implemented separately through corresponding logic circuits, or the circuit functions of two or more modules or units can be integrated into the same circuit structure according to the actual design requirements of the chip. The division of modules and units in the specification is mainly used to illustrate their different functions and is not intended to limit each module and unit to having independent physical circuit boundaries.

[0156] Information such as aggregated traffic, link status, link negotiation request, link negotiation response, buffer empty indication, stop sending indication, start sending indication, and sending mode involved in the embodiments of this application can be transmitted between different circuit modules through corresponding logic signals, status signals, or multi-bit signals. The specific signal names, signal widths, and encoding methods given in the specification are only used to illustrate one signal interaction method between corresponding hardware circuits and do not limit the above information to using the same signal names, widths, or encoding forms.

[0157] It should be noted that the connections between modules, units, and circuits in the attached diagrams are primarily used to illustrate the corresponding functional relationships and signal interactions, and are not intended to limit the specific layout location, circuit size, or wiring method within the chip. While ensuring the implementation of the corresponding functions and signal interactions, the specific circuit layout of each module and unit within the UALink chip can be adjusted according to the actual chip design.

[0158] While the principles herein have been illustrated in various embodiments, numerous modifications to the structures, arrangements, proportions, elements, materials, and components, particularly suited to specific environments and operational requirements, may be used without departing from the principles and scope of this disclosure. These modifications and other alterations or alterations will be included within the scope of this document.

[0159] The foregoing specific descriptions have been described with reference to various embodiments. However, those skilled in the art will recognize that various modifications and changes can be made without departing from the scope of this disclosure. Therefore, considerations for this disclosure are to be illustrative rather than restrictive, and all such modifications are to be included within its scope. Similarly, advantages, other advantages, and solutions to problems with respect to various embodiments have been described above. However, benefits, advantages, solutions to problems, and any elements that produce these, or make them more explicit, should not be construed as critical, essential, or necessary. The term “comprising” and any other variations thereof as used herein are non-exclusive inclusion, meaning that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not expressly listed or not part of the process, method, system, article, or apparatus. Furthermore, the term “coupled” and any other variations thereof as used herein refer to physical connections, electrical connections, magnetic connections, optical connections, communication connections, functional connections, and / or any other connections.

[0160] Those skilled in the art will recognize that many changes can be made to the details of the above embodiments without departing from the basic principles of the invention. Therefore, the scope of the invention should be determined only by the claims.

Claims

1. A UALink link control device, characterized in that, The UALink chip is configured in the data link layer of the UALink chip. The UALink chip includes a transaction layer, the data link layer and a physical layer. The physical layer includes multiple physical links. The UALink chip is connected to the target UALink chip through the multiple physical links. The UALink link control device includes: A receive cache module is used to receive and cache the data to be transmitted sent by the transaction layer; The traffic monitoring module is used to monitor the amount of data sent from the transaction layer to the data link layer, obtain aggregated traffic, determine whether the physical link needs to be adjusted based on the aggregated traffic, and if it is determined that the physical link needs to be adjusted, determine the target physical link and the target link state of the target physical link from the multiple physical links; the target physical link is the physical link to be adjusted, and the target link state is used to characterize the state that the target physical link should be in after the adjustment; The link negotiation information sending module is used to generate a link negotiation request based on the target physical link and the target link status, and send the link negotiation request to the packet scheduling module; the link negotiation request is used to request that the target physical link be adjusted from the current link status to the target link status; The packet scheduling module is used to send the link negotiation request to the physical layer so that the link negotiation request is sent to the target UALink chip through the physical link; The link negotiation information parsing module is used to obtain the link negotiation response from the target UALink chip, determine whether the link negotiation response indicates agreement to the link negotiation request, and send the determination result to the packet scheduling module. The packet scheduling module is further configured to send a link state adjustment instruction to the physical layer when the determination result indicates agreement to the link negotiation request, so that the physical layer adjusts the target physical link from the current link state to the target link state according to the link state adjustment instruction; The packet sending scheduling module is also used to obtain the data to be transmitted from the receiving buffer module, and after the target physical link is adjusted to the target link state, schedule the data to be transmitted to the physical link in the open state for transmission through the physical layer.

2. The UALink link control device as described in claim 1, characterized in that, The traffic monitoring module includes a traffic statistics unit; The traffic statistics unit is used to count the amount of data sent from the transaction layer to the data link layer according to the set traffic monitoring window, obtain the aggregated traffic corresponding to each traffic monitoring window, and obtain the aggregated traffic corresponding to a set number of consecutive traffic monitoring windows.

3. The UALink link control device as described in claim 2, characterized in that, The flow monitoring module also includes a status adjustment judgment unit; The status adjustment judgment unit is used to determine whether the aggregated traffic continuously meets the link closing condition or the link opening condition based on the aggregated traffic corresponding to a continuously set number of traffic monitoring windows, and if the link closing condition or the link opening condition is continuously met, it is determined that the physical link needs to be adjusted.

4. The UALink link control device as described in claim 3, characterized in that, The traffic monitoring module also includes a link closure determination unit; The link closure determination unit is used to determine that the link closure condition is met when the aggregated traffic corresponding to a set number of consecutive traffic monitoring windows is less than the first traffic threshold and the number of physical links currently in the open state is greater than one, and to determine one of the physical links currently in the open state as the target physical link and to determine the closed state as the target link state.

5. The UALink link control device as described in claim 3, characterized in that, The traffic monitoring module also includes a link open determination unit; The link opening determination unit is used to determine that the link opening condition is met when the aggregated traffic corresponding to a set number of consecutive traffic monitoring windows is greater than the second traffic threshold, and there is a physical link in the closed state among the multiple physical links. The unit then determines the physical link in the closed state as the target physical link and the open state as the target link state.

6. The UALink link control device as described in claim 4, characterized in that, The traffic monitoring module also includes a link determination unit; The link determination unit is used to determine the target physical link from the currently open physical links according to a set rotation method when it is determined that the link closing condition is met, so that the target physical link determined when the link closing condition is met in two consecutive determinations is different.

7. The UALink link control device as described in claim 1, characterized in that, The link negotiation information parsing module includes a sending control unit, and the packet sending scheduling module includes a cached data scheduling unit. The transmission control unit is configured to output a stop transmission instruction when the link negotiation response indicates agreement to the link negotiation request, so that the transaction layer stops sending new data to be transmitted to the receive buffer module; The cached data scheduling unit is used to schedule the cached data to be transmitted in the receiving cache module after the transaction layer stops sending new data to be transmitted, until the receiving cache module is empty; The receiving buffer module is also used to output a buffer empty indication when the receiving buffer module is empty; The sending control unit is further configured to output a start sending instruction when it receives an indication that the cache is empty and the target physical link is adjusted to the target link state, so that the transaction layer resumes sending new data to be transmitted to the receiving cache module.

8. The UALink link control device as described in claim 1, characterized in that, The packet scheduling module includes a link scheduling unit; The link scheduling unit is configured to schedule the data to be transmitted to the physical link that is open when only one of the multiple physical links is open; and to poll among the open physical links and schedule the data to be transmitted according to the polling result when at least two of the multiple physical links are open.

9. A UALink chip, characterized in that, Includes the UALink link control device as described in any one of claims 1 to 8.

10. A UALink link control method, characterized in that, The method is applied to a UALink chip, which includes a transaction layer, a data link layer, and a physical layer. The physical layer includes multiple physical links, and the UALink chip connects to a target UALink chip through these multiple physical links. Receive and buffer the data to be transmitted sent by the transaction layer; The amount of data sent from the transaction layer to the data link layer is monitored to obtain aggregated traffic. Based on the aggregated traffic, it is determined whether the physical link needs to be adjusted. If it is determined that the physical link needs to be adjusted, a target physical link and its target link state are determined from the multiple physical links. The target physical link is the physical link to be adjusted, and the target link state is used to characterize the state that the target physical link should be in after the adjustment. A link negotiation request is generated based on the target physical link and the target link state, and the link negotiation request is sent to the physical layer so that the link negotiation request is sent to the target UALink chip through the physical link; the link negotiation request is used to request that the target physical link be adjusted from the current link state to the target link state; Obtain the link negotiation response from the target UALink chip, and determine whether the link negotiation response indicates agreement to the link negotiation request; If the link negotiation response indicates agreement to the link negotiation request, a link state adjustment instruction is sent to the physical layer so that the physical layer adjusts the target physical link from the current link state to the target link state according to the link state adjustment instruction; After the target physical link is adjusted to the target link state, the data to be transmitted is scheduled to be transmitted on the physical link that is in the open state.