On-chip network data processing methods, apparatus, computer equipment and storage media

By detecting the status of the output port in the on-chip network and selecting the message to be transmitted according to the preset arbitration priority, the deadlock problem caused by the simultaneous existence of multicast and unicast is solved, and the message transmission efficiency and throughput are improved.

CN119449743BActive Publication Date: 2026-05-05PENG CHENG LAB
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
PENG CHENG LAB
Filing Date
2024-10-31
Publication Date
2026-05-05

AI Technical Summary

Technical Problem

In on-chip networks, when multicast and unicast coexist, improperly designed arbitration scheduling mechanisms can easily lead to deadlock and low message transmission efficiency.

Method used

By detecting the status of the output port in the queue of messages to be transmitted, candidate messages to be transmitted are selected according to the preset arbitration priority to avoid multiple messages competing for the same resource at the same time. A global arbitrator is used to handle multicast message conflicts to ensure that transmission is carried out when the output port is idle.

Benefits of technology

It effectively prevents deadlock, improves message transmission efficiency and overall system throughput, and optimizes resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449743B_ABST
    Figure CN119449743B_ABST
Patent Text Reader

Abstract

This application provides an on-chip network data processing method, apparatus, computer device, and storage medium. The method includes: when at least one message to be transmitted is detected, adding it to a message queue; when multiple messages to be transmitted in different directions exist in the message queue, determining the state of the output port pointed to by each message; when a candidate message to be transmitted points to an idle output port, selecting a target message to be transmitted from the candidate messages according to a preset arbitration priority; repeatedly executing the step of selecting a target message to be transmitted from the candidate messages according to the preset arbitration priority until there are no candidate messages to be transmitted pointing to an idle output port in the message queue; and stopping the processing of the message queue when it contains no messages to be transmitted. This improves transmission efficiency and prevents deadlock.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technology, and in particular to an on-chip network data processing method, apparatus, computer equipment, and storage medium. Background Technology

[0002] With the increasing computing demands in the field of artificial intelligence, single-processor architectures are no longer sufficient. Multiprocessors are widely used in high-end servers, smartphones, and various other fields. Therefore, networking on-chip (NICs) has become an important and continuously evolving research area. High-performance multiprocessor NICs must provide sufficient bandwidth and maintain sufficiently fast transmission rates. The goal of routing algorithms is to distribute network traffic as evenly as possible across the network topology to reduce network latency and increase throughput. Router design presents certain challenges when latency and throughput requirements are stringent.

[0003] In related technologies, routers sometimes experience situations where packets from multiple input ports are transmitted through a single output port, meaning multiple packets compete for the same output port resource. Conversely, there are also situations where packets from a single input port need to be transmitted through multiple output ports, a phenomenon known as on-chip network multicast. Normally, an output port can only be used for one packet transmission at a time. With both unicast and multicast occurring simultaneously, a poorly designed arbitration and scheduling mechanism can lead to a circular waiting chain. For example, if each port waits for another input port to release its resource, all ports will be unable to send data, resulting in a deadlock and reduced packet transmission efficiency. Summary of the Invention

[0004] The main objective of this application is to provide an on-chip network data processing method, apparatus, computer device, and storage medium that can improve message transmission efficiency while preventing deadlock.

[0005] To achieve the above objectives, a first aspect of this application provides an on-chip network data processing method, the method being applied to a target device, the target device including multiple input ports and multiple output ports, the method comprising:

[0006] When it is detected that any input port has received at least one message to be transmitted, the message to be transmitted is added to the message queue to be transmitted.

[0007] When the queue of messages to be transmitted contains messages to be transmitted, the propagation direction of each message to be transmitted is determined according to the output port pointed to by each message to be transmitted;

[0008] When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined;

[0009] When there are multiple candidate messages to be transmitted in the queue of messages to be transmitted, and the state of the output port to be pointed to is idle, the target message to be transmitted is selected from the multiple candidate messages to be transmitted according to the preset arbitration priority.

[0010] Repeat the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority until there are no candidate messages to be transmitted in the queue of messages to be transmitted whose output port is in an idle state.

[0011] When the queue of messages to be transmitted does not contain any messages to be transmitted, the processing of the queue of messages to be transmitted is stopped.

[0012] Accordingly, a second aspect of the embodiments of this application proposes an on-chip network data processing apparatus, the apparatus comprising:

[0013] An add module is used to add the message to be transmitted to the message queue when it is detected that any input port has received at least one message to be transmitted.

[0014] The determination module is used to determine the propagation direction of each message to be transmitted based on the output port pointed to by each message to be transmitted when the message queue contains messages to be transmitted.

[0015] The detection module is used to determine the status of the output port pointed to by each message to be transmitted when it detects that there are messages to be transmitted in the message queue with multiple propagation directions.

[0016] The selection module is used to select a target message to be transmitted from the multiple candidate messages to be transmitted according to a preset arbitration priority when there are multiple candidate messages to be transmitted in the message queue where the state of the pointed output port is idle.

[0017] The processing module is used to repeatedly execute the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority, until there are no candidate messages to be transmitted in the message queue whose output port is in an idle state.

[0018] The stop module is used to stop processing the message queue when the message queue to be transmitted does not contain any messages to be transmitted.

[0019] In some embodiments, the on-chip network data processing device further includes an allocation module for:

[0020] When it is detected that there are no messages to be transmitted with multiple propagation directions in the message queue to be transmitted, the first message to be transmitted with a single propagation direction is determined from the message queue to be transmitted;

[0021] Determine the output port to which each first message to be transmitted points, and the message distributor corresponding to each output port;

[0022] The message distributor determines the transmission order of each first message to be transmitted according to a preset arbitration priority.

[0023] Based on the transmission order, each first message to be transmitted is sequentially transmitted to the corresponding output port.

[0024] In some implementations, the selection module is further configured to:

[0025] When there are multiple candidate messages to be transmitted in the queue of messages to be transmitted, and the state of the output port to be pointed to is idle, the reception time corresponding to each candidate message to be transmitted is determined according to the preset arbitration priority.

[0026] Obtain the current available load of the system, and determine the current number of packets to be transmitted based on the available load;

[0027] According to the reception time corresponding to each of the candidate messages to be transmitted, a target message to be transmitted of the current message transmission quantity is selected from the plurality of candidate messages to be transmitted for transmission; wherein, the output ports of any two target messages to be transmitted do not overlap.

[0028] In some embodiments, the on-chip network data processing device further includes a filtering module for:

[0029] From the multiple messages to be transmitted in the message queue, select the paused messages whose state of the pointed output port is busy;

[0030] In the queue of messages to be transmitted, the processing of the paused messages is suspended until the output port has finished transmitting any of the target messages to be transmitted, at which point the paused messages are resumed as messages to be transmitted.

[0031] In some embodiments, the on-chip network data processing device further includes an update module for:

[0032] When the output port finishes transmitting any of the target messages to be transmitted, the message queue to be transmitted is updated.

[0033] Restore the paused processing messages in the transmission message queue to messages to be transmitted;

