[go: up one dir, main page]

US20030005006A1 - Fast system and method for producing a logarithmic signal approximation with variable precision - Google Patents

Fast system and method for producing a logarithmic signal approximation with variable precision Download PDF

Info

Publication number
US20030005006A1
US20030005006A1 US09/815,033 US81503301A US2003005006A1 US 20030005006 A1 US20030005006 A1 US 20030005006A1 US 81503301 A US81503301 A US 81503301A US 2003005006 A1 US2003005006 A1 US 2003005006A1
Authority
US
United States
Prior art keywords
digital signal
circuit
parameter
signal
search
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
US09/815,033
Other versions
US6502118B1 (en
Inventor
Manjirnath Chatterjee
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Motorola Solutions Inc
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to US09/815,033 priority Critical patent/US6502118B1/en
Assigned to MOTOROLA INC. reassignment MOTOROLA INC. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: CHATTERJEE, MANJIRNATH
Priority to CN02807003.8A priority patent/CN1271508C/en
Priority to GB0321742A priority patent/GB2390197B/en
Priority to PCT/US2002/006629 priority patent/WO2002077797A1/en
Application granted granted Critical
Publication of US6502118B1 publication Critical patent/US6502118B1/en
Publication of US20030005006A1 publication Critical patent/US20030005006A1/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices
    • G06F7/544Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices for evaluating functions by calculation
    • G06F7/556Logarithmic or exponential functions
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/74Selecting or encoding within a word the position of one or more bits having a specified value, e.g. most or least significant one or zero detection, priority encoders

Definitions

  • This invention generally relates to computational systems and methods, and more particularly, to systems and methods that perform numerical computations such as speech recognition systems.
  • floating point numbers are utilized to represent the inputs and outputs of the system.
  • Floating-point logarithms systems are usually implemented employing a math co-processor with some form of power series or Newton-Raphson method of convergence. As a result, this category of systems requires complex circuitry and substantial processing time to obtain a final value.
  • Tabularized fixed-point representation systems provide a scaled integer representation of the true logarithm value.
  • log(x) would be represented as ‘y’ multiplied by log(x) where ‘y’ is a fixed scaling factor to preserve precision.
  • These systems draw intermediate values of the logarithm from a table.
  • the table contains the value of log(x) to the appropriate scale at compile time.
  • These types of systems require the creation and manipulation of a table of values and can require substantial memory space (as a result of storing intermediate values in the table) to obtain a final value.
  • the last category is integer truncation of the logarithm value.
  • Systems in this category return the value of the highest bit in the argument (x). While useful for search applications where precision is not required, the lack of precision in this type of systems means that all bits on the right of the decimal place are lost. Therefore, there is a need for a system and method that produce logarithmic values with run-time specified precision quickly without utilizing tables and/or multiplications.
  • FIG. 1 is a functional block diagram for the system in accordance with the invention.
  • FIG. 2 is another functional block diagram for the system in accordance with the invention.
  • FIG. 3 is a flow chart illustrating the process performed by the systems described in FIG. 1 and FIG. 2.
  • FIG. 4 is another function block diagram for the system utilizing an Application Specific Integrated Chip (ASIC) or Digital Signal Processor (DSP).
  • ASIC Application Specific Integrated Chip
  • DSP Digital Signal Processor
  • the present invention is a system and method for producing an output logarithmic value with run-time specific precision without utilizing tables and/or multiplications.
  • a system for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter comprises a means for finding the bit position of the highest bit value of the input digital signal and a means for determining an offset from the position of the highest bit value and the parameter.
  • the system also includes a means for interpolating a shifted interpolation value from the input signal using the parameter and an adder for adding the offset, precision shifted interpolation value and bit position.
  • a method for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter comprises the steps of finding the bit position of the highest bit value of the input digital signal and determining an offset from the position of the highest bit value and the parameter.
  • the method also includes the steps of interpolating a shifted interpolation value from the input signal using the parameter and adding the offset, precision shifted interpolation value and bit position.
  • FIG. 1 illustrates the functional block diagram of a system 10 .
  • the system 10 is in signal communication with an input/output “I/O” device 15 .
  • the I/O device 15 may selectively be any input and output device combination including but not limited to a keyboard and a display monitor or printer.
  • the system 10 includes a central processing unit “CPU” 20 , an I/O interface 25 , a storage device 30 , and a system bus 35 .
  • the CPU 20 may selectively be any processor capable of manipulating data from the I/O interface 25 and storage device 30 .
  • Examples of the CPU 20 include but are not limited to integrated circuit processors families such as Intel 80X86, Motorola, Inc. Power PC, Digital DEC Alpha, and other similar processor from companies such as Hewitt Packard, Inc., Sun Microsystems, IBM, AMD, Cyrix and others.
  • the storage device 30 may selectively be any memory type structure such as random access memory (RAM), read-only memory (ROM), permanent storage unit (such as a hard disk), removable storage unit (such as a floppy disk, DVD, or CD-ROM), or similar type unit.
  • the storage device 30 includes a control program or software 40 .
  • the software 40 may selectively be any coded instructions that control the process of the system 10 .
  • the I/O interface 25 and the system bus 35 are a conventional computer system type interface and system bus which are well known both those skilled in the art.
  • a user enters input values into the system 10 via the I/O device 15 .
  • the input values are processed by the CPU 20 utilizing the coded instructions in the software 40 .
  • the system 10 then generates output values and communicates then to the user via the I/O interface 25 and I/O device 15 .
  • FIG. 2 is a block diagram of another example of the system 45 .
  • the system 45 comprises a search circuit 50 , an interpolation circuit 55 , a shift circuit 60 and a combination circuit 65 . It is appreciated that search circuit 50 , interpolation circuit 55 , shift circuit 60 and combination circuit may selectively be implemented utilizing combination digital circuitry.
  • the search circuit 50 receives a digital operand signal 70 (corresponding to the operand value, i.e., ‘x’, for Log 2 (x)) from an input device such as I/O device 15 , FIG. 1, and outputs a signal 75 , FIG. 2, corresponding to the highest binary set bit value corresponding to the digital operand signal 70 .
  • the interpolation circuit 55 receives the signal 75 and computes a linear interpolation on the signal 75 and passes the result to the shift circuit 60 via signal path 80 .
  • the shift circuit 60 receives a digital precision signal 85 (corresponding to the precision value ‘s’) from an input device such as I/O device 15 , FIG. 1, and the output of the interpolation circuit 55 , FIG. 2.
  • the shift circuit 60 generates a shift circuit output 88 , which is an offset precision shifted interpolation value, and passes it to the combination circuit 65 .
  • the combination circuit 65 combines the shift circuit output 88 and the signal 75 from the search circuit 50 to produce an digital output signal 90 corresponding to the Log 2 (x) value that is send to an output device such as I/O device 15 , FIG. 1.
  • FIG. 3 illustrates the process performed by the system 10 of FIG. 1 that may selectively be controlled by the coded instruction in the software 40 .
  • the system 10 , FIG. 1 begins the process.
  • the system 10 , FIG. 1 receives an input value from the I/O device 15 .
  • the input value is the operand value of the logarithm [i.e., the ‘x’ value for Log 2 (x)] in binary form.
  • the system 10 , FIG. 1 determines the integer part of the log2 computation of the operand value (i.e., ‘x’) by searching for the highest bit value of the operand value.
  • the system 10 may perform the search by numerous means including but not limited to performing a standard binary search or a shift and search operation.
  • the output of 105 is a rough estimate for the value Log 2 (x) to integer precision over an interval of estimation.
  • the system 10 FIG. 1, computes a linear interpolation of the remaining error in the interval of estimation by performing a shift operation on the operand value that corresponds to a value equal to an approximation of the fractional portion of the log2 calculation.
  • the system 10 receives the precision value (i.e., ‘s’) from the I/O device 15 in step 115 , FIG. 3.
  • the system 10 receives the precision value (i.e., ‘s’) from the I/O device 15 in step 115 , FIG. 3.
  • the system 10 FIG.
  • step 1 performs a precision shift on the shifted operand value corresponding to an offset precision shifted interpolation value which maps the result fractional and integer summed log2 values to the precision range input in step 115 , FIG. 3.
  • the system 10 FIG. 1, then mathematically combines the offset precision shifted interpolation value with result of the binary search in step 125 .
  • the combination is approximately equal to log2 of the value entered in step 95 , FIG. 3. resulting in a peak error of 0.03125 which error over an internal [2,4000].
  • the system 10 then outputs the result of the combination to I/O device 15 in step 130 and the process ends in step 135 . It is appreciated that the process described is equally as descriptive of process performed by system 45 of FIG. 2.
  • Shifts are utilized perform multiplications by powers of two. Multiply operations are represented by the ‘ ⁇ ’ symbol while divides are are represented by ‘>>’. */ return (f ⁇ s) + (1 ⁇ s >> 5) + ((f > s) ?
  • Shifts are utilized perform multiplications by powers of two. Multiply operations are represented by the ‘ ⁇ ’ symbol while divides are represented by ‘>>’. */ return (f ⁇ s) + (1 ⁇ s >> 5) + ((f > s) ? ((v + (1 ⁇ f)) >> (f + s)): ((v + (1 ⁇ f)) ⁇ (s + f))); ⁇
  • Shifts are utilized perform multiplications by powers of two. Multiply operations are represented by the ‘ ⁇ ’ symbol while divides are are represented by ‘>>’. */ return (f ⁇ s) + (1 ⁇ s >> 5) + ((f > s) ? ((v + (1 ⁇ f)) >> (f ⁇ s)): ((v + (1 ⁇ f)) ⁇ (s + f))); /* Next line converts from Log 2 (x) to Ln by computing log 2 (x)/log 2 (e).
  • Shifts are utilized perform multiplications by powers of two. Multiply operations are represented by the ‘ ⁇ ’ symbol while divides are are represented by ‘>>’. */ return (f ⁇ s) + (1 ⁇ s >> 5) + ((f > s) ? ((v + (1 ⁇ f)) >> (f + s)): ((v + (1 ⁇ f)) ⁇ (s + f))); /* Next line converts from Log 2 (x) to Ln by computing log 2 (x)/log 2 (e). */ return (v >> 1) + (v >> 2) ⁇ (v >> 4) + (v >> 7) ⁇ (v >> 9) ⁇ (v >> 12) + (v >> 15); ⁇
  • FIG. 4 is a block diagram of the system 140 in accordance with the invention utilizing a Digital Signal Processor (DSP) or Application Specific Integrated Circuit (ASIC) chip 145 .
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuit
  • the system 140 may be selectively implemented in software, hardware, or a combination thereof.
  • the elements of the system 140 may be implemented in software 150 stored in a memory located in a controller unit 155 .
  • the controller unit 155 is in signal communication with the DSP or ASIC chip 145 via communication link 160 (which may selectively be a system bus).
  • the software 150 configures and drives the DSP or ASIC chip 145 and performs the steps described in FIG. 3.
  • the software 40 FIG. 1, such as a computer program, comprises an ordered listing of executable instructions for implementing logical functions.
  • the software 40 may selectively be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that may selectively fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
  • a “computer-readable medium” is any means that may contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device.
  • the computer readable medium may selectively be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a RAM (electronic), a read-only memory (ROM) (electronic), an erasable programmable read-only memory (EPROM or Flash memory) (electronic), an optical fiber (optical), and a portable compact disc read-only memory (CDROM) (optical).
  • the computer-readable medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Pure & Applied Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Mathematical Optimization (AREA)
  • General Engineering & Computer Science (AREA)
  • Complex Calculations (AREA)

Abstract

A system and method for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values in which the output logarithmic signal has a precision defined by a parameter is described. The system (45) includes a search circuit (50), an interpolation circuit (55) in coupled with the search circuit, a shift circuit (60) in coupled with the interpolation circuit and a combiner (65) that produces an output logarithmic digital signal (90) from a received search circuit output (75) and a received shift circuit output (88).

Description

    BACKGROUND OF THE INVENTION
  • This invention generally relates to computational systems and methods, and more particularly, to systems and methods that perform numerical computations such as speech recognition systems. [0001]
  • The need for systems capable of performing optimized logarithm computations exists in many mathematical and engineering fields. Unfortunately, at present, systems that perform logarithmic calculations fall into three categories. The first is floating point implementations of logarithms, the second is table-ized fixed-point implementations, and the third is straight integer implementations. [0002]
  • In the first category (floating-point implementations) floating point numbers are utilized to represent the inputs and outputs of the system. Floating-point logarithms systems are usually implemented employing a math co-processor with some form of power series or Newton-Raphson method of convergence. As a result, this category of systems requires complex circuitry and substantial processing time to obtain a final value. [0003]
  • Tabularized fixed-point representation systems provide a scaled integer representation of the true logarithm value. In other words, log(x) would be represented as ‘y’ multiplied by log(x) where ‘y’ is a fixed scaling factor to preserve precision. These systems draw intermediate values of the logarithm from a table. The table contains the value of log(x) to the appropriate scale at compile time. These types of systems require the creation and manipulation of a table of values and can require substantial memory space (as a result of storing intermediate values in the table) to obtain a final value. [0004]
  • The last category is integer truncation of the logarithm value. Systems in this category return the value of the highest bit in the argument (x). While useful for search applications where precision is not required, the lack of precision in this type of systems means that all bits on the right of the decimal place are lost. Therefore, there is a need for a system and method that produce logarithmic values with run-time specified precision quickly without utilizing tables and/or multiplications. [0005]
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • The summary of the invention, as well as the following detailed description of this invention, as defined in the claims, is better understood when read in conjunction with the accompanying figures. The following figures are included by way of example, and not by way of limitation with regard to the claimed invention and are not necessarily drawn to scale. [0006]
  • FIG. 1 is a functional block diagram for the system in accordance with the invention. [0007]
  • FIG. 2 is another functional block diagram for the system in accordance with the invention. [0008]
  • FIG. 3 is a flow chart illustrating the process performed by the systems described in FIG. 1 and FIG. 2. [0009]
  • FIG. 4 is another function block diagram for the system utilizing an Application Specific Integrated Chip (ASIC) or Digital Signal Processor (DSP). [0010]
  • DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT(S)
  • The present invention is a system and method for producing an output logarithmic value with run-time specific precision without utilizing tables and/or multiplications. [0011]
  • In accordance with the invention, a system for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter is described. The system comprises a means for finding the bit position of the highest bit value of the input digital signal and a means for determining an offset from the position of the highest bit value and the parameter. The system also includes a means for interpolating a shifted interpolation value from the input signal using the parameter and an adder for adding the offset, precision shifted interpolation value and bit position. [0012]
  • Also in accordance with the invention, a method for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter is described. The method comprises the steps of finding the bit position of the highest bit value of the input digital signal and determining an offset from the position of the highest bit value and the parameter. The method also includes the steps of interpolating a shifted interpolation value from the input signal using the parameter and adding the offset, precision shifted interpolation value and bit position. [0013]
  • FIG. 1 illustrates the functional block diagram of a [0014] system 10. The system 10 is in signal communication with an input/output “I/O” device 15. The I/O device 15 may selectively be any input and output device combination including but not limited to a keyboard and a display monitor or printer. The system 10 includes a central processing unit “CPU” 20, an I/O interface 25, a storage device 30, and a system bus 35.
  • The [0015] CPU 20 may selectively be any processor capable of manipulating data from the I/O interface 25 and storage device 30. Examples of the CPU 20 include but are not limited to integrated circuit processors families such as Intel 80X86, Motorola, Inc. Power PC, Digital DEC Alpha, and other similar processor from companies such as Hewitt Packard, Inc., Sun Microsystems, IBM, AMD, Cyrix and others.
  • The [0016] storage device 30 may selectively be any memory type structure such as random access memory (RAM), read-only memory (ROM), permanent storage unit (such as a hard disk), removable storage unit (such as a floppy disk, DVD, or CD-ROM), or similar type unit. The storage device 30 includes a control program or software 40. The software 40 may selectively be any coded instructions that control the process of the system 10. The I/O interface 25 and the system bus 35 are a conventional computer system type interface and system bus which are well known both those skilled in the art.
  • In operation, a user (not shown) enters input values into the [0017] system 10 via the I/O device 15. The input values are processed by the CPU 20 utilizing the coded instructions in the software 40. The system 10 then generates output values and communicates then to the user via the I/O interface 25 and I/O device 15.
  • FIG. 2 is a block diagram of another example of the [0018] system 45. The system 45 comprises a search circuit 50, an interpolation circuit 55, a shift circuit 60 and a combination circuit 65. It is appreciated that search circuit 50, interpolation circuit 55, shift circuit 60 and combination circuit may selectively be implemented utilizing combination digital circuitry.
  • The [0019] search circuit 50 receives a digital operand signal 70 (corresponding to the operand value, i.e., ‘x’, for Log2 (x)) from an input device such as I/O device 15, FIG. 1, and outputs a signal 75, FIG. 2, corresponding to the highest binary set bit value corresponding to the digital operand signal 70. The interpolation circuit 55 receives the signal 75 and computes a linear interpolation on the signal 75 and passes the result to the shift circuit 60 via signal path 80. The shift circuit 60 receives a digital precision signal 85 (corresponding to the precision value ‘s’) from an input device such as I/O device 15, FIG. 1, and the output of the interpolation circuit 55, FIG. 2. The shift circuit 60 generates a shift circuit output 88, which is an offset precision shifted interpolation value, and passes it to the combination circuit 65. The combination circuit 65 combines the shift circuit output 88 and the signal 75 from the search circuit 50 to produce an digital output signal 90 corresponding to the Log2(x) value that is send to an output device such as I/O device 15, FIG. 1.
  • FIG. 3 illustrates the process performed by the [0020] system 10 of FIG. 1 that may selectively be controlled by the coded instruction in the software 40. In step 95, FIG. 3, the system 10, FIG. 1, begins the process. In step 100 the system 10, FIG. 1, receives an input value from the I/O device 15. The input value is the operand value of the logarithm [i.e., the ‘x’ value for Log2(x)] in binary form. In step 105, FIG. 3, the system 10, FIG. 1, determines the integer part of the log2 computation of the operand value (i.e., ‘x’) by searching for the highest bit value of the operand value. It is appreciated by those skilled in the art that the system 10 may perform the search by numerous means including but not limited to performing a standard binary search or a shift and search operation. The output of 105 is a rough estimate for the value Log2(x) to integer precision over an interval of estimation. In step 110, FIG. 3, the system 10, FIG. 1, computes a linear interpolation of the remaining error in the interval of estimation by performing a shift operation on the operand value that corresponds to a value equal to an approximation of the fractional portion of the log2 calculation. The system 10 then receives the precision value (i.e., ‘s’) from the I/O device 15 in step 115, FIG. 3. In step 120 the system 10, FIG. 1, performs a precision shift on the shifted operand value corresponding to an offset precision shifted interpolation value which maps the result fractional and integer summed log2 values to the precision range input in step 115, FIG. 3. The system 10, FIG. 1, then mathematically combines the offset precision shifted interpolation value with result of the binary search in step 125. The combination is approximately equal to log2 of the value entered in step 95, FIG. 3. resulting in a peak error of 0.03125 which error over an internal [2,4000]. The system 10 then outputs the result of the combination to I/O device 15 in step 130 and the process ends in step 135. It is appreciated that the process described is equally as descriptive of process performed by system 45 of FIG. 2.
  • It is also appreciated that for performance purposes with current technology, the preferred embodiment of the invention is principally implemented in dedicated circuitry. However, the functions performed by the invention may also be implemented in generalized programmable circuitry capable of generating the process steps of FIG. 2. As example implementations of the process in accordance with the invention, the following pseudo-code examples are provided which may selectively be in the C programming or other equivalent programming language. [0021]
    /***********************************************************
    * Implementation of Log2() employing loops for binary bit search
    * y= Log2 (n, numbits2scale)
    * get linear interpolated scaled Log2()
    * ‘x’ is the number to take Log2(x), ‘s’ is the number of bits to scale up
    * i.e., Log2scaled(2235,7) would return 128* Log2(2235)
    */
    long Log2scaled (long x, long s)
    {
    long j, v = x, f = 0; /* declare local variables */
    for (j = 16; j > 0; j >>= 1) /* perform binary search for the highest set bit */
    if (x > ( 1 << j)) {f += j; x >>= j;}
    /* Next line is variable precision linear interpolation with offset.
    Shifts are utilized perform multiplications by powers of two.
    Multiply operations are represented by the ‘<<’ symbol while divides are
    are represented by ‘>>’.
    */
    return (f << s) + (1 << s >> 5) + ((f > s) ? ((v + (1 << f)) >> (f − s)):
    ((v + (1 << f)) << (s + f)));
    }
    /***********************************************************
    * Implementation of Log2() employing if statements for binary bit search
    * y= Log2 (n, numbits2scale)
    * get linear interpolated scaled Log2()
    * ‘x’ is the number to take Log2(x), ‘s’ is the number of bits to scale up
    * i.e., Log2scaled(2235,7) would return 128* Log2(2235)
    */
    long Log2scaled (long x, long s)
    {
    long v = x, f = 0; /* declare local variables */
    if (x > (1 << 16)) {f += 16; x >>= 16;} /* perform binary search for highest set bit */
    if (x > (1 << 8)) {f += 8; x >>= 8;}
    if (x > (1 << 4)) {f += 4; x >>= 4;}
    if (x > (1 << 2)) {f += 2; x >>=2;}
    if (x > (1 << 1)) {f++;}
    /* Next line is variable precision linear interpolation with offset.
       Shifts are utilized perform multiplications by powers of two.
       Multiply operations are represented by the ‘<<’ symbol while
       divides are represented by ‘>>’.
    */
    return (f << s) + (1 << s >> 5) + ((f > s) ? ((v + (1 << f)) >> (f + s)):
    ((v + (1 << f)) << (s + f)));
    }
  • While the examples illustrate the process for obtaining base 2 logarithmic values, the process is easily expanded to other common bases such as natural logarithms “Ln(x)” or base ten (10) logarithms “log10(x)” by scaling by the output of a log[0022] 2(x) algorithm and converting it to another base. This is done by dividing the log2(x) result by a constant equal to log2(n) where n is the desired number base. As another pair of example implementations of the process utilizing the scaling factor in accordance with the invention, the following pseudo-code examples are provided which may again be selectively in the C programming or other equivalent programming language.
    /***********************************************************
    * Implementation of Log () to other bases employing loops for binary bit search
    * In this case the logarithmic base is chosen to be ‘e’ or the natural logarithm.
    * y= Ln (n, numbits2scale)
    * get linear interpolated scaled Ln()
    * ‘x’ is the number to take Ln(x), ‘s’ is the number of bits to scale up
    * i.e., Lnscaled(2235,7) would return 128* Ln(2235)
    */
    long Lnscaled (long x, long s)
    {
    long j, v = x, f = 0; /* declare local variables */
    for (j = 16; j > 0; j >>= 1) /* perform binary search for the highest set bit */
    if (x > (1 << j)) {f += j; x >>= j;}
    /* Next line is variable precision linear interpolation with offset.
       Shifts are utilized perform multiplications by powers of two.
       Multiply operations are represented by the ‘<<’ symbol while divides are
       are represented by ‘>>’.
    */
    return (f << s) + (1 << s >> 5) + ((f > s) ? ((v + (1 << f)) >> (f − s)):
    ((v + (1 << f)) << (s + f)));
    /* Next line converts from Log2 (x) to Ln by computing log2(x)/log2(e). */
    return (v >> 1) + (v >> 2) − (v >> 4) + (v >> 7) − (v >> 9) − (v >> 12) + (v >> 15);
    }
    /***********************************************************
    * Implementation of Log() to other bases employing if statements for binary bit search
    * In this case the logarithmic base is chosen to be ‘e’ or the natural logarithm.
    * y= Ln (n, numbits2scale)
    * get linear interpolated scaled Ln()
    * ‘x’ is the number to take Ln(x), ‘s’ is the number of bits to scale up
    * i.e., Lnscaled(2235,7) would return 128* Log2(2235)
    */
    long Lnscaled (long x, long s)
    {
    long v = x, f = 0; /* declare local variables */
    if (x > (1 << 16)) {f += 16; x >>= 16;}/* perform binary search for highest set bit */
    if (x > (1 << 8)) {f += 8; x >>= 8;}
    if (x > (1 << 4)) {f += 4; x >>= 4;}
    if (x > (1 << 2)) {f += 2; x >>= 2;}
    if (x > (1 << 1)) {f ++;}
    /* Next line is variable precision linear interpolation with offset.
       Shifts are utilized perform multiplications by powers of two.
       Multiply operations are represented by the ‘<<’ symbol while divides are
       are represented by ‘>>’.
    */
    return (f << s) + (1 << s >> 5) + ((f > s) ? ((v + (1 << f)) >> (f + s)):
    ((v + (1 << f)) << (s + f)));
    /* Next line converts from Log2(x) to Ln by computing log2(x)/log2(e). */
    return (v >> 1) + (v >> 2) − (v >> 4) + (v >> 7) − (v >> 9) − (v >> 12) + (v >> 15);
    }
  • FIG. 4 is a block diagram of the [0023] system 140 in accordance with the invention utilizing a Digital Signal Processor (DSP) or Application Specific Integrated Circuit (ASIC) chip 145. It is appreciated that the system 140 may be selectively implemented in software, hardware, or a combination thereof. As an example, the elements of the system 140 may be implemented in software 150 stored in a memory located in a controller unit 155. The controller unit 155 is in signal communication with the DSP or ASIC chip 145 via communication link 160 (which may selectively be a system bus). The software 150 configures and drives the DSP or ASIC chip 145 and performs the steps described in FIG. 3.
  • The [0024] software 40, FIG. 1, such as a computer program, comprises an ordered listing of executable instructions for implementing logical functions. The software 40 may selectively be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor-containing system, or other system that may selectively fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions. In the context of this document, a “computer-readable medium” is any means that may contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer readable medium may selectively be, for example but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, device, or propagation medium. More specific examples (a non-exhaustive list) of the computer-readable medium would include the following: an electrical connection (electronic) having one or more wires, a portable computer diskette (magnetic), a RAM (electronic), a read-only memory (ROM) (electronic), an erasable programmable read-only memory (EPROM or Flash memory) (electronic), an optical fiber (optical), and a portable compact disc read-only memory (CDROM) (optical). Note that the computer-readable medium may even be paper or another suitable medium upon which the program is printed, as the program can be electronically captured, via for instance optical scanning of the paper or other medium, then compiled, interpreted or otherwise processed in a suitable manner if necessary, and then stored in a computer memory.
  • While the specification in the invention is described in relation to certain implementations or embodiments, many details are set forth for the purpose of illustration. Thus, the foregoing merely illustrates the principles of the invention. For example, this invention may have other specific forms without departing from its spirit or essential characteristics. The described arrangements are illustrated and not restricted. To those skilled in the art the invention is susceptible to additional implementations or embodiments and certain of the details described in this application can be varied considerably, without departing from the basic principles of the invention. It will thus be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody the principles of the invention. They are thus within the spirit and scope. [0025]

Claims (18)

What is claimed is:
1. A system for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter, the system comprising:
a search circuit;
an interpolation circuit in signal communication with the search circuit;
a shift circuit in signal communication with the interpolation circuit; and
a combiner that produces an output logarithmic digital signal from a received search circuit output and a received shift circuit output.
2. The system of claim 1 wherein the interpolation circuit is a combinational logic circuit capable of calculating a linear interpolation on an output from the search circuit based on the parameter.
3. The system of claim 2 wherein the search circuit is a combinational logic circuit capable of performing a standard binary search on the input digital signal.
4. The system of claim 2 wherein the search circuit is a combinational logic circuit capable of performing a shift and search operation on the input digital signal.
5. The system of claim 1 wherein the search circuit, interpolation circuit, shift circuit and combiner are all integrated in a signal integrated circuit.
6. The system of claim 5 wherein the signal integrated circuit is application specific integrated chip.
7. A system for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter, the system comprising:
means for finding the bit position of the highest bit value of the input digital signal;
means for determining an offset from the position of the highest bit value and the parameter;
means for interpolating a shifted interpolation value from the input signal using the parameter; and
an adder for adding the offset, precision shifted interpolation value and bit position.
8. The system of claim 7 wherein the interpolating means is a combinational logic circuit capable of calculating a linear interpolation on an output from the finding means based on the parameter.
9. The system of claim 8 wherein the finding means is a combinational logic circuit capable of performing a standard binary search on the input digital signal.
10. The system of claim 8 wherein the finding means is a combinational logic circuit capable of performing a shift and search operation on the input digital signal.
11. A method for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter, the method comprising:
searching for the bit position of the highest bit value of the input digital signal;
determining an offset from the position of the highest bit value utilizing the parameter;
interpolating an offset precision shifted interpolation value from the input signal using the parameter; and
adding the offset precision shifted interpolation value with the highest bit value.
12. The method of claim 11 wherein the step of interpolating further includes calculating a linear interpolation on the highest bit value based on the parameter.
13. The system of claim 12 wherein the step of searching further includes a standard binary search on the input digital signal.
14. The system of claim 12 wherein the step of searching further includes a shift and search operation on the input digital signal.
15. A computer program embodied on a computer-readable medium for producing an output logarithmic digital signal from an input digital signal having a plurality of bit values wherein the output logarithmic signal has a precision defined by a parameter, the computer program comprising:
logic configured for searching for the bit position of the highest bit value of the input digital signal;
logic configured for determining an offset from the position of the highest bit value utilizing the parameter;
logic configured for interpolating an offset precision shifted interpolation value from the input signal using the parameter; and
logic configured for adding the offset precision shifted interpolation value with the highest bit value.
16. The computer-readable medium of claim 15 wherein the interpolating logic further includes logic configured for calculating a linear interpolation on the highest bit value based on the parameter.
17. The computer-readable medium of claim 16 wherein the searching logic further includes logic configured to perform a standard binary search on the input digital signal.
18. The computer-readable medium of claim 16 wherein the searching logic further includes logic configured to perform a shift and search operation on the input digital signal.
US09/815,033 2001-03-22 2001-03-22 Fast system and method for producing a logarithmic signal approximation with variable precision Expired - Lifetime US6502118B1 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
US09/815,033 US6502118B1 (en) 2001-03-22 2001-03-22 Fast system and method for producing a logarithmic signal approximation with variable precision
CN02807003.8A CN1271508C (en) 2001-03-22 2002-03-05 Produces a logarithmic signal approximation with variable precision
GB0321742A GB2390197B (en) 2001-03-22 2002-03-05 Producing a logarithmic signal approximation with vairable precision
PCT/US2002/006629 WO2002077797A1 (en) 2001-03-22 2002-03-05 Producing a logarithmic signal approximation with vairable precision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
US09/815,033 US6502118B1 (en) 2001-03-22 2001-03-22 Fast system and method for producing a logarithmic signal approximation with variable precision

Publications (2)

Publication Number Publication Date
US6502118B1 US6502118B1 (en) 2002-12-31
US20030005006A1 true US20030005006A1 (en) 2003-01-02

Family

ID=25216673

Family Applications (1)

Application Number Title Priority Date Filing Date
US09/815,033 Expired - Lifetime US6502118B1 (en) 2001-03-22 2001-03-22 Fast system and method for producing a logarithmic signal approximation with variable precision

Country Status (4)

Country Link
US (1) US6502118B1 (en)
CN (1) CN1271508C (en)
GB (1) GB2390197B (en)
WO (1) WO2002077797A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177869A1 (en) * 2005-03-17 2009-07-09 Qualcomm Incorporated Efficient check node message transform approximation for ldpc decoder

Families Citing this family (26)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7881936B2 (en) 1998-12-04 2011-02-01 Tegic Communications, Inc. Multimodal disambiguation of speech recognition
US8938688B2 (en) 1998-12-04 2015-01-20 Nuance Communications, Inc. Contextual prediction of user words and user actions
US7712053B2 (en) 1998-12-04 2010-05-04 Tegic Communications, Inc. Explicit character filtering of ambiguous text entry
US7679534B2 (en) * 1998-12-04 2010-03-16 Tegic Communications, Inc. Contextual prediction of user words and user actions
US7720682B2 (en) 1998-12-04 2010-05-18 Tegic Communications, Inc. Method and apparatus utilizing voice input to resolve ambiguous manually entered text input
US7750891B2 (en) 2003-04-09 2010-07-06 Tegic Communications, Inc. Selective input system based on tracking of motion parameters of an input device
US7821503B2 (en) 2003-04-09 2010-10-26 Tegic Communications, Inc. Touch screen and graphical user interface
US7286115B2 (en) 2000-05-26 2007-10-23 Tegic Communications, Inc. Directional input system with automatic correction
EP1192716B1 (en) 1999-05-27 2009-09-23 Tegic Communications, Inc. Keyboard system with automatic correction
US7610194B2 (en) 2002-07-18 2009-10-27 Tegic Communications, Inc. Dynamic database reordering system
US7030863B2 (en) 2000-05-26 2006-04-18 America Online, Incorporated Virtual keyboard system with automatic correction
US6678710B1 (en) * 2000-11-03 2004-01-13 Sun Microsystems, Inc. Logarithmic number system for performing calculations in a processor
US7107300B2 (en) * 2002-05-17 2006-09-12 Texas Instruments Incorporated Circuits, systems, and methods implementing approximations for inverse logarithm
US7171435B2 (en) * 2002-05-17 2007-01-30 Texas Instruments Incorporated Circuits, systems, and methods implementing approximations for logarithm, inverse logarithm, and reciprocal
US8583440B2 (en) 2002-06-20 2013-11-12 Tegic Communications, Inc. Apparatus and method for providing visual indication of character ambiguity during text entry
US7080364B2 (en) * 2003-04-28 2006-07-18 Intel Corporation Methods and apparatus for compiling a transcendental floating-point operation
US20050089237A1 (en) * 2003-10-24 2005-04-28 Jaehwa Park Method and apparatus for bezier curve approximation data compression
US7636083B2 (en) * 2004-02-20 2009-12-22 Tegic Communications, Inc. Method and apparatus for text input in various languages
US8095364B2 (en) 2004-06-02 2012-01-10 Tegic Communications, Inc. Multimodal disambiguation of speech recognition
US8504606B2 (en) 2005-11-09 2013-08-06 Tegic Communications Learner for resource constrained devices
US7587378B2 (en) * 2005-12-09 2009-09-08 Tegic Communications, Inc. Embedded rule engine for rendering text and other applications
US7580925B2 (en) * 2006-04-19 2009-08-25 Tegic Communications, Inc. Efficient storage and search of word lists and other text
US8225203B2 (en) 2007-02-01 2012-07-17 Nuance Communications, Inc. Spell-check for a keyboard system with automatic correction
US8201087B2 (en) 2007-02-01 2012-06-12 Tegic Communications, Inc. Spell-check for a keyboard system with automatic correction
US8103499B2 (en) * 2007-03-22 2012-01-24 Tegic Communications, Inc. Disambiguation of telephone style key presses to yield Chinese text using segmentation and selective shifting
US8299943B2 (en) * 2007-05-22 2012-10-30 Tegic Communications, Inc. Multiple predictions in a reduced keyboard disambiguating system

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0572695A1 (en) * 1992-06-03 1993-12-08 International Business Machines Corporation A digital circuit for calculating a logarithm of a number
JP2861687B2 (en) * 1992-12-04 1999-02-24 日本電気株式会社 Logarithmic operation circuit
US5629884A (en) * 1995-07-28 1997-05-13 Motorola, Inc. Log converter utilizing offset and method of use thereof
US5951629A (en) * 1997-09-15 1999-09-14 Motorola, Inc. Method and apparatus for log conversion with scaling
US6289367B1 (en) * 1998-11-16 2001-09-11 Texas Instruments Incorporated Digital signal processing circuits, systems, and method implementing approximations for logarithm and inverse logarithm

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090177869A1 (en) * 2005-03-17 2009-07-09 Qualcomm Incorporated Efficient check node message transform approximation for ldpc decoder
TWI383595B (en) * 2005-03-17 2013-01-21 Qualcomm Inc Efficient check node message transform approximation for ldpc decoder
US8495119B2 (en) * 2005-03-17 2013-07-23 Qualcomm Incorporated Efficient check node message transform approximation for LDPC decoder

Also Published As

Publication number Publication date
WO2002077797A1 (en) 2002-10-03
GB0321742D0 (en) 2003-10-15
GB2390197B (en) 2005-03-30
GB2390197A (en) 2003-12-31
CN1498364A (en) 2004-05-19
CN1271508C (en) 2006-08-23
US6502118B1 (en) 2002-12-31

Similar Documents

Publication Publication Date Title
US6502118B1 (en) Fast system and method for producing a logarithmic signal approximation with variable precision
US5570310A (en) Method and data processor for finding a logarithm of a number
JP2599545B2 (en) Computer system for calculating logarithm and method of operating computer system
US20160313976A1 (en) High performance division and root computation unit
US9170776B2 (en) Digital signal processor having instruction set with a logarithm function using reduced look-up table
US20130185345A1 (en) Algebraic processor
KR19980701802A (en) Log / Inverse Log Converter, Calculation Device and Log Value Generation Method
US20040255284A1 (en) Compiler
US6847986B2 (en) Divider
Davis A general expression for Hermite expansions with applications
US5648924A (en) Method and apparatus for finding arctangents
US6389443B1 (en) Method and apparatus for an efficient square-root computation
US6834293B2 (en) Vector scaling system for G.728 annex G
US5646876A (en) Method and apparatus for reducing rounding error when evaluating binary floating point polynomials
US7321914B2 (en) Fast method for calculating powers of two as a floating point data type
US6832233B2 (en) Apparatus and method for computing multiple integral, and recording medium
Orloski et al. Automatic Generation of Complete Polynomial Interpolation Design Space for Hardware Architectures
Orloski et al. Automatic Generation of Complete Polynomial Interpolation Hardware Design Space
Hass Synthesizing optimal fixed-point arithmetic for embedded signal processing
Rodden Error-free methods for statistical computations
JP2518532B2 (en) Subtractor shift type divider
KR940008610B1 (en) Method and processor for high-speed convergence factor determination
KR20240102915A (en) Method and apparatus for providing floating point arithmetic
Corless et al. Rounding coefficients and artificially underflowing terms in non-numeric expressions
WO2024042117A1 (en) Method for performing an operation in a cryptographic application

Legal Events

Date Code Title Description
AS Assignment

Owner name: MOTOROLA INC., ILLINOIS

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNOR:CHATTERJEE, MANJIRNATH;REEL/FRAME:011645/0932

Effective date: 20010321

STCF Information on status: patent grant

Free format text: PATENTED CASE

FPAY Fee payment

Year of fee payment: 4

FPAY Fee payment

Year of fee payment: 8

FPAY Fee payment

Year of fee payment: 12