WO2021120713A1 - Data processing method, decoding circuit, and processor - Google Patents
Data processing method, decoding circuit, and processor Download PDFInfo
- Publication number
- WO2021120713A1 WO2021120713A1 PCT/CN2020/114004 CN2020114004W WO2021120713A1 WO 2021120713 A1 WO2021120713 A1 WO 2021120713A1 CN 2020114004 W CN2020114004 W CN 2020114004W WO 2021120713 A1 WO2021120713 A1 WO 2021120713A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- instruction
- operand
- address
- repetition
- type
- Prior art date
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 9
- 238000000034 method Methods 0.000 claims abstract description 46
- 230000006835 compression Effects 0.000 claims description 50
- 238000007906 compression Methods 0.000 claims description 50
- 230000006837 decompression Effects 0.000 claims description 46
- 239000011159 matrix material Substances 0.000 description 31
- 238000010586 diagram Methods 0.000 description 5
- 230000003252 repetitive effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/30—Arrangements for executing machine instructions, e.g. instruction decode
- G06F9/3017—Runtime instruction translation, e.g. macros
- G06F9/30178—Runtime instruction translation, e.g. macros of compressed or encrypted instructions
Definitions
- This application belongs to the field of computer technology, and specifically relates to a data processing method, a decoding circuit, and a processor.
- Computer instructions are instructions and commands that direct the work of a machine.
- a program is a series of instructions arranged in a certain order. The process of executing the program is the working process of the computer.
- a computer executes an instruction (program)
- it needs to read the instruction from the instruction cache (Cache) first. If the instruction cache misses (Cache Miss), it will cause more serious performance problems. For example, fetching instructions takes a long time, which significantly increases the processing cycle of an instruction sequence and reduces performance.
- fetching instructions takes a long time, which significantly increases the processing cycle of an instruction sequence and reduces performance.
- the current instruction sequence is in a stopped and waiting state. If there is not enough active instruction sequence, the entire computing unit may stop, which significantly reduces performance.
- Instruction block refers to a collection of instructions in a cache line (Cache Line). Since each cache line is only 512 bits and the 3-operand operation instructions use 64 bits, each cache line can only store 8 such operation instructions, so that an instruction block can only accommodate 8 three-operand instructions. Processing large operations therefore needs to read thousands of instruction blocks, which is obviously not conducive to power optimization.
- an embodiment of the present application provides a data processing method, including: judging whether the acquired instruction is a compressed instruction; if yes, acquiring key information in the compressed instruction, and the key information includes: instruction The repetition type and the instruction repetition number, wherein the instruction repetition type is used to indicate the type of instruction to be repeated, and the instruction repetition number is a positive integer greater than or equal to 2;
- the compressed instruction is decompressed to decompress the compressed instruction into a plurality of instructions corresponding to the instruction repetition type and the same number of repetition times of the instruction.
- the acquired instruction is a compressed instruction
- the key information in the compressed instruction is acquired, and then the compressed instruction is decompressed according to the instruction repetition type and the number of instruction repetitions in the key information to decompress the compressed instruction into and Multiple instructions corresponding to the instruction repetition type and with the same number of instruction repetitions.
- decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions includes: according to the address ID corresponding to the operand in the instruction repetition type Generate an instruction, and update the number of instruction repetitions; when it is determined that the updated instruction repetition number is greater than a preset threshold, update the address ID corresponding to the operand; generate according to the updated address ID corresponding to the operand Command and update the instruction repetition number again; determine whether the re-updated instruction repetition number is equal to the preset threshold; if yes, determine that the decompression of the compression instruction is completed, and obtain the repetition of the instruction Multiple instructions corresponding to the type and with the same number of repetitions of the instruction.
- the instruction repetition number is updated, and it is determined whether the updated instruction repetition number is equal to the preset threshold. If not, update the address ID corresponding to the operand, and generate instructions based on the address ID corresponding to the updated operand, then update the number of instruction repetitions again, and determine whether the updated number of instruction repetitions is equal to the preset threshold, until after the update When the number of instruction repetitions is equal to the preset threshold, the decompression of the compressed instruction is completed.
- decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions includes: according to the address ID corresponding to the operand in the instruction repetition type Generate instructions, and record the number of generations of the generated instructions; when it is determined that the number of generations is less than the number of repetitions of the instructions, update the address ID corresponding to the operand; generate instructions according to the updated address ID corresponding to the operand, And update the number of generations; determine whether the updated number of generations is equal to the number of instruction repetitions; if yes, determine the end of the decompression of the compression instruction, and obtain the corresponding instruction repetition type, and The instruction repeats multiple instructions with the same number of times.
- the compressed instruction when the compressed instruction is decompressed according to the instruction repetition type and the instruction repetition number, after each instruction is generated, the generation number of the generated instruction is recorded, and it is judged whether the recorded generation number is equal to the instruction repetition number. If not, update the address ID corresponding to the operand, and generate instructions based on the address ID corresponding to the updated operand, then update the generation times, and determine whether the updated generation times are equal to the number of instruction repetitions, until the updated instruction When the number of repetitions is equal to the number of instruction repetitions, the compressed instruction is decompressed. In this process, a counter is used to record the generation times of the generated instructions. After each instruction is generated, the generation times of the generated instructions are updated. When it is equal to the number of instruction repetitions, the decompression of the compressed instruction is completed.
- updating the address ID corresponding to the operand includes: updating the address ID corresponding to the operand according to the source type of the operand pointed to by the address ID corresponding to the operand .
- the address ID corresponding to the operand is updated by the operand source type pointed to by the address ID corresponding to the operand, so that when the address is updated, the rules when the address ID corresponding to the operand is updated by different operand source types can be different.
- updating the address ID corresponding to the operand includes: updating the data type of the data stored in the source of the operand pointed to by the address ID corresponding to the operand The address ID corresponding to the operand.
- the data type of the data stored in the source of the operand pointed to by the address ID corresponding to the operand updates the address ID corresponding to the operand, so that when the address is updated, different data types can correspond to different update rules.
- the operand in the instruction repetition type is the destination operand
- the key information further includes the destination pass-through DF field
- the address corresponding to the operand is updated.
- the method further includes: determining that the value in the destination through DF field is not a set threshold.
- the method before obtaining the key information in the compression instruction, the method further includes: determining that the compression instruction is valid.
- an embodiment of the present application also provides a decoding circuit, including: a decoder and an instruction decompression module; the decoder is configured to determine whether the acquired instruction is a compressed instruction, and if yes, acquire the compressed instruction
- the key information includes: instruction repetition type and instruction repetition number, wherein the instruction repetition type is used to indicate the type of instruction to be repeated, and the instruction repetition number is a positive integer greater than or equal to 2; instruction decompression A module configured to decompress the compressed instruction according to the instruction repetition type and the instruction repetition number, so as to decompress the compressed instruction into a corresponding instruction repetition type and the same number as the instruction repetition number Multiple instructions.
- the instruction decompression module includes: a controller configured to obtain an address ID corresponding to an operand in the instruction repetition type; an instruction generator configured to The address ID corresponding to the operand in the instruction repetition type generates an instruction; the controller is further configured to update the instruction after the instruction generator generates the instruction according to the address ID corresponding to the operand in the instruction repetition type The number of repetitions, and when it is determined that the updated number of instruction repetitions is greater than a preset threshold, the address ID corresponding to the operand is updated, and the address ID corresponding to the updated operand is sent to the instruction generator
- the instruction generator is further configured to generate an instruction according to the updated address ID corresponding to the operand; the controller is also configured to generate an instruction in the instruction generator according to the updated address corresponding to the operand After the ID command is generated, the number of instruction repetitions is updated again, and it is determined whether the re-updated instruction repetition number is equal to the preset threshold; if yes, it is determined that the de
- the instruction decompression module includes: a controller configured to obtain an address ID corresponding to an operand in the instruction repetition type; an instruction generator configured to The address ID corresponding to the operand in the instruction repetition type generates an instruction; the controller is further configured to record the generation instruction after the instruction generator generates the instruction according to the address ID corresponding to the operand in the instruction repetition type The number of generations, and when it is determined that the number of generations is less than the number of instruction repetitions, update the address ID corresponding to the operand, and send the updated address ID corresponding to the operand to the instruction generator; The instruction generator is further configured to generate an instruction according to the updated address ID corresponding to the operand; the controller is also configured to generate the instruction according to the updated address ID corresponding to the operand in the instruction generator After the instruction, update the number of generations, and determine whether the updated number of generations is equal to the number of instruction repetitions; if yes, determine the end of decompression of the compression instruction, and obtain the corresponding instruction repetition
- the controller is configured to update the address ID corresponding to the operand according to the source type of the operand pointed to by the address ID corresponding to the operand.
- the controller is configured to update the address ID corresponding to the operand according to the data type of the data stored in the operand source pointed to by the address ID corresponding to the operand .
- the operand in the instruction repetition type is the destination operand
- the key information further includes the destination pass-through DF field
- the controller is also configured to update Before the address ID corresponding to the operand, it is determined that the value in the destination through DF field is not a set threshold.
- the source type of the operand pointed to by the address ID corresponding to the operand in the instruction repetition type is LDS
- the instruction decompression module further includes: a configuration register, the configuration The register is configured to store the address of the source operand in the LDS, and automatically update its own address to the address corresponding to the next source operand after reading the corresponding source operand from the LDS according to the current address; accordingly, The controller is configured to update the address ID corresponding to the operand according to the address currently indicated by the configuration register, wherein the address ID corresponding to the operand is the same as the address currently indicated by the configuration register.
- the decoder is further configured to determine that the compression instruction is valid before obtaining the key information in the compression instruction.
- the instruction decompression module is further configured to send to the decoder to prevent it from obtaining the key information from the instruction distribution unit when receiving the key information sent by the decoder And when it is determined that the decompression of the compressed instruction ends, an instruction to allow the decoder to obtain the instruction from the instruction distribution unit is sent to the decoder.
- an embodiment of the present application further provides a processor, including: an instruction distribution unit, an instruction execution unit such as the foregoing second aspect embodiment and/or any possible implementation manner in combination with the foregoing second aspect embodiment
- a processor including: an instruction distribution unit, an instruction execution unit such as the foregoing second aspect embodiment and/or any possible implementation manner in combination with the foregoing second aspect embodiment
- the instruction distributing unit and the instruction execution unit are both connected to the decoding circuit.
- Fig. 1 shows a schematic diagram of each field in a VOP3R instruction provided by an embodiment of the present application.
- Fig. 2 shows a schematic structural diagram of a decoding circuit provided by an embodiment of the present application.
- FIG. 3 shows a schematic structural diagram of another decoding circuit provided by an embodiment of the present application.
- FIG. 4 shows a schematic structural diagram of another decoding circuit provided by an embodiment of the present application.
- FIG. 5 shows a schematic flowchart of a data processing method provided by an embodiment of the present application.
- Fig. 6 shows a schematic structural diagram of a processor provided by an embodiment of the present application.
- an instruction block can only accommodate 8 three-operand instructions, which is optimized for power Say, it's not enough. Therefore, the embodiments of this application provide an efficient instruction compression method, which can compress 64 3-operand instructions into 64 bits, so each cache line can store up to 512 3-operand instructions, which not only improves the computing performance , And it can also significantly reduce the number of instruction cache misses.
- VOP3R Vector Operation with 3 Operand and Repeat, with 3 operands and repeated vector operations
- set type is "110010”
- 110010 indicates that the instruction is a VOP3R instruction, as shown in Figure 1.
- the VOP3R instruction defines the following special fields, as shown in Table 1.
- Repeat_Enable Repeat enable field, 4bit, each bit indicates the repetition of the source operand (Operand0, Operand1, Operand2) and the destination operand (also called Result), for example, B[59:59](Or B[ 0:0]): RepeatOperand0; B[60:60](OrB[1:1]): RepeatOperand1; B[61:61](OrB[2:2]): RepeatOperand2; B[62 :62](Or B[3:3]): Repeat destination.
- VGPR Vector General Purpose Register
- SGPR Scalar General Purpose Register
- LDS_DIRECT Local Data Share
- an embodiment of the present application provides a decoding circuit, as shown in FIG. 2. After the decoding circuit obtains the instruction from the instruction dispatch unit (Instruction Dispatch), it determines whether the instruction is a compressed instruction.
- the instruction dispatch unit Instruction Dispatch
- the decoding circuit sends the instruction directly to the instruction execution unit (Instruction Execution), the instruction execution unit executes the instruction; when yes, that is, when the current instruction is a compressed instruction, the decoding circuit obtains the key information in the compressed instruction; then according to the instruction repetition type and the number of instruction repetitions in the key information
- the compressed instruction is decompressed to decompress the compressed instruction into multiple instructions corresponding to the instruction repetition type and the same number of instruction repetitions.
- the key information includes: instruction repetition type and instruction repetition number.
- the instruction repetition type is used to indicate the type of instruction to be repeated, and the instruction repetition number is a positive integer greater than or equal to 2.
- the instruction repeat type is obtained according to the repeat enable field (Repeat_Enable) in the compressed instruction, and the instruction repeat number is obtained according to the repeat count field (Repeat_Counter).
- the detailed parameters of the key information are shown in Table 2.
- the compression instruction is:
- the compressed instruction is decompressed, and 62 instructions corresponding to the instruction repetition type (repeat Operand0 and Operand1) and the same number of instruction repetition times (62) can be obtained.
- the obtained instructions are as follows :
- Repeat Enable represents the type of instruction repetition, where 0x3 represents the two operands of Operand0 and Operand1, RepeatCounter represents the number of instruction repetitions, and 62 represents the number of repetitions, so that after decompressing the compressed instruction, you can get 62 instructions .
- the types of instructions to be repeated are Operand0 and Operand1 as examples.
- the types of instructions to be repeated can be repeated Result (destination operand), Operand0, Operand1, Operand2, among the four operands. There are at least one of these 15 combinations. Different bytes are defined to indicate different repeat types. For example, Repeat Enable (0x1) indicates repeating Operand 0 operand, Repeat Enable (0x2) indicates repeating Operand 1 operand, and Repeat Enable( 0x3) means to repeat the two operands of Operand0 and Operand1.
- the instruction logic of the corresponding hardware includes regular mode and repeat mode.
- the execution logic is obtained from the instruction distribution unit. Instructions and execute.
- the foregoing decoding circuit compresses instructions so that one instruction block can accommodate more three-operand instructions, which not only effectively reduces the probability of instruction cache misses, but also optimizes efficiency.
- the process of the decoding circuit decompressing the compressed instruction according to the instruction repetition type and the instruction repetition number may be: generating an instruction according to the address ID corresponding to the operand in the instruction repetition type, and updating the instruction repetition number; When it is determined that the updated instruction repetition number is greater than the preset threshold, the address ID corresponding to the operand is updated according to the address ID corresponding to the operand; the instruction is generated according to the address ID corresponding to the updated operand, and the instruction repetition number is updated again ; Determine whether the number of instruction repetitions after the re-update is equal to the preset threshold; if yes, complete the decompression of the compressed instruction, and obtain multiple instructions corresponding to the instruction repetition type and the same number of instruction repetitions, if it is no When, repeat the operation (update the address ID corresponding to the operand; generate the instruction according to the address ID corresponding to the updated operand, and update the instruction repetition number again; determine whether the instruction repetition number after the update is equal to the preset threshold) until The
- Operand0_id OperandRepeat(Operand0_id, Repeat_Enable&0x1); // The address update function of Operand0;
- Operand1_id OperandRepeat(Operand1_id, Repeat_Enable&0x2); // The address update function of Operand1;
- Operand2_id OperandRepeat(Operand2_id, Repeat_Enable&0x4); // The address update function of Operand2;
- Result_ID OperandRepeat(Result_ID, Repeat_Enable&0x8); //Result address update function;
- the preset threshold such as 0
- the address ID (address 2) corresponding to the operand is updated, the instruction is generated according to the updated address ID, and the instruction repetition times are updated again, and then it is judged whether the updated instruction repetition times is equal to the preset threshold value If yes, update the address ID corresponding to the operand again, generate instructions based on the updated address ID, and update the number of instruction repetitions again (the number of instruction repetitions at this time is 60), and then determine the updated instruction repetition number (60 ) Is equal to the prese
- the process of the decoding circuit decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions may be: generating an instruction according to the address ID corresponding to the operand in the instruction repetition type, and recording the generation times of the generated instruction ; When it is determined that the number of generations is less than the number of instruction repetitions, update the address ID corresponding to the operand; generate instructions according to the address ID corresponding to the updated operand, and update the number of generations; determine whether the updated number of generations is equal to the number of instruction repetitions; If yes, complete the decompression of the compressed instruction, and obtain multiple instructions corresponding to the instruction repetition type and the same number of instruction repetitions; otherwise, repeat the operation (update the address ID corresponding to the operand; according to the update The address ID corresponding to the subsequent operand generates an instruction and updates the generation times; it is determined whether the updated generation times are equal to the instruction repetition times), until the updated generation times are equal to the instruction repetition times.
- the principle of this embodiment is the same as that of the previous embodiment. The difference is that in the first embodiment, after the command is generated, the number of repetitions of the command is updated, and it is determined whether the updated number of repetitions of the command is equal to the preset number.
- the threshold (for example, 0) is used to determine whether the decompression of the compressed instruction is completed.
- the number of generations of the generated instruction is recorded, and the completion is determined by judging whether the number of generations is equal to the number of repetitions of the instruction Decompression work on compression instructions. That is, in this embodiment, it is necessary to use a counter to count the number of generated instructions. Each time an instruction is generated, the number is counted once, and the value is incremented.
- the operand in the above instruction repetition type may be at least one of the four operands of Result, Operand0, Operand1, Operand2.
- it can be based on the operand source type pointed to by the address ID corresponding to the operand (such as VGPR/SGPR/LDS_DIRECT), such as the update corresponding to different operand source types
- the rules for the address ID may be different. For example, the rule for updating the address ID corresponding to VGPR as the source of the operand is different from the rule for updating the address ID corresponding to the SGPR as the source of the operand.
- the rules for updating the address ID are different from when the operand source pointed to by the ID corresponding to the operand is VGPR/SGPR. If the operand source pointed to by the ID corresponding to the operand is LDS_DIRECT, in this mode, the hardware reads the data from the LDS as the operand, and the access address and data type are determined by the configuration register, such as the M0 register (32bit dedicated hardware internal Register, its low 16bit is used as address by LDS_DIRECT) to determine.
- M0 register 32bit dedicated hardware internal Register, its low 16bit is used as address by LDS_DIRECT
- the address field of the M0 register needs to be automatically updated.
- the address pointed to by the address ID is the address stored in the M0 register, and the address is used to read the source operand stored in the LDS. That is, the M0 register is configured to store the address of the source operand in the LDS (such as the element of each row in the matrix), and after reading the corresponding element from the LDS according to the current address, the M0 register needs to be The address is updated to the address corresponding to the next element.
- the data stored in the operand source pointed to by the address ID corresponding to the operand can also be used.
- Type to update the address ID corresponding to the operand Different data types correspond to different address update rules, for example, as shown below:
- Address i+1 Addressi+0x1;//The data type is unsignedbyte;
- Address i+1 Addressi+0x2;//The data type is unsignedbyte;
- Address i+1 Addressi+0x4;//The data type is DWord;
- Address i+1 Addressi+0x0;//The data type is Default(Reserved);
- Address i+1 Addressi+0x1;//The data type is signed byte;
- Address i+1 Addressi+0x2;//The data type is signed short;
- Address i+1 Addressi+0x8;//The data type is Qword;
- the destination pass-through DF field can be used to determine whether the source type of the operand pointed to by the address ID corresponding to the destination operand is a temporary register for data pass-through.
- the Result_ID is forwarding (pass-through).
- the address does not need to be updated, just keep forwarding.
- the instruction is generated based on the default Result_ID in the compressed instruction.
- the Result_ID in the instruction is the same.
- the decoding circuit can also determine whether the compression instruction is valid before obtaining the key information in the compression instruction, and only obtain the compression instruction after the compression instruction is determined to be valid. According to the key information in the key information, the compressed instructions are decompressed according to the instruction repetition type and the number of instruction repetitions in the key information.
- whether the compression instruction is valid can be determined in the following manner: the compression is determined according to the repetitive enable field in the compression instruction that characterizes the source operand, or the repetitive enable field in the compression instruction that characterizes the destination operand. Whether the instruction is valid; when the repetitive enable field that characterizes the source operand is not zero, and the address ID corresponding to the source operand points to the specified operand source type (such as VGPR/SGPR/LDS_Direct), or when characterizing the destination operand When the repeated enable field is not zero, it indicates that the compression instruction is valid. If at least one of the following is true, it means that the compression instruction is valid:
- the repetition enable field of at least one source operand is not zero, and the corresponding address ID points to the source type of the specified operand, or the repetition enable field of the destination operand is not zero, indicating that the compression instruction is valid.
- the decoding circuit includes: a repeat decoder, an instruction decompression module, and the decoder is connected to the instruction decompression module.
- the decoder is configured to determine whether the acquired instruction is a compressed instruction, and if it is not, it sends the instruction to the instruction execution unit to execute the instruction, and if it is, it acquires key information in the compressed instruction.
- the decoder is further configured to determine that the compressed instruction is valid before obtaining key information in the compressed instruction.
- the decoder is configured to determine that the compression instruction is valid according to the following method: according to the repeated enable field in the compression instruction that characterizes the source operand, or the repeated enable field in the compression instruction that characterizes the destination operand. Determine whether the compression instruction is valid; when the repetitive enable field representing the source operand is not zero, and the address ID corresponding to the source operand points to the specified operand source type, or when the repetitive enable field representing the destination operand is not When it is zero, it means that the compression command is valid.
- the instruction decompression module is configured to decompress the compressed instruction according to the instruction repetition type and the number of instruction repetitions, so as to decompress the compressed instruction into multiple instructions corresponding to the instruction repetition type and the same number of instruction repetitions.
- the instruction decompression module is also configured to, upon receiving the key information sent by the decoder, send an instruction to the decoder to prevent it from obtaining the instruction from the instruction distribution unit, and to decompress the compressed instruction after the completion of the decompression. At the time, send an instruction to the decoder to allow it to obtain instructions from the instruction distribution unit.
- the instruction decompression module includes: a controller and an instruction generator.
- the controller is respectively connected with the instruction generator and the decoder.
- the controller is configured to obtain the address ID corresponding to the operand in the instruction repetition type; the instruction generator is configured to generate the address ID corresponding to the operand in the instruction repetition type The controller is also configured to update the number of instruction repetitions after the instruction generator generates the instruction according to the address ID corresponding to the operand in the instruction repetition type, and update the operation when it is determined that the updated instruction repetition number is greater than a preset threshold
- the address ID corresponding to the number, and the address ID corresponding to the updated operand is sent to the instruction generator;
- the instruction generator is also configured to generate instructions according to the address ID corresponding to the updated operand; the controller is also configured to After the instruction generator generates the instruction according to the address ID corresponding to the updated operand, it updates the instruction repetition times again, and determines whether the re-updated instruction repetition times is equal to the preset threshold; if yes, completes the decompression of the compressed instruction, Obtain multiple instructions corresponding to the instruction repetition type and with the same number of instruction repetitions.
- the controller is configured to obtain the address ID corresponding to the operand in the instruction repetition type; the instruction generator is configured to generate the instruction according to the address ID corresponding to the operand in the instruction repetition type; the controller also After the instruction generator generates an instruction according to the address ID corresponding to the operand in the instruction repetition type, it records the generation times of the generated instruction, and when it is determined that the generation times are less than the instruction repetition times, the address ID corresponding to the operand is updated, The address ID corresponding to the updated operand is sent to the instruction generator; the instruction generator is also configured to generate instructions according to the address ID corresponding to the updated operand; the controller is also configured to generate instructions in the instruction generator according to the updated operation After generating the instruction for the address ID corresponding to the number, update the generation times, and determine whether the updated generation times are equal to the instruction repetition times; if yes, complete the decompression of the compressed instruction, and obtain the corresponding instruction repetition type and repeat the instruction Multiple instructions with the same number of times.
- the controller when the controller updates the address ID corresponding to the operand, it is further configured to update the address ID corresponding to the operand according to the source type of the operand pointed to by the address ID corresponding to the operand.
- the controller when the controller updates the address ID corresponding to the operand, when the controller updates the address ID corresponding to the operand, it is also configured to use the data stored in the source of the operand pointed to by the address ID corresponding to the operand.
- the address ID corresponding to the data type update operand when the controller updates the address ID corresponding to the operand, it is also configured to use the data stored in the source of the operand pointed to by the address ID corresponding to the operand.
- the address ID corresponding to the data type update operand when the controller updates the address ID corresponding to the operand.
- the operand in the instruction repetition type is the destination operand
- the key information also includes the destination pass-through DF field.
- the controller is also configured to determine the destination pass-through before updating the address ID corresponding to the operand
- the value in the DF field is not the set threshold (such as 1).
- the instruction decompression module When the operand source type pointed to by the address ID corresponding to the operand in the instruction repetition type is LDS, the instruction decompression module also includes: a configuration register, which is configured to store the address of the source operand in the LDS, and is based on the current After the address reads the corresponding source operand from the LDS, it automatically updates the address of its own (configuration register) to the address corresponding to the next source operand.
- the controller updates the address ID corresponding to the operand, it is also configured to update the address ID corresponding to the operand according to the address currently indicated by the configuration register, and the address ID is the same as the address currently indicated by the configuration register.
- the instruction decompression module includes: a controller, a configuration register (M0 register), and an instruction generator. The controller is respectively connected with the decoder, the instruction generator and the configuration register.
- instructions are compressed through VOP3R, so that each cache line (512bit) can accommodate 512 3-operand instructions, which not only effectively reduces the probability of instruction cache misses, but also optimizes efficiency.
- the following uses the method provided in the embodiment of the present application to be applied to matrix multiplication as an example for description.
- a 64X64 matrix is taken as an example
- C 64x64 A 64x64 *B 64x64 , where the 64X64 matrix size is only an example and is not limited to this.
- each arithmetic operation unit has a 200x64bit VGPR space.
- A(0,0) ⁇ LDS(Address0);//A(0,0) is stored in the Address0 location of LDS;
- A(0,1) ⁇ LDS(Address1);//A(0,1) is stored in Address1 of LDS;
- A(0,2) ⁇ LDS(Address2);//A(0,2) is stored in the location of Address2 of LDS;
- Matrix B is loaded into the VGPR space, as shown in Table 4.
- VGPR different VGPR stores different rows.
- the elements in matrix A are loaded into 64 ALUs one by one in parallel, and are multiplied by the elements corresponding to the columns stored in each of the 64 vector general registers, 64
- the ALU sequentially accumulates the multiplication results generated by the elements in the same row of matrix A and the corresponding elements of matrix B in parallel to obtain all elements in the same row of matrix C, thereby completing the multiplication operation of matrix A and second matrix B.
- the instruction to calculate matrix C in normal mode is as follows:
- M0_register start_address; //The initial address of the M0 register, where the M0 register is configured to store the address of each element in the read matrix A, and read the matrix A from the LDS based on the current address of the M0 register in 64 ALUs in parallel After the corresponding element in the file is automatically updated to the address corresponding to the next element.
- Block_Start::Forwarding LDS_Direct(M0_register)*B(0,ALU_Index);
- Block_End::C(0,ALU_Index) LDS_Direct(M0_register)*B(63,ALU_Index)+Forwarding;
- Block_Start::Forwarding LDS_Direct(M0_register)*B(0,ALU_Index);
- Block_End::C(1,ALU_Index) LDS_Direct(M0_register)*B(63,ALU_Index)+Forwarding;
- Block_Start::Forwarding LDS_Direct(M0_register)*B(0,ALU_Index);
- Block_End::C(63,ALU_Index) LDS_Direct(M0_register)*B(63,ALU_Index)+Forwarding;
- Block_Star::Forwarding LDS_Direct(M0_register)*B(0,ALU_Index);
- Block_End::C(0,ALU_Index) LDS_Direct(M0_register)*B(63,ALU_Index)+Forwarding;
- Block_Start::Forwarding LDS_Direct(M0_register)*B(0,ALU_Index);
- Block_End::C(1,ALU_Index) LDS_Direct(M0_register)*B(63,ALU_Index)+Forwarding;
- Block_Start::Forwarding LDS_Direct(M0_register)*B(0,ALU_Index);
- Block_End::C(63,ALU_Index) LDS_Direct(M0_register)*B(63,ALU_Index)+Forwarding;
- FIG. 5 Please refer to FIG. 5 for a data processing method provided by an embodiment of this application. The steps involved will be described below in conjunction with FIG. 5.
- Step S101 Determine whether the acquired instruction is a compressed instruction.
- step S102 If it is yes, execute step S102, if it is no, send the acquired instruction to the instruction execution unit.
- Step S102 Acquire key information in the compressed instruction, where the key information includes: instruction repetition type and instruction repetition number.
- the instruction repetition type is used to indicate the instruction type to be repeated, and the instruction repetition number is a positive integer greater than or equal to 2.
- Step S103 Decompress the compressed instruction according to the instruction repetition type and the instruction repetition number, so as to decompress the compressed instruction into a quantity corresponding to the instruction repetition type and the same quantity as the instruction repetition number. Multiple instructions.
- the method before obtaining the key information in the compression instruction, the method further includes: determining that the compression instruction is valid.
- the process of decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions may be: generating an instruction according to the address ID corresponding to the operand in the instruction repetition type, and Update the number of repetitions of the instruction; when it is determined that the number of repetitions of the instruction after the update is greater than a preset threshold, update the address ID corresponding to the operand; generate the instruction according to the updated address ID corresponding to the operand, and again Update the number of instruction repetitions; determine whether the re-updated instruction repetition number is equal to the preset threshold; if yes, determine that the decompression of the compressed instruction is completed, and obtain the corresponding instruction repetition type, And multiple instructions with the same number of repetitions as the instructions.
- the process of decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions may be: generating an instruction according to the address ID corresponding to the operand in the instruction repetition type, and recording the generation The number of generations of the instruction; when it is determined that the number of generations is less than the number of repetitions of the instruction, the address ID corresponding to the operand is updated; the instruction is generated according to the updated address ID corresponding to the operand, and the number of generations is updated ; Determine whether the updated number of generations is equal to the number of instruction repetitions; if yes, determine the end of the decompression of the compressed instruction, and obtain the number corresponding to the instruction repetition type and the number of instruction repetitions The same multiple instructions.
- the process of updating the address ID corresponding to the operand may be: updating the address ID corresponding to the operand according to the source type of the operand pointed to by the address ID corresponding to the operand.
- the process of updating the address ID corresponding to the operand may also be: updating the corresponding operand according to the data type of the data stored in the operand source pointed to by the address ID corresponding to the operand The address ID.
- the operand in the instruction repetition type is the destination operand
- the key information further includes the destination pass-through DF field.
- the method It also includes: determining that the value in the destination through DF field is not a set threshold.
- the embodiment of the present application also provides a processor, as shown in FIG. 6.
- the processor includes a decoding circuit, an instruction execution unit, and an instruction distribution unit in any of the foregoing embodiments. Both the instruction distribution unit and the instruction execution unit are connected to the decoding circuit.
- the instruction distribution unit is configured to store instructions so that the decoding circuit can obtain instructions from the instruction distribution unit.
- the instruction execution unit is configured to execute instructions issued by the decoding circuit.
- the processor may be an integrated circuit chip with signal processing capabilities.
- the foregoing processor may be a general-purpose processor, including a central processing unit (CPU), a network processor (Network Processor, NP), a graphics processing unit (Graphics Processing Unit, GPU), etc.; a general-purpose processor may be a micro
- the processor or the processor may also be any conventional processor or the like.
- the data processing method, decoding circuit, and processor provided in this application determine whether the acquired instruction is a compressed instruction; if yes, acquire key information in the compressed instruction, and the key information includes: instruction repetition type and instruction The number of repetitions, wherein the instruction repetition type is used to indicate the type of instruction to be repeated, and the instruction repetition number is a positive integer greater than or equal to 2; the compression instruction is performed according to the instruction repetition type and the instruction repetition number Decompression, so as to decompress the compressed instruction into a plurality of instructions corresponding to the instruction repetition type and having the same number of repetition times of the instruction.
- one instruction block can accommodate more three-operand instructions, which not only effectively reduces the probability of instruction cache misses, but also optimizes efficiency.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Executing Machine-Instructions (AREA)
- Compression, Expansion, Code Conversion, And Decoders (AREA)
Abstract
Description
字段Field | 位数Number of digits |
Operation_codeOperation_code | 1010 |
Repeat_CounterRepeat_Counter | 66 |
Result_ID |
88 |
Repeat_EnableRepeat_Enable | 44 |
Operand2_IDOperand2_ID | 99 |
Operand1_IDOperand1_ID | 99 |
Operand0_IDOperand0_ID | 99 |
ALU0ALU0 | ALU1ALU1 | ALU2ALU2 | ……... | ALU62ALU62 | ALU63ALU63 |
B0,0B0,0 | B0,1B0,1 | B0,2B0,2 | ……... | B0,62B0,62 | B0,63B0,63 |
B1,0B1,0 | B1,1B1,1 | B1,2B1,2 | ……... | B1,62B1,62 | B1,63B1,63 |
……... | ……... | ……... | ……... | ……... | ……... |
B63,0B63,0 | B63,1B63,1 | B63,2B63,2 | ……... | B63,62B63,62 | B63,63B63,63 |
Claims (20)
- 一种数据处理方法,其特征在于,包括:A data processing method, characterized in that it comprises:判断获取到的指令是否为压缩指令;Determine whether the acquired instruction is a compressed instruction;在为是时,获取所述压缩指令中的关键信息,所述关键信息包括:指令重复类型和指令重复次数,其中,所述指令重复类型用于指示待重复的指令类型,所述指令重复次数为大于等于2的正整数;If yes, acquire key information in the compressed instruction, the key information includes: instruction repetition type and instruction repetition number, wherein the instruction repetition type is used to indicate the type of instruction to be repeated, and the instruction repetition number Is a positive integer greater than or equal to 2;根据所述指令重复类型和所述指令重复次数对所述压缩指令进行解压,以将所述压缩指令解压成与所述指令重复类型对应的,且与所述指令重复次数数量相同的多条指令。Decompress the compressed instruction according to the instruction repetition type and the instruction repetition number to decompress the compressed instruction into a plurality of instructions corresponding to the instruction repetition type and the same number of instruction repetition times .
- 根据权利要求1所述的方法,其特征在于,根据所述指令重复类型和所述指令重复次数对所述压缩指令进行解压,包括:The method according to claim 1, wherein the decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions comprises:根据所述指令重复类型中的操作数对应的地址ID生成指令,并更新所述指令重复次数;Generate an instruction according to the address ID corresponding to the operand in the instruction repetition type, and update the instruction repetition number;在确定更新后的所述指令重复次数大于预设阈值时,更新所述操作数对应的地址ID;When it is determined that the number of repetitions of the instruction after the update is greater than a preset threshold, update the address ID corresponding to the operand;根据更新后的所述操作数对应的地址ID生成指令,并再次更新所述指令重复次数;Generate an instruction according to the updated address ID corresponding to the operand, and update the instruction repetition number again;判断再次更新后的所述指令重复次数是否等于所述预设阈值;Judging whether the number of repetitions of the instruction after being updated again is equal to the preset threshold;在为是时,确定对所述压缩指令的解压结束,得到与所述指令重复类型对应的,且与所述指令重复次数数量相同的多条指令。If yes, it is determined that the decompression of the compression instruction is completed, and multiple instructions corresponding to the instruction repetition type and the same number of repetition times of the instruction are obtained.
- 根据权利要求1所述的方法,其特征在于,根据所述指令重复类型和所述指令重复次数对所述压缩指令进行解压,包括:The method according to claim 1, wherein the decompressing the compressed instruction according to the instruction repetition type and the number of instruction repetitions comprises:根据所述指令重复类型中的操作数对应的地址ID生成指令,并记录生成指令的生成次数;Generate an instruction according to the address ID corresponding to the operand in the instruction repetition type, and record the generation times of the generated instruction;在确定所述生成次数小于所述指令重复次数时,更新所述操作数对应的地址ID;When it is determined that the number of generations is less than the number of instruction repetitions, update the address ID corresponding to the operand;根据更新后的所述操作数对应的地址ID生成指令,并更新所述生成次数;Generate an instruction according to the updated address ID corresponding to the operand, and update the number of generations;判断更新后的所述生成次数是否等于所述指令重复次数;Judging whether the updated generation times are equal to the instruction repetition times;在为是时,确定对所述压缩指令的解压结束,得到与所述指令重复类型对应的,且与所述指令重复次数数量相同的多条指令。If yes, it is determined that the decompression of the compression instruction is completed, and multiple instructions corresponding to the instruction repetition type and the same number of repetition times of the instruction are obtained.
- 根据权利要求2或3所述的方法,其特征在于,更新所述操作数对应的地址ID,包括:The method according to claim 2 or 3, wherein updating the address ID corresponding to the operand comprises:根据所述操作数对应的地址ID指向的操作数来源类型更新所述操作数对应的地址ID。The address ID corresponding to the operand is updated according to the source type of the operand pointed to by the address ID corresponding to the operand.
- 根据权利要求2或3所述的方法,其特征在于,更新所述操作数对应的地址ID,包括:The method according to claim 2 or 3, wherein updating the address ID corresponding to the operand comprises:根据所述操作数对应的地址ID指向的操作数来源中存储的数据的数据类型更新所述操作数对应的地址ID。The address ID corresponding to the operand is updated according to the data type of the data stored in the operand source pointed to by the address ID corresponding to the operand.
- 根据权利要求2或3所述的方法,其特征在于,所述指令重复类型中的操作数为目的操作数,所述关键信息还包括:目的地直通DF字段,在更新所述操作数对应的地址ID之前,所述方法还包括:The method according to claim 2 or 3, wherein the operand in the instruction repetition type is a destination operand, and the key information further includes: a destination pass-through DF field. Before the address ID, the method further includes:确定所述目的地直通DF字段中的数值不为设定阈值。It is determined that the value in the destination through DF field is not a set threshold.
- 根据权利要求1所述的方法,其特征在于,在获取所述压缩指令中的关键信息之前,所述方法还包括:The method according to claim 1, wherein before obtaining the key information in the compression instruction, the method further comprises:确定所述压缩指令有效。It is determined that the compression instruction is valid.
- 根据权利要求7中所述的方法,其特征在于,所述压缩指令包括重复使能字段和重复计数字段,所述确定所述压缩指令有效的步骤包括:The method according to claim 7, wherein the compression instruction includes a repetition enable field and a repetition count field, and the step of determining that the compression instruction is valid includes:若表征源操作数的所述重复使能字段不为0、且源操作数对应的地址ID指向指定操作数来源类型,则判定所述压缩指令有效;If the repeat enable field characterizing the source operand is not 0, and the address ID corresponding to the source operand points to the specified operand source type, then it is determined that the compression instruction is valid;若表征目的操作数的重复使能字段不为0,则判定所述压缩指令有效。If the repeat enable field representing the destination operand is not 0, it is determined that the compression instruction is valid.
- 根据权利要求1-8中任一项所述的方法,其特征在于,所述压缩指令包括重复使能字段和重复计数字段,获取所述压缩指令中的关键信息的步骤包括:The method according to any one of claims 1-8, wherein the compression instruction includes a repetition enable field and a repetition count field, and the step of obtaining key information in the compression instruction comprises:根据所述重复使能字段获得指令重复类型;Obtaining the instruction repetition type according to the repetition enable field;根据所述重复计数字段获得指令重复次数。Obtain the instruction repetition number according to the repetition count field.
- 根据权利要求1中任一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 1, wherein the method further comprises:在对所述压缩指令进行解压的过程中,每生成一条指令,就将生成的所述指令进行下发。In the process of decompressing the compressed instruction, each time an instruction is generated, the generated instruction is issued.
- 一种解码电路,其特征在于,包括:A decoding circuit, characterized in that it comprises:解码器,配置成判断获取到的指令是否为压缩指令,在为是时,获取所述压缩指令中的关键信息,所述关键信息包括:指令重复类型和指令重复次数,其中,所述指令重复类型用于指示待重复的指令类型,所述指令重复次数为大于等于2的正整数;The decoder is configured to determine whether the acquired instruction is a compressed instruction, and if yes, acquire key information in the compressed instruction, where the key information includes: instruction repetition type and instruction repetition number, wherein the instruction repetition Type is used to indicate the type of instruction to be repeated, and the number of instruction repetitions is a positive integer greater than or equal to 2;指令解压模块,配置成根据所述指令重复类型和所述指令重复次数对所述压缩指令进行解压,以将所述压缩指令解压成与所述指令重复类型对应的,且与所述指令重复次数数量相同的多条指令。An instruction decompression module configured to decompress the compressed instruction according to the instruction repetition type and the instruction repetition number, so as to decompress the compressed instruction into a corresponding instruction repetition type and the instruction repetition number Multiple instructions of the same number.
- 根据权利要求11所述的解码电路,其特征在于,所述指令解压模块包括:The decoding circuit according to claim 11, wherein the instruction decompression module comprises:控制器,配置成获取所述指令重复类型中的操作数对应的地址ID;The controller is configured to obtain the address ID corresponding to the operand in the instruction repetition type;指令生成器,配置成根据所述指令重复类型中的操作数对应的地址ID生成指令;An instruction generator configured to generate an instruction according to the address ID corresponding to the operand in the instruction repetition type;所述控制器,还配置成在所述指令生成器根据所述指令重复类型中的操作数对应的地址ID生成指令后,更新所述指令重复次数,以及在确定更新后的所述指令重复次数大于预设阈值时,更新所述操作数对应的地址ID,并将更新后的所述操作数对应的地址ID发给所述指令生成器;The controller is further configured to update the instruction repetition number after the instruction generator generates the instruction according to the address ID corresponding to the operand in the instruction repetition type, and after determining the updated instruction repetition number When it is greater than a preset threshold, update the address ID corresponding to the operand, and send the updated address ID corresponding to the operand to the instruction generator;所述指令生成器,还配置成根据更新后的所述操作数对应的地址ID生成指令;The instruction generator is further configured to generate an instruction according to the updated address ID corresponding to the operand;所述控制器,还配置成在所述指令生成器根据更新后的所述操作数对应的地址ID生成指令后,再次更新所述指令重复次数,并判断再次更新后的所述指令重复次数是否等于所述预设阈值;在为是时,确定对所述压缩指令的解压结束,得到与所述指令重复类型对应的,且与所述指令重复次数数量相同的多条指令。The controller is further configured to update the instruction repetition number again after the instruction generator generates an instruction according to the updated address ID corresponding to the operand, and determine whether the re-updated instruction repetition number is It is equal to the preset threshold; if yes, it is determined that the decompression of the compressed instruction is completed, and multiple instructions corresponding to the instruction repetition type and the same number of repetition times of the instruction are obtained.
- 根据权利要求11所述的解码电路,其特征在于,所述指令解压模块包括:The decoding circuit according to claim 11, wherein the instruction decompression module comprises:控制器,配置成获取所述指令重复类型中的操作数对应的地址ID;The controller is configured to obtain the address ID corresponding to the operand in the instruction repetition type;指令生成器,配置成根据所述指令重复类型中的操作数对应的地址ID生成指令;An instruction generator configured to generate an instruction according to the address ID corresponding to the operand in the instruction repetition type;所述控制器,还配置成在所述指令生成器根据所述指令重复类型中的操作数对应的地址ID生成指令后,记录生成指令的生成次数,以及在确定所述生成次数小于所述指令重复次数时,更新所述操作数对应的地址ID,并将更新后的所述操作数对应的地址ID发给所述指令生成器;The controller is further configured to, after the instruction generator generates an instruction according to the address ID corresponding to the operand in the instruction repetition type, record the number of generations of the generated instruction, and when it is determined that the number of generations is less than the instruction When the number of repetitions is repeated, update the address ID corresponding to the operand, and send the updated address ID corresponding to the operand to the instruction generator;所述指令生成器,还配置成根据更新后的所述操作数对应的地址ID生成指令;The instruction generator is further configured to generate an instruction according to the updated address ID corresponding to the operand;所述控制器,还配置成在所述指令生成器根据更新后的所述操作数对应的地址ID生成指令后,更新所述生成次数,并判断更新后的所述生成次数是否等于所述指令重复次数;在为是时,确定对所述压缩指令的解压结束,得到与所述指令重复类型对应的,且与所述指令重复次数数量相同的多条指令。The controller is further configured to update the number of generations after the instruction generator generates an instruction according to the updated address ID corresponding to the operand, and determine whether the updated number of generations is equal to the instruction Number of repetitions; if yes, it is determined that the decompression of the compressed instruction is completed, and multiple instructions corresponding to the type of instruction repetition and the same number of repetitions of the instruction are obtained.
- 根据权利要求12或13所述的解码电路,其特征在于,所述控制器配置成根据所述操作数对应的地址ID指向的操作数来源类型更新所述操作数对应的地址ID。The decoding circuit according to claim 12 or 13, wherein the controller is configured to update the address ID corresponding to the operand according to the source type of the operand pointed to by the address ID corresponding to the operand.
- 根据权利要求12或13所述的解码电路,其特征在于,所述控制器配置成根据所述操作数对应的地址ID指向的操作数来源中存储的数据的数据类型更新所述操作数对应的地址ID。The decoding circuit according to claim 12 or 13, wherein the controller is configured to update the operand corresponding to the operand according to the data type of the data stored in the operand source pointed to by the address ID corresponding to the operand Address ID.
- 根据权利要求12或13所述的解码电路,其特征在于,所述指令重复类型中的操作数为目的操作数,所述关键信息还包括:目的地直通DF字段,所述控制器还配置成在更新所述操作数对应的地址ID之前,确定所述目的地直通DF字段中的数值不为设定阈值。The decoding circuit according to claim 12 or 13, wherein the operand in the instruction repetition type is a destination operand, the key information further includes: a destination pass-through DF field, and the controller is further configured to Before updating the address ID corresponding to the operand, it is determined that the value in the destination through DF field is not a set threshold.
- 根据权利要求12或13所述的解码电路,其特征在于,所述指令重复类型中的操作数对应的地址ID指向的操作数来源类型为LDS,所述指令解压模块还包括:配置寄存器,所述配置寄存器配置成存储获取LDS中的源操作数的地址,并且在根据当前的地址从LDS中读取对应的源操作数后自动将自身的地址更新到下一个源操作数对应的地址;The decoding circuit according to claim 12 or 13, wherein the source type of the operand pointed to by the address ID corresponding to the operand in the instruction repetition type is LDS, and the instruction decompression module further includes: a configuration register, so The configuration register is configured to store the address of the source operand in the LDS, and automatically update its own address to the address corresponding to the next source operand after reading the corresponding source operand from the LDS according to the current address;相应地,所述控制器配置成根据所述配置寄存器当前指示的地址来更新所述操作数对应的地址ID,其中,所述操作数对应的地址ID与所述配置寄存器当前指示的地址相同。Correspondingly, the controller is configured to update the address ID corresponding to the operand according to the address currently indicated by the configuration register, wherein the address ID corresponding to the operand is the same as the address currently indicated by the configuration register.
- 根据权利要求11所述的解码电路,其特征在于,所述解码器,还配置成在获取所述压缩指令中的关键信息之前,确定所述压缩指令有效。The decoding circuit according to claim 11, wherein the decoder is further configured to determine that the compression instruction is valid before obtaining the key information in the compression instruction.
- 根据权利要求11所述的解码电路,其特征在于,所述指令解压模块,还配置成在接收到所述解码器发送的关键信息时,向所述解码器发送阻止其从指令分发单元中获取指令的指示,以及在确定对所述压缩指令的解压结束时,向所述解码器发送允许其从指令分发单元中获取指令的指示。The decoding circuit according to claim 11, wherein the instruction decompression module is further configured to, upon receiving the key information sent by the decoder, send to the decoder to prevent it from obtaining the key information from the instruction distribution unit And when it is determined that the decompression of the compressed instruction ends, an instruction to allow the decoder to obtain the instruction from the instruction distribution unit is sent to the decoder.
- 一种处理器,其特征在于,包括:指令分发单元、指令执行单元如权利要求11-19任一项所述的解码电路,所述指令分发单元和所述指令执行单元均与所述解码电路连接。A processor, characterized by comprising: an instruction distribution unit and an instruction execution unit. The decoding circuit according to any one of claims 11-19, wherein the instruction distribution unit and the instruction execution unit are both connected to the decoding circuit connection.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911302511.8A CN111124495B (en) | 2019-12-16 | 2019-12-16 | Data processing method, decoding circuit and processor |
CN201911302511.8 | 2019-12-16 |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2021120713A1 true WO2021120713A1 (en) | 2021-06-24 |
WO2021120713A8 WO2021120713A8 (en) | 2021-08-05 |
Family
ID=70499328
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2020/114004 WO2021120713A1 (en) | 2019-12-16 | 2020-09-08 | Data processing method, decoding circuit, and processor |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111124495B (en) |
WO (1) | WO2021120713A1 (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111124495B (en) * | 2019-12-16 | 2021-02-12 | 海光信息技术股份有限公司 | Data processing method, decoding circuit and processor |
CN112929379B (en) * | 2021-02-22 | 2023-03-24 | 深圳供电局有限公司 | Intelligent recorder remote operation and maintenance instruction defense method and system |
CN116225538A (en) * | 2023-05-06 | 2023-06-06 | 苏州萨沙迈半导体有限公司 | Processor and pipeline structure and instruction execution method thereof |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1684104A (en) * | 2004-07-26 | 2005-10-19 | 威盛电子股份有限公司 | Method and device for compressing and decompressing instrument in computer system |
CN1735860A (en) * | 2003-01-09 | 2006-02-15 | 国际商业机器公司 | Method and apparatus for instruction compression |
US20120110307A1 (en) * | 2010-11-01 | 2012-05-03 | Fujitsu Semiconductor Limited | Compressed instruction processing device and compressed instruction generation device |
US20160321076A1 (en) * | 2015-04-28 | 2016-11-03 | Intel Corporation | Method and apparatus for speculative decompression |
CN111124495A (en) * | 2019-12-16 | 2020-05-08 | 海光信息技术有限公司 | Data processing method, decoding circuit and processor |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1685310A (en) * | 2002-09-24 | 2005-10-19 | 皇家飞利浦电子股份有限公司 | Apparatus, method, and compiler enabling processing of load immediate instructions in a very long instruction word processor |
US8281109B2 (en) * | 2007-12-27 | 2012-10-02 | Intel Corporation | Compressed instruction format |
CA2783829C (en) * | 2009-12-11 | 2018-07-31 | Aerial Robotics, Inc. | Transparent network substrate system |
US20120254592A1 (en) * | 2011-04-01 | 2012-10-04 | Jesus Corbal San Adrian | Systems, apparatuses, and methods for expanding a memory source into a destination register and compressing a source register into a destination memory location |
US9672041B2 (en) * | 2013-08-01 | 2017-06-06 | Andes Technology Corporation | Method for compressing variable-length instructions including PC-relative instructions and processor for executing compressed instructions using an instruction table |
CN107729054B (en) * | 2017-10-18 | 2020-07-24 | 珠海市杰理科技股份有限公司 | Method and device for realizing execution of processor on loop body |
CN111708574B (en) * | 2020-05-28 | 2023-03-31 | 中国科学院信息工程研究所 | Instruction stream compression and decompression method and device |
-
2019
- 2019-12-16 CN CN201911302511.8A patent/CN111124495B/en active Active
-
2020
- 2020-09-08 WO PCT/CN2020/114004 patent/WO2021120713A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1735860A (en) * | 2003-01-09 | 2006-02-15 | 国际商业机器公司 | Method and apparatus for instruction compression |
CN1684104A (en) * | 2004-07-26 | 2005-10-19 | 威盛电子股份有限公司 | Method and device for compressing and decompressing instrument in computer system |
US20120110307A1 (en) * | 2010-11-01 | 2012-05-03 | Fujitsu Semiconductor Limited | Compressed instruction processing device and compressed instruction generation device |
US20160321076A1 (en) * | 2015-04-28 | 2016-11-03 | Intel Corporation | Method and apparatus for speculative decompression |
CN111124495A (en) * | 2019-12-16 | 2020-05-08 | 海光信息技术有限公司 | Data processing method, decoding circuit and processor |
Also Published As
Publication number | Publication date |
---|---|
CN111124495A (en) | 2020-05-08 |
WO2021120713A8 (en) | 2021-08-05 |
CN111124495B (en) | 2021-02-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021120713A1 (en) | Data processing method, decoding circuit, and processor | |
US20210026634A1 (en) | Apparatus with reduced hardware register set using register-emulating memory location to emulate architectural register | |
US11847185B2 (en) | Systems and methods of instructions to accelerate multiplication of sparse matrices using bitmasks that identify non-zero elements | |
US8051226B2 (en) | Circular buffer support in a single instruction multiple data (SIMD) data processor | |
CN101178644B (en) | Microprocessor structure based on sophisticated instruction set computer architecture | |
US20180075113A1 (en) | Efficient evaluation of aggregate functions | |
CN115421686A (en) | FP16-S7E8 hybrid precision for deep learning and other algorithms | |
TW201820125A (en) | Systems and methods for executing a fused multiply-add instruction for complex numbers | |
US11900114B2 (en) | Systems and methods to skip inconsequential matrix operations | |
US10666288B2 (en) | Systems, methods, and apparatuses for decompression using hardware and software | |
TW201732734A (en) | Apparatus and method for accelerating graph analytics | |
US11640300B2 (en) | Byte comparison method for string processing and instruction processing apparatus | |
WO2021249054A1 (en) | Data processing method and device, and storage medium | |
CN110688160B (en) | Instruction pipeline processing method, system, equipment and computer storage medium | |
US20180095760A1 (en) | Instruction set for variable length integer coding | |
CN108268279B (en) | System, apparatus and method for broadcasting arithmetic operations | |
TW201712534A (en) | Decoding information about a group of instructions including a size of the group of instructions | |
US10069512B2 (en) | Systems, methods, and apparatuses for decompression using hardware and software | |
KR20230129559A (en) | Parallel decode instruction set computer architecture using variable-length instructions | |
CN109683959B (en) | Instruction execution method of processor and processor thereof | |
US20190102199A1 (en) | Methods and systems for executing vectorized pythagorean tuple instructions | |
US20230205530A1 (en) | Graph Instruction Processing Method and Apparatus | |
CN116991481A (en) | Execution method, device and medium of operation instruction | |
CN114518901A (en) | Method and processing unit for randomly generating instruction sequence | |
CN117407057A (en) | SM3 algorithm implementation method and device based on RISC-V architecture |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20902110 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20902110 Country of ref document: EP Kind code of ref document: A1 |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20902110 Country of ref document: EP Kind code of ref document: A1 |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 280323) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 20902110 Country of ref document: EP Kind code of ref document: A1 |