This Article 
 Bibliographic References 
 Add to: 
An Exponentiation Unit for an OpenGL Lighting Engine
March 2004 (vol. 53 no. 3)
pp. 251-258

Abstract—The OpenGL geometry pipeline lighting stage requires raising a number in the range [0, 1] to a power between [1, 128] to compute specular reflections and spotlights. The result need only be accurate to a number of bits related to the color depth of the output device. This paper describes a hardware implementation of such an exponentiation unit based on a logarithm lookup table, a multiplier, and an inverse log table. The inputs arrive in IEEE single-precision floating-point format and the output is a floating-point color component in the range [0,1] with 8-10 bits of accuracy. The log lookup table is partitioned into subintervals to reduce table size and each subinterval is computed from a bipartite table to further reduce size. A synthesized design uses 32k gates to achieve 10-bit accuracy with a latency of 9.4 ns in a 180 nm process. Although the system is tailored to the OpenGL application, the same principles can be applied to the design of other exponentiation units.

[1] M. Segal and K. Akeley, The OpenGL Graphics System: A Specification (Version 1.4), Silicon Graphics, 2002,http:/www.
[2] M. Woo et al., OpenGL Programming Guide, third ed. Reading, Mass.: Addison Wesley, 1999.
[3] nVIDIA Technical Brief, Transformation and Lighting NVIDIA Corp., 1999.
[4] ANSI/IEEE Std. 754-1985, Binary Floating-Point Arithmetic, IEEE Press, Piscataway, N.J., 1985 (also called ISO/IEC 559).
[5] J. Foley, A. Dam, S. Feiner, and J. Hughes, Computer Graphics: Principles and Practice. Reading, Mass.: Addison Wesley, 1996.
[6] J. Muller, Elementary Functions. Boston: Birkhauser, 1997.
[7] M. Overton, Numerical Computing with IEEE Floating Point Arithmetic. Philadelphia: SIAM, 2001.
[8] P. Tang, Table-Driven Implementation of the Exponential Function in IEEE Floating Point Arithmetic ACM Trans. Math. Software, vol. 15, no. 2, pp. 144-157, June 1989.
[9] P.T.P. Tang, “Table-Lookup Algorithms for Elementary Functions and Their Error Analysis,” Proc. 10th Symp. Computer Arithmetic, pp. 232-236, 1991.
[10] N. Takagi, “Powering by a Table Look-Up and a Multiplication with Operand Modification,” IEEE Trans. Computers, vol. 47, no. 11, pp. 1216-1222, Nov. 1998.
[11] J.A. Piñeiro, J.D. Bruguera, and J.M. Muller, “Faithful Powering Computation Using Table Look-Up and a Fused Accumulation Tree,” Proc. IEEE 15th Int'l Symp. Computer Arithmetic (ARITH15), pp. 40-47, 2001.
[12] W. Cody and W. Wait, Software Manual for the Elementary Functions. Englewood Cliffs, N.J.: Prentice-Hall, 1980.
[13] H. Shin, J. Lee, and L. Kim, A Hardware Cost Minimized Fast Phong Shader IEEE Trans. VLSI Systems, vol. 9, no. 2, pp. 297-304, Apr. 2001.
[14] C. Chen and C. Lee, A Cost Effective Lighting Processor for 3D Graphics Applications Proc. IEEE Int'l Conf. Image Processing, vol. 2, pp. 792-796, 1999.
[15] Y. Kwon, I. Park, and C. Kyung, A Hardware Accelerator for the Specular Intensity of Phong Illumination Model in 3-Dimensional Graphics Proc. ACM Asia/South Pacific Design Automation Conf., pp. 559-546, 2000.
[16] J.N. Coleman, E.I. Chester, C.I. Softley, and J. Kadlec, “Arithmetic on the European Logarithmic Microprocessor,” IEEE Trans. Computers, vol. 49, no. 7, pp. 702-715, July 2000.
[17] H. Hassler and N. Takagi, "Function Evaluation by Table Look-Up and Addition," Proc. 12th Symp. Computer Arithmetic, pp. 10-16, July 1995.
[18] D. DasSarma and D.W. Matula, “Faithful Bipartite ROM Reciprocal Tables,” Proc. 12th Symp. Computer Arithmetic, pp. 17-28, 1995.
[19] M.J. Schulte and J.E. Stine, Approximating Elementary Functions with Symmetric Bipartite Tables IEEE Trans. Computers, vol. 48, no. 8, pp. 842-847, Aug. 1999.
[20] J. Muller, A Few Results on Table-Based Methods Reliable Computing, vol. 5, no. 3, pp. 279-288, 1999.
[21] F. Dinechin and A. Tisserand, Some Improvements on Multipartite Table Methods Proc. 15th Symp. Computer Arithmetic, pp. 128-135, 2001.
[22] LSI Logic, G12-p Cell-Based ASIC Products, 1999.
[23] Harvey Mudd College Open Source Floating Point Project http://www.hmc.educhips, 2000.
[24] J. Stine and M. Schulte, The Symmetric Table Addition Method for Accurate Function Approximation J. VLSI Signal Processing, vol. 21, no. 2, pp. 167-177, 1999.

Index Terms:
Powering, exponentiation, computer arithmetic, OpenGL hardware acceleration, table lookups, table complexity, bipartite tables.
David Harris, "An Exponentiation Unit for an OpenGL Lighting Engine," IEEE Transactions on Computers, vol. 53, no. 3, pp. 251-258, March 2004, doi:10.1109/TC.2004.1261833
Usage of this product signifies your acceptance of the Terms of Use.