Instruction for writing and / or reading of control and / or state registers

By introducing the URDMSR and UWRMSR instructions, the performance and flexibility problems of reading and writing control and status registers in the existing technology are solved, a high-performance and flexible access mechanism is achieved, and the ISA design of the processor is simplified.

CN118733121APending Publication Date: 2024-10-01INTEL CORP
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311810378.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-03-30
Filing Date
2023-12-26
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

It is difficult to provide application software with high-performance access methods for reading and writing control and status registers without increasing the cost of processor hardware and microcode logic, and existing solutions are inflexible and cannot adapt to system registers. later additions or changes.

Method used

Introducing the URDMSR and UWRMSR instructions, allowing execution at any privilege level, precisely controlling which control and status registers can be read or written through the user-level access control bitmap, avoiding design and verification complexity, and providing OS controlled Mechanism for high-performance access.

Benefits of technology

It achieves flexible access to control and status registers, reduces system call latency, improves processor performance and scalability, simplifies ISA design, and reduces overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733121A_ABST
    Figure CN118733121A_ABST
Patent Text Reader

Abstract

Techniques are described that allow control and / or status registers to be read or written at a user privileged level. Examples of instructions for user privileged reading include one or more fields for an opcode, one or more fields for a source operand to store a control and / or status register address, and one or more fields for a destination register operand, wherein the opcode is for instructing the execution circuitry to read data from the control and / or status register whose identity is stored in the source operand and write the data to the destination register operand in response to access to the control and / or status register being allowed, wherein the access to the control and / or status register is determined at least in part by the data of the operating system controlled data structure indexed by the control and / or status register address.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0001] Modern x86 processors define thousands of system registers, which are often referred to as Model Specific Registers (MSRs) or control and / or status registers. The operating system or privileged software (such as BIOS, OS, drivers, and hypervisors) uses privileged instructions (read MSR (RDMSR) and write MSR (WRMSR)) to read / write these registers. However, application software cannot use these instructions, and therefore if it needs read / write access to any of the states, it needs to use system calls to the OS. System calls add too much latency and are therefore impractical to use in any type of high-performance software. BRIEF DESCRIPTION OF THE DRAWINGS

[0002] Various examples according to the present disclosure will be described with reference to the accompanying drawings, in which:

[0003] Figure 1 An example execution of a read control and / or status register (eg, URDMSR) instruction is illustrated.

[0004] Figure 2 An example of a description of a URDMSR is illustrated, which includes an opcode, an operand to be used, a CPUID location for indicating support for the instruction, and the like.

[0005] Figure 3 An example execution of a write control and / or status register (eg, UWRMSR) instruction is illustrated.

[0006] Figure 4 An example of a description of a UWRMSR is illustrated, which includes an opcode, an operation object to be used, a CPUID location for indicating support for the instruction, and the like.

[0007] Figure 5 An example of a user-level access control bitmap used to determine when reading and / or writing of control and / or status registers is permitted is illustrated.

[0008] Figure 6 An example of a method for processing a URDMSR instruction is illustrated.

[0009] Figure 7 An example of a method for processing a URDMSR instruction is illustrated.

[0010] Figure 8 An example of a method for processing a UWRMSR instruction is illustrated.

[0011] Fig. 9 An example of a method for processing a UWRMSR instruction is illustrated.

[0012] Fig.10 An example of an instruction format that supports a UWRMSR or URDMSR instruction when a 32-bit immediate value is not used is shown.

[0013] Fig.11 The diagram indicates an example of prefix encoding for 32 bits of immediate use.

[0014] Fig.12 An example of a method for processing instructions is illustrated.

[0015] Fig.13 An example of computing hardware for processing at least UWRMSR and / or URDMSR instructions is illustrated.

[0016] Fig.14 An example computing system is illustrated.

[0017] Fig.15 A block diagram illustrating an example processor and / or System on a Chip (SoC) that may have one or more cores and an integrated memory controller.

[0018] Fig.16 is a block diagram illustrating a computing system 1600 configured to implement one or more aspects of the examples described herein.

[0019] Fig.17A Figure 1 shows an example of a parallel processor.

[0020] Fig. 17B An example of a block diagram of a partition unit is illustrated.

[0021] Fig. 17C An example of a block diagram illustrating a processing cluster within a parallel processing unit.

[0022] Fig.17D An example of a graphics multiprocessor is illustrated, wherein the graphics multiprocessor is coupled with a pipeline manager of a processing cluster.

[0023] Figures 18A-18C Additional graphics multiprocessors are illustrated according to examples.

[0024] Fig.19 A parallel computing system 1900 is shown according to some examples.

[0025] Figure 20A-20B Illustrate a hybrid logical / physical view of a decomposed parallel processor according to examples described herein.

[0026] 21(A) is a block diagram illustrating both an example in-order pipeline and an example register renaming, out-of-order issue / execution pipeline according to an example.

[0027] 21(B) is a block diagram illustrating both an example in-order architecture core and an example register renaming, out-of-order issue / execution architecture core to be included in a processor according to an example.

[0028] Fig. 22 Examples of execution unit circuit(s) are illustrated, such as execution unit circuit(s).

[0029] Fig.23 is a block diagram of a register architecture according to some examples.

[0030] Fig.24 The figure shows an example of the instruction format.

[0031] Fig.25 Figure 1 shows an example of an addressing information field.

[0032] Fig.26 An example of the first prefix is ​​illustrated.

[0033] Figure 27(A)-Figure 27(D) An example of how the R, X, and B fields of the first prefix are used is illustrated.

[0034] Figure 28 (A) - Figure 28 (B) An example of the second prefix is ​​shown in the figure.

[0035] Fig.29 An example of the third prefix is ​​shown in FIG.

[0036] Figure 30A-Figure 30B Thread execution logic including an array of processing elements employed in a graphics processor core is illustrated according to examples described herein.

[0037] Fig.31 Additional execution units are illustrated according to an example.

[0038] Fig.32 is a block diagram illustrating a graphics processor instruction format 3200 according to some examples.

[0039] Fig.33 is a block diagram of another example of a graphics processor.

[0040] Fig.34A is a block diagram illustrating a graphics processor command format according to some examples.

[0041] Fig.34B is a block diagram illustrating a graphics processor command queue according to an example.

[0042] Fig.35is a block diagram illustrating converting binary instructions in a source ISA to binary instructions in a target ISA using a software instruction converter according to an example.

[0043] Fig.36 is a block diagram illustrating an IP core development system 3600 that may be used to fabricate an integrated circuit to perform operations according to some examples. DETAILED DESCRIPTION

[0044] The present disclosure relates to methods, apparatus, systems and non-transitory computer readable storage media for reading and / or writing control and / or status registers. Whenever application software needs to read or write a control (system) register, the method is to add a new custom instruction set architecture (ISA) extension specific to that state or state group.

[0045] The current solution of adding state-specific ISA extensions is undesirable for several different reasons. First, the solution only applies to a few specified MSRs out of the thousands of MSRs currently defined. If any state without a custom user ISA needs to be accessed, software will continue to rely on system calls. Second, each state-specific ISA defined adds custom hardware and microcode logic costs to the processor to decode new instructions and coordinate product interception of hybrid processors. As the number of such MSRs grows, this adds more and more logic costs to each core. Third, each new ISA added needs to be enumerated to the software and enabled by the software. Since these features are almost always disabled by default, new enablement is required, and both the operating system (OS) and the virtual machine monitor (VMM) need to be enabled to use these new features. There may also be overhead for OS / VMM enablement (e.g., for changing settings for each application / guest machine). Fourth, state-specific ISAs are inflexible and cannot adapt to late additions / changes to system registers. It takes many years from discovering that there is a software demand to releasing a processor with support.

[0046] Examples of instructions (URDMSR and UWRMSR) are detailed herein to read and write control and / or status registers (e.g., MSRs), regardless of the current privilege level (CPL). In some examples, these instructions are referred to as "user MSR" instructions. In some examples, one or both of URDMSR and UWRMSR can be executed at CPL3 or CPL0. The kernel and / or VMM controls which control and / or status registers can be read and written. In some examples, each instruction supports providing a control and / or status register address as an immediate operand; or in a register.

[0047] These instructions should avoid the design and verification complexity caused by continually adding dedicated instructions to read / write the state in CPL3. They provide an OS controlled mechanism that enables high performance access to the state in CPL3 once control and / or status register support is added to the processor. In some examples, the instructions are only supported in 64-bit mode.

[0048] In some examples, the OS controls exactly which MSRs can be read or written by the instruction by programming a bitmap in memory. The bitmap allows the OS to opt-in and control read and write access on a control and / or status register by control and / or status register basis. The OS may choose to specify different bitmaps for different apps / guests. Allowing the OS the flexibility and ability to control which control and / or status registers can be read / written by applications provides a cleaner, simpler ISA for the processor.

[0049] In some examples, the number of control and / or status registers that can be written is less than the number of registers that can be read.

[0050] In some examples, this is a one-time enablement of the VMM for all user control and / or state registers, just as with the OS. Prior to user control and / or state registers, each dedicated state read / write instruction added to allow user access requires new enablement and virtualization support. Figure 1An example execution of a read control and / or status register (e.g., URDMSR) instruction is illustrated. In some examples, the instruction can be executed at any privilege level (e.g., user (e.g., level 3) and hypervisor / kernel (e.g., level 0)). In general, execution of a single read control and / or status register instruction causes execution circuitry to read the contents of a control and / or status register (e.g., a 64-bit model specific register (MSR)) 101 specified by an address in a source operand (register, memory, or immediate) 125 into a destination operand 131 (e.g., a register or memory) at any current privilege level (CPL). In some examples, the destination operand is a general purpose register.

[0051] When the address of the control and / or status register is stored in the register, in some examples, the high-order 32 bits of the register specifying the control and / or status register address are ignored. It should be noted that, depending on the example, the address may be a physical address or a linear address. In some examples, specifying a reserved or unimplemented control and / or status register address causes a general protection exception. In some examples, if less than 64 bits are implemented in the control and / or status register being read, the value returned in the unimplemented bit position is undefined.

[0052] In some examples, most (if not all) control and / or status registers are potentially readable by the URDMSR, but under the control of the operating system (OS). The OS controls exactly which control and / or status registers can be read by programming a bitmap (e.g., a user-level access control bitmap 123) or other data structure in memory. Specifically, the OS programs the user-level access control and / or status register 121 (e.g., in some examples, referred to as IA32_USER_MSR_CTL[63:12]) to contain the aligned (linear) address of the bitmap. The control and / or status register also has an enable bit (e.g., bit 0), which the OS sets to enable the URDMSR and / or UWRMSR instructions for the thread.

[0053] The access control logic 119 uses the user-level access control and / or status register data 115 to index information in the user-level access control bitmap data 117 related to a particular control and / or status register based on the address information of the control and / or status register provided by the control and / or status register address source 125. When the user-level access control bitmap data 117 indicates that access is allowed for the address of the control and / or status register, the register read and write circuitry 115 will then read the data from the addressed control and / or status register (control and / or status register source 101) and store it in the general register destination 131. Although the access control logic 119 is shown as part of the execution circuitry 111, in some examples, the access control logic 119 is part of the decoder (e.g., when immediate values ​​are used, their access control aspects may occur before the execution circuitry 111 intervenes).

[0054] Figure 2 An example of a description of a URDMSR is illustrated, which includes an opcode, an operand to be used, a CPUID location for indicating support for the instruction, and the like.

[0055] An example of the format of a read control and / or status register instruction is URDMSR DST, SRC. In some examples, URDMSR is an opcode mnemonic for an instruction to read a control and / or status register and store data from the control and / or status register to a destination register. DST is one or more fields for the location of a destination operand, such as a general purpose register. SRC is one or more fields for the location of a source operand, such as a general purpose register (which is used to store a control and / or status register address). In some examples, the opcode is provided by fields 2403, 3212, or 3404. In some examples, aspects of the source location and / or destination location are provided by one or more of the bits from the prefix 2401 (e.g., R bit, VVVV, etc.) and addressing information 2405 (e.g., reg 2544 ("rrr" and, in some examples, "R" from the prefix), R / M 2546 ("bbb" and, in some examples, "B" from the prefix), SIB byte 2504, etc.), 2018, 2020, 2022, 2024, 2026, etc. In some examples, the "rrr" information is used at least in part to identify the SRC, and the "bbb" information is used at least in part to identify the DST. In some examples, the "rrr" information is used at least in part to identify the DST, and the "bbb" information is used at least in part to identify the SRC.

[0056] An example of a format for a read control and / or status register instruction is URDMSR DST,IMM. In some examples, URDMSR is an opcode mnemonic for an instruction to read a control and / or status register and store data from the control and / or status register to a destination register. DST is one or more fields for the location of a destination operand, such as a general purpose register. IMM is a field (e.g., a 32-bit field) that encodes the control and / or status register address. In some examples, the opcode is provided by fields 2403, 3212, or 3404. In some examples, aspects of the source location and / or destination location are provided by one or more of the bits from the prefix 2401 (e.g., R bit, VVVV, etc.) and addressing information 2405 (e.g., reg 2544 ("rrr" and, in some examples, "R" from the prefix), R / M 2546 ("bbb" and, in some examples, "B" from the prefix), SIB byte 2504, etc.), 2018, 2020, 2022, 2024, 2026, etc., and 2409 for immediate values. In some examples, the "rrr" information is used at least in part to identify the DST, and in some examples, the "bbb" information is used at least in part to identify the DST.

[0057] Figure 3 An example execution of a Write Control and / or Status Register (e.g., UWRMSR) instruction is illustrated. In some examples, the instruction may be executed at any privilege level, e.g., user (e.g., level 3) and hypervisor / kernel (e.g., level 0). In general, execution of a single Write Control and / or Status Register instruction causes execution circuitry to write the contents of a general purpose register (e.g., GPR 331) or memory to a control and / or status register (e.g., 64-bit model specific register (MSR)) 301 specified by an address in a destination operand (register or immediate) 325 at any current privilege level (CPL).

[0058] When the address of the control and / or status register is stored in the register, in some examples, the high-order 32 bits of the register specifying the control and / or status register address are ignored. It should be noted that, depending on the example, the address may be a physical address or a linear address. In some examples, specifying a reserved or unimplemented control and / or status register address causes a general protection exception. In some examples, if less than 64 bits are implemented in the control and / or status register being read, the value returned in the unimplemented bit position is undefined.

[0059] In some examples, most (if not all) control and / or status registers are potentially readable by UWRMSR, but under the control of the operating system (OS). The OS precisely controls which control and / or status registers can be read by programming a bitmap (e.g., user-level access control bitmap 323) or other data structure in memory. Specifically, the OS programs the user-level access control and / or status register 321 (e.g., in some examples, referred to as IA32_USER_MSR_CTL[63:12]) to contain the aligned (linear) address of the bitmap. The control and / or status register also has an enable bit (e.g., bit 0), which the OS sets to enable the URDMSR and / or UWRMSR instructions for the thread.

[0060] The access control logic 319 uses the user-level access control and / or status register data 315 to index information related to a particular control and / or status register in the user-level access control bitmap data 317 based on the address information of the control and / or status register provided by the control and / or status register address source 325. When the user-level access control bitmap data 317 indicates that access is allowed for the address of the control and / or status register, the register read and write circuit 315 will not subsequently write data to the addressed control and / or status register (control and / or status register source 301). Although the access control logic 319 is shown as part of the execution circuit 311, in some examples, the access control logic 319 is part of the decoder (e.g., when immediate values ​​are used, their access control aspects may occur before the execution circuit 311 intervenes).

[0061] An example of a format for a read control and / or status register instruction is UWRMSR DST, SRC. In some examples, UWRMSR is the opcode mnemonic for an instruction that writes a control and / or status register using data from a general purpose register. SRCE is one or more fields for the location of a source operand, such as a general purpose register. DST is one or more fields for the location of a destination operand, such as a general purpose register (which is used to store a control and / or status register address). In some examples, the opcode is provided by fields 2403, 3212, or 3404. In some examples, aspects of the source location and / or destination location are provided by one or more of the bits from the prefix 2401 (e.g., R bit, VVVV, etc.) and addressing information 2405 (e.g., reg 2544 ("rrr" and, in some examples, "R" from the prefix), R / M 2546 ("bbb" and, in some examples, "B" from the prefix), SIB byte 2504, etc.), 2018, 2020, 2022, 2024, 2026, etc. In some examples, the "rrr" information is used at least in part to identify the SRC, and the "bbb" information is used at least in part to identify the DST. In some examples, the "rrr" information is used at least in part to identify the DST, and the "bbb" information is used at least in part to identify the SRC.

[0062] An example of a format for a read control and / or status register instruction is UWRMSR DST,IMM. In some examples, UWRMSR is an opcode mnemonic for an instruction that writes a control and / or status register using data from a general purpose register. DST is one or more fields for the location of a destination operand, such as a general purpose register (which is used to store a control and / or status register address). IMM is a field (e.g., a 32-bit field) that encodes the control and / or status register address. In some examples, the opcode is provided by fields 2403, 3212, or 3404. In some examples, the opcode is provided by fields 2403, 3212, or 3404. In some examples, aspects of the source location and / or destination location are provided by one or more of the bits from the prefix 2401 (e.g., R bit, VVVV, etc.) and addressing information 2405 (e.g., reg 2544 ("rrr" and, in some examples, "R" from the prefix), R / M 2546 ("bbb" and, in some examples, "B" from the prefix), SIB byte 2504, etc.), 2018, 2020, 2022, 2024, 2026, etc., and 2409 for immediate values. In some examples, the "rrr" information is used at least in part to identify the SRC, and in some examples, the "bbb" information is used at least in part to identify the SRC.

[0063] Figure 4 An example of a description of a UWRMSR is illustrated, which includes an opcode, an operation object to be used, a CPUID location for indicating support for the instruction, and the like.

[0064] Figure 5 An example of a user-level access control bitmap for determining when reading and / or writing of control and / or status registers is allowed is shown. In this example, the bitmap is divided into two regions (e.g., two 2KB regions). Note that separate bitmaps or a single bitmap can be used. In some examples, the lower half of the bitmap is used for URDMSR and the upper half is used for UWRMSR. Each region supports control and / or status registers with 14-bit addresses. These read and write bitmaps enable the OS to precisely control which MSRs can be read and / or written by the application, and which MSRs cannot be read and / or written by the application.

[0065] The bitmap contains one bit for each control and / or status register address in a particular range (e.g., in the range 0H-3FFFH). In some examples, a bitmap value of 0 indicates that access to the control and / or status register is to be blocked, and a value of 1 indicates that access is allowed. Of course, the opposite convention may be used. A request to read a register address outside of this range (e.g., beyond 3FFF) will cause an exception (e.g., a general protection fault).

[0066] Setting the bit allows URDMSR to the corresponding MSR (if the CPU supports URDMSR). Therefore, the bitmap allows the OS to both select read access and control read access on a per-MSR basis. The OS can choose to specify different bitmaps for different apps by context switching user-level access control and / or status register 121.

[0067] Access to these bitmaps of URDMSR and / or UWRMSR are implicit supervisor mode accesses. This means that they use supervisor privileges regardless of the CPL. If the OS wants applications to know which MSRs are permitted, it can create an alias to the bitmap in user address space; but the alias should be mapped as read-only to prevent applications from overwriting the bitmap.

[0068] In some examples, URDMSR and UWRMSR should not speculatively allow reading or writing of any state that is not allowed to be accessed. In some examples, a virtual machine monitor (VMM) exposes enumeration of these instructions to the guest, allowing the guest to access user-level access control and / or status register 121 and to switch the MSR on context switch.

[0069] As shown, the user-level access control and / or status register 121 provides an indication of the enabling of the URDMSR and UWRMSR instructions and includes a page-aligned linear address of the user-level access control bitmap (in other words, a pointer to the bitmap). In this example, the user-level access control bitmap data 117 is shown. Note that this also indicates in some examples that the control and / or status register URDMSR and UWRMSR instruction indexes are the same. Additionally, the indexes are the same for user mode and supervisor mode.

[0070] When a control and / or status register address (from a control and / or status register address source 125) for a URDMSR or UWRMSR instruction is provided, the control and / or status register address is used to index (using a byte offset) into a bitmap and a byte-sized entry for the bitmap, for addressing a particular bit using a bit offset. Each of the bits of the byte-sized entry corresponds to a control and / or status register. When a particular bit is 1, access is allowed. And when a particular bit is 0, access is denied. Note that opposite conventions, entries of different sizes, offsets, etc. may be used.

[0071] Figure 6 An example of a method for processing a URDMSR instruction is shown. In some examples, aspects of the method include using simulation or binary translation. In some examples, aspects of the method are performed without simulation or binary translation. For example, a processor core, pipeline, and / or simulation / translation layer as shown in FIG. 21(B) may perform aspects of the method.

[0072] At 601, an instance of a single instruction is obtained. For example, a URDMSR instruction is obtained. The single instruction of the first instruction set architecture has fields for an opcode, an indication of a source register operand for storing a control and / or status register address, and an indication of a destination register operand, wherein the opcode is used to indicate that when access to the control and / or status register is allowed, the execution circuit is to read data from the control and / or status register whose identity is stored in the source operand and write data to the indicated destination register operand, regardless of the current privilege level.

[0073] At 602, the retrieved single instruction of the first instruction set architecture is translated into one or more instructions of the second instruction set architecture. In some examples, the translation is performed by a translation and / or emulation layer of software. In some examples, the translation is performed by a software program such as Fig.25 The instruction converter 2512 is shown to perform. In some examples, the translation is performed by hardware translation circuitry.

[0074] At 603, one or more translated instructions of the second instruction set architecture or an instance of a single instruction of the first instruction set architecture are decoded. For example, the instruction(s) are decoded by a decoder circuit, such as decoder circuit 1305 or decode circuit 2140 described in detail herein. In some examples, the operations of translation and decoding at 602 and 603 are combined.

[0075] At 605, data values ​​associated with source operand(s) of the decoded one or more instructions of the second instruction set architecture are retrieved and the one or more instructions are scheduled. For example, when one or more of the source operands are memory operands, data is retrieved from the indicated memory location.

[0076] At 607, the decoded instruction(s) of the second instruction set architecture are executed by execution circuitry (hardware) such as Figure 1 The execution circuit 111 shown, Fig.13 21(B)) to perform the operation(s) indicated by the opcode of the single instruction of the first instruction set architecture. For the URDMSR instruction, execution will cause the execution circuitry to perform at least the combined Figure 1 Describes the operation.

[0077] In some examples, at 609 , the instruction is committed or retired.

[0078] Figure 7 An example of a method for processing a URDMSR instruction is shown. In some examples, aspects of the method include using simulation or binary translation. In some examples, aspects of the method are performed without simulation or binary translation. For example, a processor core, pipeline, and / or simulation / translation layer as shown in FIG. 21(B) may perform aspects of the method.