[0034] When the queue of messages to be transmitted contains messages to be transmitted, the propagation direction of each message to be transmitted is determined according to the output port pointed to by each message to be transmitted;

[0035] When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined;

[0036] When there are multiple candidate messages to be transmitted in the updated message queue where the output port pointed to is in an idle state, the target message to be transmitted is selected from the multiple candidate messages to be transmitted according to the preset arbitration priority.

[0037] Repeat the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority until there are no candidate messages to be transmitted in the updated message queue whose output port is in an idle state.

[0038] When the updated queue of messages to be transmitted does not contain any messages to be transmitted, the processing of the updated queue of messages to be transmitted is stopped.

[0039] In some embodiments, the on-chip network data processing device further includes a transmission module for:

[0040] When any of the input ports adds at least one of the messages to be transmitted, update the message queue to be transmitted.

[0041] When the queue of messages to be transmitted contains messages to be transmitted, the propagation direction of each message to be transmitted is determined according to the output port pointed to by each message to be transmitted;

[0042] When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined;

[0043] When there are multiple candidate messages to be transmitted in the updated message queue where the output port pointed to is in an idle state, the target message to be transmitted is selected from the multiple candidate messages to be transmitted according to the preset arbitration priority.

[0044] Repeat the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority until there are no candidate messages to be transmitted in the updated message queue whose output port is in an idle state.

[0045] When the updated queue of messages to be transmitted does not contain any messages to be transmitted, the processing of the updated queue of messages to be transmitted is stopped.

[0046] In some embodiments, the detection module is further configured to:

[0047] When it is detected that there are messages to be transmitted with multiple propagation directions, the output port to which each message to be transmitted points is determined;

[0048] Obtain the first output port corresponding to the currently transmitted message. When the pointed output port coincides with the first output port, determine that the output port pointed to by the corresponding message to be transmitted is in a busy state; or, when the pointed output port does not coincide with the first output port, determine that the output port pointed to by the corresponding message to be transmitted is in an idle state.

[0049] Accordingly, a third aspect of the present application provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the on-chip network data processing method described in any one of the embodiments of the first aspect of the present application.

[0050] Accordingly, a fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the on-chip network data processing method described in any one of the embodiments of the first aspect of the present application.

[0051] This application embodiment adds a message to a message queue when at least one message to be transmitted is detected to be received at any input port; when the message queue contains messages to be transmitted, the propagation direction of each message is determined according to the output port pointed to by each message; when multiple messages to be transmitted are detected in the message queue, the state of the output port pointed to by each message is determined; when multiple candidate messages to be transmitted are in the message queue and their output ports are in an idle state, a target message to be transmitted is selected from the multiple candidate messages to be transmitted according to a preset arbitration priority; the step of selecting a target message to be transmitted from the multiple candidate messages to be transmitted according to the preset arbitration priority is repeated until there are no candidate messages to be transmitted in the message queue whose output ports are in an idle state; when the message queue does not contain any messages to be transmitted, the processing of the message queue is stopped. In this way, only packets that do not conflict with currently being transmitted are processed at a time, ensuring that only packets pointing to an idle output port can be considered as candidates for transmission. This avoids multiple packets competing for the same resource simultaneously, thus preventing deadlock and long waiting times. Simultaneously, it sequentially selects packets that do not conflict with currently being transmitted, improving the overall system throughput and thus increasing packet transmission efficiency. In summary, this application can improve packet transmission efficiency while preventing deadlock. Attached Figure Description

[0052] Figure 1 This is a schematic diagram of the architecture of the on-chip network data processing system provided in the embodiments of this application;

[0053] Figure 2 This is a flowchart of the on-chip network data processing method provided in the embodiments of this application;

[0054] Figure 3 This is a schematic diagram of the on-chip network architecture provided in the embodiments of this application;

[0055] Figure 4 This is a schematic diagram illustrating the processing when multicast and unicast messages coexist, as provided in an embodiment of this application.

[0056] Figure 5 This is a schematic diagram of message processing for unicast transmission provided in an embodiment of this application;

[0057] Figure 6 This is a schematic diagram of message processing for multicast transmission provided in an embodiment of this application;

[0058] Figure 7 This is a schematic diagram of the functional modules of the on-chip network data processing device provided in the embodiments of this application;

[0059] Figure 8 This is a schematic diagram of the hardware structure of the computer device provided in the embodiments of this application. Detailed Implementation

[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0061] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0063] With the increasing computing demands in the field of artificial intelligence, single-processor architectures are no longer sufficient. Multiprocessors are widely used in high-end servers, smartphones, and various other fields. Therefore, networking on-chip (NICs) has become an important and continuously evolving research area. High-performance multiprocessor NICs must provide sufficient bandwidth and maintain sufficiently fast transmission rates. The goal of routing algorithms is to distribute network traffic as evenly as possible across the network topology to reduce network latency and increase throughput. Router design presents certain challenges when latency and throughput requirements are stringent.

[0064] In related technologies, routers sometimes experience situations where packets from multiple input ports are transmitted through a single output port, meaning multiple packets compete for the same output port resource. Conversely, there are also situations where packets from a single input port need to be transmitted through multiple output ports, a phenomenon known as on-chip network multicast. Normally, an output port can only be used for one packet transmission at a time. With both unicast and multicast occurring simultaneously, a poorly designed arbitration and scheduling mechanism can lead to a circular waiting chain. For example, if each port waits for another input port to release its resource, all ports will be unable to send data, resulting in a deadlock and reduced packet transmission efficiency.

[0065] Based on this, embodiments of this application provide an on-chip network data processing method, apparatus, computer device, and storage medium that can improve message transmission efficiency while preventing deadlock.

[0066] The on-chip network data processing method, apparatus, computer equipment, and storage medium provided in the embodiments of this application are specifically described through the following embodiments. First, the on-chip network data processing system in the embodiments of this application is described.

[0067] Please refer to Figure 1 In some embodiments, this application provides an on-chip network data processing system, which may include a terminal 11 and a server 12.

[0068] For example, terminal 11 can be an external device or system connected to the on-chip network, such as a smartphone, tablet, personal computer, embedded device, etc. Terminal 11 can be responsible for processing the user's direct input and output, such as running applications, displaying graphical interfaces, etc. Alternatively, the various modules inside terminal 11 can also exchange data at high speed and low latency through the on-chip network, thereby improving overall performance.

[0069] Furthermore, the server 12 can be a core processing unit in the on-chip network, such as a multi-core processor, a high-performance server, a cloud computing platform, etc., responsible for responding to the requests of the terminal 11 and processing data. In addition, the server can schedule data streams through the on-chip network to process the queue of messages to be transmitted.

[0070] Please refer to Figure 2 , Figure 2 This is an example diagram of a Network-on-Chip (NOC) interconnection structure, in which multiple routers are interconnected to form a mesh-like topology. Each router has multiple interfaces (in practical applications, the number of interfaces and the direction of packet reception are not limited). Routers can receive packets from multiple directions and forward them to multiple directions. It should be noted that this application does not limit the number of input and output ports. In practical applications, the number of ports can be less than 5 or more than 5, such as 4, 10, etc.

