System and method for transiting vectors while loading from memory

The replacement and broadcast of vector data is realized through the shuffling network between the memory read port and the register file, which solves the problems of slow N-tuple data conversion speed and complex code in the existing technology, and improves the performance and efficiency of the processor. .

CN118535228APending Publication Date: 2024-08-23INTEL CORP
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410698163.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2018-12-21
Filing Date
2019-11-19
Publication Date
2024-08-23

Smart Images

  • Figure CN118535228A
    Figure CN118535228A
Patent Text Reader

Abstract

The invention discloses a system and a method for transiting vectors in progress when loaded from memory. In one example, a processor includes a register file, a memory interface, a fetch circuit to fetch an instruction, a decode circuit to decode the fetched instruction, the fetched instruction having fields to specify an opcode, a destination vector register, and a source vector having N sets of elements, N being a positive integer, the opcode is to instruct the processor to: fetch the source vector, generate write data comprising one or more N tuples, each N tuple comprising a corresponding element from each of the N sets of elements, and write the write data to the destination vector register, and execution circuitry to execute the decoded instruction according to the opcode, the execution circuitry has a shuffle pipeline placed between the memory and the register file, the shuffle pipeline to fetch, decode, and execute further instances of the instruction at one instruction per clock cycle.
Need to check novelty before this filing date? Find Prior Art

Description

This invention patent application is a divisional application of the invention patent application with application number 201911135320.7 filed on November 19, 2019 and named “System and method for transposing a vector on the fly while loading from a memory”. Technical Field

[0001] The field of the invention relates generally to computer processor architecture, and more particularly to systems and methods for transposing vectors when loading from memory. Background Art

[0002] An instruction set or instruction set architecture (ISA) is the portion of a computer architecture that is relevant to programming, and may include native data types, instructions, register architecture, addressing modes, memory architecture, interrupt and exception handling, and external input and output (I / O). An instruction set includes one or more instruction formats. A given instruction format defines various fields (number of bits, position of bits) to specify the operation to be performed and the operands on which that operation is to be performed, etc. A given instruction is expressed using a given instruction format, and specifies the operation and operands. An instruction stream is a specific sequence of instructions, wherein each instruction in the sequence is an occurrence of an instruction in an instruction format.

[0003] N-tuples are frequently used in the context of computing applications, such as speech recognition, machine learning, and deep learning. As used herein, an N-tuple is an ordered sequence of N integer elements. There is no upper limit to N, and N-tuples where N equals 1, 2, 3, 4, or 5 may be referred to as monads, duads, triads, tetrads, and pentads, respectively.

[0004] A group of M instances of an N-tuple can be represented as a packed data vector, either by interleaving the elements of each of the M instances one after another, or by separating the elements of the M instances into N groups, each group having M elements.

[0005] Applications often need to transpose a set of M instances of an N-tuple from a separate representation to an interleaved representation by permuting the elements of a compact data vector. Sometimes, an application needs to transpose one, two or more of the M instances of an N-tuple from a separate representation to an interleaved representation, and broadcast one, two or more N-tuples across an entire vector register. Although such transpositions and broadcasts can be implemented using existing vector instructions, doing so is typically slow, results in large code sizes, and frequently requires complex software adjustments. BRIEF DESCRIPTION OF THE DRAWINGS

[0006] Figure 1Ais a block diagram illustrating processing components for executing a load permute with possible broadcast (LPPB) instruction according to an embodiment;

[0010] Figure 1B is a block diagram illustrating execution of a load permute with broadcast (LPPB) instruction, possibly in accordance with an embodiment;

[0011] Figure 2A is a block diagram illustrating a shuffle circuit having a throughput of one cycle per instruction according to an embodiment;

[0012] Figure 2B is a block diagram illustrating execution of a load permute with broadcast (LPPB) instruction, possibly in accordance with an embodiment;

[0013] Figure 2C is a block diagram illustrating execution of a load permute with broadcast (LPPB) instruction, possibly in accordance with an embodiment;

[0014] Figure 2D is a block diagram illustrating execution of a load permute with broadcast (LPPB) instruction, possibly in accordance with an embodiment;

[0015] Figure 2E is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0016] Figure 2F is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0017] Figure 2G is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0018] Figure 2H is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0019] Fig.2I is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0020] Figure 2J is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0021] Figure 2K is a block diagram illustrating execution of a load broadcast instruction according to an embodiment;

[0022] Figure 3 is a flow chart illustrating a processor's response to a load-permute-possibly-with-broadcast (LPPB) instruction according to an embodiment;

[0023] Figure 4A is a block diagram illustrating a possible format of a load-permute-with-broadcast (LPPB) instruction according to an embodiment;

[0024] Figure 4B is a block diagram illustrating the format of a load permute and broadcast instruction according to an embodiment;

[0025] Figure 5A-Figure 5B is a block diagram illustrating a generic vector friendly instruction format and instruction templates thereof according to some embodiments of the present invention;

[0026] Figure 5A is a block diagram illustrating a generic vector friendly instruction format and its class A instruction templates according to some embodiments of the present invention;

[0027] Figure 5B is a block diagram illustrating a generic vector friendly instruction format and its class B instruction templates according to some embodiments of the present invention;

[0028] Fig. 6A is a block diagram illustrating an exemplary specific vector friendly instruction format according to some embodiments of the present invention;

[0029] Figure 6B is a block diagram illustrating fields of a specific vector friendly instruction format that make up a complete opcode field according to one embodiment;

[0030] Figure 6C is a block diagram illustrating fields of a specific vector friendly instruction format that make up a register index field according to one embodiment;

[0031] Fig.6D is a block diagram illustrating fields of a specific vector friendly instruction format that make up an augmented operation field according to one embodiment;

[0032] Figure 7 is a block diagram of a register architecture according to one embodiment;

[0033] Fig. 8A is a block diagram illustrating both an exemplary in-order pipeline and an exemplary register renaming out-of-order issue / execution pipeline according to some embodiments;

[0034] Figure 8B is a block diagram illustrating both an exemplary embodiment of an in-order architecture core and an exemplary register renaming, out-of-order issue / execution architecture core to be included in a processor in accordance with some embodiments;

[0035] Figure 9A-9B A block diagram illustrating a more specific exemplary in-order core architecture, which would be one of several logic blocks in a chip (including other cores of the same type and / or different types);

[0036] Fig.9Ais a block diagram of a single processor core and its connection to an on-die interconnect network and its local subset of a level 2 (L2) cache in accordance with some embodiments;

[0037] Fig. 9B According to some embodiments Fig.9A An expanded view of a portion of a processor core in;

[0038] Fig.10 is a block diagram of a processor that may have more than one core, may have an integrated memory controller, and may have integrated graphics according to some embodiments;

[0039] Figure 11-Figure 14 is a block diagram of an exemplary computer architecture;

[0040] Fig.11 A block diagram illustrating a system according to some embodiments;

[0041] Fig.12 is a block diagram of a more specific first exemplary system according to some embodiments;

[0042] Fig.13 is a block diagram of a more specific second exemplary system according to some embodiments;

[0043] Fig.14 is a block diagram of a system on a chip (SoC) according to some embodiments; and

[0044] Fig.15 is a block diagram comparing the use of a software instruction converter to convert binary instructions in a source instruction set to binary instructions in a target instruction set, according to some embodiments. DETAILED DESCRIPTION

[0045] In the following description, numerous specific details are set forth. However, it should be understood that some embodiments may be implemented without these specific details. In other instances, well-known circuits, structures, and techniques are not shown in detail to avoid obscuring the understanding of this description.

[0046] References in the specification to "one embodiment," "an embodiment," "an example embodiment," etc. indicate that the described embodiment may include a feature, structure, or characteristic, but every embodiment may not necessarily include the feature, structure, or characteristic. Furthermore, such phrases do not necessarily refer to the same embodiment. Furthermore, when a feature, structure, or characteristic is described with respect to an embodiment, it is considered to be within the knowledge of those skilled in the art to affect such feature, structure, or characteristic with respect to other embodiments if explicitly described.

[0047] As mentioned above, an n-tuple is N ordered sets, each set having M integers. As used herein, an n-tuple vector can be represented in memory by a vector comprising N groups of elements, each group having M elements. The N groups of elements can interleave the elements of the n-tuple vector or separate them according to the group of elements. Disclosed herein is an instruction family that transforms from a separated format to an interleaved format, which is required for machine learning and training applications in several stages of the back propagation process. Therefore, machine learning and training applications are sensitive to the performance of transposition and benefit from the disclosed instructions.

[0048] Although transposition can be implemented using existing vector instructions, doing so is typically slow, often results in large code size, and frequently requires complex software tuning.

[0049] Thus, systems and methods can take advantage of the embodiments disclosed herein, which describe a shuffle network that permutes vector data received from a memory before placing the permuted vector data into a vector register file. In some embodiments, the shuffle network is used to broadcast portions of the permuted vector across the entire width of the destination vector register. Furthermore, by placing the shuffle network between the memory read port and the register file, the disclosed embodiments implement "on-the-fly" transformations, thereby processing instructions at a rate of one instruction per cycle, and allowing applications to benefit from transformations essentially "at no cost" without incurring any additional latency or performance loss.

[0050] Figure 1A 1 is a block diagram illustrating processing components for executing load permute or load permute and broadcast instructions according to some embodiments. As shown, system 100 includes storage 101 to store (multiple) load permute with possible broadcast (LPPB) instructions 103 to be executed. In some embodiments, computing system 100 is a SIMD processor for concurrently processing multiple elements of a packed data vector such as a matrix.

[0051] In operation, load-permute-possibly-with-broadcast (LPPB) instruction(s) 103 are fetched from storage 101 by fetch circuitry 105. The fetched load-permute-possibly-with-broadcast (LPPB) instruction 107 is decoded by decode circuitry 109. Figure 4A-4B , Figure 5A-5B and Figures 6A-6DThe load-permute (LPPB) instruction format that may have broadcasting further shown and described has fields (not shown here) for specifying an opcode, a destination vector register, and a memory location of a source vector having N groups of elements, N being a positive integer. The opcode is used to instruct the processor to fetch the source vector, generate write data including one or more N-tuples, each N-tuple including a corresponding element from each of the N groups of elements, and write the generated write data to the destination vector register.

[0052] In some embodiments, the decoding includes generating a plurality of micro-operations to be executed by an execution circuit, such as execution circuit 117. Decoding circuit 109 also decodes instruction suffixes and prefixes, if used. In some embodiments, execution circuit 117 includes shuffle circuit 118, which may be included external to execution circuit 117 or incorporated into execution circuit 117, to the extent that shuffle circuit 118 is optional.

[0053] In some embodiments, register renaming, register allocation and / or scheduling circuitry 113 provides functionality for one or more of: 1) renaming logical operand values ​​to physical operand values ​​(e.g., a register alias table in some embodiments); 2) assigning status bits and flags to decoded instructions; and 3) (e.g., using a reservation station in some embodiments) scheduling decoded load-permute-possibly-with-broadcast (LPPB) instructions 111 for execution on execution circuitry 117 outside of an instruction pool).

[0054] Computing system 100 further includes a register file and memory 115 coupled to register renaming / register allocation / scheduling circuitry 113 , execution circuitry 117 , shuffle circuitry 118 , and write-back circuitry 119 .

[0055] Register renaming / register allocation / scheduling circuitry 113 and write-back circuitry 119 represent operations that may occur at different times or may not occur at all, to the extent that they are optional, as indicated by their dashed boundaries. Shuffle circuitry 118 is also shown with a dashed boundary, indicating that it may be implemented external to execution circuitry 117, or incorporated into the data path and control circuitry of execution circuitry 117.

[0056] At least relative to Figure 1B , Figure 2A-2I , Figure 3 , Figures 8A-8B and Figures 9A-9B Execution circuitry 117 is further described and illustrated.

[0057] Figure 1B1 is a block diagram illustrating the execution of a load-permute (LPPB) instruction that may have broadcast according to an embodiment. As shown, the LPPB instruction 150A includes fields for specifying an opcode ("LPPB*"), a destination vector register, and a memory location of a source vector including N groups of elements, N being a positive integer, the opcode being used to instruct the processor to: fetch the source vector, generate write data including one or more N-tuples, each N-tuple including a corresponding element from each of the N groups of elements, and write the generated write data to the destination vector register.

[0058] LPPB instruction 150A is to be executed by system 150 , which includes source 151 (in memory), destination 154 (in a vector register of a register file), and execution circuitry 152 , which includes shuffle circuitry 153 .

[0059] The opcode mnemonics herein include an asterisk (*), which is used to indicate that the opcode may include various optional modifiers that may otherwise be specified as instruction fields, wherein the various optional modifiers include source vector length, source data format, number of groups N, number of elements per group M, a multi-bit mask {k}, each bit of which is used to control whether modification of the corresponding destination vector element is allowed, or whether the corresponding element will be masked. The instruction may also optionally specify a {z} parameter to control whether masked destination vector elements will be zeroed or merged. LPPB instruction throughput of 1 cycle per instruction