[0079] At 701, an instance of a single instruction is obtained. For example, a URDMSR instruction is obtained. The instance of the single instruction of the first instruction set architecture has fields for an opcode, an immediate value for encoding an indication of a source register operand to store a control and / or status register address, and an indication of a destination register operand, wherein the opcode is used to indicate that when access to the control and / or status register is allowed, the execution circuit is to read data from the control and / or status register whose identity is encoded in the immediate value and write data to the indicated destination register operand, regardless of the current privilege level.

[0080] At 702, the retrieved single instruction of the first instruction set architecture is translated into one or more instructions of the second instruction set architecture. In some examples, the translation is performed by a translation and / or emulation layer of software. In some examples, the translation is performed by a software program such as Fig.25 The instruction converter 2512 is shown to perform. In some examples, the translation is performed by hardware translation circuitry.

[0081] At 703, one or more translated instructions of the second instruction set architecture or an instance of a single instruction of the first instruction set architecture are decoded. For example, the instruction(s) are decoded by a decoder circuit, such as decoder circuit 1305 or decode circuit 2140 described in detail herein. In some examples, the operations of translation and decoding at 702 and 703 are combined.

[0082] At 705, data values ​​associated with the source operand(s) of the decoded one or more instructions of the second instruction set architecture are retrieved and the one or more instructions are scheduled. For example, when one or more of the source operands are memory operands, data is retrieved from the indicated memory location.

[0083] At 707, the decoded instruction(s) of the second instruction set architecture are executed by execution circuitry (hardware) such as Figure 1 The execution circuit 111 shown, Fig.13 21(B)) to perform the operation(s) indicated by the opcode of the single instruction of the first instruction set architecture. For the URDMSR instruction, execution will cause the execution circuitry to perform at least the combined Figure 1 Describes the operation.

[0084] In some examples, at 709 , the instruction is committed or retired.

[0085] Figure 8 An example of a method for processing a UWRMSR instruction is shown. In some examples, aspects of the method include using emulation or binary translation. In some examples, aspects of the method are performed without emulation or binary translation. For example, a processor core, pipeline, and / or emulation / translation layer as shown in FIG. 21(B) may perform aspects of the method.

[0086] At 801, an instance of a single instruction is obtained. For example, a UWRMSR instruction is obtained. The instance of the single instruction of the first instruction set architecture has fields for an opcode, an indication of a destination register operand for storing a control and / or status register address, and an indication of a source register operand, wherein the opcode is used to indicate that when access to the control and / or status register is allowed, the execution circuit is to read data from the source register operand and store the data in the control and / or status register whose identity is stored in the destination operand, regardless of the current privilege level.

[0087] At 802, the retrieved single instruction of the first instruction set architecture is translated into one or more instructions of the second instruction set architecture. In some examples, the translation is performed by a translation and / or emulation layer of software. In some examples, the translation is performed by a software program such as Fig.25 The instruction converter 2512 is shown to perform. In some examples, the translation is performed by hardware translation circuitry.

[0088] At 803, one or more translated instructions of the second instruction set architecture or an instance of a single instruction of the first instruction set architecture are decoded. For example, the instruction(s) are decoded by a decoder circuit, such as decoder circuit 1305 or decode circuit 2140 described in detail herein. In some examples, the operations of translation and decoding at 802 and 803 are combined.

[0089] At 805, data values ​​associated with the source operand(s) of the decoded one or more instructions of the second instruction set architecture are retrieved and the one or more instructions are scheduled. For example, when one or more of the source operands are memory operands, data is retrieved from the indicated memory location.

[0090] At 807, the decoded instruction(s) of the second instruction set architecture are executed by execution circuitry (hardware) such as Figure 3 The execution circuit 311 shown, Fig.13 21(B)) to perform the operation(s) indicated by the opcode of the single instruction of the first instruction set architecture. For the UWRMSR instruction, execution will cause the execution circuitry to perform at least the combined Figure 3 Describes the operation.

[0091] In some examples, at 809 , the instruction is committed or retired.

[0092] Fig. 9An example of a method for processing a UWRMSR instruction is shown. In some examples, aspects of the method include using emulation or binary translation. In some examples, aspects of the method are performed without emulation or binary translation. For example, a processor core, pipeline, and / or emulation / translation layer as shown in FIG. 21(B) may perform aspects of the method.

[0093] At 901, an instance of a single instruction is obtained. For example, a UWRMSR instruction is obtained. The instance of a single instruction of a first instruction set architecture has fields for an opcode, an immediate value encoding an indication of a destination control and / or status register operand, and an indication of a source register operand, wherein the opcode is used to indicate that execution circuitry is to read data from a source register and store the data to a destination control and / or status register whose identity is encoded in the immediate value when access to the control and / or status register is allowed, regardless of a current privilege level.

[0094] At 902, the retrieved single instruction of the first instruction set architecture is translated into one or more instructions of the second instruction set architecture. In some examples, the translation is performed by a translation and / or emulation layer of software. In some examples, the translation is performed by a software program such as Fig.25 The instruction converter 2512 is shown to perform. In some examples, the translation is performed by hardware translation circuitry.

[0095] At 903, one or more translated instructions of the second instruction set architecture or an instance of a single instruction of the first instruction set architecture are decoded. For example, the instruction(s) are decoded by a decoder circuit, such as decoder circuit 1305 or decode circuit 2140 described in detail herein. In some examples, the operations of translation and decoding at 902 and 903 are combined.

[0096] At 905, data values ​​associated with source operand(s) of the decoded one or more instructions of the second instruction set architecture are retrieved and the one or more instructions are scheduled. For example, when one or more of the source operands are memory operands, data is retrieved from the indicated memory location.

[0097] At 907, the decoded instruction(s) of the second instruction set architecture are executed by execution circuitry (hardware) such as Figure 3 The execution circuit 311 shown, Fig.1321(B)) to perform the operation(s) indicated by the opcode of the single instruction of the first instruction set architecture. For the UWRMSR instruction, execution will cause the execution circuitry to perform at least the combined Figure 3 Describes the operation.

[0098] In some examples, at 909 , the instruction is committed or retired.

[0099] In some examples, execution of user MSR instructions checks the virtual machine extension MSR bitmap. In some examples, no new virtual machine control is needed because a traditional VMM will not allow the guest to enable these instructions. The VMM only needs to expose the enumeration to the guest, allowing the guest to access IA32_USER_MSR_CTL (user MSR bitmap pointer) and switch this MSR on context switch.

[0100] In some existing architectures, the immediate value is an 8-bit value. As noted in the discussion above, in some examples, the immediate value used with the UWRMSR or URDMSR instructions will require an immediate value greater than 8 bits. In some examples, the immediate values ​​of these instructions are 32-bit values.

[0101] Previously, to support 32-bit values, memory or registers had to be used, which took time to access. Allowing instructions with 32-bit immediates to be executed without having to be loaded into registers. Immediate values ​​can be used at issue time to look up the PLA in the front end of the machine, greatly improving performance. Freeing up registers for other uses.

[0102] Fig.10 An example of an instruction format that supports a UWRMSR or URDMSR instruction when a 32-bit immediate value is not used is illustrated. As shown, an instruction may include multiple components, including but not limited to one or more fields for the following: one or more prefixes 1001, an opcode 1003, addressing information 1005 (e.g., a register identifier, memory addressing information, etc.), a displacement value 1007, and / or an immediate value 1009. Note that some instructions utilize some or all of the fields in the format, while other instructions may only use the field for the opcode 1003. In some examples, the illustrated order is the order in which these fields are to be encoded, however, it should be understood that in other examples, these fields may be encoded, combined, etc. in a different order.

[0103] The prefix field(s) 1001 modify the instruction when used. In some examples, one or more prefixes are used to repeat string instructions (e.g., 0xF0, 0xF2, 0xF3, etc.), provide segment override (e.g., 0x2E, 0x36, 0x3E, 0x26, 0x64, 0x65, 0x2E, 0x3E, etc.), perform bus lock operations, and / or change the operand (e.g., 0x66) and address size (e.g., 0x67). Certain instructions require mandatory prefixes (e.g., 0x66, 0xF2, 0xF3, etc.). Some of these prefixes may be considered "legacy" prefixes.

[0104] In some examples, prefixes for supporting UWRMSR or URDMSR instructions are shown. In some examples, the prefix is ​​an example of a VEX prefix. In general, the prefix allows instructions to be encoded with more than two operands and allows SIMD vector registers (e.g., vector / SIMD registers 2310) to be longer than 64 bits (e.g., 128 bits and 256 bits).

[0105] In some examples, the format field 1011 (byte 0 1013) contains the value C4H. Byte 1 1015 includes "R", "X", and "B" in bits [7:5], which are the complements of the same value of the first prefix 2401 (A) described in detail later. Bits [4:0] (shown as mmmmm) of byte 1 1015 include content that encodes one or more implicit leading opcode bytes as needed. For example, 00001 implies a leading opcode of 0FH, 00010 implies a leading opcode of 0F38H, 00011 implies a leading opcode of 0F3AH, and so on. In some examples, for instructions that utilize 32-bit immediate values, 00111 is encoded by m-mmmm.

[0106] Bit [7] of byte 2 1017 is used similarly to W of the first prefix 2401 (A), including helping to determine the size of operands that can be promoted. Bit [2] is used to indicate the length (L) of the vector (where a value of 0 is a scalar or 128-bit vector and a value of 1 is a 256-bit vector). Bits [1:0] provide extensibility for the opcode, equivalent to some traditional prefixes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). Bits [6:3], shown as vvvv, may be used to: 1) encode the first source register operand, specified in inverted (1's complement) form, and valid for instructions with 2 or more source operands; 2) encode the destination register operand, specified in 1's complement form, for certain vector shifts; or 3) do not encode any operands, the field is reserved, and should contain a value such as 1111b.

[0107] The opcode field 1003 is used to at least partially define the operation to be performed when the instruction is decoded. In some examples, the length of the primary opcode encoded in the opcode field 1003 is 1, 2, or 3 bytes. In other examples, the primary opcode can be a different length. The additional 3-bit opcode field is sometimes encoded in another field.

[0108] The addressing information field 1005 is used to address one or more operands of the instruction, such as a location in a memory or one or more registers. Instructions using the illustrated prefix may use the MOD R / M field 1002. This field may include a MOD R / MR / M field 1046 for encoding an instruction operand that references a memory address or encoding a destination register operand or a source register operand. Instructions using the prefix may use the MOD R / M reg field 1044 to encode a destination register operand or a source register operand, or may be considered as an opcode extension and not used to encode any instruction operand. Note that bits from the prefix (i.e., B and R from byte 1 1015) may also be needed to encode a register identifier. For more discussion of other aspects of the addressing information 1005, see the later description.

[0109] Some addressing forms use displacement values ​​to generate memory addresses. For example, 比例 Memory addresses may be generated by using a byte*index+base+displacement, index*scale+displacement, r / m+displacement, instruction pointer (RIP / EIP)+displacement, register+displacement, etc. The displacement may be a value of 1 byte, 2 bytes, 4 bytes, etc. In some examples, the displacement field 2407 provides the value. Additionally, in some examples, the displacement factor usage is encoded in the MOD field of the addressing information field 2405, which indicates a compressed displacement scheme for which the displacement value is calculated and stored in the displacement field 2407.

[0110] In some examples, the immediate value field 2409 specifies the immediate value of the instruction. Typically, the immediate value is encoded as a 1-byte value.

[0111] As described above, in some examples, when the m-mmmm of the prefix has a specific value, this is the portion that indicates to the decoder that everything after the MOD R / M field 1002 is to be treated as a 32-bit immediate number. Fig.11 The diagram shows an example of prefix encoding used to indicate a 32-bit immediate. As shown, bits 0-4 of byte 1 1015 of the prefix are set to 00111, which will indicate to the decoder that the format of the bottom portion is correct (ie, a 32-bit immediate number 1113 follows the MOD R / M 1002).

[0112] In some examples, 00111 refers to an opcode map (map 7). Other opcode maps may be used. However, in some examples, the following m-mmm values ​​have defined meanings: 00000: Reserved for future use (will be #UD) 00001: implies 0F leading opcode byte 00010: implies 0F 38 leading opcode byte 00011: implies 0F 3A leading opcode byte

[0113] Fig.12 An example of a method for processing instructions is shown. In some examples, aspects of the method include using simulation or binary translation. In some examples, aspects of the method are performed without simulation or binary translation. For example, a processor core, pipeline, and / or simulation / translation layer as shown in Figure 21 (B) can perform aspects of the method.

[0114] At 1201, an instance of a single instruction is obtained. For example, a UWRMSR instruction is obtained. The instance of the single instruction of the first instruction set architecture has a field for a prefix, one or more fields for an opcode, one or more fields for addressing information for one or more operands, and an immediate field, wherein the opcode is used to instruct the execution circuit to perform one or more specific operations using the one or more operands, and the prefix is ​​used to indicate that the immediate field is a 32-bit value.

[0115] At 1202, the retrieved single instruction of the first instruction set architecture is translated into one or more instructions of the second instruction set architecture. In some examples, the translation is performed by a translation and / or emulation layer of software. In some examples, the translation is performed by a software program such as Fig.25 The instruction converter 2512 is shown to perform. In some examples, the translation is performed by hardware translation circuitry.

[0116] At 1203, one or more translated instructions of the second instruction set architecture or an instance of a single instruction of the first instruction set architecture are decoded. For example, the instruction(s) are decoded by a decoder circuit, such as decoder circuit 1305 or decode circuit 2140 described in detail herein. In some examples, the operations of translation and decoding at 1202 and 1203 are combined. In some examples, due to the settings within the prefix, 32 bits after at least an appropriate subset of the addressing information of one or more operands will be treated as an immediate value.

[0117] In some examples, the decoder circuit includes a PLA. An immediate number is used to index a PLA to determine one or more operations to be performed (e.g., micro-operations, access controls, etc. performed by an execution circuit or other circuits). For example, an immediate number can be disposed so that a determination of whether a control and / or status register can be accessed is made before the execution circuit begins to read and / or write a control and / or status register. Therefore, the immediate number is disposed before reaching the execution circuit. In some examples, one or more operations are performed outside the execution circuit. In some examples, one or more operations are performed by the execution circuit. In some examples, one or more operations are performed by a combination of circuits inside and outside the execution circuit.

[0118] At 1205, data values ​​associated with the source operand(s) of the decoded one or more instructions of the second instruction set architecture are retrieved and the one or more instructions are scheduled. For example, when one or more of the source operands are memory operands, data is retrieved from the indicated memory location.

[0119] At 1207, the decoded instruction(s) of the second instruction set architecture are executed by execution circuitry (hardware) such as Figure 3 The execution circuit 311 shown, Fig.13 21(B)) to perform the operation(s) indicated by the opcode of the single instruction of the first instruction set architecture. For the UWRMSR instruction, execution will cause the execution circuitry to perform at least the combined Figure 3 Describes the operation.

[0120] In some examples, at 1209 , the instructions are committed or retired.

[0121] Fig.13 An example of computing hardware for processing at least UWRMSR and / or URDMSR instructions is shown. As shown, a storage device 1303 stores UWRMSR and / or URDMSR instructions 1301 to be executed. One or more other instructions 1304 may also be stored.

[0122] One of the instructions is received by decoder circuit 1305. For example, decoder circuit 1305 receives the instruction from a fetch circuit (not shown). The instruction may be in any suitable format, such as the following reference format. Fig.24The format described. In some examples, decoder circuit 1305 supports the use of 32-bit immediate values ​​indicated by the prefix. In some examples, decoder circuit 1305 includes a programmable logic array (PLA) that can be indexed by the immediate value. The PLA allows some operations to be performed before the execution circuit. For example, different micro-operations can be selected to handle (one or more) operations indicated by the opcode (such as accessing control and / or status registers, etc.). In these examples, the execution unit does not consume the immediate value.

[0123] A more detailed example of at least one instruction format for the instruction will be described later. Decoder circuit 1305 decodes the instruction into one or more operations. In some examples, the decoding includes generating a plurality of micro-operations to be executed by an execution circuit (such as execution circuit 1309). Decoder circuit 1305 also decodes the instruction prefix.

[0124] In some examples, the register renaming, register allocation and / or scheduling circuitry 1307 provides functionality for one or more of: 1) renaming logical operand values ​​to physical operand values ​​(e.g., a register alias table in some examples), 2) assigning status bits and flags to decoded instructions, and 3) scheduling decoded instructions from an instruction pool for execution by execution circuitry (e.g., using a reservation station in some examples).

[0125] Registers (register file) and / or memory 1308 store data as an operation target of instructions to be operated on by execution circuit 1309. Example register types include packed data registers, general purpose registers (GPRs), and floating point registers.

[0126] The execution circuit 1309 executes the decoded instructions. The execution circuit of the example detailed includes Figure 1 21(B), and execution cluster(s) 2160, etc. Execution of the decoded instruction causes the execution circuitry to perform the operation(s) indicated by the opcode.

[0127] In some examples, retirement / writeback circuitry 1311 architecturally commits the destination register to register or memory 1308 and retires the instruction.

[0128] Some examples utilize the instruction formats described herein. Some examples are implemented in one or more computer architectures, cores, accelerators, etc. Some examples are generated or are IP cores. Some examples utilize simulation and / or translation. Example Architecture

[0129] The description of the example computer architecture is described in detail below. Other system designs and configurations known in the art for laptops, desktop computers, handheld personal computers (PCs), personal digital assistants, engineering workstations, servers, disaggregated servers, network devices, network hubs, switches, routers, 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, various systems or electronic devices that can contain processors and / or other execution logic as disclosed herein are generally suitable. Example System

[0130] Fig.14 An example computing system is illustrated. Multiprocessor system 1400 is an interface system and includes multiple processors or cores, including a first processor 1470 and a second processor 1480 coupled via an interface 1450 such as a point-to-point (PP) interconnect, a fabric, and / or a bus. In some examples, first processor 1470 and second processor 1480 are isomorphic. In some examples, first processor 1470 and second processor 1480 are heterogeneous. Although example system 1400 is shown as having two processors, the system can have three or more processors, or can be a single processor system. In some examples, the computing system is a system on chip (SoC).

[0131] Processors 1470 and 1480 are shown as including integrated memory controller (IMC) circuits 1472 and 1482, respectively. Processor 1470 also includes interface circuits 1476 and 1478; similarly, second processor 1480 includes interface circuits 1486 and 1488. Processors 1470, 1480 can exchange information via interface 1450 using interface circuits 1478, 1488. IMCs 1472 and 1482 couple processors 1470, 1480 to respective memories, namely memory 1432 and memory 1434, which may be portions of main memory locally attached to the respective processors.

[0132] Processors 1470, 1480 can each use interface circuits 1476, 1494, 1486, 1498 to exchange information with a network interface (NW I / F) 1490 via separate interfaces 1452, 1454. Network interface 1490 (e.g., one or more of an interconnect, bus, and / or structure, and in some examples, a chipset) can optionally exchange information with a coprocessor 1438 via interface circuit 1492. In some examples, coprocessor 1438 is a special-purpose processor such as, for example, a high-throughput processor, a network or communication processor, a compression engine, a graphics processor, a general purpose graphics processing unit (GPGPU), a neural-network processing unit (NPU), an embedded processor, and the like.

[0133] A shared cache (not shown) may be included in any processor 1470, 1480, or external to both processors but connected to these processors via an interface (such as, the PP interconnect) so that if the processor is placed in a low power mode, local cache information of either or both processors can be stored in the shared cache.

[0134] The network interface 1490 can be coupled to the first interface 1416 via the interface circuit 1496. In some examples, the first interface 1416 can be an interface such as a peripheral component interconnect (PCI) interconnect, a PCI express interconnect, or another I / O interconnect. In some examples, the first interface 1416 is coupled to a power control unit (PCU) 1417, which may include circuits, software, and / or firmware for performing power management operations related to the processors 1470, 1480, and / or the coprocessor 1438. The PCU 1417 provides control information to a voltage regulator (not shown) so that the voltage regulator generates an appropriate regulated voltage. The PCU 1417 also provides control information to control the generated operating voltage. In various examples, the PCU 1417 may include various power management logic units (circuits) for performing hardware-based power management. Such power management may be entirely controlled by the processor (e.g., by various processor hardware, and which may be triggered by workload and / or power, thermal constraints, or other processor constraints), and / or power management may be performed in response to an external source (such as a platform or power management source or system software).

[0135] PCU 1417 is illustrated as existing as logic separate from processor 1470 and / or processor 1480. In other cases, PCU 1417 may execute on a given one or more cores (not shown) of the cores of processor 1470 or 1480. In some cases, PCU 1417 may be implemented as a (dedicated or general purpose) microcontroller or other control logic configured to execute its own dedicated power management code (sometimes referred to as P-code). In still other examples, the power management operations to be performed by PCU 1417 may be implemented external to the processor, such as by way of a separate power management integrated circuit (PMIC) or another component external to the processor. In still other examples, the power management operations to be performed by PCU 1417 may be implemented within BIOS or other system software.

[0136] Various I / O devices 1414 may be coupled to the first interface 1416 along with a bus bridge 1418, which couples the first interface 1416 to the second interface 1420. In some examples, one or more additional processors 1415 (such as a coprocessor, a high-throughput many integrated core (MIC) processor, a GPGPU, an accelerator (such as a graphics accelerator or a digital signal processing (DSP) unit), a field programmable gate array (FPGA), or any other processor) are coupled to the first interface 1416. In some examples, the second interface 1420 may be a low pin count (LPC) interface. Various devices may be coupled to the second interface 1420, including, for example, a keyboard and / or mouse 1422, a communication device 1427, and a storage circuit 1428. The storage circuit 1428 may be one or more non-transitory machine-readable storage media as described below, such as a disk drive or other mass storage device, which may include instructions / codes and data 1430 in some examples. Further, audio I / O 1424 may be coupled to second interface 1420. Note that other architectures are possible in addition to the point-to-point architecture described above. For example, a system such as multiprocessor system 1400 may implement a multi-drop interconnect or other such architectures instead of a point-to-point architecture.

[0137] Example core architectures, processors, and computer architectures