[0071] Specifically, Figure 2In the illustrated architecture, local accelerators can communicate with each other via an on-chip network and routers. When a router receives at least one new message to be transmitted, it updates the message queue according to the on-chip network data processing method proposed in this application and determines the propagation direction based on the output port to which the message points. If there are messages pointing to multiple output ports (i.e., multicast messages), at least one global arbitrator is required for further processing to avoid collisions and deadlocks. Simultaneously, the system selects the next message to be transmitted based on the state of the output ports, achieving efficient resource utilization while avoiding deadlocks.

[0072] The on-chip network data processing method in this application can be illustrated through the following embodiments.

[0073] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user will be obtained through pop-ups or redirects to confirmation pages. Only after obtaining the user's separate permission or consent will the necessary user-related data for the normal operation of the embodiments of this application be obtained.

[0074] In some implementations, the on-chip network data processing method is applied to a target device, which includes multiple input ports and multiple output ports. The target device can be a router or switch used in an on-chip network environment, responsible for the transmission and scheduling of data packets between different modules within a multi-core processor. Furthermore, data transmission on the on-chip network supports unicast, multicast, and unicast-multicast coexistence. Both input and output ports can be multiple; this application does not impose a specific limit on the number of ports.

[0075] In this application embodiment, the description will focus on the perspective of an on-chip network data processing device, which can specifically be integrated into a computer device. See [link to relevant documentation]. Figure 3 , Figure 3 This is a flowchart illustrating the steps of an on-chip network data processing method provided in this application embodiment. Taking the on-chip network data processing device specifically integrated into a terminal or server as an example, the specific process when the processor on the terminal or server executes the program instructions corresponding to the on-chip network data processing method is as follows:

[0076] Step 101: When it is detected that any input port has received at least one message to be transmitted, add the message to be transmitted to the message queue.

[0077] In some implementations, in order to centrally manage and schedule the messages received by the target device, when it is detected that at least one message to be transmitted has been received at at least one input port of the target device, the message to be transmitted can be added to the message queue to ensure the effective use of resources and the orderly processing of messages.

[0078] The input port can be a physical interface in an on-chip network router or switch, used to receive data packets from other modules or devices.

[0079] The message to be transmitted can be a data message that has arrived at the input port but has not yet been sent to the output port.

[0080] The queue of messages to be transmitted can be a storage structure used to temporarily store all messages to be transmitted, awaiting scheduling and transmission. In some implementations, the queue of messages to be transmitted can be stored in a global arbitrator, which processes the queue of messages to be transmitted.

[0081] For example, there can be multiple input ports and multiple output ports; this application does not limit the specific number. Furthermore, each input port can receive messages to be transmitted from different directions. For instance, input port R1 can receive messages from the east, input port R2 can receive messages from the south, input port R3 can receive messages from the west, input port R4 can receive messages from the north, and input port R5 can receive messages from the local direction. Similarly, different output ports can also send messages from different directions. Specifically, output port S1 can send messages from the east, output port S2 can send messages from the south, output port S3 can send messages from the west, output port S4 can send messages from the north, and output port S5 can send messages from the local direction, etc. It is understood that this application does not limit the direction in which each port receives messages.

[0082] Furthermore, the message to be transmitted can consist of several words or bytes and includes control information for data transmission and the actual payload data. The type of message to be transmitted depends on the application scenario and network protocol; for example, the message to be transmitted can be a data message, a control message, etc.

[0083] For example, in the message queue to be transmitted, the messages to be transmitted can be stored in chronological order, according to message type, or according to a pre-defined importance level. This application does not limit the specific storage method.

[0084] The above methods enable efficient management and scheduling of packets to be transmitted, effectively reducing packet loss and transmission errors, and facilitating subsequent processing of the packet queue.

[0085] Step 102: When the queue of messages to be transmitted contains messages to be transmitted, determine the propagation direction of each message to be transmitted based on the output port pointed to by each message to be transmitted.

[0086] In some implementations, to enable the on-chip network to manage and schedule data packets more effectively, the propagation direction of each packet to be transmitted can be determined to ensure efficient communication and data transmission.

[0087] The output port to which the message to be transmitted points can be one or more physical output interfaces to which the message needs to be sent during transmission. An output port is a physical port in an on-chip network router, used to send the output from the current node to the next node.

[0088] The propagation direction of the message to be transmitted can be the directionality of the output port to which the message needs to be sent during the transmission process.

[0089] Specifically, when a message to be transmitted is directed to (needs to be sent to) multiple output ports, that is, when the message to be transmitted has multiple propagation directions, the message to be transmitted is multicast transmission; when a message to be transmitted is directed to (needs to be sent to) a single output port, that is, when the message to be transmitted has a single propagation direction, the message to be transmitted is unicast transmission.

[0090] For example, when message A points to output ports S1 and S2, message A is transmitted via multicast. When message A points to output port S3, message A is transmitted via unicast.

[0091] By clearly defining the output port and propagation direction of the message to be transmitted, the on-chip network can more effectively manage and schedule data packets, ensuring efficient communication and data transmission.

[0092] Step 103: When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, determine the status of the output port pointed to by each message to be transmitted.

[0093] In some implementations, there are multicast packets (i.e., packets propagating in multiple directions) involving multiple output ports. In cases of unicast and multicast, or multicast and multicast coexisting, network latency is high and throughput is low, and there is a risk of deadlock. Therefore, to promptly detect conflicting packets, the status of the output ports targeted by each packet can be checked in advance. This early detection and handling of conflicting packets effectively avoids deadlock.

[0094] The status of the output port to which the message to be transmitted points can be whether the output port can currently receive new messages for transmission, that is, whether there are other messages being transmitted at the current moment.

[0095] Specifically, if at the current moment, other messages are being transmitted on the output port to which the message to be transmitted is pointed, it indicates that the output port to which the message to be transmitted is in a busy state (the message to be transmitted conflicts with a message that is being transmitted); if at the current moment, no other messages are being transmitted on the output port to which the message to be transmitted is pointed, it indicates that the output port to which the message to be transmitted is in an idle state (the message to be transmitted does not conflict with a message that is being transmitted).

[0096] By using the above methods, busy output ports can be detected and handled in advance, avoiding message conflicts during transmission and effectively preventing deadlocks.

[0097] In some implementations, to effectively detect and resolve conflicts and optimize resource utilization, the status of the output port to which the message to be transmitted is directed can be determined, enabling the on-chip network to manage and schedule data packets more efficiently, ensuring efficient communication and data transmission. For example, step 103 may include:

[0098] (103.1) When a message to be transmitted with multiple propagation directions is detected, determine the output port to which each message to be transmitted points;

[0099] (103.2) Obtain the first output port corresponding to the currently transmitted message. When the output port pointed to overlaps with the first output port, determine that the output port pointed to by the corresponding message to be transmitted is busy; or, when the output port pointed to does not overlap with the first output port, determine that the output port pointed to by the corresponding message to be transmitted is idle.

