A storage and computing FPGA based on NoC efficient interconnection
By introducing the NoC interconnection structure and FPGA interconnection structure into the storage and computing FPGA, efficient interconnection and memory access optimization are achieved, which solves the high-density and high-reliability requirements, supports complex multi-algorithm scenarios, improves computing efficiency and bandwidth, and overcomes the challenges of traditional computing. The memory access bottleneck of the chip.
Patent Information
- Application Number
- CN202410012503.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-04
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-01-04
AI Technical Summary
Existing technology cannot simultaneously meet the requirements for high-density and high-reliability storage and computing, and cannot meet complex and diverse computing scenarios, resulting in low computing efficiency.
A memory-computing FPGA is designed using an efficient interconnection structure based on NoC, including a two-layer interconnection structure: NoC interconnection structure and FPGA interconnection structure, using asynchronous routing, configurable logic blocks, non-volatile configurable logic blocks and in-memory computing cores , implement matrix-vector product calculations and support for complex algorithms.
It overcomes the problem of single application scenario of traditional ASIC, reduces data movement power consumption and transmission delay, improves computing efficiency and on-chip bandwidth, and supports computing acceleration in multiple algorithm scenarios.
Smart Images

Figure CN118093504B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of on-chip network routing technology and in-memory computing technology, and specifically relates to a storage and computing FPGA (Field Programmable Gate Array) based on NoC (Network on Chip) efficient interconnection. Background Art
[0002] As the gap between processor and memory technology increases, the memory access power consumption wall problem under the von Neumann architecture becomes increasingly prominent. The power consumption required for data migration in the entire calculation increases with the improvement of process nodes. The inherent separation between memory and computing units under the von Neumann architecture has become the biggest constraint on improving chip computing power in the post-Moore era. How to break through the bottlenecks of the "storage wall" and "power consumption wall" of the von Neumann architecture through innovation in hardware architecture has become an important direction for the innovation and development of high-computing chip architecture.
[0003] In order to solve the bottleneck problem of the von Neumann architecture, the industry and academia began to shift from focusing on computing to focusing on storage. Computing-In-Memory (CIM) technology uses highly parallel computing mechanisms to reduce unnecessary data movement, greatly shortening the distance between data and computing in physical space. It is one of the most promising technologies to break through the memory wall and power consumption wall of the von Neumann architecture. Compared with the von Neumann architecture, in-memory computing uses the high integration of memory and processor to not only solve the speed imbalance problem between the two, but also solve the bus bandwidth limitation and delay problems, which can greatly improve processing speed and reduce power consumption.
[0004] However, the existing storage-computing integrated technology cannot meet the requirements of high density and high reliability at the same time. On the other hand, both deep learning accelerators and storage-computing integrated chip technology can only meet a single application scenario and cannot meet the ever-changing, complex and diverse computing scenarios. The calculation of new operators must be implemented through heterogeneously integrated central processing units (CPUs) and other modules, resulting in low computing efficiency. Combining storage-computing integrated with field programmable gate array (FPGA) reconfigurable technology can not only break through the memory access bottleneck of traditional computing chips and achieve orders of magnitude performance improvement, but also support ever-changing complex and diverse scenarios through hardware programming of FPGAs. Summary of the invention
[0005] In order to solve the problems in the prior art, the present invention proposes a storage and computing FPGA based on NoC efficient interconnection, including a two-layer interconnection structure, wherein the two-layer interconnection structure is a NoC interconnection structure and a FPGA interconnection structure;
[0006] The FPGA interconnection structure includes multiple logic blocks, multiple switch blocks, multiple connection blocks and multiple input and output blocks; the logic blocks are connected by connection blocks, the connection blocks are used to transmit binary signals, and two adjacent connection blocks are connected by switch blocks, and the switch blocks control the connectivity between the connection blocks; the connection blocks located at the outermost periphery of the FPGA interconnection structure are all connected to the input and output blocks, and the input and output blocks control the input and output of the storage and computing FPGA; the logic blocks are configurable logic blocks, block random access memories, multipliers and in-memory computing cores;
[0007] The NoC interconnection structure includes a plurality of asynchronous routes, each of which directly establishes communication with four asynchronous routes in the east, south, west and north directions respectively, and only one-way communication can be performed between two asynchronous routes at the same time, and the asynchronous route performs bidirectional data transmission with the local in-memory computing core; the asynchronous route is connected to the connection block connected to the configurable logic block through the connection block and the switch block, and the asynchronous route is connected to the connection block connected to the block random access memory through the connection block and the switch block;
[0008] The input of the storage and computing FPGA is the weight and input activation of the network, and the output is the final calculation result.
[0009] Furthermore, the FPGA interconnection structure also includes a plurality of non-volatile configurable logic blocks and a plurality of variable resistance memories, and the non-volatile configurable logic blocks are connected to the connection blocks through the variable resistance memories.
[0010] Furthermore, the non-volatile configurable logic block includes a full cross-switch matrix and several basic logic units, the input of the full cross-switch matrix includes the input of the non-volatile configurable logic block and the output of the several basic logic units, the output of the full cross-switch matrix is respectively connected to the input of the basic logic unit, and the output of all the basic logic units is fed back to the full cross-switch matrix as part of the input of the cross-switch matrix, the basic logic unit includes a non-volatile lookup table, a register and a selector, the input of the basic logic unit is the input of the non-volatile lookup table, the output of the non-volatile lookup table is respectively connected to the input of the register and the input of the selector, the output of the register also serves as the input of the selector, and the output of the selector is connected to the input of a variable resistive memory located outside the non-volatile configurable logic block.
[0011] Furthermore, the non-volatile lookup table contains several control information, each control information is connected to the connection block through a variable resistance memory located outside the non-volatile configurable logic block, different control information is connected to the same connection block through different variable resistance memories, and the variable resistance memory is a connection switch between the control information and the external connection block.
[0012] Furthermore, the in-memory computing core includes a storage computing array, a local cache and a controller; the storage computing array is used for matrix multiplication calculations, the local cache is used to temporarily store the results calculated by the storage computing array and the data input by the asynchronous routing, the controller is used to generate various control signals and output them to the storage computing array and the local cache, the output results of the in-memory computing core are temporarily stored in the local cache, and after the storage computing array calculation is completed, the final output results of the in-memory computing core are transmitted back to the asynchronous routing connected to it.
[0013] The present invention also provides a working method based on the storage and computing FPGA, wherein the weight of the network enters the storage and computing FPGA from the external dynamic random access memory through the input and output block, and is temporarily stored in the block random access memory; then, it is sent to each asynchronous route through the FPGA interconnection structure through the connection block and the switch block, and is stored in the storage and computing array of the in-memory computing core of the local asynchronous route;
[0014] Input activations are sequentially input from the external dynamic random access memory to the storage and computing FPGA through the input and output blocks in the order of input, and are temporarily stored in the block random access memory; through the FPGA interconnection structure, input activations are output from the block random access memory, sent to the corresponding asynchronous routing through the connection block and the switch block, and stored in the local cache of the in-memory computing core local to the asynchronous routing;
[0015] After the input activation and the weight of the network are sent to the in-memory computing core, the matrix-vector product calculation begins, and the in-memory computing core calculates the partial sum; the input activation and the partial sum are respectively transmitted through the NoC interconnection structure in different directions, and when the input activation is transmitted to the next asynchronous route, it is used as the input of the next asynchronous route for data multiplexing; and when the partial sum is transmitted to the next asynchronous route, it is accumulated with the partial sum generated by the next asynchronous route, and the accumulation operation is achieved by connecting to a nearby configurable logic unit through the FPGA interconnection structure; the partial sum is accumulated while being transmitted in the same direction, and the final calculation result is obtained after several accumulations and stored in the block random access memory; when a calculation is completed, the output result is output through the block random access memory, and the result is output from the input and output block to the off-chip dynamic random access memory through the connection block and the switch block.
[0016] Compared with the prior art, the present invention has the following beneficial effects:
[0017] (1) The present invention adopts an efficient interconnected storage and computing FPGA, thus overcoming the problem that the traditional ASIC has a single application scenario and cannot cope with complex and multi-dimensional computing scenarios. By utilizing the highly programmable characteristics of FPGA, computing acceleration can be achieved for a variety of algorithm scenarios.
[0018] (2) The present invention adopts storage-computing integrated technology, thus overcoming the problem of separation of computing and storage in the traditional von Neumann architecture, thereby effectively reducing data movement power consumption and transmission delay, and greatly improving the computing energy efficiency of the system.
[0019] (3) The present invention adopts a NoC-based interconnection technology, thereby overcoming the problem of inefficient on-chip communication in traditional processors, thereby effectively reducing communication delays, increasing on-chip bandwidth, and effectively reducing the complexity of multi-processor architectures. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 It is the interconnection structure diagram of FPGA for storage and computing;
[0021] Figure 2 It is a schematic diagram of a mesh storage and computing FPGA;
[0022] Figure 3 Figure 2 is a non-volatile memory based Ping-Pong multi-content FPGA diagram.
[0023] Figure 4 Schematic diagram of the allocation and calculation process of input activation and network weights. DETAILED DESCRIPTION
[0024] The present invention is further described and illustrated below in conjunction with specific embodiments. The embodiments are merely exemplary of the present disclosure and do not define the scope of limitation. The technical features of each embodiment of the present invention may be combined accordingly without conflicting with each other.
[0025] The present invention aims to utilize the advantages of FPGA's parallelism and reconfigurability as well as the advantages of low power consumption and low latency of integrated storage and computing to design a highly flexible integrated storage and computing FPGA architecture with efficient interconnection and optimized memory access.
[0026] In order to achieve efficient support for complex multi-dimensional algorithms, the present invention proposes a highly flexible and low-power storage and computing FPGA architecture, in which the core storage and computing integrated array is used to achieve tensor acceleration, and the reconfigurable computing in the FPGA can be used to support complex multi-dimensional algorithms. Figure 1The typical island structure is shown in the figure. The Configurable Logic Block (CLB) is a soft logic resource. Each CLB consists of multiple lookup tables (LUTs), flip-flops (FFs) and local interconnections. The Block Random Access Memory (BRAM) is an on-chip memory resource. The Multiplier (MUL) is a hard logic block used for multiplication operations on the FPGA. There are also several in-memory computing cores (Block CIMs) distributed on the FPGA. This logic block can store data and perform matrix-vector product operations. The integrated storage and computing Block CIM can effectively reduce the number of data transfers and computing delays, and reduce the power consumption of the overall FPGA architecture. All logic function blocks are interconnected through switch blocks (SBs) and connection blocks (CBs). All input / output (I / O) blocks are distributed on the periphery of the island FPGA architecture.
[0027] The configurable logic block (CLB) includes a full cross switch matrix and several basic logic units, and the basic logic unit includes a lookup table, a register and a selector; the input of the full cross switch matrix includes the input of the configurable logic block and the output of the several basic logic units, the output end of the full cross switch matrix is respectively connected to the input end of the basic logic unit, and the output of all basic logic units is fed back to the full cross switch matrix as part of the input of the cross switch matrix, the input of the basic logic unit is the input of the lookup table, the output end of the lookup table is respectively connected to the input end of the register and the input end of the selector, the output of the register is also used as the input of the selector, the output of the selector is the output of the basic logic unit and the output of the configurable logic block, and the output end of the configurable logic block is connected to the input end of the external connection block.
[0028] The flexibility of the storage and computing FPGA architecture is mainly achieved through two interconnection methods. The first is LUT interconnection. Each LUT is a programmable logic unit that can implement different logic functions as needed. LUT interconnection provides flexible logic resource layout and connection capabilities, and LUTs can be interconnected into any logic circuit through programming. The second is the global interconnection network. The global interconnection network usually includes long lines, data channels, clock networks, and configuration channels. The global interconnection network can provide high-speed, low-latency, and high-bandwidth connections for transmitting large amounts of data, clock signals, and configuration information. The global interconnection network is mainly completed by configuring switch blocks, connection blocks, and wiring resources.
[0029] In order to further improve the efficient interconnection of the architecture and increase the transmission bandwidth between data, the present invention adds a layer of network on chip (NoC) structure on the original FPGA architecture. The overall structure is as follows Figure 2 As shown in the figure. The entire architecture consists of a 2D mesh storage and computing node array. The nodes use asynchronous routing to form an on-chip network for communication, and the nodes use the local interconnection of FPGA to complete the logical connection and data transmission. Each asynchronous router directly establishes communication with four routers located in the east, south, west and north of itself, and each router communicates one-to-one with a storage and computing node (computing core in memory). The router selects the router here through the internal direction selector to communicate with other routers in a certain direction in a unidirectional manner. The router and other resources on the FPGA, such as CLB and BRAM, are connected through FPGA interconnection (i.e., interconnected through switch blocks and connection blocks). Through such interconnection technology, efficient communication between storage and computing nodes and routers, routers and routers, and routers and other FPGA resources can be achieved. The storage and computing nodes mainly include storage and computing arrays, high-density on-chip caches and controllers. Here, the storage and computing array can be used to accelerate matrix multiplication operations, while other modules can be used to generate a variety of operators, such as other computing modules that can be used for activation, pooling, and addition for neural network applications. In order to improve control efficiency, each routing node has its own local instruction scheduling table. Therefore, the entire system will be jointly scheduled by each storage and computing node through asynchronous communication, rather than a global scheduling processor for control, avoiding the transmission of scheduling instructions between modules, and the overall efficiency will be greatly improved. Therefore, the storage and computing FPGA architecture proposed by the present invention has two levels of interconnection lines, NoC as a high-level interconnection structure for realizing rapid data movement; and the other level is the original FPGA interconnection line, which is used to realize the transmission of various digital logics and other data.
[0030] The present invention will also use local real-time reconfiguration technology to achieve rapid switching of computing features between different algorithms. Real-time reconfiguration technology refers to the technology that can dynamically reconfigure and reconfigure the hardware system at runtime. It allows the system to perform real-time logic reprogramming and resource reallocation without interrupting normal operation. Real-time reconfiguration technology is achieved by using Figure 3 The Multicontext FPGA shown enables the hardware system to dynamically change its behavior and configuration at runtime.
[0031] The Ping-Pong multi-content FPGA based on non-volatile memory proposed in the present invention customizes some non-volatile configurable logic blocks (NVMC CLB) units, and each non-volatile configurable logic block has several groups of non-volatile lookup tables, and various configuration information is stored in the lookup tables. Each group of information controls the switch through the RRAM unit of the interconnected part. For example, a neural network algorithm needs to use convolution kernels of different sizes 3×3 and 5×5 between different layers. The configuration parameters of the two different convolution kernel sizes are stored in Context#1 and Context#2 respectively. When the FPGA is performing 3×3 convolution calculations, the configuration parameters of 5×5 can be written into Context#2 of the non-volatile lookup table in advance. When the storage and calculation FPGA architecture needs to switch the convolution kernel features, the function will be quickly switched through the pre-configured RRAM unit. Considering that multi-content FPGAs often increase a lot of area, the present invention uses 2 contexts to achieve a compromise between performance and area.
[0032] The overall process of the storage and computing FPGA when performing network computing is as follows: First, the weight of the network enters the on-chip storage and computing FPGA from the off-chip DRAM (Dynamic Random Access Memory) through the input and output blocks, and is temporarily stored in the on-chip BRAM. Then, it is sent to each route through the FPGA interconnection structure through the connection block and the switch block, and then stored in the storage and computing array of the local in-memory computing core. Then, the input activation also enters the on-chip storage and computing FPGA from the off-chip DRAM through the input and output blocks in a certain order, and is temporarily stored in the on-chip BRAM. Through the FPGA interconnection structure, the input activation is output from the BRAM, sent to the assigned route through the connection block and the switch block, and then stored in the local cache of the in-memory computing core through the route. After the input activation and weight are both sent to the in-memory computing core, the matrix-vector product calculation begins. The input activation and the partial sum obtained by the in-memory computing core are transmitted through the NoC interconnection structure in different directions, such as the input activation is transmitted from west to east, and the partial sum is transmitted from north to south. When the input activation is passed to the next routing node, it is also used as input for data multiplexing. When the partial sum is passed to the next routing node, it is accumulated with the partial sum generated by the next node. The addition logic is connected to the nearby configurable logic unit through the interconnect structure of the FPGA. The partial sum is passed southward while being accumulated. After several accumulations, the final calculation result is obtained and stored in the on-chip BRAM. When a calculation is completed, the output result is output through the BRAM, and the result is output from the input and output block to the off-chip DRAM through the connection block and the switch block.
[0033] The specific allocation process is as follows: Figure 4 shown. Figure 4 A schematic diagram of the calculation process of a 1×3 input activation vector and a 3×3 weight matrix is given. The weights A, B, C, D, E, F, G, H, and I are stored in a 3×3 mesh storage and computing FPGA and are not moved. After the input activations a, b, and c come out of the BRAM, they enter the routing of the leftmost column through the FPGA interconnection structure and are calculated with the weights A, D, and G respectively. The partial sums obtained are moved from top to bottom and accumulated to obtain the final result X. At the same time, after the input activations a, b, and c reach the routing nodes of the first column, they will continue to move to the right to reach the routing nodes of the second and third columns, and complete the calculation with the weights BEH and CFI in turn. Similar to the first column, after obtaining the partial sums, the partial sums are transmitted from top to bottom and accumulated to obtain the final results Y and Z. The final result is temporarily stored in the on-chip BRAM, and finally output from the input and output blocks to the off-chip DARM through the connection block and the switch block.
[0034] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. For ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A storage and computing FPGA based on NoC efficient interconnection, characterized in that: The method comprises two layers of interconnection structures, wherein the two layers of interconnection structures are a NoC interconnection structure and a FPGA interconnection structure; The FPGA interconnection structure includes multiple logic blocks, multiple switch blocks, multiple connection blocks and multiple input and output blocks; the logic blocks are connected by connection blocks, the connection blocks are used to transmit binary signals, and two adjacent connection blocks are connected by switch blocks, and the switch blocks control the connectivity between the connection blocks; the connection blocks located at the outermost periphery of the FPGA interconnection structure are all connected to the input and output blocks, and the input and output blocks control the input and output of the storage and computing FPGA; the logic blocks are configurable logic blocks, block random access memories, multipliers and in-memory computing cores; The NoC interconnection structure includes a plurality of asynchronous routes, each of which directly establishes communication with four asynchronous routes in the east, south, west and north directions respectively, and only one-way communication can be performed between two asynchronous routes at the same time, and the asynchronous route performs bidirectional data transmission with the local in-memory computing core; the asynchronous route is connected to the connection block connected to the configurable logic block through the connection block and the switch block, and the asynchronous route is connected to the connection block connected to the block random access memory through the connection block and the switch block; The input of the storage and computing FPGA is the weight and input activation of the network, and the output is the final calculation result.
2. The NoC-based efficient interconnect storage and computing FPGA according to claim 1, characterized in that: The FPGA interconnection structure also includes a plurality of non-volatile configurable logic blocks and a plurality of variable resistance memories, and the non-volatile configurable logic blocks are connected to the connection blocks through the variable resistance memories.
3. The NoC-based efficient interconnect storage and computing FPGA according to claim 2, characterized in that: The non-volatile configurable logic block includes a full cross-switch matrix and a plurality of basic logic units. The input of the full cross-switch matrix includes the input of the non-volatile configurable logic block and the output of the plurality of basic logic units. The output of the full cross-switch matrix is respectively connected to the input of the basic logic units, and the output of all the basic logic units is fed back to the full cross-switch matrix as part of the input of the cross-switch matrix. The basic logic unit includes a non-volatile lookup table, a register and a selector. The input of the basic logic unit is the input of the non-volatile lookup table. The output of the non-volatile lookup table is respectively connected to the input of the register and the input of the selector. The output of the register also serves as the input of the selector. The output of the selector is connected to the input of a variable resistive memory located outside the non-volatile configurable logic block.
4. The NoC-based efficient interconnect storage and computing FPGA according to claim 3, characterized in that: The non-volatile lookup table contains several control information, each control information is connected to the connection block through a variable resistance memory located outside the non-volatile configurable logic block, different control information is connected to the same connection block through different variable resistance memories, and the variable resistance memory is a connection switch between the control information and the external connection block.
5. The NoC-based efficient interconnect storage and computing FPGA according to claim 2, characterized in that: The in-memory computing core includes a storage computing array, a local cache and a controller; the storage computing array is used for matrix multiplication calculations, the local cache is used to temporarily store the results calculated by the storage computing array and the data input by the asynchronous router, the controller is used to generate various control signals and output them to the storage computing array and the local cache, the output results of the in-memory computing core are temporarily stored in the local cache, and after the storage computing array calculation is completed, the final output results of the in-memory computing core are transmitted back to the asynchronous router connected to it.
6. The NoC-based efficient interconnect storage and computing FPGA according to claim 1, characterized in that: The configurable logic block includes a full cross switch matrix and several basic logic units, and the basic logic unit includes a lookup table, a register and a selector; the input of the full cross switch matrix includes the input of the configurable logic block and the output of the several basic logic units, the output end of the full cross switch matrix is respectively connected to the input end of the basic logic unit, and the output of all basic logic units is fed back to the full cross switch matrix as part of the input of the cross switch matrix, the input of the basic logic unit is the input of the lookup table, the output end of the lookup table is respectively connected to the input end of the register and the input end of the selector, the output of the register is also the input of the selector, the output of the selector is the output of the basic logic unit, and also the output of the configurable logic block, and the output end of the configurable logic block is connected to the input end of the external connection block.
7. A working method based on the storage and calculation FPGA according to claim 5, characterized in that: The network weights are entered from the external dynamic random access memory to the storage and computing FPGA through the input and output blocks, and temporarily stored in the block random access memory; then sent to each asynchronous route through the FPGA interconnection structure, through the connection block and the switch block, and stored in the storage and computing array of the in-memory computing core of the local asynchronous route; Input activations are sequentially entered from the external dynamic random access memory to the storage and computing FPGA through the input and output blocks in the order of input, and are temporarily stored in the block random access memory; Through the FPGA interconnect structure, the input activation is output from the block random access memory, sent to the corresponding asynchronous route through the connection block and the switch block, and stored in the local cache of the in-memory computing core local to the asynchronous route; After the input activation and the weight of the network are both sent to the in-memory computing core, the matrix-vector product calculation is started, and the in-memory computing core calculates the partial sum; the input activation and the partial sum are respectively transmitted through the NoC interconnect structure in different directions, and when the input activation is transmitted to the next asynchronous route, it is used as the input of the next asynchronous route for data multiplexing; and when the partial sum is transmitted to the next asynchronous route, it is accumulated with the partial sum generated by the next asynchronous route, and the accumulation operation is realized by connecting to the nearby configurable logic unit through the FPGA interconnect structure; The partial sums are transmitted in the same direction while being accumulated, and after several accumulations, a final calculation result is obtained and stored in the block random access memory; When a calculation is completed, the output result is output through the block random access memory, and the result is output from the input and output block to the off-chip dynamic random access memory through the connection block and the switch block.