[0138] Processor cores can be implemented in different ways, for different purposes, and in different processors. For example, implementations of these cores may include: 1) general-purpose in-order cores for general-purpose computing purposes; 2) high-performance general-purpose out-of-order cores for general-purpose computing purposes; 3) special-purpose cores, mainly for graphics and / or scientific (throughput) computing purposes. Implementations of different processors may include: 1) a CPU including one or more general-purpose in-order cores for general-purpose computing purposes and / or one or more general-purpose out-of-order cores for general-purpose computing purposes; and 2) a coprocessor including one or more special-purpose cores mainly for graphics and / or scientific (throughput) computing purposes. These different processors result in different computer system architectures, which may include: 1) coprocessors on separate chips from the CPU; 2) coprocessors on separate dies from the CPU in the same package; 3) coprocessors on the same die as the CPU (in which case such coprocessors are sometimes referred to as dedicated logic, such as integrated graphics and / or scientific (throughput) logic, or as dedicated cores); and 4) systems on a chip (SoCs), which may be included on the same die with the described CPU (sometimes referred to as application core(s) or application processor(s), the coprocessors described above, and additional functionality. An example core architecture is described next, followed by a description of an example processor and computer architecture.

[0139] Fig.15 A block diagram of an example processor and / or Soc 1500 is illustrated, which may have one or more cores and an integrated memory controller. The processor 1500 illustrated in solid line boxes has a single core 1502(A), a system agent unit circuit 1510, and a set of one or more interface controller unit circuits 1516, while the optionally added dashed line boxes illustrate an alternative processor 1500 as having multiple cores 1502(A)-(N), a set of one or more integrated memory control unit circuits 1514 in the system agent unit circuit 1510, dedicated logic 1508, and a set of one or more interface controller unit circuits 1516. Note that the processor 1500 may be Fig.14 One of the processors 1470 or 1480 or the coprocessors 1438 or 1415.

[0140] Thus, different implementations of processor 1500 may include: 1) a CPU, where dedicated logic 1508 is integrated graphics and / or scientific (throughput) logic (which may include one or more cores, not shown), and cores 1502(A)-(N) are one or more general purpose cores (e.g., general purpose in-order cores, general purpose out-of-order cores, or a combination of the two); 2) a coprocessor, where cores 1502(A)-(N) are a large number of dedicated cores primarily for graphics and / or scientific (throughput) purposes; and 3) a coprocessor, where cores 1502(A)-(N) are a large number of general purpose in-order cores. Thus, processor 1500 may be a general purpose processor, a coprocessor, or a special purpose processor, such as a network or communication processor, a compression engine, a graphics processor, a GPGPU (general purpose graphics processing unit), a high throughput many integrated core (MIC) coprocessor (including 30 or more cores), an embedded processor, etc. The processor may be implemented on one or more chips. Processor 1500 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, complementary metal oxide semiconductor (CMOS), bipolar CMOS (BiCMOS), P-type metal oxide semiconductor (PMOS), or n-type metal oxide semiconductor (NMOS).

[0141] The memory hierarchy includes one or more levels of cache unit circuits 1504(A)-(N) within the cores 1502(A)-(N), a set of one or more shared cache unit circuits 1506, and external memory (not shown) coupled to the set of integrated memory controller unit circuits 1514. The set of one or more shared cache unit circuits 1506 may include one or more intermediate level caches, such as level 2 (L2), level 3 (L3), level 4 (4), or other levels of cache, such as last level cache (LLC), and / or combinations thereof. While in some examples, an interface network circuit 1512 (e.g., a ring interconnect) provides an interface to the dedicated logic 1508 (e.g., integrated graphics logic), the set of shared cache unit circuits 1506, and the system agent unit circuit 1510, alternative examples use any number of well-known techniques to provide interfaces to these units. In some examples, coherency is maintained between one or more circuits in the shared cache unit circuits 1506 and the cores 1502(A)-(N). In some examples, interface controller unit circuit 1516 couples core 1502 to one or more other devices 1518, such as one or more I / O devices, storage, one or more communication devices (e.g., wireless networking, wired networking, etc.).

[0142] In some examples, one or more of the cores 1502(A)-(N) have multi-threading capabilities. System agent unit circuitry 1510 includes those components that coordinate and operate the cores 1502(A)-(N). System agent unit circuitry 1510 may include, for example, power control unit (PCU) circuitry and / or display unit circuitry (not shown). The PCU may be (or may include) logic and components required to regulate the power state of the cores 1502(A)-(N) and / or the dedicated logic 1508 (e.g., integrated graphics logic). The display unit circuitry is used to drive one or more externally connected displays.

[0143] The cores 1502(A)-(N) are homogeneous with respect to an instruction set architecture (ISA). Alternatively, the cores 1502(A)-(N) may be heterogeneous with respect to an ISA; that is, a subset of the cores 1502(A)-(N) may be capable of executing an ISA, while other cores may be capable of executing only a subset of the ISA or another ISA.

[0144] Fig.161 is a block diagram illustrating a computing system 1600 configured to implement one or more aspects of the examples described herein. The computing system 1600 includes a processing subsystem 1601 having one or more processors 1602 and a system memory 1604 communicating via an interconnect path, which may include a memory hub 1605. The memory hub 1605 may be a separate component within a chipset component, or may be integrated within one or more processors 1602. The memory hub 1605 is coupled to an I / O subsystem 1611 via a communication link 1606. The I / O subsystem 1611 includes an I / O hub 1607, which may enable the computing system 1600 to receive input from one or more input devices 1608. In addition, the I / O hub 1607 may enable a display controller (which may be included in the one or more processors 1602) to provide output to one or more display devices 1610A. In some examples, one or more display devices 1610A coupled to I / O hub 1607 may include local, internal, or embedded display devices.

[0145] The processing subsystem 1601 includes, for example, one or more parallel processors 1612 coupled to a memory hub 1605 via a bus or other communication link 1613. The communication link 1613 can be one of any number of standard-based communication link technologies or protocols, such as but not limited to PCI Express, or can be a vendor-specific communication interface or communication fabric. The one or more parallel processors 1612 can form a parallel or vector processing system in a computational concentration that can include a large number of processing cores and / or processing clusters, such as, for example, many integrated core (MIC) processors. For example, the one or more parallel processors 1612 form a graphics processing subsystem that can output pixels to one of the one or more display devices 1610A coupled via the I / O hub 1607. The one or more parallel processors 1612 may also include a display controller and a display interface (not shown) for enabling direct connection to one or more display devices 1610B.

[0146] Within the I / O subsystem 1611, a system storage unit 1614 may be connected to the I / O hub 1607 to provide a storage mechanism for the computing system 1600. The I / O switch 1616 may be used to provide an interface mechanism to enable connection between the I / O hub 1607 and other components, such as a network adapter 1618 and / or a wireless network adapter 1619 that may be integrated into the platform, and various other devices that may be added via one or more plug-in devices 1620. The (one or more) plug-in devices 1620 may also include, for example, one or more external graphics processor devices, graphics cards, and / or computing accelerators. The network adapter 1618 may be an Ethernet adapter or another wired network adapter. The wireless network adapter 1619 may include one or more of the following: Wi-Fi, Bluetooth, near field communication (NFC), or other network devices including one or more wireless radio devices.

[0147] The computing system 1600 may include other components not explicitly shown, including USB or other port connections, optical storage drives, video capture devices, etc., which may also be connected to the I / O hub 1607. Fig.16 The communication paths for interconnecting the various components in the system may be implemented using any suitable protocol, such as a PCI (Peripheral Component Interconnect) based protocol (e.g., PCI Express), or any other bus or point-to-point communication interface and / or protocol(s), such as NVLink high-speed interconnect, Compute Express Link, or the like. TM (ComputeExpress Link TM , CXL TM) (e.g., CXL.mem), Infinity Fabric (IF), Ethernet (IEEE802.3), remote direct memory access (RDMA), InfiniBand, Internet Wide Area RDMA Protocol (iWARP), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), quick UDP Internet Connections (QUIC), RDMA over Converged Ethernet (RoCE), Intel Quick Path Interconnect (QPI), Intel Ultra Path Interconnect (UPI), Intel On-Chip System Fabric (IOSF), Omnipath, HyperTransport, Advanced Microcontroller Bus Architecture (AMBA) interconnect, OpenCAPI, Gen-Z, Cache Coherent Interconnect for Accelerators The data may be copied or stored to a virtualized storage node using protocols such as NVMe (non-volatile memory express over Fabrics, NVME-oF) or NVMe.

[0148] One or more parallel processors 1612 may include circuits optimized for graphics and video processing (including, for example, video output circuits) and constitute a graphics processing unit (GPU). Alternatively or additionally, described in more detail herein, one or more parallel processors 1612 may include circuits optimized for general-purpose processing while retaining the underlying computing architecture. The components of the computing system 1600 may be integrated on a single integrated circuit with one or more other system elements. For example, one or more parallel processors 1612, a memory hub 1605, (one or more) processors 1602, and an I / O hub 1607 may be integrated into a system-on-chip (SoC) integrated circuit. Alternatively, the components of the computing system 1600 may be integrated into a single package to form a system-in-package (SIP) configuration. In some examples, at least a portion of the components of the computing system 1600 may be integrated into a multi-chip module (MCM), which may be interconnected with other multi-chip modules into a modular computing system.

[0149] It will be appreciated that the computing system 1600 shown herein is illustrative, and variations and modifications are possible. The connection topology, including the number and arrangement of bridges, the number of (one or more) processors 1602, and the number of (one or more) parallel processors 1612, may be modified as desired. For example, the system memory 1604 may be connected to the (one or more) processors 1602 directly rather than through a bridge, while other devices communicate with the system memory 1604 via the memory hub 1605 and the (one or more) processors 1602. In other alternative topologies, the (one or more) parallel processors are connected to the I / O hub 1607 or directly to one of the one or more processors 1602, rather than to the memory hub 1605. In other examples, the I / O hub 1607 and the memory hub 1605 may be integrated into a single chip. It is also possible for two or more sets of processors 1602 to be attached via multiple slots, which may be coupled to two or more instances of (one or more) parallel processors 1612.

[0150] Some of the specific components shown herein are optional and may not be included in all implementations of computing system 1600. For example, any number of plug-in cards or peripherals may be supported, or some components may be eliminated. In addition, some architectures may be specific to the Fig.16 Different terminology is used for components similar to those illustrated in FIG. 16. For example, memory hub 1605 may be referred to as a north bridge in some architectures, while I / O hub 1607 may be referred to as a south bridge.

[0151] Fig.17AAn example of a parallel processor 1700 is shown. The parallel processor 1700 may be a GPU, a GPGPU, etc. as described herein. The various components of the parallel processor 1700 may be implemented using one or more integrated circuit devices, such as a programmable processor, an application specific integrated circuit (ASIC), or a field programmable gate array (FPGA). The illustrated parallel processor 1700 may be Fig.16 One or more of the parallel processor(s) 1612 shown in .

[0152] Parallel processor 1700 includes parallel processing unit 1702. Parallel processing unit includes I / O unit 1704 that enables communication with other devices, including other instances of parallel processing unit 1702. I / O unit 1704 can be directly connected to other devices. For example, I / O unit 1704 is connected to other devices via the use of a hub or switch interface (such as, memory hub 1605). The connection between memory hub 1605 and I / O unit 1704 forms a communication link 1613. Within parallel processing unit 1702, I / O unit 1704 is connected to host interface 1706 and memory cross switch 1716, wherein host interface 1706 receives commands related to performing processing operations and memory cross switch 1716 receives commands related to performing memory operations.

[0153] When the host interface 1706 receives the command buffer via the I / O unit 1704, the host interface 1706 can direct the work operations for executing those commands to the front end 1708. In some examples, the front end 1708 is coupled with a scheduler 1710, which is configured to distribute commands or other work items to the processing cluster array 1712. The scheduler 1710 ensures that the processing cluster array 1712 is properly configured and in a valid state before the task is distributed to the processing clusters in the processing cluster array 1712. The scheduler 1710 can be implemented via firmware logic executed on a microcontroller. The microcontroller-implemented scheduler 1710 can be configured to perform complex scheduling and work distribution operations at coarse and fine granularity, thereby achieving fast preemption and context switching of threads executed on the processing cluster array 1712. Preferably, the host software can confirm the workload for scheduling on the processing cluster array 1712 via one of a plurality of graphics processing doorbells. In other examples, polling for new workloads or interrupts may be used to identify or indicate the availability of work to be performed. The workload may then be automatically distributed across the processing cluster array 1712 by the scheduler 1710 logic within the scheduler microcontroller.

[0154] The processing cluster array 1712 may include up to "N" processing clusters (e.g., cluster 1714A, cluster 1714B to cluster 1714N). Each cluster 1714A-1714N in the processing cluster array 1712 may execute a large number of concurrent threads. The scheduler 1710 may use various scheduling and / or work distribution algorithms to assign work to the clusters 1714A-1714N in the processing cluster array 1712, which may vary depending on the workload generated for each type of program or calculation. Scheduling may be handled dynamically by the scheduler 1710, or may be partially assisted by compiler logic during the compilation of program logic configured for execution by the processing cluster array 1712. Optionally, different clusters 1714A-1714N in the processing cluster array 1712 may be assigned to process different types of programs or to perform different types of calculations.

[0155] Processing cluster array 1712 may be configured to perform various types of parallel processing operations. For example, processing cluster array 1712 is configured to perform general-purpose parallel computing operations. For example, processing cluster array 1712 may include logic for performing processing tasks including filtering of video and / or audio data, performing modeling operations including physical operations, and performing data transformations.

[0156] Processing cluster array 1712 is configured to perform parallel graphics processing operations. In such examples where parallel processor 1700 is configured to perform graphics processing operations, processing cluster array 1712 may include additional logic for supporting the execution of such graphics processing operations, including but not limited to texture sampling logic for performing texture operations, and tessellation logic and other vertex processing logic. In addition, processing cluster array 1712 may be configured to execute graphics processing related shader programs, such as but not limited to vertex shaders, tessellation shaders, geometry shaders, and pixel shaders. Parallel processing unit 1702 may transfer data from system memory via I / O unit 1704 for processing. During processing, the transferred data may be stored in on-chip memory (e.g., parallel processor memory 1722) during processing, and then the data may be written back to system memory.

[0157] In examples where parallel processing units 1702 are used to perform graphics processing, scheduler 1710 may be configured to divide the processing workload into tasks of approximately equal size to better enable distribution of graphics processing operations to multiple clusters 1714A-1714N in processing cluster array 1712. In some of these examples, portions of processing cluster array 1712 may be configured to perform different types of processing. For example, a first portion may be configured to perform vertex shading and topology generation, a second portion may be configured to perform tessellation and geometry shading, and a third portion may be configured to perform pixel shading or other screen space operations to produce a rendered image for display. Intermediate data generated by one or more of clusters 1714A-1714N may be stored in a buffer to allow the intermediate data to be transferred between clusters 1714A-1714N for further processing.

[0158] During operation, the processing cluster array 1712 may receive processing tasks to be executed via the scheduler 1710, which receives commands defining the processing tasks from the front end 1708. For graphics processing operations, the processing tasks may include data to be processed, such as surface (patch) data, primitive data, vertex data, and / or pixel data, and state parameters and commands defining how the data is to be processed (e.g., what program is to be executed). The scheduler 1710 may be configured to fetch an index corresponding to the task, or may receive the index from the front end 1708. The front end 1708 may be configured to ensure that the processing cluster array 1712 is configured to a valid state before a workload specified by an incoming command buffer (e.g., a batch buffer, a push buffer, etc.) is initiated.

[0159] Each of the one or more instances of parallel processing unit 1702 may be coupled to parallel processor memory 1722. Parallel processor memory 1722 may be accessed via memory crossbar switch 1716, which may receive memory requests from processing cluster array 1712 and I / O unit 1704. Memory crossbar switch 1716 may access parallel processor memory 1722 via memory interface 1718. Memory interface 1718 may include a plurality of partition units (e.g., partition unit 1720A, partition unit 1720B, up to partition unit 1720N), each of which may be coupled to a portion (e.g., memory unit) of parallel processor memory 1722. The number of partition units 1720A-1720N may be configured to be equal to the number of memory units, such that a first partition unit 1720A has a corresponding first memory unit 1724A, a second partition unit 1720B has a corresponding second memory unit 1724B, and an Nth partition unit 1720N has a corresponding Nth memory unit 1724N. In other examples, the number of partition units 1720A-1720N may not be equal to the number of memory devices.

[0160] The memory units 1724A-1724N may include various types of memory devices, including dynamic random-access memory (DRAM) or graphics random access memory, such as synchronous graphics random access memory (SGRAM), including graphics double data rate (GDDR) memory. Optionally, the memory units 1724A-1724N may also include 3D stacked memory, including but not limited to high bandwidth memory (HBM). Those skilled in the art will appreciate that the specific implementation of the memory units 1724A-1724N may vary and may be selected from one of a variety of conventional designs. Render targets such as frame buffers or texture maps may be stored across the memory units 1724A-1724N, allowing the partition units 1720A-1720N to write portions of each render target in parallel to efficiently use the available bandwidth of the parallel processor memory 1722. In some examples, local instances of parallel processor memory 1722 may be eliminated in favor of a unified memory design utilizing system memory in conjunction with local cache memory.

[0161] Optionally, any of the clusters 1714A-1714N in the processing cluster array 1712 has the capability to process data to be written to any of the memory units 1724A-1724N within the parallel processor memory 1722. The memory crossbar 1716 may be configured to transfer the output of each cluster 1714A-1714N to any partition unit 1720A-1720N or to another cluster 1714A-1714N, which may perform additional processing operations on the output. Each cluster 1714A-1714N may communicate with a memory interface 1718 via the memory crossbar 1716 to read from or write to various external memory devices. In one example with a memory crossbar switch 1716, the memory crossbar switch 1716 has connections to a memory interface 1718 to communicate with the I / O unit 1704 and has connections to a local instance of a parallel processor memory 1722, thereby enabling processing units within different processing clusters 1714A-1714N to communicate with system memory or other memory that is not local to the parallel processing unit 1702. In general, the memory crossbar switch 1716 may be able to separate traffic flows between the clusters 1714A-1714N and the partition units 1720A-1720N using virtual channels, for example.

[0162] Although a single instance of parallel processing unit 1702 is illustrated within parallel processor 1700, any number of instances of parallel processing unit 1702 may be included. For example, multiple instances of parallel processing unit 1702 may be provided on a single plug-in card, or multiple plug-in cards may be interconnected. For example, parallel processor 1700 may be a plug-in device, such as, Fig.16 Plug-in device 1620, which can be a graphics card (such as a discrete graphics card including one or more GPUs, one or more memory devices, and device-to-device or network or structure interfaces). Different instances of parallel processing unit 1702 can be configured to interoperate even if different instances have different numbers of processing cores, different amounts of local parallel processor memory, and / or other configuration differences. Optionally, some instances of parallel processing unit 1702 may include higher precision floating point units relative to other instances. Systems including one or more instances of parallel processing unit 1702 or parallel processor 1700 can be implemented in various configurations and form factors, including but not limited to desktop computers, laptop computers, or handheld personal computers, servers, workstations, game consoles, and / or embedded systems. The orchestrator can use one or more of the following to form a composite node for workload execution: decomposed processor resources, cache resources, memory resources, storage resources, and networking resources.

[0163] In some examples, the parallel processing unit 1702 can be partitioned into multiple instances. Those multiple instances can be configured to execute workloads associated with different clients in an isolated manner, so that a predetermined quality of service is provided for each client. For example, each cluster 1714A-1714N can be partitioned and isolated from other clusters, thereby allowing the processing cluster array 1712 to be divided into multiple computing partitions or instances. In such a configuration, the workload executed on the isolated partition is protected from errors or errors associated with different workloads executed on different partitions. Partition units 1720A-1720N can be configured to enable dedicated paths and / or isolated paths to the memory of the cluster 1714A-1714N associated with the corresponding computing partition. This data path isolation enables the computing resources within the partition to communicate with one or more assigned memory units 1724A-1724N without being disturbed by the activities of other partitions.

[0164] Fig. 17B is a block diagram of the partition unit 1720. The partition unit 1720 may be Fig.17A 1720N, and the partition unit 1720A-1720N is an example of a partition unit. As illustrated, the partition unit 1720 includes an L2 cache 1721, a frame buffer interface 1725, and an ROP 1726 (raster operation unit). The L2 cache 1721 is a read / write cache configured to perform load and store operations received from the memory crossbar switch 1716 and the ROP 1726. Read misses and urgent writeback requests are output by the L2 cache 1721 to the frame buffer interface 1725 for processing. Updates may also be sent to the frame buffer via the frame buffer interface 1725 for processing. In some examples, the frame buffer interface 1725 communicates with a memory unit in a parallel processor memory (such as, for example, within the parallel processor memory 1722). Fig.17A Partition unit 1720 may also additionally or alternatively interface with one of the memory units in the parallel processor memory via a memory controller (not shown).

[0165] In graphics applications, ROP 1726 is a processing unit that performs raster operations such as stenciling, z-testing, blending, etc. ROP 1726 then outputs processed graphics data, which is stored in graphics memory. In some examples, ROP 1726 includes or is coupled to a codec (CODEC) 1727 that includes compression logic for compressing depth or color data written to memory or L2 cache 1721 and decompressing depth or color data read from memory or L2 cache 1721. The compression logic may be lossless compression logic that utilizes one or more of a variety of compression algorithms. The type of compression performed by CODEC 1727 may vary based on the statistical characteristics of the data to be compressed. For example, in some examples, delta color compression is performed on the depth and color data on a slice-by-slice basis. In some examples, CODEC 1727 includes compression and decompression logic that can compress and decompress computational data associated with machine learning operations. CODEC 1727 can, for example, compress sparse matrix data for sparse machine learning operations. CODEC 1727 can also compress sparse matrix data encoded in a sparse matrix format (e.g., coordinate list encoding (COO), compressed sparse row (CSR), compressed sparse column (CSC), etc.) to generate compressed and encoded sparse matrix data. The compressed and encoded sparse matrix data can be decompressed and / or decoded before being processed by the processing element, or the processing element can be configured to consume compressed, encoded, or compressed and encoded data for processing.

[0166] ROP 1726 may be included in each processing cluster (e.g., Fig.17A 1714A-1714N) rather than being included in partition unit 1720. In such examples, read and write requests for pixel data rather than pixel fragment data are transmitted through memory crossbar switch 1716. The processed graphics data may be displayed on a display device such as a Figure 1 1610A-1610B), is routed for further processing by (one or more) processors 1602, or is routed for processing by Fig.17A One of the processing entities within the parallel processor 1700 further processes.

[0167] Fig. 17Cis a block diagram of a processing cluster 1714 within a parallel processing unit. For example, a processing cluster is Fig.17A An instance of a processing cluster in the processing clusters 1714A-1714N. Processing cluster 1714 may be configured to execute many threads in parallel, wherein the term "thread" refers to an instance of a specific program executed on a set of specific input data. Optionally, a single-instruction, multiple-data (SIMD) instruction issuance technique may be used to support the parallel execution of a large number of threads without providing multiple independent instruction units. Alternatively, a single-instruction, multiple-thread (SIMT) technique may be used to support the parallel execution of a large number of threads that are generally synchronized using a common instruction unit configured to issue instructions to a set of processing engines within each processing cluster in the processing cluster. Unlike the SIMD execution mechanism in which all processing engines typically execute the same instruction, SIMT execution allows different threads to more easily follow the divergent execution path through a given thread program. Those skilled in the art will appreciate that the SIMD processing mechanism represents a functional subset of the SIMT processing mechanism.