[0100] The first output port can be the output port used by the message currently being transmitted.

[0101] The "busy" state can be the state of the corresponding output port when it is currently transmitting a message.

[0102] The idle state can be the state of the output port when there is no currently transmitted message on the corresponding output port.

[0103] For example, if the output ports pointed to by the message 'a' to be transmitted at the current moment are 1 and 2, and output port 1 is currently transmitting message 'b', then the output port pointed to by the message to be transmitted is in a busy state. If the output ports pointed to by the message 'c' to be transmitted at the current moment are 2 and 3, and neither output port 2 nor 3 is currently transmitting a message, then the output port pointed to by the message to be transmitted is in an idle state. It can be understood that as long as at least one of the output ports pointed to by the message to be transmitted is busy, then the output port pointed to by the message to be transmitted is in a busy state.

[0104] For example, if there are three messages to be transmitted: message a, message b, and message c, where message a propagates in multiple directions, then we can determine that the output ports pointed to by message a are S1 and S2, the output port pointed to by message b is S2, and the output port pointed to by message c is S3. In order to determine the message to be transmitted in the next moment, we can determine the state of the output ports pointed to by messages a, b, and c.

[0105] Furthermore, the first output port corresponding to all currently transmitted messages can be obtained. For example, if output port S1 is transmitting message d and output port S3 is transmitting message e, then output ports S1 and S3 can be determined as the first output ports. Thus, it can be known that the output port pointed to by message a coincides with message d, that is, it coincides with the first output port S1; the output port pointed to by message c coincides with message e, that is, it coincides with the first output port S3. The output ports pointed to by messages a and c are in a busy state; the output port pointed to by message b does not coincide with the first output port, and the output port it points to is in an idle state.

[0106] For example, the status of the corresponding output port can be determined by querying the output port pointed to by the message to be transmitted. For instance, if the output port pointed to by the message f to be transmitted is S5, by querying S5, it can be determined that S5 is currently transmitting other messages, therefore, the status of the output port pointed to by the message f to be transmitted is busy.

[0107] By checking the status of the output port to which each message to be transmitted points, potential conflicts can be detected in a timely manner, thereby improving the overall throughput of the system and effectively preventing deadlock.

[0108] Step 104: When there are multiple candidate messages to be transmitted in the message queue that point to an idle output port, select the target message to be transmitted from the multiple candidate messages to be transmitted according to the preset arbitration priority.

[0109] In some implementations, in order to optimize resource utilization and avoid deadlock, candidate messages to be transmitted that are in an idle state at the output port can be selected, and the target message to be transmitted can be selected from the candidate messages to be transmitted according to a preset arbitration priority. In this way, a circular waiting chain can be avoided.

[0110] Among them, the candidate messages to be transmitted can be those messages in the message queue to be transmitted whose output ports are in an idle state at the current time.

[0111] Among them, the preset arbitration priority can be the transmission order set for candidate messages to be transmitted of different types or from different sources in the on-chip network. The candidate messages to be transmitted with higher priority will get the opportunity to be transmitted first when network resources are limited.

[0112] The target message to be transmitted can be at least one candidate message to be transmitted selected from multiple candidate messages to be transmitted at the current time according to a preset arbitration priority.

[0113] For example, the preset arbitration priority can be a priority determined according to the type of message. For instance, control messages (such as messages related to routing updates, configuration information, etc.) have the highest priority, real-time data messages (such as messages related to audio streams, video streams, sensor data, etc.) have the second priority, ordinary messages (such as messages related to file transfers, regular data packets, etc.) have the third priority, log data messages and backup data messages have the fourth priority, and so on.

[0114] For example, the preset arbitration priority can be a priority determined according to the source of the message. For instance, messages related to mission-critical applications (such as security monitoring systems, medical equipment, etc.) have the first priority, messages related to high-priority applications (such as messages related to real-time control systems, multimedia applications, etc.) have the second priority, and messages related to general applications (such as messages related to office applications, routine computing tasks, etc.) have the third priority, and so on.

[0115] For example, the preset arbitration priority can be a priority determined according to the time order of the messages, such as the first message to arrive having the highest transmission priority, the last message to arrive having the lowest priority, and so on.

[0116] For example, the preset arbitration priority can be a priority determined according to the time sensitivity of the message. For instance, the first priority is assigned to messages with high real-time requirements, the second priority is assigned to messages with medium real-time requirements, and the third priority is assigned to non-real-time messages, and so on.

[0117] In some implementations, the preset arbitration priority can also be a priority determined according to message length or service quality requirements. The specific priority adopted is determined according to actual needs, and will not be elaborated here.

[0118] It should be noted that there may be no candidate messages to be transmitted. In this case, it means that the output ports pointed to by the messages to be transmitted in the current message queue are all busy. If the transmission of messages to be transmitted continues, it may cause a deadlock problem. Therefore, the processing of the message queue to be transmitted can be stopped until a new message to be transmitted is added to the message queue, or until an output port has completed the transmission of a message. Then the processing of the message queue to be transmitted can be restarted.

[0119] For example, there may be only one candidate message to be transmitted. In this case, it means that there is only one message to be transmitted in the current message queue that does not conflict with the message being transmitted. The processing of other messages to be transmitted in the message queue can be stopped, and the candidate message to be transmitted can be transmitted directly. The transmission can be restarted until a new message to be transmitted is added to the message queue, or until an output port has completed the transmission of a message.

[0120] For example, when there are multiple candidate messages to be transmitted, it means that there are multiple messages in the current message queue that do not conflict with the message being transmitted. In this case, since there may be conflicts between the candidate messages (corresponding output ports overlap), a global arbitrator can select a target message to be transmitted from the multiple candidate messages according to a preset arbitration priority. For example, if the preset arbitration priority is determined by the time order of the messages, and there are message a and message b as candidate messages to be transmitted, and the time when input port R1 receives message a is earlier than the time when input port R3 receives message b, then the global arbitrator can select message a as the target message to be transmitted, and message b can stop processing or be transmitted after message a.

[0121] For example, candidate packets that do not conflict with each other between output ports can also be selected as target packets for transmission based on the current available network load. For instance, if the current available network load indicates that there are two target packets that can be transmitted, and the candidate packets are packet a pointing to output port S1; packet b pointing to output ports S1 and S2; packet c pointing to output port S3; and packet d pointing to output ports S4 and S5, then the output ports of packets a, c, and d do not conflict with each other, or the output ports of packets b, c, and d do not conflict with each other. Therefore, any two candidate packets can be selected as target packets from either packets a, c, and d, or packets b, c, and d. For example, packets c and d can be selected as target packets for transmission. Furthermore, the available network load varies at different times, and the target packets that can be transmitted also vary, depending on the specific circumstances.

[0122] Furthermore, when the number of non-conflicting candidate messages to be transmitted is less than the number of currently transmittable target messages to be transmitted, the messages can be transmitted according to the actual number. For example, if there are two non-conflicting candidate messages to be transmitted and three target messages to be transmitted, then these two candidate messages to be transmitted can be transmitted as target messages to be transmitted.

