Skip to Main Content
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. We describe 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.