[0060] Figure 2A 2 is a block diagram illustrating a shuffle pipeline having a throughput of one instruction per cycle according to an embodiment. As shown, a shuffle circuit 200 including a shuffle pipeline 201 (an expanded version of which is also shown in FIG. Figure 2A ) is used to receive packed vector data including N groups, each group having M elements from the memory 202. For example, the memory 202 can be a first-level data cache with a read port for outputting a cache line, which in some embodiments consists of 64 bytes of data.

[0061] In operation, the shuffle circuit 200 is used to generate write data by permuting one or more N-tuples and possibly broadcasting them to a destination vector. Depending on the execution capabilities of the execution circuitry, such operations may occur in one clock cycle. However, in some embodiments, the shuffle circuitry takes several cycles to perform those operations, and performs those operations using a shuffle pipeline 201 placed between the memory 202 and the register file 204 to allow a new instruction to be received each cycle. As shown, the shuffle pipeline 201 includes a first stage 201A for reading a vector containing N groups of elements from a memory (e.g., from a read port of a data cache). The shuffle pipeline 201 determines the element size and vector length at the next two stages 201B and 201C shown. Such determinations can be made in any of several ways, including: as an instruction field, or as an opcode prefix / suffix indicating those dimensions, such as relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D As shown and described. The element size and vector length may also be indicated by something other than the instruction itself; for example, software may program model-specific registers (MSRs) to indicate those dimensions, or those dimensions may even take architectural defaults. Permutations and broadcasts are performed at the next stages 201D and 201E. Finally, as shown, the shuffle pipeline writes the generated write data to the destination vector register at stage 201F.

[0062] In some embodiments, the shuffle pipeline 201 is intentionally placed between the memory read port and the register file 204. That way, the shuffle network can intercept incoming vector data from memory and perform its permute and broadcast operations "on the fly" before writing the generated write data to the destination vector register. In some embodiments, the shuffle pipeline 201 takes multiple cycles to perform its permute and broadcast functions, but the execution of those instructions is pipelined through the execution pipeline that enables new LPPB instructions to be received, decoded, and executed every cycle.

[0063] It should be noted that the shuffle pipeline stages 201A-201F are shown with dashed borders to emphasize their optional nature. Each of the pipeline stages 201A-201F can be combined with other stages. The disclosed embodiments do not place any requirements or restrictions on the length of the shuffle pipeline, as long as the shuffle pipeline can achieve and maintain a throughput of one instruction per cycle.

[0064] The one-cycle throughput or one instruction per cycle execution rate provides improved performance relative to processors that lack the disclosed embodiments and must instead perform the permute and broadcast functionality as separate instructions. Given the supported one instruction per clock cycle throughput, the disclosed embodiments provide the permute and broadcast functionality essentially "for free," beneficially providing the functionality without incurring any performance penalty or additional code size.