[0123] By using the above method, messages that are idle at the output port can be selected as candidate messages to be transmitted. In other words, messages that do not conflict with the currently transmitted messages can be selected as candidate messages to be transmitted, and at least one target message can be selected from them for transmission. This avoids the situation where multiple messages are waiting for each other to release resources, prevents deadlock, and improves resource utilization.

[0124] In some implementations, to optimize system resource utilization, the current number of packets to be transmitted can be determined based on the available system load, and target packets of that number can be selected for transmission. This ensures efficient utilization of system resources while transmitting as many packets as possible and avoiding deadlocks between output ports. For example, step 104 may include:

[0125] (104.1) When there are multiple candidate messages to be transmitted in the message queue that point to an idle output port, the reception time corresponding to each candidate message to be transmitted is determined according to the preset arbitration priority.

[0126] (104.2) Obtain the current available load of the system and determine the current number of packets to be transmitted based on the available load;

[0127] (104.3) Select the target messages to be transmitted with the current message transmission quantity from multiple candidate messages to be transmitted according to the reception time corresponding to each candidate message to be transmitted; wherein, the output ports between any two target messages to be transmitted do not coincide.

[0128] Wherein, the reception time may be the specific time when the candidate message to be transmitted is received at the corresponding input port.

[0129] Wherein, the available payload may be the maximum data transmission quantity that the current system can carry. Monitoring the available payload can optimize the selection of message transmission, ensure that the network will not be overloaded, and at the same time improve the resource utilization efficiency.

[0130] Wherein, the current message transmission quantity may be the quantity of messages to be transmitted that can be selected according to the available payload of the system at the current moment. The current message transmission quantities at different moments are determined according to the available payload at the corresponding moments.

[0131] Exemplarily, when the preset arbitration priority is the priority determined according to the time sequence of messages, when a message to be transmitted is received at each input port, the reception time of the message can be recorded by the system clock or timer, and after determining the candidate messages to be transmitted, at least one target message to be transmitted is determined according to the reception time of each candidate message to be transmitted.

[0132] Exemplarily, in order to avoid conflicts as much as possible, it can be set to select one target message to be transmitted with the earliest corresponding reception time from the candidate messages to be transmitted each time. For example, if the candidate messages to be transmitted include message a with a reception time of 十二点整 and message b with a reception time of 十二点零一分, then message a can be selected as the target message to be transmitted for transmission. <​​​Furthermore, when the number of eligible target packets to be transmitted is less than the current number of packets to be transmitted, the eligible target packets to be transmitted can be transmitted. When selecting target packets to be transmitted, they are selected sequentially according to priority. For example, if the current number of packets to be transmitted is 2, and the priority is determined according to the time order of the packets, then the two candidate packets to be transmitted that are transmitted first and whose output ports do not conflict can be selected as target packets to be transmitted.

[0135] In some implementations, the overall available load of the system can be obtained by comprehensively weighting the evaluation from multiple dimensions. For example, bandwidth utilization accounts for 50% of the overall available load, processor load accounts for 30%, and buffer occupancy accounts for 20%, thereby calculating a comprehensive available load. For instance, the weighting of each dimension in the overall available load can be adjusted according to actual circumstances.

[0136] In some implementations, the above priority can be determined according to the time order of the messages, the source of the messages, the time order of the messages, the time sensitivity of the messages, or the message length or quality of service requirements. Different priorities can also be applied to the above scheme, which will not be elaborated here.

[0137] Furthermore, to avoid conflicts between target messages to be transmitted, target messages that meet priority requirements can be selected based on the output port pointed to by each candidate message. For example, if the current number of messages to be transmitted is 2, and the preset arbitration priority is determined according to the time order of the messages (or other priorities), the candidate messages to be transmitted are: message a received at 12:00, corresponding to output port S1; message b received at 12:01, corresponding to output ports S1 and S2; message c received at 12:03, corresponding to output port S2; message d received at 12:04, corresponding to output ports S1, S2 and S5; and message e received at 12:05, corresponding to output port S1. Based on priority and the current number of messages transmitted, messages a and b can be determined first. However, since message b conflicts with the output port of message a, message c, which is a candidate message to be transmitted after message b, is selected. Since the output ports pointed to by messages a and c do not conflict, messages a and c can be transmitted as target messages to be transmitted.

[0138] By using the above methods, deadlocks can be effectively avoided while optimizing system resource utilization and improving system stability and performance.

[0139] In some implementations, to avoid deadlock and resource waste, after each transmission of a new target message, messages in the message queue that conflict with the output port pointed to by the currently transmitting message can be paused to ensure efficient operation of the on-chip network. For example, after step 104, "selecting the target message from multiple candidate messages for transmission according to a preset arbitration priority," it may further include:

[0140] (A.1) From the multiple messages to be transmitted in the message queue, select the messages whose output port is busy and pause processing;

[0141] (A.2) In the queue of messages to be transmitted, pause the processing of paused messages until the output port has finished transmitting any target message to be transmitted, then restore the paused messages to messages to be transmitted.

[0142] Among them, the paused processing message can be a message in the message queue that conflicts with the output port pointed to by the message being transmitted. The paused processing message is paused in the message queue.

[0143] For example, if the target device is equipped with multiple levels of global arbitrators, each level of global arbitrator corresponds to the selection of a target message to be transmitted once, and is used to select the corresponding target message to be transmitted according to a preset arbitration priority. For instance, when the queue to be transmitted performs the first selection of a target message to be transmitted, the first-level global arbitrator determines the target message to be transmitted. If there are still messages to be transmitted in the queue at this time, the second-level global arbitrator determines the target message to be transmitted, and so on.

[0144] Please refer to Figure 4 For example, Router represents a router, i.e., the target device. R1-R5 represent input ports that receive packets to be transmitted from five directions, corresponding one-to-one with the five input directions. Similarly, S1-S5 represent output ports that send the determined target packets to be transmitted to five directions, corresponding one-to-one with the five output directions. glb_rr1 represents the first-level global arbiter, glb_rr2 represents the second-level global arbiter, and arb_1, arb_2, arb_3, arb_4, and arb_5 correspond to the arbiter of each output port. All representations in the figures of this application embodiment can be referred to. Figure 4The introduction (the number of input and output ports may differ in practice) can be found here for further details and will not be elaborated upon further. Furthermore, the arbitrator is used to determine candidate and target packets to be transmitted. When at least one packet in the packet queue requires multicast transmission, the global arbitrator selects the target packet according to a preset arbitration priority. When no packet requires multicast transmission, the arbitrator of each output port determines the transmission order of each packet to be transmitted.

[0145] exist Figure 4 In the process, the target device receives messages to be transmitted in the E, S, W, N, and L directions via R1, R2, R3, R4, and R5, respectively. The E direction corresponds to message a, pointing to output ports S2 and S3; the S direction corresponds to message b, pointing to output ports S1 and S3; the W direction corresponds to message c, pointing to output ports S1 and S2; the N direction corresponds to message d, pointing to output port S4; and the L direction corresponds to message e, pointing to output port S4. Therefore, the message queue contains messages with multiple propagation directions. A global arbitrator is used to select candidate messages and target messages to be transmitted.

