Unified datapath for triangle and box intersection testing in ray tracing
The integrated datapath unit optimizes silicon usage and throughput for ray tracing by configuring functional blocks and multiplexing layers, addressing the computational inefficiencies of ray tracing and enhancing rendering speed.
Patent Information
- Application Number
- JP2021527089
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2018-12-13
- Filing Date
- 2019-12-02
- Publication Date
- 2024-08-28
- Estimated Expiration
- 2039-12-02
AI Technical Summary
Ray tracing, while providing more physically accurate graphics rendering, is computationally expensive compared to rasterization-based techniques.
An integrated datapath unit with configurable functional blocks and a multiplexer layer that switches between different instruction types, allowing for efficient processing of ray tracing operations by optimizing silicon area usage and throughput through pipelining and parallelization.
Reduces silicon area and increases processing efficiency for ray tracing operations, enabling faster rendering of graphics by effectively handling ray-box and ray-triangle intersections.
Smart Images

Figure 0007541515000002 
Figure 0007541515000003 
Figure 0007541515000001
Abstract
Description
[Technical field]
[0001] (CROSS REFERENCE TO RELATED APPLICATIONS) This application claims the benefit of U.S. Patent Application No. 16 / 219,802, filed December 13, 2018, the contents of which are incorporated herein by reference. [Background technology]
[0002] Ray tracing is a type of graphics rendering technique that casts simulated rays to test for object intersections and then colors pixels based on the results of the raycast. Ray tracing is more computationally expensive than rasterization-based techniques, but produces more physically accurate results. Improvements in ray tracing calculations are constantly being made.
[0003] A more detailed understanding may be had from the following description, given by way of example in conjunction with the accompanying drawings, in which: [Brief description of the drawings]
[0004] [Figure 1] FIG. 1 is a block diagram of an example device capable of implementing one or more features of the present disclosure. [Diagram 2] 2 is a block diagram of the accelerated processing device of FIG. 1 illustrating additional details associated with executing processing tasks on the device, according to an example. [Diagram 3] FIG. 2 illustrates details of an integrated datapath unit, according to an example. [Figure 4] FIG. 1 illustrates an example of an integrated datapath unit that performs both ray box and ray triangle testing. [Diagram 5] 1 is a flowchart of a method for processing data through an integrated datapath unit according to an example. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0005] Described herein is a unified datapath unit having elements configurable to switch between different instruction types. The unified datapath unit is a pipeline unit having multiple stages. Between the different stages are multiplexer layers that are configurable by a control unit to route data from functional blocks in stages before the multiplexer layer to stages after the multiplexer layer. The way in which the multiplexer layer is configured for a particular stage is based on the instruction type executed in that stage. In some embodiments, the functional blocks in different stages are also configurable by the control unit to change the operation they perform (e.g., a multiplier / adder combination can be set as a multiplier or an adder based on the instruction type). Additionally, in some embodiments, the control unit has a sideband storage device that stores "skip stage" data. Described herein are examples of unified datapaths used to perform ray triangle intersection tests and ray box intersection tests. Further details are provided below.
[0006] 1 is a block diagram of an example device 100 capable of implementing one or more features of the present disclosure. Device 100 may include, for example, a computer, a gaming device, a handheld device, a set-top box, a television, a mobile phone, or a tablet computer. Device 100 includes a processor 102, a memory 104, a storage device 106, one or more input devices 108, and one or more output devices 110. Device 100 also optionally includes an input driver 112 and an output driver 114. It will be understood that device 100 may include additional components not shown in FIG. 1.
[0007] In various alternatives, the processor 102 may include a central processing unit (CPU), a graphics processing unit (GPU), a CPU and a GPU located on the same die, or one or more processor cores, each of which may be a CPU or a GPU. In various alternatives, the memory 104 may be located on the same die as the processor 102 or may be located separately from the processor 102. The memory 104 may include volatile or non-volatile memory (e.g., random access memory (RAM), dynamic RAM, cache, etc.).
[0008] The storage devices 106 include fixed or removable storage devices (e.g., hard disk drives, solid state drives, optical disks, or flash drives). The input devices 108 include, but are not limited to, a keyboard, a keypad, a touch screen, a touch pad, a detector, a microphone, an accelerometer, a gyroscope, a biometric scanner, or a network connection (e.g., a wireless local area network card for transmitting and / or receiving wireless IEEE 802 signals). The output devices 110 include, but are not limited to, a display device 118, a speaker, a printer, a haptic feedback device, one or more lights, an antenna, or a network connection (e.g., a wireless local area network card for transmitting and / or receiving wireless IEEE 802 signals).
[0009] The input driver 112 communicates with the processor 102 and the input device 108, allowing the processor 102 to receive input from the input device 108. The output driver 114 communicates with the processor 102 and the output device 110, allowing the processor 102 to send output to the output device 110. It should be noted that the input driver 112 and the output driver 114 are optional components, and that the device 100 operates in the same manner if the input driver 112 and the output driver 114 are not present. The output driver 114 includes an accelerated processing device (APD) coupled to a display device 118. The APD 116 is configured to receive computational and graphics rendering commands from the processor 102 for processing the computational and graphics rendering commands, and provide pixel output to the display device 118 for display. As described in more detail below, the APD 116 includes one or more parallel processing units configured to perform computations according to a single instruction multiple data (SIMD) paradigm. Thus, although various functions are described herein as being performed by or in conjunction with APD 116, in various alternative examples, the functions described as being performed by APD 116 are additionally or alternatively performed by other computing devices having similar functionality that are not driven by a host processor (e.g., processor 102) and that are configured to provide (graphical) output to display device 118. For example, it is contemplated that any system that performs processing tasks according to the SIMD paradigm may be configured to perform the functions described herein. Alternatively, it is contemplated that computing systems that do not perform processing tasks according to the SIMD paradigm may perform the functions described herein.
[0010] 2 is a block diagram of device 100 showing additional details related to the execution of processing tasks on APD 116. Processor 102 maintains in system memory 104 one or more control logic modules that are executed by processor 102. The control logic modules include operating system 120, drivers 122, and applications 126. These control logic modules control various aspects of the operation of processor 102 and APD 116. For example, operating system 120 communicates directly with the hardware and provides an interface to the hardware for other software executing on processor 102. Drivers 122 control the operation of APD 116, for example, by providing application programming interfaces (APIs) to software executing on processor 102 (e.g., applications 126) to access various features of APD 116. In some embodiments, driver 122 includes a just-in-time compiler that compiles programs executed by processing components of APD 116 (such as SIMD units 138, described in more detail below). In other embodiments, a just-in-time compiler is not used to compile the programs, and a regular application compiler compiles the shader programs that run on the APD 116.
[0011] APD 116 executes commands and programs for selected functions, such as graphics and non-graphics operations suitable for parallel and / or unordered processing. APD 116 performs graphics pipeline operations, such as pixel operations, geometric calculations, etc., based on commands received from processor 102 and is used to render images to display device 118. APD 116 also performs computational operations not directly related to graphics operations, such as video, physics simulations, computational fluid dynamics, or other tasks, based on commands received from processor 102.
[0012] APD 116 includes computational units 132, including one or more SIMD units 138, which perform operations at the request of processor 102 in a parallel manner according to the SIMD paradigm. The SIMD paradigm allows multiple processing elements to share a single program control flow unit and program counter, thereby executing the same program, but with different data. In one example, each SIMD unit 138 includes 16 lanes, each lane executing the same instruction simultaneously with other lanes in SIMD unit 138, but with different data. Predication may be used to turn off lanes when not all lanes need to execute a given instruction. Predication may also be used to execute programs with diverging control flows. More specifically, for programs with conditional branches or other instructions where the control flow is based on calculations performed by individual lanes, predication of lanes corresponding to the control flow paths that are not currently executed, and successive execution of different control flow paths, allows arbitrary control flow. In an embodiment, each of computational units 132 may have a local L1 cache. In an embodiment, multiple compute units 132 share an L2 cache.
[0013] The basic unit of execution in the compute units 132 is the work item. Each work item represents a single instantiation of a program that executes in parallel on a particular lane. Work items may be executed simultaneously as a "wavefront" on a single SIMD processing unit 138. One or more wavefronts are included in a "workgroup," which includes a collection of work items designated to execute the same program. A workgroup is executed by executing each of the wavefronts that make up the workgroup. In the alternative, a wavefront executes sequentially on a single SIMD unit 138, or partially or fully in parallel on different SIMD units 138. A wavefront may be thought of as the largest collection of work items that execute simultaneously on a single SIMD unit 138. Thus, if a command received from the processor 102 indicates that a particular program is to be executed in parallel to a degree that cannot be executed simultaneously on a single SIMD unit 138, the program is divided into wavefronts that are parallelized on two or more SIMD units 138 or serialized on the same SIMD unit 138 (or both parallelized and serialized, as appropriate). The scheduler 136 is configured to perform operations related to scheduling various wavefronts on the different compute units 132 and SIMD units 138.
[0014] The parallelism permitted by the compute units 132 is well suited for graphics-related operations such as pixel value calculations, vertex transformations, and other graphics operations. Thus, in some cases, the graphics pipeline 134, which receives graphics processing commands from the processor 102, provides computation tasks to the compute units 132 for parallel execution.
[0015] Computation units 132 are also used to perform non-graphics related computational tasks, or computational tasks that are not performed as part of the "normal" operation of graphics pipeline 134 (e.g., custom operations performed to supplement the processing performed for the operation of graphics pipeline 134). Applications 126 or other software executing on processor 102 send programs defining such computational tasks to APD 116 for execution.
[0016] Each compute unit 132 includes one or more unified datapath units 139. A unified datapath unit 139 is a unit that has functional blocks that are shared between different operations. In one example, unified datapath unit 139 performs both ray-to-box hit detection and ray-to-triangle hit detection for ray casting shader programs that run in SIMD unit 138. The functional blocks in unified datapath unit 139 include blocks such as individual adders and multipliers. In unified datapath unit 139, some of these functional blocks are used for multiple different operations. Although unified datapath unit 139 is described as being included in APD 116, it should be understood that unified datapath unit 139 may be used in or with any type of processing unit. In one example, a program executing within SIMD unit 138 requests unified datapath unit 139 to execute a particular instruction, and in response, unified datapath unit 139 configures itself according to the requested instruction type and executes the requested instruction.
[0017] 3 illustrates details of unified datapath unit 139, according to one example. Unified datapath unit 139 includes several opcode specific blocks 304 arranged in stages, a multiplexer layer 306, shared functionality blocks 308, and a sideband storage and block control unit 310 (also referred to herein as “control unit 310”). Unified datapath unit 139 is considered “unified” because different types of instructions can be executed in unified datapath unit 139 using at least some of the same functionality blocks (shared functionality blocks 308).
[0018] The term "functional block" refers to both opcode-specific blocks 304 and shared functional blocks 308. Opcode-specific blocks 304 are functional blocks (i.e., circuits that perform a specific operation, such as addition or multiplication, determining a minimum or maximum value, performing logical operations such as AND and / or OR operations, or performing a specific sequence of the above) that are used only by a particular data path 302 (and thus only the particular instruction type defined by that opcode). Shared functional blocks 308 are functional blocks that are used by multiple data paths 302 (and thus multiple instruction types). In some embodiments, shared functional blocks 308 perform a fixed operation (such as addition) regardless of the instruction type being performed by that functional block. In other embodiments, the control unit 310 can configure shared functional blocks 308 to perform different operations for different instruction types.
[0019] The start and end of a function block are defined by clocked elements (such as flip-flops). A signal propagates through the logic of the function block from a flip-flop at the input of the function block without encountering any clocked elements to the output of the function block, where the result is stored in an output flip-flop for use in a subsequent stage. Typically, the propagation delay of each function block is less than the cycle period multiplied by the number of stages it spans. (Typically, this number is one, but some function blocks may span multiple stages, in which case the propagation delay through that function block is greater than the cycle period, but less than a certain multiple of the cycle period.)
[0020] The multiplexer layer 306 includes one or more multiplexers that receive data from and provide data to a subsequent stage or control unit 310 based on control signals set by the control unit 310 .
[0021] At the input of unified datapath unit 139, unified datapath unit 139 accepts an opcode that specifies an instruction type and one or more operands for that instruction type. The instruction is processed through a series of stages to produce and output one or more results. Unified datapath unit 139 is pipelined so that in any particular cycle, each stage performs sub-operations on a different instruction.
[0022] Control unit 310 configures each stage to perform sub-operations of a particular instruction type based on which instruction type each stage executes in a given cycle. More specifically, in each clock cycle, each stage performs sub-operations of a particular instruction type. The term "sub-operation" refers to an intermediate calculation or operation of an instruction type that is performed by a particular functional block of unified datapath unit 139. For example, for an instruction with a sequence of multiply-add operations, one sub-operation may be an addition of two values, another sub-operation may be a multiplication of two values, yet another sub-operation may be an addition of two values, and so on. The particular sequence of sub-operations that are performed for a given instruction depends on the opcode of that instruction.
[0023] The control unit 310 controls the multiplexer layer 306 to route data for a particular instruction to a particular functional block based on the instruction's opcode. The control unit 310 also serves as a temporary store for instructions that do not perform an action at a particular stage. This may occur, for example, when a particular instruction type is at least partially serialized via the unified datapath unit 139, as described in more detail below.
[0024] For any given stage, in any particular cycle, the functional blocks of that stage are configured to perform sub-operations for a single instruction type. However, stages can change the instruction type executed in that stage from cycle to cycle. Thus, in any particular cycle, one stage can be configured to execute instructions of a first type, and in that same cycle, the immediately following (or immediately preceding) stage can be configured to execute instructions of a second type.
[0025] One purpose of using unified datapath unit 139 is to reduce the amount of silicon area used by only a single type of instruction, since doing so reduces the total amount of silicon for the chip. Thus, one way to design a unified datapath unit is to design it for the instruction that requires the greatest amount of silicon area, and then use the functional blocks that occupy that silicon area for other instruction types that require less silicon. Functional blocks that are used by multiple instructions are the shared functional blocks 308 described above. Of course, different instruction types may either require unique functional units that cannot be shared with different instruction types, or may require more of a particular shared functional block 308 than other instruction types.
[0026] It is possible to take advantage of the difference in the amount of silicon area required for different instruction types by increasing the throughput for instruction types that require less silicon. Increasing the throughput of a first instruction type compared to a second instruction type means that more instructions of the first instruction type are processed through the unified datapath unit 139 in the same number of cycles than the second instruction type. Increasing the throughput can be achieved through either or both of parallelizing sub-operations of an instruction type in a particular stage or serializing sub-operations of an instruction type across multiple stages. Parallelizing sub-operations of an instruction type means using functional blocks to execute sub-operations corresponding to multiple instances of a given instruction type in a single stage. Serializing sub-operations means executing the same sub-operation for different instruction instances of the same type in different stages of the unified datapath unit 139. Parallelizing sub-operations may be performed when a large number of functional blocks are already present in a particular stage due to the need for instructions that require a larger amount of silicon than the parallelized instruction. In that situation, sub-operations of multiple instances of an instruction that requires a small amount of silicon may be executed in that particular stage in the same cycle. By parallelizing and / or serializing the lower-silicon instructions, a large portion of the silicon available for the higher-silicon instructions is available for the lower-silicon instructions.
[0027] An example of the above features of unified datapath unit 139 is shown in FIG. 3. A first datapath 302(1) processes instructions of a first type, and a second datapath 302(2) processes instructions of a second type. The first type requires more silicon area than the second type. In particular, each instruction of the first type requires the following units: an opcode-specific block 304(1), four shared functional blocks 308(1)-308(4) in stage 1, two shared functional blocks 308(5)-308(6) in stage 2, two shared functional blocks 308(7)-308(8) in stage 3, and an opcode-specific block 304(6) in stage 4. An opcode-specific block 304(1) is used for every instruction of the first type. Each instruction of the second type requires the following units: two shared functional blocks 308 and one opcode-specific block 304. Opcode-specific block 304(2) is shared between multiple instances of the second type instruction. The second type instruction uses opcode-specific blocks 304(3), 304(4), 304(5), 304(7), but does not use 304(6). Note that each instruction of the first instruction type requires eight shared functional blocks 308, and each instruction of the second instruction type requires only two shared functional blocks 308. Thus, there are enough shared functional blocks 308 to output the results of one instruction of the first type per cycle and four instructions of the second type per cycle.
[0028] The operation of unified datapath unit 139 occurs as follows for a first instruction type: Data for an instruction of the first instruction type is input to stage 0 opcode-specific block 304(1) in a first cycle, and the instruction's opcode is provided to sideband storage and block control unit 310 (again sometimes shortened to "control unit 310"). Opcode-specific block 304(2) is not used during this cycle because it is the block for instructions of the second type. The result is output to multiplexer layer 306(1).
[0029] In the next cycle, control unit 310 configures multiplexer layer 306(1) to distribute the values from opcode-specific block 304(1) to each shared function block 308 in stage 1 used to process a single instruction of the first type. The shared function blocks 308 in stage 1 process the values and output the results to multiplexer layer 306(2). Control unit 310 configures multiplexer layer 306(2) to output the values to either shared function block 308(5) or shared function block 308(6). These blocks process the data and output the results to multiplexer layer 306(3). Control unit 310 configures multiplexer layer 306(3) to output the results to either shared function block 308(7) or shared function block 308(8). These blocks process the results and output the results to multiplexer layer 306(4). Control unit 310 controls multiplexer layer 306(4) to output the results to opcode-specific block 304(6), which processes the results and outputs the result for the instruction.
[0030] Processing the second type of instructions is performed as follows: Values for four different instructions of the second type are input to opcode-specific block 304(2). Opcode-specific block 304(2) processes the results and outputs these values to multiplexer layer 306(1). Control unit 310 configures multiplexer layer 306(1) to output values for two instructions to shared function blocks 308(1)-308(4) and to output values for the other two instructions to control block 310 for temporary storage. Shared function blocks 308(1)-308(2) process values for the first instruction and output these values to multiplexer layer 306(2). Shared function blocks 308(3)-308(4) process values for the second instruction and output these values to multiplexer layer 306(2). Control unit 310 configures multiplexer layer 306(2) to provide values for a third instruction stored in control unit 310 and not processed in stage 1 to stage 2 for the same sub-operations performed for the first and second instructions in stage 1. Control unit 310 configures multiplexer layer 306(2) to provide values output from stage 1 for instruction 1 to a first opcode-specific block 304(3) in stage 2 and to provide values output from stage 1 for instruction 2 to a second opcode-specific block 304(4) in stage 2. The blocks in stage 2 process the values and output the results to multiplexer layer 306(3). The control unit 310 configures multiplexer layer 306(3) to provide the output of shared function block 308 in stage 2 to opcode-specific block 304(5) in stage 3, to provide the output for instruction 4 to shared function block 308 in stage 3, and to provide the output of opcode-specific block 304 in stage 2 to the control unit 310. Shared function block 308 and opcode-specific block 304 in stage 3 output their results to multiplexer layer 306(4). The control unit configures multiplexer layer 306(4) to output the result for instruction 4 to opcode-specific block 304(7) in stage 4.After stage 4, control unit 310 causes results of all four instructions of type 2 to be output in the same cycle. Because unified datapath unit 139 is pipelined, results for a maximum of four instructions of type 2 can be output per cycle. Of course, it is also possible for the instruction types to be different in different cycles, with either one instruction of the first type or four instructions of the second type output from unified datapath unit 139 in each cycle.
[0031] It should be understood that in any given cycle, any particular stage performs operations for one type of instruction, while different stages perform operations for different types of instructions. Although specific details of unified datapath unit 139 are shown, such as the number and interconnectivity of functional blocks, it should be understood that many variations in such details are possible and are within the scope of the present disclosure.
[0032] An embodiment of the unified datapath unit will now be described with respect to ray tracing operations. In general, ray tracing renders an image by casting a ray from a camera point through an image plane, determining whether the ray hits an object, and if so, coloring pixels in the image plane based on the hit (or miss). Determining whether the ray hits an object is referred to herein as a "ray intersection test."
[0033] Ray intersection testing involves casting a ray from an origin, determining if the ray hits a triangle, and if so, how far from the origin the triangle hit is. For efficiency, ray tracing testing uses a representation of space called a bounding volume hierarchy, in which each non-leaf node represents an axis-aligned bounding box that bounds the geometry of all of the node's children. For example, the base node represents the maximum extent of the entire region over which ray intersection testing is performed. In this example, the base node has two children, each of which represents a mutually exclusive axis-aligned bounding box that divides the entire region. Each of those two children has two child nodes, each of which represents an axis-aligned bounding box that divides the space of their parent, and so on. The leaf nodes represent triangles over which ray testing can be performed.
[0034] The bounding volume hierarchical data structure can reduce the number of ray triangle intersections (which are complex and expensive in terms of processing resources) compared to scenarios where such a data structure is not used and therefore all triangles in the scene need to be tested against the ray. In particular, if a ray does not intersect a particular bounding box and that bounding box bounds a large number of triangles, all triangles within that box can be excluded from testing. Thus, ray intersection testing is performed as a sequence of testing the ray against an axis-aligned bounding box followed by a test against the triangle.
[0035] FIG. 4 illustrates an example of a unified datapath unit 400 that implements both ray box and ray triangle tests. This particular unified datapath unit 400 can output the results of four box tests per cycle or one triangle test per cycle. The unified datapath unit 400 both parallelizes and serializes the operations for the box tests to achieve speed for the box tests. Each stage is shown to have several functional blocks. Most of the functional blocks are either adders (denoted by a plus sign "+") that add two scalar values, or multipliers (denoted by an "x") that multiply two scalar values. Most of the multipliers and adders are used by both the triangle datapath 402(1) and the box datapath 402(2). Also shown are opcode specific blocks. These opcode specific blocks include a box max / min unit and a triangle compare unit.
[0036] The unified datapath unit 400 is divided into multiple stages that perform specific functions for either or both of the ray box and triangle tests. The first stage contains 12 adders. As shown, 12 adders are used for two box tests and 9 adders are used for one triangle test.
[0037] Once the stage 0 computations for either the box test or triangle test are completed, the results are provided to multiplexer layer 406(0). Control unit 410 configures multiplexer layer 406(0) to provide these results to the stage 1 multipliers for further operations.
[0038] In stage 1, 12 multipliers are used for two box tests or one triangle test. The results are output to a multiplexer layer 406(1) that is configured by the control unit 410 to proceed to the subsequent stage according to the instruction being executed. Stage 2 and stage 3 each include six adders and six multipliers. The six adders and multipliers are used for one box test or one triangle test. Box min / max units are also shown between stage 2 and stage 3. These units are operation specific units, each of which is used in a single box test. After stage 3, the results for the two box tests are completed and stored in the control unit 410. In stages 2 and 3, for the third box test, the results from the adders and multipliers are provided to the box min / max units of stages 4 and 5.
[0039] Stages 4 and 5 each include six adders and six multipliers. The six adders and multipliers are used for one triangle test or one box test (the fourth box test). Stages 6 and 7 each include two adders and two adders are used for one triangle test. A box min / max unit is used for the fourth box test. On each cycle, unified datapath unit 400 outputs the results of either four box tests (three of which are stored in control unit 910 and one of which is obtained from the box min / max units of stages 6 and 7) or one triangle test (the result of which is obtained from stage 7).
[0040] FIG. 5 is a flow chart of a method 500 of processing data through unified datapath unit 139, according to one example. In step 502, control unit 310 of unified datapath unit 139 sets the configuration of the multiplexers per stage of unified datapath unit 139 based on the sub-operation performed by that stage. As described elsewhere herein, unified datapath unit 139 is pipelined. This pipelining means that different instructions perform different sub-operations in different stages. Unified datapath unit 139 is "unified" in that different stages are configurable to perform sub-operations in different ways for different types of instructions. The sub-operations of a stage are defined at least by the way that data from a previous stage (or input) is provided to a particular functional block of the stage. For example, for one instruction type, the output from a particular functional block of a previous stage is provided to a first functional block of a subsequent functional stage, and for a different instruction type, the output from that particular functional block of a previous stage is provided to a second functional block of a subsequent functional stage. It is also possible for values from the functional blocks to be output to and / or read from the sideband storage into the functional blocks, controlled by the control unit 310. Whether this is done, which values are read into or read from the sideband storage, and which functional blocks these values are read into or read from, depends on the instruction type. Thus, the control unit 310 controls the multiplexer layers to move data between stages based on the instruction type.
[0041] In step 504, control unit 310 sets the configuration of the functional blocks for each stage based on the sub-operations performed by the stage. This step is considered "optional" in that some embodiments of unified datapath unit 139 perform this step, while others do not. In embodiments that perform this step, at least some of the functional blocks may change the operations they perform. For example, instead of the functional blocks being adders or multipliers, the functional blocks may be switched between being adders and multipliers. In such embodiments, control unit 310 controls which functional blocks perform which operations based on the instruction type being executed in a particular cycle in that stage.
[0042] In step 506, the control unit 310 configures a multiplexer to store data in the sideband storage of the control unit 310 for instruction types that use this feature. In particular, for some instruction types, some data is stored in the sideband for processing in a stage that is not the stage immediately following where the data was generated. In one example, this feature is used to facilitate the output of multiple instructions per cycle by serializing data processing through the datapath. In one example, one instruction is processed in the first two stages and the results for that instruction are stored in the sideband memory. Then, data for a second instruction is fetched from the sideband memory and provided to the next two stages. Finally, the output of both instructions is provided in the same cycle. In step 508, the control unit configures a multiplexer to transfer data from the sideband storage of the control unit 310 to the functional unit of the stage that read from the sideband storage. Steps 506 and 508 are optional since not all embodiments of the unified datapath 139 use the sideband storage feature. In step 510, each stage performs an operation using the data provided by the previous multiplexer layer, and if an embodiment performs step 504 to change the operation performed by the functional block, each stage performs the operation as configured by the control unit. After step 510, method 500 returns to step 1002 to perform the operations for the next cycle. With respect to steps 502-508, the particular manner in which control unit 310 configures the multiplexer layer and / or functional block is based on the instruction type in a particular cycle. In any particular cycle, different stages may be configured to perform instructions for different instruction types. It should be noted that the method may be used to perform the operations described with respect to FIG. 4.
[0043] It should be understood that many variations are possible based on the disclosure herein. In one example, any stage can be configured to execute different instruction types in the same cycle. In one example, in any particular stage, one functional unit in that stage may be configured to process data for a first instruction type in a particular cycle, and a different functional unit in that same stage may be configured to process data for a different second instruction type in the same particular cycle. Any stage may be configured to process different instruction types in the same cycle, as described above. Although features and elements are described above in particular combinations, each feature or element may be used alone without other features and elements, or in various combinations with or without other features and elements.
[0044] The provided methods can be implemented in a general purpose computer, processor, or processor core. Suitable processors include, for example, general purpose processors, special purpose processors, conventional processors, digital signal processors (DSPs), multiple microprocessors, one or more microprocessors in cooperation with a DSP core, controllers, microcontrollers, application specific integrated circuits (ASICs), field programmable gate array (FPGA) circuits, any other type of integrated circuit (IC), and / or state machines. Such processors can be manufactured by configuring a manufacturing process using the results of processed hardware description language (HDL) instructions and other intermediate data, including a netlist (instructions that can be stored on a computer readable medium). The results of such processing can be a mask work that is subsequently used in a semiconductor manufacturing process to manufacture a processor implementing features of the present disclosure.
[0045] The methods or flow charts provided herein may be implemented in a computer program, software, or firmware embodied in a non-transitory computer-readable storage medium for execution by a general purpose computer or processor. Examples of non-transitory computer-readable storage media include read-only memory (ROM), random access memory (RAM), registers, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media, and optical media such as CD-ROM disks and digital versatile disks (DVDs).
Claims
1. 1. An integrated datapath circuit for executing at least two different types of instructions, comprising: a plurality of stages including a first stage and a second stage, each stage including one or more functional units, at least one of the functional units being a shared functional unit that performs operations for multiple instruction types of one or more instruction types; a plurality of multiplexers disposed between the stages; in a first cycle, a first functional unit of the first stage is configured to execute a first instruction of a first instruction type; In a second cycle after the first cycle, the plurality of stages and the multiplexer executing the first instruction in a first functional unit of the second stage, the first instruction including selecting, via the plurality of multiplexers, data of the first functional unit of the first stage produced in the first cycle as an input to the first functional unit of the second stage; executing a second instruction of a second instruction type in a second functional unit of the first stage; [0023] The method is configured to perform operations including: In a third cycle after the second cycle, the plurality of stages and the multiplexer executing the second instruction in a first functional unit of the second stage, the plurality of multiplexers selecting data of the second functional unit of the first stage produced in the second cycle as an input to the first functional unit of the second stage; configured to perform operations including: Integrated datapath circuitry.
2. the one or more functional units include at least one opcode specific block used by an instruction type that is one of the at least two different types of instructions but not another of the at least two different types of instructions; 2. The integrated datapath circuit of claim 1.
3. at least one stage of the plurality of stages is configured to process multiple instances of any one of the one or more instruction types in parallel in a single cycle; 2. The integrated datapath circuit of claim 1.
4. the stages are configured to execute the instances of the one or more instruction types by serializing operations on the instances through the stages.
2. The integrated datapath circuit of claim 1.
5. a control unit configured to configure the multiple multiplexers to route the data for the different functional units of the multiple stages based on an instruction type to be executed in the multiple stages.
2. The integrated datapath circuit of claim 1.
6. the control unit is configured to store data from at least one stage for use in a subsequent stage; 6. The integrated datapath circuit of claim 5.
7. At least one of the one or more functional units includes a functional unit spanning multiple stages.
2. The integrated datapath circuit of claim 1.
8. at least one functional unit of the one or more functional units receives an input from an input clocked element and outputs a value to an output clocked element, and has no clocked elements between the input clocked element and the output clocked element; 2. The integrated datapath circuit of claim 1.
9. The two different types of instructions include a ray triangle intersection test and a ray box intersection test.
2. The integrated datapath circuit of claim 1.
10. 1. A method for operating an integrated datapath circuit for executing at least two different types of instructions, comprising: the integrated datapath circuit comprises a plurality of stages including a first stage and a second stage, each stage including one or more functional units, at least one of the functional units being a shared functional unit that performs operations for a plurality of instruction types; and a plurality of multiplexers disposed between the stages; The method comprises: configuring the plurality of stages to execute instructions of one or more instruction types by controlling the plurality of multiplexers to route data between functional units of the plurality of stages based on an instruction type to be executed in the plurality of stages; configuring the plurality of stages such that in at least one cycle a first stage of the plurality of stages is configured for a first instruction type and a second stage of the plurality of stages is configured for a second instruction type; configuring a first functional unit of the first stage to execute a first instruction of a first instruction type in a first cycle; In a second cycle after the first cycle, executing the first instruction in a first functional unit of the second stage, the first instruction including selecting, via the plurality of multiplexers, data of the first functional unit of the first stage produced in the first cycle as an input to the first functional unit of the second stage; executing a second instruction of a second instruction type in a second functional unit of the first stage; performing operations including: In a third cycle after the second cycle, executing the second instruction in a first functional unit of the second stage, the plurality of multiplexers selecting data of the second functional unit of the first stage produced in the second cycle as an input to the first functional unit of the second stage; and performing operations including: method.
11. the one or more functional units include at least one opcode specific block used by an instruction type that is one of the at least two different types of instructions but not another of the at least two different types of instructions; The method of claim 10.
12. at least one stage of the plurality of stages includes processing multiple instances of any one of the one or more instruction types in parallel in a single cycle; The method of claim 10.
13. the plurality of stages includes executing the plurality of instances of the one or more instruction types by serializing operations on the plurality of instances through the plurality of stages; The method of claim 10.
14. the control unit storing data from at least one stage for use in a subsequent stage; The method of claim 10.
15. At least one of the one or more functional units includes a functional unit that spans multiple stages. The method of claim 10.
16. at least one functional unit of the one or more functional units receiving an input from an input clocked element; and wherein the at least one functional unit of the one or more functional units outputs a value to an output clocked element. The method of claim 10.
17. the stages including outputting data to single instruction multiple data units for graphics processing; The method of claim 10.
18. The two different types of instructions include a ray triangle intersection test and a ray box intersection test. The method of claim 10.
19. A processing unit; an integrated datapath circuit for executing at least two different types of instructions at the request of the processing unit; The integrated data path circuit comprises: a plurality of stages including a first stage and a second stage, each stage including one or more functional units, at least one of the functional units being a shared functional unit that performs operations for a plurality of instruction types; a plurality of multiplexers disposed between the stages; in a first cycle, a first functional unit of the first stage is configured to execute a first instruction of a first instruction type; In a second cycle after the first cycle, the plurality of stages and the multiplexer executing the first instruction in a first functional unit of the second stage, the first instruction including selecting, via the plurality of multiplexers, data of the first functional unit of the first stage produced in the first cycle as an input to the first functional unit of the second stage; executing a second instruction of a second instruction type in a second functional unit of the first stage; [0023] The method is configured to perform operations including: In a third cycle after the second cycle, the plurality of stages and the multiplexer executing the second instruction in a first functional unit of the second stage, the plurality of multiplexers selecting data of the second functional unit of the first stage produced in the second cycle as an input to the first functional unit of the second stage; configured to perform operations including: Accelerated Processing Device.
20. the one or more functional units include at least one opcode specific block used by an instruction type that is one of the at least two different types of instructions but not another of the at least two different types of instructions; 20. The accelerated processing device of claim 19.
Citation Information
Patent Citations
Pipelined floating point store
JP2000066894A
Variable length instruction pipeline
US20050149699A1
On-chip-variation (OCV) and timing-criticality aware clock tree synthesis (CTS)
US20140289690A1
Atomic Memory Update Unit & Methods
US20150089156A1
Pipeline including separate hardware data paths for different instruction types
US20180113714A1
