Circuit arrangement for translating platform-independent instructions for execution on a hardware platform and method thereof
First Claim
1. A computer system for executing program code in a format having platform-independent instructions, the computer system comprising:
- a processor for executing program code in a format having native instructions;
a memory coupled to the processor for storing program code for execution by the processor, wherein the memory is a first memory and is coupled to the processor by an address bus and a data bus;
a vector table and an object table, the object table including a plurality of entries, each entry including at least one native instruction corresponding to one of the platform-independent instructions, and the vector table including a plurality of vectors indexed by the platform-independent instructions, each vector pointing to one of the entries in the object table; and
a translation circuit coupled to the memory, the translation circuit configured and arranged to receive a platform-independent instruction from the memory and output at least one native instruction for the processor corresponding thereto, wherein the translation circuit further comprises;
a state machine, coupled to the memory and the vector and object tables, the state machine configured and arranged to receive a block of platform-independent program code stored in the memory and output a block of corresponding native program code to the memory;
a source address register configured and arranged to store a source address in the memory of a platform-independent instruction to be translated;
a destination address register configured and arranged to store a destination address in the memory at which to store a native instruction corresponding to the platform-independent instruction pointed to by the source address register;
an instruction register configured and arranged to store the platform-independent instruction pointed to by the source address register; and
a translate object address register configured and arranged to store a translate object address pointing to a native instruction stored in the object table that corresponds to the platform-independent instruction pointed to by the source address register;
wherein the state machine is coupled to the source address register, the destination address register, the instruction register, and the translate object address register, and wherein the state machine is configured and arranged to manipulate the destination address and translate object address registers to store each native instruction, in the entry in the object table corresponding to the platform-independent instruction stored in the instruction register, in the memory starting at the destination address.
12 Assignments
0 Petitions
Accused Products
Abstract
A translating circuit coupled to a processor and memory of a computer system translates platform-independent instructions such as Java bytecodes into corresponding native instructions for execution by the processor. In one embodiment, the translating circuit is incorporated into the same integrated circuit device as the processor. In another embodiment, the translating circuit is provided within one or more external integrated circuit devices. One or more look-up tables map platform-independent instructions into one or more native instructions for the processor, thereby minimizing software-based interpretation of platform-independent program code. Moreover, platform-independent instructions are mapped to native instructions on-the-fly, or alternatively, in blocks prior to execution using a state machine.
-
Citations
29 Claims
-
1. A computer system for executing program code in a format having platform-independent instructions, the computer system comprising:
-
a processor for executing program code in a format having native instructions; a memory coupled to the processor for storing program code for execution by the processor, wherein the memory is a first memory and is coupled to the processor by an address bus and a data bus; a vector table and an object table, the object table including a plurality of entries, each entry including at least one native instruction corresponding to one of the platform-independent instructions, and the vector table including a plurality of vectors indexed by the platform-independent instructions, each vector pointing to one of the entries in the object table; and a translation circuit coupled to the memory, the translation circuit configured and arranged to receive a platform-independent instruction from the memory and output at least one native instruction for the processor corresponding thereto, wherein the translation circuit further comprises; a state machine, coupled to the memory and the vector and object tables, the state machine configured and arranged to receive a block of platform-independent program code stored in the memory and output a block of corresponding native program code to the memory; a source address register configured and arranged to store a source address in the memory of a platform-independent instruction to be translated; a destination address register configured and arranged to store a destination address in the memory at which to store a native instruction corresponding to the platform-independent instruction pointed to by the source address register; an instruction register configured and arranged to store the platform-independent instruction pointed to by the source address register; and a translate object address register configured and arranged to store a translate object address pointing to a native instruction stored in the object table that corresponds to the platform-independent instruction pointed to by the source address register; wherein the state machine is coupled to the source address register, the destination address register, the instruction register, and the translate object address register, and wherein the state machine is configured and arranged to manipulate the destination address and translate object address registers to store each native instruction, in the entry in the object table corresponding to the platform-independent instruction stored in the instruction register, in the memory starting at the destination address. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A translation circuit for use in a computer system to execute program code in a format having platform-independent instructions on a processor in the computer system that executes program code in a format having native instructions, the computer system further including a memory, the translation circuit comprising:
-
an input circuit configured and arranged to receive a platform-independent instruction, the input circuit including a source address register configured and arranged to store a source address of a platform-independent instruction to be translated; translating means, coupled to the input circuit, for outputting at least one native instruction for the processor corresponding the platform-independent instruction; a destination address register configured and arranged to store a destination address in the memory for storing a native instruction corresponding to the platform-independent instruction pointed to by the source address register; and a block processing means, coupled to the source address register, the destination address register, and the translating means, and configured and arranged to supply a block of platform-independent program code stored in the memory to the translating means and store in the memory a block of corresponding native program code output from the translating means. - View Dependent Claims (9, 10, 11, 12, 13, 14, 15, 16, 17, 18)
-
-
19. A computer system for executing program code in a format having platform-independent instructions, the computer system comprising:
-
a processor for executing program code in a format having native instructions; a memory coupled to the processor for storing program code for execution by the processor; a translation circuit coupled to the memory, the translation circuit configured and arranged to receive a platform-independent instruction from the memory and output at least one native instruction for the processor corresponding thereto; a source address register configured and arranged to store a source address in the memory of a platform-independent instruction to be translated; a destination address register configured and arranged to store a destination address in the memory for storing a native instruction corresponding to the platform-independent instruction pointed to by the source address register; and a state machine, coupled to the memory, the source address register, the destination address register, and the translation circuit, the state machine configured and arranged to supply a block of platform-independent program code stored in the memory to the translation circuit and store in the memory a block of corresponding native program code output from the translation circuit. - View Dependent Claims (20, 21, 22, 23, 24, 25, 26)
-
-
27. A method of executing program code in a format having platform-independent instructions on a processor which executes program code in a format having native instructions, the method comprising:
-
receiving a platform-independent instruction, including receiving a block of platform-independent program code; storing a source address of a platform independent instruction from the block of platform-independent program code in a source address register; translating the block of platform independent program code with a hardware-implemented translation circuit into a block of corresponding native program code including at least one corresponding native instruction using an object table including a plurality of entries, each entry matching a platform-independent instruction with at least one native instruction for the processor; and storing the block of corresponding native program code in the memory starting at a destination address stored in a destination address register. - View Dependent Claims (28, 29)
-
Specification