[0146] Furthermore, through the first-level global arbitrator rr1, it can be determined that message a from direction E is authorized, and message a can be transmitted as the target message. At this time, the output ports S2 and S3 corresponding to message a can be locked. Since message b from direction S and message c from direction W conflict with the output ports of message a, that is, the output ports of messages b and c are busy, messages b and c can be identified as paused messages, and the processing of messages b and c is suspended (messages b and c are marked). At this time, the remaining messages in the message queue are message d from direction N and message e from direction L. Since messages d and e each point to only one output port, they are unicast transmission messages. Messages d and e are directly input to the local arbitrator arb_4 corresponding to output port S4 for arbitration. Message e is authorized and can be transmitted. Since message d has a lower priority, its processing can be suspended first to ensure that message e is transmitted first.

[0147] In some implementations, after an output port finishes transmitting any target message to be transmitted, messages that may conflict with paused messages have already been transmitted, and the corresponding output port is idle. In this case, the paused message can be restored to the message queue and processed again. For example, if message a is selected as the target message to be transmitted, and the output ports corresponding to message a are S1 and S4, while the output port corresponding to candidate message b is S1 and candidate message c is S4, then candidate message b and candidate message c are identified as paused messages. After message a is transmitted, the output ports pointed to by candidate message b and candidate message c become idle again. At this point, candidate message b and candidate message c can be restored to the message queue and processing of candidate message b and candidate message c can begin.

[0148] By using the above methods, deadlock can be avoided while ensuring that all messages have a chance to be transmitted, thus ensuring the efficient operation of the on-chip network.

[0149] Step 105: Repeat the step of selecting the target message to be transmitted from multiple candidate messages to be transmitted according to the preset arbitration priority until there are no candidate messages to be transmitted in the message queue whose output port is in an idle state.

[0150] Step 106: When the message queue to be transmitted does not contain any messages to be transmitted, stop processing the message queue to be transmitted.

[0151] In some implementations, to avoid invalid operations, processing of the message queue can be stopped when there are no candidate messages in the output port that are idle, or when the message queue does not contain any messages to be transmitted. This allows system resources to be used for other tasks, improving overall efficiency.

[0152] For example, when there are two messages remaining in the queue to be transmitted, message a points to output port S2 and message b points to output port S6, and at the current moment, both S2 and S6 are transmitting other messages, that is, both S2 and S6 are in a busy state, there are no candidate messages to be transmitted in the queue to be transmitted whose output ports are in an idle state. Therefore, in order to save resources, the processing of the queue to be transmitted can be stopped.

[0153] In some implementations, if there are still candidate packets to be transmitted whose output ports are idle in the packet queue, the packet queue should continue to be processed. For example, if after selecting and transmitting the target packet a, there are still candidate packets b and c remaining in the packet queue, and if at least one of the candidate packets b and c needs to be multicast, the target packet can continue to be selected from the candidate packets b and c for transmission according to the preset arbitration priority.

[0154] For example, if a new message to be transmitted is added to the message queue, the newly added message should continue to be processed within the queue. For instance, if the newly added message is message f, then it can be determined whether the output port pointed to by message f is in an idle state. If the output port pointed to by message f is in an idle state, then message f can be transmitted as the target message to be transmitted.

[0155] This application embodiment adds a message to a message queue when at least one message to be transmitted is detected to be received at any input port; when the message queue contains messages to be transmitted, the propagation direction of each message is determined according to the output port pointed to by each message; when multiple messages to be transmitted are detected in the message queue, the state of the output port pointed to by each message is determined; when multiple candidate messages to be transmitted are in the message queue and their output ports are in an idle state, a target message to be transmitted is selected from the multiple candidate messages to be transmitted according to a preset arbitration priority; the step of selecting a target message to be transmitted from the multiple candidate messages to be transmitted according to the preset arbitration priority is repeated until there are no candidate messages to be transmitted in the message queue whose output ports are in an idle state; when the message queue does not contain any messages to be transmitted, the processing of the message queue is stopped. In this way, only packets that do not conflict with currently being transmitted are processed at a time, ensuring that only packets pointing to an idle output port can be considered as candidates for transmission. This avoids multiple packets competing for the same resource simultaneously, thus preventing deadlock and long waiting times. Simultaneously, it sequentially selects packets that do not conflict with currently being transmitted, improving the overall system throughput and thus increasing packet transmission efficiency. In summary, this application can improve packet transmission efficiency while preventing deadlock.

[0156] In some implementations, to simplify the scheduling process, when only packets requiring unicast transmission remain in the packet queue, each packet can be sent to the corresponding output port's packet distributor (i.e., arbitrator) for allocation, thereby improving system response speed. For example, the on-chip network data processing method further includes:

[0157] (B.1) When it is detected that there are no messages to be transmitted with multiple propagation directions in the message queue to be transmitted, the first message to be transmitted with a single propagation direction is determined from the message queue to be transmitted;

[0158] (B.2) Determine the output port to which each first message to be transmitted points, and the message distributor corresponding to each output port;

[0159] (B.3) The transmission order of each first message to be transmitted is determined by the message distributor according to the preset arbitration priority;

[0160] (B.4) Based on the transmission order, each first message to be transmitted is transmitted to the corresponding output port in sequence.

[0161] The first message to be transmitted can refer to a message in the message queue that propagates in a single direction (i.e., unicast).

[0162] The message distributor, also known as the arbitrator, can be a functional entity used to determine the transmission order of the first message to be transmitted according to a preset arbitration priority.

[0163] The transmission order can be the order in which each first message to be transmitted is transmitted to its corresponding output port, as determined by the message distributor.

[0164] In some implementations, if the initial queue of messages to be transmitted consists entirely of messages with a single propagation direction (i.e., unicast), or if, after at least one filtering of target messages to be transmitted, the remaining messages in the queue are all messages with a single propagation direction, these messages can be directly passed to the message distributor of their corresponding transmission output port for allocation, such as round-robin allocation, preset arbitration priority allocation, etc.

[0165] Please refer to Figure 5For example, if R1 receives message a from direction E, its corresponding output port is S2; R2 receives message b from direction S, its corresponding output port is S1; R3 receives message c from direction W, its corresponding output port is S1; R4 receives message d from direction N, its corresponding output port is S4; and R5 receives message e from direction L, its corresponding output port is S4. In this case, there are no messages requiring multicast transmission. Therefore, there is no need for global arbitration of messages a, b, c, d, and e. Instead, all messages a, b, c, d, and e are transmitted to the message distributors at their respective output ports, i.e., local arbitrators, for separate distribution. Furthermore, message a is input to local arbiter arb_2 for arbitration, messages b and c are input to local arbiter arb_1 for arbitration, and messages d and e are input to local arbiter arb_4 for arbitration. Messages a, c, and e are granted authorization. At this time, the output ports pointed to by the remaining messages b and d in the message queue are busy, and the processing of messages to be transmitted is suspended.