[0065] Figure 2B 205A includes fields for specifying an opcode (such as LPPBWN2M16W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer.

[0066] Here, the opcode is used to instruct the processor to fetch a source vector, generate write data including one or more N-tuples, each N-tuple including corresponding elements from each of the N groups of elements, and write the generated write data to the destination vector register. Instruction 205A is to be executed by system 205, which includes source 206, destination vector register 209, and execution circuit 207, which includes shuffle network 208.

[0067] Here, the opcode mnemonic (LPPBWN2M16W512) includes a suffix for indicating the instruction behavior. "LPPBW" indicates that the processor is used to perform a permutation of 16 ("M16") elements of each of the 2 groups ("N2") of source elements to the corresponding destination vector register 209 without any broadcast. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. Therefore, the source 206 is shown as including two groups of elements A and B, each of which contains 16 elements. "W512" indicates that the destination vector register has 512 bits, which can hold N x M elements (N = 2x M = 16x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, and 1024 bits. In other embodiments, the elements can have any of a variety of different sizes, including any of 2 bits, 4 bits, 8 bits, 32 bits, 64 bits, and 128 bits.

[0068] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load-permute-with-broadcast (LPPB) instruction 205A is further illustrated and described.

[0069] At least relative to Figure 1, Figure 2A , Figure 2C-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 205 and execution circuit 207 are further shown and described.

[0070] Figure 2C 2 is a block diagram illustrating the execution of a load permute (LPPB) instruction with possible broadcast according to an embodiment. As shown, a load permute (LPPB) instruction with possible broadcast 210A includes a field for specifying an opcode (such as LPPBBN4M8W256), a destination vector register, and a memory location of a source vector including N groups of elements, N being a positive integer. Here, the opcode instructs the processor to fetch the source vector, generate write data including one or more N tuples, each N tuple including corresponding elements from each group of the N groups of elements, and write the generated write data to the destination vector register. Here, broadcasting is not required because M=32 N tuples will be generated. The opcode further instructs the processor to generate M tuples and write the M tuples to corresponding elements of the destination vector register, each of the M tuples being used to include N corresponding elements of the N groups of elements. Instruction 210A is to be executed by system 210, which includes source 211, execution circuit 212, and destination vector register 214, and execution circuit 212 includes shuffle network 213.

[0071] Here, the opcode mnemonic (LPPBBN4M8W256) includes a suffix for indicating the behavior of the instruction. "LPPBB" without the "cast" modifier indicates that the processor is used to perform a permutation of each of the M=8 elements of each group of N=4 groups of elements to the corresponding destination vector register 214 but without broadcasting. "B" indicates that the elements of the source vector are 8-bit elements. Therefore, the source 211 is shown as including four groups of elements A, B, C and D, each of which contains 8 elements. "W256" indicates that the destination vector register has 256 bits (N=4x M=8x 8 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 512 bits and 1024 bits. In other embodiments, the element can have any of a variety of different sizes, including any of 2 bits, 4 bits, 16 bits, 32 bits, 64 bits and 128 bits.

[0072] In operation, execution circuitry 212 including shuffle network 213 is used to execute multiple instances of LPPB instruction 210A at a rate of one instruction per cycle.

[0073] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 210A is further illustrated and described.

[0074] At least relative to Figure 1, Figure 2A-2B , Figure 2D-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 210 and execution circuit 212 are further shown and described.

[0075] Figure 2D 215A includes a field for specifying an opcode (such as LPPBBN2M32W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer. The opcode instructs the processor to fetch the source vector, generate write data including one or more N tuples, each N tuple including corresponding elements from each group of the N groups of elements, and write the generated write data to the destination vector register. Here, broadcasting is not required because M=32 N tuples will be generated. Here, the opcode further instructs the processor to generate M tuples and write the M tuples to corresponding elements of the destination register, each of the M tuples being used to include N corresponding elements of the N groups of elements. Instruction 215A is to be executed by system 215, which includes source 216, execution circuit 217, and destination vector register 219, and execution circuit 217 includes shuffle network 218.

[0076] Here, the opcode mnemonic (LPPBBN2M32W512) includes a suffix for indicating the instruction behavior. "LPPB" without the "cast" modifier indicates that the processor is used to perform a permutation of each of the M=32 elements of each group of 2 ("N2") groups of elements to the corresponding destination vector register 219 but without broadcasting. "B" indicates that the elements of the source vector are 8-bit elements. Therefore, the source 216 is shown as including two groups of elements A and B, each of which contains 32 elements. "W512" indicates that the destination vector register has 512 bits (N=2x M=32x 8 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, and 1024 bits. In other embodiments, the element can have any of a variety of different sizes, including any of 2 bits, 4 bits, 16 bits, 32 bits, 64 bits, and 128 bits.

[0077] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 215A is further illustrated and described.

[0078] At least relative to Figure 1, Figures 2A-2C , Figure 2E-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 215 and execution circuit 217 are further shown and described.

[0079] Figure 2E 2 is a block diagram illustrating the execution of a load broadcast instruction according to an embodiment. As shown, a load permute (LPPB) instruction 220A with possible broadcasting includes a field for specifying an opcode (such as LPPBCastW7N2M16W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer. The opcode (LPPBCastW7N2M16W512) is used to instruct the processor to fetch a source vector, generate write data including one or more N tuples, each N tuple including corresponding elements from each group of the N groups of elements, and write the generated write data to the destination vector register. Here, the opcode further indicates that the generated write data is used to include a single tuple generated based on the selected element ("W7") of the N source vectors, and the generated single tuple will be broadcast to the entire width of the destination vector register. Instruction 220A will be executed by system 220, which includes source 221, a specified index 222 (here set to 7), a destination vector register 224, and execution circuit 223.

[0080] Here, the opcode mnemonic (LPPBCastW7N2M16W512) includes a suffix to indicate the instruction behavior. "LPPBCastW7" instructs the processor to perform a permutation of element 7 of each of 2 ("N2") groups of 16 ("M16") elements and broadcast to the corresponding destination vector register 224. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. Therefore, the source 221 is shown as including two groups of elements A and B, each of which contains 16 elements. "W512" indicates that the destination vector register has 512 bits, which can hold N x M elements (N = 2x M = 16x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, and 1024 bits. In other embodiments, the elements can have any of a variety of different sizes, including any of 2 bits, 4 bits, 8 bits, 32 bits, 64 bits, and 128 bits.

[0081] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 220A is further illustrated and described.

[0082] At least relative to Figure 1, Figures 2A-2D , Figure 2F-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 220 and execution circuit 223 are further shown and described.

[0083] Figure 2F 225A includes a field for specifying an opcode (such as LPPBDualCastWN2M16W512), a destination vector register, a memory location of a source vector including N groups of elements, and an index to be broadcast (set to 7), where N is a positive integer. Here, the opcode instructs the processor to fetch the source vector, then generate two N-tuples corresponding to two of the M elements of the source vector and broadcast the two N-tuples to the entire width of the destination vector register 229. Instruction 225A will be executed by system 225, which includes source 226, a specified index 227, a destination vector register 229, and execution circuit 228.

[0084] Here, the opcode mnemonic (LPPBDualCastWN2M16W512) includes a suffix for indicating the instruction behavior. "LPPBDualCast" indicates that the processor is used to perform a permutation of 2 selected elements of each group of 2 ("N2") groups of elements and broadcast to the corresponding destination vector register 229. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. Therefore, the source 226 is shown as including two groups of elements A and B, each of which contains 16 elements. "W512" indicates that the destination vector register has 512 bits (N=2x M=16x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits and 1024 bits. In other embodiments, the element can have any of a variety of different sizes, including any of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits and 128 bits.

[0085] At least for reference Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 225A is further illustrated and described.

[0086] At least relative to Figure 1, Figure 2A-2E , Figure 2G-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 225 and execution circuit 228 are further shown and described.

[0087] Figure 2G 2 is a block diagram illustrating the execution of a load broadcast instruction according to an embodiment. As shown, a load permute (LPPB) instruction 230A with possible broadcasting includes a field for specifying an opcode (such as LPPBCastWN2M16W512), a destination vector register, a memory location of a source vector including N groups of elements, and an index (=7) to be broadcast, where N is a positive integer. Here, the opcode is used to instruct the processor to fetch a source vector, generate write data including one or more N-tuples, each N-tuple including corresponding elements from each group of the N groups of elements, and write the generated write data to a destination vector register. Instruction 230A will be executed by system 230, which includes source 231, a specified index 232 to be selected (here set to 8), a destination vector register 234, and execution circuit 233.

[0088] Here, the opcode mnemonic (LPPBCastWN2M16W512) includes a suffix for indicating the instruction behavior. "LPPBCast" indicates that the processor is used to perform a permutation of element 7 (as specified by the "Index to Broadcast" field) of each of the 2 ("N2") groups of elements and broadcast to the corresponding destination vector register 234. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. Therefore, the source 231 is shown as including two groups of elements A and B, each of which contains 16 elements. "W512" indicates that the destination vector register has 512 bits (N=2x M=16x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, and 1024 bits. In other embodiments, the elements can have any of a variety of different sizes, including any of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, and 128 bits.

[0089] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 230A is further illustrated and described.

[0090] At least relative to Figure 1, Figures 2A-2F , Figures 2H-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 230 and execution circuit 233 are further shown and described.

[0091] Figure 2H235A includes a field for specifying an opcode (such as LPPBCastWAllN2M16W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer. The opcode is used to instruct the processor to fetch a source vector, generate write data including one or more N-tuples, each N-tuple including a corresponding element from each group of the N groups of elements, and write the generated write data to a destination vector register, and to be executed by a system 235, which includes a source 236, a destination vector register 239A-D, and an execution circuit 237, which includes a shuffle network 238.

[0092] Here, the opcode mnemonic (LPPBCastWAllN2M16W512) includes a suffix for indicating the instruction behavior. "LPPBCastAll" indicates that the processor is used to perform a permutation of all elements of each of the 2 ("N2") groups of elements and broadcast to the corresponding destination vector registers 239A-D. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. Therefore, the source 236 is shown as including four groups of elements A, B, C and D, each of which contains 8 elements. "W512" indicates that the destination vector register has 512 bits (N=4x M=8x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits and 1024 bits. In other embodiments, the element can have any of a variety of different sizes, including any of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits and 128 bits.

[0093] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 235A is further illustrated and described.

[0094] At least relative to Figure 1, Figure 2A-2G , Figures 2I-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 235 and execution circuit 237 are further shown and described.

[0095] Fig.2I240A includes a field for specifying an opcode (such as LPPBCastW5N4M8W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer. The opcode is used to instruct the processor to fetch a source vector, generate write data including one or more N-tuples, each N-tuple including corresponding elements from each group of the N groups of elements, and write the generated write data to a destination vector register, and to be executed by a system 240, which includes a source 241, a specified index 242 (here set to 5), a destination 244, and an execution circuit 243.

[0096] Here, the opcode mnemonic (LPPBCastW5N4M8W512) includes a suffix for indicating the instruction behavior. "LPPBCast" indicates that the processor is used to perform a permutation and broadcast of element 5 (specified by "W5") of the source vector. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. "N4" indicates that the source vector includes N=4 groups, each of which has M=8 elements. Therefore, the source 241 is shown as including four groups of elements A, B, C and D, each of which contains 8 elements. "W512" indicates that the destination vector register has 512 bits (N=4x M=8x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 246 bits, 512 bits and 1024 bits. In other embodiments, the element can have any of a variety of different sizes, including one of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits and 128 bits.

[0097] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 240A is further illustrated and described.

[0098] At least relative to Figure 1, Figures 2A-2H , Figures 2J-2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 240 and execution circuit 243 are further shown and described.

[0099] Figure 2J245A includes a field for specifying an opcode (such as LPPBCastWN4M8W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer. The opcode is used to instruct the processor to fetch a source vector, generate write data including one or more N tuples, each N tuple including corresponding elements from each group of the N groups of elements, and write the generated write data to a destination vector register, and to be executed by a system 245, which includes a source 246, a destination 249, and an execution circuit 248, and a specified index 247 (which is 5) to be broadcast.

[0100] Here, the opcode mnemonic (LPPBCastWN4M8W512) includes a suffix for indicating the instruction behavior. "LPPBCast" indicates that the processor is used to perform a permutation and broadcast of element 5 (the index to be broadcast) of 8 ("M8") elements in each of 4 ("N4") groups of elements. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. Therefore, the source 246 is shown as including four groups of elements A, B, C and D, each of which contains 8 elements. "W512" indicates that the destination vector register has 512 bits (N=4x M=8x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits and 1024 bits. In other embodiments, the element can have any of a variety of different sizes, including any of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits and 128 bits.

[0101] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 245A is further illustrated and described.

[0102] At least relative to Figure 1, Figure 2A-2I , Figure 2K , Figure 3 , Figures 8A-8B and Figures 9A-9B System 245 and execution circuit 247 are further shown and described.

[0103] Figure 2K250A includes a field for specifying an opcode (such as LPPBCastWAllN4M8W512), a destination vector register, and a memory location of a source vector including N groups of elements, where N is a positive integer. The opcode is used to instruct the processor to fetch a source vector, generate write data including one or more N-tuples, each N-tuple including a corresponding element from each of the N groups of elements, and write the generated write data to a destination vector register, and to be executed by a system 250, which includes a source 251, a destination 254, and an execution circuit 252, which includes a shuffle network 253.

[0104] Here, the opcode mnemonic (LPPBCastWAllN4M8W512) includes a suffix for indicating the instruction behavior. "LPPBCastAll" indicates that the processor is used to perform a permutation and broadcast of all elements of the source vector. "W" indicates that the elements of the source vector are 16-bit or word-sized elements. "N4" indicates that the source vector includes N=4 groups, each of which has "M8" elements. Therefore, the source 251 is shown as including four groups of elements A, B, C and D, each of which contains 8 elements. "W512" indicates that the destination vector register has 512 bits (N=4x M=8x 16 bits). In other embodiments, the width of the destination vector register can be specified as one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits and 1024 bits. In other embodiments, the element can have any one of various sizes, including one of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits and 128 bits.

[0105] At least relative to Figure 4A-4B , Figure 5A-5B and Figures 6A-6D The format of a load permute with broadcast (LPPB) instruction 250A is further illustrated and described.

[0106] At least relative to Figure 1, Figures 2A-2J , Figure 3 , Figures 8A-8B and Figures 9A-9B System 250 and execution circuit 252 are further shown and described.

[0107] Figure 3 3 is a flow chart illustrating a processor's response to a load-permute-possible-with-broadcast (LPPB) instruction according to an embodiment. As shown, flow 300 is to be executed by a processor in response to a load-permute-possible-with-broadcast (LPPB) instruction 310, which includes fields for specifying an opcode (such as LPPB), a destination vector register, and a source vector location.

[0108] At operation 301, the processor is used to fetch instructions using fetch circuitry. At operation 303, the processor is used to decode the fetched instruction using a decode circuitry, the fetched instruction having a field for specifying an opcode, a destination vector register, and a memory location of a source vector including N groups of elements, N being a positive integer, the opcode being used to instruct the processor to: read the source vector using a memory interface; generate write data including one or more N-tuples, each N-tuple including a corresponding element from each of the N groups of elements; and write the generated write data to the destination vector register. In some embodiments, at operation 305, the processor is used to schedule the execution of the decoded instruction. At operation 307, the processor is used to execute the decoded instruction according to the opcode using an execution circuitry, the execution circuitry having a shuffle pipeline placed between a memory and a register file, for fetching, decoding, and executing further instances of instructions at a rate of one instruction per clock cycle. With respect to Figure 2A An example of such a shuffle pipeline is illustrated and described. In some embodiments, at operation 309, the processor is used to submit the results of the executed instructions. Operations 305 and 309 may each occur at different times or may not occur at all, to the extent that they are optional, as indicated by their dashed boundaries.

[0109] Figure 4A 404 (a vector register in a register file). Figure 2B-2D The processor behavior shown is similar to the processor behavior.

[0110] LPPB instruction 400 includes several optional behavior modifiers, as indicated by its dashed border. These behavior modifiers include: source vector width 408 (i.e., one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits, 1024 bits, etc.); source element size 410 (i.e., 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, 128 bits, etc.); number of tuples N 412 (e.g., 1, 2, 4, 8 or more); and number of elements per tuple M 414.

[0111] The LPPB instruction 400 may further include a field for specifying a multi-bit mask {k} 416, where each bit is used to control whether modification of the corresponding destination vector element is allowed or whether the corresponding element will be masked. The instruction may also optionally specify a {z} 418 parameter to control whether masked destination vector elements will be zeroed or merged.

[0112] The mnemonic for opcode 402 is shown to include an asterisk (*) to indicate that the opcode may include various optional modifiers as prefixes or suffixes that may otherwise be specified as one or more of instruction fields 408, 410, 412, 414, 416, and 418.

[0113] It should be noted that any one or more of optional instruction fields 408, 410, 412, 414, 416 and 418 may take a default value if unspecified, or may be programmed by software prior to issuing an instruction, such as by programming an architecture model specific register (MSR).

[0114] Relative to Figure 4B , Figure 5A-5B and Figures 6A-6D The format of the LPPB instruction 400 is further shown and described.

[0115] Figure 4B is a block diagram illustrating the format of a load permute instruction that may have broadcasting according to an embodiment. Figure 4A and Figure 4B One difference between the Figure 2E-2K The execution flow illustrated and described is similar, with the latter instruction calling for broadcasting to the destination vector. As shown, the LPPB instruction 450 includes fields for specifying an opcode 452 (e.g., represented by the mnemonic LPPBCast*) and the locations of a source 456 vector and a destination 454 vector. In the context of the instruction, the source vector is used to include N groups of elements, N being a positive integer, and the opcode 452 is used to instruct the processor to: fetch the source vector from a source location 456 (such as a memory location); generate write data including one or more N-tuples, each N-tuple including corresponding elements from each of the N groups of elements; and write the generated write data to a destination vector location 454 (such as a vector register in a register file).

[0116] LPPB instruction 450 includes several optional behavior modifiers, as indicated by its dashed border. These behavior modifiers include an index 457 for projection (i.e., the group index to be broadcast to the destination, as shown, for example, in Figure 2E , Figure 2F and Figure 2G), source vector width 458 (i.e., one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits, or more), source element size 460 (i.e., 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, 128 bits, etc.), number of tuples N 462 (e.g., 1, 2, 4, 8, or more), and number of elements per tuple M 464.

[0117] The LPPB instruction 450 may further include a field for specifying a multi-bit mask {k} 466, where each bit is used to control whether modification of the corresponding destination vector element is allowed or whether the corresponding element will be masked. The instruction may also optionally specify a {z} 468 parameter to control whether masked destination vector elements will be zeroed or merged.

[0118] Opcode 452 is shown including an asterisk (*) to indicate that the opcode may include various optional modifiers as prefixes or suffixes that may otherwise be specified as one or more of instruction fields 457 , 458 , 460 , 462 , 464 , 466 , and 468 .

[0119] It should be noted that any one or more of the optional instruction fields 457, 458, 460, 462, 464, 466 and 468 may take a default value if not specified, or may be programmed by software prior to issuing the instruction, for example by programming an architecture model specific register (MSR).

[0120] refer to Figure 4B , Figure 5A-5B and Figures 6A-6D The format of the LPPB instruction 400 is further shown and described. Instruction Set

[0121] An instruction set may include one or more instruction formats. A given instruction format may define various fields (e.g., the number of bits, the position of the bits) to specify the operation to be performed (e.g., an opcode) and the operands and / or other data fields (e.g., a mask) on which the operation will be performed, etc. Some instruction formats are further decomposed by the definition of instruction templates (or sub-formats). For example, an instruction template for a given instruction format may be defined as having different subsets of the fields of the instruction format (the included fields are usually in the same order, but at least some fields have different bit positions because fewer fields are included), and / or defined as having a given field interpreted in a different manner. Thus, each instruction of the ISA is expressed using a given instruction format (and, if defined, according to a given one of the instruction templates of the instruction format), and includes fields for specifying operations and operands. For example, an exemplary ADD (addition) instruction has a specific opcode and instruction format, the specific instruction format including an opcode field for specifying the opcode and an operand field for selecting operands (source 1 / destination and source 2); and the ADD instruction appears in an instruction stream with specific contents in the operand field for selecting a specific operand. A set of SIMD extensions known as Advanced Vector Extensions (AVX) (AVX1 and AVX2) and utilizing a vector extension (VEX) encoding scheme have been introduced and / or released (see, e.g., Intel 3600, September 2014). 64 and IA-32 Architectures Software Developer's Manual; and see the October 2014 Intel Advanced Vector Extensions Programming Reference). Example instruction format

[0122] Embodiments of the (multiple) instructions described herein can be embodied in different formats. In addition, exemplary systems, architectures, and pipelines are described in detail below. Embodiments of the (multiple) instructions can be executed on such systems, architectures, and pipelines, but are not limited to those systems, architectures, and pipelines described in detail. Generic vector friendly instruction format

[0123] The vector friendly instruction format is an instruction format suitable for vector instructions (e.g., there are specific fields dedicated to vector operations). Although embodiments are described in which both vector and scalar operations are supported through the vector friendly instruction format, alternative embodiments only use vector operations through the vector friendly instruction format.

[0124] Figure 5A-Figure 5B is a block diagram illustrating a generic vector friendly instruction format and instruction templates thereof according to some embodiments of the present invention. Figure 5A is a block diagram illustrating a generic vector friendly instruction format and its class A instruction template according to some embodiments of the present invention; and Figure 5B is a block diagram illustrating a generic vector friendly instruction format and its class B instruction templates according to some embodiments of the present invention. Specifically, class A and class B instruction templates are defined for the generic vector friendly instruction format 500, both of which include instruction templates with no memory access 505 and instruction templates with memory access 520. The term "generic" in the context of the vector friendly instruction format refers to an instruction format that is not bound to any particular instruction set.

[0125] Although embodiments of the present invention will be described in which the vector friendly instruction format supports: 64-byte vector operand length (or size) with 32-bit (4-byte) or 64-bit (8-byte) data element width (or size) (and thus, a 64-byte vector consists of 16 doubleword-sized elements, or alternatively, 8 quadword-sized elements); 64-byte vector operand length (or size) with 16-bit (2-byte) or 8-bit (1-byte) data element width (or size); 32-byte vector operand length (or size) with 32-bit (4-byte) or 64-bit (8-byte) data element width (or size); byte), 64-bit (8-byte), 16-bit (2-byte), or 8-bit (1-byte) data element width (or size); and 16-byte vector operand length (or size) with 32-bit (4-byte), 64-bit (8-byte), 16-bit (2-byte), or 8-bit (1-byte) data element width (or size); however, alternative embodiments may support larger, smaller, and / or different vector operand sizes (e.g., 256-byte vector operands) with larger, smaller, or different data element widths (e.g., 128-bit (16-byte) data element width).

[0126] Figure 5A The class A instruction templates include: 1) within the instruction templates without memory access 505, there are shown instruction templates for full rounding control type operations 510 without memory access and instruction templates for data transformation type operations 515 without memory access; and 2) within the instruction templates with memory access 520, there are shown instruction templates for timeliness of memory access 525 and instruction templates for non-timeliness of memory access 530. Figure 5B The Class B instruction templates include: 1) within the instruction template without memory access 505, an instruction template for a partial rounding control type operation 512 with write mask control without memory access and an instruction template for a vsize type operation 517 with write mask control without memory access are shown; and 2) within the instruction template with memory access 520, an instruction template for a write mask control 527 with memory access is shown.

[0127] The generic vector friendly instruction format 500 includes the following listed in accordance with Figure 5A-5B The following fields are in the order shown in the figure.

[0128] Format field 540 - The specific value in this field (the instruction format identifier value) uniquely identifies the vector friendly instruction format, and thereby identifies that the instruction appears in the vector friendly instruction format in the instruction stream. Thus, this field is optional in the sense that it is not required for instruction sets that only have a generic vector friendly instruction format.

[0129] Basic operation field 542 - its content distinguishes different basic operations.

[0130] Register index field 544 - its content specifies the location of the source or destination operand in a register or in memory, either directly or through address generation. These fields include a sufficient number of bits to select N registers from a PxQ (e.g., 32x512, 16x128, 32x1024, 64x1024) register file. Although in one embodiment N may be up to three source registers and one destination register, alternative embodiments may support more or fewer source and destination registers (e.g., may support up to two sources, one of which is also used as a destination; may support up to three sources, one of which is also used as a destination; may support up to two sources and one destination).

[0131] Modifier field 546 - its content distinguishes instructions appearing in the generic vector instruction format that specify memory access from instructions appearing in the generic vector instruction format that do not specify memory access; i.e., distinguishes between instruction templates for no memory access 505 and instruction templates for memory access 520. Memory access operations read and / or write to the memory hierarchy (in some cases, using values ​​in registers to specify source and / or destination addresses), while non-memory access operations do not (e.g., the source and destination are registers). Although in one embodiment, this field also selects between three different ways to perform memory address calculations, alternative embodiments may support more, fewer, or different ways to perform memory address calculations.

[0132] Extended operation field 550 - its content distinguishes which of various different operations are to be performed in addition to the basic operation. This field is context specific. In some embodiments, this field is divided into a class field 568, an alpha field 552, and a beta field 554. The extended operation field 550 allows multiple common groups of operations to be performed in a single instruction instead of 2, 3, or 4 instructions.

[0133] Scale field 560 - its content allows for memory address generation (e.g., for use with (2 比例 *The address generated by (index + base address) is scaled proportionally to the contents of the index field.

[0134] Displacement field 562A - its contents are used as part of memory address generation (e.g., for use with (2 比例 *address generation of (index+base+displacement)).

[0135] Displacement Factor field 562B (note that the juxtaposition of displacement field 562A directly over displacement factor field 562B indicates that one or the other is used) - its contents are used as part of address generation; it specifies the displacement factor by which the size (N) of the memory access will be scaled - where N is the number of bytes in the memory access (e.g., for use with (2 比例 * index + base address + scaled displacement). Redundant low-order bits are ignored, and therefore the contents of the displacement factor field are multiplied by the total size of the memory operand (N) to generate the final displacement to be used in calculating the effective address. The value of N is determined by the processor hardware at runtime based on the full opcode field 574 (described later in this document) and the data manipulation field 554C. The displacement field 562A and the displacement factor field 562B are optional in the sense that they are not used for instruction templates without memory access 505 and / or different embodiments may implement only one of the two or neither of the two.

[0136] Data element width field 564 - its contents distinguish which of multiple data element widths will be used (in some embodiments for all instructions; in other embodiments for only some of the instructions). This field is optional in the sense that it is not required if only one data element width is supported and / or some aspect of the opcode is used to support the data element width.

[0137] Write mask field 570 - its content controls, on a data element position by data element position basis, whether the data element position in the destination vector operand reflects the results of the base and augmented operations. Class A instruction templates support merge-write masking, while class B instruction templates support both merge-write masking and zeroing-write masking. When merged, the vector mask allows any set of elements in the destination to be protected from update during the execution of any operation (specified by the base and augmented operations); in another embodiment, the old value of each element of the destination where the corresponding mask bit has a 0 is maintained. Conversely, when zeroed, the vector mask allows any set of elements in the destination to be zeroed during the execution of any operation (specified by the base and augmented operations); in one embodiment, the elements of the destination are set to 0 when the corresponding mask bit has a 0 value. A subset of this functionality is the ability to control the vector length of the operation being performed (i.e., the span from the first to the last element being modified), however, the elements being modified do not have to be consecutive. Thus, the write mask field 570 allows partial vector operations, which include loads, stores, arithmetic, logic, etc. Although embodiments of the present invention are described in which the contents of write mask field 570 select one of multiple write mask registers that contains a write mask to be used (and thereby, the contents of write mask field 570 indirectly identify the mask to be performed), alternative embodiments alternatively or additionally allow the contents of mask write field 570 to directly specify the mask to be performed.

[0138] Immediate field 572 - its contents allow specification of an immediate value. This field is optional in the sense that it is not present in implementations of the generic vector friendly format that do not support immediate values ​​and is not present in instructions that do not use immediate values.

[0139] Class field 568 - its content distinguishes between instructions of different classes. Figure 5A-Figure 5B , the contents of this field select between class A and class B instructions. Figure 5A-Figure 5B In , rounded squares are used to indicate that a specific value exists in a field (for example, in Figure 5A-Figure 5B 568A and B respectively for class field 568). Class A instruction template

[0140] In the case of the class A non-memory access 505 instruction templates, the alpha field 552 is interpreted as an RS field 552A whose content distinguishes which of the different extended operation types is to be performed (e.g., the instruction templates for the no-memory access rounding type operation 510 and the no-memory access data transformation type operation 515 specify rounding 552A.1 and data transformation 552A.2, respectively), while the beta field 554 distinguishes which of the specified types of operations is to be performed. In the no-memory access 505 instruction templates, the scale field 560, the displacement field 562A, and the displacement scale field 562B are not present. Instruction templates without memory access - full rounding control type operations

[0141] In the instruction templates of the full rounding control type operation 510 without memory access, the beta field 554 is interpreted as a rounding control field 554A that provides static rounding for its contents (multiple). Although in the described embodiment of the invention the rounding control field 554A includes a suppress all floating point exceptions (SAE) field 556 and a rounding operation control field 558, alternative embodiments may support both concepts, may encode both concepts into the same field, or may have only one or the other of these concepts / fields (e.g., may have only the rounding operation control field 558).

[0142] SAE field 556 - its content distinguishes whether exception event reporting is disabled; when the content of SAE field 556 indicates that suppression is enabled, the given instruction does not report any kind of floating point exception flags and does not invoke any floating point exception handler.

[0143] Round operation control field 558 - its content distinguishes which of a set of rounding operations is to be performed (e.g., round up, round down, round toward zero, and round to nearest). Thus, the round operation control field 558 allows the rounding mode to be changed on an instruction-by-instruction basis. In some embodiments where the processor includes a control register for specifying the rounding mode, the content of the round operation control field 550 overrides the register value. Instruction templates without memory access - data transformation operations

[0144] In instruction templates for data transform type operations 515 without memory access, the beta field 554 is interpreted as a data transform field 554B, the contents of which distinguish which of a plurality of data transforms is to be performed (eg, no data transform, blend, broadcast).

[0145] In the case of an instruction template of type A memory access 520, the alpha field 552 is interpreted as an eviction hint field 552B, the content of which distinguishes which of the eviction hints is to be used (in Figure 5A, the instruction templates for memory access temporal 525 and memory access non-temporal 530 specify temporal 552B.1 and non-temporal 552B.2, respectively, and the β field 554 is interpreted as a data manipulation field 554C, the content of which distinguishes which of a plurality of data manipulation operations (also referred to as primitives) is to be performed (e.g., no manipulation, broadcast, up-conversion of the source, and down-conversion of the destination). The instruction template for memory access 520 includes a scale field 560, and optionally includes a displacement field 562A or a displacement scale field 562B.

[0146] Vector memory instructions use the conversion support to perform vector loads from memory and vector stores to memory. As with normal vector instructions, vector memory instructions transfer data to / from memory in an element-wise manner, where the actual elements transferred are specified by the contents of the vector mask selected as the writemask. Instruction templates for memory accesses - time-sensitive

[0147] Temporal data is data that is likely to be reused quickly enough to benefit from cache operations. However, this is a hint, and different processors can implement it in different ways, including ignoring the hint completely. Instruction templates for memory accesses - non-temporal

[0148] Non-temporal data is data that is unlikely to be reused quickly enough to benefit from cache operations in the first level cache and should be given eviction priority. However, this is a hint, and different processors can implement it in different ways, including ignoring the hint completely. Class B instruction template

[0149] In the case of a class B instruction template, the alpha field 552 is interpreted as a write mask control (Z) field 552C, the content of which distinguishes whether the write mask controlled by the write mask field 570 should be merge or zero.

[0150] In the case of a Class B non-memory access 505 instruction template, a portion of the beta field 554 is interpreted as an RL field 557A, the contents of which distinguish which of the different augmented operation types are to be performed (e.g., the instruction template for the no-memory access write mask control partial rounding control type operation 512 and the instruction template for the no-memory access write mask control VSIZE type operation 517 specify rounding 557A.1 and vector length (VSIZE) 557A.2, respectively), while the remainder of the beta field 554 distinguishes which of the specified types of operations are to be performed. In the no-memory access 505 instruction template, the scale field 560, the displacement field 562A, and the displacement scale field 562B are not present.

[0151] In the instruction template of the write mask control part round control type operation 510 without memory access, the rest of the beta field 554 is interpreted as the round operation field 559A, and exception event reporting is disabled (the given instruction does not report any kind of floating point exception flag and does not invoke any floating point exception handler).

[0152] Round operation control field 559A - As with round operation control field 558, its contents distinguish which of a set of rounding operations (e.g., round up, round down, round toward zero, and round to nearest) is to be performed. Thus, round operation control field 559A allows the rounding mode to be changed on an instruction-by-instruction basis. In some embodiments where the processor includes a control register for specifying the rounding mode, the contents of round operation control field 550 override that register value.

[0153] In the instruction template for the write mask control VSIZE type operation 517 without memory access, the remainder of the β field 554 is interpreted as a vector length field 559B, the contents of which distinguish which of multiple data vector lengths (e.g., 128 bytes, 256 bytes, or 512 bytes) is to be executed.

[0154] In the case of a class B memory access 520 instruction template, a portion of the beta field 554 is interpreted as a broadcast field 557B, the content of which distinguishes whether a broadcast-type data manipulation operation is to be performed, and the remainder of the beta field 554 is interpreted as a vector length field 559B. The memory access 520 instruction template includes a scale field 560 and optionally includes a displacement field 562A or a displacement scale field 562B.

[0155] For the generic vector friendly instruction format 500, the full opcode field 574 is shown to include the format field 540, the base operation field 542, and the data element width field 564. Although one embodiment is shown in which the full opcode field 574 includes all of these fields, in embodiments that do not support all of these fields, the full opcode field 574 includes less than all of these fields. The full opcode field 574 provides an operation code (opcode).

[0156] The augment operation field 550, data element width field 564, and write mask field 570 allow these features to be specified on an instruction-by-instruction basis in the generic vector friendly instruction format.

[0157] The combination of the write mask field and the data element width field creates various types of instructions because these instructions allow the mask to be applied based on different data element widths.

[0158] The various instruction templates that appear within class A and class B are beneficial in different situations. In some embodiments of the present invention, different processors or different cores within a processor may support only class A, only class B, or both classes. For example, a high-performance general purpose out-of-order core intended for general purpose computing may support only class B, a core intended primarily for graphics and / or scientific (throughput) computing may support only class A, and a core intended for both general purpose computing and graphics and / or scientific (throughput) computing may support both class A and class B (of course, a core with some mixture of templates and instructions from these two classes, but not all templates and instructions from these two classes, is within the scope of the present invention). Likewise, a single processor may include multiple cores, all of which support the same class, or different cores in which support different classes. For example, in a processor with separate graphics cores and general purpose cores, one of the graphics cores intended primarily for graphics and / or scientific computing may support only class A, while one or more of the general purpose cores may be a high-performance general purpose core with out-of-order execution and register renaming intended for general purpose computing that supports only class B. Another processor that does not have a separate graphics core may include one or more general-purpose in-order or out-of-order cores that support both class A and class B. Of course, in different embodiments of the invention, features from one class may also be implemented in the other class. A program written in a high-level language will be made (e.g., just-in-time or statically compiled) into a variety of different executable forms, including: 1) a form with only instructions of the class(es) supported by the target processor for execution; or 2) a form with alternative routines written using different combinations of instructions of all classes and with control flow code that selects these routines to execute based on instructions supported by the processor currently executing the code. Exemplary Specialized Vector Friendly Instruction Format

[0159] Fig. 6A is a block diagram illustrating an exemplary specific vector friendly instruction format according to some embodiments of the invention. Fig. 6A A specific vector friendly instruction format 600 is shown that specifies the location, size, interpretation, and order of various fields, as well as the values ​​of some of those fields, and in this sense, the specific vector friendly instruction format 600 is specific. The specific vector friendly instruction format 600 can be used to extend the x86 instruction set, and thus some of the fields are similar or identical to those used in the existing x86 instruction set and its extensions (e.g., AVX). The format remains consistent with the prefix encoding field, real opcode byte field, MOD R / M field, SIB field, displacement field, and immediate field of the existing x86 instruction set with extensions. The fields from FIG. 5 are illustrated, and are from Fig. 6A The fields of are mapped to the fields from Figure 5.

[0160] It should be understood that although embodiments of the present invention are described with reference to the specific vector friendly instruction format 600 in the context of the general vector friendly instruction format 500 for illustrative purposes, the present invention is not limited to the specific vector friendly instruction format 600 unless otherwise stated. For example, the general vector friendly instruction format 500 contemplates various possible sizes for various fields, while the specific vector friendly instruction format 600 is illustrated as fields having specific sizes. As a specific example, although the data element width field 564 is illustrated as a one-bit field in the specific vector friendly instruction format 600, the present invention is not limited thereto (i.e., the general vector friendly instruction format 500 contemplates other sizes for the data element width field 564).

[0161] The generic vector friendly instruction format 500 includes the following listed in accordance with Fig. 6A The following fields are in the order shown in the figure.

[0162] EVEX prefix (bytes 0-3) 602 - encoded in four-byte form.

[0163] Format field 540 (EVEX byte 0, bits [7:0]) - The first byte (EVEX byte 0) is the format field 540, and it contains 0x62 (a unique value used to distinguish the vector friendly instruction format in some embodiments).

[0164] The second through fourth bytes (EVEX bytes 1-3) include a number of bit fields that provide specific capabilities.

[0165] REX field 605 (EVEX byte 1, bits [7-5]) - consists of the EVEX.R bit field (EVEX byte 1, bits [7]-R), the EVEX.X bit field (EVEX byte 1, bits [6]-X), and (557BEX byte 1, bits [5]-B). The EVEX.R, EVEX.X, and EVEX.B bit fields provide the same functionality as the corresponding VEX bit fields and are encoded using 1's complement form, i.e., ZMM0 is encoded as 1111B and ZMM15 is encoded as 0000B. The other fields of these instructions encode the lower three bits of the register index (rrr, xxx, and bbb) as is known in the art, whereby Rrrr, Xxxx, and Bbbb may be formed by adding EVEX.R, EVEX.X, and EVEX.B.

[0166] REX' field 610A - This is the first portion of the REX' field 610 and is the EVEX.R' bit field (EVEX byte 1, bit [4] - R') used to encode the upper 16 or lower 16 registers of the extended 32 register set. In some embodiments, this bit is stored in a bit-reversed format along with the other bits indicated below to distinguish (in 32-bit mode of the known x86) from a BOUND instruction whose real opcode byte is 62, but does not accept a value of 11 in the MOD field in the MOD R / M field (described below); alternative embodiments of the present invention do not store this indicated bit and the other indicated bits below in an inverted format. A value of 1 is used to encode the lower 16 registers. In other words, R'Rrrr is formed by combining EVEX.R', EVEX.R, and the other RRRs from the other fields.

[0167] Opcode Map Field 615 (EVEX Byte 1, bits [3:0] – mmmm) - its contents encode the implied leading opcode byte (0F, 0F 38, or 0F 3).

[0168] Data element width field 564 (EVEX byte 2, bit [7] – W) – denoted by the notation EVEX.W. EVEX.W is used to define the granularity (size) of the data type (32-bit data element or 64-bit data element).

[0169] EVEX.vvvv 620 (EVEX byte 2, bits [6:3] - vvvv) - The role of EVEX.vvvv may include the following: 1) EVEX.vvvv encodes the first source register operand specified in inverted (1's complement) form and is valid for instructions with two or more source operands; 2) EVEX.vvvv encodes the destination register operand specified in 1's complement form for a particular vector displacement; or 3) EVEX.vvvv does not encode any operand, this field is reserved, and should contain 1111b. Thus, the EVEX.vvvv field 620 encodes the 4 low-order bits of the first source register designator stored in inverted (1's complement) form. Depending on the instruction, additional different EVEX bit fields are used to extend the designator size to 32 registers.

[0170] EVEX.U 568 Class field (EVEX byte 2, bit [2] - U) - if EVEX.U = 0, it indicates Class A or EVEX.U0; if EVEX.U = 1, it indicates Class B or EVEX.U1.

[0171] Prefix encoding field 625 (EVEX byte 2, bits [1:0]-pp) - provides additional bits for the base operation field. In addition to providing support for legacy SSE instructions in EVEX prefix format, this also has the benefit of compressing the SIMD prefix (EVEX prefix only requires 2 bits, rather than requiring a byte to express the SIMD prefix). In one embodiment, to support legacy SSE instructions that use SIMD prefixes (66H, F2H, F3H) in both legacy format and in EVEX prefix format, these legacy SIMD prefixes are encoded into the SIMD prefix encoding field; and at runtime are expanded into the legacy SIMD prefix before being provided to the decoder's PLA (so that the PLA can execute both these legacy instructions in legacy format and these legacy instructions in EVEX format without modification). Although newer instructions can use the contents of the EVEX prefix encoding field directly as an opcode extension, for consistency, specific embodiments expand in a similar manner, but allow for different meanings specified by these legacy SIMD prefixes. Alternative embodiments may redesign the PLA to support 2-bit SIMD prefix encodings, and thus do not require expansion.

[0172] alpha field 552 (EVEX byte 3, bit [7] - EH, also known as EVEX.EH, EVEX.rs, EVEX.RL, EVEX.WriteMaskControl, and EVEX.N; also illustrated as alpha) - As previously described, this field is context specific.

[0173] Beta field 554 (EVEX byte 3, bits [6:4] - SSS, also called EVEX.s 2-0 ,EVEX.r 2-0 , EVEX.rr1, EVEX.LL0, EVEX.LLB, also illustrated as βββ) - As mentioned earlier, this field is context-specific.

[0174] REX' field 610B - This is the remainder of the REX' field 610 and is the EVEX.V' bit field (EVEX byte 3, bit [3] - V') that can be used to encode the upper 16 or lower 16 registers of the extended 32 register set. This bit is stored in a bit-reversed format. A value of 1 is used to encode the lower 16 registers. In other words, V'VVV is formed by combining EVEX.V', EVEX.vvvv.

[0175] Write mask field 570 (EVEX byte 3, bits [2:0]-kkk) - its content specifies the index of a register in the write mask register, as previously described. In some embodiments, a specific value EVEX.kkk=000 has special behavior that implies that no write mask is used for a particular instruction (this can be implemented in a variety of ways, including using a write mask that is hardwired to all objects or hardware that bypasses the mask hardware).

[0176] The real opcode field 630 (byte 4) is also referred to as the opcode byte. A portion of the opcode is specified in this field.

[0177] The MOD R / M field 640 (byte 5) includes a MOD field 642, a Reg field 644, and an R / M field 646. As previously described, the content of the MOD field 642 distinguishes memory access operations from non-memory access operations. The role of the Reg field 644 can be attributed to two situations: encoding a destination register operand or a source register operand; or being treated as an opcode extension and not used to encode any instruction operand. The role of the R / M field 646 may include the following: encoding an instruction operand that references a memory address; or encoding a destination register operand or a source register operand.

[0178] Scale, Index, Base (SIB) Byte (Byte 6) - As previously described, the contents of the scale field 550 are used for memory address generation. SIB.xxx 654 and SIB.bbb 656 - The contents of these fields have been mentioned previously for register indexes Xxxx and Bbbb.

[0179] Displacement field 562A (bytes 7-10) - When the MOD field 642 contains 10, bytes 7-10 are the displacement field 562A, and it works the same as a traditional 32-bit displacement (disp32) and works at byte granularity.

[0180] Displacement Factor Field 562B (Byte 7) - When MOD field 642 contains 01, byte 7 is the displacement factor field 562B. The location of this field is the same as that of the traditional x86 instruction set 8-bit displacement (disp8) that works at byte granularity. Since disp8 is sign-extended, it can only address between -128 and 127 byte offsets; in terms of a 64-byte cache line, disp8 uses 8 bits that can be set to only four really useful values ​​-128, -64, 0, and 64; since a larger range is often needed, disp32 is used; however, disp32 requires 4 bytes. In contrast to disp8 and disp32, displacement factor field 562B is a reinterpretation of disp8; when displacement factor field 562B is used, the actual displacement is determined by multiplying the contents of the displacement factor field by the size (N) of the memory operand access. This type of displacement is referred to as disp8*N. This reduces the average instruction length (a single byte for the displacement, but with a much larger range). Such compressed displacements are based on the assumption that the effective displacement is a multiple of the granularity of the memory access, and thus the redundant low-order bits of the address offset do not need to be encoded. In other words, the displacement factor field 562B replaces the traditional x86 instruction set 8-bit displacement. Thus, the displacement factor field 562B is encoded in the same manner as the x86 instruction set 8-bit displacement (therefore, there is no change in the ModRM / SIB encoding rules), the only difference being that disp8 is overloaded to disp8*N. In other words, there is no change in the encoding rules or encoding length, but only in the hardware interpretation of the displacement value (which requires scaling the displacement by the size of the memory operand to obtain a byte-based address offset). The immediate field 572 operates as previously described. Full opcode field

[0181] Figure 6B is a block diagram illustrating fields of a specific vector friendly instruction format 600 that make up a full opcode field 574 according to some embodiments. Specifically, the full opcode field 574 includes a format field 540, a base operation field 542, and a data element width (W) field 564. The base operation field 542 includes a prefix encoding field 625, an opcode map field 615, and a real opcode field 630. Register Index Field

[0182] Figure 6C 6 is a block diagram illustrating fields of a specific vector friendly instruction format 600 that make up a register index field 544 according to some embodiments. Specifically, the register index field 544 includes a REX field 605, a REX' field 610, a MODR / M.reg field 644, a MODR / Mr / m field 646, a VVVV field 620, a xxx field 654, and a bbb field 656. Expand the operation field

[0183] Fig.6D is a block diagram illustrating fields of the specific vector friendly instruction format 600 that make up the extended operation field 550 in accordance with some embodiments. When the class (U) field 568 contains 0, it indicates EVEX.U0 (class A 568A); when it contains 1, it indicates EVEX.U1 (class B 568B). When U=0 and the MOD field 642 contains 11 (indicating a no memory access operation), the alpha field 552 (EVEX byte 3, bit [7] - EH) is interpreted as the rs field 552A. When the rs field 552A contains 1 (round 552A.1), the beta field 554 (EVEX byte 3, bits [6:4] - SSS) is interpreted as the round control field 554A. The round control field 554A includes a one-bit SAE field 556 and a two-bit round operation field 558. When the rs field 552A contains 0 (data transformation 552A.2), the beta field 554 (EVEX byte 3, bits [6:4]-SSS) is interpreted as a three-bit data transformation field 554B. When U=0 and the MOD field 642 contains 00, 01, or 10 (indicating a memory access operation), the alpha field 552 (EVEX byte 3, bits [7]-EH) is interpreted as an eviction hint (EH) field 552B, and the beta field 554 (EVEX byte 3, bits [6:4]-SSS) is interpreted as a three-bit data manipulation field 554C.

[0184] When U=1, the alpha field 552 (EVEX byte 3, bit [7]–EH) is interpreted as the write mask control (Z) field 552C. When U=1 and the MOD field 642 contains 11 (indicating a no memory access operation), a portion of the beta field 554 (EVEX byte 3, bit [4]–S0) is interpreted as the RL field 557A; when it contains 1 (rounded 557A.1), the remainder of the beta field 554 (EVEX byte 3, bit [6-5]–S0) is interpreted as the RL field 557A. 2-1 ) is interpreted as the rounding operation field 559A, and when the RL field 557A contains 0 (VSIZE 557.A2), the remainder of the beta field 554 (EVEX byte 3, bits [6-5] -S 2-1 ) is interpreted as the vector length field 559B (EVEX byte 3, bits [6-5] – L 1-0 ). When U=1 and the MOD field 642 contains 00, 01, or 10 (indicating a memory access operation), the β field 554 (EVEX byte 3, bits [6:4] - SSS) is interpreted as the vector length field 559B (EVEX byte 3, bits [6-5] - L 1-0 ) and the broadcast field 557B (EVEX byte 3, bit [4]–B). Exemplary Register Architecture

[0185] Figure 7 is a block diagram of a register architecture 700 according to some embodiments. In the illustrated embodiment, there are 32 512-bit wide vector registers 710; these registers are referenced as zmm0 through zmm31. The lower order 256 bits of the lower 16 zmm registers are overlaid on registers ymm0-16. The lower order 128 bits of the lower 16 zmm registers (the lower order 128 bits of the ymm registers) are overlaid on registers xmm0-15. The specific vector friendly instruction format 600 operates on these overlaid register files, as illustrated in the following table.

[0186] In other words, the vector length field 559B selects between a maximum length and one or more other shorter lengths, where each such shorter length is half the previous length, and instruction templates without the vector length field 559B operate on the maximum vector length. In addition, in one embodiment, the class B instruction templates of the specific vector friendly instruction format 600 operate on packed or scalar single / double precision floating point data and packed or scalar integer data. Scalar operations are operations performed on the lowest order data element position in the zmm / ymm / xmm register; higher order data element positions either remain the same as before the instruction or are zeroed, depending on the embodiment.

[0187] Write mask registers 715 - In the illustrated embodiment, there are 8 write mask registers (k0 to k7), each of which is 64 bits in size. In an alternative embodiment, the size of the write mask registers 715 is 16 bits. As previously described, in some embodiments, the vector mask register k0 cannot be used as a write mask; when the encoding that normally indicates k0 is used as a write mask, it selects a hardwired write mask of 0xFFFF, effectively disabling the use of a write mask for that instruction.

[0188] General purpose registers 725 - In the embodiment shown, there are sixteen 64-bit general purpose registers that are used with existing x86 addressing modes to address memory operands. These registers are referenced by the names RAX, RBX, RCX, RDX, RBP, RSI, RDI, RSP, and R8 through R15.

[0189] A scalar floating point stack register file (x87 stack) 745 on which an MMX packed integer flat register file 750 is overlaid - in the illustrated embodiment, the x87 stack is an eight-element stack used to perform scalar floating point operations on 32 / 64 / 80-bit floating point data using the x87 instruction set extension; while MMX registers are used to perform operations on 64-bit packed integer data, as well as to hold operands for some operations performed between MMX and XMM registers.

[0190] Alternative embodiments may use wider or narrower registers. In addition, alternative embodiments may use more, fewer or different register files and registers. Exemplary Core Architectures, Processors, and Computer Architectures

[0191] Processor cores can be implemented in different ways, for different purposes, and in different processors. For example, implementations of such cores may include: 1) a general-purpose in-order core intended for general-purpose computing; 2) a high-performance general-purpose out-of-order core intended for general-purpose computing; 3) a special-purpose core intended primarily for graphics and / or scientific (throughput) computing. Implementations of different processors may include: 1) a CPU that includes one or more general-purpose in-order cores intended for general-purpose computing and / or one or more general-purpose out-of-order cores intended for general-purpose computing; and 2) a coprocessor that includes one or more special-purpose cores intended primarily for graphics and / or scientific (throughput). Such different processors lead to different computer system architectures, which may include: 1) a coprocessor on a separate chip from the CPU; 2) a coprocessor in the same package as the CPU but on a separate die; 3) a coprocessor on the same die as the CPU (in which case such a coprocessor is sometimes referred to as dedicated logic or as a dedicated core, such as integrated graphics and / or scientific (throughput) logic); and 4) a system on a chip, which may include the described CPU (sometimes referred to as application core(s) or application processor(s), the coprocessor described above, and additional functionality on the same die. An exemplary core architecture is described next, followed by a description of an exemplary processor and computer architecture. Exemplary Core Architecture In-order and out-of-order core block diagram

[0192] Fig. 8A is a block diagram illustrating an exemplary in-order pipeline and an exemplary register-renaming out-of-order issue / execution pipeline according to some embodiments of the present invention. Figure 8B is a block diagram illustrating an exemplary embodiment of an in-order architecture core and an exemplary register renaming, out-of-order issue / execution architecture core to be included in a processor according to some embodiments of the present invention. Figure 8A-BThe solid line boxes in illustrate the in-order pipeline and in-order core, while the optional addition of dashed line boxes illustrates the register renaming, out-of-order issue / execution pipeline and core. Considering that the in-order aspect is a subset of the out-of-order aspect, the out-of-order aspect will be described.

[0193] exist Fig. 8A , the processor pipeline 800 includes a fetch stage 802, a length decode stage 804, a decode stage 806, an allocation stage 808, a rename stage 810, a schedule (also known as a dispatch or issue) stage 812, a register read / memory read stage 814, an execute stage 816, a write back / memory write stage 818, an exception handling stage 822, and a commit stage 824.

[0194] Figure 8B A processor core 890 is shown, which includes a front end unit 830, which is coupled to an execution engine unit 850, and both the front end unit 830 and the execution engine unit 850 are coupled to a memory unit 870. The core 890 can be a reduced instruction set computing (RISC) core, a complex instruction set computing (CISC) core, a very long instruction word (VLIW) core, or a hybrid or alternative core type. As another option, the core 890 can be a special-purpose core, such as, for example, a network or communication core, a compression engine, a coprocessor core, a general-purpose computing graphics processing unit (GPGPU) core, a graphics core, and the like.

[0195] The front end unit 830 includes a branch prediction unit 832, which is coupled to an instruction cache unit 834, which is coupled to an instruction translation lookaside buffer (TLB) 836, which is coupled to an instruction fetch unit 838, which is coupled to a decode unit 840. The decode unit 840 (or decoder) can decode the instruction and generate one or more micro-operations, microcode entry points, microinstructions, other instructions, or other control signals decoded from the original instruction, or otherwise reflecting the original instruction, or derived from the original instruction as output. The decode unit 840 can be implemented using a variety of different mechanisms. Examples of suitable mechanisms include, but are not limited to, lookup tables, hardware implementations, programmable logic arrays (PLA), microcode read-only memories (ROMs), etc. In one embodiment, the core 890 includes a microcode ROM or other medium (e.g., in the decode unit 840, or otherwise within the front end unit 830) that stores microcode for certain macroinstructions. Decode unit 840 is coupled to rename / allocator unit 852 in execution engine unit 850 .

[0196] The execution engine unit 850 includes a rename / allocator unit 852 coupled to a retirement unit 854 and a set 856 of one or more scheduler units. The scheduler unit(s) 856 represent any number of different schedulers, including reservation stations, central instruction windows, etc. The scheduler unit(s) 856 are coupled to physical register file(s) units 858. Each of the physical register file(s) units 858 represents one or more physical register files, where different physical register files store one or more different data types, such as scalar integers, scalar floating points, packed integers, packed floating points, vector integers, vector floating points, status (e.g., an instruction pointer as the address of the next instruction to be executed), etc. In one embodiment, the physical register file(s) units 858 include a vector register unit, a write mask register unit, and a scalar register unit. These register units may provide architectural vector registers, vector mask registers, and general purpose registers. The physical register file(s) unit 858 is overlapped by the retirement unit 854 to illustrate various ways in which register renaming and out-of-order execution may be implemented (e.g., using reorder buffer(s) and retirement register file(s); using future files(s), history buffer(s), retirement register file(s); using register maps and register pools, etc.). The retirement unit 854 and the physical register file(s) unit 858 are coupled to the execution cluster(s) 860. The execution cluster(s) 860 include a set 862 of one or more execution units and a set 864 of one or more memory access units. The execution unit 862 may perform various operations (e.g., shifts, additions, subtractions, multiplications) and may perform on various data types (e.g., scalar floating point, packed integer, packed floating point, vector integer, vector floating point). While some embodiments may include multiple execution units dedicated to a particular function or set of functions, other embodiments may include only one execution unit or multiple execution units that all perform all functions. Scheduler unit(s) 856, physical register file(s) units 858, and execution cluster(s) 860 are shown as potentially multiple, as some embodiments create separate pipelines for certain types of data / operations (e.g., scalar integer pipelines, scalar floating point / packed integer / packed floating point / vector integer / vector floating point pipelines, and / or memory access pipelines each with its own scheduler unit, physical register file(s) units, and / or execution cluster—and in the case of separate memory access pipelines, certain embodiments are implemented where only the execution cluster of that pipeline has memory access unit(s) 864). It should also be understood that where separate pipelines are used, one or more of these pipelines may be out-of-order issue / execution, and the rest may be in-order.

[0197] A set of memory access units 864 is coupled to a memory unit 870, which includes a data TLB unit 872, which is coupled to a data cache unit 874, which is coupled to a second level (L2) cache unit 876. In an exemplary embodiment, the memory access unit 864 may include a load unit, a store address unit, and a store data unit, each of which is coupled to the data TLB unit 872 in the memory unit 870. The instruction cache unit 834 is also coupled to a second level (L2) cache unit 876 in the memory unit 870. The L2 cache unit 876 is coupled to one or more other levels of cache and ultimately to the main memory.

[0198] As an example, an exemplary register renaming out-of-order issue / execution core architecture may implement pipeline 800 as follows: 1) instruction fetch 838 performs fetch stage 802 and length decode stage 804; 2) decode unit 840 performs decode stage 806; 3) rename / allocator unit 852 performs allocation stage 808 and rename stage 810; 4) (multiple) scheduler units 856 perform scheduling stage 812; 5) (multiple) physical register file units 858 and memory units 870 perform register read / memory read stage 814; execution cluster 860 performs execution stage 816; 6) memory unit 870 and (multiple) physical register file units 858 perform write back / memory write stage 818; 7) each unit may be involved in an exception handling stage 822; and 8) retirement unit 854 and (multiple) physical register file units 858 perform commit stage 824.

