High-bitwidth vector accelerator and general-purpose processor based on array structure

By adopting a high bit-width vector accelerator based on array structure in neural network accelerator, the data exchange path is simplified and the open source instruction set is supported, and the circuit complexity and low efficiency caused by multi-cache connections are solved, and efficient computing and design is achieved .

CN118519961BActive Publication Date: 2024-11-15STORAGEX TECHNOLOGY INC
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410969197.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-19
Publication Date
2024-11-15
Estimated Expiration
2044-07-19

AI Technical Summary

Technical Problem

The existing neural network accelerators have complex circuit design, low programming efficiency and high cost due to multi-cache and multi-level connection relationships.

Method used

The high-bit-width vector accelerator design based on array structure is adopted. Through the cascading structure of vector acceleration module and instruction module, the data exchange path is simplified, the bus connection is reduced, the flexible and configurable vector computing unit is realized, and the open source instruction set is supported.

Benefits of technology

It improves computing efficiency and chip design efficiency, reduces programming complexity and circuit area, and achieves high-performance general computing capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118519961B_ABST
    Figure CN118519961B_ABST
Patent Text Reader

Abstract

The present application discloses a high-bit-width vector accelerator and general-purpose processor based on an array structure, which relates to the field of accelerators, including a vector acceleration module and an instruction module; the instruction module caches compiled instruction data, and sends an instruction stream to the vector acceleration module according to the timing; the vector acceleration module contains L rows of vector acceleration blocks with the same structure, and the vector acceleration blocks in adjacent rows are cascaded in sequence through a unidirectional instruction signal line, and the instruction stream sent into the instruction module is transmitted row by row to the L-row vector acceleration blocks according to the timing; the L-row vector acceleration blocks are respectively provided with at least two data input / output terminals, which respectively receive external data input, and execute vector acceleration tasks and data output according to the instructions transmitted to the row. Based on the improved vector calculation unit, the array structure is adopted to realize the design of a flexible and configurable high-bit-width vector accelerator, and support open source instruction sets, providing high-performance general computing capabilities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of accelerators, and in particular to a high-bit-width vector accelerator and a general-purpose processor based on an array structure. Background Art

[0002] In modern society and industry, such as the Internet, big data, the Internet of Things, and autonomous driving, the use of artificial intelligence based on neural networks can greatly improve efficiency and reduce costs, and its use is becoming increasingly widespread. The calculations within the neural network can be run using general computing technology such as general computing CPUs, but the efficiency is relatively low. Therefore, the industry usually uses specialized processors to accelerate the calculation of neural networks, generally called neural network accelerators, or artificial intelligence chips (AI chips).