[0166] Please refer to Figure 6 For example, if R1 receives message a from direction E, and the corresponding output ports are S2 and S3; R2 receives message b from direction S, and the corresponding output ports are S1 and S3; R3 receives message c from direction W, and the corresponding output ports are S1 and S2; R4 receives message d from direction N, and the corresponding output ports are S1 and S5; and R5 receives message e from direction L, and the corresponding output ports are S1 and S4, then, since there are multicast messages, the target message to be transmitted is selected from messages a, b, c, d, and e. Specifically, the final target message to be transmitted can be determined by the first-level global message distributor (i.e., the first-level global arbitrator glb_rr1). If message a is finally determined to be the target message to be transmitted, the output ports S2 and S3 corresponding to message a can be locked. Then, messages b and c, which conflict with message a, are marked as suspended messages because they conflict with the output ports of message a. At this point, the remaining messages to be transmitted in the queue are messages d and e. Messages d and e are sent as candidate messages to be transmitted to the secondary global arbitrator glb_rr2. If message d is determined to be the target message to be transmitted, the output ports S1 and S5 corresponding to message d are locked to a busy state. Since the remaining message e conflicts with the locked output port S1, message e is marked as a message to be paused. At this point, the processing of the queue to be transmitted can be stopped.

[0167] The above methods effectively simplify the scheduling process of unicast messages, improve the system's response speed and transmission efficiency, avoid resource conflicts, and enhance the system's flexibility and adaptability.

[0168] In some implementations, to ensure efficient use of network resources while avoiding deadlock, the message queue can be updated when the output port finishes transmitting any target message, and messages that were previously paused due to message collisions can be restored as messages to be transmitted and processed normally in the message queue. This ensures efficient use of network resources, avoids deadlock, and improves system response speed and message transmission efficiency. For example, the on-chip network data processing method may also include:

[0169] (C.1) When the output port has finished transmitting the message to any target, update the message queue to be transmitted.

[0170] (C.2) Restore the paused messages in the transmission message queue to messages to be transmitted;

[0171] (C.3) When the queue of messages to be transmitted contains messages to be transmitted, determine the propagation direction of each message to be transmitted based on the output port pointed to by each message to be transmitted;

[0172] (C.4) When a message to be transmitted is detected in the message queue with multiple propagation directions, determine the status of the output port pointed to by each message to be transmitted;

[0173] (C.5) When there are multiple candidate messages to be transmitted in the updated message queue that point to an idle output port, the target message to be transmitted shall be selected from the multiple candidate messages to be transmitted according to the preset arbitration priority.

[0174] (C.6) Repeat the step of selecting the target message to be transmitted from multiple candidate messages to be transmitted according to the preset arbitration priority until there are no candidate messages to be transmitted whose output ports are in an idle state in the updated message queue;

[0175] (C.7) Stop processing the updated message queue when the updated message queue does not contain any messages to be transmitted.

[0176] For example, after an output port finishes transmitting any target message to be transmitted, messages that might conflict with paused messages have already been transmitted, and the corresponding output port is idle. In this case, paused messages can be restored to the message queue and processed again. For instance, if message a is selected as the target message to be transmitted, and the output ports corresponding to message a are S1 and S4, while the output port corresponding to candidate message b is S1 and candidate message c is S4, then candidate messages b and c are identified as paused messages. After message a is transmitted, the output ports pointed to by candidate messages b and c become idle again. At this point, candidate messages b and c can be restored to the message queue and processing can begin for them.

[0177] It should be noted that the process of reprocessing the message queue can be referred to the example above. The specific implementation example has been elaborated above and will not be repeated here.

[0178] By using the above methods, deadlock can be avoided while ensuring efficient message transmission.

[0179] In some implementations, to avoid deadlock while ensuring efficient utilization of network resources, when a new message to be transmitted is received through any input port, the message queue to be transmitted can be updated, and messages that were previously paused due to message collisions can be restored as messages to be transmitted. The message queue to be transmitted can then be processed normally to avoid deadlock and improve system response speed and message transmission efficiency. For example, the on-chip network data processing method may further include:

[0180] (D.1) When any input port adds at least one message to be transmitted, update the message queue to be transmitted;

[0181] (D.2) When the queue of messages to be transmitted contains messages to be transmitted, determine the propagation direction of each message to be transmitted based on the output port pointed to by each message to be transmitted;

[0182] (D.3) When a message to be transmitted is detected in the message queue with multiple propagation directions, determine the status of the output port pointed to by each message to be transmitted;

[0183] (D.4) When there are multiple candidate messages to be transmitted in the updated message queue that point to an idle output port, the target message to be transmitted is selected from the multiple candidate messages to be transmitted according to the preset arbitration priority.

[0184] (D.5) Repeat the step of selecting a target message to be transmitted from the multiple candidate messages to be transmitted according to the preset arbitration priority until there are no candidate messages to be transmitted whose output ports are in an idle state in the updated message queue;

[0185] (D.6) Stop processing the updated message queue when the updated message queue does not contain any messages to be transmitted.

[0186] By employing the above methods, the queue of messages to be transmitted can be updated in a timely manner, maintaining the consistency and real-time nature of the system state. After updating the queue, processing continues on the updated queue, ensuring that new messages can be transmitted promptly even when the output port they point to is idle. This improves resource transmission efficiency while avoiding deadlock.

[0187] Please see Figure 7 This application also provides an on-chip network data processing apparatus that can implement the above-described on-chip network data processing method. The on-chip network data processing apparatus includes:

[0188] The addition module 71 is used to add the message to be transmitted to the message queue when it is detected that any input port has received at least one message to be transmitted.

[0189] The determining module 72 is used to determine the propagation direction of each message to be transmitted based on the output port pointed to by each message to be transmitted when the message queue to be transmitted contains messages to be transmitted.

[0190] The detection module 73 is used to determine the status of the output port pointed to by each message to be transmitted when it is detected that there are messages to be transmitted in the message queue with multiple propagation directions.

[0191] The selection module 74 is used to select a target message to be transmitted from the multiple candidate messages to be transmitted according to a preset arbitration priority when there are multiple candidate messages to be transmitted in the message queue where the state of the pointed output port is idle.

[0192] Processing module 75 is used to repeatedly execute the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority, until there are no candidate messages to be transmitted in the message queue whose output port is in an idle state.

[0193] The stop module 76 is used to stop processing the message queue when the message queue to be transmitted does not contain any messages to be transmitted.

[0194] The specific implementation of this on-chip network data processing device is basically the same as the specific embodiment of the on-chip network data processing method described above, and will not be repeated here. Subject to meeting the requirements of the embodiments of this application, the on-chip network data processing device may also be equipped with other functional modules to implement the on-chip network data processing method in the above embodiments.

[0195] This application also provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described on-chip network data processing method. This computer device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0196] Please see Figure 8 , Figure 8 The hardware structure of a computer device according to another embodiment is illustrated. The computer device includes:

