A storage and computing architecture FPGA with high data transmission efficiency
By dividing the storage and computing units within the FPGA and using asynchronous data transmission interface and global read and write channels, the problem of low data transmission efficiency between the storage unit and the computing unit is solved, and the data processing efficiency and computing speed of the FPGA are improved. It is suitable for high Performance computing and artificial intelligence applications.
Patent Information
- Application Number
- CN202310776682.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-27
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2043-06-27
AI Technical Summary
When performing computing tasks, existing FPGAs need to frequently transmit large amounts of data between the storage unit and the computing unit, resulting in large consumption of wiring resources and interconnection resources, high latency and energy losses, limiting data processing efficiency.
Design a memory and computing architecture with high data transmission efficiency. By dividing several sub-regions within the FPGA, the resource modules in each sub-region are connected to form a memory and computing unit. The asynchronous data transmission interface and global read and write channels are used to realize local storage and The processor's parallel computing reduces data transmission delay and energy loss, and optimizes data transmission by adjusting the order of instruction execution.
It improves the data processing efficiency and computing speed of FPGA, reduces data transmission delay and energy consumption, supports multi-core parallel computing, and improves the performance of artificial intelligence and machine learning applications.
Smart Images

Figure CN116775556B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of FPGA technology, and in particular to a storage and computing architecture FPGA with high data transmission efficiency. Background Art
[0002] With the development of high-tech technologies such as the Internet of Things, cloud computing, and artificial intelligence, various data-intensive applications based on hardware platforms have also grown dramatically. FPGA (Field Programmable Gate Array) is a commonly used hardware platform due to its advantages of parallelism and reconfigurability.
[0003] The existing FPGA, like most traditional hardware platforms, adopts the von Neumann architecture. The FPGA contains a large number of resource modules such as CLB, DSP and BRAM. These resource modules are connected by highly configurable interconnects to form computing units and storage units in the FPGA. BRAM is an important on-chip storage unit. On-chip data is mainly stored in BRAM, and on-chip data must be transferred to the computing unit during calculation.
[0004] Therefore, existing FPGAs, like other hardware platforms that use the von Neumann architecture, need to repeatedly transfer large amounts of data between storage units and computing units when performing various computing tasks. Frequent and large-scale data movement not only consumes a large amount of wiring resources and interconnection resources, but also causes huge delays and energy losses, thereby limiting the data processing efficiency of FPGAs. Summary of the invention
[0005] In response to the above problems and technical requirements, the applicant has proposed a storage and computing architecture FPGA with high data transmission efficiency. The technical solution of this application is as follows:
[0006] A storage and computing architecture FPGA with high data transmission efficiency, the storage and computing architecture FPGA includes a plurality of resource modules arranged according to a predetermined structure, and interconnection resources arranged around the resource modules. The resource modules located in the same sub-area are connected through the interconnection resources inside the FPGA to realize a storage and computing unit. Each storage and computing unit includes a processor and a local storage unit connected through the interconnection resources. The local storage unit in each storage and computing unit is used to store instructions and data of the storage and computing unit, and the processor is used to perform operations according to the instructions and data stored in the connected local storage unit.
[0007] The storage and computing units that have data transmission relationships with other storage and computing units also form a data transmission interface through the resource module of the corresponding sub-area, and the storage and computing units include a data transmission interface formed as a data output interface and / or a data transmission interface formed as a data input interface; the structures of the data transmission interfaces of the storage and computing units are the same, and each data transmission interface includes a memory and has a write data port, a write clock port, a read data port, and a read clock port;
[0008] For any two storage and computing units that have a data transmission relationship, the data output interface of the first storage and computing unit serving as the data sender is connected to the data input interface of the second storage and computing unit serving as the data receiver. The first storage and computing unit writes data into the memory in the data output interface through the write data port under the control of the write clock signal of the write clock port, and writes data into the memory in the data input interface of the second storage and computing unit in a first-in-first-out manner. The second storage and computing unit reads data from the memory in the data input interface in a first-in-first-out manner through the read data port under the control of the read clock signal of the read clock port, thereby realizing data transmission from the first storage and computing unit to the second storage and computing unit.
[0009] Its further technical solution is that, for any storage and computing unit, the write clock signal of the data output interface in the storage and computing unit is synchronized with the clock signal of the storage and computing unit, and the read clock signal of the data input interface in the storage and computing unit is synchronized with the clock signal of the storage and computing unit.
[0010] A further technical solution is that the frequencies of the write clock signal and the read clock signal of each data transmission interface are the same or different, and the write clock signal and the read clock signal are synchronous or asynchronous.
[0011] A further technical solution is that each storage and calculation unit executes a number of instructions in sequence according to the respective instruction execution order, the first storage and calculation unit sends the target data generated after executing the first target instruction to the second storage and calculation unit, and the second storage and calculation unit executes the second target instruction according to the acquired target data;
[0012] When the second storage and computing unit executes according to its own instruction execution order, it determines according to the instruction execution order of the first storage and computing unit that after the first storage and computing unit completes the execution of the first target instruction, it reads the target data from the memory connected to the data input interface of the first storage and computing unit and continues to execute the second target instruction and subsequent instructions.
[0013] Its further technical solution is that each data transmission interface also includes a write status port and a read status port;
[0014] The first storage and computing unit as the data sender reads the write status signal of the data output interface through the write status port of the data output interface, determines that the memory in the data output interface is not full and writes data to the memory in the data output interface when reading the write status signal of the valid level, and determines that the memory in the data output interface is full and continues to wait when reading the write status signal of the invalid level;
[0015] The second storage and computing unit, which serves as the data receiver, reads the read status signal of the data input interface through the read status port of the data input interface. When a read status signal of a valid level is read, it determines that the memory in the data input interface is not empty and reads data from the memory in the data input interface. When a read status signal of an invalid level is read, it determines that the memory in the data input interface is empty and continues to wait.
[0016] Its further technical solution is that when the second storage and computing unit executes the second target instruction and determines that the first storage and computing unit has not yet completed the execution of the first target instruction, and there is at least one instruction in the instructions executed by the second storage and computing unit after the second target instruction that does not depend on the target data and the intermediate data generated by the second target instruction, the second storage and computing unit adjusts the instruction execution order, first skips the second target instruction and executes the instructions after the second target instruction that do not depend on the target data and the intermediate data generated by the second target instruction, until it is determined that the first storage and computing unit has completed the execution of the first target instruction, then reads the target data from the memory connected to the data input interface of the first storage and computing unit and continues to execute the second target instruction and the remaining instructions after the second target instruction.
[0017] Its further technical solution is that multiple storage and computing units in the storage and computing architecture FPGA have data transmission relationships to form a global data flow. Then, each storage and computing unit that the global data flow passes through in turn adjusts its own instruction execution order in turn. After the corresponding first storage and computing unit that serves as a data sender adjusts the fixed instruction execution order, any second storage and computing unit that serves as a data receiver adjusts its own instruction execution order according to the instruction execution order of the corresponding first storage and computing unit that serves as a data sender.
[0018] A further technical solution is that the second storage and calculation unit as the data receiving party reads the read status signal of the data input interface at predetermined time intervals, and reads data from the memory of the data input interface when the read status signal of the valid level is read;
[0019] Alternatively, an interrupt signal is generated when the read status signal of the data input interface changes from an invalid level to a valid level, and the second storage unit as the data receiver reads data from the memory of the data input interface under the triggering of the interrupt signal.
[0020] A further technical solution is that any one of the data transmission interfaces is implemented by a dual-port FIFO memory or an asynchronous register.
[0021] Its further technical solution is that the data output interface of the first storage and computing unit for realizing data transmission and the data input interface of the second storage and computing unit are both connected to the NOC network, and the data output interface of the first storage and computing unit sends data to the data input interface of the second storage and computing unit via the NOC network.
[0022] Its further technical solution is that the storage and computing architecture FPGA is a multi-die structure and includes an FPGA die and a storage die. The first storage and computing unit and the second storage and computing unit are formed on the same FPGA die or on different FPGA die. The data output interface of the first storage and computing unit is connected to the storage die, and the data input interface of the second storage and computing unit is connected to the storage die. The data output interface of the first storage and computing unit sends data to the data input interface of the second storage and computing unit via the storage die.
[0023] The beneficial technical effects of this application are:
[0024] The present application discloses a storage-computing architecture FPGA with high data transmission efficiency. In the storage-computing architecture FPGA, resource modules located in the same sub-area are connected through interconnection resources inside the FPGA to realize a storage-computing unit. The storage-computing units transmit data to other storage-computing units through specific data transmission interfaces, so that multiple storage-computing units can complete a storage-computing operation in parallel and synchronously. The overall data processing efficiency of the FPGA is high and the operation speed is fast.
[0025] The data transmission interface is implemented in an asynchronous form to meet the transmission requirements of different storage and computing units and ensure the efficiency of data transmission. Based on this data transmission interface, the storage and computing units can also reduce the idle waiting time by adjusting the instruction execution order. For the global, the instruction execution order of each storage and computing unit is adjusted in turn according to the global data flow, thereby reducing the waiting time while ensuring the accuracy of data transmission, further improving the efficiency of data transmission.
[0026] Each storage and computing unit uses a data transmission interface with a universal structure, which can simplify the design. The data transmission interface is easy to implement and does not require excessive FPGA resources.
[0027] The local storage unit in each storage unit transmits data to the outside of the FPGA chip through the global read-write channel. The processor and local storage unit of each storage unit are in the same sub-area. When executing, the processor only needs to read and write the instructions and data in the adjacent local storage unit, which reduces the wiring resources and interconnection resources consumed by data transmission between the processor and the local storage unit, reduces data transmission delay and energy loss, and improves the data processing efficiency of the FPGA. In addition, the FPGA can realize multi-core parallel storage and computing operations through multiple storage units. The processors of each storage unit will not cause conflicts with each other. Each storage unit can perform operations at full speed, which is not affected by the storage bandwidth and can be further improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of the arrangement of resource modules inside the FPGA in an example of the present application and a schematic diagram of the eight sub-areas obtained by division.
[0029] Figure 2 yes Figure 1 A circuit structure diagram of a storage and computing unit implemented by a resource module in each sub-area in the example shown.
[0030] Figure 3 It is a schematic diagram of a first storage and computing unit and a second storage and computing unit forming any data transmission path being connected via a data transmission interface.
[0031] Figure 4 yes Figure 2 Schematic diagram of the data transmission path formed between different storage and computing units in the example.
[0032] Figure 5 yes Figure 1 A circuit structure diagram of a storage and computing unit implemented by a resource module in each sub-area in the example shown.
[0033] Figure 6 yes Figure 1 A circuit structure diagram of a storage and computing unit implemented by a resource module in each sub-area in the example shown.
[0034] Figure 7 yes Figure 1 A circuit structure diagram of a storage and computing unit implemented by a resource module in each sub-area in the example shown. DETAILED DESCRIPTION
[0035] The specific implementation of the present application is further described below in conjunction with the accompanying drawings.
[0036] The present application discloses a storage and computing architecture FPGA with high data transmission efficiency. The FPGA of the present application is the same as a conventional FPGA, and includes a number of resource modules arranged in a predetermined structure and interconnection resources arranged around the resource modules. The predetermined structure can be arranged according to actual conditions. For example, taking the currently mainstream Column-Based structure as an example, the resource modules are arranged in a row and column structure to form a two-dimensional array architecture. The same type of resource modules are arranged in each column, and interconnection resources are arranged around each resource module. The types of resource modules included in the FPGA include configurable logic modules CLB, configurable storage modules BRAM, and configurable multiplication and addition modules DSP. The configurable logic module CLB contains units such as lookup tables and registers, which can be configured to implement various logical functions. The configurable multiplication and addition module DSP contains arithmetic units that can perform multiple operations such as multiplication, addition, and multi-bit logic gates. The configurable storage module BRAM contains block storage units that can implement single-port and dual-port storage and FIFO storage of various widths and depths. Please refer to Figure 1 The schematic diagram of the resource module inside the FPGA shown is a schematic diagram of the resource module inside the FPGA. This part of the structure follows the structure inside the existing FPGA and will not be elaborated in this application.
[0037] All resource modules arranged in a predetermined structure in the FPGA of the present application are divided into several sub-areas, each of which contains a certain number of resource modules. Resource modules in the same sub-area are connected through interconnection resources inside the FPGA to realize a storage and computing unit, and resource modules in multiple different sub-areas correspondingly realize multiple storage and computing units.
[0038] Each storage and computing unit includes its own processor and local storage unit. The processor in each storage and computing unit is connected to the local storage unit in the storage and computing unit via interconnection resources. The local storage unit in each storage and computing unit is used to store the instructions and data of the storage and computing unit, and the processor in each storage and computing unit is used to operate according to the instructions and data stored in the connected local storage unit.
[0039] In one embodiment, the instruction sets used by the two storage and computing units implemented by the resource modules in any two sub-areas are the same or different, and the bit widths of the two storage and computing units using the same instruction set are the same or different. In the present application, the storage and computing units formed inside the FPGA can form various typical general-purpose 8-bit processors including RISC, 8051 and 6802.
[0040] In one embodiment, the number and type of resource modules contained in any two sub-areas obtained by division are the same, or in another embodiment, the number and type of resource modules contained in any two sub-areas obtained by division are at least one different, that is, the multiple sub-areas obtained by division may be completely the same or not necessarily the same. In addition, each resource module in the FPGA belongs to a sub-area, all resource modules in the FPGA are divided into corresponding sub-areas, or some resource modules in the FPGA are divided into corresponding sub-areas, that is, the FPGA can be divided into sub-areas globally or locally. For example, Figure 1 In the example shown, the resource modules inside the FPGA are divided into 8 sub-areas, each of which contains the same number and type of resource modules, and each area framed by a dotted box represents a sub-area obtained by the division.
[0041] This application does not limit the number and type of resource modules contained in each sub-area, but the number and type of resource modules contained in each sub-area must be sufficient to implement the processor and local storage unit in a storage and computing unit. The processor in a storage and computing unit is mainly implemented based on DSP, and the storage unit in a storage and computing unit is mainly implemented based on BRAM. In addition, a certain number of CLBs are also required.
[0042] In addition to resource modules and interconnection resources, the FPGA of the present application also adds additional hardware resources to implement global read and write channels compared to conventional FPGAs. The local storage unit in each storage unit transmits data to the FPGA chip through the global read and write channels. Figure 1 The resource modules in each sub-area shown implement a storage and computing unit. Figure 1 The schematic diagram of the implemented storage and computing unit is as follows Figure 2 shown.
[0043] The FPGA of this architecture of the present application forms multiple storage and computing units inside, and each storage and computing unit supports independent storage and computing operations in the form of a soft core. Therefore, the FPGA can jointly realize a multi-core storage and computing operation through multiple storage and computing units formed inside. Since the processor and local storage unit of each storage and computing unit are in the same sub-area, the processor only needs to read and write instructions and data in the adjacent local storage unit during execution, thereby reducing the wiring resources and interconnection resources consumed by transmitting data between the processor and the local storage unit, reducing data transmission delays and energy losses, and improving the data processing efficiency of the FPGA. In addition, in a multi-core scenario, if multiple computing cores read and write the same main memory at the same time, the read and write bandwidth of the main memory forms a bottleneck, restricting the data processing efficiency. This problem will be particularly obvious in high-performance computing. For FPGAs that support artificial intelligence or machine learning applications, the FPGA generally has a large number of relatively simple computing cores inside, and the number of computing cores will exceed 100. The demand for the read and write bandwidth of the main memory is greater, and the problem is more prominent. The FPGA of the present application is also a multi-core scenario. Since the processors in each storage and computing unit read and write the local storage unit, instead of all processors reading and writing the same memory, the processors of each storage and computing unit will not conflict with each other. Each storage and computing unit can perform operations at full speed, which is not affected by the storage bandwidth, which is conducive to improving the overall data processing efficiency and operation speed. This makes the FPGA of the present application applicable to scenarios with a large number of storage and computing units, and even if the number of storage and computing units exceeds 100, it can have a high operation rate, so as to better support artificial intelligence and machine learning scenarios.
[0044] Based on this structure, the FPGA of the present application implements a storage-computation operation through multiple storage-computation units, including: first, the parameters of each storage-computation unit are written from outside the FPGA chip to the local storage unit of the corresponding storage-computation unit via the global read-write channel, and the parameters written to the local storage unit of each storage-computation unit include the instructions and / or data of the storage-computation unit, that is, only instructions or data can be written to the storage-computation unit, or instructions and data can be written at the same time. Start each storage-computation unit to operate in parallel at the same time, and the processor in each storage-computation unit performs operations according to the instructions and data in the local storage unit of the storage-computation unit, and stores the operation results in the local storage unit of the storage-computation unit. Then, the operation results in the local storage units of each storage-computation unit can be read out of the FPGA chip via the global read-write channel. In addition, according to actual needs, the local storage unit in a storage-computation unit can also be connected to other BRAM modules inside the FPGA via the interconnection resources of the FPGA to realize data exchange.
[0045] On this basis, according to actual needs, the FPGA can sequentially implement multiple storage and calculation operations through the internal storage and calculation units until all operations are completed. And when the FPGA implements any storage and calculation operation, the corresponding parameters are written from outside the FPGA chip to the local storage units of all storage and calculation units, or to the local storage units of some storage and calculation units. Similarly, the parameters here include the instructions and / or data of the storage and calculation units. All storage and calculation units or some storage and calculation units are started to perform parallel operations at the same time. Then the calculation results in the local storage units of all storage and calculation units or the calculation results in the local storage units of some storage and calculation units are read out to the outside of the FPGA chip. That is, when multiple storage and calculation operations are implemented, each storage and calculation operation can use all the storage and calculation units formed inside the FPGA, or only use some storage and calculation units and skip other storage and calculation units. When using some storage and calculation units, the same or different storage and calculation units can also be used multiple times. In addition, each storage and calculation operation can adjust the parameters written to each storage and calculation unit. Each storage and calculation operation can read the calculation results of all or some storage and calculation units. That is, the processes of executing multiple storage and computing operations are basically similar, but each storage and computing operation can flexibly adjust the data reading and writing of each storage and computing unit, without the need to perform the same data reading and writing operations on the local storage units in all storage and computing units every time.
[0046] In the process of parallel and synchronous execution of a storage and computing operation by multiple storage and computing units formed inside the FPGA, there is often a data transmission relationship between different storage and computing units, that is, the intermediate data obtained by the operation of a certain storage and computing unit will be transmitted to other storage and computing units to participate in the operation. In order to reduce the design difficulty and improve the data transmission efficiency between different storage and computing units, the storage and computing units formed in the storage and computing architecture FPGA of the present application and having a data transmission relationship with other storage and computing units are also formed with a data transmission interface through the resource module of the corresponding sub-area. The data transmission interface is specifically used for data transmission between storage and computing units. A data transmission interface can be implemented as a data output interface so that data is output from the storage and computing unit, or a data transmission interface can be implemented as a data input interface so that data is input to the storage and computing unit. Each storage and computing unit includes one or more data transmission interfaces. When a storage and computing unit includes multiple data transmission interfaces, the types of these multiple data transmission interfaces are the same or different. Therefore, each storage and computing unit includes a data transmission interface DOUT formed as a data output interface and / or a data transmission interface formed as a data input interface DIN.
[0047] The structures of the data transmission interfaces in the storage and computing units are the same, that is, the storage and computing units in the storage and computing architecture FPGA of the present application all use the same data transmission interface, which is highly versatile and can simplify the design. Each data transmission interface includes a memory and has a write data port WD, a write clock port WCK, a read data port RD, and a read clock port RCK.
[0048] For any two storage computing units that have a data transmission relationship, the data output interface DOUT of the first storage computing unit as the data sender is connected to the data input interface DIN of the second storage computing unit as the data receiver to form a data transmission path, such as Figure 3 As shown. Based on the formed data transmission path, the first storage unit writes data into the memory in the data output interface DOUT of the first storage unit through the write data port WD under the control of the write clock signal wclk of the write clock port WCK, and writes data into the memory in the data input interface DIN of the second storage unit in a first-in-first-out manner. The second storage unit reads data from the memory in the data input interface DIN of the second storage unit in a first-in-first-out manner through the read data port RD under the control of the read clock signal rclk of the read clock port RD, thereby realizing data transmission from the first storage unit to the second storage unit.
[0049] For any storage unit, the write clock signal wclk of the data output interface DOUT in the storage unit is synchronized with the clock signal of the storage unit, and the read clock signal rclk of the data input interface DIN in the storage unit is synchronized with the clock signal of the storage unit. Figure 3 Taking the data transmission path between the first storage computing unit and the second storage computing unit shown as an example, the write clock signal wclk of the data output interface DOUT of the first storage computing unit is synchronized with the clock signal of the first storage computing unit, and the read clock signal rclk of the data input interface DIN of the second storage computing unit is synchronized with the clock signal of the second storage computing unit.
[0050] However, the frequency of the write clock signal wclk of each data transmission interface is the same or different from that of the read clock signal rclk, and the write clock signal wclk is synchronous or asynchronous with the read clock signal rclk, that is, the data transmission interface of the present application realizes asynchronous data transmission. Based on this feature, the data writing frequency of the first storage unit at both ends of any transmission path is the same or different from the data reading frequency of the second storage unit, and the data reading and writing of the first storage unit and the second storage unit are synchronous or asynchronous, which reduces the design difficulty and can meet the application requirements of different numbers of data to be transmitted between different storage units.
[0051] In addition, each data transmission interface also includes a write enable port WEN and a read enable port REN. Any first storage and computing unit can enable the data output interface through the write enable port WEN, and any second storage and computing unit can enable the data input interface through the read enable port REN.
[0052] The data transmission method implemented by the first storage and calculation unit and the second storage and calculation unit using the data transmission path formed based on the data transmission interface includes the following implementation methods:
[0053] (1) Each data transmission interface further includes a write status port WS and a read status port RS. When the memory of the data transmission interface is not full, the write status port is a write status signal of a valid level, and when the memory of the data transmission interface is full, the write status port is a write status signal of an invalid level. When the memory of the data transmission interface is not empty, the read status port is a read status signal of a valid level, and when the memory of the data transmission interface is empty, the read status port is a read status signal of an invalid level.
[0054] Any first storage and calculation unit as a data sender reads the write status signal of the data output interface DOUT through the write status port of the data output interface DOUT, determines that the memory in the data output interface is not full and writes data to the memory in the data output interface when a write status signal of a valid level is read, and determines that the memory in the data output interface is full and continues to wait when a write status signal of an invalid level is read. Any second storage and calculation unit as a data receiver reads the read status signal of the data input interface through the read status port of the data input interface DIN, determines that the memory in the data input interface is not empty when a read status signal of a valid level is read, and determines that the memory in the data input interface is empty and continues to wait when a read status signal of an invalid level is read.
[0055] Therefore, for any data transmission path formed, the first storage and computing unit as the data sender writes data to its own data output interface DOUT when reading a write status signal of a valid level, and the second storage and computing unit as the data receiver reads data from its own data input interface DIN when reading a read status signal of a valid level.
[0056] There are two main mechanisms for any second storage unit as a data receiver to determine the read status signal of the data input interface DIN: (a) Method 1, the second storage unit actively reads the read status signal of the data input interface DIN at a predetermined time interval, and reads data from the memory of the data input interface when a read status signal of a valid level is read. (b) Method 2, an interrupt signal is generated when the read status signal of the data input interface changes from an invalid level to a valid level, and the second storage unit as a data receiver reads data from the memory of the data input interface under the triggering of the interrupt signal.
[0057] (2) In the data processing application of storage and computing operations, the processing methods of each storage and computing unit are known in advance, the instruction execution order used by each storage and computing unit to execute several instructions in sequence is also known in advance, and each storage and computing unit needs to send data to other storage and computing units or receive data sent by other storage and computing units when executing the instruction. Therefore, the reading and writing mechanism can be determined by this information. In the process of each storage and computing unit executing several instructions in sequence according to its own instruction execution order, for the first storage and computing unit and the second storage and computing unit at both ends of any data transmission path, according to the processing logic of the data processing application, when it is known in advance that the first storage and computing unit needs to send the target data generated after executing the first target instruction to the second storage and computing unit, and the second storage and computing unit needs to execute the second target instruction based on the acquired target data:
[0058] When the second storage unit is executing according to its own instruction execution order, it can naturally determine that the first storage unit has sent the target data to the data input interface of the connected second storage unit after the first storage unit has completed the execution of the first target instruction according to the instruction execution order of the first storage unit. Then the second storage unit reads the target data from the memory connected to the data input interface of the first storage unit and continues to execute the second target instruction and subsequent instructions. Otherwise, it waits after executing the instruction before the second target instruction until the first storage unit completes the execution of the first target instruction and the second storage unit reads the target data before continuing to execute the second target instruction and subsequent instructions.
[0059] For example, according to the processing logic of the data processing application, it can be known in advance that the instruction execution order of the first storage unit is instructions I1, I2, I3, I4, I5, and I6, and the instruction execution order of the second storage unit is J1, J2, J3, J4, J5, J6, J7, J8, and J9, where instruction I4 is the first target instruction and instruction J2 is the second target instruction. The first storage unit executes instructions I1, I2, I3, and I4 in sequence before writing the target data generated after executing instruction I4 to the data input interface of the connected second storage unit through the data output interface. After executing instruction J1, the second storage unit waits until it is determined that the first storage unit has executed instruction I4, reads the target data from the data input interface, and continues to execute instructions J2, J3, and J4.
[0060] Regardless of which of the above methods is used to implement data transmission between the two storage and computing units, it can be seen based on the above examples that, especially when the first target instruction is located at a later position in the instruction execution order of the first storage and computing unit, the second storage and computing unit may idle to wait for the target data. For example, in the above example, after executing instruction J1, the second storage and computing unit may need to idle for a long time until the first storage and computing unit executes four instructions in sequence before continuing to execute the next instruction J2. When the time delay between the moment when the first storage and computing unit executes the first target instruction and the moment when the second storage and computing unit executes the second target instruction is significantly different, it will affect the data transmission efficiency.
[0061] Therefore, in another embodiment, when the second storage and computing unit executes the second target instruction and determines that the first storage and computing unit has not yet completed the execution of the first target instruction, and there is at least one instruction among the instructions executed by the second storage and computing unit after the second target instruction that does not depend on the target data sent by the first storage and computing unit and the intermediate data generated by the second target instruction, the second storage and computing unit adjusts the order of instruction execution, first skips the second target instruction and executes the instructions after the second target instruction that do not depend on the target data and the intermediate data generated by the second target instruction, until it is determined that the first storage and computing unit has completed the execution of the first target instruction, and then reads the target data from the memory connected to the data input interface of the first storage and computing unit and continues to execute the second target instruction and the remaining instructions after the second target instruction.
[0062] For example, in the above example, assuming that the instructions J3, J4, J5, J6, and J7 executed by the second storage unit do not depend on the target data generated by the first storage unit executing the instruction I4, nor on the intermediate data generated by the second storage unit executing the instruction J2, it means that the instructions J3, J4, J5, J6, and J7 have no specific execution order requirements with the instruction J2. Therefore, after executing the instruction J1, since the first storage unit has not yet completed the execution of the instruction I4, the second storage unit can skip J2 and directly execute the instructions J3, J4, J5, J6, and J7 in sequence. Assuming that after the second storage unit executes the instruction J5, it is determined that the first storage unit has executed the instruction I4, then the second storage unit reads the target data from the data input interface, executes the instruction J2 according to the target data, and then continues to execute the remaining instructions J6, J7, J8, and J9 in sequence. Therefore, the actual instruction execution order of the second storage and computing unit is J1, J3, J4, J5, J2, J6, J7, J8 and J9, which can reduce the waiting time of the second storage and computing unit and improve data transmission efficiency and computing efficiency without affecting the data transmission process and calculation results between the two storage and computing units.
[0063] In actual applications, there is often a need for data transmission between multiple groups of storage and computing units in the storage and computing architecture FPGA. Each storage and computing unit can act as a data sender to send data to one or more other storage and computing units, and can also act as a data receiver to receive data sent by one or more other storage and computing units. For example, Figure 2 In the 8 storage and computing units in the example, the data transmission relationship between different storage and computing units is as follows: Figure 4 As shown, storage unit 1 sends data to storage unit 2 and storage unit 5, and storage unit 1 also receives data sent by storage unit 2 and storage unit 5. The data transmission relationship between other storage units is as follows: Figure 4 As shown. Based on the data transmission relationship between different storage and computing units, the data transmission relationship of multiple storage and computing units in the storage and computing architecture FPGA forms a global data flow in sequence. The global data flow passes through multiple storage and computing units in sequence, indicating the transmission direction and order of a set of data between various storage and computing units. For example, Figure 4 In the embodiment, the data generated by storage and computing unit 1 is sent to storage and computing unit 2, and the result obtained by storage and computing unit 2 based on the data operation of storage and computing unit 1 is transmitted to storage and computing unit 3, thereby forming a global data flow of storage and computing unit 1-storage and computing unit 2-storage and computing unit 3. For any storage and computing unit, after the storage and computing unit adjusts the actual instruction execution order according to the method provided in the above embodiment, if the data sender of the storage and computing unit adjusts the instruction execution order again, it will cause an error in the data processing sequence. Therefore, the present application makes a global adjustment to all storage and computing units, and each storage and computing unit that the global data flow passes through in turn adjusts its own instruction execution order in turn. Any second storage and computing unit that serves as a data receiver adjusts its own instruction execution order according to the instruction execution order of the corresponding first storage and computing unit that serves as a data sender after the corresponding first storage and computing unit that serves as a data sender adjusts the fixed instruction execution order. In practical applications, the data transmission relationship between all storage and computing units is abstracted into a directed graph, each storage and computing unit is a node in the directed graph, and the directed edge between two nodes represents the data transmission path formed between the two nodes. Then, the nodes in the directed graph are sorted in topological order to determine the order in which the execution of instructions is adjusted for each storage and computing unit in sequence. For example, following the above example, for the global data flow of storage and computing unit 1-storage and computing unit 2-storage and computing unit 3, when storage and computing unit 2 adjusts the fixed instruction execution order, storage and computing unit 3 adjusts its own instruction execution order based on the instruction execution order adjusted by storage and computing unit 2, and so on, to ensure the accuracy of the data sequence.
[0064] Based on the above design, each data transmission interface in each storage and computing unit has multiple implementation methods. A typical implementation method is that any data transmission interface is implemented by a dual-port FIFO memory. The storage requirement of the dual-port FIFO memory is not very large, so there is no need to occupy the BRAM module to implement it. It can be implemented by the distributed RAM of the SLICEM resources in the CLB module. Therefore, the data transmission interface will not occupy too many FPGA resources. The read and write depth of the dual-port FIFO memory is related to the write clock signal and the read clock signal, as well as the data transmission rate and the response speed of the storage and computing unit. A common practice is to set the read and write depth of the dual-port FIFO memory to 1. The data width of the dual-port FIFO memory is generally the same as the soft core data width implemented by the storage and computing unit to which it belongs. A common practice is to set the data width of the dual-port FIFO memory to 8.
[0065] In addition, any data transmission interface can be implemented by an asynchronous register in the form of a handshake signal plus a register. Compared with a dual-port FIFO memory, fewer resource modules are required to implement this structure, further reducing the occupied FPGA resources.
[0066] When the data output interface of any first storage and computing unit is the same as the data input interface of the corresponding second storage and computing unit, it is realized through the interconnection resources of the FPGA. In another embodiment, the data output interface of the first storage and computing unit and the data input interface of the second storage and computing unit for data transmission are both connected to the NOC network. The data output interface of the first storage and computing unit sends data to the data input interface of the second storage and computing unit via the NOC network, thereby improving data transmission efficiency.
[0067] In addition, the storage and computing architecture FPGA can also be a multi-die structure. Then the storage and computing architecture FPGA is a multi-die structure and includes an FPGA die and a storage die. The FPGA die and the storage die can each include one or more. The first storage and computing unit and the second storage and computing unit are formed on the same FPGA die or on different FPGA dies. The data output interface of the first storage and computing unit is connected to the storage die, and the data input interface of the second storage and computing unit is connected to the storage die. The data output interface of the first storage and computing unit sends data to the data input interface of the second storage and computing unit via the storage die.
[0068] In one embodiment, when the predetermined structure adopted by the resource module arrangement inside the FPGA is a Column-Based structure, the BRAM module occupies one or more columns, and the local storage units in each storage and computing unit are implemented based on the BRAM module. Therefore, the BRAM module used to implement the local storage unit in each storage and computing unit is located in one or more columns, and the local storage unit in the storage and computing unit and several BRAM modules located in the same column are used to implement data transmission with the FPGA chip outside via the same global read-write channel. The FPGA chip can exchange data with any local storage unit connected to the global read-write channel via each global read-write channel. Based on this, the present application provides the following two methods to implement data transmission between the local storage unit in each storage and computing unit and the FPGA chip outside:
[0069] In one embodiment, several BRAM modules located in the same column and used to implement local storage units in the storage and computing units are connected to an on-chip read / write interface of the FPGA through the same global read / write channel to perform data transmission with the outside of the FPGA, and different global read / write channels are connected to different on-chip read / write interfaces of the FPGA. Figure 2 In the example shown, 8 storage and computing units are formed inside the FPGA. The local storage units in storage and computing units 1 to 4 are implemented by BRAM modules located in the same column. The local storage units of these 4 storage and computing units are connected to the on-chip read-write interface 1 of the FPGA through the global read-write channel 1 to realize data transmission with the outside of the FPGA. The local storage units in storage and computing units 5 to 8 are implemented by BRAM modules located in the same column. The local storage units of these 4 storage and computing units are connected to the on-chip read-write interface 2 of the FPGA through the global read-write channel 2 to realize data transmission with the outside of the FPGA.
[0070] The method provided in the above embodiment often needs to occupy multiple on-chip read / write interfaces of the FPGA, and the on-chip read / write interface resources of the FPGA are relatively precious. Therefore, in another embodiment, only one on-chip read / write interface of the FPGA is needed to realize the local storage unit in the soft-core processor, and several BRAM modules located in the same column are connected to an active end of the multiplexer MUX through the same global read / write channel, and the fixed end of the multiplexer MUX is connected to the on-chip read / write interface of the FPGA. By selecting each active end of the multiplexer MUX, each global read / write channel can be selected, so that data can be exchanged with any local storage unit connected to the global read / write channel outside the FPGA chip via the selected global read / write channel. For example, in Figure 5 In the structure diagram shown, it corresponds to Figure 2, the local storage units in storage and computing units 1 to 4 are connected to an active end of the multiplexer MUX through the global read-write channel 1, the local storage units in storage and computing units 5 to 8 are connected to the other active end of the multiplexer MUX through the global read-write channel 2, and the fixed end of the multiplexer MUX is connected to the on-chip read-write interface of the FPGA to realize data transmission with the outside of the chip, then compared with Figure 5 The method of this embodiment only needs to occupy one on-chip read / write interface of the FPGA.
[0071] According to the traditional von Neumann architecture, the instructions and data in each storage unit are mixed and stored. However, in order to improve the data processing efficiency, in one embodiment, according to the Harvard structure, the instructions and data of each storage unit are stored separately and independently. Then the local storage unit in a storage and computing unit includes an instruction local storage unit and a data local storage unit. The instruction local storage unit is used to store the instructions of the storage and computing unit, and the data local storage unit is used to store the data of the storage and computing unit, so that the instructions and data do not interfere with each other when the processor operates, thereby improving the data processing efficiency. The instruction local storage unit is implemented by at least one BRAM module, and the data local storage unit is implemented by at least one BRAM module. Therefore, based on this, a common sub-area includes at least one DSP, two BRAMs, and 300 CLBs.
[0072] When the local storage unit in each storage and computing unit includes an instruction local storage unit and a data local storage unit, the storage size of the instruction local storage units of any two storage and computing units is the same or different, and the storage size of the data local storage units of any two storage and computing units is the same or different.
[0073] When the local storage unit in each storage unit includes an instruction local storage unit and a data local storage unit: (1) In one embodiment, the instruction local storage unit and the data local storage unit in a storage unit share the global read / write channel for data transmission, and the instruction local storage unit and the data local storage unit in the storage unit and the data local storage unit in the same column are used to transmit data with the FPGA chip via the same global read / write channel. In this embodiment, the global read / write channel can be used as follows Figure 2 The method of the embodiment shown is connected to the on-chip read / write interface of the FPGA, or according to Figure 5 The method of the embodiment shown is connected to an active terminal of the multiplexer MUX. Figure 2 Take the structure shown in the figure as an example. Figure 6As shown, the instruction local storage units and data local storage units in storage and computing units 1 to 4 are connected to the global read-write channel 1, and the instruction local storage units and data local storage units in storage and computing units 5 to 8 are connected to the global read-write channel 2. (2) Or in another embodiment, the instruction local storage units and data local storage units use their own global read-write channels respectively, and the instruction local storage units in a storage and computing unit transmit instructions via the instruction global read-write channel, and the data local storage units transmit data via the data global read-write channel. Then, the instruction local storage units in the storage and computing units and several BRAM modules in the same column transmit data with the outside of the FPGA chip via the same instruction global read-write channel, and the data local storage units in the storage and computing units and several BRAM modules in the same column transmit data with the outside of the FPGA chip via the same data global read-write channel. Similarly, in this embodiment, each instruction global read-write channel and data global read-write channel can be configured as follows: Figure 2 The method of the embodiment shown is connected to the on-chip read / write interface of the FPGA, or according to Figure 5 The method of the embodiment shown is connected to an active terminal of the multiplexer MUX. Figure 5 Take the structure shown in the figure as an example. Figure 7 The instruction local storage units in storage and computing units 1 to 4 are all connected to the instruction global read and write channel 1, the data local storage units in storage and computing units 1 to 4 are all connected to the data global read and write channel 1, the instruction local storage units in storage and computing units 5 to 8 are all connected to the instruction global read and write channel 2, the data local storage units in storage and computing units 5 to 8 are all connected to the data global read and write channel 2, the instruction global read and write channel 1, the data global read and write channel 1, the instruction global read and write channel 2 and the data global read and write channel 2 are respectively connected to an active end of the multiplexer MUX.
[0074] In another embodiment, the resource module in each sub-area is also used to implement the control signal and status signal of a corresponding storage and computing unit, the control signal is used to control the operating status of the storage and computing unit, and the status signal is used to display the operating status of the storage and computing unit. The control signal and status signal of the storage and computing unit are connected to other circuit structures inside the FPGA, or the control signal and status signal of the storage and computing unit are connected to the outside of the FPGA. That is, the control signal and status signal required by each storage and computing unit when performing storage and computing are implemented by the resource module in the corresponding sub-area.
[0075] The control signal of each storage and computing unit includes at least one of an enable signal, a clock signal, a reset signal and an interrupt signal. The enable signal is used to control the corresponding storage and computing unit to execute instructions or stop executing instructions. The reset signal is used to reset the storage and computing unit. The interrupt signal provides external interrupt capability. The control signals of any two storage and computing units are the same or different.
[0076] The above is only a preferred embodiment of the present application, and the present application is not limited to the above embodiments. It is understood that other improvements and changes directly derived or associated by those skilled in the art without departing from the spirit and concept of the present application should be considered to be included in the protection scope of the present application.
Claims
1. A storage and computing architecture FPGA with high data transmission efficiency, characterized in that: The storage and computing architecture FPGA includes a plurality of resource modules arranged in a predetermined structure and interconnection resources arranged around the resource modules. The resource modules located in the same sub-area are connected through the interconnection resources inside the FPGA to realize a storage and computing unit. Each storage and computing unit includes a processor and a local storage unit connected through the interconnection resources. The local storage unit in each storage and computing unit is used to store instructions and data of the storage and computing unit, and the processor is used to perform operations according to the instructions and data stored in the connected local storage unit. The storage and computing units that have data transmission relationships with other storage and computing units also form a data transmission interface through the resource module of the corresponding sub-area, and the storage and computing units include a data transmission interface formed as a data output interface and / or a data transmission interface formed as a data input interface; the structures of the data transmission interfaces of the storage and computing units are the same, and each of the data transmission interfaces includes a memory and has a write data port, a write clock port, a read data port, and a read clock port; For any two storage computing units that have a data transmission relationship, the data output interface of the first storage computing unit as the data sender is connected to the data input interface of the second storage computing unit as the data receiver, the first storage computing unit writes data into the memory in the data output interface through the write data port under the control of the write clock signal of the write clock port, and writes data into the memory in the data input interface of the second storage computing unit in a first-in-first-out manner, and the second storage computing unit reads data from the memory of the data input interface in a first-in-first-out manner through the read data port under the control of the read clock signal of the read clock port, thereby realizing data transmission from the first storage computing unit to the second storage computing unit; Each storage and computing unit executes several instructions in sequence according to its own instruction execution order. The first storage and computing unit sends the target data generated after executing the first target instruction to the second storage and computing unit, and the second storage and computing unit executes the second target instruction according to the acquired target data. In the process of executing according to its own instruction execution order, the second storage and computing unit determines that after the first storage and computing unit completes the execution of the first target instruction, it reads the target data from the memory connected to the data input interface of the first storage and computing unit and continues to execute the second target instruction and subsequent instructions according to the instruction execution order of the first storage and computing unit. When the second storage and computing unit executes the second target instruction, it determines the first When the storage and computing unit has not yet completed the execution of the first target instruction, and there is at least one instruction among the instructions executed by the second storage and computing unit after the second target instruction that does not depend on the target data and the intermediate data generated by the second target instruction, the second storage and computing unit adjusts the order of instruction execution, first skips the second target instruction and executes the instructions after the second target instruction that do not depend on the target data and the intermediate data generated by the second target instruction, until it is determined that the first storage and computing unit has completed the execution of the first target instruction, and then reads the target data from the memory connected to the data input interface of the first storage and computing unit and continues to execute the second target instruction and the remaining instructions after the second target instruction.
2. The storage-computing architecture FPGA according to claim 1, characterized in that: For any storage and computing unit, the write clock signal of the data output interface in the storage and computing unit is synchronized with the clock signal of the storage and computing unit, and the read clock signal of the data input interface in the storage and computing unit is synchronized with the clock signal of the storage and computing unit.
3. The storage-computing architecture FPGA according to claim 1, characterized in that: The write clock signal of each data transmission interface has the same or different frequencies as the read clock signal, and the write clock signal is synchronous or asynchronous with the read clock signal.
4. The storage-computing architecture FPGA according to claim 1, characterized in that: Each of the data transmission interfaces also includes a write status port and a read status port; The first storage and computing unit as the data sender reads the write status signal of the data output interface through the write status port of the data output interface, determines that the memory in the data output interface is not full and writes data to the memory in the data output interface when a write status signal of a valid level is read, and determines that the memory in the data output interface is full and continues to wait when an invalid level write status signal is read; The second storage and computing unit, which serves as a data receiver, reads a read status signal of the data input interface through the read status port of the data input interface, and when a read status signal of a valid level is read, determines that the memory in the data input interface is not empty, reads data from the memory in the data input interface, and when an invalid level read status signal is read, determines that the memory in the data input interface is empty and continues to wait.
5. The storage-computing architecture FPGA according to claim 1, characterized in that: The multiple storage and computing units in the storage and computing architecture FPGA have data transmission relationships to form a global data flow. The storage and computing units that the global data flow passes through in sequence adjust their respective instruction execution orders in sequence. Any second storage and computing unit that serves as a data receiver adjusts its own instruction execution order according to the instruction execution order of the corresponding first storage and computing unit that serves as a data sender after the corresponding first storage and computing unit that serves as a data sender adjusts the fixed instruction execution order.
6. The storage-computing architecture FPGA according to claim 4, characterized in that: The second storage and calculation unit as the data receiving party reads the read status signal of the data input interface at predetermined time intervals, and reads data from the memory of the data input interface when the read status signal of the effective level is read; Alternatively, an interrupt signal is generated when the read status signal of the data input interface changes from an invalid level to a valid level, and the second storage unit as the data receiver reads data from the memory of the data input interface under the triggering of the interrupt signal.
7. The storage-computing architecture FPGA according to claim 1, characterized in that: Any data transmission interface is implemented by a dual-port FIFO memory or an asynchronous register.
8. The storage-computing architecture FPGA according to claim 1, characterized in that: The data output interface of the first storage and computing unit that realizes data transmission and the data input interface of the second storage and computing unit are both connected to the NOC network, and the data output interface of the first storage and computing unit sends data to the data input interface of the second storage and computing unit via the NOC network.
9. The storage-computing architecture FPGA according to claim 1, characterized in that: The storage and computing architecture FPGA is a multi-die structure and includes an FPGA die and a storage die. The first storage and computing unit and the second storage and computing unit are formed on the same FPGA die or on different FPGA die. The data output interface of the first storage and computing unit is connected to the storage die, and the data input interface of the second storage and computing unit is connected to the storage die. The first storage and computing unit sends data to the data input interface of the second storage and computing unit via the storage die through the data output interface.