[0199] Core 890 may support one or more instruction sets (e.g., the x86 instruction set (with some extensions that have been added with newer versions); the MIPS instruction set of MIPS Technologies, Inc. of Sunnyvale, California; the ARM instruction set of ARM Holdings, Inc. of Sunnyvale, California (with optional additional extensions such as NEON)), including the instruction(s) described herein. In one embodiment, core 890 includes logic to support packed data instruction set extensions (e.g., AVX1, AVX2), thereby allowing operations used by many multimedia applications to be performed using packed data.

[0200] It should be understood that a core may support multithreading (executing a set of two or more operations or threads in parallel) and may accomplish this multithreading in a variety of ways, including time-division multithreading, simultaneous multithreading (where a single physical core provides a logical core for each of the threads that the physical core is simultaneously multithreading), or a combination thereof (e.g., time-division fetch and decode and later implementations such as Intel Hyper-Threading (Simultaneous Multithreading).

[0201] Although register renaming is described in the context of out-of-order execution, it should be understood that register renaming can be used in an in-order architecture. Although the illustrated embodiment of the processor also includes separate instruction and data cache units 834 / 874 and a shared L2 cache unit 876, alternative embodiments may have a single internal cache for both instructions and data, such as, for example, a first level (L1) internal cache or multiple levels of internal cache. In some embodiments, the system may include a combination of internal caches and external caches external to the core and / or processor. Alternatively, all caches may be external to the core and / or processor. Specific Exemplary In-Order Core Architecture

[0202] Figure 9A-9B A block diagram illustrating a more specific exemplary in-order core architecture, which would be one logic block among several logic blocks in a chip (including other cores of the same type and / or different types). Depending on the application, the logic block communicates with some fixed function logic, memory I / O interfaces, and other necessary I / O logic via a high bandwidth interconnect network (e.g., a ring network).

[0203] Fig.9A 904 and its local subset 904 of the second level (L2) cache. In one embodiment, the instruction decoder 900 supports the x86 instruction set with the packed data instruction set extension. The L1 cache 906 allows low latency access to the cache memory into the scalar and vector units. Although in one embodiment (to simplify the design), the scalar unit 908 and the vector unit 910 use separate register sets (scalar registers 912 and vector registers 914, respectively), and data transferred between these registers is written to the memory and then read back from the first level (L1) cache 906, alternative embodiments of the present invention may use different approaches (e.g., using a single register set or including a communication path that allows data to be transferred between the two register files without being written and read back).

[0204] The local subset 904 of the L2 cache is part of the global L2 cache, which is divided into multiple separate local subsets, one local subset for each processor core. Each processor core has a direct access path to its own local subset 904 of the L2 cache. The data read by the processor core is stored in its L2 cache subset 904 and can be quickly accessed in parallel with other processor cores accessing their own local L2 cache subsets. The data written by the processor core is stored in its own L2 cache subset 904 and is dumped and cleared from other subsets when necessary. The ring network ensures the consistency of shared data. The ring network is bidirectional to allow agents such as processor cores, L2 caches and other logic blocks to communicate with each other within the chip. Each ring data path is 1012 bits wide in each direction.

[0205] Fig. 9B According to some embodiments of the present invention Fig.9A An expanded view of a portion of a processor core in FIG. Fig. 9B The L1 data cache 906A portion of the L1 cache 904 is included, as well as more details about the vector unit 910 and vector registers 914. Specifically, the vector unit 910 is a 16-wide vector processing unit (VPU) (see 16-wide ALU 928) that executes one or more of integer, single-precision floating point, and double-precision floating point instructions. The VPU supports blending of register inputs through blending unit 920, supports numerical conversion through numerical conversion units 922A-B, and supports copying of memory inputs through copy unit 924. Write mask register 926 allows masking of resulting vector writes.

[0206] Fig.10 is a block diagram of a processor 1000 that may have more than one core, may have an integrated memory controller, and may have integrated graphics according to some embodiments of the invention. Fig.10 The solid line box in the figure illustrates a processor 1000 having a single core 1002A, a system agent 1010, a set 1016 of one or more bus controller units, while the optional addition of the dashed line box illustrates an alternative processor 1000 having multiple cores 1002A-N, a set 1014 of one or more integrated memory controller units in the system agent unit 1010, and dedicated logic 1008.

[0207] Thus, different implementations of processor 1000 may include: 1) a CPU, where the dedicated logic 1008 is integrated graphics and / or scientific (throughput) logic (which may include one or more cores), and cores 1002A-N are one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, combinations of the two); 2) a coprocessor, where cores 1002A-N are a large number of dedicated cores intended primarily for graphics and / or scientific (throughput); and 3) a coprocessor, where cores 1002A-N are a large number of general purpose in-order cores. Thus, processor 1000 may be a general purpose processor, a coprocessor, or a dedicated processor, such as, for example, a network or communication processor, a compression engine, a graphics processor, a GPGPU (general purpose graphics processing unit), a high throughput integrated many-core (MIC) coprocessor (including 30 or more cores), an embedded processor, and the like. The processor may be implemented on one or more chips. Processor 1000 may be part of one or more substrates, and / or may be implemented on one or more substrates using any of a variety of process technologies (such as, for example, BiCMOS, CMOS, or NMOS).

