IP Library Granted Patent US 10,656,942
Granted Patent B2
US 10,656,942 · App. 16/291,245 · Granted May 19, 2020

Fixed point to floating point conversion

Inventors: Venkateswara Madduri (Austin, TX); Elmoustapha Ould-Ahmed-Vall (Chandler, AZ); Robert Valentine (Kiryat Tivon, IL); Jesus Corbal (King City, OR); Mark Charney (Lexington, MA)
Assignee: Intel Corporation
G06F9/30025G06F7/483H03M7/24
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,656,942
App. No.
16/291,245
Granted
May 19, 2020
Kind
B2
Abstract

Embodiments of instructions and methods of execution of said instructions and resources to execute said instructions are detailed. For example, in an embodiment, a processor comprising: decode circuitry to decode an instruction having fields for an opcode, a packed data source operand identifier, and a packed data destination operand identifier; and execution circuitry to execute the decoded instruction to convert a data element from a least significant packed data element position of the identified packed data source operand from a fixed-point representation to a floating point representation, store the floating point representation into a 32-bit least significant packed data element position of the identified packed data destination operand, and zero all remaining packed data elements of the identified packed data destination operand is described.

Claims (240)

1. An apparatus comprising:

memory to store an instruction;

a processor coupled to the memory, the processor to at least include:

decode circuitry to decode the instruction having fields for an opcode, a packed data source operand identifier, and a packed data destination operand identifier, and

execution circuitry to execute the decoded instruction according to the opcode to convert a data element from a packed data element position of the identified packed data source operand from a fixed-point representation to a floating point representation, store the floating point representation into a packed data element position of the identified packed data destination operand, and zero all remaining packed data elements of the identified packed data destination operand.

2. The apparatus of claim 1 , wherein the opcode is to indicate data elements of the identified packed data source are unsigned and a size of the packed data elements of the identified packed data source.

3. The apparatus of claim 2 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the execution circuitry is further to:

zero extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the zero extended data element from packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the zero extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the zero extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

4. The apparatus of claim 2 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the execution circuitry is further to:

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

5. The apparatus of claim 1 , wherein the opcode is to indicate data elements of the identified packed data source are signed and a size of the packed data elements of the identified packed data source.

6. The apparatus of claim 5 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the execution circuitry is further to:

sign extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to one,

determine a leading one position of the absolute value of the sign extended data element from the least significant packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the sign extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the sign extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

7. The apparatus of claim 5 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the execution circuitry is further to:

calculate an absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to one,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

8. A method comprising:

decoding an instruction having fields for an opcode, a packed data source operand identifier, and a packed data destination operand identifier; and

executing the decoded instruction according to the opcode to convert a data element from a packed data element position of the identified packed data source operand from a fixed-point representation to a floating point representation, store the floating point representation into a data element position of the identified packed data destination operand, and zero all remaining packed data elements of the identified packed data destination operand.

9. The method of claim 8 , wherein the opcode is to indicate data elements of the identified packed data source are unsigned and a size of the packed data elements of the identified packed data source.

10. The method of claim 9 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the executing is further to:

zero extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the zero extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the zero extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

11. The method of claim 9 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the executing is further to:

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

12. The method of claim 8 , wherein the opcode is to indicate data elements of the identified packed data source are signed and a size of the packed data elements of the identified packed data source.

13. The method of claim 12 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the executing is further to:

sign extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to one,

determine a leading one position of the absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the sign extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the sign extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

14. The method of claim 12 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the executing is further to:

calculate an absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to one,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

15. A non-transitory machine-readable medium storing an instruction which is to cause a processor to perform a method comprising:

decoding the instruction having fields for an opcode, a packed data source operand identifier, and a packed data destination operand identifier; and

executing the decoded instruction according to the opcode to convert a data element from a packed data element position of the identified packed data source operand from a fixed-point representation to a floating point representation, store the floating point representation into a 32-bit packed data element position of the identified packed data destination operand, and zero all remaining packed data elements of the identified packed data destination operand.

16. The non-transitory machine-readable medium of claim 15 , wherein the opcode is to indicate data elements of the identified packed data source are unsigned and a size of the packed data elements of the identified packed data source.

17. The non-transitory machine-readable medium of claim 16 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the executing is further to:

zero extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the zero extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the zero extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

18. The non-transitory machine-readable medium of claim 16 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the executing is further to:

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

19. The non-transitory machine-readable medium of claim 15 , wherein the opcode is to indicate data elements of the identified packed data source are signed and a size of the packed data elements of the identified packed data source.

20. The non-transitory machine-readable medium of claim 19 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the executing is further to:

sign extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to one,

determine a leading one position of the absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the sign extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the sign extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

21. The non-transitory machine-readable medium of claim 19 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the executing is further to:

calculate an absolute value of the sign extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to one,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

22. An apparatus comprising:

memory to store an instruction;

a processor coupled to the memory, the processor to at least include:

decode means for decoding the instruction having fields for an opcode, a packed data source operand identifier, and a packed data destination operand identifier; and

execution means for executing the decoded instruction according to the opcode to convert a data element from a packed data element position of the identified packed data source operand from a fixed-point representation to a floating point representation, store the floating point representation into a packed data element position of the identified packed data destination operand, and zero all remaining packed data elements of the identified packed data destination operand.

23. The apparatus of claim 22 , wherein the opcode is to indicate data elements of the identified packed data source are unsigned and a size of the packed data elements of the identified packed data source.

24. The apparatus of claim 23 , wherein the size of the packed data elements of the identified packed data source is 16-bit, and the execution means is further to:

zero extend the data element from the packed data element position of the identified packed data source operand to 32 bits,

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the zero extended data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the zero extended data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

25. The apparatus of claim 23 , wherein the size of the packed data elements of the identified packed data source is 32-bit, and the execution means is further to:

calculate an absolute value of the zero extended data element from the packed data element position of the identified packed data source operand,

set a sign for the floating point representation to zero,

determine a leading one position of the absolute value of the data element from the packed data element position of the identified packed data source operand,

when the leading one position is null, set a fractional value to zero for floating point representation,

when the leading one position is not null, subtract a 1 from the determined leading one position to set a most significant bit position,

determine when the leading one position is greater than 23,

when the leading one position is greater than 23,

calculate a least significant bit position, and

set a fractional as an absolute value of the data element using values from the calculated least significant bit position to the calculated most significant bit position, and

when the leading one position is not greater than 23,

calculate a number of padding bits, and

set a fractional as an absolute value of the data element using values from zero to the calculated most significant bit position concatenated with the number of calculated padding bits, and

concatenate three zeros with the leading one position value and add 127 to calculate an exponent,

store the sign, exponent, and fractional.

Continuity (2)
Continuation 15721602 · Sep 29, 2017
Related Publication 20190196818A1 · Jun 27, 2019
Cited By (6)
US 12,205,003 US 12,314,866 US 12,333,671 US 12,504,951 US 12,561,115 US 12,711,385