The rollback of router turns to routing algorithm and router used on the bag-circuit switching chip
Technical field
The present invention relates to a kind of on the bag-circuit switching chip router routing algorithm, specifically a kind of on the bag-circuit switching chip rollback of router turn to routing algorithm and router used.
Background technology
Network-on-a-chip (Network on Chip, NoC) (Network Interface, NI), form, as shown in Figure 1 by resource node 11 (Resource), network interface 12 by router one 3 (Router) and link 14 (Channel).
(1) resource node: carry out the node of calculating or store tasks, (IntellectualProperty IP) constitutes by IP core usually.
(2) network interface: refer to the interface between resource node and the switching node, realize that the standard of resource node and network-on-chip inserts; Having only the resource node that has been equipped with network interface just can be connected on the network communicates with other resource nodes.
(3) router: be also referred to as switching node or communication node, constituted the communication node of network-on-chip, the executive communication task.
(4) link: refer between local subsystem and the router node, the line between switching node and the switching node, like the E among Fig. 1, W, N, S and L.
With respect to traditional bus architecture, network-on-chip has advantage at aspects such as extensibility, reusability, design efficiency, bandwidth, for solving chip-on communication and global clock stationary problem strong scheme is provided.In network-on-a-chip, the quality of router design will directly influence the performance of whole network-on-a-chip on the sheet, so particularly important.And routing algorithm is the good and bad key factor of decision router design.According to different network-on-chip topological structure and exchanged forms, adopt different routing algorithms to exert an influence to the network-on-chip communication performance.Simultaneously, along with the increase of integrated circuit scale, router will be present in the network-on-a-chip in a large number on the sheet, therefore need select when designing on the sheet router hardware resource consumption few, realize the low routing algorithm of cost.At present, using comparatively widely, routing algorithm has static XY routing algorithm, dynamic XY routing algorithm (Dy_XY) etc.
Go up router based on-Circuit-switched of bag, the foundation of link is accomplished through sending request package, and circuit form is then adopted in the transmission of data.In bag-circuit switching, the routing delay when setting up link is relevant with network condition; After the link establishment, transfer of data does not just rely on network condition, and the transfer of data time-delay is little and measurable, and this makes, and bag-circuit switching can be satisfied in a large number, the hard real-time requirement of continuous data transmission.Passage only need be stored a packet in each input of router on the bag-circuit switching chip (or output), so its area is less.
There is network congestion in traditional static XY routing algorithm with dynamic XY routing algorithm, the inefficient problem of network service, and routing algorithm is realized complicated, can not satisfy on the high-performance sheet router to the requirement of communication performance.
Summary of the invention
In order to overcome the problem that traditional routing algorithm exists; The purpose of this invention is to provide a kind of on the bag-circuit switching chip rollback of router turn to routing algorithm and router used, this routing algorithm and router used realization cost is low, performance is high can avoid network-on-chip congested; The maximization network communication efficiency; Effectively improve average throughput and mean packet delay, reduce the routing algorithm implementation complexity, satisfied on the high-performance sheet router the requirement of communication performance.
The object of the invention is realized through following technical scheme:
A kind of on the bag-circuit switching chip rollback of router turn to routing algorithm; It is characterized in that this routing algorithm is an adaptive routing algorithm, carry out route arbitration, dynamically change routed path according to the situation that takies of link circuit resource according to the network-on-chip congestion situation; Record satisfies the output port of route conditions; Reselect output port after congested running into, realize the rollback route, avoid congested; Concrete steps are following:
1) if the output port of directions X and Y direction satisfies route conditions simultaneously and have at least a direction not occupied, stores this two output slogans so; If have only an output port in directions X or the Y direction to satisfy route conditions and not occupied, so only store this output slogan; If do not have output port to satisfy route conditions and not occupied simultaneously, do not store any output slogan so;
2) satisfy route conditions and link when not occupied, selecting the downward level-1 router of link of directions X to transmit routing information request earlier; If the next stage router of directions X feedback routing failure signal or directions X do not satisfy route conditions, then, select another next stage router of chain road direction of Y direction to transmit routing information request satisfying route conditions and link when not occupied; If the next stage router of Y direction feeds back the routing failure signal again, then upwards level-1 router feeds back the routing failure signal.
Routing algorithm of the present invention adopts the dynamic routing mode, carries out the route arbitration according to the situation that takies of link circuit resource, not to the 180 degree directions route of turning back, and not to the direction route away from destination node, does not cause deadlock or livelock problem.
A kind of on the bag-circuit switching chip rollback of router turn to routing algorithm router used, it is characterized in that: this router comprises input state machine, priority encoder, address decoder, moderator and the output state machine that connects successively;
The input state machine receives the route requests signal of upper level router, controls the operating state of input channel, and sends the request signal that receives to priority encoder; During routing failure, transmit the routing failure signal;
Priority encoder is encoded to request signal according to the priority orders of setting, and selects the input port of priority treatment;
Address decoder is the output of route direction signal according to the request signal in the input port of priority treatment with the destination node address signal transition;
The decoded result of moderator receiver address decoder; The situation that takies according to link; Not occupied output slogan in the storage decoded result according to the priority orders of Y direction behind the first directions X, selects one of them port to carry out route simultaneously; I/O mouth and output port interconnect signal, the record link takies situation; Not having can be selecteed during output port, sends the routing failure signal through the input state machine level-1 router that makes progress; When receiving the routing failure signal of next stage router,, reselect output port, up to selecting suitable path to arrive destination node according to other the possible output slogans and the link occupied information of storage through output state machine;
Output state machine receives the input port and the output port interconnect signal of moderator, and level-1 router transmits the route requests signal downwards, the operating state of control output channel, and, send moderator to the routing failure signal that receives.
Rollback turns to output slogan storage area possible in the routing algorithm to be described below:
Input: satisfy the possible output slogan information (req_in) of route conditions behind the address decoder, with the input slogan (in_flag) of the corresponding priority treatment of routing iinformation, the Seize ACK message of each output port (occupied).
Output: can selecteed output slogan Dest.
1:for i=1to port total number do
2:{3 is capable: judge whether not occupied port is arranged in the possible output port }
3:if?req_in[i]|!occupied[i]then
4:{5-9 is capable: exist when not only satisfying route conditions but also not occupied port, store possible output slogan }
5:forj=1to port total number do
6:ifreq_in[j]then
7:Dest[j][in_flag]←1
8:else
9:Dest[j][in_flag]←0
10:else
11:continue
12:return?Dest
Rollback turns to that the rollback routing section is described below in the routing algorithm:
Input: downstream router node routing failure (fail) signal, the corresponding relation Conn of input port and output port can selecteed output slogan Dest.
Output: the output slogan that each input port of new_out_flag queue record is reselected.
1:{2-4 is capable: variable declarations, initialization }
2:in_flag record input slogan
3:out_flag record output slogan
4:new_out_flag←0
5:{6-10 is capable: judge whether the downstream router node returns effective fail signal }
6:for i=1to port total number do
7:iffail[i]==1then
8:out_flag←i
9:else
10:continue
11:{12-16 is capable: find out the corresponding input end slogan }
12:forj=1to port total number do
13:ifConn[out_flag][j]==1then
14:in_flag←j
15:else
16:continue
17:{18-22 is capable: can selecteed output slogan Dest signal, reselect output port }
18:for k=1to port total number do
19:if?Dest[k][in_flag]==1and?k!=out_flag?then
20:new_out_flag[in_flag]←k
21:else
22:continue
23:return?new_out_flag
Routing algorithm according to the invention and the router used situation that takies according to link circuit resource are carried out the route arbitration, not to the 180 degree directions route of turning back, and not to the direction route away from destination node, do not cause deadlock or livelock problem.
Compared with prior art, the present invention realizes that cost is low, performance is high, can avoid network-on-chip congested; The maximization network communication efficiency; Effectively improve average throughput and mean packet delay, reduce the routing algorithm implementation complexity, satisfied on the high-performance sheet router the requirement of communication performance; Compare with dynamic XY routing algorithm; Rollback disclosed by the invention turns to routing algorithm can make the average throughput of network-on-chip and mean packet delay maximum improve 26.7% and 11.6% respectively, and advantage has covered whole loading condition, and hardware resource consumption only increases by 8.5%.The present invention is applicable to and realizes high performance network-on-a-chip.
Description of drawings
Fig. 1 is the network-on-a-chip structural representation;
Fig. 2 is the structural representation of router according to the invention;
Fig. 3 adopts router port sketch map of the present invention;
Fig. 4 adopts router path sketch map of the present invention;
Fig. 5 adopts router address decoding principle schematic of the present invention;
Fig. 6 is an implementation structure sketch map of the present invention;
Fig. 7 adopts 4 * 4 two-dimensional grid network-on-a-chip hardware configuration sketch mapes of the present invention;
Fig. 8 adopts router of the present invention and the router that adopts dynamic XY routing algorithm to realize that average throughput compares sketch map as a result;
Fig. 9 adopts router of the present invention and the router that adopts dynamic XY routing algorithm to realize that the mean packet delay is compared sketch map as a result;
Figure 10 adopts router of the present invention and the router that adopts dynamic XY routing algorithm to realize relatively sketch map of synthesis result;
Embodiment
A kind of on the bag-circuit switching chip rollback of router turn to routing algorithm; This routing algorithm is an adaptive routing algorithm, carries out route arbitration according to the network-on-chip congestion situation, dynamically changes routed path according to the situation that takies of link circuit resource; Record satisfies the output port of route conditions; Reselect output port after congested running into, realize the rollback route, avoid congested; Concrete steps are following:
1) if the output port of directions X and Y direction satisfies route conditions simultaneously and have at least a direction not occupied, stores this two output slogans so; If have only an output port in directions X or the Y direction to satisfy route conditions and not occupied, so only store this output slogan; If do not have output port to satisfy route conditions and not occupied simultaneously, do not store any output slogan so;
2) satisfy route conditions and link when not occupied, selecting the downward level-1 router of link of directions X to transmit routing information request earlier; If the next stage router of directions X feedback routing failure signal or directions X do not satisfy route conditions, then, select another next stage router of chain road direction of Y direction to transmit routing information request satisfying route conditions and link when not occupied; If the next stage router of Y direction feeds back the routing failure signal again, then upwards level-1 router feeds back the routing failure signal.
Routing algorithm adopts the dynamic routing mode, carries out the route arbitration according to the situation that takies of link circuit resource, not to the 180 degree directions route of turning back, and not to the direction route away from destination node, does not cause deadlock or livelock problem.
A kind of on the bag-circuit switching chip rollback of router turn to routing algorithm router used, see Fig. 2, this router comprises input state machine 1, priority encoder 2, address decoder 3, moderator 4 and the output state machine 5 that connects successively.
Each router node has five bidirectional ports: north (North), east (East), south (South), west (West) and this locality (Local).Each port has the input and output passage, and its port sketch map is as shown in Figure 3.Local port is responsible for communicating by letter of router node and local subsystem, and other port is responsible for communicating by letter of router node and neighbour's router node.Fig. 4 adopts router path sketch map of the present invention; Fig. 5 adopts router address decoding principle schematic of the present invention.
Input state machine 1 (Input_fsm) receives the route requests signal of upper level router, controls the operating state of input channel, and sends the request signal that receives to priority encoder; During routing failure, transmit the routing failure signal.
Priority encoder 2 (Priority_encoder) is encoded to request signal according to the priority orders of setting, and selects the input port of priority treatment.
Address decoder 3 (Decoder) is the output of route direction signal according to the request signal in the input port of priority treatment with the destination node address signal transition.
The decoded result of moderator 4 (Arbiter) receiver address decoder; The situation that takies according to link; Not occupied output slogan in the storage decoded result simultaneously according to certain priority orders, selects one of them port to carry out route; I/O mouth and output port interconnect signal, the record link takies situation; Not having can be selecteed during output port, sends the routing failure signal through the input state machine level-1 router that makes progress; When receiving the routing failure signal of next stage router,, reselect output port, up to selecting suitable path to arrive destination node according to other the possible output slogans and the link occupied information of storage through output state machine.
Output state machine 5 (Output_fsm) receives the input port and the output port interconnect signal of moderator, and level-1 router transmits the route requests signal downwards, the operating state of control output channel, and, send moderator to the routing failure signal that receives.
Through the interconnect signal of moderator output, after the correct interconnection between realization input, the output port, get into data transfer phase, the data-signal of input port directly passes to next node through data path, and without the control access.When destination node discharged link, the annexation of respective input mouth and output port was cancelled in the data path.
When turning to routing algorithm on sheet, to realize in the router, rollback forms: rollback arbitration modules, passage logging modle, link block and passage enable module by four parts.Structure is as shown in Figure 6.The rollback arbitration modules is carried out routing policy, receives the routing failure signal fail [i] of downstream router node feedback; Satisfy possible output slogan req_in [i] signal of route conditions after the passage logging modle receiver address decoding, combine output channel to take situation and write down these possible output channels number; Link block produces input port and is connected signal link [i] with output port; The passage enable module produces output port Seize ACK message occupied [i].
This enforcement use-case adopts rollback to turn to the router node of routing algorithm to constitute 4 * 4 two-dimensional grid network-on-a-chips, and its hardware configuration sketch map is as shown in Figure 7, and wherein, R is that router, LS are that local subsystem, IP are that IP kernel, NI are network interface.This network-on-a-chip turns to router on the routing algorithm sheet, link and local subsystem to form by rollback.Rollback turns to that router is the server parts on the routing algorithm sheet; Local subsystem comprises a data generator and a data receiver, is respectively applied for to send data and receive data.The function of this enforcement use-case is that local subsystem transmits and receive data through network-on-a-chip.
This enforcement use-case system configuration is following: rollback turns to routing algorithm, bag-circuit exchange mode, and data slice (flit) width is 34, packet length is 50 data pieces.The time of the each dry run of system is 25,000 clock cycle.Experimental result shows that compare with dynamic XY routing algorithm, rollback turns to routing algorithm all to be greatly improved at average throughput with on the mean packet delay, and shown in Fig. 8 and 9, maximum improvement degree can reach 26.7% and 11.6% respectively.Simultaneously, under the various network loading condition, rollback turns to routing algorithm all to be superior to dynamic XY routing algorithm.Simultaneously, under ISE 10.1.3 environment, this system is carried out comprehensively.The model of FPGA is Virtex 5, and the device model is XC5VLX330T.Synthesis result shows that compare with dynamic XY routing algorithm, rollback turns to routing algorithm look-up table (logical block) that a little increase (8.5%) is arranged, and the register cell consumption much at one.Thus it is clear that, realize that rollback turns to routing algorithm to realize that cost is low, shown in figure 10.
For different application, only need this local subsystem of implementing use-case be replaced to processing unit or memory cell, thereby can support concrete application.Simultaneously, rollback turns to the routing algorithm can the maximization network communication efficiency, and complexity is low, can be used for realizing router on high-throughput, low cost, the low sheet that postpones, and is applicable to and realizes high performance network-on-a-chip.