[0208] The memory hierarchy includes one or more levels of cache within the core, a set of one or more shared cache units 1006, and external memory (not shown) coupled to a set of integrated memory controller units 1014. The set of shared cache units 1006 may include one or more intermediate levels of cache, such as a second level (L2), a third level (L3), a fourth level (L4), or other levels of cache, a last level cache (LLC), and / or combinations thereof. While in one embodiment, a ring-based interconnect unit 1012 interconnects the integrated graphics logic 1008 (the integrated graphics logic 1008 is an example of dedicated logic and is also referred to herein as dedicated logic), the set of shared cache units 1006, and the system agent unit 1010 / (multiple) integrated memory controller units 1014, alternative embodiments may use any number of well-known techniques to interconnect such units. In one embodiment, coherency is maintained between the one or more cache units 1006 and the cores 1002A-N.

[0209] In some embodiments, one or more of the cores 1002A-N may be multithreaded. The system agent 1010 includes those components that coordinate and operate the cores 1002A-N. The system agent unit 1010 may include, for example, a power control unit (PCU) and a display unit. The PCU may be, or may include, the logic and components required to regulate the power state of the cores 1002A-N and the integrated graphics logic 1008. The display unit is used to drive one or more externally connected displays.

[0210] The cores 1002A-N may be homogeneous or heterogeneous in terms of the architectural instruction set; that is, two or more of the cores 1002A-N may be capable of executing the same instruction set, while other cores may be capable of executing only a subset of the instruction set or a different instruction set. Exemplary Computer Architecture