[0003] At present, the mainstream neural network accelerators in the industry are mainly general-purpose computing graphics processors (GPGPUs), there are also accelerators based on reduced instruction set processors (RISC) cores, and special-purpose accelerators that use systolic arrays combined with general-purpose computing cores (collectively referred to as DSA, such as Google's TPU chip). Taking DSA accelerators as an example, there are usually several computing cores inside the chip, and there will be multiple or multiple memories. The architecture of this type of accelerator is generally composed of multiple computing components or computing cores. The cores can complete the overall operation through coordinated calculations; a single computing component or computing core has an independent local cache and buffer; multiple computing components or computing cores exchange data through multi-level, multi-block buffers (L1 and L2Buffer). This type of mainstream design usually has duplicate storage, and the bus connection between multiple caches increases the complexity of circuit design; the interactive execution of tasks between multiple caches greatly increases the complexity of the compiler; the inconsistent length of the paths between multiple caches leads to uncertain data exchange delays, affecting programming efficiency; the multi-level connection relationship between multiple caches leads to low scaling efficiency, which in turn greatly reduces the design reuse of chips with different computing power. The above problems will result in excessive circuit area or complex programming methods, which will have a negative impact on chip cost and efficiency. Summary of the invention

[0004] The embodiments of the present application provide a high-bit-width vector accelerator and a general-purpose processor based on an array structure, which solve the problem that multi-caching and multi-level connection relationships lead to complex circuit design and affect chip efficiency and cost.

[0005] The present application discloses a high-bit-width vector accelerator based on an array structure, comprising a vector acceleration module and an instruction module connected to the vector acceleration module through a signal line; the instruction module caches compiled instruction data, and sends an instruction stream to the vector acceleration module according to a timing sequence;

[0006] The vector acceleration module comprises L rows of vector acceleration blocks with the same structure, and the vector acceleration blocks in adjacent rows are cascaded in sequence through unidirectional instruction signal lines, and the instruction stream sent into the instruction module is transmitted row by row to the vector acceleration blocks in the L rows according to the timing;

[0007] The L-row vector acceleration blocks are respectively provided with at least two data input / output terminals, which respectively receive external data input and execute vector acceleration tasks and data output according to the instructions transmitted to the row.

[0008] Specifically, the vector acceleration block includes a vector computing unit designed in an M-row array, a Y-group vector register group, a pair of data selectors, and a pair of data registers;

[0009] M rows of vector calculation units are respectively connected to Y groups of vector registers, read the registered data and perform vector acceleration operations according to instructions, and the output ends are respectively connected to M data input ends of two data selectors, the output end of the second data register is connected to the M+1th data input end of the first data selector, and the output end of the first data selector is connected to the first data register;

[0010] The output end of the first data register is connected to the M+1th data input end of the second data selector, and the output end of the second data selector is connected to the second data register;

[0011] The first data selector is a data input / output terminal of the vector acceleration module, and the second data selector and the second data register are another data input / output terminal of the vector acceleration module, which are respectively used to send external input data into the vector register group and output the selected data.

[0012] Specifically, the vector acceleration module further includes an instruction register. The instruction registers in adjacent vector acceleration blocks are connected via signal lines, and instruction stream data is stored and executed according to timing, and is transferred to the backward pipeline.

[0013] Specifically, the instruction register is connected to the selection control terminals of two data selectors and M-row vector calculation units. The data selector determines the selection signal and selects the data output according to the instruction. The target vector calculation unit reads the target vector register group according to the instruction and performs vector acceleration operation.

[0014] Specifically, the vector calculation unit includes Y mutually cascaded multi-format calculation units, each multi-format calculation circuit includes an integer calculation circuit, a floating-point calculation circuit and a logic calculation circuit, which are respectively used for integer calculation, floating-point calculation and logic operation.

[0015] Specifically, the Y multi-format computing units correspond one-to-one to the Y vector register groups, read data from the corresponding vector register groups according to instructions, and store intermediate data of operations.

[0016] Specifically, the instruction module includes L cascade-depth FIFO memories for storing L compiled instructions, and the FIFO memories send instructions to L row vector acceleration blocks one by one according to a timing sequence.

[0017] Specifically, the capacity of the vector register group is x bits*n, the calculation width of the vector calculation unit is 2^N bits; the value range of N is [5,10], and the value of x is 4, 8, 16, 32 or 64.

[0018] Specifically, the compilation instruction includes a mode calculation bit, a data direction bit, a unit selection bit, and a channel selection bit;

[0019] The mode calculation bit is used to control the calculation mode performed by the vector calculation unit;

[0020] The data direction bit is used to control the data output direction of the data;

[0021] The unit selection bit is used to determine the target computing unit for executing vector acceleration calculation;

[0022] The channel selection bit is used to control the data selector to select the target computing unit output.

[0023] Specifically, the calculation mode executed by the vector calculation unit includes vector addition operation, vector multiplication operation, and vector and immediate number addition operation; the instruction module outputs a compiled instruction per clock cycle, and the L-row vector acceleration block executes the same compiled instructions in sequence according to the order of the instruction stream;

[0024] In the same vector acceleration block, each vector computing unit obtains the same instruction in the same clock cycle for parallel acceleration, and different vector computing units obtain data at different positions in the same data register, or output intermediate data to the data register, or directly select the output.

[0025] On the other hand, the present application provides a general-purpose processor, which is applied to the high-bit-width vector accelerator based on the array structure mentioned in the above aspects, including a vector acceleration module, a pair of symmetrically arranged data cache modules, a pair of data exchange modules, and a pair of matrix calculation modules; the vector acceleration module, the data cache module, the data exchange module, and the matrix calculation module are respectively connected to their respective instruction modules for receiving corresponding instruction streams;

[0026] The two input / output ends of the vector acceleration module are respectively connected to two data cache modules, and the two data cache modules are respectively connected to corresponding data exchange modules; the data exchange modules are respectively connected to corresponding matrix calculation modules; the data cache module is used to interact with the L-row vector acceleration blocks in the vector acceleration module for data, and the data exchange module is used to exchange row and column data of the matrix and perform vector shift operations, and execute processor data input and output.

[0027] The beneficial effects of the technical solution provided by the embodiment of the present application include at least: based on the improved vector computing unit, the array structure is adopted to realize the flexible and configurable high-bitwidth vector accelerator design, and the open source instruction set is supported to provide high-performance general computing capabilities. Compared with the traditional vector accelerator design, the present application has great innovations in front-end design and data flow, algorithm support efficiency, and back-end physical implementation difficulty, achieving performance and efficiency improvements. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 This is a diagram of a multi-core vector acceleration architecture in related technologies;

[0029] Figure 2 This is the top-level design diagram of a high-bitwidth vector accelerator based on an array structure;

[0030] Figure 3 It is a schematic diagram of the structure of a single vector acceleration block;

[0031] Figure 4 The schematic diagram of the structure of multi-accelerator cascade is listed;

[0032] Figure 5 It is a schematic diagram of the structure of a high bit width vector accelerator based on an array structure;

[0033] Figure 6 It is a schematic diagram of the internal structure of a single vector computing unit;

[0034] Figure 7 An instruction encoding table of a compilation instruction is shown;

[0035] Figure 8 A high bit width vector accelerator structure with array design under a possible size structure is listed;

[0036] Fig. 9 It is a structural diagram of applying an accelerator to a general-purpose processor. DETAILED DESCRIPTION

[0037] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0038] The term "multiple" as used herein refers to two or more than two. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the related objects are in an "or" relationship.

