A brain-inspired dual-mode routing method and device

By using brain -based dual -mode routing methods in large -scale brain -type computing chips, using local broadcasting and long -range single -broadcast methods to solve the problem of network bandwidth and multi -broadcast dependent routes caused by single -broadcast routing. A complete connection of efficient network resources and large -scale brain -like models.

CN118784561BActive Publication Date: 2025-01-24FUDAN UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410971578.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2025-01-24
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

In the existing large-scale brain-like computing chip, the purpose routing of the unicast method cannot be reused due to the inability to reuse the AER pulse packets of the shared path, resulting in increased network bandwidth and throughput pressure; while the source routing of the multicast method depends on the routing table, The network size is growing, and the size of the routing table is squared, which is difficult to meet the storage needs of high-performance large-scale brain-like computing.

Method used

The dual -modular routing method based on brain -inspiration is used to define the type of AER information package as the source routing packet and destination routing packet, and the router enters the local broadcast mode or remote single -broadcast mode according to the type of the package. Specifically, the source routing packet is broadcast local broadcast within the threshold range to avoid routing tables; the destination routing packet is broadcast through a long distance to ensure path reuse of the path and no routing table.

Benefits of technology

Through local source routing broadcast, the demand for network bandwidth and router throughput is reduced, and the demand for the storage of the routing table on the tablet is reduced; through the long -distance destination, the route of the route is avoided to avoid the demand for storage on the route table, and at the same time ensure the model of the model Connection and reliability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118784561B_ABST
    Figure CN118784561B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of brain-like neural network technology, specifically a brain-inspired dual-mode routing method and device, including defining the type of AER information packet, including source routing data packet and destination routing data packet; the router accepts and confirms the type of the AER information packet; if it is a source routing data packet, it enters the local broadcast mode; if it is a destination routing data packet, it enters the remote unicast mode; through local source routing broadcast, the routing table is avoided, while the demand for local network bandwidth and router throughput is reduced, and the demand for on-chip storage due to the routing table is greatly reduced; through long-distance destination routing unicast, the demand for on-chip storage of the routing table is avoided, while ensuring the integrity and reliability of the model connection. The transmission redundancy of invalid information packets caused by multicast routing is reduced by utilizing the characteristics of local dense connections; the demand for network bandwidth caused by unicast destination routing is reduced by utilizing the characteristics of global sparseness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of brain-like neural network technology, and in particular to a brain-inspired dual-mode routing method and device. Background Art

[0002] Brain-like computing, as a disruptive technology in the post-Moore era, is a new computing technology that draws on the development of brain science. Its characteristics of spatiotemporal sparsity, event-driven, and storage-computing coupling make it likely to break through the von Neumann bottleneck and storage wall problem, thereby solving the computing power and energy consumption problems of intelligent computing.

[0003] Large-scale brain-like computing chips and systems are used to implement the calculation of spiking neural networks. Typical large-scale brain-like processors include Figure 1 As shown in the figure, it is a typical multi-core / many-core processor structure. Its core usually includes a neural processing unit (NPU) for simulating neuron behavior, a router for simulating the pulse transmission process, and a memory for storing the connection relationship between neurons and synaptic information (Memory System). Its typical processing process can be briefly described as follows:

[0004] (1) Neurons express pulse emission as "Address-Event-Representation" and transmit pulses between neurons in the form of AER packets;

[0005] (2) The AER information packet transmits the pulse time from the source neuron to the destination neuron through routers and interconnected networks;

[0006] (3) The neuron retrieves the synaptic information corresponding to the spike by retrieving the AER information packet;

[0007] (4) Neurons complete tasks such as accumulation, membrane potential update, and pulse generation;

[0008] Among them, the on-chip router method and router design are the key to ultra-large-scale brain-like computing, which determines the chip's resource consumption (cost) and performance (network scale and computing latency). The current international mainstream large-scale brain-like computing chips include Intel Loihi, IBM TrueNorth, SpinNaker, etc. Among them, Intel Loihi and IBM TrueNorth series use unicast destination routing, while SpinNaker uses multicast source routing.

[0009] In large-scale brain-like computing, unicast destination routing can avoid complex routing tables, but the AER pulse information packets on the shared path cannot be reused, which increases the pressure on network bandwidth and throughput. This problem is particularly evident in models with large scale, dense connections, and active pulse emission. In contrast, multicast source routing can achieve path reuse through multicasting of AER pulse information packets on the shared path, which can reduce the pressure on network bandwidth and throughput; however, this routing method relies on routing tables, and the size of the routing table is proportional to the square of the network scale. On-chip storage is difficult to meet the needs of high-performance large-scale brain-like computing.

