The invention discloses a reconfigurable
systolic array tensor IP core based on an FPGA. The architecture comprises a core controller, a shift
distributor, a
data processing array and a four-stage
data cache. The
tensor core can adapt to general
tensor multiplication and addition operations in Prefill and Decode stages of the generative neural network at the same time through reconfigurable design. The core controller receives the tensor multiplication instruction and the configuration information and decouples the tensor multiplication instruction and the configuration information according to a
data stream to generate a plurality of block tensor multiplication instructions. The shift
distributor decodes a block tensor multiplication instruction, decoded mode information controls data communication between a first-level cache and a second-level cache (Distrided RAM and Bram), a
control signal of a
data processing array is generated, and the
control signal enters the array together with data to flow. And the
data processing array is connected with different secondary BRAM caches according to the received configuration information and is used for
processing data in a bubble-free pulsating flow manner. The four-stage
data cache realizes the multi-stage pinpong operation of the loading of the operation data of the tensor operation core, and realizes the multi-stage pipeline design of the data from the off-
chip HBM to the on-
chip URAM, from the URAM to the BRAM and from the BRAM to the operation unit. Aiming at a single-user edge end generation type network reasoning task, a core controller generates a data
processing unit mode configuration
signal in a fine-grained (tensor element level) manner, and the data
processing unit mode configuration
signal is transmitted by a shift
distributor and flows in parallel with operation data, so that the mode configuration efficiency and the hardware
resource utilization rate are greatly improved, the problem of high fan-out caused by broadcast control is reduced, and the user experience is improved. A
control flow is designed by means of the structural characteristics of the
systolic array, and a complex
control algorithm is realized with
low resource occupation.