[0039] Figure 1 This is a diagram of a multi-core vector acceleration architecture in related technology. The computing core of this architecture adopts a matrix array design, and a pulsating global secondary buffer is set outside the array computing core. A global controller is designed separately for the global secondary buffer to perform external buffer design. For the array computing core, each core contains instruction and data caches, namely, a first-level cache, a scalar CPU core, and a vector acceleration core. In this design structure, the vector acceleration core is tightly coupled with the scalar CPU core and cannot be programmed independently. Although the structure of each computing core is consistent and executes the same instruction set, it must have its own independent instruction circuit, which reduces the computing power density. Most importantly, the communication protocol between such computing cores is complex. Under the influence of multiple levels of internal and external buffers, the data instruction communication paths are inconsistent, resulting in inconsistent and uncertain data processing delays, which increases the difficulty of programming.

[0040] Figure 2 Based on the above problems, a high-bit-width vector accelerator based on an array structure is designed. The accelerator can be regarded as an independent vector accelerator with ultra-high bit-width structure. It is based on an improved vector calculation unit and adopts an array structure, including an instruction module and a vector acceleration module. The vector acceleration module can be divided into a vector register group and a high-bit-width vector acceleration unit according to its function. The high-bit-width vector acceleration unit is used to perform scalar and vector calculations, that is, it corresponds to the scalar CPU core and the vector acceleration core, and the vector register group is a combination of many vector registers, which is used to store the data calculated and output by the high-bit-width vector acceleration unit, including scalar data and vector data.

[0041] Specifically, the high-bit-width vector acceleration module can be designed as an array structure, that is, using vector acceleration blocks with the same L-row structure, that is, merging the vector registers with the high-bit-width vector acceleration unit. The instruction module caches the compiled instruction data and sends the instruction stream to the vector acceleration module according to the timing. The vector acceleration module contains L-row vector acceleration blocks with the same structure. The vector acceleration blocks in adjacent rows are cascaded in sequence through unidirectional instruction signal lines, and the instruction stream sent into the instruction module is passed row by row to the L-row vector acceleration blocks according to the timing. Optionally, the L-row vector acceleration blocks are respectively provided with at least two data input / output terminals, which respectively receive external data input, and execute vector acceleration tasks and data output according to the instructions passed to this row.