[0010] Therefore, a new technical solution is urgently needed to solve the above technical problems. Summary of the invention

[0011] The purpose of the present invention is to overcome the above-mentioned problems of the prior art and to provide a brain-inspired dual-mode routing method and device to solve the technical problems in the prior art that the destination routing of the unicast mode cannot be reused because the AER pulse information packets of the shared path cannot be reused, thereby increasing the pressure on the network bandwidth and throughput; and the source routing of the multicast mode relies on the routing table, and the size of the routing table is in a square relationship with the network scale, and on-chip storage is difficult to meet the needs of high-performance large-scale brain-like computing.

[0012] The above objectives are achieved through the following technical solutions:

[0013] A brain-inspired dual-mode routing method and device, comprising:

[0014] Define the types of AER packets, including source routing packets and destination routing packets;

[0015] The router receives and confirms the type of the AER information packet; if it is a source routing data packet, it enters the local broadcast mode; if it is a destination routing data packet, it enters the remote unicast mode;

[0016] The local broadcast mode includes: the core where the presynaptic neuron is located sends the source routing data packet to the local router, and after receiving the source routing data packet, the router arbitrates according to the transmission distance and incoming direction of the source routing data packet and determines the propagation direction within a threshold range;

[0017] The remote unicast mode includes: when the router receives the destination routing data packet, it compares the destination kernel coordinates in the destination routing data packet with its local kernel coordinates to confirm the propagation direction of the destination routing data packet; when the destination kernel coordinates in the destination routing data packet are equal to its local kernel coordinates, the router forwards the destination routing data packet to the local to complete the propagation.

[0018] Furthermore, the source routing data packet includes a highest bit, a lowest bit and remaining bits, the highest bit is set to 0; the lowest bit is used to represent the trajectory of data propagation; and the remaining bits represent the unique number of neurons in the system.

[0019] Furthermore, the destination routing data packet includes a highest bit, a middle bit and an index bit, the highest bit is set to 1; the middle bit represents the destination kernel coordinates where the post-synaptic neuron is located; and the index bit is used to represent the destination kernel storage synapse head address.

[0020] Further, after receiving the source routed data packet, the router performs arbitration according to the transmission distance and incoming direction of the source routed data packet to determine the propagation direction; specifically:

[0021] The router first determines whether the propagation distance of the source routing data packet reaches a threshold;

[0022] If it is less than the threshold, the incoming direction of the source routed data packet is confirmed; if the incoming direction is the X-axis direction, the router forwards the source routed data packet to all non-source directions, including north, south, local and directions that continue to propagate along the X-axis; if the incoming direction is the Y-axis direction, the router sends the source routed data packet to the local direction and the direction that continues to propagate along the Y-axis;

[0023] If it is equal to the threshold, the router sends the source routed data packet to the local kernel.

[0024] Furthermore, the method for confirming the threshold value includes:

[0025] Confirm the connection distribution of neurons in the brain model and the number of neurons n per core in the brain-like computing chip;

[0026] Taking a single neuron as the center, obtain the radius r that can cover 99.7% of neurons;

[0027] Combined with the neuron density u in the cortical model, the number of neurons N under this radius is determined, N = u·π·r 2 ;

[0028] Then the number of cores that the broadcast should cover is C = N / n;

[0029] According to C=(2T(T+1)+1), the threshold T is rounded up.

[0030] Further, when the router receives the destination routing data packet, it compares the destination kernel coordinates in the destination routing data packet with its local kernel coordinates to confirm the propagation direction of the destination routing data packet; specifically:

[0031] The destination routing data packet is sent to the direction where the X value difference becomes smaller. When the X coordinate in the destination routing data packet is consistent with the local X coordinate, the destination routing data packet will be sent to the direction where the Y value difference becomes smaller, until it is finally propagated to the destination kernel.

[0032] A device for implementing a dual-mode routing method based on brain inspiration, characterized by comprising:

[0033] a distance calculator module, configured to calculate the Manhattan distance between the local kernel coordinates of the router and the kernel coordinates of the presynaptic neuron;

[0034] A coordinate comparator module, for comparing the destination kernel coordinates in the destination routing data packet with its local kernel coordinates;

[0035] The routing path arbitrator module is used to query the routing information according to the source direction of the data packet to determine the propagation direction.

