Instruction execution device and method, electronic equipment and storage medium
By using a multi-level instruction control unit and a linked-list instruction queue structure in the deep learning processor, the problem of traditional processors being difficult to efficiently run deep learning algorithms is solved, achieving lower storage resource overhead and higher execution efficiency.
Patent Information
- Application Number
- CN202310430052.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-20
- Publication Date
- 2024-10-22
AI Technical Summary
Traditional processor architectures are difficult to efficiently run deep learning algorithms, resulting in deep learning processors having large storage resource overhead and long calculation times.
It uses a multi-level instruction control unit and a linked-list instruction queue structure to reduce storage resource overhead and improve instruction execution efficiency through dynamic management of write pointers and read pointers.
It effectively reduces the overall storage resource overhead of the deep learning processor, improves the instruction execution efficiency, and reduces the required area and computing time.
Smart Images

Figure CN118819633A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to the field of chip technology. More specifically, the present disclosure provides an instruction execution device, method, electronic device, and storage medium. Background Art
[0002] With the development of artificial intelligence technology, various chips can be used to run algorithms related to deep learning models. Summary of the invention
[0003] The present disclosure provides an instruction execution apparatus, method, device and storage medium.
[0004] According to one aspect of the present disclosure, an instruction execution device is provided, which includes: multiple instruction execution units; and an instruction control unit, configured to: in response to receiving a current instruction from an external control unit and determining that the first current row pointed to by a write pointer in an instruction queue is empty, write the current instruction to the first current row; point the write pointer to the subsequent row of the first current row; and in response to receiving a read indication from a target instruction execution unit among the multiple instruction execution units, determine the second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue; when a valid instruction is stored in the second current row, in response to the target instruction execution unit having read the valid instruction, point the target read pointer to the subsequent row of the second current row.
[0005] According to another aspect of the present disclosure, an electronic device is provided, including the instruction execution device provided by the present disclosure.
[0006] According to another aspect of the present disclosure, an instruction execution method is provided, the method comprising: in response to receiving a current instruction from an external control unit and determining that a first current row of an instruction queue pointed to by a write pointer is empty, the instruction control unit writes the current instruction into the first current row; points the write pointer to a subsequent row of the first current row; in response to a read indication from a target instruction execution unit among a plurality of instruction execution units, determines a second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue; and in a case where a valid instruction is stored in the second current row, in response to the target instruction execution unit having read the valid instruction, points the target read pointer to a subsequent row of the second current row.
[0007] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method provided according to the present disclosure.
[0008] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided. The computer instructions are used to cause a computer to execute the method provided according to the present disclosure.
[0009] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the method provided according to the present disclosure is implemented.
[0010] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0012] Figure 1 is a schematic diagram of a deep learning processor according to an embodiment of the present disclosure;
[0013] Figure 2 is a schematic block diagram of an instruction execution device according to an embodiment of the present disclosure;
[0014] Figure 3 is a schematic diagram of an instruction execution device according to an embodiment of the present disclosure;
[0015] FIG. 4A to FIG. 4C is a schematic diagram of an instruction queue according to an embodiment of the present disclosure;
[0016] FIG. 5A to FIG. 5C is a schematic diagram of an instruction queue according to another embodiment of the present disclosure;
[0017] Fig. 6A and Figure 6B is a schematic diagram of an instruction queue according to an embodiment of the present disclosure;
[0018] FIG. 7A to FIG. 7D is a schematic diagram of an instruction queue according to an embodiment of the present disclosure;
[0019] Fig. 8A and Figure 8B is a schematic diagram of an instruction queue according to another embodiment of the present disclosure;
[0020] FIG. 9A to FIG. 9B is a schematic diagram of an instruction queue according to an embodiment of the present disclosure;
[0021] Fig.10 is a schematic diagram of an instruction queue according to another embodiment of the present disclosure;
[0022] Fig.11 is a schematic diagram of an electronic device according to an embodiment of the present disclosure;
[0023] Fig.12 is a flowchart of an instruction execution method according to an embodiment of the present disclosure; and
[0024] Fig.13 The invention is a block diagram of an electronic device capable of instructing to execute a method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0025] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0026] With the rapid development of artificial intelligence, traditional processor architectures with arithmetic logic units (ALUs) are difficult to efficiently run deep learning algorithms. In order to improve the operating efficiency of deep learning algorithms, a processor structure with a domain-specific architecture (DSA) can be used. For example, the architecture of a deep learning processor is a typical architecture designed for the field of artificial intelligence, and is widely used to accelerate various neural networks such as convolutional neural networks (CNNs) and deep neural networks (DNNs).
[0027] Deep learning processors can have custom coarse-grained instructions, highly concurrent computing resources, complex pipeline structures, and dedicated large-scale on-chip caches. Unlike the arithmetic logic units of traditional processor architectures, the computing units of deep learning processors can be customized according to different algorithms. As a result, the computing units of deep learning processors are more complex and have deeper levels. In order to improve the efficiency of deep learning processors, multi-level control units can be used to control memory access and computing respectively. Control units at different levels execute their own instructions to collaboratively complete large-scale, efficient pipeline control. At the same point in time, different control units may be in the process corresponding to different instructions. As a result, multiple control units can parse instructions independently, which will be combined below. Figure 1 Provide explanation.
[0028] Figure 1 is a schematic diagram of a deep learning processor according to an embodiment of the present disclosure.
[0029] like Figure 1 As shown, the external control unit 101 can send multiple instructions to the deep learning processor 100. The instruction may include the data to be processed and the corresponding calculation method. For example, the instruction may include operations S_1 to S_5. In operation S_1, a read request is sent to the target storage unit. In operation S_2, a read response and the read data are received, the data format is adjusted, and the data is pre-processed. In operation S_3, the control calculation unit is calculated according to the above calculation method. In operation S_4, the calculation result is received from the calculation unit, and a write request and the data to be written are sent to the target storage unit. In operation S_5, a write response is received from the target storage unit. The write response may indicate that the data has been stored. Thus, the instruction is executed. It can be understood that operations S_1 to S_5 are only examples. If the algorithm to be executed by the deep learning processor is different, the operations contained in the corresponding instructions may also be different from operations S_1 to S_5.
[0030] The deep learning processor 100 may include, for example, instruction execution units 111 to 115. The instruction execution unit 111 may, for example, execute operation S_1. The instruction execution unit 112 may, for example, execute operation S_2. The instruction execution unit 113 may, for example, execute operation S_3. The instruction execution unit 114 may, for example, execute operation S_4. The instruction execution unit 115 may, for example, execute operation S_5. For different instructions, the instruction execution units 111 to 115 may run in parallel to a certain extent.
[0031] After the instruction is sent to the deep learning processor, the instruction may be first in the first-level instruction queue 102, and then synchronously distributed to the instruction execution unit 111 to the instruction execution unit 115. The granularity of the instruction may be coarse and the execution time may be long. For different instruction control units, there may be dependencies between different operations, and the order may not be disordered. Thus, the same instruction may be distributed to different instruction control units at the same time point to reduce control overhead.
[0032] In addition, there may be a time difference between different instruction control units. Thus, different instruction control units may respectively have a second-level instruction queue. For example, the instruction execution unit 111 may have a second-level instruction queue 1011. The instruction execution unit 112 may have a second-level instruction queue 1021. The instruction execution unit 113 may have a second-level instruction queue 1031. The instruction execution unit 114 may have a second-level instruction queue 1041. The instruction execution unit 115 may have a second-level instruction queue 1051.
[0033] However, in the presence of two levels of instruction queues, the storage resource overhead of the deep learning processor is large. In addition, each instruction execution unit has an independent second-level instruction queue. As a result, the total storage resource overhead of multiple second-level instruction queues is several times the storage resource overhead of the first-level instruction queue. In addition, for deep learning processors, the execution time of memory access, calculation, etc. of instructions is different, and the calculation time is relatively long. The time difference between multiple instruction execution units can also be increased. As a result, the storage resource overhead required for the second-level instruction queue is further increased.
[0034] Based on this, the present disclosure provides an instruction execution device, which will be described below.
[0035] Figure 2 is a schematic block diagram of an instruction execution device according to an embodiment of the present disclosure.
[0036] like Figure 2 As shown, the apparatus 200 may include a plurality of instruction execution units 210 and an instruction control unit 220 .
[0037] The plurality of instruction execution units 210 may include the above-mentioned instruction execution units 111 to 115 .
[0038] The instruction control unit 220 may be configured to: in response to receiving a current instruction from an external control unit and determining that the first current row pointed to by the write pointer in the instruction queue is empty, write the current instruction into the first current row.
[0039] In the embodiment of the present disclosure, the instruction queue may be a linked list. The instruction queue may include multiple rows. Each row may have a corresponding empty signal and a non-empty signal. The empty signal may indicate that there is no instruction in the row. The non-empty signal may indicate that the row stores an instruction. The instruction queue may also have at least one write pointer. The write pointer may point to one of the multiple rows. For example, taking the instruction queue including at least three rows as an example, the write pointer may point to row 2, and the current instruction may be written to row 2.
[0040] The instruction control unit 220 may also be configured to point the write pointer to the row following the first current row. For example, if the current instruction is written to the second row of the instruction queue, the write pointer may be pointed to the third row of the instruction queue. In this case, the third row following the second row in the instruction queue may be empty.
[0041] The instruction control unit 220 may also be configured to: in response to receiving a read instruction from a target instruction execution unit among the multiple instruction execution units, determine a second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue.
[0042] In the embodiment of the present disclosure, the instruction queue may set multiple read pointers for multiple instruction execution units. For example, a read pointer may be set for each instruction execution unit. The read pointer may point to one of the multiple rows of the instruction queue.
[0043] As described above, taking the instruction queue including at least three rows as an example, the target read pointer may point to the first row of the instruction queue. The first row may serve as the second current row.
[0044] The instruction control unit 220 may also be configured to: when a valid instruction is stored in the second current row, in response to the target instruction execution unit having read the valid instruction, point the target read pointer to the row following the second current row. For example, when a valid instruction is stored in row 1, the target instruction execution unit may read the valid instruction in row 1 and point the target read pointer to row 2.
[0045] Through the embodiments of the present disclosure, the two-level instruction queue is replaced with a linked list instruction queue, which can reduce the overall storage resource overhead, can use lower resource overhead to efficiently run multiple instruction execution units, and can also effectively reduce the area required for the instruction execution device.
[0046] It can be understood that the above is a description of the instruction execution device disclosed in the present invention. Figure 3 The instruction execution device disclosed in the present invention is further described.
[0047] Figure 3 is a schematic diagram of an instruction execution device according to an embodiment of the present disclosure.
[0048] like Figure 3 As shown, the instruction execution device 300 may include multiple instruction execution units and an instruction control unit 320. The multiple instruction execution units include an instruction execution unit 311, an instruction execution unit 312, an instruction execution unit 313, an instruction execution unit 314, and an instruction execution unit 315.
[0049] like Figure 3 As shown, the instruction control unit 320 is provided with an instruction queue 321. In the embodiment of the present disclosure, the instruction queue may include N rows, and N may be an integer greater than 2. The instruction queue 321 may include the first row 3211, the second row 3212, the third row 3213, the fourth row 3214, the fifth row 3215, the sixth row 3216, ... the Nth row 321N. The first row 3211 may store the instruction Instr1. The second row 3212 may store the instruction Instr2. The third row 3213 may store the instruction Instr3. The fourth row 3214 may store the instruction Instr4. The fifth row 3215 may store the instruction Instr5. The sixth row 3216 may store the instruction Instr6.
[0050] In the instruction queue 321, a write pointer 322 may be provided. The write pointer 322 may point to the Nth row 321N, for example.
[0051] In the instruction queue 321, a read pointer 3231 is set for the instruction execution unit 311, a read pointer 3232 is set for the instruction execution unit 312, a read pointer 3233 is set for the instruction execution unit 313, a read pointer 3234 is set for the instruction execution unit 314, and a read pointer 3235 is set for the instruction execution unit 315. The read pointer 3231 may point to the fifth row 3215, for example. The read pointer 3232 may point to the fourth row 3214, for example. The read pointer 3233 may point to the third row 3213, for example. The read pointer 3234 may point to the second row 3212, for example. The read pointer 3235 may point to the first row 3211, for example.
[0052] It can be understood that the above describes the instruction execution device of the present disclosure, and the instruction control unit will be further described below in conjunction with the write pointer.
[0053] In the embodiment of the present disclosure, the instruction control unit may also be configured to: when the write pointer points to the nth row of the instruction queue, in response to the n+1th row of the instruction queue being empty, write the received current instruction to the nth row and point the write pointer to the n+1th row of the instruction queue. n may be an integer greater than or equal to 1 and less than N. FIG. 4A to FIG. 4C Provide further explanation.
[0054] FIG. 4A to FIG. 4C is a schematic diagram of an instruction queue according to an embodiment of the present disclosure.
[0055] like Figure 4A As shown, the instruction queue 421 may include the first row 4211, the second row 4212, the third row 4213, the fourth row 4214, the fifth row 4215, the sixth row 4216, ... the Nth row 421N. It can be understood that, as Figure 4A and Figure 4B As shown, N can be an integer greater than 6, but the present disclosure is not limited thereto, and N can be any integer greater than 2. Figure 3 Each row in the instruction queue shown is released, and the following is obtained: Figure 4A The command queue is shown.
[0056] In the embodiment of the present disclosure, when the nth row is used as the first current row, the n+1th row can be used as the subsequent row of the first current row. In response to receiving the current instruction from the external control unit and determining that the first current row pointed to by the write pointer in the instruction queue is empty, the current instruction is written into the first current row. Figure 4AAs shown, taking the current instruction Instr41 as an example, in response to receiving the instruction Instr41 and the write pointer 422 pointing to the first row 4211 of the instruction queue 421 being empty, the received instruction Instr41 can be written to the first row 4211 of the instruction queue 421. Next, the write pointer 422 can be pointed to the second row 4212 of the instruction queue 421.
[0057] like Figure 4B As shown, after the instruction Instr41 is written into the first row 4211 of the instruction queue 421, the instruction Instr42 may be received. The instruction Instr42 may be used as the subsequent instruction of the instruction Instr41. After the instruction Instr41 is written into the first row 4211 of the instruction queue 421, the instruction Instr42 may be used as the current instruction. In response to receiving the instruction Instr42 and the write pointer 422 pointing to the second row 4212 of the instruction queue 421 being empty, the received instruction Instr42 may be written into the second row 4212 of the instruction queue 421. Next, the write pointer 422 may be pointed to the third row 4213 of the instruction queue 421.
[0058] After the instruction Instr42 is written to the second line 4212 of the instruction queue 421, the instruction Instr43 may be received as the current instruction. In response to receiving the instruction Instr43 and the write pointer 422 pointing to the third line 4213 of the instruction queue 421 being empty, the received instruction Instr43 may be written to the third line 4213 of the instruction queue 421, and the write pointer 422 may be pointed to the fourth line 4214 of the instruction queue 421. After the instruction Instr43 is written to the third line 4213 of the instruction queue 421, the instruction Instr44 may be received as the current instruction. In response to receiving the instruction Instr44 and the write pointer 422 pointing to the fourth line 4214 of the instruction queue 421 being empty, the received instruction Instr44 may be written to the fourth line 4214 of the instruction queue 421, and the write pointer 422 may be pointed to the fifth line 4215 of the instruction queue 421. Thus, it can be obtained as follows Figure 4C The command queue is shown.
[0059] It can be understood that the above description of the instruction queue of the present disclosure is combined with the write pointer, and the following description of the instruction queue of the present disclosure will be combined with the read pointer.
[0060] FIG. 5A to FIG. 5C is a schematic diagram of an instruction queue according to an embodiment of the present disclosure.
[0061] like Figure 5AAs shown, the instruction queue 521 may include the first row 5211, the second row 5212, the third row 5213, the fourth row 5214, the fifth row 5215, the sixth row 5216, ... the Nth row 521N. The write pointer may point to the fifth row 5215. The first row 5211 to the fourth row 5214 of the instruction queue 521 may have stored valid instructions. For example, the first row 5211 may store the instruction Instr51. The second row 5212 may store the instruction Instr52. The third row 5213 may store the instruction Instr53. The fourth row 5214 may store the instruction Instr54. It can be understood that for the detailed description of the instruction queue 521, the write pointer 522, and the instructions Instr51 to Instr54, reference can be made to the detailed description of the instruction queue 421, the write pointer 422, and the instructions Instr41 to Instr44, which will not be repeated in this disclosure.
[0062] In the instruction queue 521, multiple read pointers may be set for multiple instruction execution units. The following will be described in conjunction with the read pointer 5235. The read pointer 5235 may be set for the above-mentioned instruction execution unit 315, for example. Figure 5A As shown, the read pointer 5235 can point to the first row 5211.
[0063] In an embodiment of the present disclosure, in response to receiving a read instruction from a target instruction execution unit among a plurality of instruction execution units, a second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue is determined. Figure 5A As shown, the read pointer 5235 may point to the first row 5211. The first row 5211 may serve as the second current row.
[0064] In an embodiment of the present disclosure, when a valid instruction is stored in the second current row, in response to the target instruction execution unit having read the valid instruction, the target read pointer is pointed to the subsequent row of the second current row.
[0065] For example, when the second current row stores instructions and the line pointed to by the write pointer is any subsequent line of the second current row, it can be determined that the instructions stored in the second current row are valid instructions. Figure 5A As shown, when the instruction Instr51 is stored in the first row 5211 and the write pointer 522 points to the fifth row, the target instruction execution unit may be allowed to read the instruction Instr51.
[0066] like Figure 5B As shown, in response to the target instruction execution unit having read instruction Instr51, the read pointer 5235 may point to the second line 5212.
[0067] Next, the received instruction Instr55 is used as the current instruction. In response to receiving the instruction Instr55 and the 5th row 5215 of the instruction queue 521 to which the write pointer 522 currently points is empty, the received instruction Instr55 can be written to the 5th row 5215 of the instruction queue 521, and the write pointer 522 is pointed to the 6th row 5216 of the instruction queue 521. After writing the instruction Instr55 to the 5th row 5215 of the instruction queue 521, the instruction Instr56 can be received as the current instruction. In response to receiving the instruction Instr56 and the 6th row 5216 of the instruction queue 521 to which the write pointer 522 points is empty, the received instruction Instr56 can be written to the 6th row 5216 of the instruction queue 521. ...After writing the instruction to the previous row of the Nth row 521N, the write pointer 522 can be pointed to the Nth row 521N of the instruction queue 521. Thus, the following can be obtained: Figure 5C The command queue is shown.
[0068] It can be understood that the above description uses n less than N and the write pointer points to the nth line as an example to illustrate the instruction control unit of the present disclosure. However, the present disclosure is not limited thereto, and the following description will use the write pointer points to the Nth line as an example to illustrate the instruction control unit of the present disclosure.
[0069] Fig. 6A and Figure 6B is a schematic diagram of an instruction queue according to an embodiment of the present disclosure.
[0070] like Fig. 6A As shown, the instruction queue 621 may include the first row 6211, the second row 6212, the third row 6213, the fourth row 6214, the fifth row 6215, the sixth row 6216, ... the Nth row 621N. The first row 6211 may store the instruction Instr61. The second row 6212 may store the instruction Instr62. The third row 6213 may store the instruction Instr63. The fourth row 6214 may store the instruction Instr64. The fifth row 6215 may store the instruction Instr65. The sixth row 6216 may store the instruction Instr66.
[0071] In the instruction queue 621, a write pointer 622 may be provided. The write pointer 622 may, for example, point to the Nth row 621N. It is understood that for the detailed description of the instruction queue 621, the write pointer 622, and the instructions Instr61 to Instr66, reference may be made to the detailed description of the instruction queue 521, the write pointer 522, and the instructions Instr51 to Instr56, which will not be repeated in the present disclosure.
[0072] In some embodiments, the instruction control unit may also be configured to: when the write pointer points to the Nth row of the instruction queue, in response to the 1st row of the instruction queue storing a valid instruction, send a message indicating to suspend receiving instructions to the external control unit. For example, if the write pointer 622 points to the Nth row, and the 1st row 6211 stores the instruction Instr61, a message indicating to suspend receiving instructions may be sent to the external control unit.
[0073] In some embodiments, the instruction control unit may also be configured to: write the received current instruction into the Nth row, and point the write pointer to the first row of the instruction queue. For example, instruction Instr6N may be received as the current instruction. Instruction Instr6N may be written into the Nth row 621N pointed to by the write pointer. Next, the write pointer may be pointed to the first row of the instruction queue. Through the disclosed embodiments, the instruction queue may be implemented as a circular linked list, and the rows in the instruction queue may be efficiently reused to efficiently reuse storage resources, further reducing the storage resource overhead required by the instruction execution device.
[0074] It can be understood that the above describes instruction reading and writing, and some methods of releasing rows of an instruction queue will be described below.
[0075] FIG. 7A to FIG. 7D is a schematic diagram of an instruction queue according to an embodiment of the present disclosure.
[0076] like Fig. 7A As shown, the instruction queue 721 may include the first row 7211, the second row 7212, the third row 7213, the fourth row 7214, the fifth row 7215, the sixth row 7216, ... the Nth row 721N. The first row 7211 may store the instruction Instr71. The second row 7212 may store the instruction Instr72. The third row 7213 may store the instruction Instr73. The fourth row 7214 may store the instruction Instr74. The fifth row 7215 may store the instruction Instr75. The sixth row 7216 may store the instruction Instr76. The seventh row 721N may store the instruction Instr7N.
[0077] In the instruction queue 721, a write pointer 722 may be provided. The write pointer 722 may, for example, point to the first row 7211. In the instruction queue 721, multiple read pointers are provided for multiple instruction execution units, respectively. For example, the multiple read pointers may include a read pointer 7235. The read pointer 7235 may point to the second row 7212. It can be understood that for the detailed description of the instruction queue 721, the write pointer 722, the instructions Instr71 to Instr76, and the instruction Instr7N, reference may be made to the above-mentioned detailed description of the instruction queue 621, the write pointer 622, the instructions Instr61 to Instr66, and the instruction 6N, which will not be repeated in this disclosure. For the detailed description of the read pointer 7235, reference may be made to the above-mentioned detailed description of the read pointer 5235, which will not be repeated in this disclosure.
[0078] The multiple read pointers may also include: a read pointer 7231, a read pointer 7232, a read pointer 7233, and a read pointer 7234. Fig. 7A As shown, read pointer 7231 may point to, for example, the sixth row 7216. Read pointer 7232 may point to, for example, the fifth row 7215. Read pointer 7233 may point to, for example, the fourth row 7214. Read pointer 7234 may point to, for example, the third row 7213.
[0079] In the embodiment of the present disclosure, the instruction control unit may also be configured to: in response to determining that multiple instruction execution units have read valid instructions in the nth row, release the nth row and make the nth row empty. Fig. 7A As shown, after the read pointer 7235 points to the second row 7212, it can be determined that multiple instruction execution units have read the valid instructions in the first row, and the first row 7211 can be released, and the following is obtained: Figure 7B The instruction queue is shown in Figure 1. Figure 7B As shown, after releasing the first row 7211, the first row 7211 is empty. Next, a message indicating to continue receiving instructions may be sent to the external control unit.
[0080] In addition, when the instruction execution unit corresponding to the read pointer 7235 has read the instruction Instr72, the read pointer 7235 may point to the third row 7213. Next, if it is determined that multiple instruction execution units have read valid instructions in the second row, the instruction Instr72 in the second row 7212 may be released.
[0081] Next, the instruction instr7n1 from the external control unit may be received as the current instruction. In response to receiving the instruction Instr7n1 and the write pointer 722 pointing to the first row 7211 of the instruction queue 721 being empty, the received instruction Instr7n1 may be written to the first row 7211 of the instruction queue 721, and the write pointer 722 may point to the second row 7212 of the instruction queue 721. Thus, the following may be obtained: Figure 7C The command queue is shown.
[0082] In the embodiment of the present disclosure, the instruction control unit may also be configured to: when the target read pointer points to the Nth row of the instruction queue, in response to the target instruction execution unit having read the instruction in the Nth row, point the target read pointer to the 1st row of the instruction queue. Fig.7D As shown, when the read pointer 7231 points to the Nth row 721N, in response to the instruction execution unit corresponding to the read pointer 721N having read the instruction in the Nth row, the read pointer 7231 may be pointed to the 1st row 7211. Through the embodiment of the present disclosure, the instruction execution unit may cyclically read the instructions in the instruction queue, and may efficiently utilize storage resources and effectively reduce storage overhead.
[0083] It can be understood that the above description uses the example that the n+1th row is empty to illustrate the present disclosure. However, the present disclosure is not limited to this. The n+1th row of the instruction queue may store valid instructions. FIG. 8A to FIG. 8B Provide explanation.
[0084] Fig. 8A and Figure 8B is a schematic diagram of an instruction queue according to an embodiment of the present disclosure.
[0085] like Fig. 8A As shown, the instruction queue 821 may include the first row 8211, the second row 8212, the third row 8213, the fourth row 8214, the fifth row 8215, the sixth row 8216, ... the Nth row 821N. The first row 8211 may store the instruction Instr8n1. The third row 8213 may store the instruction Instr83. The fourth row 8214 may store the instruction Instr84. The fifth row 8215 may store the instruction Instr85. The sixth row 8216 may store the instruction Instr86. The Nth row 821N may store the instruction Instr8N. The write pointer 822 may point to the second row 8212. It can be understood that for the detailed description of instruction 821, write pointer 822, instructions Instr83 to Instr86, instruction 8N and instruction 8n1, reference can be made to the above detailed description of instruction 721, write pointer 722, instructions Instr73 to Instr76, instruction 7N and instruction 7n1, and the present disclosure will not repeat them here.
[0086] In the embodiment of the present disclosure, when the write pointer points to the nth row of the instruction queue, in response to the n+1th row of the instruction queue storing a valid instruction, the received current instruction is written to the nth row, and the write pointer points to the n+1th row of the instruction queue. A message indicating the suspension of receiving instructions is sent to the external control unit. Fig. 8A As shown, after the instruction Instr8n1 is written into the first row 8211 of the instruction queue 821, the instruction Instr8n2 can be received as the current instruction. When the write pointer points to the second row 8212 of the instruction queue 821 and the second row 8212 is empty, the received instruction Instr8n2 can be written into the second row 8212 of the instruction queue 821. Next, the write pointer 822 can be pointed to the third row 8213 of the instruction queue 821. Thus, it can be obtained as follows Figure 8B In addition, in response to the valid instruction being stored in the 3rd row of the instruction queue, a message for suspending the instruction reception can be sent to the external control unit so that the external control unit no longer sends instructions to the instruction queue 821. According to the embodiment of the present disclosure, when an instruction is stored in the n+1th row, the instruction reception can be suspended so that each instruction stored in the instruction queue can be read by the instruction execution unit to avoid the instruction being overwritten.
[0087] It is understood that in the process of writing instructions into the instruction queue, the instruction execution unit may also read the instructions in the instruction queue. Fig. 8A As shown, in the instruction queue 821, multiple read pointers are respectively set for multiple instruction execution units. For example, the multiple read pointers may include a read pointer 8231, a read pointer 8232, a read pointer 8233, a read pointer 8234, and a read pointer 8235. Read pointer 8231 may point to the first row 8211. Read pointer 8232 may point to the Nth row 821N. Read pointer 8233 may point to the sixth row 8216. Read pointer 8234 may point to the fifth row 8215. Read pointer 8235 may point to the third row 8213. It can be understood that for the detailed description of read pointers 8231 to 8235, reference can be made to the detailed description of read pointers 7231 to 7235, which will not be repeated in the present disclosure.
[0088] In the process of writing the instruction Instr8n2 into the instruction queue, the read pointer 8231, the read pointer 8232, the read pointer 8233 and the read pointer 8234 can respectively complete the reading of the instruction. Figure 8B As shown, the read pointer 8231 may point to the second row 8212. The read pointer 8232 may point to the first row 8211. The read pointer 8233 may point to the Nth row 821N. The read pointer 8234 may point to the sixth row 8216.
[0089] It can be understood that the speed at which the instruction execution unit corresponding to the read pointer 8235 reads the instruction Instr83 may be slow. After the instruction execution unit corresponding to the read pointer 8235 has read the instruction Instr83, the read pointer 8235 may point to the fourth row 8214. Thus, after the write pointer 822 points to the third row 8213, the third row 8213 is not released.
[0090] It can be understood that the above description uses the example of the read pointer and the write pointer pointing to different lines to illustrate the present disclosure. However, the present disclosure is not limited to this, and the read pointer and the write pointer can point to the same line. FIG. 9A to FIG. 9B Provide further explanation.
[0091] FIG. 9A to FIG. 9B is a schematic diagram of an instruction queue according to an embodiment of the present disclosure.
[0092] like Fig. 9A As shown, the instruction queue 921 may include the first row 9211, the second row 9212, the third row 9213, the fourth row 9214, the fifth row 9215, the sixth row 9216, ... the Nth row 921N. The first row 9211 may store the instruction Instr9n1. The second row 9212 may store the instruction Instr9n2. The third row 9213 may store the instruction Instr93. The fourth row 9214 may store the instruction Instr94. The fifth row 9215 may store the instruction Instr95. The sixth row 9216 may store the instruction Instr96. The Nth row 921N may store the instruction Instr9N. The write pointer 922 may point to the third row 9213. In the instruction queue 921, a plurality of read pointers are respectively set for a plurality of instruction execution units. For example, the plurality of read pointers may include a read pointer 9231, a read pointer 9232, a read pointer 9233, a read pointer 9234, and a read pointer 9235. The read pointer 9232 may point to the first row 9211. The read pointer 9233 may point to the Nth row 921N. The read pointer 9234 may point to the sixth row 9216. The read pointer 9235 may point to the fourth row 9214.
[0093] It can be understood that for the detailed description of instruction 921, write pointer 922, instructions Instr93 to Instr96, instruction 9N, instruction 9n1, instruction 9n2 and read pointers 9232 to 9235, reference can be made to the above detailed description of instruction 821, write pointer 822, instructions Instr83 to Instr86, instruction 8N, instruction 8n1, instruction 8n2 and read pointers 8232 to 8235, and the present disclosure will not repeat them here.
[0094] The difference from the read pointer 8231 is that the instruction execution unit corresponding to the read pointer 9231 can read the instruction Instr9n2 faster. If the instruction execution unit corresponding to the read pointer 9231 has read the instruction Instr9n2, the read pointer 9231 can be pointed to the third line 9231. Therefore, the read pointer 9231 and the write pointer 922 both point to the third line 9213.
[0095] In the embodiment of the present disclosure, the instruction control unit may also be configured to: in response to the write pointer and the target read pointer both pointing to the nth row and the nth row storing a valid instruction, prohibit the target instruction execution unit from reading the valid instruction. Fig. 9A As shown, in response to the write pointer 922 and the read pointer 9231 both pointing to the third line 9213 and the third line 9213 storing the instruction Instr93, the instruction execution unit corresponding to the read pointer 9231 may be prohibited from reading the instruction Instr93. The instruction execution unit corresponding to the read pointer 9231 may be, for example, the instruction execution unit 311 described above.
[0096] In the embodiment of the present disclosure, the instruction control unit can also be configured to: when the nth line is released as empty, write the received new valid instruction to the nth line, point the write pointer to the n+1th line, and allow the target instruction execution unit to read the new valid instruction. For example, the instruction Instr93 in the 3rd line 9213 has been read by multiple instruction execution units, and the 3rd line 9213 is in the process of being released. After the 3rd line 9213 is released, the instruction Instr9n3 can be received. The instruction Instr9n3 can be written to the 3rd line 9213, and the write pointer 922 points to the 4th line 9214, and the following is obtained: Fig. 9B Next, the instruction execution unit corresponding to the read pointer 9231 may be allowed to read the instruction Instr9n3. Through the disclosed embodiment, when the write pointer and the read pointer point to the same row, the instruction execution unit may be prohibited from reading the instruction, thereby avoiding repeated reading of historical instructions and improving the stability of the instruction execution device.
[0097] It can be understood that the above description uses the example of the read pointer and the write pointer pointing to the third row to illustrate the present disclosure. However, the present disclosure is not limited to this. The read pointer and the write instruction can point to any row in N rows. Fig.10 Provide explanation.
[0098] Fig.10 is a schematic diagram of an instruction queue according to another embodiment of the present disclosure.
[0099] like Fig.10As shown, the instruction queue 1021 may include the first row 10211, the second row 10212, the third row 10213, the fourth row 10214, the fifth row 10215, the sixth row 10216, ... the Nth row 1021N. The first row 10211 may store the instruction Instr101. The second row 10212 may store the instruction Instr102. The third row 10213 may store the instruction Instr103. The fourth row 10214 may store the instruction Instr104. The fifth row 10215 may store the instruction Instr105. The sixth row 10216 may store the instruction Instr106.
[0100] In the instruction queue 1021, a write pointer 1022 may be provided. The write pointer 1022 may, for example, point to the first row 10211. In the instruction queue 1021, multiple read pointers are provided for multiple instruction execution units, respectively. For example, the multiple read pointers may include a read pointer 10232, a read pointer 10233, a read pointer 10234, and a read pointer 10235. The read pointer 10232 may, for example, point to the fifth row 10215. The read pointer 10233 may, for example, point to the fourth row 10214. The read pointer 10234 may, for example, point to the third row 10213. The read pointer 10235 may point to the second row 10212. It can be understood that for the detailed description of instruction queue 1021, write pointer 1022, read pointer 10232 to read pointer 10235, instruction Instr101 to instruction Instr106 and instruction Instr10N, reference can be made to the above detailed description of instruction queue 721, write pointer 722, read pointer 7232 to read pointer 7235, instruction Instr71 to instruction Instr76 and instruction Instr7N, and the present disclosure will not repeat them here.
[0101] The multiple read pointers may further include a read pointer 10231. The difference from the read pointer 7231 is that the instruction execution unit corresponding to the read pointer 10231 has a faster instruction reading speed. If the instruction execution unit corresponding to the read pointer 10231 has read the instruction Instr10N before the first row is released, the read pointer 10231 may be pointed to the first row 10231. Thus, the read pointer 10231 and the write pointer 1022 both point to the first row 10211.
[0102] In the embodiment of the present disclosure, the instruction control unit may also be configured to: in response to the write pointer and the target read pointer both pointing to the nth row and the nth row storing a valid instruction, prohibit the target instruction execution unit from reading the valid instruction. Fig.10As shown, in response to the write pointer 1022 and the read pointer 10231 both pointing to the first row 10211 and the first row 10211 storing the instruction Instr101, the instruction execution unit corresponding to the read pointer 10231 may be prohibited from reading the instruction Instr101.
[0103] In the embodiment of the present disclosure, the instruction control unit can also be configured to: when the nth row is released as empty, write the received new valid instruction to the nth row, point the write pointer to the n+1th row, and allow the target instruction execution unit to read the new valid instruction. For example, the instruction Instr101 in row 10211 has been read by multiple instruction execution units, and row 10211 is in the process of being released. After row 10211 is released, a new valid instruction can be received. The new valid instruction can be written to row 10211, and the write pointer 1022 points to row 2 10212. Next, the instruction execution unit corresponding to the read pointer 9231 can be allowed to read the new valid instruction.
[0104] It can be understood that the instruction execution device of the present disclosure is described above, and the electronic device including the instruction execution device will be described below.
[0105] Fig.11 is a schematic diagram of an electronic device according to an embodiment of the present disclosure.
[0106] like Fig.11 As shown, the electronic device 11 may include the instruction execution device 1100 provided by the present disclosure. For example, the instruction execution device 1100 may be the device 200 described above.
[0107] It can be understood that the electronic device of the present disclosure is described above, and the instruction execution method of the present disclosure will be described below.
[0108] Fig.12 is a flowchart of an instruction execution method according to an embodiment of the present disclosure.
[0109] like Fig.12 As shown, the method 1200 may include operations S1210 to S1240.
[0110] In operation S1210 , in response to receiving a current instruction from an external control unit and determining that a first current row of an instruction queue pointed to by a write pointer is empty, the instruction control unit writes the current instruction into the first current row.
[0111] In operation S1220, the write pointer is pointed to a row following the first current row.
[0112] In operation S1230 , in response to a read instruction from a target instruction execution unit among the plurality of instruction execution units, a second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue is determined.
[0113] In operation S1240 , when a valid instruction is stored in the second current row, in response to the target instruction execution unit having read the valid instruction, the target read pointer is pointed to a subsequent row of the second current row.
[0114] It can be understood that the method 1200 can be executed using the above-mentioned instruction control unit 220.
[0115] In some embodiments, the instruction queue includes N rows, where N is an integer greater than 2; writing the current instruction into the first current row includes: when the write pointer points to the nth row of the instruction queue, in response to the n+1th row of the instruction queue storing a valid instruction, sending a message indicating to suspend receiving instructions to the external control unit. For example, n is greater than or equal to 1 and less than N.
[0116] In some embodiments, pointing the write pointer to a subsequent row of the first current row includes: writing the received current instruction to the nth row, and pointing the write pointer to the n+1th row of the instruction queue.
[0117] In some embodiments, writing the current instruction into the first current row further includes: when the write pointer points to the Nth row of the instruction queue, in response to the 1st row of the instruction queue storing a valid instruction, sending a message indicating to suspend receiving instructions to the external control unit.
[0118] In some embodiments, method 1200 further includes: writing the received current instruction into the Nth row, and pointing the write pointer to the first row of the instruction queue.
[0119] In some embodiments, method 1200 further includes: when the target read pointer points to the Nth row of the instruction queue, in response to the target instruction execution unit having read a valid instruction in the Nth row, pointing the target read pointer to the 1st row of the instruction queue.
[0120] In some embodiments, the method 1200 further includes: in response to the write pointer and the target read pointer both pointing to the nth row and the nth row storing a valid instruction, prohibiting the target instruction execution unit from reading the valid instruction. When the nth row is released to be empty, writing the received new valid instruction to the nth row, pointing the write pointer to the n+1th row, and allowing the target instruction execution unit to read the new valid instruction.
[0121] In some embodiments, the method 1200 further includes: in response to determining that the plurality of instruction execution units have read valid instructions in the nth row, releasing the nth row to make the nth row empty.
[0122] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0123] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0124] Fig.13 A schematic block diagram of an example electronic device 1300 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0125] like Fig.13 As shown, the device 1300 includes a computing unit 1301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the device 1300 can also be stored. The computing unit 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 13013 is also connected to the bus 1304.
[0126] A number of components in the device 1300 are connected to the I / O interface 13013, including: an input unit 1306, such as a keyboard, a mouse, etc.; an output unit 1307, such as various types of displays, speakers, etc.; a storage unit 1308, such as a disk, an optical disk, etc.; and a communication unit 1309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1309 allows the device 1300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0127] The computing unit 1301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1301 performs the various methods and processes described above, such as instruction execution methods. For example, in some embodiments, the instruction execution method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1300 via ROM 1302 and / or communication unit 1309. When the computer program is loaded into RAM 1303 and executed by the computing unit 1301, one or more steps of the instruction execution method described above may be performed. Alternatively, in other embodiments, the computing unit 1301 may be configured to execute the instruction execution method in any other appropriate manner (e.g., by means of firmware).
[0128] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0129] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0130] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0131] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) display or an LCD (liquid crystal display)) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0132] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0133] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. An instruction execution device, comprising: Multiple instruction execution units; as well as Command control unit, configured as: In response to receiving a current instruction from an external control unit and determining that a first current row pointed to by a write pointer in the instruction queue is empty, writing the current instruction into the first current row; Pointing the write pointer to the row following the first current row; as well as In response to receiving a read instruction from a target instruction execution unit among the plurality of instruction execution units, determining a second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue; In the case where the second current row stores a valid instruction, in response to the target instruction execution unit having read the valid instruction, the target read pointer is pointed to a row following the second current row.
2. The device according to claim 1, wherein: The instruction queue includes N rows, where N is an integer greater than 2; the instruction control unit is further configured as follows: When the write pointer points to the nth row of the instruction queue, In response to a valid instruction being stored in the n+1th row of the instruction queue, sending a message indicating to suspend receiving instructions to the external control unit, wherein n is greater than or equal to 1 and less than N; and The received current instruction is written into the nth row, and the write pointer is pointed to the n+1th row of the instruction queue.
3. The device according to claim 2, wherein: The instruction control unit is also configured as: When the write pointer points to the Nth row of the instruction queue, In response to a valid instruction being stored in row 1 of the instruction queue, sending a message indicating suspension of instruction reception to the external control unit; as well as The received current instruction is written into the Nth row, and the write pointer is pointed to the first row of the instruction queue.
4. The device according to claim 1, wherein: The instruction queue includes N rows, where N is an integer greater than 2; the instruction control unit is further configured as follows: In the case where the target read pointer points to the Nth row of the instruction queue, in response to the target instruction execution unit having read the instructions in the Nth row, the target read pointer is pointed to the 1st row of the instruction queue.
5. The device according to claim 2, wherein: The instruction control unit is also configured as: In response to the write pointer and the target read pointer both pointing to the nth row and the nth row storing a valid instruction, prohibiting the target instruction execution unit from reading the valid instruction; as well as In the case that the nth row is released to be empty, the received new valid instruction is written into the nth row, the write pointer is pointed to the n+1th row, and the target instruction execution unit is allowed to read the new valid instruction.
6. The device according to claim 2, wherein: The instruction control unit is also configured as: In response to determining that the plurality of instruction execution units have all read valid instructions in the nth row, the nth row is released to make the nth row empty.
7. An electronic device, comprising the instruction execution device according to any one of claims 1 to 6.
8. A method for executing an instruction, comprising: In response to receiving a current instruction from an external control unit and determining that a first current row of the instruction queue pointed to by a write pointer is empty, the instruction control unit writes the current instruction into the first current row; Pointing the write pointer to the row following the first current row; In response to a read instruction from a target instruction execution unit among the plurality of instruction execution units, determining a second current row pointed to by a target read pointer set for the target instruction execution unit in the instruction queue; In the case where the second current row stores a valid instruction, in response to the target instruction execution unit having read the valid instruction, the target read pointer is pointed to a row following the second current row.
9. The method according to claim 8, wherein: The instruction queue includes N rows, where N is an integer greater than 2; and writing the current instruction into the first current row includes: When the write pointer points to the nth row of the instruction queue, in response to the n+1th row of the instruction queue storing a valid instruction, sending a message indicating to suspend receiving instructions to the external control unit, wherein n is greater than or equal to 1 and less than N; Pointing the write pointer to the subsequent row of the first current row comprises: The received current instruction is written into the nth row, and the write pointer is pointed to the n+1th row of the instruction queue.
10. The method according to claim 9, wherein: Writing the current instruction into the first current row further comprises: In a case where the write pointer points to the Nth row of the instruction queue, in response to the first row of the instruction queue storing a valid instruction, sending a message indicating to suspend receiving instructions to the external control unit; The method further comprises: The received current instruction is written into the Nth row, and the write pointer is pointed to the first row of the instruction queue.
11. The method according to claim 9, further comprising: In the case where the target read pointer points to the Nth row of the instruction queue, in response to the target instruction execution unit having read the valid instructions in the Nth row, the target read pointer is pointed to the 1st row of the instruction queue.
12. The method according to claim 8, further comprising: In response to the write pointer and the target read pointer both pointing to the nth row and the nth row storing a valid instruction, prohibiting the target instruction execution unit from reading the valid instruction; as well as In the case that the nth row is released to be empty, the received new valid instruction is written into the nth row, the write pointer is pointed to the n+1th row, and the target instruction execution unit is allowed to read the new valid instruction.
13. The method according to claim 9, further comprising: In response to determining that the plurality of instruction execution units have all read valid instructions in the nth row, the nth row is released to make the nth row empty.
14. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 8 to 13.
15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 8 to 13.
16. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 8 to 13.