[0211] Figure 11-14 is a block diagram of an exemplary computer architecture. Other system designs and configurations known in the art for laptops, desktops, handheld PCs, personal digital assistants, engineering workstations, servers, network devices, network hubs, switches, embedded processors, digital signal processors (DSPs), graphics devices, video game devices, set-top boxes, microcontrollers, cellular phones, portable media players, handheld devices, and various other electronic devices are also suitable. In general, a wide variety of systems or electronic devices that can contain processors and / or other execution logic as disclosed herein are generally suitable.

[0212] Reference now Fig.11 , shown is a block diagram of a system 1100 according to one embodiment of the present invention. The system 1100 may include one or more processors 1110, 1115 coupled to a controller hub 1120. In one embodiment, the controller hub 1120 includes a graphics memory controller hub (GMCH) 1190 and an input / output hub (IOH) 1150 (which may be on separate chips); the GMCH 1190 includes a memory and a graphics controller to which a memory 1140 and a coprocessor 1145 are coupled; and the IOH 1150 couples an input / output (I / O) device 1160 to the GMCH 1190. Alternatively, one or both of the memory and the graphics controller are integrated within a processor (as described herein), the memory 1140 and the coprocessor 1145 are directly coupled to the processor 1110, and the controller hub 1120 and the IOH 1150 are in a single chip.