[0042] Figure 3It is a schematic diagram of the structure of a single vector acceleration block. The vector acceleration block includes vector computing units (VECTOR_0 to VECTOR_M-1) designed in an M-row array, Y groups of vector register groups (register group 0 to register group Y-1), a pair of data selectors and a pair of data registers.

[0043] The M rows of vector calculation units are connected to the Y groups of vector registers through programming circuits, and the corresponding relationship can be set during actual programming. The vector calculation unit reads the registered data and performs vector acceleration operations according to the instructions, and the output ends are respectively connected to the M data input ends of the two data selectors, the output end of the second data register is connected to the M+1th data input end of the first data selector MUX1, and the output end of MUX1 is connected to the first data register MUX1. The output end of the first data register is connected to the M+1th data input end of the second data selector MUX2, and the output end of MUX2 is connected to the second data register. The first data selector is a data input / output end of the vector acceleration module, and the second data selector and the second data register are another data input / output end of the vector acceleration module. Both ports can be used to send external input data into the vector register group and output the selected data.

[0044] The M data input ports of MUX1 and MUX2 are all input with vector acceleration operation output data, and the remaining port is directly connected to the data register of the other port direction. Its purpose is not to perform vector acceleration. At this time, the vector acceleration block plays the role of transfer transmission. For example Figure 4 The multi-accelerator cascade structure diagram listed can realize the intermediate transmission function among multiple high-bit-width vector accelerators of the same size for parallel processing, and directly transmit the data in the first accelerator to the corresponding acceleration block in the third accelerator, thereby realizing data exchange between accelerators.

[0045] like Figure 5 As shown, it is a structural diagram of a high-bit-width vector accelerator based on an array structure. Because the accelerator needs to realize vertical signal transmission, the vector acceleration module also includes an instruction register. The instruction registers in adjacent vector acceleration blocks are connected by signal lines, and the instruction stream data is stored and executed according to the timing, and is transmitted backward in the pipeline. Figure 5The instruction stream output by the instruction module first flows to the instruction register T0, and then flows longitudinally through T1 to TL-1 in sequence. The vector acceleration block corresponding to the instruction register performs the corresponding operation successively after receiving the instruction. To this end, in each row of the vector acceleration block, the instruction register needs to be connected to the selection control end of the two data selectors and the M-row vector calculation unit to realize the corresponding logic control. In particular, after completing the vector operation, the data needs to be selected for output or storage, or when only a specific number of data outputs are required in the M vector calculation units, it is necessary to control the data path output selected by the data selector. The specific output data will first pass through the data register, and when the data needs to be output, it will be directly output through the data register. For the intermediate data, it can be selected to be stored in the corresponding vector register group. For the relevant execution process of the input instruction, the target vector calculation unit is controlled to read the target vector register group according to the instruction, and the vector acceleration operation is performed according to the extracted data.

[0046] Assuming that a vector acceleration block executes one clock cycle by default, this instruction controls the calculation process of M*L vectors through L clock cycles. The overall logic is an ultra-high bit-width vector accelerator with a bit width of L*M*2^N (Vector bit width).

[0047] Figure 6 It is a schematic diagram of the internal structure of a single vector calculation unit, each of which includes Y mutually cascaded multi-format calculation units (PE), each of which includes an integer (Int) calculation circuit, a floating-point (FP) calculation circuit, and a logic (Logic) calculation circuit, which are used to perform integer calculations, floating-point calculations, and logic operations, respectively. The integer calculation circuit includes various structures such as multipliers and adders, and the floating-point calculation circuit includes various shaping, conversion circuits, and normalization circuits. The logic calculation circuit includes various gates and circuits, such as AND, OR gates, NOT gates, NAND gates, NOR gates, and other logic devices and circuits. The specific circuit structures of these three parts are not described in detail in this application. Y multi-format calculation units correspond one-to-one to Y groups of vector registers, and read data from the corresponding vector register group according to instructions, as well as store intermediate data of operations.

