A port matching method and device based on a two-stage arbitration strategy
Patent Information
- Application Number
- CN202311607008.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-28
- Publication Date
- 2026-09-22
- Estimated Expiration
- 2043-11-28
AI Technical Summary
[0004]有鉴于此,本发明提供了一种基于两级仲裁策略的端口匹配方法及装置,以解决相关的逐端口匹配策略迭代次数多,浪费互联网络资源的问题
[0023]本实施例提供的基于两级仲裁策略的端口匹配方法,一级仲裁优先级仅通过对输出端口请求数量确定,降低了端口匹配的时间。
Smart Images

Figure CN117749740B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer network technology, and specifically to a port matching method and apparatus based on a two-level arbitration strategy. Background Technology
[0002] With the current pursuit of high capacity and scalability in the Internet, simply increasing the number of ports or improving line speeds is no longer sufficient to meet the requirements of large-scale switching systems. Therefore, various high-performance Internet networks that are efficient, low-latency, flexible in scale, and easy to cable have emerged. In Internet networks, there are often multiple levels of routing nodes, each of which is connected to several Internet input / output devices or other routing nodes. Since there are multiple paths between each pair of input / output ports, the key to the implementation of Internet networks lies in the quality of the port matching strategy.
[0003] However, the relevant port-by-port matching strategy needs to be iterated continuously, and the more input and output ports are matched, the more information is available for iteration, which in turn requires more computation cycles and results in greater latency. Summary of the Invention
[0004] In view of this, the present invention provides a port matching method and apparatus based on a two-level arbitration strategy to solve the problem of excessive iterations and wasted Internet resources associated with the port-by-port matching strategy.
[0005] In a first aspect, the present invention provides a port matching method based on a two-level arbitration strategy, the method comprising:
[0006] Obtain the Internet topology and determine the number of output port requests based on the Internet topology; the Internet topology consists of routing nodes and terminal nodes;
[0007] First-level arbitration is performed based on the number of requests to the output port, with output port priority.
[0008] Secondary arbitration is performed based on port priority to generate port matching data.
[0009] The port matching method based on a two-level arbitration strategy provided in this embodiment performs port matching based on a two-level arbitration strategy, eliminating the need for repeated iterations, thus ensuring high computational efficiency and data throughput. It significantly reduces the time consumption of port-by-port matching strategies, resulting in a substantial reduction in overall topology resources and improved performance. At the same time, the number of input and output ports can be flexibly configured according to system requirements, exhibiting high versatility and portability.
[0010] In one optional implementation, determining the number of output port requests corresponding to a node based on the Internet topology includes:
[0011] Determine the type of input request for the current node based on the Internet topology;
[0012] When the current node input request type is a routing node input request, the routing vector received by the current node is determined based on the Internet topology.
[0013] When the current node's input request type is a terminal node input request, the source terminal node and target terminal node corresponding to the current node are determined based on the Internet topology.
[0014] Calculate the routing vector based on the source terminal node and the target terminal node;
[0015] Construct a routing matrix based on routing vectors;
[0016] The number of output port requests is determined based on the routing matrix.
[0017] The port matching method based on a two-level arbitration strategy provided in this embodiment first determines the routing path by inputting the request type of the current node, and then calculates the routing vector and determines the number of output port requests for different paths. This lays the foundation for determining the target output port and rationally allocating routing paths to reduce congestion.
[0018] In one alternative implementation, before constructing the routing matrix based on the routing vectors, the following is also included:
[0019] When the routing vector is zero, the terminal node input request and the routing vector are sent to the terminal device.
[0020] When the routing vector is non-zero, a routing matrix is constructed based on the routing vector.
[0021] In one optional implementation, a first-level arbitration is performed based on the number of output port requests to determine the highest priority output port request, including:
[0022] Sort the number of output port requests in descending order, determine the priority of output interface requests according to the sorting order, and select the highest priority output port request based on the output interface request priority.
[0023] The port matching method based on a two-level arbitration strategy provided in this embodiment reduces the port matching time by determining the first-level arbitration priority solely through the number of requests to the output port.
[0024] In one optional implementation, secondary arbitration is performed based on port priority to generate port matching data, including:
[0025] When the same output port corresponds to multiple requests for the highest priority output port, the multiple requests for the highest priority output port are polled and arbitrated to determine the target output port;
[0026] Port matching data is generated based on the target output port and the current node's input port.
[0027] The port matching method based on a two-level arbitration strategy provided in this embodiment determines the target output port by polling and arbitrating multiple highest-priority output port requests. It selects the output port with fewer requests for each input port, thereby resolving output port request conflicts, minimizing blocking, reducing output port blocking, lowering port matching complexity, and improving port matching efficiency.
[0028] In one optional implementation, secondary arbitration based on port priority is performed to generate port matching data, and the method further includes:
[0029] When the same output port corresponds to a single highest priority output port request, the target output port is determined based on the highest priority output port request, and port matching data is generated based on the target output port and the input port of the current node.
[0030] The port matching method based on a two-level arbitration strategy provided in this embodiment directly uses the output port corresponding to the highest priority output port request as the target output port when the same output port corresponds to a single highest priority output port request, thereby reducing the complexity of port matching and improving port matching efficiency.
[0031] In one alternative implementation, it further includes:
[0032] The routing vector is updated based on port matching data. The updated routing vector and output port request data are stored in the output port buffer, and the updated node routing vector and output port request data are sent to the next node.
[0033] The port matching method based on a two-level arbitration strategy provided in this embodiment stores the updated routing vector and output port request data in the output port buffer, further reducing output port data congestion and improving the transmission performance of the Internet.
[0034] Secondly, the present invention provides a port matching device based on a two-level arbitration strategy, the device comprising:
[0035] The acquisition module is used to acquire the Internet topology and determine the number of output port requests based on the Internet topology; wherein, the Internet topology consists of routing nodes and terminal nodes;
[0036] The Level 1 Arbitration module is used to perform Level 1 arbitration based on the number of requests to the output port, and the output port priority.
[0037] The secondary arbitration module is used to perform secondary arbitration based on port priority and generate port matching data.
[0038] Thirdly, the present invention provides a computer device, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the computer instructions to perform the port matching method based on a two-level arbitration strategy described in the first aspect or any corresponding embodiment thereof.
[0039] Fourthly, the present invention provides a computer-readable storage medium storing computer instructions for causing a computer to execute the port matching method based on a two-level arbitration strategy described in the first aspect or any corresponding embodiment thereof. Attached Figure Description
[0040] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram of the connection relationship of a single routing node according to an embodiment of the present invention;
[0042] Figure 2 This is a flowchart illustrating a port matching method based on a two-level arbitration strategy according to an embodiment of the present invention.
[0043] Figure 3 This is a schematic diagram of the Flattened Butterfly topology according to an embodiment of the present invention;
[0044] Figure 4 This is a schematic diagram of a first-level arbitration according to an embodiment of the present invention;
[0045] Figure 5 This is a flowchart illustrating another port matching method based on a two-level arbitration strategy according to an embodiment of the present invention.
[0046] Figure 6 This is a flowchart illustrating another port matching method based on a two-level arbitration strategy according to an embodiment of the present invention;
[0047] Figure 7 This is a schematic diagram of a two-level arbitration according to an embodiment of the present invention;
[0048] Figure 8 This is a schematic diagram of a two-level arbitration strategy according to an embodiment of the present invention;
[0049] Figure 9 This is a flowchart illustrating another port matching method based on a two-level arbitration strategy according to an embodiment of the present invention.
[0050] Figure 10 This is a schematic diagram of the internal modules of a single node according to an embodiment of the present invention;
[0051] Figure 11 This is a schematic diagram of output Node#0 matching input Node#1 in the relevant port-by-port matching strategy according to an embodiment of the present invention;
[0052] Figure 12 This is a schematic diagram of output Node#1 matching input Port#0 in the relevant port-by-port matching strategy according to an embodiment of the present invention;
[0053] Figure 13 This is a schematic diagram of output Node#2 matching input Port#1 in the relevant port-by-port matching strategy according to an embodiment of the present invention;
[0054] Figure 14 This is a schematic diagram illustrating the output of Node#3 matching no matching input in the relevant port-by-port matching strategy according to an embodiment of the present invention;
[0055] Figure 15 This is a structural block diagram of a port matching device based on a two-level arbitration strategy according to an embodiment of the present invention;
[0056] Figure 16 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation
[0057] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0058] like Figure 1As shown, there are often multiple levels of routing nodes in the Internet. Each routing node is connected to several Internet input / output devices or other routing nodes. There are multiple optional paths between each pair of input / output ports. A port-by-port matching strategy is adopted. Each output port is queried in turn to establish a matching relationship. After each output port is matched, the matching input / output port request needs to be cleared. The matching of each input port needs to know the matching information of the previous ports.
[0059] However, the above port-by-port matching strategy has two main drawbacks: it requires continuous iteration, and the more input and output ports are matched, the more information is available for iteration, which in turn requires more computation cycles and results in greater latency; the priority is fixed, and both input and output ports suffer from the problem of low-priority ports being "starved".
[0060] Therefore, embodiments of the present invention provide a port matching method based on a two-level arbitration strategy to solve the above-mentioned technical problems.
[0061] According to an embodiment of the present invention, a port matching method based on a two-level arbitration strategy is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0062] This embodiment provides a port matching method based on a two-level arbitration strategy, which can be used in the aforementioned mobile terminals, such as mobile phones and tablets. Figure 2 This is a flowchart of a port matching method based on a two-level arbitration strategy according to an embodiment of the present invention, such as... Figure 2 As shown, the process includes the following steps:
[0063] Step S201: Obtain the Internet topology and determine the number of output port requests based on the Internet topology; wherein, the Internet topology consists of routing nodes and terminal nodes.
[0064] Specifically, taking the Flattened Butterfly topology as an example, the Flattened Butterfly topology is an interconnection network topology with 32 terminal nodes and 16 routing nodes, such as... Figure 3 As shown, an adjacent node is defined as a routing node whose ID (Identity) differs from the current routing node by only 1 bit. Adjacent routing nodes are connected, with each routing node connected to 2 terminal nodes and 4 adjacent routing nodes. Figure 3The boxes numbered 0, 1, 6, 7, 24, 25, 30, and 31 represent terminal nodes, and the circles numbered 0-15 represent routing nodes. Since the Flattened Butterfly topology is a ring topology, it is prone to deadlock. To avoid deadlock, the routing paths need to be restricted.
[0065] Furthermore, since there are many routing paths in the Internet topology, each node has one input port and multiple output ports, and the multiple output ports connect to multiple remaining nodes respectively.
[0066] Step S202: Perform first-level arbitration based on the number of requests to the output port, and determine the output port priority.
[0067] Specifically, the number of output port requests is sorted in descending order, the priority of output interface requests is determined according to the sorting order, and the highest priority output port request is selected based on the priority of output interface requests.
[0068] Furthermore, each node in the Internet topology is equipped with an input port and an output port, and each output port of each node is equipped with an arbitrator, including an arbitrator for terminal nodes and an arbitrator for routing nodes; for example... Figure 4 As shown, the arbitration method of the first-level arbitration adopts priority arbitration. The request count of each output port is used as the priority of the first-level arbitration. The smaller the count value, the higher the priority. The authorization is requested from the output port with the highest priority, and then the desired output port is selected for each input port.
[0069] Step S203: Perform secondary arbitration based on port priority to generate port matching data.
[0070] Specifically, if there are multiple highest-priority output port requests, a second-level arbitration is required to determine the target output port, and then the input port of the current node is matched and bound with the target output port to generate port matching data for the current node.
[0071] Furthermore, the port matching data of each node in the Internet topology is obtained using the above method, and then a routing path is generated using the port matching data of each node to realize data transmission in the Internet topology.
[0072] The port matching method based on a two-level arbitration strategy provided in this embodiment performs port matching based on a two-level arbitration strategy, eliminating the need for repeated iterations, thus ensuring high computational efficiency and data throughput. It significantly reduces the time consumption of port-by-port matching strategies, resulting in a substantial reduction in overall topology resources and improved performance. At the same time, the number of input and output ports can be flexibly configured according to system requirements, exhibiting high versatility and portability.
[0073] This embodiment provides a port matching method based on a two-level arbitration strategy, which can be used in the aforementioned mobile terminals, such as mobile phones and tablets. Figure 5 This is a flowchart of a port matching method based on a two-level arbitration strategy according to an embodiment of the present invention, such as... Figure 5 As shown, the process includes the following steps:
[0074] Step S501: Obtain the Internet topology and determine the number of output port requests based on the Internet topology; wherein, the Internet topology consists of routing nodes and terminal nodes.
[0075] Specifically, step S501 includes:
[0076] Step S5011: Determine the input request type of the current node based on the Internet topology.
[0077] Specifically, for each routing node, the type of node connected to the current node in the Internet topology can be determined as either a terminal node or a routing node. Furthermore, based on the transmission path, the input request type can be determined to include terminal node input requests and routing node input requests.
[0078] Step S5012: When the current node input request type is a routing node input request, the routing vector received by the current node is determined based on the Internet topology.
[0079] Step S5013: When the current node input request type is a terminal node input request, the source terminal node and target terminal node corresponding to the current node are determined based on the Internet topology.
[0080] Specifically, the method of obtaining the routing vector differs depending on the type of input request at the current node: when the input is a terminal device, only the source terminal device (i.e., the source terminal node) and the target terminal device (i.e., the target terminal node) are known, so the routing vector needs to be calculated; when the input is an adjacent routing node, the routing vector is input along with the routing node's input request and does not require additional calculation.
[0081] Furthermore, the output type also includes two cases: terminal device and adjacent routing node. When the routing vector is 0, it is output to the terminal device; otherwise, it can only be output to the adjacent routing node and the routing vector is updated.
[0082] Step S5014: Calculate the routing vector based on the source terminal node and the target terminal node.
[0083] Specifically, the source terminal node ID and the target terminal node ID are obtained, and the source terminal node ID and the target terminal node ID are XORed to obtain the routing vector.
[0084] Step S5015: Construct a routing matrix based on the routing vector.
[0085] Specifically, when the routing vector is zero, the terminal node input request and the routing vector are sent to the terminal device.
[0086] Furthermore, when the routing vector is 0, the current routing node is the target node, and the routing information needs to be routed to the terminal device. At this time, the output port is uniquely determined by the terminal device ID. For node input requests, a routing request is initiated to the output port corresponding to the terminal device based on the terminal device ID, and then arbitration is performed at the output port to establish the input-output matching relationship.
[0087] Furthermore, when the routing vector is non-zero, a routing matrix is constructed based on the routing vector.
[0088] Furthermore, when the routing vector is not 0, the routing information needs to be routed to the adjacent routing nodes. Since all input routing paths may not be unique, it is necessary to simultaneously send output port requests to all possible adjacent routing nodes. Therefore, rationally allocating routing paths to reduce congestion becomes the key to improving routing efficiency.
[0089] Furthermore, a routing matrix is constructed by treating the input nodes as rows and the nodes corresponding to the output ports as columns, where the element values in the routing matrix are routing vectors.
[0090] For example, as shown in Table 1 below, the input nodes of the current node, namely terminal node #0, terminal node #1, routing node #0, routing node #1, routing node #2, and routing node #3, are taken as rows, and the nodes corresponding to the output port of the current node, namely routing node #0, routing node #1, routing node #2, and routing node #3, are taken as columns. Then, the matrix element values in the routing matrix are calculated based on the rows and columns in the routing matrix. When the routing vector is not 0, it means that the current node is not the target node and needs to be transmitted to the target node through the adjacent node. For example, when the input node is routing node #1 and the node corresponding to the output port is routing node #2, the routing vector is 1, and the current node is not the target node and needs to transmit the corresponding data to the adjacent node.
[0091] Table 1:
[0092]
[0093] Step S5016: Determine the number of output port requests based on the routing matrix.
[0094] Specifically, the number of routing vectors with a value of 1 in the routing matrix is counted, and the number of requests for each output port is obtained, as shown in Table 2 below.
[0095] Table 2:
[0096]
[0097] Step S502: Perform first-level arbitration based on the number of requests to the output port, and prioritize the output ports. For details, please refer to [link to relevant documentation]. Figure 2 Step S202 of the illustrated embodiment will not be described again here.
[0098] Step S503: Perform secondary arbitration based on port priority to generate port matching data. For details, please refer to [link to relevant documentation]. Figure 2 Step S203 of the illustrated embodiment will not be described again here.
[0099] The port matching method based on a two-level arbitration strategy provided in this embodiment first determines the routing path by inputting the request type of the current node, and then calculates the routing vector and determines the number of output port requests for different paths. This lays the foundation for determining the target output port and rationally allocating routing paths to reduce congestion.
[0100] This embodiment provides a port matching method based on a two-level arbitration strategy, which can be used in the aforementioned mobile terminals, such as mobile phones and tablets. Figure 6 This is a flowchart of a port matching method based on a two-level arbitration strategy according to an embodiment of the present invention, such as... Figure 6 As shown, the process includes the following steps:
[0101] Step S601: Obtain the Internet topology and determine the number of output port requests based on the Internet topology; wherein, the Internet topology consists of routing nodes and terminal nodes. For details, please refer to [link to relevant documentation]. Figure 5 Step S501 of the illustrated embodiment will not be described again here.
[0102] Step S602: Perform first-level arbitration based on the number of requests to the output port, and determine the output port priority. For details, please refer to [link to relevant documentation]. Figure 5 Step S502 of the illustrated embodiment will not be described again here.
[0103] Step S603: Perform secondary arbitration based on port priority to generate port matching data.
[0104] Specifically, step S603 includes:
[0105] Step S6031: When the same output port corresponds to multiple requests for the highest priority output port, the multiple requests for the highest priority output port are polled and arbitrated to determine the target output port.
[0106] Specifically, such as Figure 7As shown, when the same output port corresponds to a single highest priority output port request, the target output port is determined based on the highest priority output port request, and port matching data is generated based on the target output port and the input port of the current node.
[0107] Furthermore, when the same output port corresponds to multiple requests from the highest priority output ports, a request conflict may occur, that is, multiple input ports simultaneously select the same output port. To resolve this conflict, a secondary arbitration is required, and the arbitration method for the secondary arbitration is round-robin arbitration. Among them, the round-robin arbitrator is a time-slice-based round-robin method that allocates usage rights to each output port in a certain order. Each output port can exclusively use the right within the allocated time slice.
[0108] Furthermore, the arbitrator labels multiple highest priority output port requests, sorts the labels according to a preset order, stores the sorting in the output port, and then transmits data through the output port sequentially based on the sorting when multiple highest priority output port requests are received.
[0109] For example, such as Figure 8 As shown, Port represents the terminal node, Node represents the routing node, In represents the input node, and Out represents the output node. After one-level arbitration, the desired output port corresponding to each input port is selected based on the highest priority output port request. However, Figure 8 The circles in the diagram represent the highest priority output port requests corresponding to the output port after the first-level arbitration. Therefore, when there are multiple highest priority output port requests corresponding to the same output port, the target output port is selected through a round-robin arbitration method.
[0110] Step S6032: Generate port matching data based on the target output port and the current node's input port.
[0111] The port matching method based on a two-level arbitration strategy provided in this embodiment determines the target output port by polling and arbitrating multiple highest-priority output port requests. It selects the output port with fewer requests for each input port, thereby resolving output port request conflicts, minimizing blocking, reducing output port blocking, lowering port matching complexity, and improving port matching efficiency.
[0112] This embodiment provides a port matching method based on a two-level arbitration strategy, which can be used in the aforementioned mobile terminals, such as mobile phones and tablets. Figure 9 This is a flowchart of a port matching method based on a two-level arbitration strategy according to an embodiment of the present invention, such as... Figure 9 As shown, the process includes the following steps:
[0113] Step S901: Obtain the Internet topology and determine the number of output port requests based on the Internet topology; wherein, the Internet topology consists of routing nodes and terminal nodes. For details, please refer to [link to relevant documentation]. Figure 6 Step S601 of the illustrated embodiment will not be described again here.
[0114] Step S902: Perform first-level arbitration based on the number of requests to the output port, and prioritize the output ports. For details, please refer to [link to relevant documentation]. Figure 6 Step S602 of the illustrated embodiment will not be described again here.
[0115] Step S903: Perform secondary arbitration based on port priority to generate port matching data. For details, please refer to [link to relevant documentation]. Figure 6 Step S603 of the illustrated embodiment will not be described again here.
[0116] Step S904: Update the routing vector based on port matching data, store the updated routing vector and output port request data in the output port buffer, and send the updated node routing vector and output port request data to the next node.
[0117] Specifically, the routing vector is updated by flipping the bits corresponding to the routing vector while keeping the other bits unchanged.
[0118] Specifically, during the matching process within each node, an input-output matching relationship is established based on the input and output port status and routing vector, i.e., port matching data. Once the input-output matching relationship is established, it will not be disconnected until the output port has sent a complete frame of data, and then the matching relationship will be released. After the matching relationship is released, it can re-participate in matching; otherwise, the matching relationship must be maintained.
[0119] Furthermore, after the input-output matching relationship is established, the corresponding output can be selected for the input data. During the output process, the data is first written to the output buffer. After receiving the output authorization from the corresponding node of the next node, the corresponding data is read from the buffer and input to the next level node.
[0120] Furthermore, when the buffer space in the output port buffer is about to be full, that is, when the remaining buffer space is lower than a preset threshold, the output port buffer outputs back pressure to the arbitrator. After receiving the back pressure, the arbitrator stops receiving data corresponding to the output port whose buffer is about to be full, and outputs back pressure to the upper input node to notify the upper node to stop sending data of the corresponding output port to the current node, thereby further reducing the blocking of the output port.
[0121] The port matching method based on a two-level arbitration strategy provided in this embodiment stores the updated routing vector and output port request data in the output port buffer, further reducing output port data congestion and improving the transmission performance of the Internet.
[0122] The following specific examples illustrate a port matching method based on a two-level arbitration strategy.
[0123] Example 1:
[0124] like Figure 10 As shown, a port matching method based on a two-level arbitration strategy is implemented using a single-node hardware architecture. Within this single-node architecture, a routing vector calculation module performs routing vector calculation; a terminal node request generation module or a routing node request generation module initiates a routing request to a specific port; terminal node arbitrators #0 through #m (where m represents the number of terminal node arbitrators) arbitrate the outputs of terminal nodes and establish matching relationships. To achieve port matching, an arbitrator needs to be set up at each output terminal node for selection among multiple signals; routing node arbitrators #0 through #n (where n represents the number of routing node arbitrators) arbitrate the outputs of routing nodes and establish matching relationships. An arbitrator needs to be set up at each input port and each output routing node; after establishing the matching relationship, the data selector selects data and writes the data from the corresponding input port into the buffer of the corresponding output port. When the output port buffer is not empty, a request is initiated to the subsequent routing node or terminal node.
[0125] Therefore, the specific steps of a port matching method based on a two-level arbitration strategy are as follows:
[0126] The first step is to assemble all the input routing vectors into a routing matrix;
[0127] The second step is to count the number of requests for each output port;
[0128] The third step is to perform first-level arbitration for each output port routing request, select the output port, and use priority arbitration. The priority is based on the number of requests on the output port. The smaller the number of requests, the higher the priority, in order to minimize the possibility of blocking.
[0129] Fourthly, a conflict may occur during arbitration in the second step, i.e., multiple inputs simultaneously select the same output port. To resolve this conflict, a second level of arbitration is required. The arbitration method is round-robin arbitration, and the result of the round-robin arbitration is as follows: Figure 8 As shown;
[0130] Fifth, lock the matching relationship, update the routing vector, and use the updated routing vector as the input for the next routing step;
[0131] Step 6: Once the routing information transmission is complete, the matching relationship is released. After the matching relationship is released, it can re-participate in matching.
[0132] Step 7: To verify the advancement of the port matching method based on the two-level arbitration strategy, the port matching results generated using the relevant port-by-port matching strategy are compared with those generated using the two-level arbitration strategy. Specifically, in the port matching process generated using the relevant port-by-port matching strategy, the process of outputting Node#0 and matching input Node#1 is as follows: Figure 11 As shown, the process of output Node#1 matching input Port#0 is as follows: Figure 12 As shown, the process of output Node#2 matching input Port#1 is as follows: Figure 13 As shown, Figure 14 As shown, the output Node#3 matches no input.
[0133] The comparison shows that in the two-level arbitration strategy proposed in this invention, each output port can complete the matching, while the port-by-port matching strategy only completes the matching of three output ports. This proves that the present invention has lower blocking and can achieve higher throughput. In terms of latency, the port matching method based on the two-level arbitration strategy only needs to increase the number of parallel arbitrators and counters, regardless of the number of input and output ports. It only contains two levels of logic and does not require repeated iterations. In contrast, the number of iterations of the related port-by-port matching strategy increases linearly with the number of ports, and the logic depth also increases accordingly. The more input and output ports there are, the more obvious the time advantage of the two-level arbitration strategy in the port matching method based on the two-level arbitration strategy becomes. At the same time, the priority changes dynamically during the arbitration process, and there is no "starvation" problem.
[0134] In the above embodiments, the port matching method based on the two-level arbitration strategy is easy to implement and can guarantee high computational efficiency and data throughput. It significantly reduces the time consumption of the port-by-port matching strategy and overcomes the inherent shortcomings of port-by-port matching. It has the characteristics of low hardware resource consumption, good portability, high throughput, novelty, inventiveness and simplicity.
[0135] This embodiment also provides a port matching device based on a two-level arbitration strategy, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0136] This embodiment provides a port matching device based on a two-level arbitration strategy, such as... Figure 15 As shown, it includes:
[0137] The acquisition module 1501 is used to acquire the Internet topology and determine the number of output port requests based on the Internet topology; wherein, the Internet topology consists of routing nodes and terminal nodes;
[0138] The Level 1 Arbitration Module 1502 is used to perform Level 1 arbitration based on the number of requests from the output port and the output port priority.
[0139] The secondary arbitration module 1503 is used to perform secondary arbitration based on port priority and generate port matching data.
[0140] In some alternative implementations, the acquisition module 1501 includes:
[0141] The first determining unit is used to determine the type of input request for the current node based on the Internet topology.
[0142] The second determining unit is used to determine the routing vector received by the current node based on the Internet topology when the current node input request type is a routing node input request.
[0143] The third determining unit is used to determine the source terminal node and the target terminal node corresponding to the current node based on the Internet topology when the current node input request type is a terminal node input request.
[0144] The calculation unit is used to calculate the routing vector based on the source terminal node and the target terminal node;
[0145] The first building unit is used to construct a routing matrix based on the routing vector;
[0146] The fourth determining unit is used to determine the number of output port requests based on the routing matrix.
[0147] In some optional implementations, the acquisition module 1501 further includes:
[0148] The judgment unit is used to send the terminal node input request and the routing vector to the terminal device when the routing vector is zero.
[0149] The second building unit is used to construct a routing matrix based on the routing vector when the routing vector is a non-zero value.
[0150] In some optional implementations, the first-level arbitration module 1502 is specifically used to sort the number of output port requests in order of arrival from smallest to largest, determine the priority of the output interface requests according to the sorting order, and select the output port request with the highest priority based on the priority of the output interface requests.
[0151] In some alternative implementations, the secondary arbitration module 1503 includes:
[0152] The polling arbitration unit is used to poll and arbitrate multiple requests from the highest priority output ports when the same output port corresponds to multiple requests from the highest priority output ports, in order to determine the target output port.
[0153] The first generation unit is used to generate port matching data based on the target output port and the input port of the current node.
[0154] In some optional implementations, the secondary arbitration module 1503 further includes:
[0155] The second generation unit is used to determine the target output port based on the highest priority output port request when the same output port corresponds to a single highest priority output port request, and to generate port matching data based on the target output port and the input port of the current node.
[0156] In some alternative implementations, it also includes:
[0157] The storage module is used to update the routing vector based on port matching data, store the updated routing vector and output port request data in the output port buffer, and send the updated node routing vector and output port request data to the next node.
[0158] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0159] In this embodiment, the port matching device based on a two-level arbitration strategy is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0160] This invention also provides a computer device having the above-described features. Figure 16 The diagram shows a port matching device based on a two-level arbitration strategy.
[0161] Please see Figure 16 , Figure 16 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 16As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 16 Take a processor 10 as an example.
[0162] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0163] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0164] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 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 alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device 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.
[0165] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.
[0166] The computer device also includes an input device 30 and an output device 40. The processor 10, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 16 Taking the example of a connection between China and Israel via a bus.
[0167] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0168] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0169] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A port matching method based on a two-level arbitration strategy, characterized in that, The method includes: The process involves: acquiring the internetwork topology; determining the current node's input request type based on the internetwork topology; determining the routing vector received by the current node based on the routing vector when the current node's input request type is a routing node input request; determining the source and target terminal nodes corresponding to the current node based on the internetwork topology when the current node's input request type is a terminal node input request; calculating the routing vector based on the source and target terminal nodes; constructing a routing matrix based on the routing vector; and determining the number of output port requests based on the routing matrix. The internetwork topology is composed of routing nodes and terminal nodes. The number of output port requests is sorted in order of arrival from smallest to largest. The priority of the output port interface requests is determined according to the sorting order, and the highest priority output port request is selected based on the priority of the output port interface requests. When the same output port corresponds to multiple highest priority output port requests, the multiple highest priority output port requests are polled and arbitrated to determine the target output port; port matching data is generated based on the target output port and the input port of the current node.
2. The method according to claim 1, characterized in that, Before constructing the routing matrix based on the routing vector, the method further includes: When the routing vector is zero, the terminal node input request and the routing vector are sent to the terminal device. When the routing vector is a non-zero value, the routing matrix is constructed based on the routing vector.
3. The method according to claim 1 or 2, characterized in that, The method further includes: When the same output port corresponds to a single highest priority output port request, the target output port is determined based on the highest priority output port request, and the port matching data is generated based on the target output port and the input port of the current node.
4. The method according to claim 1 or 2, characterized in that, Also includes: The routing vector is updated based on the port matching data, the updated routing vector and the output port request data are stored in the output port buffer, and the updated node routing vector and the output port request data are sent to the next node.
5. A port matching device based on a two-level arbitration strategy, characterized in that, The device includes: An acquisition module is used to acquire the Internet topology, determine the current node's input request type based on the Internet topology, and when the current node's input request type is a routing node input request, determine the routing vector received by the current node based on the Internet topology. When the current node's input request type is a terminal node input request, determine the source terminal node and target terminal node corresponding to the current node based on the Internet topology. It then calculates the routing vector based on the source terminal node and the target terminal node, constructs a routing matrix based on the routing vector, and determines the number of output port requests based on the routing matrix. The Internet topology consists of routing nodes and terminal nodes. The first-level arbitration module is used to sort the number of output port requests in order of arrival from smallest to largest, determine the priority of the output port interface requests according to the sorting order, and select the output port request with the highest priority based on the priority of the output port interface requests. The secondary arbitration module is used to poll and arbitrate the multiple highest priority output port requests when the same output port corresponds to multiple highest priority output port requests, and determine the target output port; and generate port matching data based on the target output port and the input port of the current node.
6. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory stores computer instructions, and the processor executes the port matching method based on a two-level arbitration strategy as described in any one of claims 1 to 4 by executing the computer instructions.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to execute the port matching method based on a two-level arbitration strategy as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Scheduling method of network-on-chip router based on network information
CN102546417A
Port protection method and apparatus
CN107465525A