[0168] The operation of the processing cluster 1714 may be controlled via a pipeline manager 1732 that distributes processing tasks to SIMT parallel processors. The pipeline manager 1732 receives Fig.17A The graphics multiprocessor 1734 may be configured to receive instructions from the scheduler 1710 of the graphics multiprocessor 1734 and manage the execution of those instructions via the graphics multiprocessor 1734 and / or the texture unit 1736. The illustrated graphics multiprocessor 1734 is an exemplary instance of a SIMT parallel processor. However, various types of SIMT parallel processors of different architectures may be included in the processing cluster 1714. One or more instances of the graphics multiprocessor 1734 may be included in the processing cluster 1714. The graphics multiprocessor 1734 may process data, and the data crossbar 1740 may be used to distribute the processed data to one of a plurality of possible destinations, including other shader units. The pipeline manager 1732 may facilitate the distribution of processed data by specifying a destination for the processed data to be distributed via the data crossbar 1740.

[0169] Each graphics multiprocessor 1734 within a processing cluster 1714 may include an identical set of function execution logic (e.g., arithmetic logic units, load-store units, etc.). The function execution logic may be configured in a pipelined manner in which new instructions may be issued before previous instructions are completed. The function execution logic supports a variety of operations, including integer and floating point arithmetic, comparison operations, Boolean operations, bit shifts, and calculation of various algebraic functions. The same functional unit hardware may be utilized to perform different operations, and any combination of functional units may exist.

[0170] The instructions transmitted to the processing cluster 1714 constitute threads. A collection of threads executed across a collection of parallel processing engines is a thread group. A thread group executes the same program on different input data. Each thread within a thread group can be assigned to a different processing engine within the graphics multiprocessor 1734. A thread group may include fewer threads than the number of processing engines within the graphics multiprocessor 1734. When a thread group includes fewer threads than the number of processing engines, one or more of the processing engines may be idle during the cycle during which the thread group is being processed. A thread group may also include more threads than the number of processing engines within the graphics multiprocessor 1734. When a thread group includes more threads than the number of processing engines within the graphics multiprocessor 1734, processing may be performed in consecutive clock cycles. Optionally, multiple thread groups may be executed concurrently on the graphics multiprocessor 1734.

[0171] The graphics multiprocessor 1734 may include internal cache memory to perform load and store operations. Optionally, the graphics multiprocessor 1734 may abandon the internal cache and use cache memory (e.g., first level (level 1, L1) cache 1748) within the processing cluster 1714. Each graphics multiprocessor 1734 also has a partition unit (e.g., Fig.17A 1720A-1720N), which are shared between all processing clusters 1714 and can be used to transfer data between threads. Graphics multiprocessor 1734 can also access off-chip global memory, which can include one or more of local parallel processor memory and / or system memory. Any memory external to parallel processing unit 1702 can be used as global memory. Embodiments in which processing cluster 1714 includes multiple instances of graphics multiprocessor 1734 can share common instructions and data, which can be stored in L1 cache 1748.

[0172] Each processing cluster 1714 may include an MMU 1745 (memory management unit) configured to map virtual addresses to physical addresses. In other examples, one or more instances of MMU 1745 may reside in Fig.17A 1718. The MMU 1745 includes a set of page table entries (PTEs) for mapping virtual addresses to physical addresses of the slice, and optionally includes a cache line index. The MMU 1745 may include an address translation lookaside buffer (TLB) or cache that may reside within the graphics multiprocessor 1734 or L1 cache 1748 of the processing cluster 1714. The physical address is processed to distribute surface data access locality, thereby allowing efficient request interleaving between partition units. The cache line index can be used to determine whether a request for a cache line is a hit or a miss.

[0173] In graphics and compute applications, the processing clusters 1714 may be configured such that each graphics multiprocessor 1734 is coupled to a texture unit 1736 for performing texture mapping operations, such as determining texture sample locations, reading texture data, and filtering texture data. Texture data is read from an internal texture L1 cache (not shown), or in some examples, from an L1 cache within the graphics multiprocessor 1734 and retrieved from an L2 cache, local parallel processor memory, or system memory as needed. Each graphics multiprocessor 1734 outputs processed tasks to a data crossbar 1740 to provide the processed tasks to another processing cluster 1714 for further processing, or to store the processed tasks in an L2 cache, local parallel processor memory, or system memory via a memory crossbar 1716. A pre-raster operations unit 1742 is configured to receive data from the graphics multiprocessor 1734, direct the data to ROP units, which may be coupled to partition units (e.g., Fig.17A The preROP 1742 unit may perform optimizations for color blending, organize pixel color data, and perform address translation.

[0174] It will be appreciated that the core architecture described herein is illustrative, and variations and modifications are possible. Any number of processing units (e.g., graphics multiprocessors 1734, texture units 1736, preROPs 1742, etc.) may be included within a processing cluster 1714. Further, while only one processing cluster 1714 is shown, a parallel processing unit as described herein may include any number of instances of a processing cluster 1714. Optionally, each processing cluster 1714 may be configured to operate independently of other processing clusters 1714 using separate and distinct processing units, L1 caches, L2 caches, etc.

[0175] Fig.17D An example of a graphics multiprocessor 1734 is shown, where the graphics multiprocessor 1734 is coupled to a pipeline manager 1732 of a processing cluster 1714. The graphics multiprocessor 1734 has an execution pipeline that includes, but is not limited to, an instruction cache 1752, an instruction unit 1754, an address mapping unit 1756, a register file 1758, one or more general purpose graphics processing unit (GPGPU) cores 1762, and one or more load / store units 1766. The GPGPU cores 1762 and the load / store units 1766 are coupled to a cache memory 1772 and a shared memory 1770 via a memory and cache interconnect 1768. The graphics multiprocessor 1734 may additionally include a tensor and / or ray tracing core 1763 that includes hardware logic for accelerating matrix and / or ray tracing operations.

[0176] The instruction cache 1752 may receive an instruction stream to be executed from the pipeline manager 1732. The instructions are cached in the instruction cache 1752 and dispatched for execution by the instruction unit 1754. The instruction unit 1754 may dispatch the instructions as a thread group (e.g., a unit group (warp)), wherein each thread in the thread group is assigned to a different execution unit within the GPGPU core 1762. The instruction may access any of the local address space, the shared address space, or the global address space by specifying an address within the unified address space. The address in the unified address space may be translated into different memory addresses that may be accessed by the load / store unit 1766 using the address mapping unit 1756.

[0177] The register file 1758 provides a collection of registers for the functional units of the graphics multiprocessor 1734. The register file 1758 provides temporary storage for operands of data paths connected to the functional units of the graphics multiprocessor 1734 (e.g., GPGPU core 1762, load / store unit 1766). The register file 1758 may be divided between each of the functional units so that each functional unit is assigned a dedicated portion of the register file 1758. For example, the register file 1758 may be divided between different groups of units executed by the graphics multiprocessor 1734.

[0178] The GPGPU cores 1762 may each include a floating point unit (FPU) and / or an integer arithmetic logic unit (ALU) for executing instructions of the graphics multiprocessor 234. In some implementations, the GPGPU cores 1762 may include hardware logic that may otherwise reside within the tensor and / or ray tracing cores 263. The GPGPU cores 1762 may be similar in architecture, or may be different in architecture. For example and in some examples, the first portion of the GPGPU core 1762 includes a single-precision FPU and an integer ALU, while the second portion of the GPGPU core includes a double-precision FPU. Optionally, the FPU may implement the IEEE 754-2008 standard for floating-point arithmetic, or enable variable-precision floating-point arithmetic. The graphics multiprocessor 1734 may additionally include one or more fixed-function or special-function units for performing specific functions, such as copying rectangles or pixel blending operations. One or more of the GPGPU cores in the GPGPU core may also include fixed-function or special-function logic.

[0179] GPGPU core 1762 may include SIMD logic capable of executing a single instruction on multiple sets of data. Optionally, GPGPU core 1762 may physically execute SIMD4, SIMD8 and SIMD16 instructions, and logically execute SIMD1, SIMD2 and SIMD32 instructions. SIMD instructions for GPGPU cores may be generated by a shader compiler at compile time, or automatically generated when executing a program written and compiled for a single program multiple data (SPMD) or SIMT architecture. Multiple threads of a program configured for a SIMT execution model may be executed via a single SIMD instruction. For example and in some examples, eight SIMT threads may be executed in parallel via a single SIMD8 logic unit, and these eight SIMT threads perform the same or similar operations.

[0180] The memory and cache interconnect 1768 is an interconnect network that connects each of the functional units of the graphics multiprocessor 1734 to the register file 1758 and to the shared memory 1770. For example, the memory and cache interconnect 1768 is a crossbar interconnect that allows the load / store unit 1766 to implement load and store operations between the shared memory 1770 and the register file 1758. The register file 1758 can operate at the same frequency as the GPGPU core 1762, so data transfers between the GPGPU core 1762 and the register file 1758 are very low latency. The shared memory 1770 can be used to enable communication between threads executed on the functional units within the graphics multiprocessor 1734. The cache memory 1772 can be used as a data cache, for example, to cache texture data passed between the functional unit and the texture unit 1736. The shared memory 1770 can also be used as a managed cached program. The shared memory 1770 and the cache memory 1772 can be coupled with the data crossbar 1740 to enable communication with other components of the processing cluster. Threads executing on GPGPU core 1762 can programmatically store data in shared memory in addition to the automatically cached data stored in cache memory 1772.

[0181] Figures 18A-18C An additional graphics multiprocessor is illustrated according to an example. Figure 18A-18B Graphics multiprocessors 1825 and 1850 are shown in the figure. Graphics multiprocessors 1825 and 1850 are shown in the figure. Fig. 17C The graphics multiprocessor 1734 of FIG. 1734 is related to the graphics multiprocessor 1734 of FIG. 1734 and can be used instead of one of those graphics multiprocessors. Therefore, the disclosure of any feature in this article in conjunction with the graphics multiprocessor 1734 also discloses the corresponding combination with the graphics multiprocessors 1825 and 1850, but is not limited to this. Fig. 18C A graphics processing unit (GPU) 1880 is illustrated, which includes a collection of dedicated graphics processing resources arranged as multi-core groups 1865A-1865N, which correspond to graphics multiprocessors 1825, 1850. The illustrated graphics multiprocessors 1825, 1850 and multi-core groups 1865A-1865N may be streaming multiprocessors (SMs) capable of executing a large number of execution threads simultaneously.

[0182] Fig.18A The graphics multiprocessor 1825 includes relative Fig.17DThe graphics multiprocessor 1825 may include multiple additional instances of execution resource units of the graphics multiprocessor 1734. For example, the graphics multiprocessor 1825 may include multiple instances of instruction units 1832A-1832B, register files 1834A-1834B, and (one or more) texture units 1844A-1844B. The graphics multiprocessor 1825 also includes multiple sets of graphics or compute execution units (e.g., GPGPU cores 1836A-1836B, tensor cores 1837A-1837B, ray tracing cores 1838A-1838B) and multiple sets of load / store units 1840A-1840B. The execution resource units have a common instruction cache 1830, texture and / or data cache memory 1842, and shared memory 1846.

[0183] The components may communicate via an interconnect structure 1827. The interconnect structure 1827 may include one or more crossbar switches to enable communication between the components of the graphics multiprocessor 1825. The interconnect structure 1827 is a separate, high-speed network fabric layer on which each component of the graphics multiprocessor 1825 is stacked. The components of the graphics multiprocessor 1825 communicate with remote components via the interconnect structure 1827. For example, the cores 1836A-1836B, 1837A-1837B, and 1838A-1838B may each communicate with the shared memory 1846 via the interconnect structure 1827. The interconnect structure 1827 may arbitrate communications within the graphics multiprocessor 1825 to ensure fair bandwidth allocation between components.

[0184] Fig.18B The graphics multiprocessor 1850 includes a plurality of execution resource sets 1856A-1856D, wherein, as Fig.17D and Fig.18A As shown in FIG. 1 , each set of execution resources includes multiple instruction units, register files, GPGPU cores, and load storage units. Execution resources 1856A-1856D can work in conjunction with (one or more) texture units 1860A-1860D for texture operations while sharing instruction cache 1854 and shared memory 1853. For example, execution resources 1856A-1856D can share multiple instances of instruction cache 1854 and shared memory 1853 and texture and / or data cache memory 1858A-1858B. Each component can be connected to the CPU via the CPU. Fig.18A The interconnect structure 1827 communicates with a similar interconnect structure 1852 .

[0185] Those skilled in the art will understand that Figure 1 , Figures 17A-17D as well as Figure 18A-18BThe architecture described in is illustrative and not limiting in scope of the current examples. Thus, the techniques described herein may be implemented on any appropriately configured processing unit without departing from the scope of the examples described herein, including but not limited to: one or more mobile application processors; one or more desktop or server central processing units (CPUs), including multi-core CPUs; one or more parallel processor units, such as, Fig.17A Parallel processing unit 1702 and one or more graphics processors or special processing units.

[0186] The parallel processor or GPGPU described herein can be communicatively coupled to a host / processor core to accelerate graphics operations, machine learning operations, pattern analysis operations, and various general-purpose GPU (GPGPU) functions. The GPU can be communicatively coupled to the host processor / core via a bus or another interconnect (e.g., a high-speed interconnect, such as PCIe, NVLink, or other known protocols, standardized protocols, or proprietary protocols). In other examples, the GPU can be integrated on the same package or chip as the core and communicatively coupled to the core via an internal processor bus / interconnect (i.e., inside the package or chip). Regardless of the manner in which the GPU is connected, the processor core can assign work to the GPU in the form of a sequence of commands / instructions contained in a work descriptor. The GPU then uses dedicated circuits / logic to efficiently process these commands / instructions.

[0187] Fig. 18C A graphics processing unit (GPU) 1880 is shown, which includes a dedicated set of graphics processing resources arranged as multi-core groups 1865A-1865N. Although details of only a single multi-core group 1865A are provided, it will be appreciated that other multi-core groups 1865B-1865N may be equipped with the same or similar set of graphics processing resources. The details described with respect to multi-core groups 1865A-1865 may also be applied to any of the graphics multiprocessors 1734, 1825, 1850 described herein.

[0188] As illustrated, multi-core group 1865A may include a set 1870 of graphics cores, a set 1871 of tensor cores, and a set 1872 of ray tracing cores. Scheduler / dispatcher 1868 schedules and dispatches graphics threads for execution on the respective cores 1870, 1871, 1872. A set 1869 of register files stores operand values ​​used by cores 1870, 1871, 1872 when executing graphics threads. These register files may include, for example, integer registers for storing integer values, floating point registers for storing floating point values, vector registers for storing packed data elements (integer and / or floating point data elements), and slice registers for storing tensor / matrix values. Slice registers may be implemented as a combined set of vector registers.

[0189] One or more combined first level (L1) caches and shared memory units 1873 store graphics data locally within each multi-core group 1865A, such as texture data, vertex data, pixel data, light data, bounding volume data, etc. One or more texture units 1874 may also be used to perform texture operations, such as texture mapping and sampling. A second level (L2) cache 1875 shared by all multi-core groups 1865A-1865N or a subset of multi-core groups 1865A-1865N stores graphics data and / or instructions for multiple concurrent graphics threads. As illustrated, the L2 cache 1875 may be shared across multiple multi-core groups 1865A-1865N. One or more memory controllers 1867 couple the GPU 1880 to a memory 1866, which may be a system memory (e.g., DRAM) and / or a dedicated graphics memory (e.g., GDDR6 memory).

[0190] Input / output (I / O) circuitry 1863 couples GPU 1880 to one or more I / O devices 1862, such as a digital signal processor (DSP), a network controller, or a user input device. On-chip interconnects may be used to couple I / O devices 1862 to GPU 1880 and memory 1866. One or more I / O memory management units (IOMMUs) 1864 of I / O circuitry 1863 directly couple I / O devices 1862 to system memory 1866. Optionally, IOMMU 1864 manages a plurality of page table sets for mapping virtual addresses to physical addresses in system memory 1866. I / O devices 1862, CPU(s) 1861, and GPU(s) 1880 may then share the same virtual address space.

[0191] In one implementation of IOMMU 1864, IOMMU 1864 supports virtualization. In this case, IOMMU 1864 can manage a first set of page tables for mapping guest / graphics virtual addresses to guest / graphics physical addresses and a second set of page tables for mapping guest / graphics physical addresses to system / host physical addresses (e.g., within system memory 1866). The base address of each of the first set of page tables and the second set of page tables can be stored in control and / or status registers and swapped out at context switches (e.g., so that the new context is provided with access to the relevant set of page tables). Although not described in detail in the prior art, the first set of page tables and the second set of page tables can be stored in control and / or status registers and swapped out at context switches (e.g., so that the new context is provided with access to the relevant set of page tables). Fig. 18C , but each of the cores 1870, 1871, 1872 and / or multi-core groups 1865A-1865N may include a translation lookaside buffer (TLB) for caching guest virtual to guest physical translations, guest physical to host physical translations, and guest virtual to host physical translations.

[0192] (One or more) CPU 1861, GPU 1880 and I / O device 1862 can be integrated on a single semiconductor chip and / or chip package. The illustrated memory 1866 can be integrated on the same chip, or can be coupled to a memory controller 1867 via an off-chip interface. In one implementation, memory 1866 includes GDDR6 memory that shares the same virtual address space as other physical system-level memory, but the basic principles described herein are not limited to this particular implementation.

[0193] Tensor core 1871 may include multiple execution units specifically designed to perform matrix operations, which are basic computational operations for performing deep learning operations. For example, synchronized matrix multiplication operations may be used for neural network training and inference. Tensor core 1871 may perform matrix processing using a variety of operand precisions, including single-precision floating point (e.g., 32 bits), half-precision floating point (e.g., 16 bits), integer words (16 bits), bytes (8 bits), and half bytes (4 bits). For example, a neural network implementation extracts features of each rendered scene, potentially combining details from multiple frames to build a high-quality final image.

[0194] In a deep learning implementation, parallel matrix multiplication work may be scheduled for execution on the tensor core 1871. The training of neural networks in particular requires a large number of matrix dot product operations. To handle the inner product formulation of the N x N x N matrix multiplication, the tensor core 1871 may include at least N dot product processing elements. Before the matrix multiplication begins, a complete matrix is ​​loaded into the slice register, and for each of the N cycles, at least one column of the second matrix is ​​loaded. For each cycle, there are N dot products that are processed.

[0195] Depending on the specific implementation, matrix elements can be stored with different precisions, including 16-bit words, 8-bit bytes (e.g., INT8), and 4-bit nibbles (e.g., INT4). Different precision modes can be specified for the Tensor Core 1871 to ensure that the most efficient precision is used for different workloads (e.g., such as inference workloads, which can tolerate quantization to bytes and nibbles). Supported formats additionally include 64-bit floating point (FP64) and non-IEEE floating point formats, such as the bfloat16 format (e.g., Brain floating point), a 16-bit floating point format with one sign bit, eight exponent bits, and eight significand bits (seven of which are explicitly stored). An example includes support for a reduced precision tensor floating point (TF32) mode that performs calculations using the range of FP32 (8 bits) and the precision of FP16 (10 bits). Reduced-precision TF32 operations can be performed on FP32 inputs and produce FP32 outputs with higher performance relative to FP32 and increased precision relative to FP16. In some examples, one or more 8-bit floating point formats (FP8) are supported.

[0196] In some examples, the tensor core 1871 supports sparse operation modes for matrices in which the vast majority of values ​​are zero. The tensor core 1871 includes support for sparse input matrices encoded in sparse matrix representations (e.g., coordinate list encoding (COO), compressed sparse rows (CSR), compressed sparse columns (CSC), etc.). The tensor core 1871 also includes support for compressed sparse matrix representations in the case where the sparse matrix representation can be further compressed. Compressed matrix data, encoded matrix data, and / or compressed and encoded matrix data and associated compression and / or encoding metadata can be read by the tensor core 1871, and non-zero values ​​can be extracted. For example, for a given input matrix A, non-zero values ​​can be loaded from at least a portion of the compressed and / or encoded representation of matrix A. Based on the position of the non-zero value in matrix A (which can be determined from the index or coordinate metadata associated with the non-zero value), the corresponding value in the input matrix B can be loaded. Depending on the operation to be performed (e.g., multiplication), loading values ​​from input matrix B may be bypassed if the corresponding value is a zero value. In some examples, the pairing of values ​​for certain operations (such as multiplication operations) may be pre-scanned by the scheduler logic, and only operations between non-zero inputs are scheduled. Depending on the dimensions of matrices A and B and the operations to be performed, the output matrix C may be dense or sparse. In the case where the output matrix C is sparse and depending on the configuration of the tensor core 1871, the output matrix C may be output in a compressed format, sparse coding, or compressed sparse coding.

[0197] The ray tracing core 1872 can accelerate ray tracing operations for both real-time ray tracing implementations and non-real-time ray tracing implementations. Specifically, the ray tracing core 1872 may include ray traversal / intersection circuitry for performing ray traversals and identifying intersections between rays and primitives enclosed within a BVH volume using a bounding volume hierarchy (BVH). The ray tracing core 1872 may also include circuitry for performing depth testing and culling (e.g., using a Z buffer or similar arrangement). In one implementation, the ray tracing core 1872 performs traversal and intersection operations in conjunction with the image denoising techniques described herein, at least portions of which may be performed on the tensor core 1871. For example, the tensor core 1871 may implement a deep learning neural network to perform denoising on frames generated by the ray tracing core 1872. However, the CPU(s) 1861, graphics core 1870, and / or ray tracing core 1872 may also implement all or portions of the denoising and / or deep learning algorithms.

[0198] In addition, as described above, a distributed approach to noise reduction can be employed, wherein GPU 1880 is in a computing device coupled to other computing devices via a network or high-speed interconnect. According to the distributed approach, the interconnected computing devices can share neural network learning / training data to improve the speed at which the entire system learns to perform noise reduction for different types of image frames and / or different graphics applications.

[0199] The ray tracing core 1872 can handle all BVH traversals and / or ray-primitive intersections, thereby preventing the graphics core 1870 from being overloaded with thousands of instructions for each ray. For example, each ray tracing core 1872 includes a first set of specialized circuits for performing bounding box tests (e.g., for traversal operations) and / or a second set of specialized circuits for performing ray-triangle intersection tests (e.g., intersecting rays that have been traversed). Thus, for example, the multi-core group 1865A can simply start ray detection, and the ray tracing core 1872 independently performs ray traversals and intersections and returns hit data (e.g., hits, no hits, multiple hits, etc.) to the thread context. While the ray tracing core 1870 performs traversal and intersection operations, the other cores 1871, 1872 are freed up to perform other graphics or computational work.

[0200] Optionally, each ray tracing core 1872 may include a traversal unit for performing BVH test operations and / or an intersection unit for performing ray-primitive intersection tests. The intersection unit generates a "hit", "no hit", or "multiple hits" response, which it provides to the appropriate thread. During traversal and intersection operations, execution resources of other cores (e.g., graphics core 1870 and tensor core 1871) are freed up to perform other forms of graphics work.

[0201] In some examples described below, a hybrid rasterization / ray tracing approach is used in which the work is distributed between graphics core 1870 and ray tracing core 1872.

[0202] The ray tracing core 1872 (and / or other cores 1870, 1871) may include hardware support for ray tracing instruction sets, such as Microsoft's DirectX Ray Tracing (DXR), which includes the DispatchRays command; and ray generation shaders, nearest hit shaders, any hit shaders, and miss shaders, which enable a unique set of shaders and textures to be assigned to each object. Another ray tracing platform that may be supported by the ray tracing core 1872, graphics core 1870, and tensor core 1871 is the Vulkan API (e.g., Vulkan version 1.1.85, or later). However, it should be noted that the basic principles described herein are not limited to any particular ray tracing ISA.

[0203] In general, each core 1872, 1871, 1870 may support a ray tracing instruction set including instructions / functions for one or more of the following: ray generation, nearest hit, any hit, ray-primitive intersection, per-primitive and hierarchy bounding box construction, misses, visits, and exceptions. More specifically, some preferred examples include ray tracing instructions for performing one or more of the following functions: Light Generation - Ray generation instructions can be executed for each pixel, sample, or other user-defined work assignment. Recent Hits - A nearest hit command may be executed to locate the closest intersection of a ray with a primitive within the scene. Any hit - Any hit command identifies multiple intersections between rays and primitives within the scene, thereby potentially identifying a new closest intersection point. intersect ——The intersection instruction performs a ray-primitive intersection test and outputs the result. Per-primitive bounding box construction - This instruction builds a bounding box around a given primitive or group of primitives (e.g., when building a new BVH or other acceleration data structure). miss - Indicates that the ray missed the scene or all geometry within a specified region of the scene. visit ——Indicates the subvolume that the ray will traverse. abnormal - Includes various types of exception handlers (e.g., called for various error conditions).

[0204] In some examples, the ray tracing core 1872 may be adapted to accelerate general computing operations that can be accelerated using computing techniques similar to ray intersection tests. A computing framework may be provided that enables shader programs to be compiled into low-level instructions and / or primitives that perform general computing operations via the ray tracing core. Exemplary computing problems that may benefit from computing operations performed on the ray tracing core 1872 include calculations involving the propagation of beams, waves, rays, or particles within a coordinate space. Interactions associated with that propagation may be calculated relative to geometry or meshes within the coordinate space. For example, calculations associated with the propagation of electromagnetic signals through an environment may be accelerated using instructions or primitives that are executed via the ray tracing core. Refraction and reflection of signals through objects in the environment may be calculated as direct ray tracing simulations.

[0205] The ray tracing core 1872 can also be used to perform calculations that are not directly similar to ray tracing. For example, the ray tracing core 1872 can be used to accelerate mesh projection, mesh refinement, and volume sampling calculations. General coordinate space calculations, such as nearest neighbor calculations, can also be performed. For example, a set of points near a given point can be found by defining a bounding box around the given point in the coordinate space. The BVH and ray detection logic in the ray tracing core 1872 can then be used to determine the set of points that intersect within the bounding box. The intersection constitutes the origin and the nearest neighbor of that origin. The calculations performed using the ray tracing core 1872 can be performed in parallel with the calculations performed on the graphics core 1872 and the tensor core 1871. The shader compiler can be configured to compile a compute shader or other general graphics processing program into a low-level primitive that can be parallelized across the graphics core 1870, the tensor core 1871, and the ray tracing core 1872.

[0206] Building larger and larger silicon dies is challenging for a variety of reasons. As silicon dies get larger, manufacturing yields become smaller, and process technology requirements for different components may vary. On the other hand, in order to have a high-performance system, key components should be interconnected through high-speed, high-bandwidth, low-latency interfaces. These conflicting requirements pose challenges to the development of high-performance chips.

[0207] The embodiments described herein provide techniques for decomposing the architecture of a system-on-chip integrated circuit into a plurality of different chiplets that can be packaged onto a common substrate. In some examples, a graphics processing unit or a parallel processor is composed of various silicon chiplets that are manufactured separately. A chiplet is an integrated circuit that is at least partially packaged, and the at least partially packaged integrated circuit includes different logic units that can be assembled into a larger package with other chiplets. Various chiplet collections with different IP core logic can be assembled into a single device. In addition, the chiplets can be integrated into a base die or base chiplet using active interposer technology. The concepts described herein enable interconnection and communication between different forms of IP within a GPU. IP development on different processes may be mixed. This avoids the complexity of converging multiple IPs to the same process, especially for large SoCs with several styles of IP.

[0208] Enabling the use of multi-process technology improves time to market and provides a cost-effective way to create multiple product SKUs. For customers, this means getting a product that is more tailored to their requirements in a cost-effective and timely manner. In addition, decomposed IP is easier to modify to be independently power-gated, and components that are not in use for a given workload can be turned off, thereby reducing overall power consumption.

[0209] Fig.19 A parallel computing system 1900 according to some examples is shown. In some examples, the parallel computing system 1900 includes a parallel processor 1920, which may be a graphics processor or a computing accelerator as described herein. The parallel processor 1920 includes a global logic unit 1901, an interface 1902, a thread dispatcher 1903, a media unit 1904, a set of computing units 1905A-1905H, and a cache / memory unit 1906. In some examples, the global logic unit 1901 includes global functions for the parallel processor 1920, including device configuration registers, a global scheduler, power management logic, and the like. The interface 1902 may include a front-end interface for the parallel processor 1920. The thread dispatcher 1903 may receive a workload from the interface 1902 and dispatch threads of the workload to the computing units 1905A-1905H. If the workload includes any media operations, at least part of those operations may be performed by the media unit 1904. The media unit may also migrate some operations to the compute units 1905A-1505H. The cache / memory unit 1906 may include cache memory (eg, L3 cache) and local memory (eg, HBM, GDDR) for the parallel processors 1920.

[0210] Figure 20A-20BIllustrate a hybrid logical / physical view of a decomposed parallel processor according to examples described herein. Fig. 20A The decomposed parallel computing system 2000 is shown. Fig. 20B A chiplet 2030 of the decomposed parallel computing system 2000 is shown.

[0211] like Fig. 20A As shown in , the decomposed computing system 2000 may include a parallel processor 2020, wherein the components of the parallel processor SOC are distributed across multiple chiplets. Each chiplet may be a different IP core that is independently designed and configured to communicate with other chiplets via one or more common interfaces. The chiplets include, but are not limited to, a computing chiplet 2005, a media chiplet 2004, and a memory chiplet 2006. Each chiplet can be manufactured separately using different process technologies. For example, the computing chiplet 2005 can be manufactured using the smallest or most advanced process technology available at the time of manufacturing, while the memory chiplet 2006 or other chiplets (e.g., I / O, networking, etc.) can be manufactured using larger or less advanced process technologies.

[0212] Each chiplet can be coupled to a base die 2010 and configured to communicate with each other and with logic within the base die 2010 via an interconnect layer 2012. In some examples, the base die 2010 can include a global logic 2001, the base die 2010 can include a scheduler 2011 and a power management 2021 logic unit, an interface 2002, a dispatch unit 2003, and an interconnect fabric module 2008 coupled or integrated with one or more L3 cache blocks 2009A-2009N. The interconnect fabric 2008 can be an inter-chiplet fabric integrated into the base die 2010. The logic chiplets can use the fabric 2008 to relay messages between the chiplets. Additionally, the L3 cache blocks 2009A-2009N in the base die and / or the L3 cache blocks within the memory chiplet 2006 can cache data read from the DRAM chiplets within the memory chiplet 2006 and transferred to the DRAM chiplets and the system memory of the host.

[0213] In some examples, the global logic 2001 is a microcontroller that can execute firmware to perform scheduler 2011 and power management 2021 functions for the parallel processor 2020. The microcontroller that executes the global logic can be customized for the target use case of the parallel processor 2020. The scheduler 2011 can perform global scheduling operations for the parallel processor 2020. The power management 2021 function can be used to enable or disable individual chiplets within the parallel processor when they are not in use.

[0214] The various chiplets of the parallel processor 2020 may be designed to perform specific functions that would be integrated into a single die in existing designs. The compute chiplet collection 2005 may include a cluster of compute units (e.g., execution units, streaming multiprocessors, etc.) that include programmable logic for executing compute or graphics shader instructions. The media chiplet 2004 may include hardware logic to accelerate media encoding and decoding operations. The memory chiplet 2006 may include volatile memory (e.g., DRAM) and one or more SRAM cache memory blocks (e.g., L3 blocks).

[0215] like Fig. 20B As shown in , each chiplet 2030 may include common components and application-specific components. The chiplet logic 2036 within the chiplet 2030 may include specific components of the chiplet, such as an array of streaming multiprocessors, computing units, or execution units described herein. The chiplet logic 2036 may be coupled to an optional cache or shared local memory 2038, or a cache or shared local memory may be included within the chiplet logic 2036. The chiplet 2030 may include a fabric interconnect node 2042 that receives commands via an inter-chiplet fabric. Commands and data received via the fabric interconnect node 2042 may be temporarily stored in an interconnect buffer 2039. Data transmitted to and received from the fabric interconnect node 2042 may be stored in the interconnect cache 2040. Power control 2032 and clock control 2034 logic may also be included within the chiplet. The power control 2032 and clock control 2034 logic may receive configuration commands via the fabric and may be configured for dynamic voltage and frequency scaling of the chiplet 2030. In some examples, each chiplet can have independent clock and power domains and can be clock-gated and power-gated independently of other chiplets.

[0216] At least some of the components within the illustrated chiplet 2030 may also be included in a Fig. 20A The base die 2010 may be within logic within the base die 2010. For example, logic within the base die that communicates with the fabric may include a version of the fabric interconnect node 2042. The base die logic that may be independently clock gated or power gated may include a version of the power control 2032 and / or clock control 2034 logic.

[0217] Thus, while various examples described herein use the term SOC to describe devices and systems having a processor and associated circuitry (e.g., input / output (“I / O”) circuitry, power delivery circuitry, memory circuitry, etc.) monolithically integrated into a single integrated circuit (“IC”) die or chip, the present disclosure is not limited in this respect. For example, in various examples of the present disclosure, a device or system may have one or more processors (e.g., one or more processor cores) and associated circuitry (e.g., input / output (“I / O”) circuitry, power delivery circuitry, etc.) arranged in a disaggregated collection of discrete dies, slices, and / or chiplets (e.g., one or more discrete processor core dies arranged adjacent to one or more other dies (such as a memory die, an I / O die, etc.)). In such disaggregated devices and systems, the various dies, slices, and / or chiplets may be physically and electrically coupled together by a packaging structure including, for example, various packaging substrates, interposers, active interposers, photonic interposers, interconnect bridges, and the like. A disaggregated collection of discrete dies, slices, and / or chiplets may also be part of a system on a package ("SoP").

[0218] Example Core Architecture - In-order and Out-of-order Core Block Diagram

[0219] FIG. 21(A) is a block diagram illustrating both an example in-order pipeline and an example register renaming, out-of-order issue / execution pipeline according to an example. FIG. 21(B) is a block diagram illustrating both an example in-order architecture core and an example register renaming, out-of-order issue / execution architecture core to be included in a processor according to an example. The solid line boxes in FIG. 21(A)-(B) illustrate the in-order pipeline and the in-order core, while the optionally added dashed line boxes illustrate 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.

[0220] In FIG. 21(A), the processor pipeline 2100 includes a fetch stage 2102, an optional length decoding stage 2104, a decode stage 2106, an optional allocation (Alloc) stage 2108, an optional rename stage 2110, a dispatch (also called dispatch or issue) stage 2112, an optional register read / memory read stage 2114, an execute stage 2116, a write back / memory write stage 2118, an optional exception handling stage 2122, and an optional commit stage 2124. One or more operations may be performed in each of these processor pipeline stages. For example, during the fetch stage 2102, one or more instructions are fetched from the instruction memory, and during the decode stage 2106, the fetched one or more instructions may be decoded, an address using a forwarding register port (e.g., a load store unit (LSU) address) may be generated, and branch forwarding (e.g., an immediate offset or a link register (LR)) may be performed. In some examples, the decode stage 2106 and the register read / memory read stage 2114 can be combined into one pipeline stage. In some examples, during the execute stage 2116, decoded instructions can be executed, LSU address / data pipelining to an Advanced Microcontroller Bus (AMB) interface can be performed, multiplication and addition operations can be performed, arithmetic operations with branch results can be performed, and the like.

[0221] As an example, the example register renaming, out-of-order issue / execution architecture core of FIG. 21(B) may implement pipeline 2100 in the following manner: 1) instruction fetch circuit 2138 performs fetch and length decoding stages 2102 and 2104; 2) decoding circuit 2140 performs decoding stage 2106; 3) renaming / allocator unit circuit 2152 performs allocation stage 2108 and renaming stage 2110; 4) (one or more) scheduler circuit 2156 performs scheduling stage 2112; 5) (one or more) physical The register file circuit 2158 and the memory unit circuit 2170 perform the register read / memory read stage 2114; one or more execution clusters 2160 perform the execute stage 2116; 6) the memory unit circuit 2170 and (one or more) physical register file circuits 2158 perform the write back / memory write stage 2118; 7) various circuits may be involved in the exception handling stage 2122; and 8) the retirement unit circuit 2154 and (one or more) physical register file circuits 2158 perform the commit stage 2124.

