EMULATION OF A FIXED POINT OPERATION USING A CORRESPONDING FLOATING POINT OPERATION
First Claim
1. In a computer comprising a memory and a floating point unit, a method implemented in a set of instructions executable by said computer, the method comprising:
- said computer receiving a program, a portion of said program comprising an operand (hereinafter “
fixed-point operand”
) represented in a fixed-point representation;
said computer expanding said fixed-point operand into a floating-point representation to obtain a floating-point equivalent;
said computer storing a precision of the fixed-point operand;
said computer further receiving in said portion an instruction comprising an operation to be performed on the fixed-point operand by a fixed point processor;
said computer using said floating point unit to perform on the floating-point equivalent, at least one floating-point operation that corresponds to the fixed-point operation, yielding at least one floating-point result;
said computer reducing said at least one floating-point result generated by the floating-point operation into a fixed-point result;
said computer using the stored precision during reduction of the floating-point result into the fixed-point result; and
said computer displaying said fixed-point result to a user.
0 Assignments
0 Petitions
Accused Products
Abstract
A computer emulates a fixed-point operation that is normally performed on fixed-point operands, by use of a floating-point operation that is normally performed on floating-point operands. Several embodiments emulate a fixed-point operation by: expanding at least one fixed-point operand into a floating-point representation (also called “floating-point equivalent”), performing, on the floating-point equivalent, a floating-point operation that corresponds to the fixed-point operation, and reducing a floating-point result into a fixed-point result. The just-described fixed-point result may have the same representation as the fixed-point operand(s) and/or any user-specified fixed-point representation, depending on the embodiment. Also the operands and the result may be either real or complex, and may be either scalar or vector. The above-described emulation may be performed either with an interpreter or with a compiler, depending on the embodiment. A conventional interpreter for an object-oriented language (such as MATLAB version 6) may be extended to perform the emulation.
25 Citations
20 Claims
-
1. In a computer comprising a memory and a floating point unit, a method implemented in a set of instructions executable by said computer, the method comprising:
-
said computer receiving a program, a portion of said program comprising an operand (hereinafter “
fixed-point operand”
) represented in a fixed-point representation;said computer expanding said fixed-point operand into a floating-point representation to obtain a floating-point equivalent; said computer storing a precision of the fixed-point operand; said computer further receiving in said portion an instruction comprising an operation to be performed on the fixed-point operand by a fixed point processor; said computer using said floating point unit to perform on the floating-point equivalent, at least one floating-point operation that corresponds to the fixed-point operation, yielding at least one floating-point result; said computer reducing said at least one floating-point result generated by the floating-point operation into a fixed-point result; said computer using the stored precision during reduction of the floating-point result into the fixed-point result; and said computer displaying said fixed-point result to a user. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16)
-
-
17. A storage device comprising a set of instructions executable by a computer that comprises a floating point unit, the storage device comprising:
-
software to receive a program, at least a portion of said program being written for execution on a fixed point processor, said fixed point processor being not available in said computer for execution of said program, said portion of said program comprising at least one operand represented in fixed-point representation (hereinafter “
fixed-point operand;software to expand said fixed-point operand into a floating-point representation to obtain a floating-point equivalent; software to receive an instruction comprising an operation to be performed on the fixed-point operand; software to receive another instruction that indicates a type of said fixed-point operand; wherein said another instruction comprises a call to a function; software to use said floating point unit to perform on the floating-point equivalent, at least one floating-point operation that corresponds to the fixed-point operation, yielding at least one floating-point result; software to reduce, based on a value of said at least one property, said at least one floating-point result generated by the floating-point operation into a fixed-point result; and software to store the fixed point result in said computer, as output of emulation without use of the fixed point processor. - View Dependent Claims (18, 19)
-
-
20. A method implemented in a set of instructions executable by a computer that comprises a floating point unit, the method comprising:
-
said computer receiving a program, at least a portion of said program being written for execution on a fixed point processor, said fixed point processor being not available for execution of said program, said portion of said program comprising at least one operand represented in fixed-point representation (hereinafter “
fixed-point operand”
), said fixed-point representation having a precision identifying a first plurality of bits on a left side of a point and a second plurality of bits on a right side of said point;said computer expanding said fixed-point operand into a floating-point representation to obtain a floating-point equivalent; said computer receiving in said program an instruction comprising an operation to be performed on the fixed-point operand; wherein said instruction comprises overloading of an operator normally used to denote said corresponding floating-point operation; said computer using said floating point unit to perform on the floating-point equivalent, at least one floating-point operation that corresponds to the fixed-point operation, yielding at least one floating-point result; said computer reducing, based said precision, said at least one floating-point result generated by the floating-point operation into a fixed-point result; and said computer storing in memory the fixed point result as an output of emulation without use of the fixed point processor.
-
Specification