Routing method and routing device
Patent Information
- Application Number
- PCT/JP2024/009183
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-03-08
- Publication Date
- 2025-10-02
AI Technical Summary
The generalized Benes network lacks a neat structure, making it difficult to extend existing routing algorithms designed for the Benes network, which results in slower routing speeds.
A routing method for the generalized Benes network involving switches, multiplexers, and identities, with a computer executing processes for specifying unit placement, wiring, marking, and setting based on predetermined rules to achieve high-speed routing.
Enables high-speed routing in the generalized Benes network similar to the Benes network, allowing for efficient routing in larger networks with reduced overhead.
Smart Images

Figure JP2024009183_02102025_PF_FP_ABST
Abstract
Description
Routing method and routing device
[0001] The present invention relates to a routing method and a routing device.
[0002] The Benes Network is a switching network invented in the 1960s. It is a circuit that combines small, simple units (this combination is called a topology) to realize arbitrary rearrangements (permutations). There are known simple but slow and fast routing methods for the Benes Network (see, for example, Non-Patent Documents 1 and 2).
[0003] Abbas Karimi et al. "Introduction and Analysis of Optimal Routing Algorithm in Benes Networks". In: Procedia Computer Science. Medical and Rehabilitation Robotics and Instrumentation (MRRI2013) 42 (Jan. 1, 2014), pp. 313-319. ISSN: 1877-0509. DOI: 10.1016 / j.procs.2014.11.068.Dimitris Nikolaidis et al. "Novel Benes Network Routing Algorithm and Hardware Implementation". In: Technologies 10.1 (Jan. 25, 2022), p. 16. ISSN: 2227-7080. DOI:10.3390 / technologies10010016.
[0004] The generalized Benes network is a generalized Benes network that allows the number of outputs to be less than the number of inputs, and has a wider range of applications than the Benes network. However, since the generalized Benes network does not have as neat a structure as the Benes network, it is difficult to extend the algorithm for the Benes network to the generalized Benes network.
[0005] The embodiments of the present invention have been made in view of the above-mentioned problems, and enable high-speed routing in a generalized Benes network similar to that in a Benes network.
[0006] In order to solve the above problems, a routing method according to an embodiment of the present invention is a generalized Benes network having three types of units, namely, switches, multiplexers, and identities, in which a computer executes the following steps: a specification process for specifying the placement of the units based on the number of inputs and outputs of the generalized Benes network; a wiring process for wiring the wires of the units based on predetermined wiring rules; a marking process for marking whether each wire of the unit is connected to an R or L destination; and a setting process for setting the switches and the multiplexers based on the markings.
[0007] According to the embodiment of the present invention, in the generalized Benes network, high-speed routing can be achieved similarly to the Benes network.
[0008] 1 is a diagram illustrating an example of a generalized Benes network according to the present embodiment; FIG. 2 is a diagram illustrating units according to the present embodiment; FIG. 3 is a diagram illustrating names of components according to the present embodiment; FIG. 4 is a flowchart illustrating an example of a routing process according to the present embodiment; FIG. 5 is a diagram illustrating a pattern of a generalized Benes network according to the present embodiment; FIG. 6 is a diagram illustrating the number of inputs / outputs of a subnet according to the present embodiment; FIG. 7 is a diagram illustrating an example of a unit arrangement relative to the number of inputs / outputs according to the present embodiment; FIG. 8 is a diagram illustrating an example of a unit arrangement relative to the number of inputs / outputs according to the present embodiment; FIG. 9 is a diagram illustrating an example of a unit arrangement relative to the number of inputs / outputs according to the present embodiment; FIG. 10 is a diagram illustrating an example of a unit arrangement relative to the number of inputs / outputs according to the present embodiment; FIG. 11 is a diagram illustrating a wiring rule for the input side according to the present embodiment; FIG. 12 is a diagram illustrating a wiring rule for the output side according to the present embodiment; FIG. 13 is a flowchart illustrating an example of a marking pre-processing according to the present embodiment; FIG. 14 is a diagram illustrating a marking process according to the present embodiment; FIG. 15 is a diagram illustrating a marking process according to the present embodiment; FIG. 16 is a diagram illustrating a marking process according to the present embodiment; FIG. 17 is a diagram illustrating a marking process according to the present embodiment; FIG. 18 is a diagram illustrating a marking process according to the present embodiment; FIG. 19 is a diagram illustrating a marking process according to the present embodiment; FIG. 20 is a diagram illustrating a marking process according to the present embodiment; FIG. 21 is a diagram illustrating a marking process according to the present embodiment; FIG. 22 is a diagram illustrating a marking process according to the present embodiment; FIG. 23 is a diagram illustrating a diagram illustrating a movement to an inner layer according to the present embodiment; FIG. 14 It is a diagram showing an example of the hardware configuration of a computer. It is a diagram showing an example of the functional configuration of a routing device according to the present embodiment. It is a diagram showing an example of a Benes network. It is a diagram showing an example of a variant of the Benes network.
[0009] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. The embodiment described below is merely an example, and the embodiment to which the present invention is applied is not limited to the following embodiment.
[0010] <About the Benes Network> Before describing the generalized Benes network according to this embodiment, a brief description of the Benes network will be given. The Benes network is a switching network invented in the 1960s, and is a circuit that combines small and simple units (this combination is called a topology) to realize any rearrangement (permutation).
[0011] 24 is a diagram showing an example of a Benes network. The Benes network 10 has a 2N=2 n (n is a natural number greater than or equal to 1). The Benes network 10 has a configuration in which, for example, switch stages each having N unit switches with two inputs and two outputs are arranged in (2n-1) stages between input and output ports.
[0012] 24, the Benes network 10 has four input ports 11 and four output ports 12, and three switch stages 2 each having two switches 1. A routing device that controls the Benes network 10 can output data input to the input ports 11 to any of the output ports 12 by switching the settings of each switch.
[0013] 25 is a diagram showing an example of a variant of the Benes network. This diagram shows the number of inputs and outputs of the Benes network 10 described in FIG. 24, 2N=2. n 1 shows an example of a Benes network 20 in which the above restriction is relaxed to allow an arbitrary width. However, even in this case, the restriction that the number of inputs and the number of outputs must be equal remains.
[0014] <Generalized Benes Network> The Generalized Benes Network is a Benes network that has been generalized to allow the number of outputs to be less than the number of inputs, and has a wider range of applications than the Benes network.
[0015] 1 is a diagram showing an example of a generalized Benes network according to this embodiment. The generalized Benes network 100 according to this embodiment is a switching network made up of three types of units, namely, a switch 101, an identity 102, and a multiplexer 103, connected by wires. In the generalized Benes network 100, for example, as shown in FIG. 1, the number of outputs 112 is allowed to be less than the number of inputs 111.
[0016] FIG. 2 is a diagram illustrating the units according to this embodiment. The switch 101 is a unit switch with two inputs and two outputs, and can be configured to either swap the left and right sides of the input signal before outputting it (cross) or output the input signal as is (parallel). The identity 102 is a unit with one input and one output, and does not require configuration because it simply passes the input signal through like a wire. The multiplexer 103 is a unit with multiple inputs and one output, and can be configured to output which of the multiple inputs.
[0017] FIG. 3 is a diagram for explaining the names of each part according to this embodiment. In the following description, the above-mentioned switch 101, identity 102, multiplexer 103, etc. are called units. The input and output of each unit are called wires. Furthermore, the wire on the input side of each unit may be called an input wire, and the wire on the output side may be called an output wire. Furthermore, each stage of the multi-stage generalized Benes network 100 is called a layer. Furthermore, a sub-network included in the generalized Benes network 100 is called a subnetwork. However, these names are merely examples, and other names may be used.
[0018] <Processing Flow> Next, the processing flow of the routing method according to this embodiment will be described.
[0019] 4 is a flowchart showing an example of a routing process according to this embodiment. This process shows an overview of the routing process executed by a routing device, which is a computer that controls the generalized Benes network 100 according to this embodiment.
[0020] In step S401, the routing device executes a specification process for specifying the arrangement of units such as the switch 101, the identity 102, and the multiplexer 103 based on the number of inputs and outputs of the generalized Benes network 100 to be routed.
[0021] The structure of the generalized Benes network 100, including its routing, is determined by the number of inputs and outputs. Since the subnets within the generalized Benes network 100 are also generalized Benes networks, the structure of the subnets, including their routing, is also determined by the number of inputs and outputs. As will be described later, the placement of units at the inputs and outputs of each subnet has only a small number of patterns determined by the number of inputs and outputs. Therefore, by calculating the number of inputs and outputs of the subnet in advance, the placement of the input and output units can be determined by dividing into a small number of cases. The specific processing content of the specific processing will be described later.
[0022] In step S402, the routing device executes a wiring process for wiring the wires of the units identified in the identification process based on a predetermined wiring rule. For example, the routing device shuffles and connects the input / output wires of each unit to the input / output wires of the upper and lower layers according to a predetermined rule. The specific processing content of the wiring process will be described later.
[0023] Next, the routing device executes the processes of steps S403 and S404 in order from the outermost layer.
[0024] In step S403, the routing device executes a marking process to mark each wire of each unit as to which destination (subnet), R or L, it will connect to. Here, R indicates that when a generalized Benes network 100 is arranged with the top as the input 111 and the bottom as the output, as shown in FIG. 1, for example, a wire will be connected to the subnet 121 on the right side. Also, L indicates that when a generalized Benes network 100 is arranged with the top as the input 111 and the bottom as the output, a wire will be connected to the subnet 122 on the left side. Specific details of the marking process will be described later.
[0025] In step S404, the routing device executes a setting process to set the switch 101 and the multiplexer 103 based on the markings made in the marking process. For example, if the wires connected above or below the switch 101 are marked (R, L), the routing device sets the switch 101 to "cross." On the other hand, if the wires connected above or below the switch 101 are marked (L, R), the routing device sets the switch 101 to "parallel." Note that the switch 101 in the middle layer may have both the upper and lower wires marked, in which case the routing device prioritizes the setting of the upper wire.
[0026] Furthermore, since one of the upper wires (input wires) of the multiplexer 103 is marked, the routing device determines which wire from the left the marked wire is.
[0027] The processing of steps S403 and S404 completes the setting of each unit in the outermost layer. Subsequently, in step S405, the routing device determines whether there is a layer in which the settings of each unit have not been set. If there is a layer in which the settings have not been set, the routing device proceeds to step S406. On the other hand, if there is no layer in which the settings have not been set, the routing device ends the processing of FIG. 4.
[0028] In step S406, the routing device excludes the configured layers and executes steps S403 and S404 again on the outermost unconfigured layers. By executing steps S403 to S406, the routing device can execute marking and configuration processes on the multiple layers of the generalized Benes network 100, starting from the outermost layer.
[0029] <Identification Process> Here, the identification process for identifying the placement of units, which is executed by the routing device in step S401 of FIG. 4, will be described.
[0030] As mentioned above, the structure of the generalized Benes network 100, including its routing, is determined by the number of inputs and outputs. Since the subnets within the generalized Benes network 100 are also generalized Benes networks, the structure of the subnets, including their routing, is also determined by the number of inputs and outputs. Also, as shown in Figure 5, the arrangement of units at the inputs and outputs of each subnet can have only a small number of patterns determined by the number of inputs and outputs.
[0031] 5 is a diagram showing a pattern of the generalized Benes network according to the present embodiment. As shown in table 500 in FIG. 5, the generalized Benes network according to the present embodiment has n input wires. in and the number of output wires n out There are three patterns depending on the combination of
[0032] The first pattern is n in >1, n out > 1. This corresponds to the switch 101 when there is no subnet. in and out The identity 102 is entered depending on whether n is even or odd. in >1, n out = 1. This corresponds to the multiplexer 103 in the case without subnetworks. The third pattern is in = 1, n out = 1, which corresponds to identity 102 in the absence of a subnet.
[0033] Therefore, by calculating the number of inputs and outputs of the subnetwork in advance, the placement of the input / output units can be determined by dividing the number of cases into a small number.
[0034] 6 is a diagram for explaining the number of inputs and outputs of a subnet according to this embodiment. The number of inputs and outputs of a subnet can be calculated by constructing a complete binary tree created by the rule 600 shown in FIG.
[0035] Specifically, when the total number of layers is L+1 (which is an odd number), the unit in the yth layer (y=0, 1, ...) from the input side can be found by referring to the node at depth d=min{y,L-y} of the subnet tree. Note that the only node at depth 0 is the root node.
[0036] 7 is a diagram (1) showing an example of a unit arrangement corresponding to the number of inputs and outputs according to this embodiment. in is 4, the number of outputs is n out When the number of inputs and outputs is 4, applying rule 600 in FIG. 6 to (4, 4) results in, for example, value 700 as shown in FIG. 7. Furthermore, it can be seen that a subnetwork with inputs and outputs of (4, 4) will have, for example, unit layout 710 as shown in FIG. 7 from this value 700 and the Benes network pattern in table 500 in FIG. 5. Note that in the example in FIG. 7, wires are laid out between units in unit layout 710, but in reality, the wiring between units is determined by the wiring process described in FIGS. 11 and 12. The same applies to FIGS. 8 to 10.
[0037] 8 is a diagram (2) showing an example of a unit arrangement corresponding to the number of inputs and outputs according to this embodiment. in is 5, the number of outputs is n out When the number of inputs and outputs is 5, applying rule 600 in Fig. 6 to (5, 5) results in, for example, a value of 800 as shown in Fig. 8. Furthermore, it can be seen that a subnetwork with inputs and outputs of (5, 5) will have, for example, a unit arrangement 810 as shown in Fig. 8, based on this value 800 and the Benes network pattern in table 500 in Fig. 5.
[0038] 9 is a diagram (3) showing an example of a unit arrangement corresponding to the number of inputs and outputs according to this embodiment. in is 5, the number of outputs is n out When the number of inputs and outputs is 4, applying rule 600 in Fig. 6 to (5, 4) results in, for example, a value 900 as shown in Fig. 9. Furthermore, it can be seen that a subnetwork with inputs and outputs of (5, 4) will have, for example, a unit arrangement 910 as shown in Fig. 9, based on this value 900 and the Benes network pattern in table 500 in Fig. 5.
[0039] 10 is a diagram (4) showing an example of a unit arrangement corresponding to the number of inputs and outputs according to this embodiment. in is 5, the number of outputs is n out When the number of inputs and outputs is 3, applying rule 600 in Fig. 6 to (5, 3) results in, for example, a value of 1000 as shown in Fig. 10. Furthermore, it can be seen that a subnetwork with inputs and outputs of (5, 3) will have, for example, a unit arrangement of 1010 as shown in Fig. 10, based on this value of 1000 and the Benes network pattern in table 500 in Fig. 5.
[0040] In conventional technology, it was not possible to confirm, for example, which unit was in the central layer until all units included in all subnets had been written out. In contrast, the identification process according to this embodiment builds a complete binary tree for the number of inputs and outputs of a subnet, making it possible to identify the placement of units in each layer without writing out irrelevant units.
[0041] <Wiring Process> Here, the wiring process executed by the routing device in step S402 of FIG. 4, in which wires of units are routed based on a predetermined wiring rule, will be described.
[0042] FIG. 11 is a diagram illustrating wiring rules for input-side wires according to this embodiment. Input / output wires of each unit are connected to input / output wires in upper and lower layers based on predetermined wiring rules. For example, as shown in FIG. 11 , the output wires of the switch 101 on the input side of net 1101 are numbered 0 to 7, and the input wires of the switches 101 on the input sides of subnets 1102 and 1103 are numbered 0 to 3. In this case, the routing device connects the wth output wire of net 1101 to the w / 2th input wire of the subnetwork 1102 on the left side if w is even, and to the w / 2th input wire (rounded down to the nearest integer) of the subnetwork 1103 on the right side if w is odd. As a result, one output wire of each switch 101 on the input side of net 1101 is connected to the subnetwork 1102 on the left side, and the other is connected to the subnetwork 1103 on the right side.
[0043] FIG. 12 is a diagram illustrating the output-side wiring rules according to this embodiment. As shown in FIG. 12, the output-side wiring rules are vertically symmetrical to the input-side wiring rules described in FIG. 11. For example, as shown in FIG. 12, the input wires of the switch 101 on the output side of the net 1101 are numbered 0 to 7, and the output wires of the switches 101 on the output sides of the subnets 1201 and 1202 are numbered 0 to 3. In this case, the routing device connects the wth output wire of the left-side subnet 1201 to the 2wth input wire of the net 1101, and connects the wth output wire of the right-side subnet 1202 to the 2w+1th input wire of the net 1101. As a result, one input wire of each switch 101 on the output side of the net 1101 is connected to the left-side subnet 1201, and the other input wire is connected to the right-side subnet 1202.
[0044] <Marking Process> Here, the marking process executed by the routing device in step S403 of Fig. 4 will be described. The routing device executes a marking process to mark each wire of each unit as to whether it is connected to an R or L destination (subnet). For example, the routing device marks R on the wire connected to the R-side destination, and L on the wire connected to the L-side destination.
[0045] For example, the routing device marks wires based on the injective π:[m]→[n] (m≦n) without looking at the internal structure. The basic idea is similar to the high-speed routing method of the Benes network in Non-Patent Document 2, etc. However, the generalized Benes network requires preprocessing because it has identities 102 and multiplexers 103.
[0046] The wires of the switch 101 are always (L, R) or (R, L). The wires of the identities 102 are always marked with R. This is because the number of Rs in each layer is never less than the number of Ls, and the switch 101 is marked with the same number of Ls and Rs. The multiplexer 103 marks one of the multiple input wires with R or L. Therefore, it is desirable to start marking from the identities 102 whose marks have been determined.
[0047] (Preprocessing) FIG. 13 is a flowchart showing an example of preprocessing of marking according to this embodiment.
[0048] In step S1301, the routing device marks R on wires i (i is the wire number) of all identities 102 on the output side.
[0049] In step S1302, the routing device also marks R on the input wire π(i) corresponding to the marked output wire i.
[0050] In step S1303, if the switch 101 is connected to the marked input wire π(i), the routing device makes a note of this fact. For example, the routing device records that the switch 101 is connected to the input wire π(i) corresponding to the marked output wire i.
[0051] In step S1304, the routing device marks R on the wire i of all identities 102 on the input side.
[0052] In step S1305, the routing device selects the output wire π corresponding to the marked input wire i. -1 If (i) exists, the output wire π -1 (i) is also marked with R. Note that since π is not necessarily surjective, the input to wire i may be deleted by a multiplexer along the way.
[0053] In step S1306, the routing device selects the marked output wire π -1 If the switch 101 is connected to (i), the routing device makes a note of this. For example, the routing device makes a note of the marked output wire π -1 It is recorded that the switch 101 is connected in (i).
[0054] 13, for example, in the generalized Benes network 100 shown in FIG. 14, if there is an identity 102 on the output side, R is marked on the wire i of the identity 102 on the output side. R is also marked on the input wire π(i) corresponding to wire i. Furthermore, if a switch 101a is connected to the input wire π(i) corresponding to wire i, this fact is recorded.
[0055] (Main Loop) After the preprocessing is complete, the routing device marks unmarked wires in the following procedure.
[0056] (S1) The routing device selects a wire that is connected to the switch 101 that has been processed in the preprocessing and has no mark, and sets this wire as w 0 If there are no wires left that are connected to the switch 101 processed in the preprocessing and that have not been marked, select an unmarked wire on the output side and set this wire to w 0 Let's say.
[0057] (S2) The routing device 0 The adjacent wire of 0 Here, another wire connected to the same switch 101 as the wire is called an adjacent wire. 0 If w is marked, the routing device 0 ni w' 0 and the opposite mark. 0 If w is not marked, the routing device 0 marks whether it is on the R or L side of switch 101. For example, w 0 is on the R side of the switch 101, the routing device0 Mark R on the other hand. 0 is on the L side of the switch 101, the routing device 0 Mark L on the
[0058] By the processes of (S1) and (S2), for example, in FIG. 15, an adjacent wire 1501 of the switch 101a, one of whose wires was marked with R in the preprocessing, is marked with L.
[0059] (S3) w 0 is the i-th output wire, the routing device routes the π(i)-th input wire to w 1 On the other hand, w 0 is the i-th input wire, the routing device -1 (i) The input wire is w 1 Let's say.
[0060] (S4) w 1 If w is already marked, the routing device stops the main loop and returns to (S1). 1 If w is not marked, the routing device 0 The same mark as the mark, w 1 Mark it.
[0061] By the processes of (S3) and (S4), for example, in FIG. 15, the wire 1502 of the switch 101b is 1 and is marked as L.
[0062] (S5) w 1 If w is not connected to the switch 101, the routing device stops the main loop and returns the process to (S1). 1 is connected to the switch 101, the adjacent wire is w' 1 Let w' 1 lol 1 and mark the opposite.
[0063] (S6) w 1 is the i-th output wire, the routing device routes the π(i)-th input wire to w 2 On the other hand, w 1is the i-th input wire, the routing device -1 (i) The input wire is w 2 In addition, the routing device determines whether the 1 Wow 2 and executes the same processes as (S4) and (S5).
[0064] By the processes of (S5) and (S6), for example, in FIG. 16, the adjacent wire 1601 of the switch 101b, one of whose wires is marked with L, is marked with R. Also, the routing device marks the input side wire 1602 corresponding to the adjacent wire 1601 as w 2 Then, the same processes as (S4) and (S5) are executed.
[0065] (Notes on implementation) In (S1), there is a process of selecting wires for which marks have not been determined. This can be implemented either by managing a set of wires or by linear search, and with some ingenuity, linear search has better performance.
[0066] The important point is that the marks never disappear. Therefore, first search for an unmarked wire from the end, and then the next time you search, start from the point you found last time. If you do not do this, the search will take a very long time, so be careful.
[0067] <Moving to an Inner Layer> By executing the processes of steps S401 to S404 in FIG. 4, the setting of the units in the uppermost (outermost) layer of the generalized Benes network is completed.
[0068] The routing device also knows how the wires one layer below the top layer and one layer above the bottom layer connect to the inner layers. Using this information, the routing device converts an injective π into an injective π' that corresponds to the inputs and outputs of the next inner layer.
[0069] 17 is a diagram for explaining movement to an inner layer according to this embodiment. It is assumed that in steps S401 to S404 in FIG. 4, the routing device has set the units of the outermost Layer0 and LayerL using an injection π. Next, the routing device can set the units of Layer1 and LayerL-1 in a similar manner using an injection π' corresponding to the input and output of the next inner layer.
[0070] (Deriving Injective π') The routing device determines the injective π', for example, in the following procedure.
[0071] Consider an injective π: {0, ..., m-1} → {0, ..., n-1} (m ≤ n). (S11) A is added along the wire on layer L-1. 0 = [0, ..., m-1] (A 1 (S12) According to the setting of the unit of layer L-1, 1 Copy (A 2 (S13) Fill the array S3 with n elements with invalid values, and then 3 [π(i)] = A 2 [i] (i=0, . . . m-1). (S14) According to the setting of the unit of layer 0, 3 Copy (A 4 (S15) A along the wire under layer 0 4 Copy (A 5 (S16) For i for which A5[i] is a valid value, π' is determined by π'(A5[i])=i.
[0072] In this way, the routing device performs marking and setting processes in order from the outermost layer among the plurality of layers, thereby setting all the units of the generalized Benes network.
[0073] <Searching process> During routing (for example, in the routing process), for a wire specified by a number in a layer, it becomes necessary to find out the type of unit connected to that wire and the number of that wire among the wires connected to that unit. Once the connected subnet is known, the unit can be identified relatively easily by considering the pattern of the subnet shape, as in the identification process.
[0074] The subnet to which a specified wire is connected can be found by binary search. For binary search, a complete binary tree of the number of inputs and outputs of the intersection of each layer and each subnet is required. Hereafter, this tree will be called the "tree for the number of inputs and outputs of the layer."
[0075] 18 is a diagram illustrating an example of a subnet tree according to this embodiment. This diagram shows an example of a generalized Benes network 1800 at (5,4) and a subnet tree 1810 of the generalized Benes network 1800.
[0076] 19 is a diagram showing an example of a tree for the number of inputs and outputs of a layer according to this embodiment. This diagram shows an example of a tree for the number of inputs and outputs of each layer (Layer 0 to Layer 4) of the generalized Benes network 1800 shown in FIG. 18. In this way, the tree for the number of inputs and outputs of a layer is different from the subnet tree 1810.
[0077] The tree for the number of inputs and outputs of this layer shows the number of input and output wires of units coming out of the common area of the frame 1801 representing the layer of the generalized Benes network 1800 in FIG. 18 and the dashed line 1802 representing the subnet.
[0078] (Construction Method) Here, an example of a method for constructing a tree for the number of inputs and outputs of a layer will be described. Here, it is assumed that a tree for the number of inputs and outputs of layer y (=0, 1, . . . , L) is constructed.
[0079] First, the routing device selects a node (n in , n out ) is converted according to Table 2001 in FIG.
[0080] This table 2001 is created based on the pattern of a generalized Benes network, for example, as shown in Fig. 5. In addition, in table 2001, y≦L / 2 indicates that layer y is on the input side of the subnet.
[0081] Next, the routing device sets the obtained nodes as leaf nodes and creates parent nodes by adding each element, as shown in formula 2002 in Fig. 20. In this way, the routing device can create a tree for the number of inputs and outputs of each layer.
[0082] (Subnet Search) FIG. 21 is a diagram showing an example of a subnet search algorithm according to this embodiment. This search algorithm 2100 is configured to receive as input a layer number x, a wire number w, and a tree Tx for the number of inputs and outputs of the layer, and to output a subnet connected to the input wire with wire number w of layer x and the number of the wire at the left end of the subnet. The routing device uses the created tree for the number of inputs and outputs of each layer and the search algorithm 2100 to search for a subnet connected to the input wire with wire number w of layer x. The routing device can also use a similar method to search for a subnet connected to the output wire with wire number w of layer x.
[0083] In this way, during routing, the routing device can check the type of unit connected to a wire specified by a number in a layer and the number of the wire among the wires connected to that unit.
[0084] <Hardware Configuration> The routing device has, for example, the hardware configuration of a computer 2200 as shown in Fig. 22. Alternatively, the routing device is realized by a plurality of computers 2200.
[0085] 22 is a diagram showing an example of the hardware configuration of a computer 2200. The computer 2200 includes, for example, a processor 2201, a memory 2202, a storage device 2203, a communication device 2204, an input device 2205, an output device 2206, and a bus B.
[0086] The processor 2201 is, for example, an arithmetic unit such as a CPU (Central Processing Unit) that realizes various functions by executing a predetermined program. The memory 2202 is a storage medium readable by the computer 2200, and includes, for example, a RAM (Random Access Memory) and a ROM (Read Only Memory). The storage device 2203 is a computer-readable storage medium, and may include, for example, a HDD (Hard Disk Drive), an SSD (Solid State Drive), various optical disks, and magneto-optical disks.
[0087] The communication device 2204 includes one or more communication devices for communicating with other devices via a communication network, an interface, or the like. The communication device 2204 also includes, for example, an interface for setting up a generalized Benes network. The input device 2205 is an input device (e.g., a keyboard, a mouse, a microphone, a switch, a button, a sensor, etc.) that accepts input from the outside. The output device 2206 is an output device (e.g., a display, a speaker, an LED lamp, etc.) that outputs to the outside.
[0088] The bus B is commonly connected to the above components and transmits, for example, address signals, data signals, and various control signals. The processor 2201 is not limited to a CPU, and may be, for example, a DSP (Digital Signal Processor), a PLD (Programmable Logic Device), or an FPGA (Field Programmable Gate Array).
[0089] <Functional Configuration> Fig. 23 is a diagram showing an example of the functional configuration of a routing device according to this embodiment. The routing device 2300 realizes, for example, each functional configuration shown in Fig. 23 by executing a predetermined program on the computer 2200 included in the routing device 2300.
[0090] 23, the routing device 2300 has various functional components, such as an identifying unit 2301, a wiring unit 2302, a marking unit 2303, a setting unit 2304, a communication unit 2305, an input / output unit 2306, and a storage unit 2307. Note that at least a portion of the above-described functional components may be realized by hardware.
[0091] The identification unit 2301 performs an identification process to identify the placement of a generalized Benes network having three types of units, i.e., a switch, a multiplexer, and an identity, based on the number of inputs and outputs of the generalized Benes network. For example, the identification unit 2301 performs the process of step S401 in FIG. 4 and the identification processes described with reference to FIGS. 5 to 10.
[0092] The wiring unit 2302 executes wiring processing for wiring the above-mentioned units based on a predetermined wiring rule. For example, the wiring unit 2302 executes the processing of step S402 in Fig. 4 and the wiring processing described in Figs. 11 and 12.
[0093] The marking unit 2303 executes a marking process for marking whether each wire of the above-mentioned unit is to be connected to an R or L connection destination. For example, the marking unit 2303 executes the process of step S403 in Fig. 4 and the marking process described in Figs. 13 to 16. The marking process includes, for example, the preprocessing described in Fig. 13. The marking process also includes a search process for searching for a unit connected to a specific wire using a complete binary tree formed by the number of inputs in the common part of each layer and each subnetwork, as described in Figs. 18 to 21.
[0094] The setting unit 2304 executes a setting process for setting the switches and multiplexers of the generalized Benes network based on the marking by the marking unit 2303. For example, the setting unit 2304 executes the process of step S404 in FIG.
[0095] The marking unit 2303 and the setting unit 2304 perform the marking process and the setting process in order from the outermost layer among the multiple layers of the generalized Benes network.
[0096] The communication unit 2305 uses, for example, the communication device 2204 to connect the routing device 2300 to a communication network and executes communication processing for communicating with an external device such as a terminal device or a server.
[0097] The input / output unit 2306 executes input / output processing for inputting and outputting various information, data, etc. using the communication device 2204, the input device 2205, and / or the output device 2206, etc. For example, the input / output unit 2306 may display a UI (User Interface) screen using the output device 2206, etc., and accept user input operations on the UI screen using the input device 2205. Alternatively, the input / output unit 2306 may provide a UI or API (Application Programming Interface) that accepts operations, data, setting information, etc., to an external device that can communicate via the communication unit 2305.
[0098] The storage unit 2307 stores various information, data, and / or programs used by the routing device 2300 .
[0099] 23 is an example of the functional configuration of the routing device 2300. For example, the functional configuration of the routing device 2300 shown in FIG. 23 may be distributed across multiple devices.
[0100] (Supplementary Note) The routing device 2300 in this embodiment is not limited to being realized by a dedicated device, but may also be realized by a general-purpose computer. In this case, a program for realizing this function may be recorded on a computer-readable recording medium, and the program recorded on this recording medium may be read into a computer system and executed. Note that the term "computer system" here includes hardware such as an OS and peripheral devices.
[0101] Furthermore, "computer-readable recording media" includes various storage devices such as portable media such as flexible disks, optical magnetic disks, ROMs, and CD-ROMs, as well as hard disks built into computer systems. Furthermore, "computer-readable recording media" may also include devices that dynamically store programs for a short period of time, such as communication lines when transmitting programs via networks such as the Internet or communication lines such as telephone lines, and devices that store programs for a certain period of time, such as volatile memory within computer systems that serve as servers or clients in such cases.
[0102] Furthermore, the above program may be one that realizes part of the functions described above, or may be one that can realize the functions described above in combination with a program already recorded in a computer system, or may be one that is realized using hardware such as a PLD or FPGA.
[0103] <Effects of the Embodiment> According to the present embodiment, in the generalized Benes network, high-speed routing can be achieved in the same way as in the Benes network.
[0104] Furthermore, in this embodiment, by performing preprocessing, a high-speed algorithm for the Benes network, such as that shown in Non-Patent Document 2, can be easily extended to the generalized Benes network.
[0105] Furthermore, in this embodiment, the marking process and the setting process are executed in order from the outermost layer among the multiple layers of the generalized Benes network, so that, for example, overhead of function calls and memory allocation, etc. is small, and the network can be applied to large-scale networks.
[0106] Summary of Embodiments This specification discloses at least the routing method, routing device, and program described in the following paragraphs: (1) A routing method in a generalized Benes network having three types of units: switches, multiplexers, and identities, wherein a computer executes the following steps: a specification process for specifying the placement of the units based on the number of inputs and outputs of the generalized Benes network; a wiring process for wiring wires of the units based on a predetermined wiring rule; a marking process for marking whether each wire of the unit is connected to an R or L destination; and a setting process for setting the switches and the multiplexers based on the marking. (2) The routing method described in paragraph 1, wherein the generalized Benes network has multiple layers, and the marking process and the setting process are executed in order from the outermost layer of the multiple layers. 3. The routing method according to claim 1 or 2, wherein the marking process includes a preprocessing of: marking a first wire, which is the wire of the identity on the output side of the generalized Benes network, and an input wire corresponding to the first wire, with R; if the switch is connected to the input wire corresponding to the first wire, recording that the switch is connected to the input wire; marking a second wire, which is the wire of the identity on the input side of the generalized Benes network, with R; if there is an output wire corresponding to the second wire, marking the output wire with R; and if the switch is connected to the marked output wire, recording that the switch is connected to the output wire. (4) The routing method according to any of claims 1 to 3, wherein the marking process includes a search process of searching for a unit connected to a specific wire using a complete binary tree formed by the number of inputs in the common part of each layer and each subnet.(5) A routing device comprising: a generalized Benes network having three types of units: switches, multiplexers, and identities; an identifying unit that identifies the placement of the units based on the number of inputs and outputs of the generalized Benes network; a wiring unit that routes wires between the units based on a predetermined wiring rule; a marking unit that marks whether each wire of the units is connected to an R or L connection destination; and a setting unit that sets the switches and the multiplexers based on the marking. (6) A program, or a storage medium that stores a program, that causes a computer to execute the routing method described in any of paragraphs 1 to 4.
[0107] Although the present embodiment has been described above, the present invention is not limited to such a specific embodiment, and various modifications and changes are possible within the scope of the gist of the present invention described in the claims.
[0108] 100 Generalized Benes network 101 Switch 102 Identity 103 Multiplexer 2200 Computer 2300 Routing device 2301 Identification unit 2302 Wiring unit 2303 Marking unit 2304 Setting unit
Claims
1. A routing method in which a computer executes the following steps in a generalized Benes network having three types of units: switches, multiplexers, and identities: a specification process for specifying the placement of the units based on the number of inputs and outputs of the generalized Benes network; a wiring process for wiring the wires of the units based on predetermined wiring rules; a marking process for marking each wire of the units as to whether it is connected to an R or L destination; and a setting process for setting the switches and multiplexers based on the marking.
2. The routing method according to claim 1, wherein the generalized Benes network has a plurality of layers, and the marking process and the setting process are executed in order from the outermost layer among the plurality of layers.
3. The routing method according to claim 1 or 2, wherein the marking process includes preprocessing of marking a first wire, which is the wire of the identity on the output side of the generalized Benes network, and an input wire corresponding to the first wire, with R; if the switch is connected to the input wire corresponding to the first wire, recording that the switch is connected to the input wire; marking a second wire, which is the wire of the identity on the input side of the generalized Benes network, with R; if there is an output wire corresponding to the second wire, marking the output wire with R; and if the switch is connected to the marked output wire, recording that the switch is connected to the output wire.
4. A routing device comprising: a generalized Benes network having three types of units, namely, switches, multiplexers, and identities; an identification unit that identifies the placement of the units based on the number of inputs and outputs of the generalized Benes network; a wiring unit that routes wires between the units based on predetermined wiring rules; a marking unit that marks each wire of the units as to whether it is connected to an R or L destination; and a setting unit that sets the switches and multiplexers based on the markings.