[0213] The optional nature of the additional processor 1115 is Fig.11 Each processor 1110 , 1115 may include one or more of the processing cores described herein, and may be a version of processor 1000 .

[0214] The memory 1140 may be, for example, a dynamic random access memory (DRAM), a phase change memory (PCM), or a combination of the two. For at least one embodiment, the controller hub 1120 communicates with the processor(s) 1110, 1115 via a multi-drop bus such as a front-side bus (FSB), a point-to-point interface such as a Quick Path Interconnect (QPI), or a similar connection 1195.

[0215] In one embodiment, the coprocessor 1145 is a special purpose processor such as, for example, a high throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, an embedded processor, etc. In one embodiment, the controller hub 1120 may include an integrated graphics accelerator.

[0216] There may be various differences between physical resources 1110 , 1115 in terms of a range of quality metrics including architectural, microarchitectural, thermal, power consumption characteristics, etc.

[0217] In one embodiment, processor 1110 executes instructions that control general types of data processing operations. Embedded within these instructions may be coprocessor instructions. Processor 1110 recognizes these coprocessor instructions as being of a type that should be executed by an attached coprocessor 1145. Accordingly, processor 1110 issues these coprocessor instructions (or control signals representing coprocessor instructions) to coprocessor 1145 on a coprocessor bus or other interconnect. Coprocessor(s) 1145 accept and execute the received coprocessor instructions.

[0218] See now Fig.12 , shown is a block diagram of a first more specific exemplary system 1200 according to an embodiment of the present invention. Fig.12 As shown in FIG. 1 , multiprocessor system 1200 is a point-to-point interconnect system and includes a first processor 1270 and a second processor 1280 coupled via a point-to-point interconnect 1250. Each of processors 1270 and 1280 may be a version of processor 1000. In some embodiments, processors 1270 and 1280 are processors 1110 and 1115, respectively, and coprocessor 1238 is coprocessor 1145. In another embodiment, processors 1270 and 1280 are processor 1110 and coprocessor 1145, respectively.

[0219] Processors 1270 and 1280 are shown as including integrated memory controller (IMC) units 1272 and 1282, respectively. Processor 1270 also includes point-to-point (PP) interfaces 1276 and 1278 as part of its bus controller unit; similarly, second processor 1280 includes PP interfaces 1286 and 1288. Processors 1270, 1280 can exchange information via PP interface 1250 using point-to-point (PP) interface circuits 1278, 1288. Fig.12 As shown in FIG. 1 , IMCs 1272 and 1282 couple the processors to respective memories, namely, memory 1232 and memory 1234 , which may be portions of main memory locally attached to the respective processors.

[0220] Processors 1270, 1280 may each exchange information with chipset 1290 via respective PP interfaces 1252, 1254 using point-to-point interface circuits 1276, 1294, 1286, 1298. Chipset 1290 may optionally exchange information with coprocessor 1238 via high performance interface 1292. In one embodiment, coprocessor 1238 is a special purpose processor such as, for example, a high throughput MIC processor, a network or communication processor, a compression engine, a graphics processor, a GPGPU, an embedded processor, or the like.

[0221] A shared cache (not shown) may be included in either processor, or external to both processors but connected to the processors via the PP interconnect, so that if the processors are placed in a low power mode, local cache information of either or both processors may be stored in the shared cache.

[0222] Chipset 1290 may be coupled to first bus 1216 via interface 1296. In one embodiment, first bus 1216 may be a peripheral component interconnect (PCI) bus or a bus such as a PCI Express bus or another third generation I / O interconnect bus, but the scope of the present invention is not limited in this regard.

[0223] like Fig.12 As shown in , various I / O devices 1214 may be coupled to the first bus 1216 along with a bus bridge 1218 that couples the first bus 1216 to a second bus 1220. In one embodiment, one or more additional processors 1215 such as a coprocessor, a high throughput MIC processor, a GPGPU, an accelerator (such as, for example, a graphics accelerator or a digital signal processing (DSP) unit), a field programmable gate array, or any other processor are coupled to the first bus 1216. In one embodiment, the second bus 1220 may be a low pin count (LPC) bus. In one embodiment, various devices may be coupled to the second bus 1220 including, for example, a keyboard and / or mouse 1222, communication devices 1227, and a storage unit 1228 such as a disk drive or other mass storage device which may include instructions / code and data 1230. Additionally, an audio I / O 1224 may be coupled to the second bus 1220. Note that other architectures are possible. For example, instead of Fig.12 Instead of a point-to-point architecture, the system may implement a multi-drop bus or other such architecture.

[0224] Reference now Fig.13 , shown is a block diagram of a second more specific exemplary system 1300 according to an embodiment of the present invention. Fig.12 and 13Similar elements in the same reference numerals are used, and Fig.13 Omitted Fig.12 to avoid confusion Fig.13 other aspects.

[0225] Fig.13 The illustrated processors 1270, 1280 may include integrated memory and I / O control logic ("CL") 1372 and 1382, respectively. Thus, the CL 1372, 1382 includes an integrated memory controller unit and includes I / O control logic. Fig.13 The illustration shows that not only the memories 1232, 1234 are coupled to the CL 1372, 1382, but also the I / O devices 1314 are coupled to the control logic 1372, 1382. The legacy I / O devices 1315 are coupled to the chipset 1290.

[0226] Reference now Fig.14 , shown is a block diagram of a SoC 1400 according to an embodiment of the present invention. Fig.10 Similar elements in the same figure are marked with similar reference numerals. In addition, the dashed boxes are optional features on more advanced SoCs. Fig.14 , interconnect unit(s) 1402 are coupled to: application processor 1410, which includes a set of one or more cores 1002A-N and a shared cache unit(s) 1006, the set of one or more cores 1002A-N including cache units 1004A-N; system agent unit 1010; bus controller unit(s) 1016; integrated memory controller unit(s) 1014; a set of one or more coprocessors 1420, which may include integrated graphics logic, image processors, audio processors, and video processors; static random access memory (SRAM) unit 1430; direct memory access (DMA) unit 1432; and a display unit 1440 for coupling to one or more external displays. In one embodiment, coprocessor(s) 1420 include special purpose processors such as, for example, network or communication processors, compression engines, GPGPUs, high throughput MIC processors, or embedded processors, among others.

[0227] The various embodiments of the mechanisms disclosed herein may be implemented in hardware, software, firmware, or a combination of such implementations. Embodiments of the present invention may be implemented as a computer program or program code executed on a programmable system, the programmable system comprising at least one processor, a storage system (including volatile and non-volatile memory and / or storage elements), at least one input device, and at least one output device.

[0228] Program code (such as Fig.12The code 1230 illustrated in FIG. 12 is applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor, such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.

[0229] The program code can be implemented with a high-level process-oriented programming language or an object-oriented programming language to communicate with the processing system. If necessary, the program code can also be implemented with assembly language or machine language. In fact, the mechanism described herein is not limited to the scope of any specific programming language. In any case, the language can be a compiled language or an interpreted language.

[0230] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a machine-readable medium, which represent various logic in a processor, which when read by a machine causes the machine to fabricate logic for performing the techniques described herein. Such representations, known as "IP cores," may be stored on a tangible, machine-readable medium and supplied to various customers or manufacturing facilities to load into a manufacturing machine that actually manufactures the logic or processor.

[0231] Such machine-readable storage media may include, but are not limited to, a non-transitory, tangible arrangement of an article manufactured or formed by a machine or apparatus, including storage media such as a hard disk; any other type of disk, including a floppy disk, an optical disk, a compact disk-read only memory (CD-ROM), a compact disk-rewritable (CD-RW), and a magneto-optical disk; semiconductor devices, such as read-only memory (ROM), random access memory (RAM) such as dynamic random access memory (DRAM) and static random access memory (SRAM), erasable programmable read-only memory (EPROM), flash memory, electrically erasable programmable read-only memory (EEPROM); phase change memory (PCM); a magnetic card or an optical card; or any other type of medium suitable for storing electronic instructions.

[0232] Therefore, embodiments of the present invention also include non-transitory tangible machine-readable media containing instructions or containing design data, such as hardware description language (HDL), which defines the structures, circuits, devices, processors and / or system features described herein. These embodiments are also referred to as program products. Simulation (including binary conversion, code deformation, etc.)

[0233] In some cases, the instruction converter can be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter can convert (e.g., using static binary conversion, dynamic binary conversion including dynamic compilation), deform, simulate or otherwise convert instructions into one or more other instructions to be processed by the core. The instruction converter can be implemented in software, hardware, firmware, or a combination thereof. The instruction converter can be on the processor, outside the processor, or partially on the processor and partially outside the processor.

[0234] Fig.15 1 is a block diagram of a method for converting binary instructions in a source instruction set into binary instructions in a target instruction set using a software instruction converter according to some embodiments of the present invention. In the illustrated embodiment, the instruction converter is a software instruction converter, but alternatively, the instruction converter can be implemented in software, firmware, hardware, or various combinations thereof. Fig.15 It is shown that a program in a high-level language 1502 can be compiled using an x86 compiler 1504 to generate x86 binary code 1506 that can be natively executed by a processor 1516 having at least one x86 instruction set core. The processor 1516 having at least one x86 instruction set core represents any processor that performs substantially the same functions as an Intel processor having at least one x86 instruction set core by compatibly executing or otherwise processing: 1) a substantial portion of the instruction set of an Intel x86 instruction set core, or 2) an object code version of an application or other software that is targeted to run on an Intel processor having at least one x86 instruction set core to achieve substantially the same results as an Intel processor having at least one x86 instruction set core. The x86 compiler 1504 represents a compiler that can be operated to generate x86 binary code 1506 (e.g., object code) that can be executed on a processor having at least one x86 instruction set core 1516 with or without additional linking processing. Similarly, Fig.15It is shown that a program in a high-level language 1502 can be compiled using an alternative instruction set compiler 1508 to generate an alternative instruction set binary code 1510 that can be natively executed by a processor 1514 that does not have at least one x86 instruction set core (e.g., a processor that has a core that executes the MIPS instruction set of MIPS Technologies, Inc. of Sunnyvale, California, and / or executes the ARM instruction set of ARM Holdings, Inc. of Sunnyvale, California). The instruction converter 1512 is used to convert the x86 binary code 1506 into code that can be natively executed by the processor 1514 that does not have an x86 instruction set core. The converted code is unlikely to be the same as the alternative instruction set binary code 1510 because an instruction converter that can do so is difficult to manufacture; however, the converted code will complete the general operation and be composed of instructions from the alternative instruction set. Therefore, the instruction converter 1512 represents software, firmware, hardware, or a combination thereof that allows a processor or other electronic device that does not have an x86 instruction set processor or core to execute the x86 binary code 1506 through simulation, emulation, or any other process. Further examples

