1. Field of the Invention
The present invention relates generally to computer arithmetic and more specifically to techniques for performing integer division.
2. Description of the Related Art
Current computer systems are typically configured with the hardware capability to support graphics processing units (GPUs) that offload graphics rendering tasks from the general purpose processor of the computer system to the specialized processors of the GPU. GPUs are designed with a highly parallelized structure to efficiently perform the complex and expensive computations required for rendering graphics. Many current GPUs are multi-core units configured to execute applications in a multi-threaded manner. For example, Nvidia's GeForce® 8 GPU has 128 processing cores, each having its own floating point unit (FPU) and a set of 1024 registers. Each cluster of 8 processing cores also has 16 KB of shared memory supporting parallel data access. Such an architecture is able to support up to 12,288 concurrent threads, with each thread having its own stack, registers (i.e., a subset of the set of 1024 registers in a processing core), program counter and local memory.
GPUs are increasingly utilized in mission critical or fault tolerant computer systems, where error correction is important. For example, computer systems used at high altitudes by the military or for space research may encounter levels of radiation that have the potential to affect and corrupt bits in a computer system's memory. To date, however, memory systems of GPUs have not been implemented with error correction capabilities. In order to support error correction capabilities, GPU memory systems need to allocate a portion of memory as storage for checksums that correspond to actual stored data. Calculating memory addresses for both the location of requested data and the corresponding location of the checksum for requested data requires the use of integer division.
However, many GPUs do not incorporate integer division logic into the digital circuit design of their arithmetic logic units (ALUs) because integer division operations tend to be infrequent operations that do not justify the hardware expense to incorporate such logic. Furthermore, the standard logic that is used to implement integer division is too slow and consumes too much circuit space for purposes of the memory address calculations discussed above.
As the foregoing illustrates, what is needed in the art is a technique enabling a GPU in a computer system to efficiently computed memory addresses using integer division for address translation purposes.
One or more embodiments of the present invention provide techniques to configure a GPU to perform integer division operations for address translation purposes when utilizing a GPU memory that maintains checksum information. Such techniques provide integer division capabilities by leveraging addition operations for address translations without requiring the GPU to support general integer division capabilities that require additional circuit space.
According to one embodiment of the present invention, a memory includes an error correction code (ECC) integrated circuit that is configured to receive a data request from a processor that includes a memory address associated with the requested data. The ECC integrated circuit then subdivides the memory address into a set of values corresponding to a plurality of coefficients in a polynomial equation that expresses the memory address in an X-based number system. For example, in one such embodiment, the polynomial equation is Σ(AiXi), where i=0 to n and Ai represents one of the plurality of coefficients. The ECC is then able to calculate a quotient value based on a summation of values, wherein each value is a concatenation of a plurality of a different one of the coefficients expressed in the X-based number system wherein each of the plurality corresponds to a position of the corresponding coefficient in the polynomial equation. For example, in one such embodiment in which the X based number system is an octal based number system, the summation is (A1)8+(A2A2)8+(A3A3A3)8+ . . . +(An . . . AnAn)8. The ECC then computes a checksum address based on the quotient value and the value of X, requests error correction information from the computer system memory at a location corresponding to the checksum address, and confirms an integrity of the requested data by analyzing error correction information stored at the checksum address.
The ECC, according to one embodiment of the present invention, further calculates a remainder value based on a summation of the plurality of coefficients and is therefore able to compute a data address corresponding to the memory address based on the calculated remainder value and request data from the computer system memory at a location corresponding to the data address that the ECC can then transmit to the processor in response to the received data request. For example, in one such embodiment, the summation of the plurality of coefficients is (A0)X+(A1)X+ . . . +(An)X.
One advantage of the disclosed ECC is that the foregoing integer division techniques can be incorporated into the integrated circuit to provide address translations for a memory maintaining error correction information without resorting to larger and less efficient standard integer division integrated circuits that are known in the art.
So that the manner in which the above recited features of the present invention can be understood in detail, a more particular description of the invention, briefly summarized above, may be had by reference to embodiments, some of which are illustrated in the appended drawings. It is to be noted, however, that the appended drawings illustrate only typical embodiments of this invention and are therefore not to be considered limiting of its scope, for the invention may admit to other equally effective embodiments.
In the following description, numerous specific details are set forth to provide a more thorough understanding of the present invention. However, it will be apparent to one of skill in the art that the present invention may be practiced without one or more of these specific details. In other instances, well-known features have not been described in order to avoid obscuring the present invention.
A multithreaded processing subsystem 112 is coupled to memory bridge 105 via a bus or other communication path 113 (e.g., a PCI Express, Accelerated Graphics Port, or HyperTransport link). In the embodiment of
CPU 102 operates as the control processor of computer system 100, managing and coordinating the operation of other system components. In particular, CPU 102 can issue graphics rendering related operations for execution on parallel processors 134 within multithreaded processing subsystem 112. For example, when executing an application that includes a portion of highly parallelized and computationally expensive graphics processing code, CPU 102 instructs multithreaded processing subsystem 112 to perform the instructions of the code portion in order to leverage parallel processors 134. Those with ordinary skill in the art will recognize that
In
Using the formulas of Table 1, ECC block 136 receives the original request address, memory block 25, as shown in step 210, and, as shown in step 215, utilizes integer division operations (i.e., “/” and “mod” operations) to calculate the checksum address as memory block 31 and the actual data address as memory block 28. It should be recognized that the formulas used to derive the checksum address and data address are dependent upon where memory 138 stores the checksum blocks.
In order to calculate the checksum address and actual data address, ECC block 136 is configured to implement integer division through use of addition operations based upon the basic polynomial equation:
Specifically, any memory address received by GPU 134, for example, is an integer, N, that can be expressed in a base X number system as:
N=Σ(AiXi),where i=0 to n Eq. B:
Due to the binary nature of computer systems, base X values that are typically utilized in relation to computers systems are binary, octal, hexadecimal or any other 2N based number. For example, with respect to the example for
Substituting Eq. A above into Eq. B above, the following equation is derived for an integer N:
Furthermore, any integer N may also be generally considered to be the summation of the product of a quotient, Q and a divisor, D, summed with a remainder, R, as follows:
Combining Eq. C above and Eq. D above:
N=(X−1)Q+R Eq. E:
Step 300:
k=0;
X=8=23;
Q0=0;
R0=N=oct(31);
First Iteration, k=1 (Step 305):
Because R<7(i.e., X−1) per Step 310, Proceed to Step 315
Q1=Q=3;
Ri=R=4;
Because Q=3 and R=4 from above, ECC block 136 further calculates the checksum address as: (Q*8)+7=(3*8)+7=31 and the actual data address as: (Q*8)+R=28, as depicted in
In step 400, ECC block 136 of GPU memory 138 receives a request to access data stored in GPU memory 138, such as a read request, comprising an original memory address. In step 405, ECC block 136 determines the coefficients, Ai, in an equation Σ(AiXi), where i=0 to n, that expresses the original memory address in an X-based number system. For example, in one embodiment, X=23=8 such that each Ai from i=0 to n corresponds a value of a subsequent set of 3 contiguous bits from left to right in the original memory address. In step 410, the quotient Q of Eq. E can be computed by adding (A1)X+(A2A2)X+(A3A3A3)X+ . . . +(An . . . AnAnAn)X (e.g., for an octal based system, oct(A1)+oct(A2A2)+oct(A3A3A3)+ . . . +oct(An . . . AnAnAn)). In step 415, a remainder R of Eq. E can be determined by adding (A0)X+(A1)X+ . . . +(An)X (e.g., for an octal based system, oct(A0)+oct(A1)+ . . . +oct(An)). In step 420, if R is greater than or equal to (X−1), ECC block 136 re-computes Q and R per the flow in
While the foregoing is directed to embodiments of the present invention, other and further embodiments of the invention may be devised without departing from the basic scope thereof. For example, while the foregoing discloses embodiments that utilize integer division techniques within the context of an ECC block of a memory, it should be recognized that the techniques may be implemented in any component of a computer system, whether hardware or software, where integer division using a divisor of (X−1) and a dividend that is expressed in an X based number system may be utilized. Similarly, while the octal based system has been used as an example because GPU memory 138 of
In addition, aspects of the present invention may be implemented in hardware or software or in a combination of hardware and software. One embodiment of the invention may be implemented as a program product for use with a computer system. The program(s) of the program product define functions of the embodiments (including the methods described herein) and can be contained on a variety of computer-readable storage media. Illustrative computer-readable storage media include, but are not limited to: (i) non-writable storage media (e.g., read-only memory devices within a computer such as CD-ROM disks readable by a CD-ROM drive, flash memory, ROM chips or any type of solid-state non-volatile semiconductor memory) on which information is permanently stored; and (ii) writable storage media (e.g., floppy disks within a diskette drive or hard-disk drive or any type of solid-state random-access semiconductor memory) on which alterable information is stored. Such computer-readable storage media, when carrying computer-readable instructions that direct the functions of the present invention, are embodiments of the present invention.
In view of the foregoing, the scope of the present invention is determined by the claims that follow.
Number | Name | Date | Kind |
---|---|---|---|
5958079 | Yoshimura | Sep 1999 | A |
6263470 | Hung et al. | Jul 2001 | B1 |
6263471 | Huang | Jul 2001 | B1 |
6704841 | Chaudhry et al. | Mar 2004 | B2 |
7000151 | Dwyer | Feb 2006 | B2 |
7073099 | Sutardja et al. | Jul 2006 | B1 |
8024391 | Douguet et al. | Sep 2011 | B2 |
20060168495 | Dominic et al. | Jul 2006 | A1 |
20080052569 | Ngo et al. | Feb 2008 | A1 |
20090055715 | Jashek et al. | Feb 2009 | A1 |
20090248780 | Symes et al. | Oct 2009 | A1 |
20110285742 | Kilgard et al. | Nov 2011 | A1 |
Entry |
---|
Papadopoulos et al., “Hashing + memory = low cost, exact pattern matching,” Field Programmable Logic and Applications, 2005. International Conference on , vol., no., pp. 39-44, Aug. 24-26, 2005. |