[0197] The processor 81 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0198] The memory 82 can be implemented as a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 82 can store the operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 82 and called and executed by the processor 81 using the on-chip network data processing method of the embodiments of this application.

[0199] Input / output interface 83 is used to implement information input and output;

[0200] The communication interface 84 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0201] Bus 85 transmits information between various components of the device (e.g., processor 81, memory 82, input / output interface 83, and communication interface 84);

[0202] The processor 81, memory 82, input / output interface 83, and communication interface 84 are connected to each other within the device via bus 85.

[0203] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described on-chip network data processing method.

[0204] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0205] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0206] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0207] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0208] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0209] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0210] It should be understood that in this application, "at least one" and "several" refer to one or more, and "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0211] In the embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.

[0212] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0213] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0214] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0215] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A method for on-chip network data processing, characterized in that, The method is applied to a target device, the target device including multiple input ports and multiple output ports, the method comprising: When it is detected that any input port has received at least one message to be transmitted, the message to be transmitted is added to the message queue to be transmitted. When the queue of messages to be transmitted contains messages to be transmitted, the propagation direction of each message to be transmitted is determined according to the output port pointed to by each message to be transmitted; When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined; When there are multiple candidate messages to be transmitted in the message queue where the pointed output port is in an idle state, a target message to be transmitted is selected from the multiple candidate messages to be transmitted according to a preset arbitration priority. This includes: when there are multiple candidate messages to be transmitted in the message queue where the pointed output port is in an idle state, determining the reception time corresponding to each candidate message to be transmitted according to a preset arbitration priority; obtaining the available load of the current system and determining the current message transmission quantity based on the available load; selecting the target message to be transmitted for the current message transmission quantity from the multiple candidate messages to be transmitted according to the reception time corresponding to each candidate message to be transmitted; wherein, the output ports of any two target messages to be transmitted do not overlap. After selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority, the method further includes: filtering out paused processing messages whose state of the pointed output port is busy from the plurality of messages to be transmitted in the message queue; pausing the processing of the paused processing messages in the message queue until the output port has completed transmitting any one of the target messages to be transmitted, and then restoring the paused processing messages to messages to be transmitted. Repeat the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority until there are no candidate messages to be transmitted in the queue of messages to be transmitted whose output port is in an idle state. When the queue of messages to be transmitted does not contain any messages to be transmitted, the processing of the queue of messages to be transmitted is stopped.

2. The on-chip network data processing method according to claim 1, characterized in that, The method further includes: When it is detected that there are no messages to be transmitted with multiple propagation directions in the message queue to be transmitted, the first message to be transmitted with a single propagation direction is determined from the message queue to be transmitted; Determine the output port to which each first message to be transmitted points, and the message distributor corresponding to each output port; The message distributor determines the transmission order of each first message to be transmitted according to a preset arbitration priority. Based on the transmission order, each first message to be transmitted is sequentially transmitted to the corresponding output port.

3. The on-chip network data processing method according to claim 1, characterized in that, The method further includes: When the output port finishes transmitting any of the target messages to be transmitted, the message queue to be transmitted is updated. Restore the paused processing messages in the transmission message queue to messages to be transmitted; When the queue of messages to be transmitted contains messages to be transmitted, the propagation direction of each message to be transmitted is determined according to the output port pointed to by each message to be transmitted; When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined; When there are multiple candidate messages to be transmitted in the updated message queue where the output port pointed to is in an idle state, the target message to be transmitted is selected from the multiple candidate messages to be transmitted according to the preset arbitration priority. Repeat the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority until there are no candidate messages to be transmitted in the updated message queue whose output port is in an idle state. When the updated queue of messages to be transmitted does not contain any messages to be transmitted, the processing of the updated queue of messages to be transmitted is stopped.

4. The on-chip network data processing method according to claim 1, characterized in that, The method further includes: When any of the input ports adds at least one of the messages to be transmitted, update the message queue to be transmitted. When the queue of messages to be transmitted contains messages to be transmitted, the propagation direction of each message to be transmitted is determined according to the output port pointed to by each message to be transmitted; When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined; When there are multiple candidate messages to be transmitted in the updated message queue where the output port pointed to is in an idle state, the target message to be transmitted is selected from the multiple candidate messages to be transmitted according to the preset arbitration priority. Repeat the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority until there are no candidate messages to be transmitted in the updated message queue whose output port is in an idle state. When the updated queue of messages to be transmitted does not contain any messages to be transmitted, the processing of the updated queue of messages to be transmitted is stopped.

5. The on-chip network data processing method according to claim 1, characterized in that, When it is detected that there are messages to be transmitted in the message queue with multiple propagation directions, the state of the output port pointed to by each message to be transmitted is determined, including: When it is detected that there are messages to be transmitted with multiple propagation directions, the output port to which each message to be transmitted points is determined; Obtain the first output port corresponding to the currently transmitted message. When the pointed output port coincides with the first output port, determine that the output port pointed to by the corresponding message to be transmitted is in a busy state; or, when the pointed output port does not coincide with the first output port, determine that the output port pointed to by the corresponding message to be transmitted is in an idle state.

6. An on-chip network data processing device, characterized in that, The device includes: An add module is used to add the message to be transmitted to the message queue when it is detected that any input port has received at least one message to be transmitted. The determination module is used to determine the propagation direction of each message to be transmitted based on the output port pointed to by each message to be transmitted when the message queue contains messages to be transmitted. The detection module is used to determine the status of the output port pointed to by each message to be transmitted when it detects that there are messages to be transmitted in the message queue with multiple propagation directions. A selection module is configured to select a target message for transmission from the multiple candidate messages to be transmitted according to a preset arbitration priority when there are multiple candidate messages to be transmitted in the message queue where the pointed output port is in an idle state. This includes: determining the reception time corresponding to each candidate message to be transmitted according to a preset arbitration priority when there are multiple candidate messages to be transmitted in the message queue where the pointed output port is in an idle state; obtaining the available load of the current system and determining the current message transmission quantity based on the available load; and selecting the target message to be transmitted from the multiple candidate messages to be transmitted according to the reception time corresponding to each candidate message to be transmitted, up to the current message transmission quantity. Wherein, the output ports of any two target messages to be transmitted do not overlap. After selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority, the method further includes: filtering out paused processing messages whose state of the pointed output port is busy from the plurality of messages to be transmitted in the message queue; pausing the processing of the paused processing messages in the message queue until the output port has completed transmitting any one of the target messages to be transmitted, and then restoring the paused processing messages to messages to be transmitted. The processing module is used to repeatedly execute the step of selecting a target message to be transmitted from the plurality of candidate messages to be transmitted according to a preset arbitration priority, until there are no candidate messages to be transmitted in the message queue whose output port is in an idle state. The stop module is used to stop processing the message queue when the message queue to be transmitted does not contain any messages to be transmitted.

7. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the on-chip network data processing method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the on-chip network data processing method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Multicast message scheduling method and device

    CN104104618A