[0036] The present invention provides a brain-inspired dual-mode routing method and device, which avoids the routing table through local source routing broadcast, reduces the demand for local network bandwidth and router throughput, and greatly reduces the demand for on-chip storage due to the routing table; through long-distance destination routing unicast, avoids the demand for on-chip storage of the routing table, and ensures the integrity and reliability of the model connection. This scheme cleverly utilizes the characteristics of the biological cerebral cortex model, that is, local broadcast can efficiently realize path reuse and routing table-free design, and utilizes the characteristics of local dense connections to reduce the transmission redundancy of invalid information packets caused by broadcasting; and utilizes the characteristics of global sparseness to reduce the demand for network bandwidth caused by unicast destination routing. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 This is a schematic diagram of the structure of a typical large-scale brain-like processor;

[0038] Figure 2 A schematic diagram of a method for localized source routing broadcast and long-distance destination routing unicast in a brain-inspired dual-mode routing method according to the present invention;

[0039] Figure 3 A flowchart of threshold confirmation in a brain-inspired dual-mode routing method according to the present invention;

[0040] Figure 4 A schematic diagram of a brain-inspired dual-mode routing device according to the present invention;

[0041] Figure 5 This is a schematic diagram of a brain-inspired dual-mode routing device according to the present invention. DETAILED DESCRIPTION

[0042] The present invention is further described in detail below based on the accompanying drawings and embodiments. The described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0043] like Figure 2 and 3 As shown in the figure, this scheme provides a brain-inspired dual-mode routing method, which uses the characteristics of local dense connections and global sparse connections of biological cerebral cortex models. On the basis of ensuring the integrity of large-scale brain-like model connections, it effectively reduces the requirements of unicast routing for high bandwidth and multicast routing for on-chip storage. It mainly includes:

[0044] Define the types of AER packets, including source routing packets and destination routing packets;

[0045] The router receives and confirms the type of the AER information packet; if it is a source routing data packet, it enters the local broadcast mode; if it is a destination routing data packet, it enters the remote unicast mode;

[0046] The local broadcast mode in this embodiment includes:

[0047] The core where the presynaptic neuron is located sends the source routing data packet to the local router. After receiving the source routing data packet, the router performs arbitration according to the transmission distance and incoming direction of the source routing data packet and determines the propagation direction within a threshold range.

[0048] The router first determines whether the propagation distance of the source routing data packet reaches a threshold;

[0049] If it is less than the threshold, the incoming direction of the source routed data packet is confirmed; if the incoming direction is the X-axis direction, the router forwards the source routed data packet to all non-source directions, including north, south, local and directions that continue to propagate along the X-axis; if the incoming direction is the Y-axis direction, the router sends the source routed data packet to the local direction and the direction that continues to propagate along the Y-axis;

[0050] If it is equal to the threshold, the router sends the source routed data packet to the local kernel and no longer forwards it to other directions.

[0051] Specifically, Figure 2 As shown, in this embodiment, for source routed packets, the router can forward the incoming packets in multiple directions. Finally, the source routed packets are distributed to all cores within the distance threshold. The propagation path is as follows: Figure 2 Indicated by the solid arrow.

[0052] Once a spike event occurs, the core where the presynaptic neuron is located sends its global source address to the local router, which then propagates it to the four neighboring nodes. When receiving a source-routed packet, the router performs customized actions based on the moving distance and incoming trajectory of the source-routed packet. The router first checks whether the propagation distance has reached the threshold. For propagation distances less than the threshold, if the received packet comes from the X-axis direction, the router forwards it to all non-source directions, including north, south, local, and directions that continue to propagate along the X-axis. If the received packet comes from the Y-axis direction, the packet is sent to the local direction and the direction that continues to propagate along the Y-axis. When the propagation distance is equal to the threshold, the packet is only sent to the local node and is no longer forwarded to other directions. From the perspective of each target core, each packet follows the Dimension Order Routing (DOR) strategy, first propagating in the X direction and then in the Y direction. This strategy effectively avoids deadlock situations in the network. Under this strategy, each packet only increases the throughput load once for each router within the threshold range, and does not increase the throughput load for routers outside the threshold range.

[0053] like Figure 4 As shown, the threshold confirmation method includes the following steps:

[0054] Confirm the connection distribution of neurons in the brain model and the number of neurons n per core in the brain-like computing chip (the typical value of the number of neurons in 1 core is 1K);

[0055] According to the connected distribution function, an integral operation is performed, and the radius r that can cover 99.7% of the neurons is obtained with a single neuron as the center;

[0056] Combined with the neuron density u in the cortical model, the number of neurons N under this radius is determined, N = u·π·r 2 ;