[0048] In some embodiments, the vector computing unit is designed to be a general-purpose vector computing circuit with a width of 2^N bits, where N generally ranges from [5,10], i.e., the vector bit width ranges from 32 bits to 1024 bits; and the number of vector computing units M can also be configured, ranging from 1 to M (the overall structure needs to match other computing units). The capacity of the vector register group is x bits*n in size, where x is 4, 8, 16, 32, or 64, for compatibility with bit data in various formats.

[0049] The focus of this design is to simplify circuit design, reduce compilation complexity and improve computing efficiency. The vertically distributed vector acceleration blocks are completely independent and all controlled by the instruction stream of the same instruction module. The vector acceleration units distributed inside the acceleration block execute the same instructions in one cycle to achieve unified control. The control mode is simpler and no complex control circuit is required. Based on the above structure and design principles, the compilation instructions and instruction modules can also be designed and optimized.

[0050] Because each vector acceleration block needs to be controlled sequentially through the instruction stream, the instruction module can be designed as a FIFO memory containing L cascade depths to store L compiled instructions. The FIFO memory sends instructions to L rows of vector acceleration blocks one by one according to the timing.

[0051] Considering the compatibility of compiler and other tool chains and the needs of general computing, vector computing instructions are fully compatible with the open source RISCV Vector V1.0 instruction set. For specific instruction encoding, see Figure 7 For the data types and sources of instruction operations, please refer to the open source instruction set. The bit value of the compiled instruction includes at least the mode calculation bit, data direction bit, unit selection bit, channel selection bit, etc. The mode calculation bit is used to control the calculation mode executed by the vector calculation unit; the data direction bit is used to control the data output direction; the unit selection bit is used to determine the target calculation unit for executing vector acceleration calculation; the channel selection bit is used to control the data selector to select the target calculation unit output. Figure 5 As shown in the figure, the calculation mode executed by the vector calculation unit includes vector addition, vector multiplication, and vector and immediate addition; the instruction module outputs a compiled instruction per clock cycle, and the L-row vector acceleration block executes the same compiled instructions in sequence according to the order of the instruction stream. The data output direction control can also be controlled by instructions, such as Figure 3 In the process, when left-direction output is required, the vector acceleration unit of MUX1 is controlled to output, and the data can be stored back to the vector register during intermediate storage, waiting for subsequent reading and execution.

[0052] In this scheme, the main purpose of FIFO design is to realize instruction buffering, and one instruction is output in each clock cycle. The instruction register also passes instructions backward one by one according to the clock cycle. In the same vector acceleration block, each vector calculation unit obtains the same instruction in the same clock cycle for parallel acceleration, and different vector calculation units obtain data at different positions in the same target data register, or cache intermediate data to different positions in the target register, or directly select the output. Because the vector buffer block contains M vector calculation units, and each vector calculation unit contains Y multi-format calculation units, the entire accelerator can be regarded as an acceleration architecture with multi-format calculation units as the core, forming an M*L*Y array. The vector calculation units in each column obtain the same instruction data in the order of the clock, see Figure 5 The computing units of different colors in the figure indicate that instructions arrive at different clock cycles, and the entire array completes the calculation of an instruction after L clock cycles. In addition, the data between the L rows of vector acceleration blocks are isolated from each other, that is, the data does not generate inter-block transmission. For a string of instruction streams, the M rows of vector acceleration blocks will execute the instructions in sequence, and there is only a timing difference between different vector acceleration blocks, and the timing difference is completely predictable and controllable. For example, the instruction stream is represented by {instruction A, instruction B, instruction C, and instruction D}. After being transmitted to the array, in the first clock cycle, vector acceleration block 0 first executes instruction A. In the second clock cycle, vector acceleration block 0 executes instruction B, and instruction A at this time flows to vector acceleration block 1 for execution. In the third clock cycle, instruction A flows to vector acceleration block 2 for execution, instruction B flows to vector acceleration block 1 for execution, and instruction C flows to vector acceleration block 0 for execution. For the upper-level chip control program, as long as the timing and instruction flow are planned, the instruction execution status of all buffer arrays can be determined, and in a complete execution cycle, all buffer blocks execute the tasks of the same set of instruction streams, that is, the execution tasks are exactly the same.