[0222] 21(B) shows that the processor core 2190 includes a front end unit circuit 2130 coupled to an execution engine unit circuit 2150, and both are coupled to a memory unit circuit 2170. The core 2190 can be a reduced instruction set architecture computing (RISC) core, a complex instruction set architecture computing (CISC) core, a very long instruction word (VLIW) core, or a hybrid or alternative core type. As another option, the core 2190 can be a special-purpose core, such as 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.

[0223] The front end unit circuit 2130 may include a branch prediction circuit 2132 coupled to an instruction cache circuit 2134 coupled to an instruction translation lookaside buffer (TLB) 2136 coupled to an instruction fetch circuit 2138 coupled to a decode circuit 2140. In some examples, the instruction cache circuit 2134 is included in the memory unit circuit 2170 instead of the front end circuit 2130. The decode circuit 2140 (or decoder) may decode the instruction and generate one or more micro-operations, microcode entry points, micro-instructions, other instructions, or other control signals as outputs, which are decoded from the original instruction, or otherwise reflect the original instruction, or are derived from the original instruction. The decode circuit 2140 may also include an address generation unit (AGU, not shown) circuit. In some examples, the AGU uses the forwarded register port to generate the LSU address and may further perform branch forwarding (e.g., immediate offset branch forwarding, LR register branch forwarding, etc.). The decode circuit 2140 may 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 memory (ROM), and the like. In some examples, the core 2190 includes a microcode ROM (not shown) or other medium that stores microcode for certain macroinstructions (e.g., in the decode circuit 2140 or otherwise within the front end circuit 2130). In some examples, the decode circuit 2140 includes a micro-op or operation cache (not shown) to save / cache decoded operations, micro-tags, or micro-operations generated during decoding or other stages of the processor pipeline 2100. The decode circuit 2140 may be coupled to the rename / allocator circuit 2152 in the execution engine circuit 2150.

[0224] The execution engine circuit 2150 includes a rename / allocator unit circuit 2152, which is coupled to a retirement unit circuit 2154 and a set of one or more scheduler circuits 2156. The scheduler circuit 2156 represents any number of different schedulers, including reservation stations, central instruction windows, and the like. In some examples, the scheduler circuit(s) 2156 may include an arithmetic logic unit (ALU) scheduler / scheduling circuit, an ALU queue, an address generation unit (AGU) scheduler / scheduling circuit, an AGU queue, and the like. The scheduler circuit(s) 2156 are coupled to the physical register file(s) circuit(s) 2158. Each of the physical register file(s) circuit(s) 2158 represents one or more physical register files, different ones of which 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., instruction pointers, i.e., the address of the next instruction to be executed), and the like. In some examples, the (one or more) physical register file circuits 2158 include vector register unit circuits, write mask register unit circuits, and scalar register unit circuits. These register units can provide architectural vector registers, vector mask registers, general registers, and the like. The (one or more) physical register file circuits 2158 are coupled to the retirement unit circuits 2154 (also referred to as retirement queues) to demonstrate various ways in which register renaming and out-of-order execution can be implemented (e.g., using (one or more) reorder buffers (ROBs) and (one or more) retirement register files; using (one or more) future stacks, (one or more) history buffers, and (one or more) retirement register files; using register maps and pools of registers; and the like). The retirement unit circuits 2154 and (one or more) physical register file circuits 2158 are coupled to (one or more) execution clusters 2160. The (one or more) execution clusters 2160 include a set of one or more execution unit circuits 2162 and a set of one or more memory access circuits 2164. One or more execution unit circuits 2162 may perform various arithmetic, logical, floating point, or other types of operations (e.g., shifts, additions, subtractions, multiplications) on various types of data (e.g., scalar integer, scalar floating point, packed integer, packed floating point, vector integer, vector floating point). While some examples may include several execution units or execution unit circuits dedicated to a particular function or set of functions, other examples may include only one execution unit circuit or multiple execution units / execution unit circuits that all perform all functions.The scheduler circuit(s) 2156, physical register file unit circuit(s) 2158, and execution cluster(s) 2160 are shown as possibly multiple because some examples create separate pipelines for certain types of data / operations (e.g., a scalar integer pipeline, a scalar floating point / packed integer / packed floating point / vector integer / vector floating point pipeline, and / or a memory access pipeline, each with its own scheduler circuit(s), physical register file circuit(s), and / or execution cluster—and in the case of a separate memory access pipeline, only the execution cluster of that pipeline has the memory access unit circuit(s) 2164 in some examples of the implementation). It should also be understood that where separate pipelines are used, one or more of these pipelines may be out-of-order issue / execution, while the rest are in-order.

[0225] In some examples, the execution engine unit circuit 2150 can perform load store unit (LSU) address / data pipelining to an advanced microcontroller bus (AMB) interface (not shown), as well as address stage and writeback, data stage loads, stores, and branches.

[0226] A set of memory access circuits 2164 are coupled to the memory cell circuit 2170, which includes a data TLB circuit 2172, which is coupled to a data cache circuit 2174, which is coupled to a level 2 (L2) cache circuit 2176. In some examples, the memory access circuit 2164 may include a load unit circuit, a storage address unit circuit, and a storage data unit circuit, each of which is coupled to the data TLB circuit 2172 in the memory cell circuit 2170. The instruction cache circuit 2134 is further coupled to the level 2 (L2) cache circuit 2176 in the memory cell circuit 2170. In some examples, the instruction cache 2134 and the data cache 2174 are combined into a single instruction and data cache in the L2 cache circuit 2176, a level 3 (L3) cache circuit (not shown), and / or a main memory (not shown). The L2 cache circuit 2176 is coupled to one or more other levels of cache and ultimately to the main memory.

[0227] Core 2190 may support one or more instruction sets (e.g., x86 instruction set architecture (optionally, with some extensions that have been added with newer versions); MIPS instruction set architecture; ARM instruction set architecture (optionally, with optional additional extensions, such as NEON)) that include the instruction(s) described herein. In some examples, core 2190 includes logic to support packed data instruction set architecture extensions (e.g., AVX1, AVX2), thereby allowing operations used by many multimedia applications to be performed using packed data.

[0228] Example Execution Unit Circuit(s)

[0229] Fig. 22 An example of (one or more) execution unit circuits is illustrated, such as (one or more) execution unit circuits 2162 of FIG. 21 (B). As shown, (one or more) execution unit circuits 2162 may include one or more ALU circuits 2201, optional vector / single instruction multiple data (SIMD) circuits 2203, load / store circuits 2205, branch / jump circuits 2207, and / or floating-point unit (FPU) circuits 2209. ALU circuits 2201 perform integer arithmetic and / or Boolean operations. Vector / SIMD circuits 2203 perform vector / SIMD operations on packed data (e.g., SIMD / vector registers). Load / store circuits 2205 execute load and store instructions to load data from memory into registers, or store data from registers to memory. Load / store circuits 2205 may also generate addresses. Branch / jump circuits 2207 cause branches or jumps to a certain memory address depending on the instruction. FPU circuits 2209 perform floating-point arithmetic. The width of the execution unit circuit(s) 2162 varies depending on the example and may, for example, range from 16 bits to 1024 bits. In some examples, two or more smaller execution units are logically combined to form a larger execution unit (e.g., two 128-bit execution units are logically combined to form a 256-bit execution unit).

[0230] Example Register Architecture

[0231] Fig.232300 is a block diagram of a register architecture 2300 according to some examples. As shown, the register architecture 2300 includes a vector / SIMD register 2310, whose width varies from 128 bits to 1024 bits. In some examples, the vector / SIMD register 2310 is physically 512 bits, and only some low-order bits are used depending on the mapping. For example, in some examples, the vector / SIMD register 2310 is a 512-bit ZMM register: the low-order 256 bits are used for the YMM register, and the low-order 128 bits are used for the XMM register. Therefore, there is a register coverage. In some examples, the vector length field selects between the maximum length and one or more other shorter lengths, wherein each such shorter length is half the length of the previous length. Scalar operations are operations performed on the lowest-order data element position in the ZMM / YMM / XMM register; higher-order data element positions are either maintained as the same as before the instruction, or are zeroed, depending on the example.

[0232] In some examples, the register architecture 2300 includes a write mask / predicate register 2315. For example, in some examples, there are 8 write mask / predicate registers (sometimes referred to as k0 to k7), each of which is 16 bits, 32 bits, 64 bits, or 128 bits in size. The write mask / predicate register 2315 can allow merging (e.g., allowing any set of elements in the destination to be protected from update during the execution of any operation) and / or zeroing (e.g., a zeroing vector mask allows any set of elements in the destination to be zeroed during the execution of any operation). In some examples, each data element position in a given write mask / predicate register 2315 corresponds to a data element position at the destination. In other examples, the write mask / predicate register 2315 is scalable and consists of a set number of enable bits for a given vector element (e.g., 8 enable bits for each 64-bit vector element).

