Search

CN-113835675-B - Data processing apparatus and data processing method

CN113835675BCN 113835675 BCN113835675 BCN 113835675BCN-113835675-B

Abstract

The application discloses a data processing device and a data processing method. The device comprises a configuration module, an input routing module, an interconnection routing module and a plurality of multiplication and addition unit modules, wherein the configuration module configures other modules according to an input mathematical model, the input routing module establishes an input route from an input data channel to an input interface of the multiplication and addition unit module according to the configuration, the interconnection routing module establishes an interconnection route from an output interface of a previous-stage multiplication and addition unit module to an input interface of a subsequent-stage multiplication and addition unit module according to the number sorting digits of the multiplication and addition unit module according to the configuration so as to realize unidirectional cascade connection of the multiplication and addition unit modules, and the multiplication and addition unit module acquires input data of the multiplication and addition unit module through the input route and/or the interconnection route and performs arithmetic operation according to the input data of the multiplication and addition unit module. The data processing device can realize flexible and complex arithmetic operation, meet the requirements of switching and updating the data model, and balance the data operation efficiency, the data transmission efficiency and the interconnection cost.

Inventors

  • LIU HUAN
  • FENG LIGUO

Assignees

  • 深圳市中兴微电子技术有限公司

Dates

Publication Date
20260505
Application Date
20200623

Claims (8)

  1. 1. A data processing device is characterized by comprising a configuration module, an input routing module, an interconnection routing module and a plurality of multiplication and addition unit modules, wherein, The configuration module is used for respectively configuring the input routing module, the interconnection routing module and the multiplication and addition unit modules according to an input mathematical model to correspondingly obtain first configuration data, second configuration data and third configuration data; the input routing module is used for establishing input routes from a plurality of input data channels of the data processing device to input interfaces of the multiplication and addition unit modules according to the first configuration data; The interconnection routing module is used for establishing interconnection routing between the output interfaces of the previous-stage multiply-add unit modules and the input interfaces of the later-stage multiply-add unit modules in the multiply-add unit modules according to the second configuration data and the number sorting digits of the multiply-add unit modules so as to realize unidirectional cascading among the multiply-add unit modules; The multiply-add unit module is configured to obtain input data of the multiply-add unit module through the input route and/or the interconnection route, and perform arithmetic operation on the input data of the multiply-add unit module according to the third configuration data; Wherein the input routing module comprises a plurality of selectors for providing input routing between a plurality of input data channels of the data processing device to one device data input interface of the multiply-add unit module; The input routing module is configured to establish an input route between a plurality of input data channels of the data processing apparatus to input interfaces of the plurality of multiply-add unit modules according to the first configuration data, and includes: The input route module is used for selecting one input data target channel from a plurality of input data channels of the data processing device through a selector according to the first configuration data, and establishing an input route between the input data target channel and a device data input interface of one multiplication and addition unit module; The interconnection route module is used for providing interconnection route between the output interface of the X-2 bit multiplication and addition unit module to the ceil ((X-1)/2) bit multiplication and addition unit module and one interconnection data input interface of the X bit multiplication and addition unit module through a selector; wherein X is a natural number greater than 4 and less than or equal to the total number of multiply-add unit modules, ceil is an upward rounding function.
  2. 2. The apparatus of claim 1, wherein the input interface of the multiply-add unit module comprises two apparatus data input interfaces for receiving input data of the data processing apparatus; the input interface of the multiplication and addition unit module comprises two interconnection data input interfaces, a data input interface and a data output interface, wherein the two interconnection data input interfaces are used for receiving output data of the previous-stage multiplication and addition unit module; the input interface of the multiplication and addition unit module further comprises a constant input interface, a constant output interface and a constant output interface, wherein the constant input interface is used for receiving a constant configured by the configuration module; The multiply-add unit module is configured to select one or two data from the data received through the input interface to perform arithmetic operation according to the third configuration data.
  3. 3. The apparatus of claim 2, wherein the interconnection routing module is configured to provide interconnection routing between the output interface of the preceding multiply add unit module and the interconnection data input interface of the following multiply add unit module in a direct connection manner and/or through a selector, and wherein the number of number ordering bits of the preceding multiply add unit module is smaller than the number ordering bits of the following multiply add unit module.
  4. 4. The apparatus of claim 3, wherein the device comprises a plurality of sensors, Aiming at the multiplying and adding unit modules with the serial numbers sequenced in the front four bits, the interconnection routing module is used for providing interconnection routing between the output interface of the front-stage multiplying and adding unit module and the interconnection data input interface of the rear-stage multiplying and adding unit module in a direct connection mode; For the multiplication and addition unit modules except for the first four digits of the number sequence, the interconnection routing module is used for providing interconnection routing between the output interface of the previous multiplication and addition unit module and the interconnection data input interface of the subsequent multiplication and addition unit module through a direct connection mode and a selector.
  5. 5. The apparatus of claim 4, wherein for the multiply-add unit module of the first four digits of the number ordering, the interconnect routing module is configured to provide an interconnect route between the output interface of the pre-multiply-add unit module to the interconnect data input interface of the post-multiply-add unit module in a direct-connect manner, comprising: The interconnection route module is used for providing an interconnection route between the output interface of the 1 st multiplying and adding unit module and the interconnection data input interface of the 2 nd multiplying and adding unit module in a direct connection mode, and an interconnection route between the output interface of the 1 st multiplying and adding unit module and the interconnection data input interface of the 2 nd multiplying and adding unit module and the interconnection data input interface of the 3 rd multiplying and adding unit module, and an interconnection route between the output interface of the 2 nd multiplying and adding unit module and the interconnection data input interface of the 3 rd multiplying and adding unit module and the 4 th multiplying and adding unit module in the direct connection mode.
  6. 6. The apparatus of claim 1, wherein the interconnection routing module for establishing an interconnection route between the output interface of the preceding multiply-add unit module to the input interface of the following multiply-add unit module of the plurality of multiply-add unit modules according to the second configuration data comprises: the interconnection route module is used for selecting a target multiplication and addition unit module from the X-2 bit multiplication and addition unit module to the ceil ((X-1)/2) bit multiplication and addition unit module through a selector according to the second configuration data, and establishing an interconnection route between an output interface of the target multiplication and addition unit module and an interconnection data input interface of the X bit multiplication and addition unit module.
  7. 7. The apparatus according to claim 1 or 2, wherein the multiply-add unit module comprises at least one of a selector, a conjugate negation unit, a multiplication unit, an addition unit and a truncating unit, wherein the conjugate negation unit is used for performing conjugate operation and/or negation operation on data or is used for performing pass-through operation on data.
  8. 8. A data processing method, characterized by being applied to a data processing apparatus as claimed in any one of claims 1 to 7, comprising: The input routing module, the interconnection routing module and the multiplication and addition unit modules are respectively configured by the configuration module according to the input mathematical model to correspondingly obtain first configuration data, second configuration data and third configuration data; Establishing input routes from a plurality of input data channels to input interfaces of the multiplication and addition unit modules through the input routing module according to the first configuration data; establishing an interconnection route between an output interface of a previous multiplication and addition unit module in the multiplication and addition unit modules to an input interface of a subsequent multiplication and addition unit module according to the number sequencing digits of the multiplication and addition unit modules by the interconnection route module according to the second configuration data so as to realize unidirectional cascading among the multiplication and addition unit modules; receiving a plurality of input data of the data processing device through the input routing module; acquiring input data of the multiplication and addition unit module based on the input route and/or the interconnection route through the multiplication and addition unit module, performing arithmetic operation on the input data of the multiplication and addition unit module according to the third configuration data, and obtaining an arithmetic operation result corresponding to the plurality of input data through the multiplication and addition unit module with the last number of digits; The interconnection route module provides interconnection route between the output interface of the X-2 bit multiplication and addition unit module to the ceil ((X-1)/2) bit multiplication and addition unit module to one interconnection data input interface of the X bit multiplication and addition unit module through a selector; wherein X is a natural number greater than 4 and less than or equal to the total number of multiply-add unit modules, ceil is an upward rounding function.