[0053] Figure 8 A high-bit-width vector accelerator structure with an array design under a possible size structure is listed. Under certain requirements, each vector computing unit is configured as 4 128-bit vectors, each 128-bit vector computing unit has 8 128-bit vector register groups, and the overall depth (number of rows) of the array is configured to 8. Then this array as a whole is a 128*4*8=4096-bit vector accelerator.

[0054] Fig. 9It is a structural diagram of applying the vector accelerator of the present application to a general-purpose processor, which is a pipeline accelerator, including a vector acceleration module, a pair of symmetrically arranged data cache modules, a pair of data exchange modules, and a pair of matrix calculation modules; the vector acceleration module, the data cache module, the data exchange module, and the matrix calculation module are respectively connected to their respective instruction modules for receiving corresponding instruction streams. The instruction modules here are different, and they are all input after compilation to process the pipeline units under their respective functional blocks. The pipeline units of each functional block can be executed according to the processing logic of the vector acceleration unit in the present application, that is, according to the timing pipeline execution.

[0055] The two input / output ends of the vector acceleration module are respectively connected to two data cache modules, and the two data cache modules are respectively connected to the corresponding data exchange modules; the data exchange modules are respectively connected to the corresponding matrix calculation modules. The data cache module is used to exchange data with the L-row vector acceleration block in the vector acceleration module, and the data exchange module is used to exchange the row and column data of the matrix and the vector shift operation, and execute the processor data input and output. For example, under certain requirements or application scenarios, the vector acceleration module can be configured as a 128bit*4*8 array module, which can perfectly match the 32x32 matrix calculation module. In addition, it can also be configured into an array structure such as 256*4*8 or 512*8*16, which is set according to actual needs.

[0056] In summary, the beneficial effects brought by the accelerator of this application include the following:

[0057] The accelerator is independent of other computing cores and can be independently programmed and work independently, with extremely high computing efficiency;

[0058] The accelerator is based on a configurable multi-format multi-input computing unit, supporting multiple data inputs and multiple data formats;

[0059] The accelerator adopts an array structure and can be flexibly configured in three dimensions, making it easy to design vector accelerators with any bit width and depth.

[0060] The accelerator supports open source instruction sets, is compatible with mainstream tool chains, improves open efficiency, and provides general computing functions;

[0061] Accelerator instructions and data adopt streaming transmission mode, which does not require a bus and improves communication efficiency;

[0062] The accelerator only needs to design basic computing modules, and the overall design circuit and physical implementation are highly reused, which improves the chip design efficiency;

[0063] The overall computing power of the accelerator can be scaled through simple design configuration without changing the programming method, saving manpower and improving processing efficiency.

[0064] The preferred embodiments of the present invention are described above; it should be understood that the present invention is not limited to the above-mentioned specific embodiments, and the devices and structures not described in detail should be understood to be implemented in a common manner in the art; any technician familiar with the art can make many possible changes and modifications without departing from the technical solution of the present invention, or modify them into equivalent embodiments with equivalent changes, which does not affect the essential content of the present invention; therefore, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention without departing from the content of the technical solution of the present invention are still within the scope of protection of the technical solution of the present invention.

Claims

1. A high bit width vector accelerator based on an array structure, characterized in that: It includes a vector acceleration module and an instruction module connected to the vector acceleration module through a signal line; the instruction module caches compiled instruction data and sends an instruction stream to the vector acceleration module according to a timing sequence; The vector acceleration module comprises L rows of vector acceleration blocks with the same structure, and the vector acceleration blocks in adjacent rows are cascaded in sequence through unidirectional instruction signal lines, and the instruction stream sent into the instruction module is transmitted row by row to the vector acceleration blocks in the L rows according to the timing; The L-row vector acceleration blocks are respectively provided with at least two data input / output terminals, which respectively receive external data input, and execute vector acceleration tasks and data output according to the instructions transmitted to the row; The vector acceleration block includes a vector computing unit of M row array design, Y groups of vector registers, a pair of data selectors and a pair of data registers; M rows of vector calculation units are respectively connected to Y groups of vector registers, read the registered data and perform vector acceleration operations according to instructions, and the output ends are respectively connected to M data input ends of two data selectors, the output end of the second data register is connected to the M+1th data input end of the first data selector, and the output end of the first data selector is connected to the first data register; The output end of the first data register is connected to the M+1th data input end of the second data selector, and the output end of the second data selector is connected to the second data register; The first data selector is a data input / output terminal of the vector acceleration module, and the second data selector and the second data register are another data input / output terminal of the vector acceleration module, which are respectively used to send external input data into the vector register group and output the selected data.

