CN106953800A - An adaptive vertical routing method and routing unit based on a network on chip - Google Patents
An adaptive vertical routing method and routing unit based on a network on chip Download PDFInfo
- Publication number
- CN106953800A CN106953800A CN201710265270.9A CN201710265270A CN106953800A CN 106953800 A CN106953800 A CN 106953800A CN 201710265270 A CN201710265270 A CN 201710265270A CN 106953800 A CN106953800 A CN 106953800A
- Authority
- CN
- China
- Prior art keywords
- node
- transmission
- coordinate position
- coordinate
- destination node
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 48
- 230000003044 adaptive effect Effects 0.000 title description 14
- 230000005540 biological transmission Effects 0.000 claims abstract description 243
- 230000006978 adaptation Effects 0.000 claims abstract 7
- 235000013399 edible fruits Nutrition 0.000 claims 1
- 238000004364 calculation method Methods 0.000 description 42
- 238000012546 transfer Methods 0.000 description 16
- 230000005570 vertical transmission Effects 0.000 description 14
- 230000005571 horizontal transmission Effects 0.000 description 13
- 230000017525 heat dissipation Effects 0.000 description 12
- 238000010586 diagram Methods 0.000 description 8
- 239000002699 waste material Substances 0.000 description 4
- 238000013021 overheating Methods 0.000 description 3
- 238000004904 shortening Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 230000002427 irreversible effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
- H04L45/04—Interdomain routing, e.g. hierarchical routing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/02—Topology update or discovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/12—Shortest path evaluation
- H04L45/122—Shortest path evaluation by minimising distances, e.g. by selecting a route with minimum of number of hops
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/10—Packet switching elements characterised by the switching fabric construction
- H04L49/109—Integrated on microchip, e.g. switch-on-chip
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明涉及微处理器片上网络传输技术领域,尤其涉及一种基于片上网络的自适应垂直路由方法及路由单元。The invention relates to the technical field of microprocessor on-chip network transmission, in particular to an adaptive vertical routing method and a routing unit based on an on-chip network.
背景技术Background technique
随着现代科技的发展,片上网络的结构逐渐成为超大规模集成电路设计的热门结构,但这种结构在增加性能的同时也产生了大量温度问题,包括为了提高传输效率减小了全局互连线的长度,以及以更低的功耗提供了更大的带宽、互连线的缩短和流量的增加加快了热量的产生等;同时,由于面积和时序的约束问题,众核的排列变得更加紧密,块堆叠使得散热更加困难,同时3D-NoC结构使得不同核的热消散路径也不相同,一般的设计中是将散热层置于最底层,因此底层的散热相对较好,而顶层的散热最为困难。With the development of modern technology, the network-on-chip structure has gradually become a popular structure for VLSI design, but this structure also produces a large number of temperature problems while increasing performance, including reducing the global interconnection line in order to improve transmission efficiency. The length, and the lower power consumption provides greater bandwidth, the shortening of interconnect lines and the increase of traffic speed up the generation of heat, etc.; at the same time, due to the constraints of area and timing, the arrangement of many cores has become more Tight, block stacking makes heat dissipation more difficult. At the same time, the 3D-NoC structure makes the heat dissipation paths of different cores different. In general design, the heat dissipation layer is placed at the bottom, so the heat dissipation of the bottom layer is relatively good, and the heat dissipation of the top layer is relatively good. most difficult.
温度的增加会进一步加大芯片的功耗,进而又增加温度,造成恶性循环影响整体的性能,当温度到达一定程度后甚至会造成芯片不可逆的损坏,因此需要对温度进行控制。温控的方法除了基本的动态温度管理外还可以采用各种路由算法,常规的路由算法主要是降低温度增长速度或让整体的温度趋于平衡,便于使用各种动态温度管理措施。目前的路由方法主要分为维序路由和自适应路由两种,其中维序路由使用最为频繁、广泛,该类路由结构简单,并且不存在死锁的可能,但是减少了路由的多样性,同时在发生拥塞或过热的情况时很难进行规避,因此会造成局部的拥塞或热点及路径延迟的增加;自适应路由可以根据不同的参数选择不同的路径,绕过拥塞或过热的区域,增加路径的多样性,使整体的温度趋于平衡,减少拥塞并增大吞吐率,但是路径的计算比较复杂,且存在增加局部路径长度及造成死锁的情况。The increase in temperature will further increase the power consumption of the chip, and then increase the temperature, causing a vicious cycle that affects the overall performance. When the temperature reaches a certain level, it may even cause irreversible damage to the chip. Therefore, it is necessary to control the temperature. In addition to the basic dynamic temperature management, the temperature control method can also use various routing algorithms. The conventional routing algorithm is mainly to reduce the temperature growth rate or make the overall temperature tend to balance, which is convenient for using various dynamic temperature management measures. The current routing methods are mainly divided into two types: dimension-order routing and adaptive routing. Among them, dimension-order routing is the most frequently and widely used. This type of routing has a simple structure and no possibility of deadlock, but it reduces the diversity of routing. It is difficult to avoid when congestion or overheating occurs, so it will cause local congestion or hot spots and increase path delay; adaptive routing can select different paths according to different parameters, bypass congested or overheating areas, and increase paths The diversity makes the overall temperature tend to be balanced, reduces congestion and increases throughput, but the calculation of the path is more complicated, and there is a situation of increasing the length of the local path and causing deadlock.
针对于路由方式目前主要分为整体路由和水平路由两种情况,整体路由是在垂直方向上使用和水平方向上同样的路由方法,即对东南西北上下六个方向的选择是基于同样的路由算法,这种情况会造成在垂直方向上很大的资源浪费,由于散热层在整个3D架构的最底层,考虑到散热问题,一般垂直堆叠的层数为3~5层,而水平网络却要大的多,因此垂直方向可以采用简单的方法进行层数的选择以减小计算复杂度与资源的浪费,而在水平方向上采用复杂的自适应路由以增大吞吐量及路径的多样性。有从业者提出在底层完成大部分水平传输以降低温度,但同时会增加拥塞且增大路径长度。At present, the routing methods are mainly divided into two situations: overall routing and horizontal routing. The overall routing uses the same routing method in the vertical direction as in the horizontal direction, that is, the selection of the six directions of east, west, north, up, and down is based on the same routing algorithm. , this situation will cause a great waste of resources in the vertical direction. Since the heat dissipation layer is at the bottom of the entire 3D architecture, considering the heat dissipation problem, the number of layers stacked vertically is generally 3 to 5 layers, while the horizontal network is larger. Therefore, in the vertical direction, a simple method can be used to select the number of layers to reduce the computational complexity and waste of resources, while in the horizontal direction, complex adaptive routing can be used to increase throughput and path diversity. Some practitioners propose to complete most of the horizontal transmission at the bottom layer to reduce the temperature, but at the same time it will increase the congestion and increase the path length.
目前片上网络传输中,通常是采用在达到拥塞前将所有的传输在底层进行固定的先水平再垂直或先垂直再水平传输的维序路由方式,使得过多在底层传输导致拥塞,且过多垂直传输导致延迟增大,如源节点和目的节点均在顶层时,采用上述路由方式向下路由,则增加了大量冗余的垂直方向的传输,使传输路径长度大大增加,既增加了延迟又增加了底部的负担;又如源节点在低层、目的节点在顶层,采用上述路由方式先垂直再水平传输,则会出现在顶层传输,使得顶层散热路径长,导致温度过高的问题。At present, in network-on-chip transmission, it is usually used to fix all the transmissions on the bottom layer before reaching congestion. Vertical transmission leads to increased delay. For example, when both the source node and the destination node are at the top layer, if the above routing method is used to route downwards, a large number of redundant vertical transmissions will be added, which will greatly increase the length of the transmission path, which not only increases the delay but also increases the delay. The burden on the bottom is increased; if the source node is on the lower layer and the destination node is on the top layer, if the above routing method is used to transmit vertically and then horizontally, the transmission will occur on the top layer, which will make the heat dissipation path of the top layer long and cause the problem of overheating.
发明内容Contents of the invention
本发明要解决的技术问题就在于:针对现有技术存在的技术问题,本发明提供一种具有实现方法简单、传输时间少、能够避免传输拥塞,同时实现温度控制、传输灵活的基于片上网络的自适应垂直路由方法,以及结构简单、面积和功耗小、路由传输高效且能够实现温度控制的路由单元。The technical problem to be solved by the present invention is: aiming at the technical problems existing in the prior art, the present invention provides an on-chip network-based network-on-chip device with simple implementation method, less transmission time, avoiding transmission congestion, and simultaneously realizing temperature control and flexible transmission. An adaptive vertical routing method, and a routing unit with simple structure, small area and power consumption, high routing transmission efficiency and temperature control.
为解决上述技术问题,本发明提出的技术方案为:In order to solve the problems of the technologies described above, the technical solution proposed by the present invention is:
一种基于片上网络的自适应垂直路由方法,所述路由方法包括当从源节点传输数据至目的节点时,每次根据传输数据的当前节点坐标位置、目的节点坐标位置之间的关系确定下一个传输节点的方向,使得当源节点在目的节点的上层位置时,从源节点先按垂直方向传输再按水平方向传输至目的节点,以及当源节点在目的节点的下层位置时,从源节点先按水平方向传输再按垂直方向传输至目的节点,以及当源节点与目的节点处于同层时,从源节点直接按水平方向传输至目的节点。An adaptive vertical routing method based on a network on chip, the routing method includes when transmitting data from a source node to a destination node, each time according to the relationship between the current node coordinate position of the transmitted data and the destination node coordinate position, the next The direction of the transmission node is such that when the source node is at the upper layer of the destination node, the source node is transmitted vertically and then horizontally to the destination node, and when the source node is at the lower layer of the destination node, the source node is first transmitted It is transmitted in the horizontal direction and then transmitted to the destination node in the vertical direction, and when the source node and the destination node are in the same layer, it is directly transmitted from the source node to the destination node in the horizontal direction.
作为本发明方法的进一步改进:所述当源节点在目的节点的上层位置时,具体使得从源节点位置按垂直方向传输至目的节点所在层,再在目的节点所在层按水平方向传输至目的节点;所述当源节点在目的节点的下层位置时,具体使得在源节点所在层从源节点位置按水平方向传输至目的节点所在列,在目的节点所在列按垂直方向传输至目的节点。As a further improvement of the method of the present invention: when the source node is at the upper layer position of the destination node, it is specifically transmitted from the source node position to the layer where the destination node is located in the vertical direction, and then transmitted to the destination node in the horizontal direction at the layer where the destination node is located ; When the source node is at the lower layer of the destination node, it is specifically made to transmit horizontally from the source node position to the column where the destination node is located at the layer where the source node is located, and transmit to the destination node vertically at the column where the destination node is located.
作为本发明方法的进一步改进:每次所述确定下一个传输节点的方向的具体步骤为:As a further improvement of the method of the present invention: each time the specific steps for determining the direction of the next transmission node are:
S1.判断当前节点坐标位置的Z坐标是否小于目的节点坐标位置的Z坐标,如果是,取当前传输节点所在层的向下一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标加1以进行更新;如果不是,转入执行步骤S2;S1. Determine whether the Z coordinate of the current node coordinate position is smaller than the Z coordinate of the destination node coordinate position, if so, take the direction of the next layer where the current transmission node is located as the direction of the next transmission node, and set the Z coordinate of the current node coordinate position Add 1 to the coordinates to update; if not, go to step S2;
S2.判断当前节点坐标位置的X、Y坐标是否等于目的节点坐标位置的X、Y坐标,如果不是,在当前层根据当前节点坐标位置、目的节点坐标位置之间X、Y坐标大小关系确定下一个传输节点的方向,并更新当前节点坐标位置;如果是,转入执行步骤S3;S2. Determine whether the X and Y coordinates of the current node coordinate position are equal to the X and Y coordinates of the destination node coordinate position, if not, determine the X and Y coordinate size relationship between the current node coordinate position and the destination node coordinate position in the current layer The direction of a transmission node, and update the current node coordinate position; if yes, go to step S3;
S3.比较当前节点坐标位置与目的节点坐标位置之间Z坐标的大小,如果大于,取当前传输节点所在层的向上一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标减1以进行更新;如果相等则退出,完成路由过程。S3. Compare the size of the Z coordinate between the current node coordinate position and the destination node coordinate position. If it is larger, take the direction of the upper layer of the layer where the current transmission node is located as the direction of the next transmission node, and subtract the Z coordinate of the current node coordinate position from 1 to update; exit if equal, completing the routing process.
作为本发明方法的进一步改进,所述步骤S2的具体步骤为:As a further improvement of the method of the present invention, the specific steps of the step S2 are:
S21.判断当前节点坐标位置的X坐标是否小于目的节点坐标位置之间X坐标,如果是,取当前传输节点所在层的向东方向作为下一个传输节点方向,将当前节点坐标位置的X坐标加1以进行更新;否则转入执行步骤S22;S21. Determine whether the X coordinate of the current node coordinate position is smaller than the X coordinate between the destination node coordinate positions, if so, take the east direction of the layer where the current transmission node is located as the direction of the next transmission node, and add the X coordinate of the current node coordinate position to 1 to update; otherwise, proceed to step S22;
S22.比较当前节点坐标位置与目的节点坐标位置之间Y坐标的大小,如果小于,取当前传输节点所在层的向南方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标加1以进行更新;如果大于,取当前传输节点所在层的向北方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标减1以进行更新;如果相等,转入执行步骤S23;S22. Compare the size of the Y coordinate between the current node coordinate position and the destination node coordinate position. If it is smaller, take the southward direction of the layer where the current transmission node is located as the direction of the next transmission node, and add 1 to the Y coordinate of the current node coordinate position to update; if greater, take the northward direction of the layer where the current transmission node is located as the direction of the next transmission node, and subtract 1 from the Y coordinate of the current node coordinate position to update; if equal, proceed to step S23;
S23.比较当前节点坐标位置与目的节点坐标位置之间X坐标的大小,如果大于,取当前传输节点所在层的向西方向作为下一个传输节点的方向,将当前节点坐标位置的X坐标减1以进行更新;如果相等,转入执行步骤S3。S23. Compare the size of the X coordinate between the current node coordinate position and the target node coordinate position. If it is greater, take the westward direction of the layer where the current transmission node is located as the direction of the next transmission node, and subtract 1 from the X coordinate of the current node coordinate position to update; if they are equal, go to step S3.
本发明进一步公开一种用于实现上述基于片上网络的自适应垂直路由方法的路由单元,片上网络中每个节点配置有所述路由单元进行数据传输,所述路由单元包括相互连接的输入输出接口单元、输入输出选择单元以及用于确定下一个传输节点方向的方向计算单元,片上网络中各个方向的所述路由单元通过所述输入输出接口单元连接;The present invention further discloses a routing unit for implementing the above-mentioned self-adaptive vertical routing method based on the network-on-chip. Each node in the network-on-chip is configured with the routing unit for data transmission, and the routing unit includes input and output interfaces connected to each other. unit, an input and output selection unit, and a direction calculation unit for determining the direction of the next transmission node, and the routing units in each direction in the on-chip network are connected through the input and output interface unit;
所述输入输出接口单元接收各传输方向的传输请求、传输数据以及所传输数据的当前节点坐标位置、目的节点坐标位置,所述输入输出选择单元根据接收到的所述传输请求,从所述输入输出接口单元中对应输入接口接入目标传输数据、所述目标传输数据对应的当前节点坐标位置及目的节点坐标位置,经过所述方向计算单元确定得到下一个传输节点的方向,通过所述输入输出接口单元中对应输出接口输出目标传输请求、目标传输数据以及对应的当前节点坐标位置、目的节点坐标位置。The input and output interface unit receives the transmission request of each transmission direction, the transmission data, the current node coordinate position and the destination node coordinate position of the transmitted data, and the input and output selection unit selects from the input The corresponding input interface in the output interface unit accesses the target transmission data, the current node coordinate position corresponding to the target transmission data, and the destination node coordinate position, and the direction of the next transmission node is determined by the direction calculation unit, and the input and output The corresponding output interface in the interface unit outputs the target transmission request, the target transmission data and the corresponding current node coordinate position and destination node coordinate position.
作为本发明路由单元的进一步改进:所述输入输出接口单元包括输入接口、输出接口,所述输入接口包括传输请求输入接口、传输数据输入接口,以及对应各传输方向的当前节点坐标位置输入接口、目标节点坐标位置输入接口,所述输出接口包括传输请求输出接口、传输数据输出接口,以及对应各传输方向的当前节点坐标位置输出接口、目标节点坐标位置输出接口;所述传输方向包括本层向北方向、本层向南方向、本层向西方向、本层向东方向、向上层方向以及向下层方向。As a further improvement of the routing unit of the present invention: the input and output interface unit includes an input interface and an output interface, and the input interface includes a transmission request input interface, a transmission data input interface, and a current node coordinate position input interface corresponding to each transmission direction, The target node coordinate position input interface, the output interface includes a transmission request output interface, a transmission data output interface, and a current node coordinate position output interface corresponding to each transmission direction, and a target node coordinate position output interface; the transmission direction includes this layer to North direction, south direction of this floor, west direction of this floor, east direction of this floor, upward direction and downward direction.
作为本发明路由单元的进一步改进:所述输入输出选择单元包括输入选择模块、输出选择模块,所述输入选择模块输入各个传输方向的传输请求、传输数据以及通过各所述输入接口接入的各组当前节点坐标位置、目的节点坐标位置,输出对应所述传输请求中传输方向有效的一组当前节点坐标位置、目的节点坐标位置,所述传输请求由对应各个传输方向的传输请求是否有效的标识构成;所述输出选择模块接入所述方向计算单元输出的下一个传输节点的方向、更新后当前节点坐标位置,输出目标传输请求、目标传输数据、更新后当前节点坐标位置以及目的节点坐标位置至对应输出接口。As a further improvement of the routing unit of the present invention: the input and output selection unit includes an input selection module and an output selection module. Set the coordinate position of the current node and the coordinate position of the destination node, and output a set of coordinate positions of the current node and the coordinate position of the destination node corresponding to the valid transmission direction in the transmission request, and the transmission request is identified by whether the transmission request corresponding to each transmission direction is valid Composition; the output selection module accesses the direction of the next transmission node output by the direction calculation unit, the updated current node coordinate position, and outputs the target transmission request, target transmission data, updated current node coordinate position and destination node coordinate position to the corresponding output interface.
作为本发明路由单元的进一步改进,所述方向计算单元包括:As a further improvement of the routing unit of the present invention, the direction calculation unit includes:
第一计算单元,用于判断当前节点坐标位置的Z坐标是否小于目的节点坐标位置的Z坐标,如果是,取当前传输节点所在层的向下一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标加1以进行更新;如果不是,转入执行第二计算单元;The first calculation unit is used to judge whether the Z coordinate of the current node coordinate position is smaller than the Z coordinate of the destination node coordinate position, if so, take the direction of the next layer of the layer where the current transmission node is located as the direction of the next transmission node, and use the current Add 1 to the Z coordinate of the node coordinate position to update; if not, transfer to the second calculation unit;
第二计算单元,用于判断当前节点坐标位置的X、Y坐标是否等于目的节点坐标位置的X、Y坐标,如果不是,在当前层根据当前节点坐标位置、目的节点坐标位置之间X、Y坐标大小关系确定下一个传输节点的方向,并更新当前节点坐标位置;如果是,转入执行第三计算单元;The second calculation unit is used to judge whether the X and Y coordinates of the current node coordinate position are equal to the X and Y coordinates of the destination node coordinate position, if not, according to the X and Y between the current node coordinate position and the destination node coordinate position in the current layer The coordinate size relationship determines the direction of the next transmission node, and updates the current node coordinate position; if yes, transfer to the third calculation unit;
第三计算单元,用于比较当前节点坐标位置与目的节点坐标位置之间Z坐标的大小,如果大于,取当前传输节点所在层的向上一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标减1以进行更新;如果相等则退出,完成路由传输过程。The third calculation unit is used to compare the size of the Z coordinate between the current node coordinate position and the destination node coordinate position. If it is greater than that, take the upward direction of the layer where the current transmission node is located as the direction of the next transmission node, and convert the current node coordinates Subtract 1 from the Z coordinate of the location to update; if they are equal, exit and complete the route transfer process.
作为本发明路由单元的进一步改进,所述第二计算单元具体包括:As a further improvement of the routing unit of the present invention, the second computing unit specifically includes:
第一X方向计算单元,用于判断当前节点坐标位置的X坐标是否小于目的节点坐标位置之间X坐标,如果是,取当前传输节点所在层的向东方向作为下一个传输节点方向,将当前节点坐标位置的X坐标加1以进行更新;否则转入执行Y方向计算单元;The first X direction calculation unit is used to judge whether the X coordinate of the current node coordinate position is smaller than the X coordinate between the destination node coordinate positions, if so, take the east direction of the layer where the current transmission node is located as the direction of the next transmission node, and use the current Add 1 to the X coordinate of the node coordinate position to update; otherwise, transfer to the Y direction calculation unit;
Y方向计算单元,用于比较当前节点坐标位置与目的节点坐标位置之间Y坐标的大小,如果小于,取当前传输节点所在层的向南方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标加1以进行更新;如果大于,取当前传输节点所在层的向北方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标减1以进行更新;如果相等,转入执行第二X方向计算单元;The Y direction calculation unit is used to compare the size of the Y coordinate between the current node coordinate position and the destination node coordinate position. If it is smaller, take the southward direction of the layer where the current transmission node is located as the direction of the next transmission node, and set the current node coordinate position Add 1 to the Y coordinate of the current node to update; if it is larger, take the northward direction of the layer where the current transmission node is located as the direction of the next transmission node, and subtract 1 from the Y coordinate of the current node coordinate position to update; if they are equal, go to execution a second X-direction computing unit;
第二X方向计算单元,比较当前节点坐标位置与目的节点坐标位置之间X坐标的大小,如果大于,取当前传输节点所在层的向西方向作为下一个传输节点的方向,将当前节点坐标位置的X坐标减1以进行更新;如果相等,转入执行所述第三计算单元。The second X direction calculation unit compares the size of the X coordinate between the current node coordinate position and the destination node coordinate position. If it is greater than that, take the westward direction of the layer where the current transmission node is located as the direction of the next transmission node, and set the current node coordinate position Subtract 1 from the X coordinate of X to update; if they are equal, transfer to execute the third calculation unit.
与现有技术相比,本发明基于片上网络的自适应垂直路由方法的优点在于:Compared with the prior art, the present invention has the advantages of the adaptive vertical routing method based on the network on chip:
1)本发明基于片上网络的自适应垂直路由方法,综合考虑靠近散热层和减小传输路径长度问题,通过比较当前节点坐标位置、目的节点坐标位置之间的关系来进行传输,同层节点间的传输时直接水平传输,无需先垂直传输;由上垂直的传输时,执行先垂直传输再水平传输;由下向上的传输时,执行先水平传输再垂直传输,从而结合源节点和目的节点的位置灵活的控制水平与垂直传输方式,路由实现简单,与传统的维序路由相比,能够让传输更靠近底层,同时又避免了底层的过多传输导致的拥塞以及过多垂直传输导致的延迟增大等问题,从而传输延迟小,能够实现有效的温度控制;1) The present invention is based on the self-adaptive vertical routing method of the on-chip network, comprehensively considers the problem of being close to the heat dissipation layer and reducing the length of the transmission path, and transmits by comparing the relationship between the coordinate position of the current node and the coordinate position of the destination node. In the case of transmission from top to bottom, horizontal transmission is performed directly, without vertical transmission first; in vertical transmission from top to top, vertical transmission is performed first and then horizontal transmission is performed; in bottom-to-up transmission, horizontal transmission is performed first and then vertical transmission, thus combining the source node and the destination node The position is flexible to control the horizontal and vertical transmission methods, and the routing is simple to implement. Compared with the traditional dimension order routing, it can make the transmission closer to the bottom layer, and at the same time avoid the congestion caused by the excessive transmission at the bottom layer and the delay caused by too much vertical transmission. increase and other issues, so that the transmission delay is small and effective temperature control can be achieved;
2)本发明基于片上网络的自适应垂直路由方法,若源节点和目的节点均在顶层,直接进行水平传输,相比于传统需要向下路由,能够减少大量冗余的垂直方向的传输,使传输路径长度大大减小,从而减小传输延迟的同时降低底部的传输负担;若源节点在低层、目的节点在顶层,先按水平方向在当前层传输至目的节点所在列位置,再按垂直方向传输至目的节点,以及若源节点在顶层、目的节点在低层,先按垂直方向传输至目的节点所在层位置,再按水平方向传输至目的节点,能够减少在顶层的传输,从而缩短顶层散热路径,避免顶层温度过高,实现温度控制。2) The present invention is based on the self-adaptive vertical routing method of the on-chip network. If the source node and the destination node are both at the top layer, the horizontal transmission is directly performed. Compared with the traditional downward routing, a large amount of redundant vertical transmission can be reduced, so that The length of the transmission path is greatly reduced, thereby reducing the transmission delay and reducing the transmission burden at the bottom; if the source node is on the lower layer and the destination node is on the top layer, first transmit the horizontal direction to the column position of the destination node in the current layer, and then vertically Transmission to the destination node, and if the source node is on the top layer and the destination node is on the lower layer, first transmit to the layer where the destination node is located in the vertical direction, and then transmit to the destination node in the horizontal direction, which can reduce the transmission at the top layer, thereby shortening the heat dissipation path of the top layer , to avoid the top temperature is too high, to achieve temperature control.
与现有技术相比,本发明路由单元的优点在于:本发明路由单元结构简单,片上网络的自适应垂直路由方法能够减少路由部分的面积和功耗,减少传输时间的浪费,且编程实现简单、模块面积小,能够适用于各种微处理器中,同时还可以辅助完成芯片的温度控制,增加芯片的稳定性以及减小漏流功耗。Compared with the prior art, the advantages of the routing unit of the present invention are: the routing unit of the present invention has a simple structure, and the adaptive vertical routing method of the network on chip can reduce the area and power consumption of the routing part, reduce the waste of transmission time, and the programming is simple , The module area is small, it can be applied to various microprocessors, and at the same time, it can also help complete the temperature control of the chip, increase the stability of the chip and reduce the leakage current power consumption.
附图说明Description of drawings
图1是本实施例基于片上网络的自适应垂直路由方法的实现流程示意图。FIG. 1 is a schematic diagram of the implementation flow of the network-on-chip-based adaptive vertical routing method in this embodiment.
图2是本实施例实现基于片上网络的自适应垂直路由方法的路由单元结构示意图。FIG. 2 is a schematic structural diagram of a routing unit implementing an adaptive vertical routing method based on a network-on-chip in this embodiment.
图3是本实施例中输入输出接口单元的接口结构示意图。Fig. 3 is a schematic diagram of the interface structure of the input-output interface unit in this embodiment.
图4是本实施例输入选择模块的接口结构示意图。Fig. 4 is a schematic diagram of the interface structure of the input selection module in this embodiment.
图5是本实施例输出选择模块的接口结构示意图。Fig. 5 is a schematic diagram of the interface structure of the output selection module of this embodiment.
图6是本实施例方向计算单元的结构原理示意图。FIG. 6 is a schematic diagram of the structure and principle of the direction calculation unit in this embodiment.
图7是本发明具体实施例中整体路由网络传输实现原理示意图。Fig. 7 is a schematic diagram of the implementation principle of overall routing network transmission in a specific embodiment of the present invention.
具体实施方式detailed description
以下结合说明书附图和具体优选的实施例对本发明作进一步描述,但并不因此而限制本发明的保护范围。The present invention will be further described below in conjunction with the accompanying drawings and specific preferred embodiments, but the protection scope of the present invention is not limited thereby.
本发明基于片上网络的自适应垂直路由方法包括当从源节点传输数据至目的节点时,每次根据传输数据的当前节点坐标位置、目的节点坐标位置之间的关系确定下一个传输节点的方向,使得当源节点在目的节点的上层位置时,从源节点先按垂直方向传输再按水平方向传输至目的节点,以及当源节点在目的节点的下层位置时,从源节点先按水平方向传输再按垂直方向传输至目的节点,以及当源节点与目的节点处于同层时,从源节点直接按水平方向传输至目的节点。The self-adaptive vertical routing method based on the on-chip network of the present invention includes, when transmitting data from the source node to the destination node, determining the direction of the next transmission node each time according to the relationship between the current node coordinate position and the destination node coordinate position of the transmission data, So that when the source node is at the upper layer of the destination node, the source node is first transmitted in the vertical direction and then horizontally transmitted to the destination node, and when the source node is at the lower layer of the destination node, the source node is first transmitted in the horizontal direction and then horizontally It is transmitted to the destination node in the vertical direction, and when the source node and the destination node are in the same layer, it is directly transmitted from the source node to the destination node in the horizontal direction.
本发明综合考虑靠近散热层和减小传输路径长度问题,通过比较当前节点坐标位置、目的节点坐标位置之间的关系来进行传输,同层节点间的传输时直接水平传输,无需先垂直传输;由上垂直的传输时,执行先垂直传输再水平传输;由下向上的传输时,执行先水平传输再垂直传输,从而结合源节点和目的节点的位置灵活的控制水平与垂直传输方式,实现垂直方向的自适应路由,路由实现简单,与传统的在达到拥塞前将所有的传输在底层进行、固定的先水平再垂直或先垂直再水平的维序路由相比,能够让传输更靠近底层,同时又避免了底层的过多传输导致的拥塞以及过多垂直传输导致的延迟增大等问题,从而传输延迟小,能够实现有效的温度控制。The present invention comprehensively considers the problem of being close to the heat dissipation layer and reducing the length of the transmission path, and performs transmission by comparing the relationship between the coordinate position of the current node and the coordinate position of the destination node, and the transmission between nodes on the same layer is directly transmitted horizontally, without the need for vertical transmission first; When transferring vertically from top to top, perform vertical transfer first and then horizontal transfer; when transferring from bottom to top, perform horizontal transfer first and then vertical transfer, so as to flexibly control the horizontal and vertical transfer methods combined with the positions of source nodes and destination nodes to achieve vertical Directional adaptive routing, the implementation of routing is simple, compared with the traditional dimensional order routing where all transmissions are carried out at the bottom layer before congestion is reached, and fixed horizontally and then vertically or vertically and then horizontally, it can make the transmission closer to the bottom layer, At the same time, problems such as congestion caused by excessive transmission at the bottom layer and delay increase caused by excessive vertical transmission are avoided, so that the transmission delay is small and effective temperature control can be achieved.
本发明采用上述路由方法,若源节点和目的节点均在顶层,直接进行水平传输,相比于传统需要向下路由,能够减少大量冗余的垂直方向的传输,使传输路径长度大大减小,从而减小传输延迟的同时降低底部的传输负担;若源节点在低层、目的节点在顶层,先按水平方向在当前层传输至目的节点所在列位置,再按垂直方向传输至目的节点,以及若源节点在顶层、目的节点在低层,先按垂直方向传输至目的节点所在层位置,再按水平方向传输至目的节点,能够减少在顶层的传输,从而缩短顶层散热路径,避免顶层温度过高,实现温度控制。The present invention adopts the above-mentioned routing method. If the source node and the destination node are both on the top layer, the horizontal transmission is directly performed. Compared with the traditional downward routing, a large amount of redundant vertical transmission can be reduced, and the length of the transmission path is greatly reduced. In order to reduce the transmission delay and reduce the transmission burden at the bottom; if the source node is in the lower layer and the destination node is in the top layer, it will be transmitted horizontally in the current layer to the column where the destination node is located, and then transmitted to the destination node in the vertical direction, and if The source node is on the top layer, and the destination node is on the lower layer. First, transmit to the layer where the destination node is located in the vertical direction, and then transmit to the destination node in the horizontal direction, which can reduce the transmission on the top layer, thereby shortening the heat dissipation path of the top layer and avoiding the high temperature of the top layer. Achieve temperature control.
如图1所示,本实施例中基于片上网络的自适应垂直路由方法具体通过在垂直方向上比较当前节点坐标位置和目的坐标位置的Z坐标大小来进行路由选择,以确定是先进行水平传输还是垂直传输,若源节点的Z坐标Zsrc小于目的节点Zdst,即对应源节点在目的节点的上层位置,先按垂直方向传输至目的节点所在层(目的层),再在目的节点所在层按水平方向传输至目的节点;否则先按水平方向传输至目的节点所在列(目的列),到达目的节点所在列后判断源节点的Z坐标Zsrc是否等于目的节点Zdst,如果不相等,即对应源节点在目的节点的下层位置,则再从目的节点所在列按垂直方向传输至目的节点,完成路由传输过程;如果相等,即对应源节点与目的节点处于同层,则当前已到达目的节点,完成路由传输过程。As shown in Figure 1, the adaptive vertical routing method based on the network-on-chip in this embodiment specifically performs routing selection by comparing the Z coordinates of the current node coordinate position and the destination coordinate position in the vertical direction, so as to determine whether to perform horizontal transmission first Or vertical transmission, if the Z coordinate Zsrc of the source node is smaller than the destination node Zdst, that is, corresponding to the upper layer position of the source node in the destination node, first transmit to the layer where the destination node is located (destination layer) in the vertical direction, and then press horizontally on the layer where the destination node is located direction to the destination node; otherwise, it is first transferred to the column of the destination node in the horizontal direction (destination column), and after reaching the column of the destination node, it is judged whether the Z coordinate Zsrc of the source node is equal to the destination node Zdst, if not, that is, the corresponding source node is in The lower layer position of the destination node is then transmitted from the column where the destination node is located to the destination node in a vertical direction to complete the routing transmission process; if they are equal, that is, the corresponding source node and the destination node are at the same layer, the destination node has been reached and the routing transmission is completed process.
本实施例中,每次确定下一个传输节点的方向的具体步骤为:In this embodiment, the specific steps for determining the direction of the next transmission node each time are:
S1.判断当前节点坐标位置的Z坐标是否小于目的节点坐标位置的Z坐标,如果是,取当前传输节点所在层的向下一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标加1以进行更新;如果不是,转入执行步骤S2;S1. Determine whether the Z coordinate of the current node coordinate position is smaller than the Z coordinate of the destination node coordinate position, if so, take the direction of the next layer where the current transmission node is located as the direction of the next transmission node, and set the Z coordinate of the current node coordinate position Add 1 to the coordinates to update; if not, go to step S2;
S2.判断当前节点坐标位置的X、Y坐标是否等于目的节点坐标位置的X、Y坐标,如果不是,在当前层根据当前节点坐标位置、目的节点坐标位置之间X、Y坐标大小关系确定下一个传输节点的方向,并更新当前节点坐标位置;如果是,转入执行步骤S3;S2. Determine whether the X and Y coordinates of the current node coordinate position are equal to the X and Y coordinates of the destination node coordinate position, if not, determine the X and Y coordinate size relationship between the current node coordinate position and the destination node coordinate position in the current layer The direction of a transmission node, and update the current node coordinate position; if yes, go to step S3;
S3.比较当前节点坐标位置与目的节点坐标位置之间Z坐标的大小,如果大于,取当前传输节点所在层的向上一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标减1以进行更新;如果相等则退出,完成路由过程。S3. Compare the size of the Z coordinate between the current node coordinate position and the destination node coordinate position. If it is larger, take the direction of the upper layer of the layer where the current transmission node is located as the direction of the next transmission node, and subtract the Z coordinate of the current node coordinate position from 1 to update; exit if equal, completing the routing process.
通过上述步骤,每次传输时依次比较当前节点、目的节点之间Z、X、Y坐标大小来确定下一个传输节点的方向,可以结合当前节点、目的节点之间的位置关系,使得当源节点在目的节点的上层位置时,先按垂直方向传输再按水平方向传输;当源节点在目的节点的下层位置时,先按水平方向传输再按垂直方向传输;当源节点与目的节点处于同层时,直接水平传输,从而能够让传输更靠近底层,减少传输延迟及传输拥塞产生,同时实现底层与顶层的温度控制。Through the above steps, the direction of the next transmission node can be determined by comparing the Z, X, and Y coordinates between the current node and the destination node in turn during each transmission. The positional relationship between the current node and the destination node can be combined so that when the source node When it is in the upper layer of the destination node, first transmit in the vertical direction and then in the horizontal direction; when the source node is in the lower layer of the destination node, first transmit in the horizontal direction and then in the vertical direction; When using direct horizontal transmission, it can make the transmission closer to the bottom layer, reduce transmission delay and transmission congestion, and realize the temperature control of the bottom layer and the top layer at the same time.
本实施例中,步骤S2执行水平传输的具体步骤为:In this embodiment, the specific steps for performing horizontal transmission in step S2 are:
S21.判断当前节点坐标位置的X坐标是否小于目的节点坐标位置之间X坐标,如果是,取当前传输节点所在层的向东方向作为下一个传输节点方向,将当前节点坐标位置的X坐标加1以进行更新;否则转入执行步骤S22;S21. Determine whether the X coordinate of the current node coordinate position is smaller than the X coordinate between the destination node coordinate positions, if so, take the east direction of the layer where the current transmission node is located as the direction of the next transmission node, and add the X coordinate of the current node coordinate position to 1 to update; otherwise, proceed to step S22;
S22.比较当前节点坐标位置与目的节点坐标位置之间Y坐标的大小,如果小于,取当前传输节点所在层的向南方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标加1以进行更新;如果大于,取当前传输节点所在层的向北方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标减1以进行更新;如果相等,转入执行步骤S23;S22. Compare the size of the Y coordinate between the current node coordinate position and the destination node coordinate position. If it is smaller, take the southward direction of the layer where the current transmission node is located as the direction of the next transmission node, and add 1 to the Y coordinate of the current node coordinate position to update; if greater, take the northward direction of the layer where the current transmission node is located as the direction of the next transmission node, and subtract 1 from the Y coordinate of the current node coordinate position to update; if equal, proceed to step S23;
S23.比较当前节点坐标位置与目的节点坐标位置之间X坐标的大小,如果大于,取当前传输节点所在层的向西方向作为下一个传输节点的方向,将当前节点坐标位置的X坐标减1以进行更新;如果相等,转入执行步骤S3。S23. Compare the size of the X coordinate between the current node coordinate position and the target node coordinate position. If it is greater, take the westward direction of the layer where the current transmission node is located as the direction of the next transmission node, and subtract 1 from the X coordinate of the current node coordinate position to update; if they are equal, go to step S3.
本实施例以X-Y维序路由执行水平方向传输,实现简单,当然在其他实施例中,还可以根据实际需求采用其他水平传输方式。In this embodiment, X-Y dimension order routing is used to perform horizontal transmission, which is easy to implement. Of course, in other embodiments, other horizontal transmission methods can also be used according to actual needs.
如图2所示为本实施例实现上述基于片上网络的自适应垂直路由方法的路由单元,片上网络中每个节点配置有该路由单元进行数据传输,路由单元包括输入输出接口单元、输入输出选择单元以及用于确定下一个传输节点方向的方向计算单元,片上网络中各个方向的路由单元通过输入输出接口单元连接;输入输出接口单元接收各传输方向的传输请求、传输数据以及所传输数据的当前节点坐标位置、目的节点坐标位置,输入输出选择单元根据接收到的传输请求,从输入输出接口单元中对应输入接口接入目标传输数据、目标传输数据对应的当前节点坐标位置及目的节点坐标位置,经过方向计算单元确定得到下一个传输节点的方向,通过输入输出接口单元中对应输出接口输出目标传输请求、目标传输数据以及对应的当前节点坐标位置、目的节点坐标位置。As shown in Figure 2, it is the routing unit of this embodiment to realize the above-mentioned self-adaptive vertical routing method based on the network-on-chip, each node in the network-on-chip is configured with the routing unit for data transmission, and the routing unit includes an input-output interface unit, an input-output selection unit and a direction calculation unit for determining the direction of the next transmission node, the routing units in each direction in the on-chip network are connected through the input and output interface unit; the input and output interface unit receives the transmission request of each transmission direction, the transmission data and the current status of the transmitted data The coordinate position of the node and the coordinate position of the destination node, the input and output selection unit, according to the received transmission request, accesses the target transmission data from the corresponding input interface of the input and output interface unit, the current node coordinate position corresponding to the target transmission data and the coordinate position of the destination node, The direction of the next transmission node is determined by the direction calculation unit, and the target transmission request, the target transmission data, the corresponding current node coordinate position, and the destination node coordinate position are output through the corresponding output interface in the input-output interface unit.
如图3所示,本实施例中输入输出接口单元包括输入接口、输出接口,输入接口包括传输请求输入接口、传输数据输入接口,以及对应各传输方向的当前节点坐标位置输入接口、目标节点坐标位置输入接口,输出接口包括传输请求输出接口、传输数据输出接口,以及对应各传输方向的当前节点坐标位置输出接口、目标节点坐标位置输出接口;传输方向包括本层向北方向、本层向南方向、本层向西方向、本层向东方向、向上层方向以及向下层方向。As shown in Figure 3, the input and output interface unit in this embodiment includes an input interface and an output interface, and the input interface includes a transmission request input interface, a transmission data input interface, and a current node coordinate position input interface corresponding to each transmission direction, and a target node coordinate The location input interface, the output interface includes the transmission request output interface, the transmission data output interface, and the current node coordinate position output interface and the target node coordinate position output interface corresponding to each transmission direction; the transmission direction includes the north direction of the current layer and the south direction of the current layer direction, the west direction of this layer, the east direction of this layer, the upward direction and the downward direction.
参见图3,本实施例路由单元的输入接口的接入数据具体包括从东西南北上下六个方向的路由及本地处理单元(PE)中得到的传输数据合值data_rx[6:0],传输请求合值req_rx[6:0],及每个方向得到一个当前的坐标值current_id_north/east/south/west/up/down[7:0],及每个方向对应的一个目的坐标值dst_id_north/east/south/west/up/down[7:0],同时还包括本地PE传输的当前节点坐标值current_id_local[7:0]和目的节点坐标值dst_id_local[7:0];输出接口的输出数据包括输送给六个方向的传输请求合值req_tx[5:0],传输数据合值data_tx[5:0],及传输给每个方向上更新后的坐标值new_id_north/east/south/west/up/down[7:0]和目的坐标值dst_id_north/east/south/west/up/down[7:0]。Referring to Fig. 3, the access data of the input interface of the routing unit in this embodiment specifically includes the routing of the six directions from east, west, north, south, up and down and the transmission data combined value data_rx[6:0] obtained from the local processing unit (PE), the transmission request Combined value req_rx[6:0], and each direction gets a current coordinate value current_id_north/east/south/west/up/down[7:0], and a destination coordinate value corresponding to each direction dst_id_north/east/ south/west/up/down[7:0], also includes the current node coordinate value current_id_local[7:0] and the destination node coordinate value dst_id_local[7:0] transmitted by the local PE; the output data of the output interface includes sending to The transmission request value req_tx[5:0] in the six directions, the transmission data value data_tx[5:0], and the updated coordinate value new_id_north/east/south/west/up/down[ 7:0] and the destination coordinate value dst_id_north/east/south/west/up/down[7:0].
本实施例中,输入输出选择单元包括输入选择模块、输出选择模块,输入选择模块输入各个传输方向的传输请求、传输数据以及通过各输入接口接入的各组当前节点坐标位置、目的节点坐标位置,输出对应传输请求中传输方向有效的一组当前节点坐标位置、目的节点坐标位置,传输请求由对应各个传输方向的传输请求是否有效的标识构成。本实施例输入选择模块具体根据输入的接收请求信号的位数从输出的7组当前坐标和目的坐标中选择其中一组。In this embodiment, the input and output selection unit includes an input selection module and an output selection module, and the input selection module inputs transmission requests in each transmission direction, transmission data, and each group of current node coordinate positions and destination node coordinate positions accessed through each input interface. , outputting a set of current node coordinate positions and destination node coordinate positions corresponding to valid transmission directions in the transmission request, and the transmission request is composed of identifications corresponding to whether the transmission requests corresponding to each transmission direction are valid. In this embodiment, the input selection module selects one of the seven output groups of current coordinates and destination coordinates according to the number of digits of the input receiving request signal.
如图4所示,本实施例输入选择模块具体为一个选择器,根据传输请求合值req_rx[6:0]来选择相应方向的输入数据、当前节点坐标值和目的节点坐标值,其中传输请求合值req_rx中自低至高的0~6七位分别依次代表从north,east,south,west,up,down,local七个方向接收到的输入请求,当相应的值为高时,首先从传输数据合值data_rx[6:0]中选择相应方向(传输请求信号为高电平)的data送至输出接口,其次选择对应方向上的当前节点坐标值送给current_id[7:0],以及选择对应的目标节点坐标值送给dst_id[7:0]。输入选择模块选择当前节点坐标值current_id[7:0]、目标节点坐标值dst_id[7:0]后,再分别进行拆分处理,得到当前节点坐标值、目标节点坐标值对应每个轴上的坐标值,其中高2位为Z坐标值、中间3位为Y坐标值、低3位是X坐标值,输出current_id_x、current_id_y、current_id_z以及dst_id_x、dst_id_y、dst_id_z。As shown in Figure 4, the input selection module of this embodiment is specifically a selector, which selects the input data in the corresponding direction, the coordinate value of the current node and the coordinate value of the destination node according to the combined value req_rx[6:0] of the transmission request, wherein the transmission request The seven digits from low to high in req_rx represent the input requests received from the north, east, south, west, up, down, and local directions respectively. When the corresponding value is high, the transmission Select the data in the corresponding direction (the transmission request signal is high level) in the data value data_rx[6:0] and send it to the output interface, and then select the current node coordinate value in the corresponding direction and send it to current_id[7:0], and select The corresponding target node coordinate value is sent to dst_id[7:0]. The input selection module selects the current node coordinate value current_id[7:0] and the target node coordinate value dst_id[7:0], and then splits them separately to obtain the current node coordinate value and the target node coordinate value corresponding to each axis. Coordinate value, where the upper 2 bits are the Z coordinate value, the middle 3 bits are the Y coordinate value, and the lower 3 bits are the X coordinate value, output current_id_x, current_id_y, current_id_z and dst_id_x, dst_id_y, dst_id_z.
本实施例中,方向计算单元根据当前节点坐标位置和目的节点坐标位置进行比较,得到下一个传输节点的方向,并且根据下一个传输节点的方向更新所需传输数据当前的节点坐标值,输出给下一个传输节点。如图5所示,本实施例方向计算单元具体包括:In this embodiment, the direction calculation unit compares the current node coordinate position with the destination node coordinate position to obtain the direction of the next transmission node, and updates the current node coordinate value of the required transmission data according to the direction of the next transmission node, and outputs it to next transfer node. As shown in Figure 5, the direction calculation unit in this embodiment specifically includes:
第一计算单元,用于判断当前节点坐标位置的Z坐标是否小于目的节点坐标位置的Z坐标,如果是,取当前传输节点所在层的向下一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标加1以进行更新,返回执行第一计算单元;如果不是,转入执行第二计算单元;The first calculation unit is used to judge whether the Z coordinate of the current node coordinate position is smaller than the Z coordinate of the destination node coordinate position, if so, take the direction of the next layer of the layer where the current transmission node is located as the direction of the next transmission node, and use the current Add 1 to the Z coordinate of the node coordinate position to update, return to execute the first calculation unit; if not, transfer to execute the second calculation unit;
第二计算单元,用于判断当前节点坐标位置的X、Y坐标是否等于目的节点坐标位置的X、Y坐标,如果不是,在当前层根据当前节点坐标位置、目的节点坐标位置之间X、Y坐标大小关系确定下一个传输节点的方向,并更新当前节点坐标位置,返回执行第二计算单元;如果是,转入执行第三计算单元;The second calculation unit is used to judge whether the X and Y coordinates of the current node coordinate position are equal to the X and Y coordinates of the destination node coordinate position, if not, according to the X and Y between the current node coordinate position and the destination node coordinate position in the current layer The coordinate size relationship determines the direction of the next transmission node, and updates the coordinate position of the current node, returns to execute the second calculation unit; if yes, transfers to execute the third calculation unit;
第三计算单元,用于比较当前节点坐标位置与目的节点坐标位置之间Z坐标的大小,如果大于,取当前传输节点所在层的向上一层方向作为下一个传输节点的方向,将当前节点坐标位置的Z坐标减1以进行更新,返回执行第三计算单元;如果相等则退出,完成路由过程。The third calculation unit is used to compare the size of the Z coordinate between the current node coordinate position and the destination node coordinate position. If it is greater than that, take the upward direction of the layer where the current transmission node is located as the direction of the next transmission node, and convert the current node coordinates Subtract 1 from the Z coordinate of the position to update, and return to execute the third calculation unit; if they are equal, exit and complete the routing process.
本实施例中,第二计算单元具体包括:In this embodiment, the second calculation unit specifically includes:
第一X方向计算单元,用于判断当前节点坐标位置的X坐标是否小于目的节点坐标位置之间X坐标,如果是,取当前传输节点所在层的向东方向作为下一个传输节点方向,将当前节点坐标位置的X坐标加1以进行更新,返回执行第一X方向计算单元;否则转入执行Y方向计算单元;The first X direction calculation unit is used to judge whether the X coordinate of the current node coordinate position is smaller than the X coordinate between the destination node coordinate positions, if so, take the east direction of the layer where the current transmission node is located as the direction of the next transmission node, and use the current Add 1 to the X coordinate of the node coordinate position to update, and return to execute the first X-direction calculation unit; otherwise, transfer to execute the Y-direction calculation unit;
Y方向计算单元,用于比较当前节点坐标位置与目的节点坐标位置之间Y坐标的大小,如果小于,取当前传输节点所在层的向南方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标加1以进行更新,返回执行Y方向计算单元;如果大于,取当前传输节点所在层的向北方向作为下一个传输节点的方向,将当前节点坐标位置的Y坐标减1以进行更新,返回执行Y方向计算单元;如果相等,转入执行第二X方向计算单元;The Y direction calculation unit is used to compare the size of the Y coordinate between the current node coordinate position and the destination node coordinate position. If it is smaller, take the southward direction of the layer where the current transmission node is located as the direction of the next transmission node, and set the current node coordinate position Add 1 to the Y coordinate of the current node to update, and return to execute the Y direction calculation unit; if it is greater than, take the northward direction of the layer where the current transmission node is located as the direction of the next transmission node, and subtract 1 from the Y coordinate of the current node coordinate position to update , return to execute the calculation unit in the Y direction; if they are equal, transfer to execute the second calculation unit in the X direction;
第二X方向计算单元,比较当前节点坐标位置与目的节点坐标位置之间X坐标的大小,如果大于,取当前传输节点所在层的向西方向作为下一个传输节点的方向,将当前节点坐标位置的X坐标减1以进行更新,返回执行第二X方向计算单元;如果相等,转入执行第三计算单元。The second X direction calculation unit compares the size of the X coordinate between the current node coordinate position and the destination node coordinate position. If it is greater than that, take the westward direction of the layer where the current transmission node is located as the direction of the next transmission node, and set the current node coordinate position Subtract 1 from the X coordinate of X to update, and return to execute the second X direction calculation unit; if they are equal, transfer to execute the third calculation unit.
本实施例方向计算单元执行计算时,具体首先将当前节点坐标值的Z坐标与目的节点坐标值的Z坐标进行对比,当目的节点坐标值的Z坐标较大时,输出向下的方向,当前节点坐标值的Z坐标值加1送给更新后Z坐标;否则比较X坐标,当目的节点坐标值的X坐标较大时,输出向东的方向,当前节点坐标值的X坐标值加1送给更新后的X坐标;否则比较Y坐标,当目的节点坐标值的Y坐标较大时,输出向南的方向,当前节点坐标值的Y坐标值加1送给更新后Y坐标,当目的节点坐标值的Y坐标较小时,输出向北的方向,当前节点坐标值的Y坐标值减1送给更新后Y坐标;当Y坐标相等时,比较X坐标,当目的节点坐标值的X坐标较小时,输出向西方向,当前节点坐标值的X坐标值减1送给更新后X坐标;当X坐标相等时,比较Z坐标,当目的节点坐标值的Z坐标较小时,输出向上的方向,当前节点坐标值的Z坐标值减1送给更新后Z坐标;当Z坐标相同时,输出本地的方向;最后根据输出的方向更新方向信号direction[6:0]并输出,除上述根据方向更新的坐标值外,其他坐标值不变,发送至对应的输出接口。若更新后当前节点坐标值与目的节点坐标值相同,则输出本地方向,即传给当前PE,删除坐标值,路由传输过程结束。When the direction calculation unit in this embodiment performs calculations, it firstly compares the Z coordinate of the current node coordinate value with the Z coordinate of the destination node coordinate value, and when the Z coordinate of the destination node coordinate value is larger, outputs the downward direction, and the current Add 1 to the Z coordinate value of the node coordinate value and send it to the updated Z coordinate; otherwise, compare the X coordinate value. When the X coordinate value of the destination node coordinate value is larger, output the east direction, and add 1 to the X coordinate value of the current node coordinate value to send Give the updated X coordinate; otherwise, compare the Y coordinate. When the Y coordinate of the destination node coordinate value is larger, output the direction to the south, and add 1 to the Y coordinate value of the current node coordinate value and send it to the updated Y coordinate. When the destination node When the Y coordinate of the coordinate value is small, output the direction to the north, and subtract 1 from the Y coordinate value of the current node coordinate value and send it to the updated Y coordinate; when the Y coordinates are equal, compare the X coordinates; Hours, output the westward direction, the X coordinate value of the current node coordinate value minus 1 is sent to the updated X coordinate; when the X coordinate value is equal, compare the Z coordinate value, and when the Z coordinate value of the target node coordinate value is smaller, output the upward direction, The Z coordinate value of the current node coordinate value minus 1 is sent to the updated Z coordinate; when the Z coordinate is the same, the local direction is output; finally, the direction signal direction[6:0] is updated and output according to the output direction, except for the above-mentioned direction update Except for the coordinate value of , the other coordinate values remain unchanged and are sent to the corresponding output interface. If the coordinate value of the current node is the same as the coordinate value of the destination node after updating, the local direction is output, that is, passed to the current PE, the coordinate value is deleted, and the routing transmission process ends.
本实施例中,输出选择模块接入方向计算单元输出的下一个传输节点的方向、更新后当前节点坐标位置,输出目标传输请求、目标传输数据、更新后当前节点坐标位置以及目的节点坐标位置至对应输出接口。如图6所示,本实施例输出选择模块具体为一个输出选择器,首先将更新后的XYZ坐标值按照ZYX的排列顺序合成一个更新的坐标值new_id,通过方向信号direction[6:0]选择相应的有效方向更新坐标值,输出各个传输方向的更新坐标值new_id[7:0],同时根据方向信号direction[6:0]的值置输出的传输请求信号req_tx[6:0]中相应传输方向的输出请求置为有效,得到目标传输请求,结合输入选择模块的data信号,得到相应输出的目标传输数据信号data_tx[6:0]。In this embodiment, the output selection module accesses the direction of the next transmission node output by the direction calculation unit, the updated coordinate position of the current node, outputs the target transmission request, the target transmission data, the updated coordinate position of the current node, and the coordinate position of the destination node to Corresponding output interface. As shown in Figure 6, the output selection module of this embodiment is specifically an output selector. First, the updated XYZ coordinate values are synthesized into an updated coordinate value new_id according to the arrangement order of ZYX, and selected by the direction signal direction[6:0] Update the coordinate value of the corresponding effective direction, output the updated coordinate value new_id[7:0] of each transmission direction, and set the corresponding transmission in the output transmission request signal req_tx[6:0] according to the value of the direction signal direction[6:0] The output request of the direction is set to valid, and the target transmission request is obtained, combined with the data signal of the input selection module, the corresponding output target transmission data signal data_tx[6:0] is obtained.
本发明具体实施例中在多处理器路由网络采用上述路由方法的传输如图7所示,传输结构为8*8*4,附图中仅示出其中4*4*3结构图部分,水平方向以采用XY维序路由传输方式为例;图(a)对应源节点S与目的节点D均处于顶层lay0的情况,直接从源节点S按照水平方向传输至目的节点D,无需如传统的需先垂直向下传输,避免了大量冗余的垂直方向传输;图(b)对应源节点S在目的节点D上层的情况,即向下的传输,先从源节点S按照垂直方向传输至目的节点D所在层lay2,再在lay2层按照水平方向传输至目的节点D,让传输更靠近底层,同时避免底层执行过多传输;图(c)对应源节点S在目的节点D下层的情况,即向上的传输,先在从源节点S按照水平方向传输至目的节点D所在列,再垂直传输至目的节点,而不是如传统的先垂直再水平传输,能够让传输更靠近底层,避免在顶层传输,实现顶层的温度控制。In the specific embodiment of the present invention, the transmission using the above-mentioned routing method in the multi-processor routing network is shown in Figure 7. The transmission structure is 8*8*4, and only the 4*4*3 structure diagram part is shown in the accompanying drawing, and the horizontal Take the XY-dimensional sequence routing transmission method as an example; Figure (a) corresponds to the situation where the source node S and the destination node D are both at the top layer lay0, and the source node S is directly transmitted to the destination node D in the horizontal direction, without the traditional need First transmit vertically downwards, avoiding a large amount of redundant vertical transmission; Figure (b) corresponds to the situation where the source node S is on the upper layer of the destination node D, that is, the downward transmission is first transmitted from the source node S to the destination node in the vertical direction The layer where D is located is lay2, and then transmits to the destination node D in the horizontal direction on the layer of lay2, so that the transmission is closer to the bottom layer, and at the same time avoids excessive transmission at the bottom layer; Figure (c) corresponds to the situation where the source node S is in the lower layer of the destination node D, that is, upward The transmission is first transmitted from the source node S to the column where the destination node D is located in the horizontal direction, and then vertically transmitted to the destination node, instead of the traditional vertical and then horizontal transmission, which can make the transmission closer to the bottom layer and avoid transmission on the top layer. Realize the temperature control of the top layer.
本实施例通过上述路由单元基于硬件层面实现了片上网络自适应垂直路由,结构简单,各路由单元根据当前节点坐标和目的节点坐标的位置关系来进行路由选择,能够减少路由部分的面积和功耗、减少传输时间的浪费,且编程实现简单、模块面积小,能够适用于各种微处理器(数字芯片)中,使用上述路由单元时,还可以辅助完成芯片的温度控制,从而增加芯片的稳定性以及减小漏流功耗。In this embodiment, the adaptive vertical routing of the on-chip network is realized based on the hardware level through the above-mentioned routing unit, and the structure is simple. Each routing unit performs routing selection according to the positional relationship between the current node coordinates and the destination node coordinates, which can reduce the area and power consumption of the routing part. , Reduce the waste of transmission time, and the programming is simple, the module area is small, and can be applied to various microprocessors (digital chips). When using the above routing unit, it can also assist in completing the temperature control of the chip, thereby increasing the stability of the chip performance and reduce leakage power consumption.
上述只是本发明的较佳实施例,并非对本发明作任何形式上的限制。虽然本发明已以较佳实施例揭露如上,然而并非用以限定本发明。因此,凡是未脱离本发明技术方案的内容,依据本发明技术实质对以上实施例所做的任何简单修改、等同变化及修饰,均应落在本发明技术方案保护的范围内。The above are only preferred embodiments of the present invention, and do not limit the present invention in any form. Although the present invention has been disclosed above with preferred embodiments, it is not intended to limit the present invention. Therefore, any simple modifications, equivalent changes and modifications made to the above embodiments according to the technical essence of the present invention shall fall within the protection scope of the technical solution of the present invention.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710265270.9A CN106953800B (en) | 2017-04-21 | 2017-04-21 | An adaptive vertical routing method and routing unit based on a network on chip |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201710265270.9A CN106953800B (en) | 2017-04-21 | 2017-04-21 | An adaptive vertical routing method and routing unit based on a network on chip |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN106953800A true CN106953800A (en) | 2017-07-14 |
| CN106953800B CN106953800B (en) | 2019-12-17 |
Family
ID=59476473
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201710265270.9A Active CN106953800B (en) | 2017-04-21 | 2017-04-21 | An adaptive vertical routing method and routing unit based on a network on chip |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN106953800B (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108256628A (en) * | 2018-01-15 | 2018-07-06 | 合肥工业大学 | Convolutional neural networks hardware accelerator and its working method based on multicast network-on-chip |
| CN110460523A (en) * | 2019-08-15 | 2019-11-15 | 电子科技大学 | A routing control unit for realizing cross-layer routing mechanism of network on chip |
| CN114448862A (en) * | 2021-12-30 | 2022-05-06 | 山东云海国创云计算装备产业创新中心有限公司 | Data transmission method, device, device and medium based on 3D network-on-chip |
| CN114745345A (en) * | 2022-04-07 | 2022-07-12 | 中国人民解放军国防科技大学 | Efficient routing method and device for dynamically adjusting backpressure of network on chip |
| CN116405555A (en) * | 2023-03-08 | 2023-07-07 | 阿里巴巴(中国)有限公司 | Data transmission method, routing node, processing unit and system on chip |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101388834A (en) * | 2008-10-20 | 2009-03-18 | 电子科技大学 | 3D Network-on-Chip Architecture Approach |
| CN101483614A (en) * | 2008-10-20 | 2009-07-15 | 电子科技大学 | Method for constructing network on three-dimensional chip |
| CN102780628A (en) * | 2012-07-31 | 2012-11-14 | 中国人民解放军国防科学技术大学 | On-chip interconnection network routing method oriented to multi-core microprocessor |
| US20140211622A1 (en) * | 2013-01-28 | 2014-07-31 | Netspeed Systems | Creating multiple noc layers for isolation or avoiding noc traffic congestion |
| CN104092617A (en) * | 2014-05-30 | 2014-10-08 | 中国科学院计算技术研究所 | A three-dimensional integrated circuit on-chip network routing method and system thereof |
| US20140301241A1 (en) * | 2013-04-04 | 2014-10-09 | Netspeed Systems | Multiple heterogeneous noc layers |
| CN104243330A (en) * | 2014-10-10 | 2014-12-24 | 南京大学 | Low-density vertical interconnection oriented three-dimensional on-chip network router |
| CN105187313A (en) * | 2015-09-25 | 2015-12-23 | 东北大学 | Network-on-chip topology structure and adaptive routing method thereof |
| CN106302209A (en) * | 2015-06-12 | 2017-01-04 | 华为技术有限公司 | A kind of network-on-chip NoC and the method for data transmission |
-
2017
- 2017-04-21 CN CN201710265270.9A patent/CN106953800B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101388834A (en) * | 2008-10-20 | 2009-03-18 | 电子科技大学 | 3D Network-on-Chip Architecture Approach |
| CN101483614A (en) * | 2008-10-20 | 2009-07-15 | 电子科技大学 | Method for constructing network on three-dimensional chip |
| CN102780628A (en) * | 2012-07-31 | 2012-11-14 | 中国人民解放军国防科学技术大学 | On-chip interconnection network routing method oriented to multi-core microprocessor |
| US20140211622A1 (en) * | 2013-01-28 | 2014-07-31 | Netspeed Systems | Creating multiple noc layers for isolation or avoiding noc traffic congestion |
| US20140301241A1 (en) * | 2013-04-04 | 2014-10-09 | Netspeed Systems | Multiple heterogeneous noc layers |
| CN104092617A (en) * | 2014-05-30 | 2014-10-08 | 中国科学院计算技术研究所 | A three-dimensional integrated circuit on-chip network routing method and system thereof |
| CN104243330A (en) * | 2014-10-10 | 2014-12-24 | 南京大学 | Low-density vertical interconnection oriented three-dimensional on-chip network router |
| CN106302209A (en) * | 2015-06-12 | 2017-01-04 | 华为技术有限公司 | A kind of network-on-chip NoC and the method for data transmission |
| CN105187313A (en) * | 2015-09-25 | 2015-12-23 | 东北大学 | Network-on-chip topology structure and adaptive routing method thereof |
Cited By (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108256628A (en) * | 2018-01-15 | 2018-07-06 | 合肥工业大学 | Convolutional neural networks hardware accelerator and its working method based on multicast network-on-chip |
| CN110460523A (en) * | 2019-08-15 | 2019-11-15 | 电子科技大学 | A routing control unit for realizing cross-layer routing mechanism of network on chip |
| CN110460523B (en) * | 2019-08-15 | 2021-06-11 | 电子科技大学 | Routing control unit for realizing network-on-chip cross-layer routing mechanism |
| CN114448862A (en) * | 2021-12-30 | 2022-05-06 | 山东云海国创云计算装备产业创新中心有限公司 | Data transmission method, device, device and medium based on 3D network-on-chip |
| CN114448862B (en) * | 2021-12-30 | 2024-12-13 | 山东云海国创云计算装备产业创新中心有限公司 | Data transmission method, device, equipment and medium based on 3D on-chip network |
| CN114745345A (en) * | 2022-04-07 | 2022-07-12 | 中国人民解放军国防科技大学 | Efficient routing method and device for dynamically adjusting backpressure of network on chip |
| CN114745345B (en) * | 2022-04-07 | 2023-10-20 | 中国人民解放军国防科技大学 | Efficient routing method and device for dynamic back pressure adjustment of network on chip |
| CN116405555A (en) * | 2023-03-08 | 2023-07-07 | 阿里巴巴(中国)有限公司 | Data transmission method, routing node, processing unit and system on chip |
| CN116405555B (en) * | 2023-03-08 | 2024-01-09 | 阿里巴巴(中国)有限公司 | Data transmission method, routing node, processing unit and system on chip |
Also Published As
| Publication number | Publication date |
|---|---|
| CN106953800B (en) | 2019-12-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN106953800B (en) | An adaptive vertical routing method and routing unit based on a network on chip | |
| US20220224656A1 (en) | Programmable logic device with integrated network-on-chip | |
| CN105187313B (en) | A kind of Survey on network-on-chip topology and its adaptive routing method | |
| US8819611B2 (en) | Asymmetric mesh NoC topologies | |
| CN101488922B (en) | Network-on-chip router having adaptive routing capability and implementing method thereof | |
| CN102780628B (en) | On-chip interconnection network routing method oriented to multi-core microprocessor | |
| CN101778049A (en) | Router and transmission method thereof on packet-circuit switching chip | |
| CN104320341A (en) | Adaptive and asynchronous routing network on 2D-Torus chip and design method thereof | |
| CN113709040A (en) | Package-level network routing algorithm based on extensible interconnected die | |
| CN117395746B (en) | Routing method, device, equipment and storage medium of dual-path wireless mesh network | |
| CN107094116B (en) | A direct network routing method and system including cross-dimensional links | |
| CN102437953A (en) | Low Power Adaptive Routing Method in Network-on-Chip | |
| CN105530206B (en) | A kind of Torus network system and its working method with double access infrastructures | |
| CN105049362B (en) | A kind of method for routing of two dimension around grid Survey on network-on-chip topology | |
| CN117241337A (en) | Routing method, device, equipment and storage medium of dual-path wireless mesh network | |
| CN114707451B (en) | Digital circuit layout planning method, device, electronic device, and storage medium | |
| CN105959239B (en) | The communication means of three-dimensional network on mating plate | |
| CN106209518B (en) | One kind being based on the dynamic steering routing algorithm of " packet-circuit " switching technology | |
| CN105991378B (en) | A kind of point-to-multipoint communication and communication node based on 3D-mesh network | |
| US11115312B1 (en) | File control for data packet routers using consensus and inter-planetary file system (IPFS) | |
| Xiang et al. | A Q-routing based self-regulated routing scheme for network-on-chip | |
| US10084725B2 (en) | Extracting features from a NoC for machine learning construction | |
| CN103997462B (en) | Multicast strategy routing scheme based on convex hull convergence algorithm | |
| CN104683263A (en) | On-chip network topology for hotspot mitigation | |
| WO2020087248A1 (en) | Multi-core chip data bus wiring structure and method for transmitting data |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |