Automatic driving data processing method and device based on systolic array, equipment and storage medium
By introducing a combination of floating-point 16-bit multipliers and integer 16-bit multipliers into the pulsating array, multi-format data processing is supported, solving the problem of increased hardware overhead and computation time caused by data type mismatch, improving the efficiency of autonomous driving data processing and enhancing the user experience.
Patent Information
- Application Number
- CN202511074449.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-01
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-01
AI Technical Summary
In existing technologies, pulse arrays are limited by the fixed data type of a single PE during autonomous driving data processing. This leads to the need for data type conversion when data types do not match, increasing hardware overhead and computation time.
By introducing a combination of a floating-point 16-bit multiplier and an integer 16-bit multiplier unit into the pulsating array, it supports data processing in 16-bit floating-point, 16-bit integer, and 8-bit integer formats. It utilizes a format recognition unit and a data splicing unit to perform data format conversion and splicing, thereby achieving efficient processing of multi-format data.
It improves the efficiency of autonomous driving data processing and enhances the user experience.
Smart Images

Figure CN120892010A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of automatic driving, and in particular to an automatic driving data processing method and device based on a systolic array, an automatic driving data processing equipment and a storage medium. BACKGROUND
[0002] At present, since the data type that can be calculated by a single PE in the systolic array is fixed, if the type of the input data does not conform, data type conversion needs to be performed, which increases the hardware overhead and the calculation time.
[0003] From the above, how to improve the efficiency of processing automatic driving data in the automatic driving data processing process based on the systolic array is a problem to be solved at present. SUMMARY
[0004] Therefore, the purpose of the present application is to provide an automatic driving data processing method and device based on a systolic array, an automatic driving data processing equipment and a storage medium, which can improve the efficiency of processing automatic driving data in the automatic driving data processing process based on the systolic array, thereby improving the user experience. The specific scheme is as follows:
[0005] In a first aspect, the present application provides an automatic driving data processing method based on a systolic array, applied to a target PE in the systolic array, wherein the target PE includes a preset register, a floating-point sixteen-bit multiplier and a floating-point sixteen-bit adder, and the method comprises:
[0006] receiving first automatic driving data and second automatic driving data, and identifying the data format corresponding to the first automatic driving data and the second automatic driving data; the first automatic driving data and the second automatic driving data are both sixteen-bit wide data; the data format includes a sixteen-bit floating-point format, a sixteen-bit integer format and an eight-bit integer format;
[0007] if the data format is a sixteen-bit floating-point format, a control unit and an integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier are called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result;
[0008] if the data format is a sixteen-bit integer format, the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier is called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result;
[0009] If the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice every two data in the first autonomous driving data and every two data in the second autonomous driving data respectively to obtain corresponding splicing results, and meanwhile, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain a multiplication result;
[0010] The multiplication result is subjected to addition operation with a stored accumulated result in the preset register to obtain a current accumulated result, and the current accumulated result is stored in the preset register to control the automobile driving process in the autonomous driving field by using the current accumulated result.
[0011] Optionally, before the receiving first autonomous driving data and second autonomous driving data and identifying the data format corresponding to the first autonomous driving data and the second autonomous driving data, the method further comprises:
[0012] The floating-point sixteen-bit multiplier is split into a control unit and an integer sixteen-bit multiplication unit, and the integer sixteen-bit multiplication unit is split into four integer eight-bit multiplication units; wherein the floating-point sixteen-bit multiplier comprises a format identification unit and a data splicing unit; the format identification unit is used to identify the data format corresponding to the data; the data splicing unit is used to splice the data; the integer eight-bit multiplication unit has the function of being split into an integer four-bit multiplication unit.
[0013] Optionally, if the data format is a sixteen-bit floating-point format, the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier are called to perform multiplication operation on the first autonomous driving data and the second autonomous driving data to obtain a multiplication result, comprising:
[0014] If the data format is a sixteen-bit floating-point format, the control unit in the floating-point sixteen-bit multiplier is called to generate a timing signal for controlling multiplication operation steps, so as to divide the floating-point sixteen-bit multiplier into a plurality of clock periods by using the timing signal, and determine multiplication calculation logic corresponding to each clock period;
[0015] According to the multiplication calculation logic and the corresponding clock period, the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier are called to perform multiplication operation on the first autonomous driving data and the second autonomous driving data, and it is determined whether the current operation state meets a preset operation end condition; the multiplication calculation logic comprises an exponent processing, a mantissa calculation and a normalized floating-point multiplication process;
[0016] If the current operation state satisfies the preset operation end condition, the current operation result is set as a multiplication result, and if the current operation state does not satisfy the preset operation end condition, the step of performing multiplication operation on the first automatic driving data and the second automatic driving data according to the multiplication calculation logic and the clock cycle corresponding to the floating-point sixteen-bit multiplier respectively and calling the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier is re-executed.
[0017] Optionally, if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice every two data in the first automatic driving data and every two data in the second automatic driving data respectively to obtain corresponding spliced results, and meanwhile, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on the spliced results to obtain multiplication results, including:
[0018] If the data format is an eight-bit integer format, two idle integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are set as a first target integer eight-bit multiplication unit and a second target integer eight-bit multiplication unit.
[0019] The data splicing unit is called to splice every two data in the first automatic driving data to obtain a first spliced result, and the data splicing unit is called to splice every two data in the second automatic driving data to obtain a second spliced result.
[0020] The first target integer eight-bit multiplication unit is used to perform multiplication operation on the first spliced result to obtain a corresponding multiplication result, and the second target integer eight-bit multiplication unit is used to perform multiplication operation on the second spliced result to obtain a corresponding multiplication result.
[0021] Optionally, the multiplication result and a stored accumulated result in the preset register are subjected to addition operation to obtain a current accumulated result, and the current accumulated result is stored in the preset register, including:
[0022] A preset fifty-bit register is called to receive the multiplication result, and a data format of the multiplication result is consistent with a data format corresponding to the first automatic driving data and the second automatic driving data; the preset fifty-bit register is a FIFO and a static random read-write memory (SRAM).
[0023] The multiplication result is input into the preset fifty-bit register and the stored accumulated result in the preset fifty-bit register having the same data format as the multiplication result, so that the floating-point sixteen-bit adder adds the multiplication result and the stored accumulated result to obtain a current accumulated result, and the current accumulated result is issued to the preset fifty-bit register for storage.
[0024] Optionally, the systolic array includes a plurality of PEs, each of the PEs has two input ends and two output ends, and the output end of each of the PEs is connected to the input end of an adjacent PE; the first input end of each of the PEs is directly connected to the first output end of a next-stage PE through a first register, forming a first data path for pipelining data transmission; the second input end of each of the PEs is sequentially connected to the floating-point sixteen-bit multiplier, the floating-point sixteen-bit adder, and the preset fifty-bit register, and the output end of the preset fifty-bit register is connected to the floating-point sixteen-bit adder and the output end; the floating-point sixteen-bit multiplier is directly connected to the second output end of the next-stage PE through a preset sixteen-bit register; and the preset sixteen-bit register is used for temporarily storing data and performing specific bit-width operations.
[0025] In a second aspect, the application provides an automatic driving data processing device based on a systolic array, which is applied to a target PE in the systolic array, the target PE including a preset register, a floating-point sixteen-bit multiplier, and a floating-point sixteen-bit adder, and the device includes:
[0026] A data format identification module is configured to receive first automatic driving data and second automatic driving data, and identify data formats corresponding to the first automatic driving data and the second automatic driving data; the first automatic driving data and the second automatic driving data are both sixteen-bit wide data; and the data formats include a sixteen-bit floating-point format, a sixteen-bit integer format, and an eight-bit integer format.
[0027] A first multiplication result determination module is configured to, if the data format is the sixteen-bit floating-point format, call a control unit and an integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result.
[0028] A second multiplication result determination module is configured to, if the data format is the sixteen-bit integer format, call the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result.
[0029] a third multiplication result determination module, configured to, if the data format is an eight-bit integer format, call the floating-point sixteen-bit multiplier to splice each two data in the first autonomous driving data and each two data in the second autonomous driving data respectively to obtain corresponding spliced results, and simultaneously call two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit to perform multiplication operation on each of the spliced results to obtain multiplication results;
[0030] an accumulation result determination module, configured to perform addition operation on the multiplication results and an accumulated result stored in a preset register to obtain a current accumulated result, and store the current accumulated result in the preset register, so as to control a driving process of an automobile in an autonomous driving field by using the current accumulated result.
[0031] Optionally, the first multiplication result determination module comprises:
[0032] a clock cycle determination unit, configured to, if the data format is a floating-point sixteen-bit format, call a control unit in the floating-point sixteen-bit multiplier to generate a timing signal for controlling multiplication operation steps, so as to divide the floating-point sixteen-bit multiplier into a plurality of clock cycles by using the timing signal, and determine multiplication calculation logic corresponding to each of the clock cycles;
[0033] a state determination unit, configured to perform multiplication operation on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic and the corresponding clock cycle and by calling the control unit in the floating-point sixteen-bit multiplier and the integer sixteen-bit multiplication unit, and determine whether a current operation state meets a preset operation end condition; the multiplication calculation logic comprises an exponent processing, a mantissa calculation and a normalized floating-point multiplication process;
[0034] a step jump unit, configured to, if the current operation state meets the preset operation end condition, set a current operation result as a multiplication result, and if the current operation state does not meet the preset operation end condition, jump back to the step of performing multiplication operation on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic and the corresponding clock cycle and by calling the control unit in the floating-point sixteen-bit multiplier and the integer sixteen-bit multiplication unit.
[0035] In a third aspect, the present application provides an electronic device, comprising:
[0036] a memory, configured to save a computer program;
[0037] a processor, configured to execute the computer program to implement the automatic driving data processing method of the systolic array as described above.
[0038] In a fourth aspect, the present application provides a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to implement the automatic driving data processing method of the pulse array.
[0039] As can be seen from the above, before the automatic driving data processing based on the pulse array is performed, the first automatic driving data and the second automatic driving data need to be received, and the data format corresponding to the first automatic driving data and the second automatic driving data is identified; if the data format is a sixteen-bit floating-point format, the control unit in the floating-point sixteen-bit multiplier and the integer sixteen-bit multiplication unit are called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result; if the data format is a sixteen-bit integer format, the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier is called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result; if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice two data in the first automatic driving data and two data in the second automatic driving data respectively to obtain corresponding splicing results, and at the same time, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain a multiplication result; the multiplication result is subjected to addition operation with the stored accumulated result in the preset register to obtain a current accumulated result, and the current accumulated result is stored in the preset register.
[0040] As can be seen from the above, before the automatic driving data processing based on the pulse array is performed, the first automatic driving data and the second automatic driving data need to be received, and the data format corresponding to the first automatic driving data and the second automatic driving data is identified; if the data format is a sixteen-bit floating-point format, the control unit in the floating-point sixteen-bit multiplier and the integer sixteen-bit multiplication unit are called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result; if the data format is a sixteen-bit integer format, the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier is called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result; if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice two data in the first automatic driving data and two data in the second automatic driving data respectively to obtain corresponding splicing results, and at the same time, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain a multiplication result; the multiplication result is subjected to addition operation with the stored accumulated result in the preset register to obtain a current accumulated result, and the current accumulated result is stored in the preset register. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings required by the embodiments or prior art description will be briefly introduced as follows. Obviously, the accompanying drawings in the following description only only the embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of the provided drawings.
[0042] Figure 1 A flow chart of an automatic driving data processing method based on a systolic array is disclosed in the present application.
[0043] Figure 2 A specific PE structure block diagram is disclosed in the present application.
[0044] Figure 3 A specific multiplier structure diagram in the PE is disclosed in the present application.
[0045] Figure 4 A systolic array-based automatic driving data processing device structure diagram is disclosed in the present application.
[0046] Figure 5 An electronic device structure diagram is disclosed in the present application. DETAILED DESCRIPTION
[0047] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0048] At present, since the data type that can be calculated by a single PE in the systolic array is fixed, if the type of the input data does not meet the condition, data type conversion needs to be performed on the input data, which increases the hardware overhead and the calculation time. Therefore, the present application provides an automatic driving data processing method based on a systolic array, which can improve the processing efficiency of the automatic driving data in the process of the automatic driving data processing based on the systolic array, thereby improving the user experience.
[0049] Referring to Figure 1 The embodiments of the present application disclose an automatic driving data processing method based on a systolic array, which comprises:
[0050] Step S11, receiving first automatic driving data and second automatic driving data, and identifying data formats corresponding to the first automatic driving data and the second automatic driving data; the first automatic driving data and the second automatic driving data are both data of sixteen bits wide; the data formats include a sixteen-bit floating-point format, a sixteen-bit integer format, and an eight-bit integer format.
[0051] In the embodiment, a structure block diagram of a PE (Processing Element, i.e., processing unit) is as shown in Figure 2 The main function of a single PE in the systolic array is to perform a multiply-accumulate operation, that is, the PE performs a multiplication operation on two input parameters at the same time, then performs accumulation on the multiplication result and data temporarily stored in a register in an adder, and finally stores the addition result in the register. It is worth mentioning that the PE in the embodiment supports calculation of three data formats, i.e., an eight-bit integer format, a sixteen-bit integer format, and a sixteen-bit floating-point format, and thus the bit width of the input data is 16 bits.
[0052] Specifically, the systolic array includes a plurality of PEs, each PE has two input ends and two output ends, and the output end of each PE is connected to the input end of an adjacent PE; the first input end in each PE is directly connected to the first output end of a next-stage PE through a first register, forming a first data path for pipeline transmission of data; the second input end in each PE is connected to a floating-point sixteen-bit multiplier, a floating-point sixteen-bit adder, and a preset fifty-bit register in sequence, the output end of the preset fifty-bit register is connected to the floating-point sixteen-bit adder; the floating-point sixteen-bit multiplier is directly connected to the second output end of the next-stage PE through a preset sixteen-bit register; the preset sixteen-bit register is used for temporarily storing data and performing specific bit width operations.
[0053] In the embodiment, a structure diagram of a multiplier in the PE is as shown in Figure 3 The PE in the embodiment supports hardware implementation methods of three data formats, mainly optimizing the multiplier in the PE. The floating-point 16-bit multiplier can be divided into a control unit and a calculation unit, and the calculation unit is compatible with an integer 16-bit calculation unit. It is worth mentioning that the integer 16-bit calculation unit in the embodiment can be split into four integer 8-bit multiplication units.
[0054] Specifically, before receiving the first automatic driving data and the second automatic driving data and identifying the data format corresponding to the first automatic driving data and the second automatic driving data, the method can further include: splitting a floating-point sixteen-bit multiplier into a control unit and an integer sixteen-bit multiplication unit, and splitting the integer sixteen-bit multiplication unit into four integer eight-bit multiplication units; wherein the floating-point sixteen-bit multiplier includes a format identification unit and a data splicing unit; the format identification unit is configured to identify the data format corresponding to the data; the data splicing unit is configured to splice the data; and the integer eight-bit multiplication unit has the function of being split into an integer four-bit multiplication unit.
[0055] Step S12, if the data format is a sixteen-bit floating-point format, calling the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result.
[0056] In this embodiment, if the data format corresponding to the first automatic driving data and the second automatic driving data is a sixteen-bit floating-point format, a whole sixteen-bit floating-point format multiplication unit is called to calculate the automatic driving data. Specifically, if the data format is a sixteen-bit floating-point format, the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier are called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result, which can include: if the data format is a sixteen-bit floating-point format, the control unit in the floating-point sixteen-bit multiplier is called to generate a timing signal for controlling the multiplication operation step, so as to divide the floating-point sixteen-bit multiplier into a plurality of clock periods by using the timing signal, and determine multiplication calculation logic corresponding to each clock period; according to the multiplication calculation logic and the corresponding clock period, the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier are called to perform multiplication operation on the first automatic driving data and the second automatic driving data, and it is determined whether the current operation state satisfies a preset operation end condition; the multiplication calculation logic includes an exponent processing, a mantissa calculation and a normalization floating-point multiplication process; if the current operation state satisfies the preset operation end condition, the current operation result is set as the multiplication result; if the current operation state does not satisfy the preset operation end condition, the step of calling the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data according to the multiplication calculation logic and the corresponding clock period is re-executed.
[0057] Step S13, if the data format is a sixteen-bit integer format, calling the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result.
[0058] In the embodiment, if the data format corresponding to the first automatic driving data and the second automatic driving data is a sixteen-bit integer format, the embodiment needs to call the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data, so as to obtain the multiplication result.
[0059] In step S14, if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice every two data in the first automatic driving data and every two data in the second automatic driving data respectively to obtain the corresponding splicing result, and meanwhile, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain the multiplication result.
[0060] In the embodiment, if the data format corresponding to the first automatic driving data and the second automatic driving data is an eight-bit integer format, the two eight-bit integer format data are spliced and then input into the floating-point sixteen-bit multiplier, and then two integer eight-bit multiplication units are called to perform calculation, so that the operation of calculating two integer eight-bit data in each cycle is realized. Specifically, if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice every two data in the first automatic driving data and every two data in the second automatic driving data respectively to obtain the corresponding splicing result, and meanwhile, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain the multiplication result, which can include: if the data format is an eight-bit integer format, two idle integer eight-bit multiplication units in the four integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are set as a first target integer eight-bit multiplication unit and a second target integer eight-bit multiplication unit; a data splicing unit is called to splice every two data in the first automatic driving data to obtain a first splicing result, and a data splicing unit is called to splice every two data in the second automatic driving data to obtain a second splicing result; the first target integer eight-bit multiplication unit is used to perform multiplication operation on the first splicing result to obtain the corresponding multiplication result, and meanwhile, the second target integer eight-bit multiplication unit is used to perform multiplication operation on the second splicing result to obtain the corresponding multiplication result.
[0061] In step S15, the multiplication result is subjected to addition operation with the stored accumulated result in the preset register to obtain a current accumulated result, and the current accumulated result is stored in the preset register to control the automobile driving process in the automatic driving field by using the current accumulated result.
[0062] In the embodiment, after obtaining the multiplication result corresponding to the first automatic driving data and the second automatic driving data, the embodiment needs to perform addition operation on the multiplication result and the stored accumulated result in the preset register to obtain the current accumulated result. Specifically, performing addition operation on the multiplication result and the stored accumulated result in the preset register to obtain the current accumulated result, and storing the current accumulated result in the preset register can include: calling a preset fifty-bit register to receive the multiplication result; the data format of the multiplication result is consistent with the data format corresponding to the first automatic driving data and the second automatic driving data; wherein the preset fifty-bit register is a FIFO (Register-based First In, First Out, i.e. register-based first-in first-out memory) and a static random read-write memory SRAM (Static Random-Access Memory, i.e. static random access memory); inputting the multiplication result and the stored accumulated result with the same data format as the multiplication result in the preset fifty-bit register into a floating-point sixteen-bit adder, so that the floating-point sixteen-bit adder adds the multiplication result and the stored accumulated result to obtain the current accumulated result, and issues the current accumulated result to the preset fifty-bit register for storage.
[0063] As can be seen from the above, the embodiment first needs to receive the first automatic driving data and the second automatic driving data, and identify the data format corresponding to the first automatic driving data and the second automatic driving data; then, if the data format is a sixteen-bit floating-point format, the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier are called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain the multiplication result; if the data format is a sixteen-bit integer format, the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier is called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain the multiplication result; if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice two data in the first automatic driving data and two data in the second automatic driving data respectively to obtain the corresponding splicing result, and at the same time, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain the multiplication result; finally, performing addition operation on the multiplication result and the stored accumulated result stored in the preset register to obtain the current accumulated result, and storing the current accumulated result in the preset register. In this way, the efficiency of processing the automatic driving data in the process of processing the automatic driving data based on the systolic array is improved, thereby improving the user experience.
[0064] Correspondingly, referring to Figure 4As shown, the application also provides an automatic driving data processing device based on a systolic array, which is applied to a target PE in the systolic array. The target PE includes a preset register, a floating-point sixteen-bit multiplier and a floating-point sixteen-bit adder. The device includes:
[0065] A data format identification module 11 is configured to receive first automatic driving data and second automatic driving data, and identify data formats corresponding to the first automatic driving data and the second automatic driving data. The first automatic driving data and the second automatic driving data are both sixteen-bit wide data. The data formats include a sixteen-bit floating-point format, a sixteen-bit integer format and an eight-bit integer format.
[0066] A first multiplication result determination module 12 is configured to, if the data format is the sixteen-bit floating-point format, call a control unit and an integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data, to obtain a multiplication result.
[0067] A second multiplication result determination module 13 is configured to, if the data format is the sixteen-bit integer format, call the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier to perform multiplication operation on the first automatic driving data and the second automatic driving data, to obtain a multiplication result.
[0068] A third multiplication result determination module 14 is configured to, if the data format is the eight-bit integer format, call the floating-point sixteen-bit multiplier to splice every two data in the first automatic driving data and every two data in the second automatic driving data, to obtain corresponding splicing results, and simultaneously call two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit to perform multiplication operation on the splicing results, to obtain a multiplication result.
[0069] An accumulation result determination module 15 is configured to perform addition operation on the multiplication result and an existing accumulation result in the preset register, to obtain a current accumulation result, and store the current accumulation result in the preset register, so as to control a car driving process in the field of automatic driving by using the current accumulation result.
[0070] As can be seen from the above, before the automatic driving data processing based on the systolic array is performed, the embodiment of the application first needs to receive the first automatic driving data and the second automatic driving data, and identify the data format corresponding to the first automatic driving data and the second automatic driving data; then, if the data format is a sixteen-bit floating-point format, a control unit in a floating-point sixteen-bit multiplier and an integer sixteen-bit multiplication unit are called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result; if the data format is a sixteen-bit integer format, an integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier is called to perform multiplication operation on the first automatic driving data and the second automatic driving data to obtain a multiplication result; if the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to splice two data in the first automatic driving data and two data in the second automatic driving data respectively to obtain corresponding splicing results, and at the same time, two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operation on each splicing result to obtain a multiplication result; finally, the multiplication result and the stored accumulated result in the preset register are subjected to addition operation to obtain a current accumulated result, and the current accumulated result is stored in the preset register. In this way, the efficiency of processing the automatic driving data in the process of the automatic driving data processing based on the systolic array is improved, thereby improving the user experience.
[0071] In some specific embodiments, the automatic driving data processing device based on the systolic array can further include:
[0072] A unit splitting unit is configured to split the floating-point sixteen-bit multiplier into a control unit and an integer sixteen-bit multiplication unit, and split the integer sixteen-bit multiplication unit into four integer eight-bit multiplication units; wherein the floating-point sixteen-bit multiplier includes a format identification unit and a data splicing unit; the format identification unit is configured to identify the data format corresponding to the data; the data splicing unit is configured to splice the data; and the integer eight-bit multiplication unit has the function of being split into an integer four-bit multiplication unit.
[0073] In some specific embodiments, the first multiplication result determination module 12 can specifically include:
[0074] A clock cycle determination unit is configured to, if the data format is a sixteen-bit floating-point format, call a control unit in the floating-point sixteen-bit multiplier to generate a timing signal for controlling multiplication operation steps, divide the floating-point sixteen-bit multiplier into a plurality of clock cycles by using the timing signal, and determine multiplication calculation logic corresponding to each clock cycle.
[0075] A state judging unit is configured to perform multiplication operation on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic, the corresponding clock cycle, and the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier, and to judge whether the current operation state satisfies a preset operation end condition; the multiplication calculation logic includes an exponent processing, a mantissa calculation, and a normalization floating-point multiplication process;
[0076] A step jumping unit is configured to set the current operation result as a multiplication result if the current operation state satisfies the preset operation end condition, and to jump back to the step of performing multiplication operation on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic, the corresponding clock cycle, and the control unit and the integer sixteen-bit multiplication unit in the floating-point sixteen-bit multiplier if the current operation state does not satisfy the preset operation end condition.
[0077] In some embodiments, the third multiplication result determining module 14 can specifically include:
[0078] A multiplication unit setting unit is configured to set two idle integer eight-bit multiplication units as a first target integer eight-bit multiplication unit and a second target integer eight-bit multiplication unit in four integer eight-bit multiplication units in the integer sixteen-bit multiplication unit if the data format is an eight-bit integer format.
[0079] A data splicing unit is configured to splice every two data in the first autonomous driving data to obtain a first splicing result, and to splice every two data in the second autonomous driving data to obtain a second splicing result.
[0080] A splicing result operation unit is configured to perform multiplication operation on the first splicing result by using the first target integer eight-bit multiplication unit to obtain a corresponding multiplication result, and to perform multiplication operation on the second splicing result by using the second target integer eight-bit multiplication unit to obtain a corresponding multiplication result.
[0081] In some embodiments, the accumulation result determining module 15 can specifically include:
[0082] A multiplication result receiving unit is configured to receive the multiplication result by using a preset fifty-bit register; the data format of the multiplication result is consistent with the data format corresponding to the first autonomous driving data and the second autonomous driving data; the preset fifty-bit register is a FIFO and a static random read-write memory SRAM.
[0083] A result adding unit is configured to input the multiplication result and a stored accumulated result in the preset fifty-bit register having the same data format as the multiplication result into the floating-point sixteen-bit adder, so that the floating-point sixteen-bit adder adds the multiplication result and the stored accumulated result to obtain a current accumulated result and sends the current accumulated result to the preset fifty-bit register for storage.
[0084] Further, the embodiment of the present application further discloses an electronic device, Figure 5 is a structural diagram of an electronic device 20 according to an exemplary embodiment, and the content in the figure cannot be considered as any limitation on the use range of the present application. The electronic device 20 can specifically include at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25 and a communication bus 26. The memory 22 is configured to store a computer program, and the processor 21 is configured to load and execute the computer program to implement the related steps in the automatic driving data processing method based on systolic array disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the embodiment can be an electronic computer.
[0085] In the embodiment, the power supply 23 is configured to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol followed by the communication interface 24 can be any communication protocol applicable to the technical solution of the present application, which is not limited specifically herein; the input / output interface 25 is configured to obtain external input data or output data to the outside, and the specific interface type can be selected according to the specific application needs, which is not limited specifically herein.
[0086] In addition, the memory 22 as a carrier for resource storage can be a read-only memory, a random access memory, a magnetic disk or an optical disk, and the resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage mode can be temporary storage or permanent storage.
[0087] The operating system 221 is configured to manage and control each hardware device on the electronic device 20 and the computer program 222, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program capable of completing the automatic driving data processing method based on systolic array executed by the electronic device 20 disclosed in any of the foregoing embodiments, the computer program 222 can further include a computer program capable of completing other specific work.
[0088] Further, the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program is executed by a processor to realize the automatic driving data processing method based on systolic array disclosed above. For the specific steps of the method, refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0089] The various embodiments are described in the specification by progressive stages, and each embodiment focuses on the difference from other embodiments. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple, and the relevant parts refer to the method part.
[0090] The skilled person can further realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized by electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the application.
[0091] The steps of the method or algorithm described in combination with the embodiments disclosed herein can be directly implemented by hardware, a software module executed by a processor, or a combination of both. The software module can be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0092] Finally, it should be noted that in this document, relational terms such as first and second are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any such actual relationship or order between such entities or actions. Moreover, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that includes a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, an element defined by the phrase "comprising a" does not exclude the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0093] The technical solutions provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by using specific examples. The above description of the examples is only used to help understand the method of the present application and its core idea; meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description of the content of the specification should not be understood as a limitation on the present application.
Claims
1. A method for processing autonomous driving data based on a pulsating array, applied to a target PE in the pulsating array, the target PE comprising a preset register, a floating-point 16-bit multiplier, and a floating-point 16-bit adder, characterized in that, The method includes: The system receives first autonomous driving data and second autonomous driving data, and identifies the data formats corresponding to the first autonomous driving data and the second autonomous driving data; both the first autonomous driving data and the second autonomous driving data are 16-bit wide data; the data formats include 16-bit floating-point format, 16-bit integer format and 8-bit integer format; If the data format is a 16-bit floating-point format, then the control unit and the integer 16-bit multiplication unit in the floating-point 16-bit multiplier are called to perform multiplication operations on the first autonomous driving data and the second autonomous driving data to obtain the multiplication result; If the data format is a 16-bit integer format, then the integer 16-bit multiplication unit in the floating-point 16-bit multiplier is called to perform a multiplication operation on the first autonomous driving data and the second autonomous driving data to obtain the multiplication result; If the data format is an eight-bit integer format, the floating-point sixteen-bit multiplier is called to concatenate every two data in the first autonomous driving data and every two data in the second autonomous driving data to obtain the corresponding concatenation result. At the same time, the two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit are called to perform multiplication operations on each concatenation result to obtain the multiplication result. The multiplication result is added to the existing accumulated result in the preset register to obtain the current accumulated result, and the current accumulated result is stored in the preset register so as to control the driving process of the car in the field of autonomous driving.
2. The autonomous driving data processing method based on a pulsating array according to claim 1, characterized in that, Before receiving the first autonomous driving data and the second autonomous driving data, and identifying the data formats corresponding to the first autonomous driving data and the second autonomous driving data, the method further includes: The floating-point 16-bit multiplier is divided into a control unit and an integer 16-bit multiplier unit, and the integer 16-bit multiplier unit is further divided into four integer 8-bit multiplier units. The floating-point 16-bit multiplier includes a format recognition unit and a data concatenation unit. The format recognition unit is used to identify the data format corresponding to the data. The data concatenation unit is used to concatenate the data. The integer 8-bit multiplier unit has the function of being divided into integer 4-bit multiplier units.
3. The autonomous driving data processing method based on a pulsating array according to claim 1, characterized in that, If the data format is a 16-bit floating-point format, then the control unit and integer 16-bit multiplication unit in the floating-point 16-bit multiplier are invoked to perform multiplication operations on the first autonomous driving data and the second autonomous driving data to obtain the multiplication result, including: If the data format is a 16-bit floating-point format, the control unit in the 16-bit floating-point multiplier is called to generate a timing signal that controls the step of the multiplication operation, so as to divide the 16-bit floating-point multiplier into several clock cycles using the timing signal and determine the multiplication calculation logic corresponding to each clock cycle. According to the multiplication calculation logic and the corresponding clock cycles, the control unit and integer 16-bit multiplier in the floating-point multiplier are called to perform multiplication operations on the first autonomous driving data and the second autonomous driving data, and it is determined whether the current operation state meets the preset operation end condition; the multiplication calculation logic includes exponent processing, mantissa calculation and normalized floating-point multiplication process; If the current operation state meets the preset operation end condition, the current operation result is set as the multiplication result. If the current operation state does not meet the preset operation end condition, the process jumps back to the step of performing multiplication operations on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic and the corresponding clock cycles, and calling the control unit and integer 16-bit multiplier in the floating-point 16-bit multiplier.
4. The autonomous driving data processing method based on a pulsating array according to claim 2, characterized in that, If the data format is an 8-bit integer format, then the floating-point 16-bit multiplier is called to concatenate every two data points in the first autonomous driving data and every two data points in the second autonomous driving data to obtain the corresponding concatenation results. Simultaneously, the two integer 8-bit multiplication units in the integer 16-bit multiplication unit are called to perform multiplication operations on each concatenation result to obtain the multiplication result, including: If the data format is an 8-bit integer format, then two idle 8-bit integer multiplication units in the four 8-bit integer multiplication units in the 16-bit integer multiplication unit are set as the first target 8-bit integer multiplication unit and the second target 8-bit integer multiplication unit. The data stitching unit is invoked to stitch together every two data points in the first autonomous driving data to obtain a first stitching result, and the data stitching unit is invoked to stitch together every two data points in the second autonomous driving data to obtain a second stitching result; The first concatenation result is multiplied using the first target integer 8-bit multiplication unit to obtain the corresponding multiplication result. At the same time, the second concatenation result is multiplied using the second target integer 8-bit multiplication unit to obtain the corresponding multiplication result.
5. The autonomous driving data processing method based on a pulsating array according to claim 1, characterized in that, The step of performing an addition operation between the multiplication result and the currently stored accumulated result in the preset register to obtain the current accumulated result, and storing the current accumulated result in the preset register, includes: The multiplication result is received by calling a preset 50-bit register; the data format of the multiplication result is consistent with the data format corresponding to the first autonomous driving data and the second autonomous driving data; wherein, the preset 50-bit register is a FIFO and a static random access memory (SRAM); The multiplication result and the stored accumulation result with the same data format in the preset 50-bit register are input into the floating-point 16-bit adder, so that the floating-point 16-bit adder adds the multiplication result and the stored accumulation result to obtain the current accumulation result, and sends the current accumulation result to the preset 50-bit register for storage.
6. The autonomous driving data processing method based on a pulsating array according to claim 5, characterized in that, The pulsating array includes several physical outputs (PEs), each PE having two input terminals and two output terminals, and the output terminals of each PE being connected to the input terminals of the adjacent PE. The first input terminal of each PE is directly connected to the next-level PE via a first register and its first output terminal, forming a first data path for pipelined data transmission. The second input terminal of each PE is sequentially connected to the 16-bit floating-point multiplier, the 16-bit floating-point adder, and the preset 50-bit register. The output terminal of the preset 50-bit register is connected to the output terminal of the 16-bit floating-point adder. The 16-bit floating-point multiplier is directly connected to the next-level PE via the preset 16-bit register and its second output terminal. The preset 16-bit register is used for temporary data storage and specific position-width operations.
7. An autonomous driving data processing device based on a pulsating array, applied to a target PE in the pulsating array, the target PE including a preset register, a floating-point 16-bit multiplier, and a floating-point 16-bit adder, characterized in that, The device includes: A data format recognition module is used to receive first autonomous driving data and second autonomous driving data, and to identify the data formats corresponding to the first autonomous driving data and the second autonomous driving data; both the first autonomous driving data and the second autonomous driving data are 16-bit wide data; the data formats include 16-bit floating-point format, 16-bit integer format and 8-bit integer format; The first multiplication result determination module is used to call the control unit and integer 16-bit multiplier in the floating-point 16-bit multiplier to perform multiplication operations on the first autonomous driving data and the second autonomous driving data if the data format is a 16-bit floating-point format, so as to obtain the multiplication result. The second multiplication result determination module is used to call the integer 16-bit multiplication unit in the floating-point 16-bit multiplier to perform multiplication operations on the first autonomous driving data and the second autonomous driving data if the data format is a 16-bit integer format, so as to obtain the multiplication result; The third multiplication result determination module is used to, if the data format is an eight-bit integer format, call the floating-point sixteen-bit multiplier to concatenate every two data in the first autonomous driving data and every two data in the second autonomous driving data respectively to obtain the corresponding concatenation result, and simultaneously call the two integer eight-bit multiplication units in the integer sixteen-bit multiplication unit to perform multiplication operations on each of the concatenation results to obtain the multiplication result; The accumulation result determination module is used to perform an addition operation between the multiplication result and the existing accumulation result stored in the current preset register to obtain the current accumulation result, and to store the current accumulation result in the preset register so as to use the current accumulation result to control the vehicle driving process in the field of autonomous driving.
8. The autonomous driving data processing device based on a pulsating array according to claim 7, characterized in that, The first multiplication result determination module includes: A clock cycle determination unit is used to, if the data format is a 16-bit floating-point format, call the control unit in the 16-bit floating-point multiplier to generate a timing signal that controls the step of the multiplication operation, so as to divide the 16-bit floating-point multiplier into several clock cycles using the timing signal and determine the multiplication calculation logic corresponding to each clock cycle. The state judgment unit is used to perform multiplication operations on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic and the corresponding clock cycles, and to call the control unit and integer 16-bit multiplication unit in the floating-point 16-bit multiplier, and to determine whether the current operation state meets the preset operation end condition; the multiplication calculation logic includes exponent processing, mantissa calculation and normalized floating-point multiplication process; The step jump unit is used to set the current operation result as a multiplication result if the current operation state meets the preset operation end condition, and to jump back to the step of performing multiplication operation on the first autonomous driving data and the second autonomous driving data according to the multiplication calculation logic and the corresponding clock cycle, and calling the control unit and integer 16-bit multiplication unit in the floating-point 16-bit multiplier.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the autonomous driving data processing method based on a pulsating array as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that, Used to store a computer program, wherein the computer program, when executed by a processor, implements the autonomous driving data processing method based on a pulsating array as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Multiplying unit supporting multiple precisions and microprocessor
CN116661733A
Matrix multiplication module, data calculation method and neural network processor
CN116910433A
Variable precision quantization deep neural network processor and data processing method
CN118133909A
Matrix operation array system and operation method for deep learning acceleration kernel
CN120336688A
Chip including multiply-accumulate module, control method, electronic device, and storage medium
US20210326118A1