2. The high bit width vector accelerator based on array structure according to claim 1, characterized in that: The vector acceleration module also includes an instruction register. The instruction registers in adjacent vector acceleration blocks are connected through signal lines, and instruction stream data is stored and executed according to timing, and is transferred to the backward pipeline.

3. The high bit width vector accelerator based on array structure according to claim 2, characterized in that: The instruction register is connected to the selection control terminals of two data selectors and M-row vector calculation units. The data selectors determine the selection signal and select the data output according to the instruction. The target vector calculation unit reads the target vector register group according to the instruction and performs vector acceleration operation.

4. The high bit width vector accelerator based on array structure according to claim 2, characterized in that: The vector calculation unit includes Y mutually cascaded multi-format calculation units, each of which includes an integer calculation circuit, a floating point calculation circuit and a logic calculation circuit, which are respectively used for integer calculation, floating point calculation and logic operation.

5. The high bit width vector accelerator based on array structure according to claim 4, characterized in that: The Y multi-format computing units correspond one-to-one to the Y vector register groups, read data from the corresponding vector register groups according to instructions, and store intermediate data of operations.

6. The high bit width vector accelerator based on array structure according to claim 3, characterized in that: The instruction module includes L cascade-depth FIFO memories for storing L compiled instructions, and the FIFO memories send instructions to L row vector acceleration blocks one by one according to a timing sequence.

7. The high bit width vector accelerator based on array structure according to claim 6, characterized in that: The capacity of the vector register group is x bits*n, and the calculation width of the vector calculation unit is 2^N bits; the value range of N is [5,10], and the value of x is 4, 8, 16, 32 or 64.

8. The high bit width vector accelerator based on array structure according to claim 6, characterized in that: The compilation instructions include mode calculation bit, data direction bit, unit selection bit, and channel selection bit; The mode calculation bit is used to control the calculation mode performed by the vector calculation unit; The data direction bit is used to control the data output direction of the data; The unit selection bit is used to determine the target computing unit for executing vector acceleration calculation; The channel selection bit is used to control the data selector to select the target computing unit output.

9. The high bit width vector accelerator based on array structure according to claim 8, characterized in that: The calculation mode executed by the vector calculation unit includes vector addition operation, vector multiplication operation, and vector and immediate number addition operation; the instruction module outputs a compiled instruction per clock cycle, and the L-row vector acceleration block executes the same compiled instructions in sequence according to the order of the instruction stream; In the same vector acceleration block, each vector computing unit obtains the same instruction in the same clock cycle for parallel acceleration, and different vector computing units obtain data at different positions in the same data register, or output intermediate data to the data register, or directly select the output.

10. A general purpose processor, characterized in that: The high-bit-width vector accelerator based on an array structure applied to any one of claims 1 to 9 comprises a vector acceleration module, a pair of symmetrically arranged data cache modules, a pair of data exchange modules, and a pair of matrix calculation modules; the vector acceleration module, the data cache module, the data exchange module, and the matrix calculation module are respectively connected to respective instruction modules for receiving corresponding instruction streams; The two input / output ends of the vector acceleration module are respectively connected to two data cache modules, and the two data cache modules are respectively connected to corresponding data exchange modules; the data exchange modules are respectively connected to corresponding matrix calculation modules; the data cache module is used to interact with the L-row vector acceleration blocks in the vector acceleration module for data, and the data exchange module is used to exchange row and column data of the matrix and perform vector shift operations, and execute processor data input and output.