[0057] Then the number of cores that the broadcast should cover is C = N / n;

[0058] In the 2D-mesh structure, with a single core as the center, the number of cores covered within a range of distance d is 2d(d+1)+1; where d is the number of routers that the data packet passes through; according to C=(2T(T+1)+1), the threshold T can be rounded up to an integer.

[0059] The remote unicast mode described in this embodiment includes:

[0060] When the router receives the destination routing data packet, it compares the destination kernel coordinates in the destination routing data packet with its local kernel coordinates to confirm the propagation direction of the destination routing data packet; when the destination kernel coordinates in the destination routing data packet are equal to its local kernel coordinates, the router forwards the destination routing data packet to the local to complete the propagation; the propagation path is as follows Figure 2 Indicated by the dashed arrow.

[0061] Specifically, the destination routing data packet is sent to the direction where the X value difference becomes smaller. When the X coordinate in the destination routing data packet is consistent with the local X coordinate, the destination routing data packet will be sent to the direction where the Y value difference becomes smaller, until it is finally propagated to the destination kernel.

[0062] In this mode, the router forwards packets in only one direction. When the router receives a destination routing packet, it compares the destination coordinates in the packet with its local coordinates to determine the routing direction of the packet.

[0063] Among them, each data packet still follows the dimension-order routing strategy, first propagating along the X direction and then propagating along the Y direction.

[0064] When the destination coordinates in the data packet are equal to the router's own coordinates, the router forwards the data packet to the local area to complete the transmission.

[0065] The above method adopts the local broadcast mode to effectively distribute dense data packets to the near-end destination through a shared path, thereby reducing network throughput. The remote unicast mode is used to achieve remote communication. Compared with multicast, no routing table is required, thus ensuring the integrity of the connection of large-scale brain-like models.

[0066] like Figure 3 As shown, the source routing data packet in this embodiment includes the highest bit, the lowest bit and the remaining bits, the highest bit is set to 0; the lowest bit has three bits, which are used to indicate the trajectory of data propagation and can represent five directions: north, east, south, west and local; the remaining bits represent the unique number of the neuron in the system.

[0067] The high bits of the numbers correspond to the kernel coordinates, while the low bits represent the number of neurons inside the kernel, i.e., the neuron ID. The specific number of bits in the numbers depends on the scale of the simulated model, i.e., to support a larger cortical model scale, it is only necessary to increase the bit width of the coordinates.

[0068] The destination routing data packet includes a highest bit, a middle bit and an index bit, the highest bit is set to 1; the middle bit represents the destination kernel coordinates where the post-synaptic neuron is located, similar to the source routing, and additional kernel support can be achieved by simply increasing the bit width allocated to the coordinates; the index bit is used to represent the first address of the destination kernel storing the synapse.

[0069] It should be noted that, in this embodiment, the width of the source routing data packet and the destination routing data packet are the same.

[0070] like Figure 3 As shown, this embodiment also provides an implementation device of a dual-mode routing method based on brain inspiration, specifically comprising:

[0071] a distance calculator module, configured to calculate the Manhattan distance between the local kernel coordinates of the router and the kernel coordinates of the presynaptic neuron;

[0072] A coordinate comparator module, for comparing the destination kernel coordinates in the destination routing data packet with its local kernel coordinates;

[0073] The routing path arbitrator module is used to query the routing information according to the source direction of the data packet to determine the propagation direction.

[0074] like Figure 5 As shown, in this embodiment, the router collects data packets from all five directions, and two types of data packets share most of the data paths, such as buffers and switching circuits, thereby reducing resource overhead.

[0075] For source-routed packets, the router extracts the coordinates of the core where the presynaptic neuron is located. Then it calculates the Manhattan distance (the sum of the absolute differences of the X and Y coordinates) between its local coordinates and the coordinates of the presynaptic neuron. This distance is compared with the threshold to determine the forwarding behavior; when the distance is less than the propagation threshold, the path arbitrator queries the routing information based on the source direction of the packet to determine the propagation direction.

[0076] All routing information includes five bits corresponding to five routing directions. If the relevant bit is set to 1, the packet propagates in this direction; when the propagation distance is equal to the threshold, the router only propagates the packet to the local core.

[0077] For the destination routing data packet, the router extracts the destination core coordinates from the data packet and compares them with the local coordinates of the router. The data packet will first be sent to the direction where the X value difference becomes smaller. When the X coordinate in the data packet is consistent with the local X coordinate, the data packet will be sent to the direction where the Y value difference becomes smaller, and finally propagates to the destination core.