[0233] The register architecture 2300 includes a plurality of general purpose registers 2325. These registers may be 16 bits, 32 bits, 64 bits, etc., and may be used for scalar operations. In some examples, these registers are referred to by the names RAX, RBX, RCX, RDX, RBP, RSI, RDI, RSP, and R8 to R15.

[0234] In some examples, the register architecture 2300 includes a scalar floating-point (FP) register file 2345, which is used to perform scalar floating-point operations on 32 / 64 / 80-bit floating-point data using the x87 instruction set architecture extension, or as an MMX register to perform operations on 64-bit packed integer data, and to store operands for some operations performed between MMX and XMM registers.

[0235] One or more flag registers 2340 (e.g., EFLAGS, RFLAGS, etc.) store status and control information for arithmetic, comparison, and system operations. For example, one or more flag registers 2340 can store condition code information, such as carry, parity, auxiliary carry, zero, sign, and overflow. In some examples, one or more flag registers 2340 are referred to as program status and control and / or status registers.

[0236] Segment registers 2320 contain segment points for accessing memory. In some examples, these registers are referred to by the names CS, DS, SS, ES, FS, and GS.

[0237] Model specific registers or machine specific registers (MSRs) 2335 control and report processor performance. Most MSRs 2335 handle system-related functions and are not accessible by applications. For example, MSRs may provide control of one or more of the following: performance monitoring counters, debug extensions, memory type range registers, thermal and power management, instruction-specific support, and / or processor feature / mode support. Machine check registers 2360 consist of control, status, and error reporting MSRs that are used to detect and report hardware errors. (One or more) control and / or status registers 2355 (e.g., CR0-CR4) determine the operating mode of the processor (e.g., processors 1470, 1480, 1438, 1415, and / or 1000) and the characteristics of the currently executed task. In some examples, MSRs 2335 are a subset of control and / or status registers 2355.

[0238] One or more instruction pointer registers 2330 store instruction pointer values. Debug registers 2350 control and allow monitoring of debug operations of the processor or core.

[0239] Memory (mem) management registers 2365 specify the location of data structures used for protected mode memory management. These registers may include global descriptor table registers (GDTR), interrupt descriptor table registers (IDTR), task registers, and local descriptor table registers (LDTR).

[0240] Alternative examples may use wider or narrower registers. Additionally, alternative examples may use more, fewer, or different register files and registers. Register architecture 2300 may be in register file / memory 1308 or (one or more) physical register file circuits 2158, for example.

[0241] Instruction Set Architecture

[0242] An instruction set architecture (ISA) 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., opcode) and the (one or more) operands and / or other (one or more) data fields (e.g., mask) on which the operation is to be performed, etc. Some instruction formats are further decomposed by the definition of instruction templates (or subformats). For example, an instruction template of 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 have different bit positions because there are fewer included fields) 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, expressed in a given instruction template in the instruction format), and includes fields for specifying the operation and the operand. For example, the example ADD instruction has a specific opcode and instruction format, the instruction format includes an opcode field to specify the opcode, and includes an operand field to select the operand (source 1 / destination and source 2); and the appearance of this ADD instruction in the instruction stream will have specific content in the operand field that selects the specific operand. In addition, although the following description is made in the context of the x86 ISA, it is within the knowledge of those skilled in the art to apply the teachings of the present disclosure in another ISA.

[0243] Example instruction format

[0244] The examples of the (one or more) instructions described herein may be implemented in different formats. In addition, exemplary systems, architectures, and pipelines are described in detail below. The examples of (one or more) instructions may be executed on these systems, architectures, and pipelines, but are not limited to those described in detail.

[0245] Fig.24 An example of an instruction format is illustrated. As shown, an instruction may include multiple components, including, but not limited to, one or more fields for the following items: one or more prefixes 2401, an opcode 2403, addressing information 2405 (e.g., a register identifier, memory addressing information, etc.), a displacement value 2407, and / or an immediate value 2409. Note that some instructions utilize some or all of the fields of the format, while other instructions may only use the opcode 2403 field. In some examples, the illustrated order is the order in which these fields are to be encoded, however, it should be understood that in other examples, these fields may be encoded in another order, combined, etc.

[0246] (One or more) prefix fields 2401 modify the instruction when used. In some examples, one or more prefixes are used to repeat string instructions (e.g., 0xF0, 0xF2, 0xF3, etc.), provide section override (e.g., 0x2E, 0x36, 0x3E, 0x26, 0x64, 0x65, 0x2E, 0x3E, etc.), perform bus lock operations, and / or change operation objects (e.g., 0x66) and address sizes (e.g., 0x67). Some instructions require mandatory prefixes (e.g., 0x66, 0xF2, 0xF3, etc.). Some of these prefixes can be considered as "traditional" prefixes. Other prefixes (one or more examples of which are described in detail herein) indicate and / or provide further capabilities, such as specifying specific registers, etc. These other prefixes are usually followed by the "traditional" prefix.

[0247] The opcode field 2403 is used to at least partially define the operation to be performed when the instruction is decoded. In some examples, the length of the primary opcode encoded in the opcode field 2403 is one, two or three bytes. In other examples, the primary opcode can be other lengths. Extra 3-bit opcode fields are sometimes encoded in another field.

[0248] The addressing information field 2405 is used to address one or more operands of the instruction, such as a location in memory or one or more registers. Fig.25An example of an addressing information field 2405 is illustrated. In this illustration, an optional MOD R / M byte 2502 and an optional scale, index, base (SIB) byte 2504 are shown. The MOD R / M byte 2502 and SIB byte 2504 are used to encode up to two operands of the instruction, each operand being a direct register or an effective memory address. Note that two of these fields are optional, i.e., not all instructions include one or more of these fields. The MOD R / M byte 2502 includes a MOD field 2542, a register (reg) field 2544, and an R / M field 2546.

[0249] The content of MOD field 2542 distinguishes between memory access and non-memory access modes. In some examples, when MOD field 2542 has a binary value of 11 (11b), register direct addressing mode is utilized, otherwise register indirect addressing mode is used.

[0250] Register field 2544 may encode a destination register operand or a source register operand, or may encode an opcode extension and not be used to encode any instruction operand. The contents of register field 2544 specify the location (in a register or in memory) of the source or destination operand directly or through address generation. In some examples, register field 2544 is supplemented with additional bits from a prefix (e.g., prefix 2401) to allow for greater addressing.

[0251] R / M field 2546 may be used to encode an instruction operand that references a memory address, or may be used to encode a destination register operand or a source register operand. Note that in some examples, R / M field 2546 may be combined with MOD field 2542 to specify an addressing mode.

[0252] SIB byte 2504 includes a scaling field 2552, an index field 2554, and a base address field 2556 for address generation. Scaling field 2552 indicates a scaling factor. Index field 2554 specifies the index register to be used. In some examples, index field 2554 is supplemented with additional bits from a prefix (e.g., prefix 2401) to allow for larger addressing. Base address field 2556 specifies the base address register to be used. In some examples, base address field 2556 is supplemented with additional bits from a prefix (e.g., prefix 2401) to allow for larger addressing. In practice, the contents of scaling field 2552 allow the contents of index field 2554 to be scaled for memory address generation (e.g., for memory addresses using 2 缩放 * address generation of index + base address).

[0253] Some addressing forms use displacement values ​​to generate memory addresses. For example, 缩放 2405, which indicates a compressed displacement scheme for which the displacement value is calculated and stored in the displacement field 2407.

[0254] In some examples, the immediate value field 2409 specifies an immediate value for the instruction. The immediate value may be encoded as a 1-byte value, a 2-byte value, a 4-byte value, and so on.

[0255] Fig.26 An example of a first prefix 2401(A) is illustrated. In some examples, the first prefix 2401(A) is an example of a REX prefix. Instructions using this prefix can specify general registers, 64-bit packed data registers (e.g., single instruction multiple data (SIMD) registers or vector registers), and / or control and / or status registers and debug registers (e.g., CR8-CR15 and DR8-DR15).

[0256] Instructions using the first prefix 2401(A) can use a 3-bit field to specify up to three registers, depending on the format: 1) using the reg field 2544 and the R / M field 2546 of the MOD R / M byte 2502; 2) using the MOD R / M byte 2502 with the SIB byte 2504, including using the reg field 2544 as well as the base field 2556 and the index field 2554; or 3) using the register field of the opcode.

[0257] In the first prefix 2401 (A), bit positions 7:4 of the payload byte are set to 0100. Bit position 3 (W) can be used to determine the operand size, but cannot determine the operand width alone. Therefore, when W=0, the operand size is determined by the code segment descriptor (CS.D), and when W=1, the operand size is 64 bits.

[0258] Note that adding another bit allows for 16 (2 4 ) registers, while the separate MOD R / M reg field 2544 and the R / M field 2546 of MOD R / M can each only address 8 registers.

[0259] In the first prefix 2401(A), bit position 2 (R) may be an extension of the MOD R / M reg field 2544 and may be used to modify the MOD R / M reg field 2544 when the field encodes a general register, a 64-bit packed data register (e.g., an SSE register), or a control or debug register. When the MOD R / M byte 2502 specifies another register or defines an extended opcode, R is ignored.

[0260] Bit position 1 (X) may modify the SIB byte index field 2554 .

[0261] Bit position 0 (B) may modify the base address in the R / M field 2546 or SIB byte base address field 2556 of MOD R / M; or it may modify the opcode register field used to access a general register (eg, general register 2325).

[0262] 27(A)-(D) illustrate examples of how the R, X, and B fields of the first prefix 2401(A) are used. FIG. 27(A) illustrates that when the SIB byte 2504 is not used for memory addressing, the R and B from the first prefix 2401(A) are used to extend the reg field 2544 and the R / M field 2546 of the MOD R / M byte 2502. FIG. 27(B) illustrates that when the SIB byte 2504 is not used, the R and B from the first prefix 2401(A) are used to extend the reg field 2544 and the R / M field 2546 of the MOD R / M byte 2502 (register-register addressing). FIG. 27(C) illustrates that when the SIB byte 2504 is used for memory addressing, the R, X, and B from the first prefix 2401(A) are used to extend the reg field 2544 and the index field 2554 and the base address field 2556 of the MOD R / M byte 2502. 27(D) illustrates that when a register is encoded in the opcode 2403, the B from the first prefix 2401(A) is used to extend the reg field 2544 of the MOD R / M byte 2502.

[0263] Figure 28 (A)-(B) illustrates an example of a second prefix 2401 (B). In some examples, the second prefix 2401 (B) is an example of a VEX prefix. The second prefix 2401 (B) encoding allows instructions to have more than two operands, and allows SIMD vector registers (e.g., vector / SIMD registers 2310) to be longer than 64 bits (e.g., 128 bits and 256 bits). The use of the second prefix 2401 (B) provides a syntax for three operands (or more). For example, a previous two-operand instruction performs an operation such as A=A+B, which overwrites the source operand. The use of the second prefix 2401 (B) enables the operands to perform non-destructive operations, such as A=B+C.

[0264] In some examples, the second prefix 2401(B) has two forms: a two-byte form and a three-byte form. The two-byte second prefix 2401(B) is mainly used for 128-bit, scalar, and some 256-bit instructions; while the three-byte second prefix 2401(B) provides a compact replacement for 3-byte opcode instructions and the first prefix 2401(A).

[0265] Figure 28 (A) illustrates an example of a two-byte form of the second prefix 2401 (B). In some examples, the format field 2801 (byte 0 2803) contains the value C5H. In some examples, byte 1 2805 includes an "R" value in bit [7]. This value is the complement of the same value of the first prefix 2401 (A). Bit [2] is used to specify the length (L) of the vector (wherein the value of 0 is a scalar or 128-bit vector, and the value of 1 is a 256-bit vector). Bit [1:0] provides an opcode extensibility equivalent to some traditional prefixes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). Bits [6:3], shown as vvvv, can be used to: 1) encode a first source register operand, which is specified in inverted (complement) form and is valid for instructions with 2 or more source operands; 2) encode a destination register operand, which is specified in complement form for certain vector shifts; or 3) not encode any operand, the field is reserved and should contain a value, such as 1111b.

[0266] Instructions using this prefix may use the R / M field 2546 of MOD R / M to encode an instruction operand that references a memory address, or to encode a destination register operand or a source register operand.

[0267] Instructions using this prefix may use the reg field 2544 of MOD R / M to encode a destination register operand or a source register operand, or be treated as an opcode extension and not used to encode any instruction operand.

[0268] For instruction syntax supporting four operands, vvvv, the R / M field 2546 of MOD R / M, and the reg field 2544 of MOD R / M encode three of the four operands. Bits [7:4] of the immediate value field 2409 are then used to encode the third source register operand.

[0269] Figure 28 (B) illustrates an example of a three-byte form of the second prefix 2401 (B). In some examples, the format field 2811 (byte 0 2813) contains the value C4H. Byte 1 2815 includes "R", "X" and "B" in bits [7:5], which are the complements of these values ​​of the first prefix 2401 (A). Bits [4:0] (shown as mmmm) of byte 1 2815 include content that encodes one or more implicit leading opcode bytes as needed. For example, 00001 means 0FH leading opcode, 00010 means 0F38H leading opcode, 00011 means 0F3AH leading opcode, and so on.

[0270] The use of bit [7] of byte 2 2817 is similar to W of the first prefix 2401 (A), including helping to determine the size of the operand that can be promoted. Bit [2] is used to specify the length (L) of the vector (where a value of 0 is a scalar or 128-bit vector, and a value of 1 is a 256-bit vector). Bits [1:0] provide opcode extensibility equivalent to some traditional prefixes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). Bits [6:3], shown as vvvv, can be used to: 1) encode the first source register operand, which is specified in inverted (inverse) form, valid for instructions with 2 or more source operands; 2) encode the destination register operand, which is specified in inverse form for certain vector shifts; or 3) do not encode any operand, this field is reserved and should contain a value, such as 1111b.

[0271] Instructions using this prefix may use the R / M field 2546 of MOD R / M to encode an instruction operand that references a memory address, or to encode a destination register operand or a source register operand.

[0272] Instructions using this prefix may use the reg field 2544 of MOD R / M to encode a destination register operand or a source register operand, or be treated as an opcode extension and not used to encode any instruction operand.

[0273] For instruction syntax supporting four operands, vvvv, the R / M field 2546 of MOD R / M, and the reg field 2544 of MOD R / M encode three of the four operands. Bits [7:4] of the immediate value field 2409 are then used to encode the third source register operand.

[0274] Fig.29 An example of a third prefix 2401(C) is illustrated. In some examples, the third prefix 2401(C) is an example of an EVEX prefix. The third prefix 2401(C) is a four-byte prefix.

[0275] The third prefix 2401(C) can encode 32 vector registers (e.g., 128-bit, 256-bit, and 512-bit registers) in 64-bit mode. In some examples, write masks / operation masks are used (see the discussion of registers in previous figures, e.g., Fig.23 ) or predicate instructions utilize this prefix. The operation mask register allows conditional processing or selection control. Operation mask instructions whose source / destination operands are operation mask registers and treat the contents of the operation mask register as a single value are encoded using the second prefix 2401 (B).

[0276] The third prefix 2401(C) may encode functionality specific to the instruction class (e.g., a packed instruction with "load+operation" semantics may support an embedded broadcast functionality, a floating-point instruction with rounding semantics may support a static rounding functionality, a floating-point instruction with non-rounding arithmetic semantics may support a "suppress all exceptions" functionality, etc.).

[0277] The first byte of the third prefix 2401 (C) is the format field 2911, which in some examples has a value of 62 H. The subsequent bytes are called payload bytes 2915-2919, and together form a 24-bit value of P[23:0], providing specific capabilities in the form of one or more fields (described in detail herein).

[0278] In some examples, P[1:0] of payload byte 2919 is the same as the two mm bits in the lower order. In some examples, P[3:2] is reserved. Bit P[4] (R') allows access to the upper 16 vector register sets when combined with P[7] and the reg field 2544 of MOD R / M. When SIB type addressing is not required, P[6] can also provide access to the upper 16 vector registers. P[7:5] consists of R, X, and B, which are operand specifier modifier bits for vector registers, general registers, and memory addressing, and when combined with the MOD R / M register field 2544 and the R / M field 2546 of MOD R / M, access to the next set of 8 registers beyond the lower 8 registers is allowed. P[9:8] provides opcode extensibility equivalent to some traditional prefixes (e.g., 00=no prefix, 01=66H, 10=F3H, and 11=F2H). P

[10] is a fixed value of 1 in some examples. P[14:11], shown as vvvv, can be used to: 1) encode a first source register operand, which is specified in inverted (complement) form, valid for instructions with 2 or more source operands; 2) encode a destination register operand, which is specified in complement form, used for certain vector shifts; or 3) not encode any operand, the field is reserved and should contain a value, such as 1111b.

[0279] P

[15] is similar to W of the first prefix 2401 (A) and the second prefix 2411 (B), and can be used as an opcode extension bit or an operand size increase.

[0280] P[18:16] specifies the index of a register in the operation mask (write mask) register (e.g., write mask / predicate register 2315). In some examples, the particular value aaa=000 has special behavior, implying that no operation mask is used for this particular instruction (this can be achieved in a variety of ways, including using an operation mask hardwired to all ones or hardware that bypasses the masking hardware). When merging, 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 basic operation and the enhanced operation); in some other examples, the old value of each element of the destination is retained (if the corresponding mask bit has a 0 value). In contrast, when zeroing, the vector mask allows any set of elements in the destination to be zeroed during the execution of any operation (specified by the basic operation and the enhanced operation); in some examples, 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 of elements modified, from first to last); however, the elements modified do not have to be consecutive. Thus, the operation mask field enables a subset of vector operations, including loads, stores, arithmetic, logical, etc. Although in the described examples, the contents of the operation mask field select which of several operation mask registers contains the operation mask to be used (so that the contents of the operation mask field indirectly identify the masking to be performed), alternative examples alternatively or additionally allow the contents of the mask write field to directly specify the masking to be performed.

[0281] P

[19] can be combined with P[14:11] to encode a second source vector register in a non-destructive source syntax that can utilize P

[19] to access the upper 16 vector registers. P

[20] encodes various features that vary in different classes of instructions and can affect the meaning of the vector length / rounding control specifier field (P[22:21]). P

[23] indicates support for merge-write masking (e.g., when set to 0) or support for zeroing and merge-write masking (e.g., when set to 1).

[0282] The following table details illustrative examples of encoding of registers in instructions using the third prefix 2401 (C). Table 1: 32-register support in 64-bit mode Table 2: Encoding register specifiers in 32-bit mode Table 3: Operation Mask Register Specifier Encoding

[0283] Graphics Execution Unit

[0284] Figure 30A-Figure 30B Thread execution logic 3000 is illustrated including an array of processing elements employed in a graphics processor core according to examples described herein. Figure 30A-Figure 30B Elements having the same reference numeral (or name) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto. Fig. 30A represents an execution unit within a general-purpose graphics processor, and Fig. 30B Represents an execution unit that can be used within a computing accelerator.

[0285] As in Fig. 30A As illustrated in FIG. 3 , in some examples, thread execution logic 3000 includes a shader processor 3002, a thread dispatcher 3004, an instruction cache 3006, a scalable execution unit array including a plurality of execution units 3008A-3008N, a sampler 3010, a shared local memory 3011, a data cache 3012, and a data port 3014. In some examples, the scalable execution unit array can be dynamically scaled by enabling or disabling one or more execution units (e.g., any one of execution units 3008A, 3008B, 3008C, 3008D, up to 3008N-1 and 3008N) based on the computational requirements of the workload. In some examples, the included components are interconnected via an interconnect structure that links to each of the components. In some examples, thread execution logic 3000 includes one or more connections to a memory (such as system memory or cache memory) through instruction cache 3006, data port 3014, sampler 3010, and one or more of execution units 3008A-3008N. In some examples, each execution unit (e.g., 3008A) is a self-contained programmable general-purpose computing unit capable of executing multiple simultaneous hardware threads while processing multiple data elements in parallel for each thread. In various examples, the array of execution units 3008A-3008N is scalable to include any number of separate execution units.

[0286] In some examples, execution units 3008A-3008N are primarily used to execute shader programs. Shader processor 3002 can process various shader programs, and can dispatch execution threads associated with shader programs via thread dispatcher 3004. In some examples, thread dispatcher includes logic for arbitrating thread initiation requests from graphics pipelines and media pipelines and instantiating the requested threads on one or more execution units in execution units 3008A-3008N. For example, a geometry pipeline can dispatch vertex shaders, tessellation shaders, or geometry shaders to thread execution logic for processing. In some examples, thread dispatcher 3004 can also handle runtime thread generation requests from executed shader programs.

[0287] In some examples, execution units 3008A-3008N support an instruction set including native support for many standard 3D graphics shader instructions, so that shader programs from graphics libraries (e.g., Direct 3D and OpenGL) are executed with minimal conversion. These execution units support vertex and geometry processing (e.g., vertex programs, geometry programs, vertex shaders), pixel processing (e.g., pixel shaders, fragment shaders), and general processing (e.g., compute and media shaders). Each execution unit in execution units 3008A-3008N is capable of multi-issue single instruction multiple data (single instruction multiple data, SIMD) execution, and multi-threaded operations enable efficient execution environments in the face of high latency memory accesses. Each hardware thread within each execution unit has a dedicated high-bandwidth register stack and an associated independent thread state. For pipelines capable of integer operations, single-precision floating-point operations, and double-precision floating-point operations, capable of SIMD branching capabilities, capable of logical operations, capable of transcendental operations, and capable of other miscellaneous operations, execution is multi-issued for each clock. While waiting for data from a shared function in memory or a shared function, the dependency logic within the execution unit 3008A-3008N puts the waiting thread to sleep until the requested data has been returned. While the waiting thread is sleeping, hardware resources can be dedicated to processing other threads. For example, during a delay associated with a vertex shader operation, the execution unit can perform operations for a pixel shader, a fragment shader, or another type of shader program including different vertex shaders. Each example can be applied to use execution utilizing single instruction multiple threads (SIMT) as an alternative to the use of SIMD, or as an addition to the use of SIMD. References to SIMD cores or operations can also be applied to SIMT, or to a combination of SIMD and SIMT.

[0288] Each of the execution units 3008A-3008N operates on an array of data elements. The number of data elements is the "execution size," or number of lanes for an instruction. An execution lane is a logical unit used for the execution of data element access, masking, and flow control within an instruction. The number of lanes may be independent of the number of physical arithmetic logic units (ALUs) or floating point units (FPUs) used for a particular graphics processor. In some examples, the execution units 3008A-3008N support integer and floating point data types.