Description

Data processing apparatus and data processing method Technical Field The present application relates to the field of data processing technologies, and in particular, to a data processing apparatus and a data processing method. Background The data model for multiple data arithmetic operations has the characteristics of multiple data, large bit width and high throughput, and flexible and complex arithmetic operations are generally required to be performed on multiple data. The operations in the data model are mostly basic operations such as multiplication, addition, and subtraction between data or between data and a constant, and self-conjugation of data. The MIMD (Multiple Instruction Multiple Data ) processing device can perform complex arithmetic operations on multiple input data, wherein the interconnection route mode adopted between multiple operation units in the MIMD processing device is usually matrix interconnection, shared bus or full mapping route. However, in the matrix interconnection method, there are operation units which are used for routing and cannot be actually operated, which causes waste of operation efficiency of the operation units, in the shared bus method, data cannot be simultaneously transmitted by a plurality of operation units, and data transmission efficiency between the operation units is low, so that the speed of completing operation is reduced, and in the full-mapping routing method, the overhead of connecting lines and the overhead of selectors between the operation units are relatively high. Therefore, the above interconnection routing method cannot achieve the balance among the operation efficiency of the operation unit, the data transmission efficiency and the interconnection overhead. Disclosure of Invention The embodiment of the application provides a data processing device and a data processing method, which are used for realizing the balance of operation efficiency, data transmission efficiency and interconnection overhead of an operation unit when complex arithmetic operation is carried out on a plurality of input data. In a first aspect, an embodiment of the present application provides a data processing apparatus, including a configuration module, an input routing module, an interconnection routing module, and a plurality of multiply-add unit (Multiply and Accumulate Unit, MAU) modules, where, The configuration module is used for respectively configuring the input routing module, the interconnection routing module and the multiplication and addition unit modules according to an input mathematical model to correspondingly obtain first configuration data, second configuration data and third configuration data; the input routing module is used for establishing input routes from a plurality of input data channels of the data processing device to input interfaces of the multiplication and addition unit modules according to the first configuration data; The interconnection routing module is used for establishing interconnection routing between the output interfaces of the previous multiplication and addition unit modules in the multiplication and addition unit modules and the input interfaces of the subsequent multiplication and addition unit modules according to the configuration data and the number sorting digits of the multiplication and addition unit modules so as to realize unidirectional cascading among the multiplication and addition unit modules; The multiply-add unit module is configured to obtain input data of the multiply-add unit module through the input route and/or the interconnection route, and perform arithmetic operation on the input data of the multiply-add unit module according to the third configuration data. In a second aspect, an embodiment of the present application further provides a data processing method, which is applied to the data processing apparatus described in any embodiment of the present application, including: The input routing module, the interconnection routing module and the multiplication and addition unit modules are configured through the configuration module according to the input mathematical model, and first configuration data, second configuration data and third configuration data are correspondingly obtained; Establishing input routes from a plurality of input data channels to input interfaces of the multiplication and addition unit modules through the input routing module according to the first configuration data; Establishing a route from an output interface of a previous multiplication and addition unit module to an input interface of a subsequent multiplication and addition unit module in the multiplication and addition unit modules according to the number sorting digits of the multiplication and addition unit modules by the interconnection routing module according to second configuration data of the configuration module so as to realize unidirectional cascading among the multiplication and addition unit modules; receivin