[0078] like Figure 5As shown in Figure 2, although the mixed-mode router provided by this scheme introduces additional circuit overhead than the single-mode router. However, based on the synthesis results of the 40nmCMOS process, since the two schemes share most blocks, such as buffers and switching circuits, it is found that the area increase is less than 4%. In addition, the memory usually occupies the area of ​​the SNN processor, and the router only occupies a small part of the area. Therefore, the overhead introduced by the dual-mode router can be ignored.

[0079] The above description is only for illustrating the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A brain-inspired dual-mode routing method, characterized in that: include: Define the types of AER packets, including source routing packets and destination routing packets; The router receives and confirms the type of the AER information packet; If it is a source routed data packet, it enters the local broadcast mode; If it is a destination routing packet, it enters remote unicast mode; The local broadcast mode includes: The core where the presynaptic neuron is located sends the source routing data packet to a local router. After receiving the source routing data packet, the router performs arbitration according to the transmission distance and incoming direction of the source routing data packet and determines the propagation direction within a threshold range. The arbitration is performed according to the transmission distance and the incoming direction of the source routed data packet, and the propagation direction is determined within a threshold range, specifically: The router first determines whether the propagation distance of the source routing data packet reaches a threshold; If it is less than the threshold, the incoming direction of the source routed data packet is confirmed; if the incoming direction is the X-axis direction, the router forwards the source routed data packet to all non-source directions, including north, south, local and directions that continue to propagate along the X-axis; if the incoming direction is the Y-axis direction, the router sends the source routed data packet to the local direction and the direction that continues to propagate along the Y-axis; If it is equal to the threshold, the router sends the source routed data packet to the local kernel and no longer forwards it to other directions; The method for confirming the threshold value comprises the following steps: Confirm the connection distribution of neurons in the brain model and the number of neurons n in each core of the brain-like computing chip; perform integral operations based on the connection distribution function, and obtain the radius r that can cover 99.7% of neurons with a single neuron as the center; combined with the neuron density u in the cortical model, confirm the number of neurons N under this radius, N=u·π·r 2 ; Then the number of cores that the broadcast should cover is C = N / n; In the 2D-mesh structure, the number of cores covered within a range of distance d with a single inner as the center is 2d (d + 1) + 1; where d is the number of routers that the data packet passes through; According to C = (2T (T + 1) + 1), the threshold T can be obtained by rounding up; The remote unicast mode includes: When the router receives the destination routing data packet, it compares the destination kernel coordinates in the destination routing data packet with its local kernel coordinates to confirm the propagation direction of the destination routing data packet; when the destination kernel coordinates in the destination routing data packet are equal to its local kernel coordinates, the router forwards the destination routing data packet to the local area to complete the propagation.

2. A brain-inspired dual-mode routing method according to claim 1, characterized in that: The source routing data packet includes a highest bit, a lowest bit and remaining bits, wherein the highest bit is set to 0; the lowest bit is used to represent the trajectory of data propagation; and the remaining bits represent the unique number of neurons in the system.

3. The brain-inspired dual-mode routing method according to claim 1, characterized in that: The destination routing data packet includes a highest bit, a middle bit and an index bit, wherein the highest bit is set to 1; the middle bit indicates the destination kernel coordinates where the post-synaptic neuron is located; and the index bit is used to indicate the destination kernel storage synapse head address.

4. The brain-inspired dual-mode routing method according to claim 1, characterized in that: When the router receives the destination routing data packet, it compares the destination kernel coordinates in the destination routing data packet with its local kernel coordinates to confirm the propagation direction of the destination routing data packet; specifically: The destination routing data packet is sent to the direction where the X value difference becomes smaller. When the X coordinate in the destination routing data packet is consistent with the local X coordinate, the destination routing data packet will be sent to the direction where the Y value difference becomes smaller, until it is finally propagated to the destination kernel.

5. The device for implementing any one of the brain-inspired dual-mode routing methods according to claims 1-4, characterized in that: include: a distance calculator module, configured to calculate the Manhattan distance between the local kernel coordinates of the router and the kernel coordinates of the presynaptic neuron; A coordinate comparator module, for comparing the coordinates of the destination kernel in the destination routing data packet with the coordinates of its local kernel; The routing path arbitrator module is used to query the routing information according to the source direction of the data packet to determine the propagation direction.

Citation Information

Patent Citations

  • Population routing method for large-scale brain-like computing network

    CN112163673A

  • Two-dimensional network-on-chip structure, routing method and device thereof, equipment and storage medium

    CN116545960A