[0289] The execution unit instruction set includes SIMD instructions. Various data elements can be stored in registers as compact data types, and the execution unit will process various elements based on the data size of the element. For example, when a 256-bit wide vector is operated, the 256 bits of the vector are stored in registers, and the execution unit operates the vector as four independent 64-bit compact (packed) data elements (quad-word (Quad-Word, QW) size data elements), eight independent 32-bit compact data elements (double-word (Double Word, DW) size data elements), sixteen independent 16-bit compact data elements (word (Word, W) size data elements) or thirty-two independent 8-bit data elements (byte (byte, B) size data elements). However, different vector widths and register sizes are possible.

[0290] In some examples, one or more execution units may be combined into a fused execution unit 3009A-3009N having a thread control logic (3007A-3007N) common to the fused EU. Multiple EUs may be fused into a EU group. Each EU in a fused EU group may be configured to execute a separate SIMD hardware thread. The number of EUs in a fused EU group may vary according to the example. Additionally, various SIMD widths may be executed EU by EU, including but not limited to SIMD8, SIMD16, and SIMD32. Each fused graphics execution unit 3009A-3009N includes at least two execution units. For example, a fused execution unit 3009A includes a first EU 3008A, a second EU 3008B, and a thread control logic 3007A common to the first EU 3008A and the second EU 3008B. Thread control logic 3007A controls threads executing on fused graphics execution unit 3009A, allowing each EU within fused execution units 3009A-3009N to execute using a common instruction pointer register.

[0291] One or more internal instruction caches (e.g., 3006) are included in the thread execution logic 3000 to cache thread instructions for the execution unit. In some examples, one or more data caches (e.g., 3012) are included to cache thread data during thread execution. Threads executed on the execution logic 3000 may also store explicitly managed data in the shared local memory 3011. In some examples, a sampler 3010 is included to provide texture sampling for 3D operations and media sampling for media operations. In some examples, the sampler 3010 includes specialized texture or media sampling functions to process texture data or media data during the sampling process before providing the sampled data to the execution unit.

[0292] During execution, the graphics pipeline and the media pipeline send thread initiation requests to the thread execution logic 3000 via the thread generation and dispatch logic. Once the group of geometric objects has been processed and rasterized into pixel data, the pixel processor logic (e.g., pixel shader logic, fragment shader logic, etc.) within the shader processor 3002 is called to further calculate output information and cause the results to be written to the output surface (e.g., color buffer, depth buffer, stencil buffer, etc.). In some examples, the pixel shader or fragment shader calculates the value of each vertex attribute, and the value of each vertex attribute is interpolated across the rasterized object. In some examples, the pixel processor logic within the shader processor 3002 then executes the pixel shader program or fragment shader program supplied by the application programming interface (API). To execute the shader program, the shader processor 3002 dispatches the thread to the execution unit (e.g., 3008A) via the thread dispatcher 3004. In some examples, the shader processor 3002 uses the texture sampling logic in the sampler 3010 to access the texture data in the texture map stored in the memory. Arithmetic operations on texture data and input geometry data compute pixel color data for each geometry fragment, or discard one or more pixels without further processing.

[0293] In some examples, data port 3014 provides a memory access mechanism for thread execution logic 3000 to output processed data to memory for further processing on a graphics processor output pipeline. In some examples, data port 3014 includes or is coupled to one or more cache memories (e.g., data cache 3012) to cache data for memory access via the data port.

[0294] In some examples, the execution logic 3000 may also include a ray tracer 3005 that may provide ray tracing acceleration functionality. The ray tracer 3005 may support a ray tracing instruction set that includes instructions / functions for ray generation.

[0295] Fig. 30B 3026, and a set of dedicated integer SIMD ALUs 3035. The GRF 3024 and ARF 3026 include a set of general register files and architectural register files associated with each synchronous hardware thread that can be active in the graphics execution unit 3008. In some examples, the per-thread architectural state is maintained in the ARF 3026, while data used during thread execution is stored in the GRF 3024. The execution state of each thread, including the instruction pointer for each thread, can be saved in thread-specific registers in the ARF 3026.

[0296] In some examples, the graphics execution unit 3008 has an architecture that is a combination of Simultaneous Multi-Threading (SMT) and fine-grained Interleaved Multi-Threading (IMT). The architecture has a modular configuration that can be fine-tuned at design time based on the target number of simultaneous threads and the number of registers per execution unit, where execution unit resources are divided across logic for executing multiple simultaneous threads. The number of logical threads that can be executed by the graphics execution unit 3008 is not limited to the number of hardware threads, and multiple logical threads can be assigned to each hardware thread.

[0297] In some examples, the graphics execution unit 3008 may issue multiple instructions in coordination, which may each be a different instruction. The thread arbiter 3022 of the graphics execution unit thread 3008 may dispatch the instruction to one of the following for execution: the send unit 3030, the branch unit 3032, or (one or more) SIMD FPU 3034. Each execution thread can access 128 general registers within the GRF 3024, wherein each register can store 32 bytes that can be accessed as a SIMD 8 element vector with 32-bit data elements. In some examples, each execution unit thread has access to 4 kilobytes within the GRF 3024, but the example is not limited thereto, and more or less register resources may be provided in other examples. In some examples, the graphics execution unit 3008 is partitioned into seven hardware threads that can independently perform computing operations, but the number of threads of each execution unit may also vary according to the example. For example, in some examples, up to 16 hardware threads are supported. In an example where seven threads can access 4 kilobytes, GRF 3024 can store a total of 28 kilobytes. Where 16 threads can access 4 kilobytes, GRF 3024 can store a total of 64 kilobytes. Flexible addressing modes can permit registers to be addressed together, effectively creating wider registers or representing strided rectangular block data structures.

[0298] In some examples, memory operations, sampler operations, and other longer latency system communications are dispatched via "send" instructions executed through message passing send unit 3030. In some examples, branch instructions are dispatched to dedicated branch unit 3032 to facilitate SIMD scatter and eventual convergence.

[0299] In some examples, the graphics execution unit 3008 includes one or more SIMD floating point units (FPUs) 3034 for performing floating point operations. In some examples, (one or more) FPUs 3034 also support integer calculations. In some examples, (one or more) FPUs 3034 can SIMD perform up to M 32-bit floating point (or integer) operations, or SIMD perform up to 2M 16-bit integer or 16-bit floating point operations. In some examples, at least one of (one or more) FPUs provides extended math capabilities that support high throughput transcendental math functions and double-precision 64-bit floating points. In some examples, a set 3035 of 8-bit integer SIMD ALUs also exists and can be specifically optimized to perform operations associated with machine learning calculations.

[0300] In some examples, an array of multiple instances of graphics execution unit 3008 may be instantiated in graphics sub-core groupings (e.g., sub-slices). For scalability, product architects may select the exact number of execution units per sub-core grouping. In some examples, execution unit 3008 may execute instructions across multiple execution lanes. In further examples, each thread executed on graphics execution unit 3008 is executed on a different lane.

[0301] Fig.31 The diagram shows an additional execution unit 3100 according to an example. In some examples, the execution unit 3100 includes a thread control unit 3101, a thread state unit 3102, an instruction fetch / prefetch unit 3103, and an instruction decode unit 3104. The execution unit 3100 additionally includes a register file 3106, which stores registers that can be assigned to hardware threads within the execution unit. The execution unit 3100 additionally includes a dispatch unit 3107 and a branch unit 3108. In some examples, the dispatch unit 3107 and the branch unit 3108 can be used with Fig. 30B The sending unit 3030 and the branching unit 3032 of the graphics execution unit 3008 operate in a similar manner.

