Multi-thread graphic processing system
The present invention includes a multi-thread graphics processing system and method thereof including a reservation station having a plurality of command threads stored therein. The system and method further includes an arbiter operably coupled to the reservation station such that the arbiter retrieves a first command thread of the plurality of command threads stored therein such that the arbiter receives the command thread and thereupon provides the command thread to a command processing engine. The system and method further includes the command processing engine coupled to receive the first command thread from the arbiter such that the command processor may perform at least one processing command from the command thread. Whereupon, a command processing engine provides the first command thread back to the associated reservation station.
Latest ATI Technologies, Inc. Patents:
The present invention relates generally to graphics processing and more specifically to the interleaving of with ALU operations texture fetching operations.
BACKGROUND OF THE INVENTIONIn a graphics processing system, it is important to manage and control multiple command threads relating to texture applications. In a typical graphics processing system, the processing elements, such as vertices and/or pixels, are processed through multiple steps providing for the application of textures and other processing instructions, such as done through one or more arithmetic logic units (ALU). To improve the operating efficiency of a graphics processing system, the control of the flow of the multiple command threads is preferred.
In the prior art embodiments of
The embodiment of
As such, there is a need for a sequencing system for providing for the processing of multi-command threads that supports an unlimited number of dependent texture fetches.
BRIEF DESCRIPTION OF THE DRAWINGS
Generally, the present invention includes a multi-thread graphics processing system and method thereof including a reservation station having a plurality of command threads stored therein. A reservation station may be any type of memory device capable of reserving and storing command threads. Furthermore, a command thread is a sequence of commands applicable to the corresponding element, such as pixel command thread relative to processing of pixel elements and a vertex command thread relative to vertex processing commands. The system and method further includes an arbiter operably coupled to the reservation station such that the arbiter retrieves a first command thread of the plurality of command threads stored therein. The arbiter may be any implementation of hardware, software or combination thereof such that the arbiter receives the command thread and thereupon provides the command thread to a command processing engine. The system and method further includes the command processing engine coupled to receive the first command thread from the arbiter such that the command processor may perform at least one processing command from the command thread. Whereupon, a command processing engine provides the first command thread back to the associated reservation station.
The command processing engine may be any suitable engine as recognized by one having ordinary skill in the art for processing commands, such as a texture engine, an arithmetic logic unit, or any other suitable processing engine.
More specifically,
The present invention provides for the processing of multiple threads. A command thread may go idle while waiting for available processing resources, such as specific data to be retrieved. As such, multiple threads prevent the corresponding resource from going idle. Further included within the command threads, 208-212, in one embodiment is an indicator, a done flag, which indicates when all of the commands within the command thread have been executed. Therefore, when all of the commands in the command thread have been executed and the command thread is retrievable from the reservation station 202, the command thread may be provided to a further processing element (not illustrated) within a graphics processing pipeline.
In one embodiment, the arbiter 204 retrieves the command threads 208-212 based on a priority scheme. For example, the priority may be based on specific commands that have been executed within a command thread or specific commands which are to be executed within a command for the effective utilization of the arbiter 204 and the command processing engine 206. In an alternative embodiment, the arbiter 204 may always retrieve the oldest available thread.
In accordance with one embodiment to the present invention,
ALU arbitration proceeds in the same way as fetch arbitration. The ALU arbitration logic chooses one of the pending ALU clauses to be executed. The arbiter selects the command thread by looking at the reservation stations, herein vertex and pixel reservation stations, and picking the first command thread ready to execute. In one embodiment, there are two ALU arbiters, one for the even clocks and one for the odd clocks. For example, a sequence of two interleaved ALU clauses may resemble the following sequence, (E and O stands for Even and Odd sets of 4 clocks) Einst0 Oinst0 Einst1 Oinst1 Einst2 Oinst2 Einst0 Oinst3 Einst1 Oinst4 Einst2 Oinst0. As such, this way hides the latency of 8 clocks of the ALUs. Moreover, the interleaving also occurs across clause boundaries, as discussed in greater detail below.
Not illustrated in
In one embodiment, each station 302, 304 maintains the state of each thread, such as threads 312-322. In one embodiment, the thread lives in a given location in the station 302, 304, in the order that the thread is received therein. From each buffer, the arbiter 306, which may be implemented as arbitration logic executed on a processing device, selects one thread for the graphics processing engine 310 and one thread for the ALU 308. Once a thread is selected by the arbiter 306, the thread is marked as invalid and submitted to the appropriate execution unit 308 or 312. Upon the execution of the associated command of the command thread, the thread is thereupon returned to the station 302 or 304 at the same storage location with its status updated, once all possible sequential instructions have been executed.
With respect to
Upon execution of the command, the ALU 308 then returns the command thread 332 to the appropriate reservation station 302 or 304. As illustrated in
One embodiment, each command thread within the reservation station 302 and 304 may be stored across two physical pieces of memory, wherein a majority of bits are stored in a one report device. The bits required for the thread arbitration may be stored in a highly multi-ported structure, such that the bit stored in the one read port device are termed state bits and the bits stored in the multi-read port device are termed status bits.
In one embodiment the state bit includes, but not limited to, a control flow instruction pointer, a loop iterater, a call return pointer, predicated bits, a GPR base pointer, a context pointer, valid bits, and any other suitable bits as recognized by one having skill in the art. It is also noted that in one embodiment, index pointers are not included in the state bits, wherein one embodiment may be stored in the general processing registers.
In this embodiment the fields of the state bits, the control flow instructions pointers execution count marker loop iteraters, call return pointers, predicate bits, are updated every time the thread is returned to the reservation station 302 or 304 based on how much progress has been made on the thread execution. It is also noted that in this embodiments, the GPR base pointer and context pointers are unchanged throughout the execution of the thread.
In one embodiment the status bits include a valid thread, a texture/ALU engine needed bit, texture reads are outstanding bit and waiting on texture read to complete bit. In this embodiment, all of the above status bit fields from the command threads going to the arbitration circuitry. Thereupon, the arbiter 306 selects the proper allocation of which command thread goes to the graphics processing agent 310 in which command thread goes to the ALU 308. In this embodiment, two sets of arbitration are performed one for pixels, such as command thread 316 and one for vertices, such as command thread 322. Although, texture arbitration requires no allocation or ordering as it is purely based on selecting the oldest thread that requires the graphics processing engine 310.
The method further includes performing a command in response to the selected command thread, step 406. In this embodiment the command is performed by the graphics processing engine 310, which may be performing a texture operation. The next step, step 408, is writing the selected command thread to a first reservation station if the selected command thread is one of the plurality of first command threads and the selected command thread to a second reservation station if the selected command thread is one of the plurality of second command threads. With regard to
Thereupon, the method further includes performing a command in response to the selected command thread, step 426, similar to step 406 of
The method further includes providing the second command thread to the graphics processing engine, step 430. The next step, step 432, is prior to writing the selected command thread to either the first reservation station or the second reservation station, interleaving the selected command thread and the second selected command thread. Thereupon, the method further includes performing a second command in response to the second selected command thread, step 434.
In the embodiment where the graphics processing engine is a texture engine, the commands performed are directed to texture operations. Although, as recognized by one having ordinary skill in the art, any other suitable graphics processing engine may be utilized.
The next step, step 436, is writing the second selected command thread to a first reservation station if the selected command thread is one of a plurality of first command threads and the second selected command thread to a second reservation station if the second selected command thread is one of a plurality of second command threads. Furthermore, the method includes writing the selected command thread to the first reservation station if the selected command thread is one of the plurality of first command threads and the selected command thread to the second reservation station if the selected command thread is one of the plurality of second command threads, step 438. Once again, using the exemplary embodiment of
As such, the present invention allows for multi-thread command processing effectively using designated reservation station, in conjunction with the arbiter, for the improved processing of multiple command threads. The present invention further provides for the effective utilization of the ALU and the graphics processing engine, such as the texture engine, for performing operations for both pixel command threads and vertex command threads, thereby improving graphics rendering and improving command thread processing flexibility.
It should be understood that there exists implementations of other variations and modifications of the invention and its various aspects, as may be readily apparent to those of ordinary skill in the art, and that the invention is not limited by the specific embodiments described herein. For example, the storage capacity of the reservation stations may be adequately adjusted to accommodate the storage any suitable corresponding number of command threads. It is therefore contemplated and covered by the present invention any and all modifications, variations, or equivalents that fall within the scope of the basic underlying principles disclosed and claimed herein.
Claims
1. A multi-thread command processing system comprising:
- a reservation station having a plurality of command threads stored therein;
- an arbiter operably coupled to the reservation station such that the arbiter retrieves a first command thread of the plurality of command threads stored therein; and
- a command processing engine operably coupled to receive the first command thread from the arbiter such that the command processor performs at least one processing command from the first command thread and thereupon updates the first command thread in the reservation station.
2. The command processing system of claim 1 wherein each of the plurality of command threads include a done flag which is activated after all commands with the command thread have been executed by the command processing engine.
3. The command processing system of claim 1 wherein the reservation station is a memory device and the arbiter retrieves the first command thread based on a priority scheme.
4. The command processing system of claim 1 further comprising:
- the arbiter retrieves a second command thread of the plurality of command threads stored therein; and
- the command processing receiving the second command thread wherein the first command thread and the second command thread may be interleaved.
5. The command processing system of claim 1 wherein the command processing engine is a texture processing engine.
6. The command processing system of claim 1 further comprising:
- an arithmetic logic unit (ALU) operably coupled to the arbiter such that the arbiter is capable of providing at least one of the plurality of command threads to the ALU.
7. The command processing system of claim 1 wherein the reservation station is at least one of: a vertex reservation station and a pixel reservation station.
8. A multi-thread graphics processing system comprising:
- a first reservation station having a plurality of first command threads stored therein;
- a second reservation station having a plurality of graphic command threads stored therein;
- an arbiter coupled to the first reservation station and the second reservation station such that the arbiter retrieves a selected command thread from one of the plurality of command threads; and
- a graphics processing engine operably coupled to the arbiter such that the selected command thread is received and processed by the graphics processing engine.
9. The multi-thread graphics processing system of claim 8 further comprising:
- the graphics processing engine being operably coupled to the first reservation station and the second reservation station such that upon processing the selected command thread, the selected command thread is updated in the first reservation station or the second reservation station from wherein is was previously retrieved.
10. The multi-thread graphics processing system of claim 8 wherein the first reservation station is a memory device and the second reservation station is a FIFO memory device.
11. The multi-thread graphics processing system of claim 8 further comprising:
- the arbiter retrieves a second selected command thread from one of the plurality of command threads; and
- the command processing engine receiving the second selected command thread such that the first selected command thread and the second selected command thread may be interleaved.
12. The multi-thread graphics processing system of claim 8 wherein the graphics processing engine is a texture processing engine, the system further comprising:
- an arithmetic logic unit (ALU) operably coupled to the arbiter such that the arbiter is capable of providing at least one of the first selected command thread and the second selected command thread to the ALU.
13. The multi-thread graphics processing system of claim 8 wherein the first reservation station is a vertex reservation station and the second reservation station is a pixel reservation station.
14. A graphics processing system comprising:
- a pixel reservation station having a plurality of pixel command threads stored therein;
- a vector reservation station having a plurality of vector command threads stored therein;
- an arbiter coupled to the pixel reservation station and the vector reservation station;
- an arithmetic logic unit (ALU) operably coupled to the arbiter; and
- a texture engine operably coupled to the arbiter wherein the arbiter retrieves a first selected command thread from one of the plurality of pixel command threads and the plurality of vector command threads and the arbiter thereupon provides the first selected command thread to at least one of: the ALU and the texture engine.
15. The graphics processing system of claim 14 further comprising:
- the arbiter retrieves a second selected command thread from one of the plurality of pixel command threads and the plurality of vector command threads and thereupon provides the second selected command thread to at least one of the ALU and the texture engine.
16. The graphics processing system of claim 15 wherein when the first selected command thread and the second selected command thread are both provided to the ALU, the first selected command thread may be interleaved with the second selected command thread.
17. The graphics processing system of claim 14 wherein the ALU and the texture engine are operably coupled to the pixel reservation station and the vector reservation station such that the first selected command thread may be provided back from wherein it was previously retrieved.
18. The graphics processing system of claim 14 wherein the pixel reservation station includes a first pixel memory device storing a plurality of pixel state bits and a second pixel memory device storing a plurality of pixel status bits and the vector reservation station includes a first vector memory device storing a plurality of vector state bits and a second vector memory device storing a plurality of vector status bits.
19. The graphics processing system of claim 14 wherein the pixel command threads and the vector command threads each include a done flag, wherein when the done flag is activated in the pixel command thread, the pixel command thread is provided a rendering backend and when the done flag is activated in the vertex command thread, the vertex command thread is provided to a scan converter.
20. A method for multi-thread graphics processing comprising:
- retrieving a selected command thread from a plurality of command threads;
- providing the selected command thread to a graphics processing engine;
- performing a command in response to the selected command thread; and
- writing the selected command thread to a first reservation station if the selected command thread is one of a plurality of first command threads and the to a second reservation station if the selected command thread is one of a plurality of second command threads.
21. The method of claim 20 further comprising:
- retrieving a second selected command thread from the plurality of command threads;
- providing the second command thread the graphics processing engine;
- prior to writing the selected command thread to either the first station or the second reservation station, interleaving the selected command thread and the second selected command thread;
- performing a second command in response to the selected command thread; and
- writing the second selected command thread to a first reservation station if the selected command thread is one of the plurality of first command threads and the to a second reservation station if the selected command thread is one of the plurality of second command threads.
22. The method of claim 20 further comprising:
- prior to providing the selected command thread to the graphics processing engine, providing the selected thread command to at least one of: the graphics processing engine or an arithmetic logic unit (ALU); and
- if the second selected command thread is provided to the ALU: performing a command in response to the selected command thread; and writing the selected command thread to the first reservation station if the selected command thread is one of the plurality of first command threads and the to the second reservation station if the selected command thread is one of the plurality of second command threads.
23. The method of claim 20 wherein the graphics processing engine is a texture engine.
24. The method of claim 20 further comprising:
- when all of the commands with the selected command thread have been executed, setting a done flag.
25. The method of claim 24 wherein the first plurality of command threads are pixel command threads and the second plurality of command threads are vertex command threads, the method further comprising:
- when the done flag is set on the pixel command thread, providing the pixel command thread to a render backend; and
- when the done flag is set on the vector command thread, providing the vector command thread to a scan converter.
Type: Application
Filed: Sep 29, 2003
Publication Date: Mar 31, 2005
Patent Grant number: 7239322
Applicant: ATI Technologies, Inc. (Markham)
Inventors: Laurent Lefebvre (Lachenaie), Andrew Gruber (Arlington, MA), Stephen Morein (Cambridge, MA)
Application Number: 10/673,761