A data processing apparatus, method, chip, and electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本申请实施例的目的是提供一种数据处理装置、方法、芯片及电子设备,能够解决目前对多个计算模块进行参数配置时存在的资源过度消耗、且限制计算模块数量的问题
[0015]在本申请实施例中,对于依次串联的多个计算模块,配置模块与第一个计算模块连接,在配置模块输出该多个计算模块的控制参数和运行参数的情况下,该多个计算模块能够获取对应的控制参数,每个计算模块也就能够确定与其对应的第一参数,从而根据该第一参数接收或跳过特定数量的运行参数,实现自身对应运行参数的获取以及存储。如此,不仅无需限制计算模块的数量,而且避免了资源的过度消耗。另外,保证了信号流动的单向性,使得电路在后端流程能够有更好的性能或电气性能表现。
Smart Images

Figure CN122570040A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of communication technology, and specifically relates to a data processing device, method, chip and electronic device. Background Technology
[0002] With the development of communication technology, the computing power of electronic devices also needs to be improved to support the realization of more functions. Therefore, more and more manufacturers are setting up a large number of computing modules in electronic devices and setting up configuration modules to configure the operating parameters of the computing modules. For example, in today's Neural Processing Unit (NPU), there are generally a large number of computing modules such as multiplier units, and these multiplier units form a multiplier array. The NPU has a configuration module that sends operating parameters to the computing modules in the multiplier array.
[0003] Specifically, the configuration module broadcasts the operating parameters to all computing modules via a bus, such as... Figure 1 As shown. However, this method requires the synchronous transmission of ID information to confirm which computing module the parameter is being sent to when sending parameters. This leads to an increase in transmission lines, which in turn increases power consumption and area. Furthermore, when there are many computing modules, the configuration module cannot broadcast parameters to all computing modules due to the excessively long propagation path and large fan-out. Therefore, this method has limitations on the number of computing modules. Summary of the Invention
[0004] The purpose of this application is to provide a data processing device, method, chip, and electronic device that can solve the problems of excessive resource consumption and limitation on the number of computing modules when configuring parameters for multiple computing modules.
[0005] In a first aspect, embodiments of this application provide a data processing apparatus, including:
[0006] A plurality of computing modules connected in series, and a configuration module connected to the first computing module among the plurality of computing modules;
[0007] The configuration module outputs control parameters and operating parameters of the plurality of computing modules. The control parameters include a first parameter that corresponds one-to-one with the plurality of computing modules. The first parameter is used to indicate the number of operating parameters that the computing module receives or skips.
[0008] The multiple calculation modules acquire the corresponding control parameters, and based on the first parameter in the control parameters, acquire and store the corresponding operating parameters.
[0009] Secondly, embodiments of this application provide a data processing method, including:
[0010] The system generates and outputs control parameters and operating parameters for multiple computing modules. The control parameters include a first parameter that corresponds one-to-one with each of the multiple computing modules. The first parameter is used to indicate the number of operating parameters that the computing module receives or skips.
[0011] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.
[0012] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0013] Fifthly, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0014] Sixthly, embodiments of this application provide a chip including the data processing apparatus described in the first aspect above.
[0015] In this embodiment, for multiple computing modules connected in series, a configuration module is connected to the first computing module. When the configuration module outputs the control parameters and operating parameters of the multiple computing modules, the multiple computing modules can obtain the corresponding control parameters. Each computing module can then determine its corresponding first parameter, and thus receive or skip a specific number of operating parameters based on the first parameter, thereby achieving the acquisition and storage of its own corresponding operating parameters. This not only eliminates the need to limit the number of computing modules but also avoids excessive resource consumption. Furthermore, it ensures the unidirectionality of signal flow, enabling the circuit to achieve better performance or electrical characteristics in the backend process. Attached Figure Description
[0016] Figure 1 This is a traditional diagram illustrating the parameter configuration of a computing module;
[0017] Figure 2 This is a schematic diagram of the parameter configuration of the computing module in the data processing apparatus of this application embodiment;
[0018] Figure 3 This is a schematic diagram of the computing module in an embodiment of this application;
[0019] Figure 4 This is a schematic diagram of the transmission control unit in an embodiment of this application;
[0020] Figure 5 This is a schematic flowchart of the data processing method according to an embodiment of this application;
[0021] Figure 6 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0023] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0024] The electronic device provided in the embodiments of this application will be described in detail below with reference to the accompanying drawings and through specific embodiments and application scenarios.
[0025] like Figure 2 As shown, the data processing apparatus of this application embodiment includes:
[0026] A plurality of computing modules 100 connected in series, and a configuration module 200 connected to the first computing module 100 among the plurality of computing modules 100;
[0027] The configuration module 200 outputs control parameters and operating parameters of the plurality of computing modules 100. The control parameters include a first parameter that corresponds one-to-one with the plurality of computing modules 100. The first parameter is used to indicate the number of operating parameters that the computing module 100 receives or skips.
[0028] The plurality of computing modules 100 acquire the corresponding control parameters, and acquire and store the corresponding operating parameters according to the first parameter in the control parameters.
[0029] In this way, for multiple computing modules 100 connected in series, the configuration module 200 is connected to the first computing module 100. When the configuration module 200 outputs the control parameters and operating parameters of the multiple computing modules 100, the multiple computing modules 100 can obtain the corresponding control parameters. Each computing module can then determine its corresponding first parameter, and thus receive or skip a specific number of operating parameters based on the first parameter, achieving the acquisition and storage of its own corresponding operating parameters. This not only eliminates the need to limit the number of computing modules but also avoids excessive resource consumption. Furthermore, it ensures the unidirectionality of signal flow, enabling the circuit to achieve better performance or electrical characteristics in the back-end process.
[0030] Optionally, in this embodiment, the configuration module sends control parameters in the order of the corresponding calculation module's serial number.
[0031] The sequence number of the computing modules is set based on the connection distance with the configuration module. For example, the computing module with sequence number 0 (hereinafter referred to as computing module 0) is the computing module directly connected to the configuration module, that is, the first computing module among the plurality of computing modules; the computing module with sequence number 1 (hereinafter referred to as computing module 1) is the computing module directly connected to computing module 0, that is, the second computing module among the plurality of computing modules; and so on, with the computing module with sequence number n (hereinafter referred to as computing module n) being the last computing module among the plurality of computing modules. Thus, in an optional implementation, the control parameters sent by the configuration module can be control parameter 1, control parameter 2, ..., control parameter n+1; where control parameter 1 corresponds to computing module 0, control parameter 2 corresponds to computing module 1, ..., control parameter n+1 corresponds to computing module n.
[0032] In this way, when sending control parameters, the transmission order is from nearest to farthest, sending them one by one to the computing modules. Moreover, therefore, all control parameters are transmitted unidirectionally during the transmission process, without any reverse handshake signals; that is, all control parameters originate from the configuration module and travel from nearest to farthest to each computing module.
[0033] In this embodiment, the configuration module sends control parameters in sequence. Method 1 can be used, in which all control parameters are sent at once, and all control parameters are arranged in sequence. Method 2 can also be used, in which the control parameters are sent in multiple times based on the number of computing modules, with each time sending the control parameters corresponding to one computing module, such as periodically sending the control parameters corresponding to each computing module.
[0034] Optionally, in this embodiment, the configuration module can send the running parameters in one of two ways: Method 1, where all running parameters are sent at once and arranged in order; or Method 2, where the running parameters are sent in multiple times based on the number of running parameters, sending one or a group of running parameters each time, such as periodically sending each or a group of running parameters. For the first parameter, the one or a group of running parameters can be recorded as a running parameter that is received once or skipped.
[0035] Optionally, in this embodiment, the control parameters further include a second parameter corresponding one-to-one with each of the plurality of computing modules 100, the second parameter being used to indicate the configuration order of the running parameters.
[0036] The configuration order of the operating parameters can be understood as indicating whether the operating parameters are configured first on the nearest or furthest computing module in the serial propagation chain. For example, the second parameter can be 0 or 1. 0 indicates that the configuration order of the operating parameters is from furthest to nearest, that is, the last computing module in the series of multiple computing modules 100 (e.g., the one closest to the nearest). Figure 2 The computing module n in the series first obtains the running parameters; 1 indicates that the configuration order of the running parameters is from near to far, that is, the first computing module in the series of multiple computing modules 100 (such as...) Figure 2 The calculation module 0) first obtains the running parameters.
[0037] Thus, if the first parameter does not indicate whether the number of running parameters is for receiving or skipping, each computing module 100, upon receiving the second parameter, can determine whether the first parameter indicates the number of received or skipped running parameters. Continuing with the example above, when the second parameter is 0, the first parameter indicates the number of running parameters skipped by the computing module; when the second parameter is 1, the first parameter indicates the number of running parameters received by the computing module. Correspondingly, when the second parameter is 0, after skipping that number of running parameters, the computing module receives its own corresponding running parameters; when the second parameter is 1, the computing module receives that number of running parameters, and after receiving that number of running parameters, the received running parameters need to be sent to the next computing module.
[0038] Optionally, in this embodiment, the second parameter instructs the plurality of computing modules 100 to obtain the operating parameters based on their connection distance relationship with the configuration module 200.
[0039] In this way, the calculation module 100 can not only determine the configuration order of the running parameters by the second parameter, but also obtain its own corresponding running parameters according to the connection distance relationship with the configuration module 200 based on the indication of the second parameter. For example, the configuration order of the running parameters is from near to far, and the calculation module with the closest connection distance to the configuration module 200 can obtain the first running parameter, that is, its own corresponding running parameter.
[0040] Optionally, in this embodiment, the second parameters corresponding to each of the plurality of computing modules may be the same or different.
[0041] Optionally, in this embodiment, the second parameter can be predefined or preconfigured, in which case the control parameters do not include the second parameter.
[0042] In this embodiment, the second parameter can be represented by C1, and the first parameter can be represented by C2.
[0043] Optionally, in this embodiment, the control parameters and the operating parameters are transmitted via a data bus.
[0044] Optionally, in this embodiment, the configuration module 200 also outputs a first control signal and a second control signal for the plurality of computing modules 100;
[0045] The plurality of computing modules 100 acquire corresponding control parameters, and based on the first parameter in the control parameters, acquire and store the corresponding operating parameters, including:
[0046] Upon receiving the first control signal, the computing module acquires and stores the corresponding control parameters transmitted via the data bus.
[0047] Upon receiving the second control signal, the computing module obtains and stores the corresponding operating parameters transmitted by the data bus based on the first parameter in the control parameters.
[0048] In other words, in this embodiment, the first control signal independently controls the acquisition of control parameters, enabling the calculation module to accurately obtain the corresponding control parameters. Furthermore, the second control signal and the first parameter are used to acquire the control operating parameters, allowing the calculation module to accurately obtain the corresponding operating parameters.
[0049] If C1 indicates that the configuration order of the operating parameters is from farthest to nearest, upon receiving the second control signal, the calculation module, according to C2, controls the number of operating parameters to skip. If the number of received operating parameters is greater than C2, the module stores the subsequently received operating parameters as its own operating parameters. When the number of received operating parameters is less than or equal to C2, the calculation module does not store the received operating parameters but instead sends them to the next calculation module.
[0050] If C1 indicates that the configuration order of the operating parameters is from nearest to farthest, when the calculation module receives the second control signal, it controls the number of operating parameters received according to C2. If the number of received operating parameters is less than or equal to C2, the received operating parameters are stored as its own operating parameters. When the number of received operating parameters is greater than C2, the received operating parameters are sent to the next calculation module.
[0051] Optionally, in this embodiment, the first control signal and control parameters are sent simultaneously, and the second control signal and operating parameters are sent simultaneously. The term "simultaneously" is not limited to a specific time; it can also refer to the same time period.
[0052] Optionally, in this embodiment, as Figure 3 As shown, the computing module includes a transmission control unit 11, a bus transmission controller 12 connected to the transmission control unit 11, and a storage unit 13 connected to the bus transmission controller 12.
[0053] When the transmission control unit 11 receives the first control signal output by the configuration module 200 or the previous calculation module for the first time, it stores the received control parameters; when it receives the first control signal output by the configuration module 200 or the previous calculation module for the jth time, it sends the first control signal and the received control parameters to the next calculation module; where j is an integer greater than or equal to 2.
[0054] If the second control signal output by the configuration module 200 or the previous calculation module is valid, the transmission control unit 11 generates a third control signal according to the stored control parameters and sends the third control signal to the bus transmission controller 12.
[0055] The bus transmission controller 12 obtains the corresponding operating parameters according to the third control signal and sends them to the storage unit 13.
[0056] Thus, the computing module can achieve the above functions through the transmission control unit 11, the bus transmission controller 12, and the storage unit 13.
[0057] The transmission control unit 11 can store the first received control parameters based on the first received control signal, and send the subsequently received first control signals and control parameters to the next calculation module. In addition, the transmission control unit 11 can also generate a third control signal based on the received valid second control signal, using the locally stored control parameters, and send it to the bus transmission controller 12, so that the bus transmission controller 12 can respond to the third control signal to obtain its own operating parameters and store them in the storage unit 13.
[0058] Optionally, if C1 indicates that the configuration order of the operating parameters is from far to near, the transmission control unit 11 will send the first m received second control signals to the next calculation module. In this case, the second control signals received starting from the (m+1)th time are either valid second control signals or valid second control signals. The value of m is determined by the first parameter. Optionally, m = C2.
[0059] Optionally, if C1 indicates that the configuration order of the operating parameters is from nearest to farthest, the transmission control unit 11 will send the (m+1)th and subsequent second control signals received to the next calculation module after receiving the first m second control signals. In this case, the first m received second control signals are either valid second control signals or valid second control signals. The value of m is determined by the first parameter. Optionally, m = C2.
[0060] Optionally, in this embodiment, as Figure 4 As shown, the transmission control unit 11 includes a first transmission controller 101, a first register 102 connected to the first transmission controller 101, a second transmission controller 103 connected to the first register 102, and a third transmission controller 104 connected to the second transmission controller 103.
[0061] Wherein, when the first transmission controller 101 receives the first control signal output by the configuration module 200 or the previous calculation module for the first time, it adjusts the state of the first register 102 to be valid;
[0062] When the second transmission controller 103 receives the first control signal output by the configuration module 200 or the previous calculation module for the first time, and receives the control parameters output by the configuration module 200 or the previous calculation module, it transmits the received control parameters to the third transmission controller 104 for storage.
[0063] When the third transmission controller 104 receives a valid second control signal output by the configuration module 200 or the previous calculation module, it generates a third control signal based on the stored control parameters and sends the third control signal to the bus transmission controller 12.
[0064] Thus, the transmission control unit 11 can realize the above functions through the first transmission controller 101, the first register 102, the second transmission controller 103, and the third transmission controller 104.
[0065] Optionally, if C1 indicates that the configuration order of the operating parameters is from farthest to nearest, the third transmission controller 104 will send the first m received second control signals to the next calculation module. In this case, the second control signals received starting from the (m+1)th signal are either valid second control signals or valid second control signals. The value of m is determined by the first parameter. Optionally, m = C2.
[0066] Optionally, if C1 indicates that the configuration order of the operating parameters is from nearest to farthest, the third transmission controller 104 will send the (m+1)th and subsequent second control signals received to the next calculation module after receiving the first m second control signals. In this case, the first m received second control signals are either valid second control signals or valid second control signals. The value of m is determined by the first parameter. Optionally, m = C2.
[0067] Optionally, in this embodiment, the initial state (default state) of the first register is invalid, i.e., invalid.
[0068] Optionally, in this embodiment, when the second control signal output by the configuration module 200 or the preceding calculation module is valid, a third control signal is generated according to the stored control parameters, including:
[0069] If the received second control signal is valid, a third control signal is generated based on the first parameter, the third control signal being used to indicate the acquisition of a first number of the operating parameters; or,
[0070] If the received second control signal is valid, a first number of third control signals are generated based on the first parameter, and the third control signals are used to indicate the acquisition of the operating parameters;
[0071] Wherein, the first quantity is equal to the number of the operating parameters corresponding to the current calculation module.
[0072] Thus, when the bus transmission controller 12 receives a third control signal parameter, which is used to indicate the acquisition of a first number of the operating parameters, it can continuously acquire the first number of the operating parameters to achieve the acquisition of its own operating parameters.
[0073] When a first number of third control signals are generated, and these third control signals are used to indicate the acquisition of the operating parameters, the transmission control unit or the third transmission controller can, starting from receiving a valid second control signal, continuously send the third control signal to the bus transmission controller 12 as it receives k consecutive second control signals. This allows the bus transmission controller 12 to continuously acquire the first number of operating parameters, thereby acquiring its own operating parameters. Here, the value of k is equal to the number of operating parameters corresponding to the current calculation module.
[0074] Optionally, in this embodiment, the first transmission controller 101 sends the first control signal to the next computing module when the state of the first register 102 is valid;
[0075] If the state of the first register 102 is valid, the second transmission controller 103 will send the received control parameters to the next calculation module.
[0076] That is, the transmission control unit 11 can acquire and transmit the first control signal and control parameters through the state of the first register 102.
[0077] Optionally, in this embodiment, the first transmission controller 101, the second transmission controller 103, and the third transmission controller 104 are all provided with registers.
[0078] Optionally, in this embodiment, the initial state (default state) of the registers of the first transmission controller 101, the second transmission controller 103, and the third transmission controller 104 is invalid.
[0079] like Figure 4 As shown, the register configured by the first transmission controller 101 is denoted as register 0; the register configured by the second transmission controller 103 is denoted as register 1; and the register configured by the third transmission controller 104 is denoted as register 2. Register 0, upon first receiving the first control signal output by the configuration module 200 or the preceding calculation module, adjusts its state to valid. Upon first receiving the first control signal output by the configuration module 200 or the preceding calculation module, and upon receiving the control parameters output by the configuration module 200 or the preceding calculation module, register 1 stores the received control parameters and transfers them to register 2.
[0080] Specifically: When the first input control signal is valid, register 0 is adjusted to be valid in the next clock cycle. Then, the state of the first register is checked. If the first register is valid, the valid state of register 0 is connected to the output first control signal, thus making the output first control signal valid. If register 1 is not valid, the valid state of register 0 is passed to the first register in the next clock cycle, meaning the first register will become valid. The second transmission controller receives control parameters. When the first input control signal is valid, it stores the input control parameters in register 1. Then, if the state of the first register is not valid, the data in register 1 is sent to register 2. If the state of the first register is valid, the data in register 1 is output. The third transmission controller generates a third control signal based on the data in register 2, i.e., C1 and C2, and sends it to the bus transmission controller, ultimately deciding whether the data in the bus transmission controller is sent to the storage unit or the data bus.
[0081] Below, in conjunction with Figure 3 and Figure 4 The structure is illustrated using an example of an electronic device comprising four computing modules:
[0082] Example 1: When C1 indicates that the configuration order of the computing modules is from far to near, and the number of running parameters that the four computing modules need to receive are n0, n1, n2, and n3 respectively, assume that the data bus transmits one parameter per clock cycle.
[0083] Step 1: In the first clock cycle, the configuration module enables the first control signal and sends C2 (value n1+n2+n3) and C1 (value 0, here it is assumed that the configuration order is from far to near, represented by 0, and from near to far, represented by 1) to the computing module 0 through the data bus; In the second clock cycle, the configuration module enables the first control signal and sends C2 (value n2+n3) and C1 (value 0) to the computing module 0 through the data bus, and so on, sending C2 (value n3) and C1 (value 0) and C2 (value 0) and C1 (value 0) in the next two clock cycles.
[0084] Calculation module 0 first receives C2 (value n1+n2+n3) and C1 (value 0). Since the first register in the transmission control unit is invalid, C2 and C1 are sent to register 2 of the third transmission controller via the second transmission controller. Calculation module 0 receives C2 (value n2+n3) and C1 (value 0) in the next clock cycle. Again, since the first register in the transmission control unit is valid, C2 and C1 are sent to the next calculation module. Calculation module 1 and subsequent calculation modules repeat the workflow of calculation module 0. Ultimately, C2 (value n2+n3) is assigned to calculation module 1, C2 (value n3) is assigned to calculation module 2, and C2 (value 0) is assigned to calculation module 3.
[0085] Step 2: The configuration module enables the second control signal and simultaneously sends the operating parameters to the calculation module 0 via the data bus. Then, the third transmission controller in the calculation module 0 detects the valid state of the second control signal and starts counting. For each clock cycle of valid state, the count is incremented by 1. Since the value of C1 is 0, when the count value is less than or equal to C2 in register 2 (with a value of n1+n2+n3), the third transmission controller sends the third control signal to the bus transmission controller. Then, the operating parameters transmitted on the data bus are output to the data bus via the bus transmission controller and the transmission continues.
[0086] Based on the above logic, it can be seen that the first n3 (or groups) of running parameters issued by the configuration module will pass through the calculation module 0, calculation module 1 and calculation module 2, and finally be sent to the calculation module 3. In the first step, C2 in register 2 of the calculation module 3 is configured to 0. Therefore, the parameters transmitted to the calculation module 3 will be received by the calculation module 3 and stored in its storage unit.
[0087] Similarly, the n2 (or groups) of operating parameters sent by the configuration module will pass through calculation module 0 and calculation module 1, and will finally be sent to calculation module 2. Because the counter value of the third transmission controller in calculation module 2 has reached C2 (value n3) configured in the first step, all n2 (or groups) of operating parameters will be received and stored in the storage unit of calculation module 2. Next, the n1 (or groups) of operating parameters sent by the configuration module will be finally received and stored by calculation module 1, and then the n0 (or groups) of operating parameters sent by the configuration module will be finally received and stored by calculation module 0.
[0088] Setting any one of the values of n0, n1, n2, and n3 to 0 will allow you to skip configuring the runtime parameters for a specific computation module.
[0089] Example 2: When C1 indicates that the configuration order of the computing modules is from closest to furthest, and assuming that the number of parameters that the four computing modules need to accept are n0, n1, n2, and n3 respectively, one parameter is transmitted per clock cycle of the bus.
[0090] The first step follows the same process as in Example 1, except that the configuration module sends different values of the control parameters each time. Here, the configuration module sends the following control parameters in the first clock cycle: C2 (value n0) and C1 (value 1); in the second clock cycle, it sends C2 (value n1) and C1 (value 1); in the third clock cycle, it sends C2 (value n2) and C1 (value 1); and in the fourth clock cycle, it sends C2 (value n3) and C1 (value 1), that is, it sends the values of the control parameters required by each calculation module in sequence.
[0091] The second step is the configuration process of the operating parameters. First, the configuration module sends out n0 (or groups of) operating parameters. When these n0 (or groups of) operating parameters arrive sequentially at computing module 0, the transmission control unit of computing module 0, according to the configuration in the first step, starts a counter to count based on the valid state of the input second control signal. When the count value is less than or equal to C2 (value n0), the transmission control unit sends a control signal to the bus transmission controller, transmitting the parameters on the input data bus to the parameter storage device. Ultimately, these n0 (or groups of) operating parameters are transmitted to the parameter storage device of computing module 0.
[0092] Next, the configuration module sends out n1 (or groups of) operating parameters. When these n1 (or groups of) operating parameters arrive at computing module 0 sequentially, the counter in the transmission control unit of computing module 0 has accumulated to n0. These n1 (or groups of) operating parameters exceed the C2 (value n0) of computing module 0, so the transmission control unit of computing module 0 sends a third control signal to the bus transmission controller, ultimately causing these n1 (or groups of) operating parameters to be transmitted to the output data bus. When computing module 1 receives these n1 (or groups of) operating parameters, following the same processing flow as computing module 0, these n1 (or groups of) operating parameters will be transmitted to the storage unit of computing module 1. The same applies to computing modules 2 and 3.
[0093] Ultimately, the configuration module first sends n0 (or groups) of running parameters, which are then received by the calculation module 0. Next, the configuration module sends n1 (or groups) of running parameters, which are then received by the calculation module 1. Following that, the configuration module sends n2 (or groups) of running parameters, which are then received by the calculation module 2. Finally, the configuration module sends n3 (or groups) of running parameters, which are then received by the calculation module 3.
[0094] Similarly, if one of the values of n0, n1, n2, n3 is set to 0, the parameter configuration for a certain calculation module can be skipped.
[0095] Optionally, in this embodiment, the control parameter includes an identifier associated with the first parameter, the identifier being used to indicate the calculation module corresponding to the first parameter;
[0096] The plurality of calculation modules 100 obtain the corresponding first parameter according to the identifier.
[0097] In other words, at this point, the control parameters include a first parameter and an identifier associated with the first parameter. The calculation module can identify the corresponding identifier based on a predefined or preconfigured identifier, and thus obtain the corresponding first parameter based on that identifier.
[0098] Of course, the control parameters can include only the first parameter, but the first parameter needs to be sorted based on a predefined or preconfigured order. The order of each first parameter implicitly indicates the identifier associated with that first parameter. The calculation module can obtain the corresponding first parameter based on the predefined or preconfigured order.
[0099] In summary, the data processing device of this application embodiment can support the configuration of a larger number of computing modules, requires fewer connections between the configuration modules and the computing modules, and only requires a data bus and two control signal lines; all signals maintain the same flow direction between modules, which is beneficial to the back-end implementation of the data processing device; the configuration of computing modules is flexible, and can be from far to near, or from near to far, or some computing modules can be skipped.
[0100] The data processing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0101] The data processing device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0102] like Figure 5 As shown in the embodiments of this application, a data processing method is also provided, including:
[0103] Step 501: Generate and output control parameters and operating parameters for multiple computing modules. The control parameters include a first parameter that corresponds one-to-one with each of the multiple computing modules. The first parameter is used to indicate the number of operating parameters that the computing module receives or skips.
[0104] Thus, according to step 501, for multiple computing modules connected in series, control parameters and operating parameters for these modules are generated and output. This allows each computing module to acquire the corresponding control parameters, and each module can determine its corresponding first parameter. Based on this first parameter, it can receive or skip a specific number of operating parameters, thereby acquiring and storing its own corresponding operating parameters. This not only eliminates the need to limit the number of computing modules but also avoids excessive resource consumption. Furthermore, it ensures the unidirectionality of signal flow, resulting in better performance or electrical characteristics in the backend processes.
[0105] Optionally, the control parameters may further include a second parameter corresponding to each of the plurality of computing modules, the second parameter being used to indicate the configuration order of the running parameters.
[0106] Optionally, the method further includes:
[0107] Generate the first and second control signals for the plurality of computing modules;
[0108] Wherein, the first control signal is used to control the computing module to obtain and store the corresponding control parameters transmitted by the data bus when the first control signal is received; the second control signal is used to control the computing module to obtain and store the corresponding operating parameters transmitted by the data bus according to the first parameter in the control parameters when the second control signal is received.
[0109] It should be noted that this method is applied to the configuration module of the above-mentioned device, and the implementation of the above-mentioned device embodiment is applicable to this method and can achieve the same technical effect.
[0110] This application also provides a chip, including the data processing device described above, which implements the various processes of the above device embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0111] It should be understood that the chip in the embodiments of this application may be a neural processing unit (NPU), a system on chip (SOC), or other chip types.
[0112] like Figure 6 As shown, this application provides an electronic device including a processor 601 and a memory 602. The memory 602 stores programs or instructions that can run on the processor 601. When the program or instructions are executed by the processor, they implement the steps of the data processing method described above.
[0113] The electronic device in this application embodiment can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, handheld computer, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not make specific limitations.
[0114] The electronic device in this application embodiment can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit the specific operating system.
[0115] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described data processing method embodiments and achieve the same technical effects. To avoid repetition, they will not be described again here.
[0116] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0117] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the data processing method embodiments described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0118] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0119] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0120] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. A data processing apparatus, characterized in that, include: A plurality of computing modules connected in series, and a configuration module connected to the first computing module among the plurality of computing modules; The configuration module outputs control parameters and operating parameters of the plurality of computing modules. The control parameters include a first parameter that corresponds one-to-one with the plurality of computing modules. The first parameter is used to indicate the number of operating parameters that the computing module receives or skips. The multiple calculation modules acquire the corresponding control parameters, and based on the first parameter in the control parameters, acquire and store the corresponding operating parameters.
2. The data processing apparatus according to claim 1, characterized in that, The control parameters also include a second parameter that corresponds one-to-one with each of the plurality of computing modules, the second parameter being used to indicate the configuration order of the running parameters.
3. The data processing apparatus according to claim 1, characterized in that, The control parameters and the operating parameters are transmitted via a data bus.
4. The data processing apparatus according to claim 3, characterized in that, The configuration module also outputs a first control signal and a second control signal for the plurality of computing modules; The multiple calculation modules acquire corresponding control parameters, and based on the first parameter in the control parameters, acquire and store the corresponding operating parameters, including: Upon receiving the first control signal, the computing module acquires and stores the corresponding control parameters transmitted via the data bus. Upon receiving the second control signal, the computing module obtains and stores the corresponding operating parameters transmitted by the data bus based on the first parameter in the control parameters.
5. The data processing apparatus according to claim 4, characterized in that, The computing module includes a transmission control unit, a bus transmission controller connected to the transmission control unit, and a storage unit connected to the bus transmission controller; Wherein, when the transmission control unit receives the first control signal output by the configuration module or the previous calculation module for the first time, it stores the received control parameters; when it receives the first control signal output by the configuration module or the previous calculation module for the jth time, it sends the first control signal and the received control parameters to the next calculation module; where j is an integer greater than or equal to 2; If the second control signal output by the configuration module or the previous calculation module is valid, the transmission control unit generates a third control signal according to the stored control parameters and sends the third control signal to the bus transmission controller. The bus transmission controller obtains the corresponding operating parameters according to the third control signal and sends them to the storage unit.
6. The data processing apparatus according to claim 5, characterized in that, The transmission control unit includes a first transmission controller, a first register connected to the first transmission controller, a second transmission controller connected to the first register, and a third transmission controller connected to the second transmission controller; Wherein, when the first transmission controller receives the first control signal output by the configuration module or the previous calculation module for the first time, it adjusts the state of the first register to be valid; When the second transmission controller receives the first control signal output by the configuration module or the previous calculation module for the first time, and also receives the control parameters output by the configuration module or the previous calculation module, it transmits the received control parameters to the third transmission controller for storage. When the third transmission controller receives a valid second control signal output by the configuration module or the previous calculation module, it generates a third control signal based on the stored control parameters and sends the third control signal to the bus transmission controller.
7. The data processing apparatus according to claim 6, characterized in that, When the state of the first register is valid, the first transmission controller sends the first control signal to the next computing module; If the state of the first register is valid, the second transmission controller will send the received control parameters to the next calculation module.
8. The data processing apparatus according to claim 6 or 7, characterized in that, The first transmission controller, the second transmission controller, and the third transmission controller are all equipped with registers.
9. The data processing apparatus according to claim 2, characterized in that, The second parameter instructs the plurality of computing modules to obtain the operating parameters based on their connection distance relationship with the configuration module.
10. The data processing apparatus according to claim 1, characterized in that, The control parameters include an identifier associated with the first parameter, the identifier being used to indicate the calculation module corresponding to the first parameter; The multiple calculation modules obtain the corresponding first parameter based on the identifier.
11. A data processing method, characterized in that, include: The system generates and outputs control parameters and operating parameters for multiple computing modules. The control parameters include a first parameter that corresponds one-to-one with each of the multiple computing modules. The first parameter is used to indicate the number of operating parameters that the computing module receives or skips.
12. The method according to claim 11, characterized in that, The control parameters also include a second parameter that corresponds one-to-one with each of the plurality of computing modules, the second parameter being used to indicate the configuration order of the running parameters.
13. The method according to claim 11, characterized in that, Also includes: Generate the first and second control signals for the plurality of computing modules; Wherein, the first control signal is used to control the computing module to acquire and store the corresponding control parameters transmitted by the data bus when the first control signal is received; The second control signal is used to control the computing module to obtain and store the corresponding operating parameters transmitted by the data bus according to the first parameter in the control parameters when the second control signal is received.
14. A chip, characterized in that, Includes the data processing apparatus as described in any one of claims 1-10 above.
15. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the data processing method as described in any one of claims 11-13.