[0235] Example 1 provides a processor comprising: a register file comprising a plurality of vector registers; a memory interface for receiving read data from a memory; a fetch circuit for fetching instructions; a decoding circuit for decoding the fetched instructions, the fetched instructions having a field for specifying an opcode, a destination vector register, and a memory location of a source vector comprising N groups of elements, N being a positive integer, the opcode being used to instruct the processor to: fetch the source vector, generate write data comprising one or more N-tuples, each N-tuple comprising a corresponding element from each of the N groups of elements, and write the write data to the destination vector register; and an execution circuit for executing the decoded instructions according to the opcode, wherein the execution circuit has a shuffle pipeline placed between the memory and the register file, the shuffle pipeline being used to fetch, decode, and execute further instances of instructions at a rate of one instruction per clock cycle.

[0236] Example 2 includes the substance of the example processor of Example 1, wherein the instruction further specifies a width of the source vector, the width being one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits, and 1024 bits.

[0237] Example 3 includes the substance of the exemplary processor of Example 1, wherein the instruction further specifies a size of each element of the source vector, the size being one of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, and 128 bits.

[0238] Example 4 includes the substance of the exemplary processor of Example 1, wherein each of the N groups of elements of the source vector includes M elements, wherein the destination vector register is wide enough to store the N x M elements, and wherein the opcode further instructs the processor to: generate M tuples and write the M tuples to corresponding elements of the destination vector register, each of the M tuples being configured to include N corresponding elements of the N groups of elements.

[0239] Example 5 includes the substance of the exemplary processor of Example 1, wherein each of the N groups of elements of the source vector includes M elements, wherein the instruction specifies M destination vector registers, and wherein the opcode further instructs the processor to: generate M N-tuples and broadcast each generated N-tuple to the entire width of one of the M destination vector registers.

[0240] Example 6 includes the substance of the exemplary processor of Example 1, wherein the N groups of elements of the source vector are arranged contiguously in the memory.

[0241] Example 7 includes the substance of the exemplary processor of Example 1, wherein the instruction further specifies one or more additional memory locations such that a memory location is provided for each of the N groups of elements.

[0242] Example 8 includes the substance of the exemplary processor of Example 1, wherein each of the N groups of elements of the source vector includes M elements, and wherein the opcode further instructs the processor to generate two N-tuples corresponding to two of the M elements of the source vector and broadcast the two N-tuples to the entire width of the destination vector register.

[0243] Example 9 includes the substance of the exemplary processor of Example 1, wherein the opcode is further used to indicate that the write data is used to include a single tuple generated based on selected elements of the N source vectors, and the single tuple is to be broadcast to the entire width of the destination vector register.

[0244] Example 10 includes the substance of the example processor of Example 9, wherein a single tuple to be broadcast is to be selected using an additional instruction field.

[0245] Example 11 provides a method for execution by a processor, the processor comprising a memory interface for reading data from a memory and a register file comprising multiple vector registers, the method comprising: using a fetch circuit to fetch an instruction; using a decode circuit to decode the fetched instruction, the fetched instruction having a field for specifying an opcode, a destination vector register, and a memory location of a source vector comprising N groups of elements, N being a positive integer, the opcode being used to instruct the processor to: fetch the source vector, generate write data comprising one or more N-tuples, each N-tuple comprising a corresponding element from each of the N groups of elements, and write the write data to the destination vector register; and using an execution circuit to execute the decoded instruction according to the opcode, wherein the execution circuit has a shuffle pipeline placed between the memory and the register file, the shuffle pipeline being used to fetch, decode, and execute further instances of instructions at a rate of one instruction per clock cycle.

[0246] Example 12 includes the substance of the exemplary method of Example 11, wherein the instruction further specifies a width of the source vector, the width being one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits, and 1024 bits.

[0247] Example 13 includes the substance of the exemplary method of Example 11, wherein the instruction further specifies a size of each element of the source vector, the size being one of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, and 128 bits.

[0248] Example 14 includes the substance of the exemplary method of Example 11, wherein each of the N groups of elements of the source vector includes M elements, wherein the destination vector register is wide enough to store the N x M elements, and wherein the opcode further instructs the processor to: generate M tuples and write the M tuples to corresponding elements of the destination vector register, each of the M tuples being used to include N corresponding elements of the N groups of elements.

[0249] Example 15 includes the substance of the exemplary method of Example 11, wherein each of the N groups of elements of the source vector includes M elements, wherein the instruction specifies M destination vector registers, and wherein the opcode further instructs the processor to: generate M N-tuples and broadcast each generated N-tuple to the entire width of one of the M destination vector registers.

[0250] Example 16 includes the substance of the exemplary method of Example 11, wherein the N groups of elements of the source vector are arranged contiguously in the memory.

[0251] Example 17 includes the substance of the exemplary method of Example 11, wherein the instructions further specify one or more additional memory locations such that a memory location is provided for each of the N groups of elements.

[0252] Example 18 includes the substance of the exemplary method of Example 11, wherein each of the N groups of elements of the source vector includes M elements, and wherein the opcode further instructs the processor to generate two N-tuples corresponding to two of the M elements and broadcast the two N-tuples to the entire width of the destination vector register.

[0253] Example 19 includes the substance of the exemplary method of Example 11, wherein the opcode is further used to indicate that the write data is used to include a single tuple generated based on selected elements of the N source vectors, and the single tuple is to be broadcast to the entire width of the destination vector register.

[0254] Example 20 includes the substance of the example method of Example 19, wherein a single tuple to be broadcast is selected using an additional instruction field.

[0255] Example 21 provides a non-transitory machine-readable medium containing instructions, including a memory interface for reading data from a memory and a processor including a register file of multiple vector registers for responding to the instructions by: using a fetch circuit to fetch the instruction; using a decode circuit to decode the fetched instruction, the fetched instruction having a field for specifying an opcode, a destination vector register, and a memory location of a source vector including N groups of elements, N being a positive integer, the opcode being used to instruct the processor to: fetch the source vector, generate write data including one or more N-tuples, each N-tuple including a corresponding element from each of the N groups of elements, and write the write data to the destination vector register; and using an execution circuit to execute the decoded instruction according to the opcode, wherein the execution circuit includes a shuffle pipeline placed between the memory and the register file, the shuffle pipeline being used to fetch, decode, and execute further instances of instructions at a rate of one instruction per clock cycle.

[0256] Example 22 includes the substance of the exemplary non-transitory machine-readable medium of Example 21, wherein the instruction further specifies a width of the source vector, the width being one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits, and 1024 bits.

[0257] Example 23 includes the substance of the exemplary non-transitory machine-readable medium of Example 21, wherein the instruction further specifies a size of each element of the source vector, the element size being one of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, and 128 bits.

[0258] Example 24 includes the substance of the exemplary non-transitory machine-readable medium of Example 21, wherein each of the N groups of elements of the source vector includes M elements, wherein the destination vector register is wide enough to store the N x M elements, and wherein the opcode further instructs the processor to: generate M tuples and write the M tuples to corresponding elements of the destination vector register, each of the M tuples being configured to include N corresponding elements of the N groups of elements.

[0259] Example 25 includes the substance of the exemplary non-transitory machine-readable medium of Example 21, wherein each of the N groups of elements of the source vector includes M elements, wherein the instruction specifies M destination vector registers, and wherein the opcode further instructs the processor to: generate M N-tuples and broadcast each generated N-tuple to the entire width of one of the M destination vector registers.

Claims

1. A processor, comprising: a register file, including one or more vector registers; a memory interface for reading a plurality of data elements from a memory; A fetching circuit, used for fetching instructions; a decoding circuit for decoding the instruction, the instruction comprising a plurality of fields for indicating an opcode, a subset of the plurality of data elements for broadcast, and positions of the plurality of data elements, the plurality of data elements being arranged in a corresponding plurality of relative positions, wherein the plurality of data elements comprises a first group of data elements and a second group of data elements; An execution circuit is used to execute the instruction, wherein the execution circuit is used to perform a replacement operation and a broadcast operation according to the instruction, wherein the broadcast operation is used to cause the subset of the multiple data elements to be broadcast to the multiple relative positions associated with the corresponding multiple other subsets of the multiple data elements, and the subset of the multiple data elements is used to replace the corresponding multiple other subsets at the multiple relative positions.

2. The processor of claim 1, wherein: The permutation operation is used to change the relative positions of at least a portion of the plurality of data elements.

3. The processor according to claim 1 or 2, wherein: The execution circuit is to perform the permute operation based on a field of the plurality of fields of the instruction.

4. The processor according to any one of claims 1 to 3, wherein: The plurality of data elements are arranged in the corresponding plurality of relative positions in a memory, and wherein the execution circuit is to perform the permute operation and the broadcast operation to load the plurality of data elements into the one or more vector registers.

5. The processor of claim 4, wherein: The execution circuitry is to load the plurality of data elements into the one or more vector registers as 2-tuples, each 2-tuple comprising one data element from the first set of data elements and one data element from the second set of data elements.

6. The processor according to any one of claims 1 to 5, wherein: One or more of the plurality of fields of the instruction are used to further indicate a width of the first set of data elements and the second set of data elements, the width being one of 32 bits, 64 bits, 128 bits, 256 bits, 512 bits, and 1024 bits.

7. The processor of claim 6, wherein: One or more of the plurality of fields of the instruction are used to further indicate a size of each data element in the first set of data elements and the second set of data elements, the size being one of 2 bits, 4 bits, 8 bits, 16 bits, 32 bits, 64 bits, and 128 bits.

8. The processor of claim 4, wherein: The first group of data elements and the second group of data elements are arranged contiguously in the memory.

9. The processor of claim 4, wherein: One or more of the plurality of fields of the instruction are used to further indicate one or more memory locations where the plurality of data elements are stored.

10. The processor according to any one of claims 1 to 9, wherein: The execution circuit is configured to perform the permute operation and the broadcast operation according to one or more fields of the plurality of fields of the instruction.

11. A method comprising: Get the instruction; decoding the instruction, the instruction comprising a plurality of fields for indicating an opcode, a subset of a plurality of data elements for broadcast, and positions of the plurality of data elements, the plurality of data elements being read from a memory and arranged in a corresponding plurality of relative positions, wherein the plurality of data elements comprises a first group of data elements and a second group of data elements; The instruction is executed to perform a permute operation and a broadcast operation according to the instruction, wherein the broadcast operation is used to cause the subset of the plurality of data elements to be broadcast to the plurality of relative positions associated with corresponding plurality of other subsets of the plurality of data elements, the subset of the plurality of data elements being used to replace the corresponding plurality of other subsets at the plurality of relative positions.

12. A computer program product comprising instructions which, when executed by a processor, cause the processor to perform the method of claim 11.

13. A computer readable medium having stored thereon the computer program product of claim 12.

14. A processor, comprising: a) a front end unit, the front end unit comprising: an instruction fetching unit for fetching instructions from a memory, and a decoding unit for decoding the instructions into micro-operations; b) an execution engine unit, the execution engine unit comprising: a rename / allocator unit for allocating machine buffers and resources required for each micro-operation and renaming a plurality of logical registers into entries in a register file; a scheduler unit for arbitrating allocation ports to schedule micro-operations for execution; an execution cluster, including an execution unit and a memory access unit; and c) A memory unit coupled to the front end unit and the execution engine unit.

15. A system on a chip, comprising: an application processor, the application processor comprising one or more cores and a shared cache unit; Coprocessor; as well as An interconnect unit couples the coprocessor and the application processor.

16. A method comprising: Compiling a program in a high-level programming language using an x86 compiler to generate x86 binary code that is natively executed by a first processor having at least one x86 instruction set core; Using an instruction converter, the x86 binary code is converted into an alternative binary code that can be natively executed by a second processor that does not have an x86 instruction set core.

Citation Information

Cited By

  • Processing apparatus, processing method, and computer-readable storage medium

    CN119225815A

  • Processing device, processing method and computer readable storage medium

    CN119225815B