Operation method, computing device and storage medium for data path
By decoding the flag information of the processor object instruction to generate a clock switch signal and controlling the data path clock switch, it solves the problem of high power consumption of the data path in high-performance processors and achieves more fine-grained clock control and power saving.
Patent Information
- Application Number
- CN202311369192.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-20
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2043-10-20
AI Technical Summary
Existing high-performance processors consume high power in the data path, especially in superscalar designs. Out-of-order execution and SIMD data bit-width data paths consume a lot of power, and the existing technology cannot fully utilize ZH and ZH256 Flag turns off the datapath clock to save power.
By decoding the object instruction, the flag information of the source operand register is assigned to the destination operand register, and a clock switch signal is generated to control the clock switch of some bits in the data path, achieving more fine-grained and flexible clock control, and turning off unused clock signals. necessary clock to reduce power consumption.
It effectively reduces the power consumption of the data path, and controls the data path clocks of different bit widths through multiple clock switch signals respectively, achieving more flexible clock switch control and saving the power consumption of the processor.
Smart Images

Figure HDA0004506108800000011 
Figure HDA0004506108800000021 
Figure HDA0004506108800000022
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to an operating method, a computing device, and a storage medium for a data path. Background Art
[0002] A processor (eg, a CPU) is a core component of a computer and is responsible for, for example, executing instructions and processing data. With the increasing requirements for, for example, executing instructions and processing data, high-performance processors emerge as the times require.
[0003] High-performance processors are able to process large amounts of data and tasks quickly. They typically have higher clock speeds and more cores, allowing them to complete more computing tasks in a shorter period of time. This type of processor is often used for high-performance computing, gaming, video editing, and other applications that require a lot of computing. High-performance processors typically require higher power consumption. Summary of the invention
[0004] At least one embodiment of the present disclosure provides an operation method for a data path, comprising: assigning flag information of a source operand register in the object instruction to a destination operand register in the object instruction based on a prompt signal obtained by decoding an object instruction, wherein the flag information is used to indicate whether the nth bit of the corresponding domain in the m-bit of the register is 0, m and n are positive integers, and m>n; and generating a clock switch signal based on the assigned flag information to control the switch of the clock corresponding to some bits in the data path during the execution of the object instruction.
[0005] At least one embodiment of the present disclosure provides a computing device, including a control path and a data path, wherein the control path includes: an assignment unit, configured to assign flag information of a source operand register in the object instruction to a destination operand register in the object instruction based on a prompt signal obtained by decoding the object instruction, wherein the flag information is used to indicate whether the nth bit of the corresponding field in the m-bit of the register is 0, m and n are positive integers, and m>n; and a clock switch signal generation unit, configured to generate a clock switch signal based on the assigned flag information to control the switching of the clock corresponding to some bits in the data path during the execution of the object instruction.
[0006] At least one embodiment of the present disclosure provides a computing device, comprising: one or more processors; a memory, comprising one or more computer program modules; wherein the one or more computer program modules are stored in the memory and configured to be executed by the one or more processors to implement the operating method as described above.
[0007] At least one embodiment of the present disclosure provides a non-transitory readable storage medium having computer executable instructions stored thereon, wherein the computer executable instructions, when executed by a processor, implement the operating method as described above. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings of the embodiments of the present disclosure are briefly introduced below. Obviously, the drawings in the following description only relate to some embodiments of the present disclosure, and are not intended to limit the present disclosure.
[0009] Figure 1 A schematic diagram showing an exemplary superscalar processor instruction pipeline;
[0010] Figure 2 A schematic diagram of an exemplary CPU is shown;
[0011] Figure 3A A flowchart of a method 300 for operating a data path according to at least one embodiment of the present disclosure is shown;
[0012] Figure 3B A schematic diagram showing a computing device according to at least one embodiment of the present disclosure;
[0013] Figure 4A A schematic diagram of a native256 data path clock control signal according to at least one embodiment of the present disclosure is shown;
[0014] Figure 4B A schematic diagram of a native128 data path clock control signal according to at least one embodiment of the present disclosure is shown;
[0015] Figure 5 A schematic diagram showing another computing device according to at least one embodiment of the present disclosure;
[0016] Figure 6 A schematic diagram of a non-transitory readable storage medium according to at least one embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0017] Reference will now be made in detail to specific embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. Although the present disclosure will be described in conjunction with specific embodiments, it should be understood that it is not intended to limit the present disclosure to the described embodiments, but rather to cover changes, modifications and equivalents included within the spirit and scope of the present disclosure as defined by the appended claims. It should be noted that the methods and operations described herein can be implemented by any functional block or functional arrangement, and any functional block or functional arrangement can be implemented as a physical entity or a logical entity, or a combination of the two.
[0018] Note that the examples to be introduced below are only specific examples, and are not intended to limit the embodiments of the present disclosure to the specific shapes, hardware, connection relationships, operations, values, conditions, data, sequences, etc. shown and described. Those skilled in the art can apply the concepts of the present disclosure to construct more embodiments not mentioned in the present description by reading the present description.
[0019] The terms used in the present disclosure are those common terms currently widely used in the art in consideration of the functions of the present disclosure, but these terms may vary according to the intention of a person of ordinary skill in the art, precedents, or new technologies in the art. In addition, specific terms may be selected by the applicant, and in this case, their detailed meanings will be described in the detailed description of the present disclosure. Therefore, the terms used in the specification should not be understood as simple names, but rather as an overall description based on the meaning of the terms and the present disclosure.
[0020] Flowcharts are used in this disclosure to illustrate the operations performed by the system according to the embodiments of the present application. It should be understood that the preceding or following operations are not necessarily performed precisely in order. On the contrary, various steps may be processed in reverse order or simultaneously as required. At the same time, other operations may also be added to these processes, or one or more operations may be removed from these processes.
[0021] The following is an exemplary explanation of some terms used in the present disclosure. It should be noted that the exemplary explanations of these terms are only for the purpose of facilitating the understanding of the present disclosure in an example application scenario, and do not exclude their common meanings and can be extended to other related application scenarios or general scenarios.
[0022] System-on-a-Chip (SOC): Also known as system-on-chip, it is a product, a dedicated integrated circuit that contains all the contents of a complete system and embedded software.
[0023] Central processing unit (CPU): A microprocessor that can execute computer instructions and is responsible for controlling the computer's operation and data processing.
[0024] Microcontroller unit (MCU): A single-chip microcomputer that integrates the main parts of a microcomputer on one chip.
[0025] Digital signal processor (DSP): A processor composed of large-scale or ultra-large-scale integrated circuit chips used to complete digital signal processing tasks.
[0026] Logic register number (LRN): refers to the number of the register used in the computer to store and process, for example, the results of logical operations.
[0027] Physical register file (PRF): also known as physical register stack, is an array of multiple registers in the CPU, usually used to store the physical location and status of each register in the processor.
[0028] Physical register number (PRN): refers to the number of the register used to store data or instructions in the computer.
[0029] Single instruction multiple data (SIMD): Each operand consists of multiple data elements, such as 4 single-precision floating-point elements in 128 bits.
[0030] XMM or XMM register: Register LRN used by SSE, avx128, avx512vl.xmm instruction sets in x86 architecture, storing 128-bit data.
[0031] YMM or YMM register: LRN used by avx256, avx512vl.ymm instruction sets in x86 architecture, storing 256-bit data.
[0032] ZMM or ZMM register: LRN used by the avx512 instruction set in the x86 architecture, storing 512-bit data.
[0033] Native128: The width of the CPU data processing path (also called the data path) is 128 bits, and instructions using YMM need to be executed twice.
[0034] Native256: The CPU data processing path width is 256 bits. Instructions using YMM can be executed in one go, while instructions using ZMM need to be executed in two steps.
[0035] ZS (zero single) or ZS flag information: When set to 1, it indicates that the high 96 bits of the 128-bit value stored in the XMM LRN are 0.
[0036] ZD (zero double) or ZD flag information: When set to 1, it indicates that the high 64 bits of the 128-bit value stored in the XMM LRN are 0.
[0037] ZH (zero high128) or ZH flag information: When set to 1, it indicates that the high 128 bits of the 256-bit value stored in the YMM LRN are 0.
[0038] ZH256 (zero high 256) or ZH256 flag information: When set to 1, it indicates that the high 256 bits of the 512-bit value stored in the ZMM LRN are 0.
[0039] It is understood that, illustratively, an operand refers to data to be calculated or operated, an operand register is a register used to store these data, and an operand register LRN is the number of the register. In the execution of an instruction, the corresponding operand register can be indexed through the operand register LRN, thereby indexing the corresponding operand. For the convenience of description, in the absence of contradiction, the operands, operand registers, and operand registers LRN herein are not semantically distinguished and can indicate the same object. However, it is understood that the above terms may indicate different objects, but various aspects of the present disclosure can be applied to these differences or differences with or without modification without exceeding the scope of protection of the present disclosure.
[0040] Low-power technology is a basic technology of modern high-performance CPUs. The superscalar speculative execution used by high-performance CPUs usually has multiple data path processing components performing calculations simultaneously in the data path, which is a major source of CPU power consumption.
[0041] Superscalar refers to a method of executing multiple instructions in parallel within a cycle, with increased instruction-level parallelism. A processor that can process multiple instructions in a cycle is called a superscalar processor. Superscalar processors add additional resources to a conventional scalar processor, creating multiple pipelines, each of which executes its assigned instructions, to achieve parallelism.
[0042] Figure 1 FIG. 1 is a schematic diagram of an exemplary superscalar processor instruction pipeline 100. Figure 1 , each stage in the pipeline can input 4 instructions in parallel, for example, instructions 1-4 are processed in parallel, instructions 5-8 are processed in parallel, and instructions 9-12 are processed in parallel. Figure 1 In the conventional scalar pipeline shown, the average number of instructions executed per clock cycle is greater than 1, that is, its instruction-level parallelism is greater than 1.
[0043] For example, superscalar processors can further support out-of-order execution. Out-of-order execution refers to the technology that allows the CPU to send multiple instructions to the corresponding circuit units for processing separately without following the order specified by the program. Out-of-order execution involves many algorithms, which are basically designed based on reservation stations. The core idea of reservation stations is to send the instructions after decoding to their respective reservation stations for storage according to their respective instruction types. If all the operands of the instruction are ready, out-of-order transmission can begin.
[0044] Figure 2 A schematic diagram of an exemplary CPU 200 is shown. Figure 1 , the CPU 200 includes an instruction fetch unit 202 , a decode unit 204 , a rename unit 206 , an order commit unit 208 , a scheduling execution unit 210 , and a physical register file 220 .
[0045] The instruction fetch unit 202 may read instructions from the memory and send them to the decode unit 204 .
[0046] The decode unit 204 may be responsible for decoding instructions, determining the operation to be performed, and the operands required for the operation.
[0047] The renaming unit 206 (also referred to as a register renaming unit) can process registers in instructions and rename them to physical registers, for example, renaming register numbers in instructions to actual physical register numbers. The renaming unit 206 maintains an architectural register mapping table 207, which can maintain a mapping between register numbers in instructions and actual physical register numbers.
[0048] The sequential submission unit 208 may submit instructions for execution in sequence. The sequential submission unit 208 maintains a physical register available list 209, which may maintain currently available physical registers.
[0049] The scheduling execution unit 210 may include an out-of-order scheduling unit 212 and an execution unit 214 .
[0050] The out-of-order scheduling unit 212 may schedule instructions by rearranging the execution order of the instructions.
[0051] The execution unit 214 is a hardware unit for performing different types of operations, and may include, for example, an arithmetic logic unit (ALU) 215, a multiplier (MUL) 216, and a divider (DIV) 217. The arithmetic logic unit 215 is mainly used to perform arithmetic and logical operations, such as addition, subtraction, multiplication, division, and, or, and not. The multiplier 216 is mainly used to perform multiplication operations. The divider 217 is mainly used to perform division operations.
[0052] The physical register file 220 may be used to store data in the processor, for example, to save register values being used in instructions.
[0053] exist Figure 2 In the implementation of the CPU 200 shown, instructions are dispatched by the out-of-order dispatch unit 212 and sent to the ALU 215, MUL 216 and DIV 217 in the execution unit 214 for execution. The data path in the execution unit 214 has multiple pipelines. In addition, considering that the SIMD data bit width is very wide, the data path of the entire execution unit 214 will consume a lot of power. In addition, considering that out-of-order speculative execution will cause greater power consumption when the pipeline needs to be refreshed. Therefore, reducing the power consumption of the data path is crucial to the low-power design of the CPU.
[0054] The power consumption optimization in the exemplary data path is based on the design of native128. When the ZS and ZD of the destination operand LRN of the XMM instruction are 1, the clocks of most registers in the upper 96 bits of the data path can be turned off, and the output results of the upper 96 bits of the data path can be forcibly cleared to 0, thereby saving power. To achieve this goal, the following operations are required:
[0055] 1. When decoding the instruction, a prompt signal for setting the destination operand LRN is provided according to the instruction function, which is divided into Pass / Clear / Set ZS, Pass / Clear / Set ZD, where Pass means assigning ZS or ZD of the instruction source operand 1LRN to the destination operand, such as AND operation, when ZS or ZD of the source operand 1=1, the destination operand ZS or ZD must be set to 1; Clear means resetting the ZS or ZD of the destination operand LRN; Set means setting the ZS or ZD of the destination operand LRN.
[0056] 2. When renaming an instruction, the new ZS and ZD signals of the instruction destination operand LRN are calculated according to the above prompt signals, and then the clocks of most of the registers of the upper 96 bits of the 128-bit data path are turned off when the new ZS of the destination operand = ZD = 1.
[0057] The inventors of the present disclosure have realized that the above exemplary data path has the following defects in terms of power consumption optimization:
[0058] 1. The clocks of most registers of the upper 96 bits of the 128-bit data path are turned off only when the destination operand ZS=ZD=1. In the design of native128 and native256, the ZH and ZH256 flags cannot be fully utilized to turn off the data path clock to save power.
[0059] 2. The application of ZH is limited. In general native128 design, ZH only has two scenarios: Set / Clear. In native256, the Pass ZH scenario is added to implement the move-elimination function of YMM. As far as the move-elimination function is concerned, its Pass ZH scenario is the implementation method of data move instructions. It can be simply considered that this assignment operation is the data path to complete this type of data move instruction, and does not involve the situation where the flag information of the instruction source operand register is assigned to the destination operand register by parsing the instruction. In addition, as far as the move-elimination function is concerned, it does not cover all scenarios that can Pass ZH to the maximum extent. For example, ZH can be passed while the AND operation passes ZS and ZD.
[0060] 3. The signal for shutting down the data path clock is only 1 bit, which is too coarse in native128 and even less flexible in native256, and the data path clock cannot be shut down as much as possible.
[0061] Figure 3A FIG. 3 is a flow chart showing a method 300 for operating a data path according to at least one embodiment of the present disclosure. Figure 3A The operation method 300 includes steps S310 to S320. Exemplarily, the operation method 300 can be applied to a control path to implement the operation on a data path.
[0062] In step S310, based on the prompt signal obtained by decoding the object instruction, the flag information of the source operand register in the object instruction is assigned to the destination operand register in the object instruction, wherein the flag information is used to indicate whether the n bit of the corresponding field in the m bit of the register is 0, m and n are positive integers, and m>n.
[0063] The subject instruction may be any instruction that can be executed or processed by a computing device.
[0064] The corresponding domain here can be a region corresponding to a portion of the bits in the register. In some architectures, the corresponding domain is a region corresponding to a continuous portion of the bits in the register. For example, m can be 64 and the n-bit of the corresponding domain is the upper 32 bits, m can be 128 and the n-bit of the corresponding domain is the upper 64 bits, m can be 256 and the n-bit of the corresponding domain is the upper 128 bits. Of course, the embodiment is not limited to this, for example, the n-bit of the corresponding domain is not limited to the upper n bits, and for another example, n can also be other values.
[0065] In step S320, a clock switch signal is generated based on the assigned flag information to control the switching of the clock corresponding to some bits in the data path during the execution of the object instruction.
[0066] For example, when the flag information indicates that the nth bit of the corresponding field in the m-bit indication register is 0, a clock switch signal can be generated to turn off the switch of the clock corresponding to some bits (eg, n bits) in the data path during the execution of the object instruction.
[0067] As described above, the method for operating a data path according to at least one embodiment of the present disclosure can be based on a prompt signal obtained by decoding an object instruction, and based on the prompt signal, a clock switch signal for controlling the switch of a clock corresponding to a portion of bits in the data path is obtained. In this way, the method for operating a data path according to at least one embodiment of the present disclosure can reduce the power consumption of the data path.
[0068] Some exemplary additional aspects of a method for operating a data path according to at least one embodiment of the present disclosure are described below.
[0069] For example, according to at least one embodiment of the present disclosure, in an operation method for a data path, the flag information includes at least one of first flag information or second flag information, wherein the first flag information is used to indicate whether the upper 128 bits of the 256-bit value stored in the destination operand register are 0; and the second flag information is used to indicate whether the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
[0070] The first flag information may correspond to the above-mentioned flag information ZH, and the second flag information may correspond to the above-mentioned flag information ZH256.
[0071] In this way, the operation method for the data path according to at least one embodiment of the present disclosure can pass the first flag information and the second flag information, thereby expanding the application of the first flag information and the second flag information in the data path, and can promote the full use of the first flag information and the second flag information in the data path to shut down the data path clock to save power consumption.
[0072] For example, according to the operating method for a data path according to at least one embodiment of the present disclosure, the clock switch signal is a plurality of clock switch signals, and each clock switch signal is used to control the switching of the clock of a part of the data path.
[0073] In this way, compared with controlling the switch of the clock of the channel by 1 bit, the operating method for the data channel according to at least one embodiment of the present disclosure can achieve finer-grained and more flexible clock switch control, thereby facilitating turning off the data channel clock as much as possible to save power consumption as much as possible.
[0074] For example, according to at least one embodiment of the present disclosure, in an operation method for a data path, the bit width of the data path is 256, and the multiple clock switch signals include: a first clock switch signal, used to control the data path clock of bits [63:32] in the data path; a second clock switch signal, used to control the data path clock of bits [127:64] in the data path; and a third clock switch signal, used to control the data path clock of bits [255:128] in the data path.
[0075] In this way, according to at least one embodiment of the present disclosure, the operation method for the data path constructs a specific plurality of clock switch signals for controlling the clocks of the corresponding bits in the data path respectively for a specific application scenario where the bit width of the data path is 256 (for example, for native256), so as to achieve finer-grained and more flexible clock switch control.
[0076] For example, according to at least one embodiment of the present disclosure, the operating method for a data path, the flag information includes first flag information, second flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and a clock switch signal is generated based on the assigned flag information to control the switch of the clock corresponding to some bits in the data path during the execution of the object instruction, including: generating a first clock switch signal based on the following conditions to turn off at least part of the clock corresponding to the data path [63:32], including: in response to the destination operand register being a first type register or a second type register, and the third flag information of the destination operand register is a first value, or in response to the destination operand register being a third type register, and the second flag information of the destination operand register is a first value; generating a second clock switch signal based on the following conditions to turn off at least part of the clock corresponding to the data path [127:64], including: in response to the destination operand register being a first type register or a second type register, and the destination operand register The fourth flag information of the destination operand register is the first value; in response to the destination operand register being a third type register, and the second flag information of the destination operand register is the first value; and a third clock switch signal is generated based on the following conditions to close at least part of the clock corresponding to the data path [255:128], including: in response to the destination operand register being a second type register, and the first flag information of the destination operand register is the first value, or in response to the destination operand register being a third type register, and the second flag information of the destination operand register is the first value, wherein the first type register is a storage bit with a number of 128 The second type register is a register with a storage bit number of 256, the third type register is a register with a storage bit number of 512, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0; and the first value of the second flag information indicates that the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
[0077] Herein, the third flag information may correspond to the flag information ZS, and the fourth flag information may correspond to the flag information ZD. In addition, the first type register may be an XMM register in the x86 architecture, the second type register may be a YMM register in the x86 architecture, and the third type register may be a ZMM register in the x86 architecture. Of course, the embodiment is not limited thereto, and the first type register, the second type register, and the third type register may be suitable registers of other architectures.
[0078] In this way, according to at least one embodiment of the present disclosure, the operation method for a data path can generate multiple clock switch signals for shutting down the corresponding clocks in the data path based on the value of the flag information in a specific application scenario where the bit width of the data path is 256, thereby realizing fine-grained clock switch control to save power consumption.
[0079] For example, according to at least one embodiment of the present disclosure, in an operation method for a data path, the bit width of the data path is 128, and the multiple clock switch signals include: a fourth clock switch signal, used to control the data path clock of the [63:32] bits in the data path; and a fifth clock switch signal, used to control the data path clock of the [127:64] bits in the data path.
[0080] In this way, according to at least one embodiment of the present disclosure, the operation method for the data path constructs a specific plurality of clock switch signals for controlling the clocks of the corresponding bits in the data path respectively for a specific application scenario in which the bit width of the data path is 128 (for example, for native128), so as to achieve finer-grained and more flexible clock switch control.
[0081] For example, according to at least one embodiment of the present disclosure, the operating method for a data path, the flag information includes first flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and based on the assigned flag information, a clock switch signal is generated to control the switch of the clock of the data path, including: based on the following conditions, a fourth clock switch signal is generated to turn off at least part of the clock in the data path [63:32], including: in response to the destination operand register being a first type register and the third flag information of the destination operand register being a first value, or in response to the destination operand register being a second type register and the first flag information of the destination operand register being a second type register is a first value; a fifth clock switch signal is generated based on the following conditions to shut down at least part of the clocks in the data path [127:64], including: in response to the destination operand register being a first type register, and the fourth flag information of the destination operand register being a first value; in response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value, wherein the first type register is a register with a storage bit number of 128, the second type register is a register with a storage bit number of 256, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, and the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0.
[0082] In this way, according to at least one embodiment of the present disclosure, the operation method for a data path can generate multiple clock switch signals for shutting down the corresponding clocks in the data path based on the value of the flag information in a specific application scenario where the bit width of the data path is 128, thereby realizing fine-grained clock switch control to save power consumption.
[0083] For example, according to the data path operation method of at least one embodiment of the present disclosure, the hint signal is obtained according to the function of the target instruction when decoding the target instruction.
[0084] In this way, according to at least one embodiment of the present disclosure, the operating method for a data path can obtain prompt information through a decoding unit of a processor in a scenario such as a processor.
[0085] For example, according to at least one embodiment of the present disclosure, a method for operating a data path, based on a hint signal obtained by decoding an object instruction, assigns the flag information of a source operand register in the object instruction to a destination operand register in the object instruction, including: calculating the flag information according to the hint signal when renaming the instruction. The instruction renaming herein may include a process of mapping a decoded instruction destination operand register to a physical register. For example, instruction renaming may include the above-mentioned assignment process and register renaming process.
[0086] In this way, according to at least one embodiment of the present disclosure, the operation method for a data path can be used for a scenario such as a processor, where the flag information of the source operand register in the object instruction is assigned to the destination operand register in the object instruction through the instruction renaming unit of the processor.
[0087] For example, according to at least one embodiment of the present disclosure, the operating method for a data path includes third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and based on a prompt signal obtained by decoding the object instruction, the flag information of the source operand register in the object instruction is assigned to the destination operand register in the object instruction, including: when the instruction is renamed, the flag information is calculated according to the prompt signal The third flag information and the fourth flag information of the destination operand register; generating a clock switch signal based on the assigned flag information to control the switching of the clock corresponding to some bits in the data path during the execution of the object instruction, including: in response to the third flag information being a first value and the fourth flag information being a first value, generating at least part of the clock corresponding to the upper 96 bits in the 128-bit data path to turn off, wherein the first value of the third flag information indicates that the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate that the upper 64 bits of the 128-bit value stored in the destination operand register are 0.
[0088] In this way, according to at least one embodiment of the present disclosure, in a scenario such as a processor, the operating method for a data path obtains the third flag information and the fourth flag information through the decoding unit and the instruction renaming unit of the processor, and based on the third flag information and the fourth flag information, at least part of the clock corresponding to the upper 96 bits in the 128-bit data path is turned off.
[0089] For example, according to at least one embodiment of the present disclosure, the at least part of the clock of the data path that is turned off may include the clock of the calculation of the data path. Exemplarily, turning off at least part of the clock corresponding to the upper 96 bits in the 128-bit data path may be turning off the clock of the calculation corresponding to the upper 96 bits. In other aspects, the clock of the output of the final data of these bits may not be turned off.
[0090] Corresponding to the operating method 300 for a data path according to at least one embodiment of the present disclosure, at least one embodiment of the present disclosure further provides a computing device.
[0091] Figure 3B A schematic diagram of a computing device 350 is shown, in accordance with at least one embodiment of the present disclosure.
[0092] See also Figure 3B , the computing device 350 includes a control path 360 and a data path 390. The data path 360 includes an assignment unit 370 and a clock switch signal generation unit 380. For example, the data path may include the operation of data-related signals such as various operation operations, and the control path may include the generation of control signals such as memory access and immediate number generation.
[0093] The assignment unit 370 is configured to assign the flag information of the source operand register in the object instruction to the destination operand register in the object instruction based on the prompt signal obtained by decoding the object instruction, wherein the flag information is used to indicate whether the n bit of the corresponding field in the m bits of the register is 0, m and n are positive integers, and m>n.
[0094] The clock switch signal generating unit 380 is configured to generate a clock switch signal based on the assigned flag information to control the switching of the clock corresponding to some bits in the data path during the execution of the object instruction.
[0095] As described above, the computing device according to at least one embodiment of the present disclosure can obtain a clock switch signal for controlling the switch of the clock corresponding to some bits in the data path based on the prompt signal obtained by decoding the object instruction. In this way, the operation method for the data path according to at least one embodiment of the present disclosure can reduce the power consumption of the data path.
[0096] Some exemplary additional aspects of a computing device according to at least one embodiment of the present disclosure are described below.
[0097] For example, in a computing device according to at least one embodiment of the present disclosure, the flag information includes at least one of first flag information or second flag information, wherein the first flag information is used to indicate whether the upper 128 bits of the 256-bit value stored in the destination operand register are 0; and the second flag information is used to indicate whether the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
[0098] For example, in a computing device according to at least one embodiment of the present disclosure, the clock switch signal is a plurality of clock switch signals, and each clock switch signal is used to control the switching of the clock of a part of the data paths.
[0099] For example, in a computing device according to at least one embodiment of the present disclosure, the bit width of the data path is 256, and the multiple clock switch signals include: a first clock switch signal, used to control the data path clock of the [63:32] bits in the data path; a second clock switch signal, used to control the data path clock of the [127:64] bits in the data path; and a third clock switch signal, used to control the data path clock of the [255:128] bits in the data path.
[0100] For example, according to a computing device of at least one embodiment of the present disclosure, the flag information includes first flag information, second flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and the clock switch signal generating unit is further configured to: generate a first clock switch signal based on the following conditions to turn off at least part of the clock corresponding to the data path [63:32], including: in response to the destination operand register being a first type register or a second type register, and the third flag information of the destination operand register is a first value, or in response to the destination operand register being a third type register, and the second flag information of the destination operand register is a first value; generate a second clock switch signal based on the following conditions to turn off at least part of the clock corresponding to the data path [127:64], including: in response to the destination operand register being a first type register or a second type register, and the fourth flag information of the destination operand register is a first value; in response to the destination operand register being a first type register or a second type register, and the fourth flag information of the destination operand register is a first value; The register is a third type register, and the second flag information of the destination operand register is a first value; and a third clock switch signal is generated based on the following conditions to close at least part of the clock corresponding to the data path [255:128], including: in response to the destination operand register being a second type register, and the first flag information of the destination operand register is a first value, or in response to the destination operand register being a third type register, and the second flag information of the destination operand register is a first value, wherein the first type register is a register with a storage bit number of 128, and the second type register is a register with a storage bit number of 128. The first type register is a register with a storage bit number of 256, the third type register is a register with a storage bit number of 512, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0; and the first value of the second flag information indicates that the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
[0101] For example, in a computing device according to at least one embodiment of the present disclosure, the bit width of the data path is 128, and the multiple clock switch signals include: a fourth clock switch signal, used to control the data path clock of the [63:32] bits in the data path; and a fifth clock switch signal, used to control the data path clock of the [127:64] bits in the data path.
[0102] For example, according to a computing device of at least one embodiment of the present disclosure, the flag information includes first flag information, second flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and the clock switch signal generating unit is further configured to: generate a fourth clock switch signal based on the following conditions to shut down at least part of the clock in the data path [63:32], including: in response to the destination operand register being a first type register and the third flag information of the destination operand register being a first value, or in response to the destination operand register being a second type register and the first flag information of the destination operand register being a first value; based on the following conditions The device generates a fifth clock switch signal to turn off at least part of the clock in the data path [127:64], including: in response to the destination operand register being a first type register and the fourth flag information of the destination operand register being a first value; in response to the destination operand register being a second type register and the first flag information of the destination operand register being a first value, wherein the first type register is a register with a storage bit number of 128, the second type register is a register with a storage bit number of 256, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, and the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0.
[0103] For example, in the computing device according to at least one embodiment of the present disclosure, the control path further includes: a decoding unit configured to provide a prompt signal according to a function of the object instruction when decoding the object instruction.
[0104] For example, in the computing device according to at least one embodiment of the present disclosure, the assignment unit is further configured to: calculate and obtain the flag information according to the prompt signal when the instruction is renamed.
[0105] For example, according to a computing device of at least one embodiment of the present disclosure, the flag information includes third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; the assignment unit is also configured to: when the instruction is renamed, calculate the third flag information and the fourth flag information of the destination operand register according to the prompt signal; the clock switch signal generation unit is also configured to: in response to the third flag information being a first value and the fourth flag information being a first value, generate at least part of the clock corresponding to the upper 96 bits in the 128-bit data path to close, wherein the first value of the third flag information indicates that the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate that the upper 64 bits of the 128-bit value stored in the destination operand register are 0.
[0106] For example, according to a computing device of at least one embodiment of the present disclosure, at least part of the clock of the data path that is turned off may include the clock of the calculation on the data path. Exemplarily, turning off at least part of the clock corresponding to the upper 96 bits in the 128-bit data path may be turning off the clock of the calculation corresponding to the upper 96 bits. In other aspects, the clock of the output of the final data of these bits may not be turned off.
[0107] Exemplarily, the computing device according to at least one embodiment of the present disclosure may be a processor. In an exemplary processor architecture, the pipeline of the processor may include a control path and a data path. The control path may include a decoding unit, an assignment unit, and a register renaming unit, and the data path is generally the implementation part of the specific computing function of the instruction. For example, for the instruction C=A+B, the control path may be responsible for preparing the operands required for the instruction, while the data path is responsible for calculating the result of A+B. Therefore, in the SIMD data path, data calculations with a large bit width are involved, and power saving needs to be considered. Based on the above, the computing device according to at least one embodiment of the present disclosure can save the power consumption of the data path of the processor.
[0108] The above-mentioned additional aspects of the computing device 350 according to at least one embodiment of the present disclosure may correspond to the additional aspects of the operating method 300 for a data path according to at least one embodiment of the present disclosure. Therefore, the technical effects of the additional aspects of the operating method 300 for a data path according to at least one embodiment of the present disclosure may also be mapped to the additional aspects of the computing device 350 according to at least one embodiment of the present disclosure, which will not be repeated here.
[0109] The following describes the above combination with an example application scenario. Figure 3A and Figure 3BIt is understood that the example application scenarios described below are only examples and not limitations, and are intended to implement the above combination in specific application scenarios. Figure 3A and Figure 3B One or more aspects of the present invention, and the various aspects described below in conjunction with the example application scenario can be combined with the above Figure 3A and Figure 3B one or more aspects of a combination.
[0110] The example application scenarios involve Figure 4A The native256 datapath clock control shown in Figure 4A The native128 datapath clock control is shown.
[0111] This example scenario provides mechanisms involving one or more of the following:
[0112] 1. According to the prompt signal given by decoding, if the destination operand is YMM, Pass ZH is performed at the same time as Pass ZS and ZD, and the Pass ZH range is expanded.
[0113] 2. Apply ZH and ZH256 to the data path clock shutdown control signal to increase the number of scenarios where the data path clock is shut down to save power.
[0114] 3. The clock control signals in the data paths that process different data elements are subdivided. When ZS, ZD, and ZH / ZH256 are set to 1, different data path clocks can be turned off respectively, further increasing power saving scenarios.
[0115] In the improved design, in addition to the MOV instruction being able to pass ZH / ZH256 when performing move-elimination, when other instructions appear, such as AND, ABS, and MUL operations, when the source operand 1ZH / ZH256=1 is the destination operand, ZH / ZH256=1 must be set.
[0116] The following describes the application of the ZH and ZH256 flags in the data path clock control and the refinement of the data path clock control signal.
[0117] Figure 4A FIG. 1 is a schematic diagram of a native256 data path clock control signal according to at least one embodiment of the present disclosure. Figure 4A The data path partitioning for implementing the execution components in the native256 data path is described in detail. Of course, the embodiment is not limited to this, and various aspects of this embodiment can also be used for other components in the native256 data path.
[0118] See also Figure 4A, the 256-bit data path is divided into four parts: data path [31:0] ([31:0] bits), data path [63:32] ([63:32] bits), data path [127:64] ([127:64] bits) and data path [255:128] ([255:128] bits). Each part has a different clock control signal to turn off most of the clocks of the part at the appropriate time and force the data path result to be cleared to 0 to save power.
[0119] For example, see Figure 4A , the Clk_disS signal (e.g., corresponding to the first clock switch signal above) can control the data path clock for processing bits [63:32] in the 256-bit data path; the Clk_disD signal (e.g., corresponding to the second clock switch signal above) can control the data path clock for processing bits [127:64] in the 256-bit data path; and the Clk_disH signal (e.g., corresponding to the third clock switch signal above) can control the data path clock for processing bits [255:128] in the 256-bit data path. For example, Figure 4A The data path in can have one or more levels of registers.
[0120] In an additional aspect, the clock switch signal for controlling the data path clock for processing the [31:0] bit in the data path may be the switch information of the data path. Therefore, when the data path is turned on, the data path clock for the [31:0] bit in the data path may be in the turned-on state. Of course, the embodiment is not limited thereto, and an additional clock switch signal may be provided for the data path clock for processing the [31:0] bit in the data path.
[0121] The following describes the scenario where the Clk_disS signal is set to 1.
[0122] For example, when the instruction destination operand LRN is XMM (e.g., corresponding to the first type of register above) or YMM (e.g., corresponding to the second type of register above) and its new ZS (e.g., corresponding to the third flag information above) == 1, Clk_disS = 1, shutting down most of the clocks in the data path [63:32].
[0123] For another example, when the instruction destination operand is ZMM (e.g., corresponding to the third type register above), and its new ZH256 (e.g., corresponding to the second flag information above) == 1, Clk_disS = 1, shutting down most of the clocks in the data path [63:32].
[0124] The following describes the scenario where the Clk_disD signal is set to 1.
[0125] For example, when the instruction destination operand LRN is XMM or YMM, and its new ZD (eg, corresponding to the fourth flag information above) == 1, Clk_disD=1, turning off most of the clocks in the data path [127:64].
[0126] For another example, when the destination operand of the instruction is ZMM, and its new ZH256 == 1, Clk_disD=1, turning off most of the clocks in the data path [127:64].
[0127] The following describes the scenario where the Clk_disH signal is set to 1
[0128] For example, when the destination operand of the instruction is YMM, and its new ZH (eg, corresponding to the first flag information above) == 1, Clk_disH=1, turning off most of the clocks in the data path [255:128].
[0129] For another example, when the destination operand of the instruction is ZMM, and its new ZH256==1, Clk_disH=1, and most of the clocks in the data path [255:128] are turned off.
[0130] Figure 4B FIG. 1 is a schematic diagram of a native128 data path clock control signal according to at least one embodiment of the present disclosure. Figure 4B The data path partitioning for implementing the execution components in the native128 data path is described in detail. Of course, the embodiment is not limited to this. Various aspects of this embodiment can also be used for other components in the native128 data path.
[0131] See also Figure 4B , the 128-bit data path is divided into three parts: data path [31:0] ([31:0] bits), data path [63:32] ([63:32] bits), and data path [127:64] ([127:64] bits). Each part has a different clock control signal to turn off most of the clocks of the part at the appropriate time and force the data path result to be cleared to 0 to save power.
[0132] For example, see Figure 4B , the Clk_disS signal (e.g., corresponding to the fourth clock switch signal above) can control the data path clock for processing bits [63:32] in the 256-bit data path; the Clk_disD signal (e.g., corresponding to the fifth clock switch signal above) can control the data path clock for processing bits [127:64] in the 256-bit data path. For example, Figure 4A The data path in can have one or more levels of registers.
[0133] In an additional aspect, the clock switch signal for controlling the data path clock for processing the [31:0] bit in the data path may be the switch information of the data path. Therefore, when the data path is turned on, the data path clock for the [31:0] bit in the data path may be in the turned-on state. Of course, the embodiment is not limited thereto, and an additional clock switch signal may be provided for the data path clock for processing the [31:0] bit in the data path.
[0134] The following describes the scenario where the Clk_disS signal is set to 1.
[0135] For example, when the instruction destination operand LRN is XMM (e.g., corresponding to the first type register above) and its new (destination operand) ZS (e.g., corresponding to the third flag information above) == 1, Clk_disS = 1, shutting down most of the clocks in the data path [63:32].
[0136] For example, when the instruction destination operand is YMM (e.g., corresponding to the second type register above) and its new ZH (e.g., corresponding to the first flag information above) == 1, Clk_disS = 1, shutting down most of the clocks in the data path [63:32].
[0137] The following describes the scenario where the Clk_disD signal is set to 1.
[0138] For example, when the instruction destination operand LRN is XMM, and its new ZD (eg, corresponding to the fourth flag information above) == 1, Clk_disD=1, turning off most of the clocks in the data path [127:64].
[0139] For example, when the instruction destination operand is YMM and its new ZH==1, Clk_disD=1, turning off most of the clocks in the data path [127:64].
[0140] For example, native128 can be split into two microinstructions (uops) for execution when the operand is YMM (i.e., an instruction with a 256-bit data width). The first uop operand is XMM, indicating that the operation is on the lower 128 bits of the original 256-bit operand instruction, and the second uop operand is YMM, indicating that the operation is on the upper 128 bits of the original 256-bit operand instruction. In the above example scenario, by increasing limited logic resources, the scenarios where power consumption can be saved are greatly increased, especially saving power from the perspective of microarchitecture design without relying on semiconductor processes, reducing technology dependence.
[0141] It should be noted that the above example scenarios are merely examples and not limitations, and are intended to describe one or more aspects of the operating method or device of at least one embodiment of the present disclosure through specific scenarios, and the various aspects described in conjunction with the example scenarios may be combined and referenced with various aspects of the operating method or device of at least one embodiment of the present disclosure. Figure 4A and Figure 4B The various aspects described can be modified appropriately without exceeding the scope of the present disclosure. For example, Figure 4A and Figure 4B The various aspects described can be added, merged, split, deleted, etc. In some exemplary aspects, Figure 4A and Figure 4B The described scenario divides the data path into more or fewer parts, or the range of the bit width corresponding to each data path part can be changed, so that more or fewer clock switch signals can be constructed and the data path part corresponding to the clock switch signal can be changed.
[0142] In addition, the above example scenarios can be applied to but not limited to microprocessors such as CPU, MCU, DSP or intellectual property products (IP). For example, the above example scenarios can be applied to scenarios where the number of instructions being executed (on-flight) ranges from 1 to multiple. For example, the above example scenarios can be applied to single-threaded or multi-threaded scenarios. In additional aspects, the above example scenarios can be applied to datapath designs of different widths. For example, the above example scenarios can be applied to microprocessors or IPs of different instruction set architectures.
[0143] Figure 5 A schematic diagram of another computing device 500 is shown in accordance with at least one embodiment of the present disclosure.
[0144] like Figure 5 As shown, the computing device 500 includes a processor 510 and a memory 520. The memory 520 includes one or more computer program modules 521. The one or more computer program modules 521 are stored in the memory 520 and are configured to be executed by the processor 510. The one or more computer program modules 521 include instructions for executing the operating method 300 for a data path and its additional aspects according to at least one embodiment of the present disclosure. When the one or more computer program modules 521 are executed by the processor 510, one or more steps of the operating method 300 for a data path and its additional aspects according to at least one embodiment of the present disclosure can be executed. The memory 520 and the processor 510 can be interconnected through a bus system and / or other forms of connection mechanisms (not shown). For example, the bus can be a peripheral component interconnect standard (PCI) bus or an extended industrial standard architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc.
[0145] Exemplarily, the processor 510 may be a central processing unit (CPU), a digital signal processor (DSP), or other forms of processing units with data processing capabilities and / or program execution capabilities, such as a field programmable gate array (FPGA), etc.; for example, the central processing unit (CPU) may be a RISC-V architecture or other suitable types of architectures, etc. The processor 510 may be a general-purpose processor or a dedicated processor, and may control other components in the computing device 500 to perform desired functions.
[0146] Exemplarily, the memory 520 may include any combination of one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, erasable programmable read-only memory (EPROM), portable compact disk read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules 521 may be stored on the computer-readable storage medium, and the processor 510 may run one or more computer program modules 521 to implement various functions of the computing device 500. The computer program module includes a plurality of computer-executable instructions. Various applications and various data, as well as various data used and / or generated by the application, etc. may also be stored in the computer-readable storage medium.
[0147] For example, the computing device 500 may also include input devices such as a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices such as a liquid crystal display, a speaker, a vibrator, etc.; storage devices such as a magnetic tape, a hard disk (HDD or SDD), etc.; and communication devices such as a network interface card such as a LAN card, a modem, etc. The communication device may allow the computing device 500 to communicate with other devices wirelessly or by wire to exchange data, and perform communication processing via a network such as the Internet. The drive is connected to the I / O interface as needed. A removable storage medium, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive as needed so that the computer program read therefrom is installed into the storage device as needed.
[0148] For example, the computing device 500 may further include a peripheral interface (not shown in the figure), etc. The peripheral interface may be various types of interfaces, such as a USB interface, a lightning interface, etc. The communication device may communicate with a network and other devices through wireless communication, such as the Internet, an intranet and / or a wireless network such as a cellular phone network, a wireless local area network (LAN), and / or a metropolitan area network (MAN). The wireless communication may use any of a variety of communication standards, protocols, and technologies, including but not limited to a global system for mobile communications (GSM), an enhanced data GSM environment (EDGE), wideband code division multiple access (W-CDMA), code division multiple access (CDMA), time division multiple access (TDMA), Bluetooth, Wi-Fi (e.g., based on IEEE 802.11a, IEEE 802.11b, IEEE 802.11g, and / or IEEE 802.11n standards), voice transmission over Internet protocol (VoIP), Wi-MAX, protocols for email, instant messaging, and / or short message service (SMS), or any other suitable communication protocol.
[0149] The computing device 500 may be, for example, a system on a chip (SOC) or a device including the SOC, for example, a mobile phone, a tablet computer, a laptop computer, an e-book, a game console, a television, a digital photo frame, a navigator, a home appliance, a communication base station, an industrial controller, a server, or any other device, or a combination of any data processing device and hardware, which is not limited in the embodiments of the present disclosure. The specific functions and technical effects of the computing device 500 may refer to the description of the operation method 300 for a data path and its additional aspects according to at least one embodiment of the present disclosure, and will not be repeated here.
[0150] Figure 6 A schematic diagram of a non-transitory readable storage medium 600 according to at least one embodiment of the present disclosure is shown.
[0151] like Figure 6 As shown, a non-transitory readable storage medium 600 stores computer instructions 610, which, when executed by a processor, perform one or more steps of the above-described method 300 for operating a data path and its additional aspects.
[0152] Exemplarily, the non-transitory readable storage medium 600 may be any combination of one or more computer-readable storage media, for example, a computer-readable storage medium includes a program code for assigning the flag information of the source operand register in the object instruction to the destination operand register in the object instruction based on the prompt signal obtained by decoding the object instruction. For another example, a computer-readable storage medium includes a program code for generating a clock switch signal based on the assigned flag information to control the switch of the clock corresponding to some bits in the data path during the execution of the object instruction.
[0153] Exemplarily, when the program code is read by a computer, the computer may execute the program code stored in the computer storage medium to implement, for example, one or more steps of the data path operation method 300 and additional aspects thereof according to at least one embodiment of the present disclosure.
[0154] Exemplarily, the non-transitory readable storage medium may include a memory card of a smart phone, a storage component of a tablet computer, a hard disk of a personal computer, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disk read-only memory (CD-ROM), flash memory, and other non-transitory readable storage media or any combination thereof.
[0155] At least some of the embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referenced to each other.
[0156] It should be noted that, in this article, relational terms such as first, second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. The terms "include", "comprises", or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements includes not only those elements, but also further includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. In the absence of further restrictions, the elements defined by the statement "includes..." do not exclude the presence of other identical elements in the process, method, article, or device including the elements.
[0157] There are a few points to note about this disclosure:
[0158] (1) The drawings of the embodiments of the present disclosure only relate to the structures related to the embodiments of the present disclosure, and other structures may refer to the general design.
[0159] (2) In the absence of conflict, the embodiments of the present disclosure and the features therein may be combined with each other to obtain new embodiments.
[0160] The above description is merely an exemplary embodiment of the present disclosure and is not intended to limit the protection scope of the present disclosure. The protection scope of the present disclosure is determined by the appended claims.
Claims
1. A method for operating a data path, comprising: Based on a prompt signal obtained by decoding the object instruction, assigning flag information of a source operand register in the object instruction to a destination operand register in the object instruction, wherein the flag information is used to indicate whether n bits of a corresponding field in m bits of the register are 0, m and n are positive integers, and m>n; and A clock switch signal is generated based on the assigned flag information to control the switch of the clock corresponding to some bits in the data path during the execution of the object instruction.
2. The operating method according to claim 1, wherein: The flag information includes at least one of the first flag information or the second flag information, wherein The first flag information is used to indicate whether the high 128 bits of the 256-bit value stored in the destination operand register are 0; The second flag information is used to indicate whether the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
3. The operating method according to claim 2, wherein: The clock switch signal includes a plurality of clock switch signals, and each clock switch signal is used to control the switching of the clock of a part of the data paths.
4. The operating method according to claim 3, wherein: The bit width of the data path is 256, and the multiple clock switch signals include: A first clock switch signal, used to control the data path clock of bits [63:32] in the data path; A second clock switch signal, used to control the data path clock of bits [127:64] in the data path; and The third clock switch signal is used to control the data path clock of the [255:128] bits in the data path.
5. The operating method according to claim 4, wherein: The flag information includes first flag information, second flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and a clock switch signal is generated based on the assigned flag information to control the switch of the clock corresponding to some bits in the data path during the execution of the object instruction, including: The first clock switch signal is generated based on the following conditions to turn off at least part of the clock corresponding to the data path [63:32], including: In response to the destination operand register being a first type register or a second type register, and the third flag information of the destination operand register being a first value, or In response to the destination operand register being a third type register, and the second flag information of the destination operand register being a first value; The second clock switch signal is generated based on the following conditions to turn off at least part of the clock corresponding to the data path [127:64], including: In response to the destination operand register being a first type register or a second type register, and the fourth flag information of the destination operand register being a first value, or In response to the destination operand register being a third type register, and the second flag information of the destination operand register being a first value; and The third clock switch signal is generated based on the following conditions to turn off at least part of the clock corresponding to the data path [255:128], including: In response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value, or In response to the destination operand register being a third type register, and the second flag information of the destination operand register being a first value, Among them, the first type register is a register with a storage bit number of 128, the second type register is a register with a storage bit number of 256, the third type register is a register with a storage bit number of 512, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0; and the first value of the second flag information indicates that the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
6. The operating method according to claim 3, wherein: The bit width of the data path is 128, and the multiple clock switch signals include: a fourth clock switch signal, used to control the data path clock of bits [63:32] in the data path; and The fifth clock switch signal is used to control the data path clock of the [127:64] bits in the data path.
7. The operating method according to claim 6, wherein: The flag information includes first flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; And generating a clock switch signal based on the assigned flag information to control the switch of the clock of the data path, including: The fourth clock switch signal is generated based on the following conditions to turn off at least part of the clock in the data path [63:32], including: In response to the destination operand register being a first type register, and the third flag information of the destination operand register being a first value, or In response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value; The fifth clock switch signal is generated based on the following conditions to turn off at least part of the clocks in the data path [127:64], including: In response to the destination operand register being a first type register, and the fourth flag information of the destination operand register being a first value; In response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value, Among them, the first type register is a register with a storage bit number of 128, the second type register is a register with a storage bit number of 256, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, and the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0.
8. The operating method according to claim 1, wherein: The hint signal is obtained according to a function of the target instruction when the target instruction is decoded.
9. The operating method according to claim 1, wherein: Based on a hint signal obtained by decoding the object instruction, assigning the flag information of the source operand register in the object instruction to the destination operand register in the object instruction includes: calculating the flag information according to the hint signal when renaming the instruction.
10. The operating method according to claim 1, wherein: The flag information includes third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; And based on the prompt signal obtained by decoding the object instruction, assigning the flag information of the source operand register in the object instruction to the destination operand register in the object instruction, including: When renaming the instruction, calculating and obtaining the third flag information and the fourth flag information of the destination operand register according to the prompt signal; Generating a clock switch signal based on the assigned flag information to control the switch of the clock corresponding to some bits in the data path during the execution of the object instruction, including: In response to the third flag information being the first value and the fourth flag information being the first value, generating and closing at least a portion of clocks corresponding to the upper 96 bits in the 128-bit data path, Among them, the first value of the third flag information indicates that the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate that the upper 64 bits of the 128-bit value stored in the destination operand register are 0.
11. A computing device comprising a control path and a data path, wherein: The control path includes: an assignment unit, configured to assign flag information of a source operand register in the object instruction to a destination operand register in the object instruction based on a prompt signal obtained by decoding the object instruction, wherein the flag information is used to indicate whether n bits of a corresponding domain in m bits of the register are 0, m and n are positive integers, and m>n; and The clock switch signal generating unit is configured to generate a clock switch signal based on the assigned flag information to control the switching of the clock corresponding to some bits in the data path during the execution of the object instruction.
12. The computing device according to claim 11, wherein: The flag information includes at least one of the first flag information or the second flag information, wherein The first flag information is used to indicate whether the high 128 bits of the 256-bit value stored in the destination operand register are 0; The second flag information is used to indicate whether the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
13. The computing device of claim 12, wherein: The clock switch signal includes a plurality of clock switch signals, and each clock switch signal is used to control the switching of the clock of a part of the data paths.
14. The computing device of claim 13, wherein: The bit width of the data path is 256, and the multiple clock switch signals include: A first clock switch signal, used to control the data path clock of bits [63:32] in the data path; A second clock switch signal, used to control the data path clock of bits [127:64] in the data path; and The third clock switch signal is used to control the data path clock of the [255:128] bits in the data path.
15. The computing device of claim 14, wherein: The flag information includes first flag information, second flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and the clock switch signal generating unit is further configured to: The first clock switch signal is generated based on the following conditions to turn off at least part of the clock corresponding to the data path [63:32], including: In response to the destination operand register being a first type register or a second type register, and the third flag information of the destination operand register being a first value, or In response to the destination operand register being a third type register, and the second flag information of the destination operand register being a first value; The second clock switch signal is generated based on the following conditions to turn off at least part of the clock corresponding to the data path [127:64], including: In response to the destination operand register being a first type register or a second type register, and the fourth flag information of the destination operand register being a first value, In response to the destination operand register being a third type register, and the second flag information of the destination operand register being a first value; and The third clock switch signal is generated based on the following conditions to turn off at least part of the clock corresponding to the data path [255:128], including: In response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value, or In response to the destination operand register being a third type register, and the second flag information of the destination operand register being a first value, Among them, the first type register is a register with a storage bit number of 128, the second type register is a register with a storage bit number of 256, the third type register is a register with a storage bit number of 512, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0; and the first value of the second flag information indicates that the upper 256 bits of the 512-bit value stored in the destination operand register are 0.
16. The computing device of claim 13, wherein: The bit width of the data path is 128, and the multiple clock switch signals include: a fourth clock switch signal, used to control the data path clock of bits [63:32] in the data path; and The fifth clock switch signal is used to control the data path clock of the [127:64] bits in the data path.
17. The computing device of claim 16, wherein: The flag information includes first flag information, second flag information, third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; and the clock switch signal generating unit is further configured to: The fourth clock switch signal is generated based on the following conditions to turn off at least part of the clock in the data path [63:32], including: In response to the destination operand register being a first type register, and the third flag information of the destination operand register being a first value, or In response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value; The fifth clock switch signal is generated based on the following conditions to turn off at least part of the clocks in the data path [127:64], including: In response to the destination operand register being a first type register, and the fourth flag information of the destination operand register being a first value, In response to the destination operand register being a second type register, and the first flag information of the destination operand register being a first value, Among them, the first type register is a register with a storage bit number of 128, the second type register is a register with a storage bit number of 256, the third flag information is a first value indicating that the upper 96 bits of the 128-bit value stored in the destination operand register are 0, the fourth flag information is a first value indicating that the upper 64 bits of the 128-bit value stored in the destination operand register are 0, and the first value of the first flag information indicates that the upper 128 bits of the 256-bit value stored in the destination operand register are 0.
18. The computing device of claim 11, wherein: The control path also includes: The decoding unit is configured to provide the prompt signal according to the function of the object instruction when decoding the object instruction.
19. The computing device of claim 11, wherein: The assignment unit is further configured to: calculate and obtain the flag information according to the prompt signal when the instruction is renamed.
20. The computing device of claim 11, wherein: The flag information includes third flag information and fourth flag information, the third flag information is used to indicate whether the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate whether the upper 64 bits of the 128-bit value stored in the destination operand register are 0; The assignment unit is further configured to: When renaming the instruction, calculating and obtaining the third flag information and the fourth flag information of the destination operand register according to the prompt signal; The clock switch signal generating unit is further configured to: In response to the third flag information being the first value and the fourth flag information being the first value, generating and closing at least a portion of clocks corresponding to the upper 96 bits in the 128-bit data path, Among them, the first value of the third flag information indicates that the upper 96 bits of the 128-bit value stored in the destination operand register are 0; the fourth flag information is used to indicate that the upper 64 bits of the 128-bit value stored in the destination operand register are 0.
21. A computing device comprising: one or more processors; a memory including one or more computer program modules; The one or more computer program modules are stored in the memory and are configured to be executed by the one or more processors to implement the operating method according to any one of claims 1-10.
22. A non-transitory readable storage medium having computer executable instructions stored thereon, in, When the computer executable instructions are executed by a processor, the operating method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Optimizing register initialization operations
CN103377037A
Method for converting long bit wide operand instruction into short bit wide operand instruction
CN108304217A