[0302] The execution unit 3100 also includes a computing unit 3110, which includes a plurality of functional units of different types. In some examples, the computing unit 3110 includes an ALU unit 3111, which includes an array of arithmetic logic units. The ALU unit 3111 can be configured to perform 64-bit, 32-bit, and 16-bit integer and floating-point operations. Integer and floating-point operations can be performed simultaneously. The computing unit 3110 may also include a systolic array 3112 and a mathematical unit 3113. The systolic array 3112 includes a wide W and deep D network of data processing units, which can be used to perform vector or other data parallel operations in a systolic manner. In some examples, the systolic array 3112 may be configured to perform matrix operations, such as matrix dot product operations. In some examples, the systolic array 3112 supports 16-bit floating-point operations and 8-bit and 4-bit integer operations. In some examples, the systolic array 3112 may be configured to accelerate machine learning operations. In such examples, systolic array 3112 may be configured with support for bfloat 16-bit floating point format. In some examples, math unit 3113 may be included to perform a specific subset of math operations in an efficient and lower power manner than ALU unit 3111. Math unit 3113 may include math logic that may be found in shared functional logic of a graphics processing engine provided by other examples (e.g., Figure 4In some examples, math unit 3113 may be configured to perform 32-bit and 64-bit floating point operations.

[0303] The thread control unit 3101 includes logic for controlling the execution of threads within the execution unit. The thread control unit 3101 may include thread arbitration logic for starting, stopping, and preempting the execution of threads within the execution unit 3100. The thread state unit 3102 may be used to store thread states for threads assigned to execute on the execution unit 3100. Storing thread states within the execution unit 3100 enables quick preemption of threads when they become blocked or idle. The instruction fetch / prefetch unit 3103 may fetch instructions from the instruction cache of higher level execution logic (e.g., Fig. 30A The instruction fetch / prefetch unit 3103 may also issue a prefetch request for instructions to be loaded into the instruction cache based on an analysis of the current execution thread. The instruction decode unit 3104 may be used to decode instructions to be executed by the computing unit. In some examples, the instruction decode unit 3104 may be used as a secondary decoder to decode complex instructions into constituent micro-operations.

[0304] The execution unit 3100 additionally includes a register file 3106 that can be used by hardware threads executing on the execution unit 3100. The registers in the register file 3106 can be divided across the logic used to execute multiple simultaneous threads within the compute unit 3110 of the execution unit 3100. The number of logical threads that can be executed by the graphics execution unit 3100 is not limited to the number of hardware threads, and multiple logical threads can be assigned to each hardware thread. The size of the register file 3106 can vary across examples based on the number of hardware threads supported. In some examples, register renaming can be used to dynamically assign registers to hardware threads.

[0305] Fig.32 3200 is a block diagram illustrating a graphics processor instruction format 3200 according to some examples. In one or more examples, a graphics processor execution unit supports an instruction set of instructions in multiple formats. Solid line boxes illustrate components that are typically included in execution unit instructions, while dashed lines include components that are optional or included only in a subset of instructions. In some examples, the described and illustrated instruction format 3200 are macroinstructions because they are instructions supplied to the execution unit, as opposed to micro-operations that result from instruction decoding that occurs once the instruction is processed.

[0306] In some examples, the graphics processor execution unit natively supports instructions in 128-bit instruction format 3210. Based on the selected instructions, instruction options, and the number of operands, 64-bit compact instruction format 3230 can be used for some instructions. The native 128-bit instruction format 3210 provides access to all instruction options, while some options and operations are limited in 64-bit format 3230. The native instructions available in 64-bit format 3230 vary from example to example. In some examples, the instructions are partially compressed using a set of index values ​​in index field 3213. The execution unit hardware references a set of compression tables based on the index values ​​and uses the compression table output to reconstruct the native instructions of 128-bit instruction format 3210. Instructions of other sizes and formats can be used.

[0307] For each format, the instruction opcode 3212 defines the operation to be performed by the execution unit. The execution unit executes each instruction in parallel across multiple data elements of each operand. For example, in response to an addition instruction, the execution unit performs a synchronous addition operation across each color channel representing a texture element or a picture element. By default, the execution unit executes each instruction across all data channels of the operand. In some examples, the instruction control field 3214 enables control of certain execution options, such as channel selection (e.g., assertion) and data channel order (e.g., mixing). For instructions in the 128-bit instruction format 3210, the execution size field 3216 limits the number of data channels that will be executed in parallel. In some examples, the execution size field 3216 is not available for the 64-bit compact instruction format 3230.

[0308] Some execution unit instructions have up to three operands, including two source operands src0 3220, src1 3222, and one destination 3218. In some examples, the execution unit supports dual destination instructions, where one of the dual destinations is implicit. Data manipulation instructions may have a third source operand (e.g., SRC2 3224), where the instruction opcode 3212 determines the number of source operands. The last source operand of an instruction may be an immediate (e.g., hard-coded) value passed with the instruction.

[0309] In some examples, the 128-bit instruction format 3210 includes an access / addressing mode field 3226 that specifies, for example, whether direct register addressing mode or indirect register addressing mode is used. When direct register addressing mode is used, the register addresses of one or more operands are provided directly by bits in the instruction.

[0310] In some examples, the 128-bit instruction format 3210 includes an access / addressing mode field 3226, which specifies the addressing mode and / or access mode of the instruction. In some examples, the access mode is used to define the data access alignment for the instruction. Some examples support access modes including 16-byte aligned access modes and 1-byte aligned access modes, wherein the byte alignment of the access mode determines the access alignment of the instruction operand. For example, when in the first mode, the instruction may use byte-aligned addressing for source operands and destination operands, and when in the second mode, the instruction may use 16-byte aligned addressing for all source operands and destination operands.

[0311] In some examples, the addressing mode portion of the access / addressing mode field 3226 determines whether the instruction uses direct addressing or indirect addressing. When direct register addressing mode is used, the bits in the instruction directly provide the register address of one or more operands. When indirect register addressing mode is used, the register address of one or more operands can be calculated based on the address register value and the address immediate field in the instruction.

[0312] In some examples, instructions can be grouped based on the opcode 3212 bit field to simplify opcode decoding 3240. For 8-bit opcodes, bit 4, bit 5, and bit 6 allow the execution unit to determine the type of opcode. The exact opcode grouping shown is only an example. In some examples, the move and logic opcode group 3242 includes data movement and logic instructions (e.g., move (mov), compare (cmp)). In some examples, the move and logic group 3242 shares five most significant bits (most significant bit, MSB), wherein the move (mov) instruction adopts the form of 0000xxxxb, and the logic instruction adopts the form of 0001xxxxb. The flow control instruction group 3244 (e.g., call (call), jump (jmp)) includes instructions in the form of 0010xxxxb (e.g., 0x20). The miscellaneous instruction group 3246 includes a mixture of instructions, including synchronization instructions (e.g., wait (wait), send (send)) in the form of 0011xxxxb (e.g., 0x30). The parallel math instruction group 3248 includes component-by-component arithmetic instructions (e.g., addition, multiplication (mul)) of the form 0100xxxxb (e.g., 0x40). The parallel math group 3248 performs arithmetic operations in parallel across data channels. The vector math group 3250 includes arithmetic instructions (e.g., dp4) of the form 0101xxxxb (e.g., 0x50). The vector math group performs arithmetic on vector operands, such as dot product calculations. In some examples, the illustrated opcode decode 3240 can be used to determine which portion of the execution unit will be used to execute the decoded instructions. For example, some instructions may be designated as systolic instructions to be executed by a systolic array. Other instructions, such as ray tracing instructions (not shown), may be routed to a ray tracing core or ray tracing logic within a slice or partition of the execution logic.

[0313] Graphics Pipeline

[0314] Fig.33 is a block diagram of another example of a graphics processor 3300 . Fig.33 Those elements having the same reference numerals (or names) as elements of any other figure herein may operate or function in any manner similar to that described elsewhere herein, but are not limited thereto.

[0315] In some examples, graphics processor 3300 includes geometry pipeline 3320, media pipeline 3330, display engine 3340, thread execution logic 3350, and rendering output pipeline 3370. In some examples, graphics processor 3300 is a graphics processor within a multi-core processing system that includes one or more general-purpose processing cores. The graphics processor is controlled by register writes to one or more control registers (not shown) or via commands issued to graphics processor 3300 through ring interconnect 3302. In some examples, ring interconnect 3302 couples graphics processor 3300 to other processing components, such as other graphics processors or general-purpose processors. Commands from ring interconnect 3302 are interpreted by command stream converter 3303, which supplies instructions to various components of geometry pipeline 3320 or media pipeline 3330.

[0316] In some examples, command stream converter 3303 directs the operation of vertex fetcher 3305, which reads vertex data from memory and executes vertex processing commands provided by command stream converter 3303. In some examples, vertex fetcher 3305 provides vertex data to vertex shader 3307, which performs coordinate space transformation and lighting operations on each vertex. In some examples, vertex fetcher 3305 and vertex shader 3307 execute vertex processing instructions by dispatching execution threads to execution units 3352A-3352B via thread dispatcher 3331.

[0317] In some examples, execution units 3352A-3352B are arrays of vector processors with instruction sets for performing graphics operations and media operations. In some examples, execution units 3352A-3352B have an attached L1 cache 3351 that is specific to each array or shared between arrays. The cache can be configured as a data cache, an instruction cache, or partitioned into a single cache containing data and instructions in different partitions.

[0318] In some examples, the geometry pipeline 3320 includes a tessellation component for performing hardware accelerated tessellation of 3D objects. In some examples, the programmable hull shader 3311 configures the tessellation operation. The programmable domain shader 3317 provides back-end evaluation of the tessellation output. The tessellation 3313 operates under the direction of the hull shader 3311 and contains dedicated logic for generating a detailed set of geometric objects based on a coarse geometric model that is provided as input to the geometry pipeline 3320. In some examples, if tessellation is not used, the tessellation components (e.g., the hull shader 3311, the tessellation 3313, and the domain shader 3317) can be bypassed.

[0319] In some examples, the complete geometric object may be processed by geometry shader 3319 via one or more threads dispatched to execution units 3352A-3352B, or may proceed directly to clipper 3329. In some examples, the geometry shader operates on the entire geometric object rather than on vertices or vertex patches as in previous stages of the graphics pipeline. If tessellation is disabled, geometry shader 3319 receives input from vertex shader 3307. In some examples, geometry shader 3319 is programmable by a geometry shader program to perform geometry tessellation when the tessellation unit is disabled.

[0320] Before rasterization, the clipper 3329 processes the vertex data. The clipper 3329 can be a fixed function clipper or a programmable clipper with clipping and geometry shader functions. In some examples, the rasterizer and depth test component 3373 in the render output pipeline 3370 dispatches a pixel shader to convert the geometric object into a pixel-by-pixel representation. In some examples, the pixel shader logic is included in the thread execution logic 3350. In some examples, the application can bypass the rasterizer and depth test component 3373 and access the unrasterized vertex data via the outflow unit 3323.

[0321] The graphics processor 3300 has an interconnect bus, interconnect structure, or some other interconnect mechanism that allows data and messages to be passed among the main components of the processor. In some examples, execution units 3352A-3352B and associated logic units (e.g., L1 cache 3351, sampler 3354, texture cache 3358, etc.) are interconnected via data port 3356 to perform memory access and communicate with the rendering output pipeline components of the processor. In some examples, sampler 3354, cache 3351, 3358, and execution units 3352A-3352B each have a separate memory access path. In some examples, texture cache 3358 can also be configured as a sampler cache.

[0322] In some examples, the render output pipeline 3370 includes a rasterizer and depth test component 3373, which converts vertex-based objects into associated pixel-based representations. In some examples, the rasterizer logic includes a window / masker unit for performing fixed-function triangle and line rasterization. In some examples, associated rendering buffers 3378 and depth buffers 3379 are also available. Pixel operation components 3377 perform pixel-based operations on data, but in some instances, pixel operations associated with 2D operations (e.g., using mixed bit block image transfers) are performed by the 2D engine 3341, or replaced by a display controller 3343 using an overlay display plane when displayed. In some examples, a shared L3 cache 3375 can be used for all graphics components, allowing data to be shared without using main system memory.

[0323] In some examples, the graphics processor media pipeline 3330 includes a media engine 3337 and a video front end 3334. In some examples, the video front end 3334 receives pipeline commands from the command stream converter 3303. In some examples, the media pipeline 3330 includes a separate command stream converter. In some examples, the video front end 3334 processes the media commands before sending the commands to the media engine 3337. In some examples, the media engine 3337 includes a thread generation function for generating threads for dispatching to the thread execution logic 3350 via the thread dispatcher 3331.

[0324] In some examples, graphics processor 3300 includes display engine 3340. In some examples, display engine 3340 is external to processor 3300 and is coupled to the graphics processor via ring interconnect 3302, or some other interconnect bus or structure. In some examples, display engine 3340 includes 2D engine 3341 and display controller 3343. In some examples, display engine 3340 contains dedicated logic that can operate independently of the 3D pipeline. In some examples, display controller 3343 is coupled to a display device (not shown), which can be a system integrated display device (such as in a laptop) or an external display device attached via a display device connector.

[0325] In some examples, the geometry pipeline 3320 and the media pipeline 3330 may be configured to perform operations based on multiple graphics and media programming interfaces, and are not specific to any one application programming interface (application programming interface, API). In some examples, the driver software for the graphics processor converts API calls specific to a specific graphics or media library into commands that can be processed by the graphics processor. In some examples, support is provided for the Open Graphics Library (OpenGL), the Open Computing Language (OpenCL) and / or the Vulkan graphics and computing APIs all from the Khronos Group. In some examples, support may also be provided for the Direct3D library from Microsoft. In some examples, a combination of these libraries may be supported. Support may also be provided for the Open Source Computer Vision Library (OpenCV). If a mapping from the pipeline of a future API to the pipeline of a graphics processor can be performed, future APIs with compatible 3D pipelines will also be supported.

[0326] Graphics pipeline programming

[0327] Fig.34A is a block diagram illustrating a graphics processor command format 3400 according to some examples. Fig.34B is a block diagram illustrating a graphics processor command sequence 3410 according to an example. Fig.34A The solid-line boxes in illustrate components that are typically included in the graphics commands, while the dashed lines include components that are optional or included only in a subset of the graphics commands. Fig.34A An exemplary graphics processor command format 3400 includes a data field for identifying a client 3402, a command operation code (opcode) 3404, and data for the command 3406. A sub-opcode 3405 and a command size 3408 are also included in some commands.

[0328] In some examples, client 3402 specifies a client unit of a graphics device that processes command data. In some examples, a graphics processor command parser checks the client field of each command to adjust further processing of the command and route the command data to the appropriate client unit. In some examples, a graphics processor client unit includes a memory interface unit, a rendering unit, a 2D unit, a 3D unit, and a media unit. Each client unit has a corresponding processing pipeline for processing commands. Once a command is received by a client unit, the client unit reads an opcode 3404 and a sub-opcode 3405 (if present) to determine the operation to be performed. The client unit uses the information in the data field 3406 to execute the command. For some commands, an expected explicit command size 3408 specifies the size of the command. In some examples, the command parser automatically determines the size of at least some of the commands based on the command opcode. In some examples, commands are aligned via multiples of double words. Other command formats can be used.

[0329] Fig.34B 3410. In some examples, software or firmware of a data processing system featuring an example of a graphics processor uses a version of the command sequence shown to establish, execute, and terminate a set of graphics operations. The sample command sequence is shown and described for example purposes only, as the examples are not limited to these particular commands or command sequences. Moreover, commands can be issued as batches of commands in a command sequence so that the graphics processor will process the command sequence in an at least partially concurrent manner.

[0330] In some examples, the graphics processor command sequence 3410 may begin with a pipeline dump clear command 3412 to cause any active graphics pipeline to complete the pipeline's currently pending commands. In some examples, the 3D pipeline 3422 and the media pipeline 3424 do not operate concurrently. The pipeline dump clear is performed to cause the active graphics pipeline to complete any pending commands. In response to the pipeline dump clear, the command parser for the graphics processor will suspend command processing until the active drawing engine completes pending operations and the associated read cache is invalidated. Optionally, any data marked as "dirty" in the rendering cache can be dumped to memory. In some examples, the pipeline dump clear command 3412 can be used for pipeline synchronization, or before placing the graphics processor in a low power state.

[0331] In some examples, pipeline select command 3413 is used when a command sequence requires the graphics processor to explicitly switch between pipelines. In some examples, pipeline select command 3413 is only required once in an execution context before issuing pipeline commands unless the context will issue commands for both pipelines. In some examples, pipeline flush command 3412 is required immediately before a pipeline switch via pipeline select command 3413.

[0332] In some examples, pipeline control commands 3414 configure the graphics pipeline for operation and are used to program 3D pipeline 3422 and media pipeline 3424. In some examples, pipeline control commands 3414 configure the pipeline state of the active pipeline. In some examples, pipeline control commands 3414 are used for pipeline synchronization and are used to clear data from one or more cache memories within the active pipeline before processing a batch of commands.

[0333] In some examples, return buffer state commands 3416 are used to configure a set of return buffers for a corresponding pipeline to write data. Some pipeline operations require allocating, selecting, or configuring one or more return buffers into which the operation writes intermediate data during processing. In some examples, the graphics processor also uses one or more return buffers to store output data and perform cross-thread communication. In some examples, return buffer state 3416 includes selecting the size and number of return buffers to be used for a set of pipeline operations.

[0334] The remaining commands in the command sequence differ based on the active pipeline for the operation.Based on pipeline decision 3420 , the command sequence is tailored for either the 3D pipeline 3422 starting at 3D pipeline state 3430 , or the media pipeline 3424 starting at media pipeline state 3440 .

[0335] The commands for configuring the 3D pipeline state 3430 include 3D state setting commands for vertex buffer state, vertex element state, constant color state, depth buffer state, and other state variables that will be configured before processing 3D primitive commands. The values ​​of these commands are determined at least in part based on the specific 3D API in use. In some examples, the 3D pipeline state 3430 commands can also selectively disable or bypass certain pipeline elements if those elements will not be used.

[0336] In some examples, the 3D primitive 3432 command is used to submit a 3D primitive to be processed by the 3D pipeline. The command and associated parameters passed to the graphics processor via the 3D primitive 3432 command are forwarded to the vertex acquisition function in the graphics pipeline. The vertex acquisition function uses the 3D primitive 3432 command data to generate multiple vertex data structures. The vertex data structures are stored in one or more return buffers. In some examples, the 3D primitive 3432 command is used to perform vertex operations on the 3D primitive via a vertex shader. In order to process the vertex shader, the 3D pipeline 3422 dispatches the shader execution thread to the graphics processor execution unit.

[0337] In some examples, the 3D pipeline 3422 is triggered via an execution 3434 command or event. In some examples, a register write triggers the command execution. In some examples, the execution is triggered via a "go" or "kick" command in the command sequence. In some examples, the command execution is triggered using a pipeline synchronization command to dump and clear the command sequence through the graphics pipeline. The 3D pipeline will perform geometry processing for 3D primitives. Once the operation is completed, the resulting geometric objects are rasterized and the pixel engine shades the resulting pixels. For those operations, additional commands for controlling pixel shading and pixel backend operations may also be included.

[0338] In some examples, when performing media operations, the graphics processor command sequence 3410 follows the media pipeline 3424 path. In general, the specific purpose and manner of programming for the media pipeline 3424 depends on the media or computing operations to be performed. During media decoding operations, specific media decoding operations can be migrated to the media pipeline. In some examples, the media pipeline can also be bypassed, and the media decoding can be performed in whole or in part using resources provided by one or more general processing cores. In some examples, the media pipeline also includes elements for general purpose graphics processor unit (GPGPU) operations, wherein the graphics processor is used to perform SIMD vector operations using compute shader programs that are not explicitly related to the rendering of graphics primitives.

[0339] In some examples, the media pipeline 3424 is configured in a similar manner to the 3D pipeline 3422. A collection of commands for configuring the media pipeline state 3440 is dispatched or placed into a command queue, before the media object commands 3442. In some examples, the commands for the media pipeline state 3440 include data for configuring the media pipeline elements that will be used to process the media objects. This includes data for configuring the video decoding and video encoding logic within the media pipeline, such as encoding or decoding formats. In some examples, the commands for the media pipeline state 3440 also support the use of one or more pointers to "indirect" state elements that contain batches of state settings.

[0340] In some examples, media object commands 3442 supply a pointer to a media object for processing by the media pipeline. The media object includes a memory buffer that contains video data to be processed. In some examples, all media pipeline states must be valid before issuing media object commands 3442. Once the pipeline state is configured and media object commands 3442 are queued, media pipeline 3424 is triggered via an execute command 3444 or an equivalent execution event (e.g., a register write). The output from media pipeline 3424 can then be post-processed by operations provided by 3D pipeline 3422 or media pipeline 3424. In some examples, GPGPU operations are configured and executed in a manner similar to media operations.

[0341] Program code can be applied to input information 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 present application, a processing system includes any system having a processor, such as a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), a field programmable gate array (FPGA, a microprocessor, or any combination thereof.

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

[0343] Examples of the mechanisms disclosed herein can be implemented in hardware, software, firmware, or a combination of these implementation approaches. Examples can be implemented as computer programs or program codes, executed on a programmable system including 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.

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

[0345] Therefore, the present examples also include non-transitory tangible machine-readable media that contain instructions or design data, such as hardware description languages ​​(HDL), that define the structures, circuits, devices, processors, and / or system features described herein. Such examples may also be referred to as program products.

[0346] Emulation (including binary translation, code deformation, etc.).

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

[0348] Fig.35 1 is a block diagram illustrating the use of a software instruction converter according to an example to convert binary instructions in a source ISA into binary instructions in a target ISA. In the illustrated example, 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.35 It is shown that a program in a high-level language 3502 can be compiled using a first ISA compiler 3504 to generate first ISA binary code 3506 that can be natively executed by a processor having at least one first ISA core 3516. The processor having at least one first ISA core 3516 represents any processor that is capable of executing or otherwise processing (1) a substantial portion of the first ISA or (2) a program that is natively executed by a processor having at least one first ISA core. The first ISA compiler 3504 represents a compiler operable to generate first ISA binary code 3506 (e.g., object code) that can be executed on a processor 3516 having at least one first ISA core with or without additional linking processing. Similarly, Fig.35It is shown that the program of high-level language 3502 can be compiled with alternative ISA compiler 3508 to generate alternative ISA binary code 3510, which can be executed natively by processor 3514 without first ISA core. Instruction converter 3512 is used to convert first ISA binary code 3506 into code that can be executed natively by processor 3514 without first ISA core. This converted code may not necessarily be the same as alternative ISA binary code 3510; however, the converted code will implement the total operation and be composed of instructions from the alternative ISA. Thus, instruction converter 3512 represents software, firmware, hardware or a combination thereof, which allows a processor or other electronic device without a first ISA processor or core to execute first ISA binary code 3506 through simulation, emulation or any other process.

[0349] IP core implementation

[0350] One or more aspects of at least some examples may be implemented by representative code stored on a machine-readable medium that represents and / or defines logic within an integrated circuit (such as a processor). For example, a machine-readable medium may include instructions representing various logic within a processor. When read by a machine, the instructions may cause the machine to manufacture logic for performing the techniques described herein. Such representations (referred to as "IP cores") are reusable units of logic for an integrated circuit that can be stored on a tangible, machine-readable medium as a hardware model describing the structure of the integrated circuit. The hardware model may be supplied to each customer or manufacturing facility that loads the hardware model on a manufacturing machine that manufactures the integrated circuit. The integrated circuit may be manufactured so that the circuit performs the operations described in association with any of the examples described herein.

[0351] Fig.3636 is a block diagram illustrating an IP core development system 3600 that can be used to manufacture an integrated circuit to perform operations according to an example. The IP core development system 3600 can be used to generate a modular, reusable design that can be incorporated into a larger design or used to build an entire integrated circuit (e.g., a SOC integrated circuit). The design facility 3630 can generate a software simulation 3610 of the IP core design using a high-level programming language (e.g., C / C++). The software simulation 3610 can be used to design, test, and verify the behavior of the IP core using a simulation model 3612. The simulation model 3612 can include functional simulation, behavioral simulation, and / or timing simulation. A register transfer level (RTL) design 3615 can then be created or synthesized from the simulation model 3612. The RTL design 3615 is an abstraction of the behavior of an integrated circuit (including associated logic executed using the modeled digital signals) that models the flow of digital signals between hardware registers. In addition to the RTL design 3615, a lower level design at the logic level or transistor level can also be created, designed, or synthesized. Thus, the specific details of the initial design and simulation can be different.

[0352] The RTL design 3615 or equivalent may be further synthesized by the design facility into a hardware model 3620, which may be in a hardware description language (HDL) or some other representation of physical design data. The HDL may be further simulated or tested to verify the IP core design. The IP core design may be stored using a non-volatile memory 3640 (e.g., a hard disk, flash memory, or any non-volatile storage medium) for delivery to a third-party manufacturing facility 3665. Alternatively, the IP core design may be transmitted via a wired connection 3650 or a wireless connection 3660 (e.g., via the Internet). The manufacturing facility 3665 may then manufacture an integrated circuit based at least in part on the IP core design. The manufactured integrated circuit may be configured to perform operations according to at least some of the examples described herein.

[0353] References to "some examples," "examples," etc. indicate that the examples described may include a particular feature, structure, or characteristic, but not every example may necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not necessarily referring to the same example. In addition, when a particular feature, structure, or characteristic is described in conjunction with an example, it is considered to be within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in conjunction with other examples, whether or not explicitly described.

[0354] Examples include, but are not limited to: Example 1. A device (such as a processor, SoC, core, accelerator, etc.), the device comprising at least: decoder circuitry for decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields of a source operand for storing a control and / or status register address, and one or more fields for a destination register operand, wherein the opcode is used to instruct execution circuitry to read data from a control and / or status register whose identity is stored in the source operand and write data to the destination register operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is determined at least in part by data of an operating system controlled data structure indexed by the control and / or status register address; and execution circuitry for executing the decoded instance of the single instruction in accordance with the opcode. Example 2. The apparatus of Example 1, wherein the source operand is a general register. Example 3. The apparatus of Example 1, wherein the source operand is a 32-bit immediate value encoding a control and / or status register address, wherein the instance of the single instruction further includes a prefix indicating the use of the 32-bit immediate value. Example 4. The apparatus of any of Examples 1-3, wherein the instance of the single instruction is to be executed at a user privilege level. Example 5. The apparatus of any of Examples 1-4, wherein the control and / or status registers are model specific registers. Example 6. The apparatus of any of Examples 1-5, wherein the data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible. Example 7. The apparatus of Example 6, wherein the first portion of the control and / or status register address is used to serve as a byte offset into a bitmap, and the second portion of the control and / or status register address is used to serve as a bit offset into a byte of an indexed byte in the bitmap. Example 8. The apparatus of any one of Examples 1-7, further comprising: a control and / or status register for providing an address to a data structure and an indication of whether an instance of a single instruction can be executed. Example 9. A method performed by a processor, the method comprising: decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields of a source operand for storing a control and / or status register address, and one or more fields for a destination register operand, wherein the opcode is used to instruct execution circuitry to read data from a control and / or status register whose identity is stored in the source operand and write data to the destination register operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is determined at least in part by data in an operating system controlled data structure indexed by the control and / or status register address; and executing the decoded instance of the single instruction in accordance with the opcode. Example 10. The method of Example 9, wherein the source operand is a general register. Example 11. The method of Example 9, wherein the source operand is a 32-bit immediate value for encoding a control and / or status register address, wherein the instance of the single instruction further includes a prefix for indicating the use of the 32-bit immediate value. Example 12. The method of any of Examples 9-11, wherein the instance of the single instruction is executable at a user privilege level. Example 13. The method of any of Examples 9-12, wherein the control and / or status registers are model specific registers. Example 14. The method of any of Examples 9-13, wherein the data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible. Example 15. The method of Example 14, wherein the first portion of the control and / or status register address is used to serve as a byte offset into the bitmap, and the second portion of the control and / or status register address is used to serve as a bit offset into a byte of an indexed byte in the bitmap. Example 16. The method of any of Examples 9-15, wherein the control and / or status register provides an address to the data structure and an indication of whether the instance of the single instruction can be executed. Example 17. A system (such as a computer, SoC, hardware device, etc.), the system comprising at least: a memory for storing an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields of a source operand for storing a control and / or status register address, and one or more fields for a destination register operand, wherein the opcode is used to instruct an execution circuit to read data from a control and / or status register whose identity is stored in the source operand and write data to the destination register operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is at least partially determined by data of an operating system controlled data structure indexed by the control and / or status register address; a decoder circuit for decoding the instance of the single instruction; and an execution circuit for executing the decoded instance of the single instruction according to the opcode. Example 18. The system of Example 17, wherein the source operand is a general register. Example 19. The system of Example 17, wherein the source operand is a 32-bit immediate value encoding a control and / or status register address, wherein the instance of the single instruction further includes a prefix indicating the use of the 32-bit immediate value. Example 20. The system of any of Examples 17-19, wherein the data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible. Example 21. A device (such as a processor, SoC, core, accelerator, etc.), the device comprising at least: decoder circuitry for decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields of a destination operand for storing a control and / or status register address, and one or more fields for a source register operand, wherein the opcode is used to instruct execution circuitry to write data from the source operand to a control and / or status register whose identity is stored in the destination operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is determined at least in part by data in an operating system controlled data structure indexed by the control and / or status register address; and execution circuitry for executing the decoded instance of the single instruction in accordance with the opcode. Example 22. The apparatus of Example 21, wherein the destination operand is a general register. Example 23. The apparatus of Example 21, wherein the destination operand is a 32-bit immediate value encoding a control and / or status register address, wherein the instance of the single instruction further includes a prefix indicating the use of the 32-bit immediate value. Example 24. The apparatus of any of Examples 21-23, wherein the instance of the single instruction is to be executed at a user privilege level. Example 25. The apparatus of any of Examples 21-24, wherein the control and / or status registers are model specific registers. Example 26. The apparatus of any of Examples 21-25, wherein the data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible. Example 27. The apparatus of Example 26, wherein the first portion of the control and / or status register address is used to serve as a byte offset into a bitmap, and the second portion of the control and / or status register address is used to serve as a bit offset into a byte of an indexed byte in the bitmap. Example 28. The apparatus of any of Examples 21-27, further comprising: a control and / or status register for providing an address to a data structure and an indication of whether an instance of a single instruction can be executed. Example 29. A method performed by a processor, the method comprising: decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields for a destination operand for storing a control and / or status register address, and one or more fields for a source register operand, wherein the opcode is used to instruct execution circuitry to write data from the source operand to a control and / or status register whose identity is stored in the destination operand in response to access to the control and / or status register being permitted, wherein access to the control and / or status register is determined at least in part by data in an operating system controlled data structure indexed by the control and / or status register address; and executing the decoded instance of the single instruction in accordance with the opcode. Example 30. The method of Example 29, wherein the destination operand is a general register. Example 31. The method of Example 29, wherein the destination operand is a 32-bit immediate value encoding a control and / or status register address, wherein the instance of the single instruction further includes a prefix indicating the use of the 32-bit immediate value. Example 32. The method of any of Examples 29-31, wherein the instance of the single instruction is executable at a user privilege level. Example 33. The method of any of Examples 29-32, wherein the control and / or status registers are model specific registers. Example 34. The method of any of Examples 29-33, wherein the data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible. Example 35. The method of Example 34, wherein the first portion of the control and / or status register address is used to serve as a byte offset into a bitmap, and the second portion of the control and / or status register address is used to serve as a bit offset into a byte of an indexed byte in the bitmap. Example 36. The method of any of Examples 29-35, wherein the control and / or status register provides an address to the data structure and an indication of whether the instance of the single instruction can be executed. Example 37. A system (such as a computer, SoC, hardware device, etc.), the system comprising at least: a memory for storing an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields of a destination operand for storing a control and / or status register address, and one or more fields for a source register operand, wherein the opcode is used to instruct execution circuitry to write data from the source operand to a control and / or status register whose identity is stored in the destination operand in response to access to the control and / or status register being permitted, wherein access to the control and / or status register is at least partially determined by data of an operating system controlled data structure indexed by the control and / or status register address; a decoder circuit for decoding the instance of the single instruction; and an execution circuit for executing the decoded instance of the single instruction according to the opcode. Example 38. The system of Example 37, wherein the destination operand is a general register. Example 39. The system of Example 37, wherein the destination operand is a 32-bit immediate value encoding a control and / or status register address, wherein the instance of the single instruction further includes a prefix indicating the use of the 32-bit immediate value. Example 40. The system of any of Examples 37-39, wherein the data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible.

[0355] Furthermore, in the examples described above, unless specifically noted otherwise, separating language such as phrases "at least one of A, B, or C" or "A, B and / or C" are intended to be understood to mean A, B, or C, or any combination thereof (i.e., A and B, A and C, B and C, and A, B and C).

[0356] Accordingly, the specification and drawings are to be regarded in an illustrative rather than a restrictive sense. It will, however, be evident that various modifications and changes may be made thereto without departing from the broader spirit and scope of the disclosure as set forth in the claims.

Claims

1. A device (such as a processor, SoC, core, accelerator, etc.), the device comprising at least: A decoder circuit for decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields for a source operand storing an address of a control and / or status register, and one or more fields for a destination register operand, wherein the opcode is used to instruct an execution circuit to read data from the control and / or status register whose identity is stored in the source operand and write the data to the destination register operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is at least partially determined by data in an operating system controlled data structure indexed by the control and / or status register address; and the execution circuit is used to execute the decoded instance of the single instruction in accordance with the opcode.

2. The device according to claim 1, wherein: The source operation object is a general register.

3. The device according to claim 1, wherein: The source operand is a 32-bit immediate value for encoding the control and / or status register address, wherein the instance of the single instruction further includes a prefix for indicating the use of the 32-bit immediate value.

4. The device according to any one of claims 1 to 3, wherein: The instance of the single instruction is intended to be executed at a user privilege level.

5. The device according to any one of claims 1 to 4, wherein: The control and / or status registers are model specific registers.

6. The device according to any one of claims 1 to 5, wherein: The data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible.

7. The device according to claim 6, wherein: The first portion of the control and / or status register address is used to serve as a byte offset into the bitmap, and the second portion of the control and / or status register address is used to serve as a bit offset into a byte of an indexed byte in the bitmap.

8. The device according to any one of claims 1 to 7, further comprising: A control and / or status register for providing an address to the data structure and an indication of whether the instance of the single instruction can be executed.

9. A method executed by a processor, the method comprising: Decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields for a source operand storing an address of a control and / or status register, and one or more fields for a destination register operand, wherein the opcode is used to instruct execution circuitry to read data from the control and / or status register whose identity is stored in the source operand and write the data to the destination register operand in response to access to the control and / or status register being permitted, wherein access to the control and / or status register is at least partially determined by data in an operating system controlled data structure indexed by the control and / or status register address; and executing the decoded instance of the single instruction in accordance with the opcode.

10. The method of claim 9, wherein: The source operation object is a general register.

11. The method of claim 9, wherein: The source operand is a 32-bit immediate value for encoding the control and / or status register address, wherein the instance of the single instruction further includes a prefix for indicating the use of the 32-bit immediate value.

12. The method according to any one of claims 9 to 11, wherein: Instances of the single instruction are executable at a user privilege level.

13. The method according to any one of claims 9 to 12, wherein: The control and / or status registers are model specific registers.

14. The method according to any one of claims 9 to 13, wherein: The data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible.

15. The method of claim 14, wherein: The first portion of the control and / or status register address is used to serve as a byte offset into the bitmap, and the second portion of the control and / or status register address is used to serve as a bit offset into a byte of an indexed byte in the bitmap.

16. The method according to any one of claims 9 to 15, wherein: A control and / or status register provides an address to the data structure and an indication of whether the instance of the single instruction can be executed.

17. A system (such as a computer, SoC, hardware device, etc.), the system comprising at least: A memory for storing an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields for a source operand storing an address of a control and / or status register, and one or more fields for a destination register operand, wherein the opcode is used to instruct an execution circuit to read data from the control and / or status register whose identity is stored in the source operand and write the data to the destination register operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is at least partially determined by data of an operating system controlled data structure indexed by the control and / or status register address; a decoder circuit for decoding the instance of the single instruction; and the execution circuit for executing the decoded instance of the single instruction according to the opcode.

18. The system of claim 17, wherein: The source operation object is a general register.

19. The system of claim 17, wherein: The source operand is a 32-bit immediate value for encoding the control and / or status register address, wherein the instance of the single instruction further includes a prefix for indicating the use of the 32-bit immediate value.

20. The system of any one of claims 17-19, wherein: The data structure is a bitmap having a plurality of entries, wherein an entry of the bitmap is used to indicate each control and / or status register that is accessible.

21. A device (such as a processor, SoC, core, accelerator, etc.), the device comprising at least: A decoder circuit for decoding an instance of a single instruction, the instance of the single instruction comprising: one or more fields for an opcode, one or more fields for a destination operand storing an address of a control and / or status register, and one or more fields for a source register operand, wherein the opcode is used to instruct an execution circuit to write data from the source operand to the control and / or status register whose identity is stored in the destination operand in response to access to the control and / or status register being allowed, wherein access to the control and / or status register is at least partially determined by data in an operating system controlled data structure indexed by the control and / or status register address; and the execution circuit is used to execute the decoded instance of the single instruction in accordance with the opcode.

22. The device of claim 21, wherein: The destination operand is a general purpose register.

23. The device of claim 21, wherein: The destination operand is a 32-bit immediate value for encoding the control and / or status register address, wherein the instance of the single instruction further includes a prefix for indicating the use of the 32-bit immediate value.

24. The device according to any one of claims 21 to 23, wherein: The instance of the single instruction is intended to be executed at a user privilege level.

25. The device according to any one of claims 21 to 24, wherein: The control and / or status registers are model specific registers.

Citation Information

Cited By

  • Vector register device, vector register addressing method and electronic equipment

    CN119847945A

  • Vector data rearrangement execution method based on load storage path multiplexing and processor

    CN122489131A