A prediction-based benes network routing composite solution method and device
By employing a prediction-based composite solution method for BENES network routing, which combines speculative algorithms and pipelined solutions with high-speed caching, the time-consuming problem of BENES network routing solution is solved, achieving fast routing solution and efficient hardware utilization, and is suitable for optical interconnect networks.
Patent Information
- Application Number
- CN202210929427.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-03
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-08-03
AI Technical Summary
The BENES network routing algorithm is too time-consuming and cannot meet the fast solution requirements of optical interconnect networks. Existing hardware implementations cannot be matched with high-performance electro-optical switches, resulting in path smoothness and efficiency issues.
A prediction-based BENES network routing composite solution method is adopted, which uses a speculative algorithm to generate prediction sequences and combines pipelined solution and caching. The results are directly output through caching matching, avoiding data dependencies and using hardware resources for fast solution.
It significantly reduces the routing solution time of BENES networks to tens of nanoseconds, meeting the needs of production environments and improving the path smoothness and hardware utilization of optical networks.
Smart Images

Figure CN115379319B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of routing solution, more particularly, to a prediction-based BENES network routing composite solution method and device. BACKGROUND
[0002] With the explosive growth of data in the network, the traditional electrical interconnection network has gradually failed to meet the needs of future network development due to the limitations of high transmission delay, limited bandwidth, high energy consumption and other physical conditions. Optical interconnection network can greatly improve the signal transmission rate and channel bandwidth, has strong anti-interference ability and lower cost, and is accelerating to replace the electrical interconnection in the network. The core is to exchange the optical signal from the input port to the corresponding output port according to the routing requirements.
[0003] The optical switching module is a module for realizing the optical switching function. The optical switching module with a large number of ports is usually composed of a 2x2 optical switch array, and its combination structure includes Crossbar, Benes, DLN, Butterfly, PILOSS and the like. Among them, the Benes structure has the least number of switch units and the lowest loss, and is very suitable for constructing large-scale optical switching chips.
[0004] However, the routing calculation of the BENES network is significantly slower than that of the CrossBar. For CrossBar, connecting any two nodes only needs to find the optical switch device on the intersection of the corresponding line according to the node number in the drawing, and change its state, the time complexity is O(1), and the space complexity can be ignored. For the BENES network, it is not realistic to cache all the results for table lookup operation, and the solution space is too large (the solution of the uncompressed 16x16 BENES can occupy several GB of storage space!). Therefore, a routing solution algorithm is usually used. The parallel algorithm commonly used in previous academic research is a trial-rollback algorithm, and the upper limit of the time complexity cannot be guaranteed. The matrix, Boolean operation and other algorithm variants usually do not change the essence of the trial-rollback, but increase the space complexity, which is not conducive to hardware implementation. However, CrossBar has two fatal shortcomings that make it unsuitable for application in the optical interconnection field: one is that the path loss is seriously uneven, which makes the requirement for optical switch path loss too high; the other is that the requirement for the number of optical switches is too high. Both of them together make it difficult to ensure the smoothness of the path of the slightly large-scale CrossBar network.
[0005] Existing technologies have proposed a hardware-friendly BENES network solution, implementing a deterministic latency algorithm and reducing the latency for solving 16x16 networks to the order of 200ns (previously, the slowest was in the millisecond range). However, the solution process is still heavily dependent on data, meaning that faster solutions can only be achieved by increasing the clock speed. However, the clock speed cannot be increased indefinitely, preventing the solution time from falling below 100ns. Currently, advanced high-performance electro-optic switches can complete state transitions in the order of ps, and there is clearly no matching routing algorithm to fully realize their potential. Summary of the Invention
[0006] The primary objective of this invention is to provide a prediction-based composite solution method for BENES network routing, thereby addressing the drawback of the excessively time-consuming BENES network routing solution algorithm.
[0007] A further objective of this invention is to provide a prediction-based composite solution device for BENES network routing.
[0008] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows:
[0009] A prediction-based composite solution method for BENES network routing includes the following steps:
[0010] Receive the routing solution input and perform the following steps simultaneously;
[0011] Based on the routing input, a large number of prediction sequences are generated and, in enumeration order, a new set of prediction sequences is provided to the pipeline for solving in each cycle.
[0012] Based on the routing solution input, a speculative algorithm is used to solve the problem. The specific solution of the speculative algorithm is: under the premise of only swapping the contents of two output ports, is there a 2x2 switch that can complete the requirement by changing its state? The solution result of the speculative algorithm and the prediction result of the prediction sequence are stored in the cache.
[0013] The input or prediction sequence is solved based on the routing, and the solution is obtained using a pipeline.
[0014] Based on the routing solution input, it is matched with the cached results in the cache. If the match is successful, the routing solution result is directly output. If the match is unsuccessful, it waits for the pipeline to output the routing solution result.
[0015] The fastest result among the speculative algorithm, pipelined solution, and cache matching is output.
[0016] Preferably, generating a large number of prediction sequences specifically involves:
[0017] Swapping two elements in the current output sequence [N] to get a prediction sequence, the output sequence [N] is defined as the sequence of the output port number corresponding to the input port, in the N-way BENES network, there are N*(N-1) / 2 such prediction sequences.
[0018] Preferably, the speculative algorithm is specifically:
[0019] An N*N electrical interconnection BENES network is constructed, and different signals are input into the N-way input ports, so that the electrical interconnection BENES network is completely the same as the optical switch topology to be controlled, and the two inputs of any 2*2 switch can be inquired.
[0020] Two input and output links are: the signal entering the input port A will flow out from the output port A', and the signal entering the input port B will flow out from the output port B';
[0021] A 2*2 switch of the electrical interconnection BENES network is found, so that the 2*2 switch carries the signals entering the input port A and the input port B at the same time;
[0022] The state of the found 2*2 switch is changed, if the state of the 2*2 switch is parallel at this time, it is changed to cross; if the state of the 2*2 switch is cross at this time, it is changed to parallel;
[0023] At this time, the signal entering the input port A will flow out from the output port B', and the signal entering the input port B will flow out from the output port A'.
[0024] Preferably, the input signals of the N-way input ports of the electrical interconnection BENES network are different, and the values are the sequence numbers of the input ports respectively.
[0025] Preferably, in the speculative algorithm, active enumeration is also performed, and the active enumeration is specifically:
[0026] Under the given routing status, active attempts are made to change the state of each optical switch, the output sequence after the change is observed, and then the solution result corresponding to the output sequence is obtained and stored in the cache.
[0027] Preferably, the pipeline solution is specifically:
[0028] For the BENES network is divided into several levels, the input port of each level BENES network is the left edge node, the output port is the right edge node, the left edge node and the right edge node are connected by the next level BENES network, each level is divided into two stages, which are generating reverse mapping vector and coloring respectively, the reverse mapping value of each input and output is generated, only 1 pipeline cycle is needed, in coloring, after each input or output coloring, 1 cycle is needed, these parts cannot be completed in parallel due to data dependency, therefore, for the NxN BENES network, which has N input and N output, 2N cycles are needed to complete coloring, after each level is solved, the result is connected to a result collector, the result collector is also designed in the form of pipeline, the result is stored in the pipeline queue, the result collector outputs the node state of each level in the same cycle;
[0029] The reverse mapping vector is generated according to the routing solution input, specifically:
[0030] The routing solution input is the forward mapping vector, which is represented by a sequence, and the sequence number of each element in the sequence represents the corresponding output port number, which is used to quickly query the input port to obtain the corresponding output port; the forward mapping vector can be used to calculate the reverse mapping vector, which is used to quickly query the output port to obtain the corresponding input port, if each item of the reverse mapping vector is denoted as b[i], i is its sequence number, and each item of the forward mapping vector is denoted as a[j], j is its sequence number, then:
[0031] b[a[j]]=j
[0032] Coloring is a process of marking each input and output port, and it is specified that if the uplink input or output port is colored as the first state color, the node should be placed in the cross state; if the uplink input or output port is colored as the second state color, the node should be placed in the parallel state, the specific process is:
[0033] The process is performed in the order of "right-left-left-right" until all edge node links are colored:
[0034] Right-left: select an arbitrary output port of the right edge node, set its coloring state, query the reverse mapping vector to obtain the corresponding input port, and make its coloring state consistent with the coloring state of the selected output port;
[0035] Left-left: find another input port of the left edge node where the input port queried in the "right-left" step is located, and set it to have a different coloring state from the input port queried in the "right-left" step;
[0036] Left-Left: Query the forward mapping vector to get the output port corresponding to the input port found in the "Left-Left" step, and set it to have the same coloring state as the input port found in the "Left-Left" step;
[0037] Right-Right: Find another output port of the right edge node where the output port found in the "Left-Right" step is located, and set it to have a different coloring state from the output port found in the "Left-Right" step.
[0038] Preferably, each stage of the pipeline needs to obtain the forward mapping vector, the reverse mapping vector, the port colored by the previous stage of the pipeline, and the color colored by the previous stage of the pipeline from the previous stage of the pipeline.
[0039] A prediction-based BENES network routing composite solution device, comprising a prediction sequence generator, a pipeline solver, a cache, and a speculative algorithm solver, wherein:
[0040] The prediction sequence generator generates a large number of prediction sequences according to the routing solution input, and provides a new set of prediction sequences to the pipeline solver for solving every cycle in the enumeration order;
[0041] The speculative algorithm solver uses a speculative algorithm to solve, and the specific solving content of the speculative algorithm is: whether there is a 2x2 switch that can complete the requirement after changing its state under the premise of only exchanging the contents of two output ports;
[0042] The pipeline solver uses a pipeline to solve according to the routing solution input;
[0043] The cache stores the solving results of the prediction sequence generator and the speculative algorithm solver, and accepts the routing solution input, matches with the cache results in the cache, if the matching is successful, directly outputs the routing solution result, if the matching is not successful, waits for the pipeline solver to output the routing solution result.
[0044] Preferably, the speculative algorithm solver also performs active enumeration, and the active enumeration specifically includes:
[0045] Under the given routing status, actively attempt to change the state of each optical switch, observe the output sequence after the change, and then obtain the solving result corresponding to the output sequence, and store it in the cache.
[0046] Preferably, the cache is used to cache the results calculated by the pipeline solver, and adopts a "key-value" query method, taking the forward mapping vector corresponding to the routing state as the key, and taking the switch state set of the BENES switch array as the value.
[0047] Compared with the prior art, the beneficial effects of the technical scheme of the present application are:
[0048] The present application uses hardware with far excess computing power to solve the circuit, accelerates the solution, so that it can complete a large number of solving tasks in a short time, uses speculative methods to avoid specific route solving, directly obtains the route result, uses route decision strategy and cache mechanism to ensure the cache hit rate of route solving, and hides the calculation delay. The present application further reduces the solving time required by the currently best route solving hardware to tens of nanoseconds or even lower, so that the BENES optical network can be truly used in a production environment. BRIEF DESCRIPTION OF DRAWINGS
[0049] Figure 1 The present application is a method flowchart.
[0050] Figure 2 The present application is an 8x8 BENES solving pipeline schematic provided for an embodiment.
[0051] Figure 3 The present application is an example 8x8 BENES optical switch configured for a specific route provided for an embodiment.
[0052] Figure 4 The present application is a speculative algorithm display example provided for an embodiment.
[0053] Figure 5 The present application is a device schematic. DETAILED DESCRIPTION
[0054] The drawings are only used for illustrative description and cannot be understood as limiting the present patent;
[0055] In order to better illustrate the present embodiment, some components in the drawings may be omitted, enlarged or reduced, and do not represent the actual product size;
[0056] For those skilled in the art, it is understandable that some well-known structures in the drawings and their descriptions may be omitted.
[0057] The technical scheme of the present application will be further described below in combination with the drawings and embodiments.
[0058] Embodiment 1
[0059] The present embodiment provides a prediction-based BENES network route composite solving method, as shown in Figure 1 The method comprises the following steps:
[0060] Receive route solving input and perform the following steps simultaneously;
[0061] According to the route solving input, a large number of prediction sequences are generated and a new set of prediction sequences is provided to the pipeline for solving every cycle in the enumeration order;
[0062] According to the routing solution input, a speculation algorithm is used to solve, and the speculation algorithm specifically solves whether there is a 2x2 switch that can complete the requirement after changing its state under the premise of only exchanging the contents of two output ports, and the solution result of the speculation algorithm and the prediction result of the prediction sequence are stored in the cache;
[0063] According to the routing solution input or the prediction sequence, a pipeline solution is used;
[0064] According to the routing solution input, the cache result in the cache is matched, if the matching is successful, the routing solution result is directly output, and if the matching is not successful, the routing solution result is waited for the pipeline to output;
[0065] The result with the fastest response speed among the speculation algorithm, the pipeline solution and the cache matching success is output.
[0066] Embodiment 2
[0067] This embodiment is based on embodiment 1 and further discloses the following content:
[0068] The generation of a large number of prediction sequences is specifically:
[0069] Two elements are randomly selected from the current output sequence [N], and the positions of the two elements are exchanged to obtain a prediction sequence, and the output sequence [N] is defined as a sequence composed of output port numbers corresponding to input ports. In an N-way BENES network, there are N*(N-1) / 2 such prediction sequences.
[0070] In order to fully utilize the pipeline solver with far excess performance, a prediction sequence generator is needed to cooperate with it to generate a large number of prediction sequences for the solver to calculate in advance and cache the results. When the optical switch array can always quickly calculate the routing and quickly switch the state, in most cases, only two input and output connections are exchanged after the array structure is changed. For example, before the change, input 1 is connected to output 4, and input 3 is connected to output 6. After the change, input 1 is connected to output 6, and input 3 is connected to output 4, and the rest of the input and output relationship remains unchanged. In this regard, a specific enumeration of the routing solution requirement set of "only exchanging two input and output connections" can be made. The method is very simple, that is, two elements are randomly selected from the current output sequence [N], and the positions of the two elements are exchanged. According to the principle of permutation and combination, in an N-way BENES network, there are N*(N-1) / 2 such enumerations. The prediction sequence generator only needs to provide a new output sequence to the pipeline solver every clock cycle according to the enumeration order, and at this time, the computing power of the pipeline solver will be 100% utilized, and the pipeline will be completely filled.
[0071] The speculation algorithm is specifically:
[0072] An N*N electrically interconnected BENES network is constructed, N input ports of which respectively input different signals, keeping the electrically interconnected BENES network identical to the current controlled optical switch topology, and being able to query any 2*2 switch at present, from which two inputs respectively come from which source;
[0073] Two input and output links are: the signal entering input port A will flow out from output port A', and the signal entering input port B will flow out from output port B';
[0074] A 2*2 switch of the electrically interconnected BENES network is found, which simultaneously carries the signals entering input port A and input port B;
[0075] The state of the found 2*2 switch is changed, if the state of the 2*2 switch is parallel at present, it is changed to cross, and if the state of the 2*2 switch is cross at present, it is changed to parallel;
[0076] At this time, the signal entering input port A will flow out from output port B', and the signal entering input port B will flow out from output port A'.
[0077] The input signals of the N input ports of the electrically interconnected BENES network are different respectively, and the values are the serial numbers of the input ports.
[0078] As shown in Figure 3 , taking an 8*8 BENES network as an example, [N] can be {2, 1, 3, 4, 8, 6, 7, 5}, at this time, according to the implicit input sequence (because the input sequence will not be changed), 1->2, 2->1, 3->4, 4->3, 5->8, 6->7, 7->6, 8->5 are obtained, that is, the data entering input port 1 will flow out from output port 2, the data entering input port 2 will flow out from output port 1, and so on.
[0079] Suppose that in the current state, the contents of output port 2 and output port 5 need to be exchanged, that is, the data entering input port 1 will flow out from output port 8, and the data entering input port 8 will flow out from output port 1. The speculative algorithm will create 8 different inputs to observe whether there is a 2*2 switch that simultaneously carries the data of input port 1 and input port 8, if such a switch exists, only the state of the switch needs to be changed (from parallel to cross, or from cross to parallel), and the states of the remaining switches remain unchanged, so that the corresponding routing solution is obtained, as shown in Figure 4 .
[0080] In the speculative algorithm, active enumeration is also performed, and the active enumeration is specifically:
[0081] In the given routing status, the state of each optical switch is actively changed, the changed output sequence is observed, the solution result corresponding to the output sequence is obtained, and the solution result is stored in the cache.
[0082] The pipeline solution is shown in the figure, and the specific process is as follows: Figure 2
[0083] The BENES network is divided into several stages, the input port of each stage of the BENES network is the left edge node, the output port is the right edge node, the left edge node and the right edge node are connected by the next stage of the BENES network, each stage is divided into two stages, which are generating reverse mapping vector and coloring, the reverse mapping value of each input and output is generated, which only needs 1 pipeline period, and the coloring is implemented, which needs to consume 1 period after each input or output coloring, these parts cannot be completed in parallel due to data dependence, therefore, the NxN BENES network has N input and N output, and needs 2N period to complete coloring, after each stage of solution is completed, the result is connected to a result collector, the result collector is also designed in the form of pipeline, the result is stored in the pipeline queue, and the result collector outputs the node state of each stage obtained by solving in the same period.
[0084] The reverse mapping vector is generated according to the routing solution input, and the specific process is as follows:
[0085] The routing solution input is a forward mapping vector, which is represented by a sequence, and the sequence number of each element in the sequence represents the corresponding output port number, which is used to quickly query the input port to obtain the corresponding output port; the reverse mapping vector can be calculated from the forward mapping vector, and the reverse mapping vector is used to quickly query the output port to obtain the corresponding input port, if each item of the reverse mapping vector is denoted as b[i], i is the sequence number, and each item of the forward mapping vector is denoted as a[j], j is the sequence number, then:
[0086] b[a[j]]=j
[0087] Coloring is a process of marking each input and output port of the node switch, and the node switch has only two states, so the coloring also corresponds to two states: black and white, and it is stipulated that if the uplink input or output port of a node is colored black, the node should be in the cross state; if the uplink input or output port is colored white, the node should be in the parallel state, and the specific process is as follows:
[0088] The process is circular in the order of "right-left-left-right", and the process is repeated until all edge node links are colored:
[0089] Right-Left: Select an arbitrary output port of the right edge node, set its color state, and query the reverse mapping vector to obtain the corresponding input port, so that its color state is consistent with the color state of the selected output port;
[0090] Left-Left: Find another input port of the left edge node where the input port queried in the "Right-Left" step is located, and set it to have a different color state from the input port queried in the "Right-Left" step;
[0091] Left-Right: Query the forward mapping vector to obtain the output port corresponding to the input port found in the "Left-Left" step, and set it to have a color state consistent with the input port found in the "Left-Left" step;
[0092] Right-Right: Find another output port of the right edge node where the output port queried in the "Left-Right" step is located, and set it to have a different color state from the output port queried in the "Left-Right" step.
[0093] Each stage of the pipeline needs to obtain the forward mapping vector, the reverse mapping vector, the port colored by the previous stage of the pipeline, and the color colored by the previous stage of the pipeline from the previous stage of the pipeline.
[0094] The embodiment applies a cache mechanism, uses active enumeration means to maximize the use of speculative algorithms, and simultaneously applies a fast calculation method to further improve the real-time solving speed.
[0095] Embodiment 3
[0096] The embodiment provides a prediction-based BENES network routing composite solving device, as shown in Figure 5 The device includes a prediction sequence generator, a pipeline solver, a cache, and a speculative algorithm solver, wherein:
[0097] The prediction sequence generator generates a large number of prediction sequences according to the routing solving input, and provides a new set of prediction sequences to the pipeline solver for solving every period according to the enumeration order;
[0098] The speculative algorithm solver uses a speculative algorithm for solving, and the specific solving content of the speculative algorithm is: whether there is a 2x2 switch that can complete the requirement after changing its state on the premise of only exchanging the contents of two output ports;
[0099] The pipeline solver uses a pipeline to solve according to the routing solving input;
[0100] The cache stores the solving result of the prediction sequence generator and the speculative algorithm solver, and accepts the routing solving input, matches the cached result in the cache, if the matching is successful, directly outputs the routing solving result, if the matching is not successful, waits for the pipeline solver to output the routing solving result.
[0101] The speculative algorithm solver also performs active enumeration, and the active enumeration specifically comprises:
[0102] In the case of a given routing status, the active enumeration actively attempts to change the state of each optical switch, observes the changed output sequence, and further obtains the solving result of the corresponding output sequence, and stores the solving result in the cache.
[0103] The cache is used to cache the result calculated by the pipeline solver, adopts a "key-value" query mode, takes the forward mapping vector corresponding to the routing state as the key, and takes the switch state set of the BENES switch array as the value.
[0104] The same or similar reference signs correspond to the same or similar components;
[0105] The terms describing the positional relationship in the drawings are only used for exemplary illustration, and should not be understood as a limitation on the patent;
[0106] Obviously, the above embodiments of the present application are only examples for clearly illustrating the present application, and are not intended to limit the implementation modes of the present application. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, it is not necessary and also impossible to exhaust all the implementation modes. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application should be included in the protection scope of the claims of the present application.
Claims
1. A prediction-based BENES network routing composite solution method, characterized in that, The method comprises the following steps: receiving a routing solution input while performing the following steps; generating a plurality of prediction sequences according to the routing solution input and providing a new set of prediction sequences to the pipeline for solution in each cycle in an enumeration order, and storing the prediction results of the prediction sequences in a cache; solving according to the routing solution input by using a speculative algorithm, the speculative algorithm specifically solving whether there is a 2x2 switch that can complete the requirement by changing its state under the premise of only exchanging the contents of two output ports, if the state of the 2x2 switch is parallel, changing it to cross; if the state of the 2x2 switch is cross, changing it to parallel; and storing the solution result of the speculative algorithm in the cache; solving according to the routing solution input or the prediction sequences by using a pipeline, specifically: dividing the BENES network into a plurality of stages, the input port of each stage of the BENES network being a left edge node and the output port being a right edge node, the left edge node and the right edge node being connected by the next stage of the BENES network, each stage being divided into two phases, namely generating a reverse mapping vector and coloring, and storing the result of each stage in a result collector after the solution of each stage is completed, the result collector also being designed in a pipeline form, storing the result in a pipeline queue, and outputting the node state of each stage obtained by the solution in the same cycle; matching the cache result in the cache with the routing solution input, if the matching is successful, directly outputting the routing solution result, if the matching is not successful, waiting for the pipeline to output the routing solution result; in each cycle, outputting the result with the fastest response speed among the speculative algorithm, the pipeline solution and the cache matching success.
2. The prediction-based BENES network routing composite solution method of claim 1, wherein, The generating a plurality of prediction sequences specifically comprises: arbitrarily selecting two elements from the current output sequence [N] and exchanging their positions to obtain a prediction sequence, the output sequence [N] being defined as a sequence composed of the output port numbers corresponding to the input ports, and in an N-way BENES network, there are N*(N-1) / 2 such prediction sequences.
3. The method of claim 2, wherein, The speculative algorithm specifically comprises: constructing an N×N electrical interconnection BENES network, inputting different signals into the N-way input ports, keeping the electrical interconnection BENES network identical to the current controlled optical switch topology, and being able to query any 2x2 switch and the two inputs thereon from which sources; two input and output links are: the signal entering the input port A will flow out from the output port A', and the signal entering the input port B will flow out from the output port B'; finding a 2x2 switch of the electrical interconnection BENES network so that the two inputs entering the input port A and the input port B are carried at the same time; changing the state of the found 2x2 switch, if the state of the 2x2 switch is parallel at this time, changing it to cross; if the state of the 2x2 switch is cross at this time, changing it to parallel; at this time, the signal entering the input port A will flow out from the output port B', and the signal entering the input port B will flow out from the output port A'.
4. The method of claim 3, wherein, The input signals of the N-way input ports of the electrically interconnected BENES network are different from each other and take values of the serial numbers of the input ports respectively.
5. The prediction-based BENES network routing composite solution method of claim 4, wherein, The speculative algorithm further comprises active enumeration, which is specifically: In the given routing status, the state of each optical switch is actively changed, the output sequence after the change is observed, the solution result corresponding to the output sequence is obtained, and the solution result is stored in the cache.
6. The method of claim 5, wherein, The pipeline solution further comprises: A reverse mapping vector is generated according to the routing solution input, and the reverse mapping vector is specifically: The routing solution input is a forward mapping vector, which is represented by a sequence, and the serial number of each element in the sequence represents the corresponding output port number, which is used to quickly query the input port to obtain the corresponding output port; the forward mapping vector can be used to calculate a reverse mapping vector, which is used to quickly query the output port to obtain the corresponding input port; if each item of the reverse mapping vector is denoted as b[i], i is the serial number thereof, and each item of the forward mapping vector is denoted as a[j], j is the serial number thereof, then b[a[j]]=j. Coloring is a process of marking each input and output port of a path, and a node is set to a cross state when an uplink input or output port is colored in a first state color, and the node is set to a parallel state when the uplink input or output port is colored in a second state color, and the specific process is: The coloring is performed in the order of "right-left-left-right" in a loop until all edge node links are colored: Right-left: selecting an arbitrary output port of a right edge node, setting the coloring state thereof, querying the reverse mapping vector to obtain the corresponding input port, and setting the coloring state of the input port to be consistent with the coloring state of the selected output port; Left-left: finding another input port of a left edge node of the input port queried in the "right-left" step, and setting the coloring state of the input port to be different from that of the input port queried in the "right-left" step; Left-right: querying the forward mapping vector to obtain the output port corresponding to the input port found in the "left-left" step, and setting the coloring state of the output port to be consistent with that of the input port found in the "left-left" step; Right-right: finding another output port of a right edge node of the output port queried in the "left-right" step, and setting the coloring state of the output port to be different from that of the output port queried in the "left-right" step. Each pipeline needs to obtain the forward mapping vector, the reverse mapping vector, the port colored by the previous stage pipeline, and the color colored by the previous stage pipeline from the previous stage pipeline.
7. The method of claim 6, wherein, The pipeline solution further comprises:
8. A prediction-based BENES network routing compound solution device, characterized in that, The pipeline solution further comprises: The pipeline solution further comprises: The pipeline solution further comprises: The speculation algorithm solver solves the speculation algorithm, which specifically solves whether there is a 2x2 switch that can change its state to complete the requirement under the premise of only exchanging the contents of two output ports. If the state of the 2x2 switch is parallel, it is changed to cross; if the state of the 2x2 switch is cross, it is changed to parallel. The pipeline solver uses pipeline solving according to the routing solving input, specifically as follows: The BENES network is divided into several stages. The input port of each stage of the BENES network is the left edge node, and the output port is the right edge node. The left edge node and the right edge node are connected by the next stage of the BENES network. Each stage is divided into two stages, which are generating a reverse mapping vector and coloring respectively. After each stage is solved, the result is connected to a result collector. The result collector is also designed in the form of a pipeline, and the result is stored in the pipeline queue. The result collector outputs the node state of each stage in the same cycle. The cache stores the solving results of the prediction sequence generator and the speculation algorithm solver, and accepts routing solving input. If the cache result matches, the routing solving result is directly output. If the cache result does not match, the routing solving result is output by the pipeline solver.
9. The prediction-based BENES network routing composite solver device of claim 8, wherein, The speculation algorithm solver also performs active enumeration, specifically as follows: Under the given routing status, actively attempt to change the state of each optical switch, observe the output sequence after the change, and then obtain the solving result corresponding to the output sequence, and store it in the cache.
10. The prediction-based BENES network routing composite solver device of claim 9, wherein, The cache is used to cache the results calculated by the pipeline solver. The "key-value" query method is used, and the forward mapping vector corresponding to the routing state is used as the key. The forward mapping vector is used to quickly query the input port to obtain the corresponding output port. The switch state set of the BENES switch array is the value.
Citation Information
Patent Citations
Sequence matching scheduling algorithm based on Clos network switching structure
CN101304374A
Non-blocking all-optical switching network dynamic data scheduling system and implementation method
US20060092937A1