Program conversion apparatus, processor, and record medium

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S140000, C717S136000, C717S146000, C717S151000

Reexamination Certificate

active

06725450

ABSTRACT:

BACKGROUND OF THE INVENTION
(1) Field of the Invention
The present invention relates to a program conversion apparatus which converts a source program into a machine-language sequence, and relates to a processor which executes the machine-language sequence output from the program conversion apparatus.
(2) Description of Related Art
A program conversion apparatus has a table showing relationships between (a) instructions written in a programming language such as a high-level language and an assembly language and (b) machine-language instructions. When a source program is input to the program conversion apparatus, the program conversion apparatus converts the source program into machine-language instruction sequences using the table.
A processor stores the machine-language instruction sequences in a ROM, reads out the machine-language instruction sequences sequentially in units of machine-language instructions from the ROM to an instruction register, decodes the instructions, and allow the components such as an ALU and a register to operate in accordance with the decoding results.
Buses contained in the processor are each composed of a plurality of signal lines. Power is consumed when a bit value passing through a signal line changes from 0 to 1 or from 1 to 0. Each signal line corresponds to one digit of the machine-language instructions. That means the more bit changes are included in the machine-language instruction sequences, the more power is consumed, where the bit change is a change between successive values in the same digit between two successive machine-language instructions. Accordingly, there has been a desire to reduce the number of bit changes in the machine-language instruction sequences to reduce the power consumption.
SUMMARY OF THE INVENTION
It is therefore an object of the present invention to provide a program conversion apparatus which converts a source program into machine-language instruction sequences having reduced number of bit changes, where the bit change is a change between values in the same digit between two successive machine-language instructions, a record medium recording a program for achieving the conversion, a processor for executing the converted machine-language instruction sequences, and a record medium recording a program for achieving the execution.
The above object is fulfilled by a program conversion apparatus for converting a source program into machine-language instructions to be executed by a processor, the processor reading out the machine-language instructions sequentially from a memory unit via a bus, the program conversion apparatus comprising:
a program storage means for storing the source program which includes a plurality of instructions, each instruction including one or more types of components; a machine-language storage means for storing a plurality of sets of two or more types of machine-language codes which correspond to a plurality of components of a predetermined type included in the plurality of instructions, the two or more types of machine-language codes in each set having different bit patterns; and a conversion means for converting the plurality of instructions stored in the program storage means into the machine-language instructions, wherein the conversion means converts each of the plurality of predetermined-type components selectively into one of the two or more types of machine-language codes so that changes in logical states of signal lines composing the bus are fewest for the machine-language instructions.
With the above construction, the program conversion apparatus converts a source program into machine-language instruction sequences that render the power consumption of a processor small. The machine-language instruction sequences have reduced number of bit changes, where the bit change is a change between values in the same digit between two successive machine-language instructions. This enables the processor to execute the machine-language instructions with less power consumption since when these instructions pass through the bus between the ROM and the instruction register bus, less power is consumed due to less bit changes (power consumption) in each signal line constituting the bus.
In the above program conversion apparatus, each of the plurality of predetermined-type components may indicate an operation, the machine-language storage means stores a plurality of sets of two types of operation codes corresponding to the plurality of predetermined-type components indicating operations, the two types of operation codes in each set having different bit patterns, and the conversion means converts each of the plurality of predetermined-type components selectively into one of the two types of operation codes so that changes in logical states of signal lines composing the bus are fewest for the machine-language instructions.
With the above construction, the program conversion apparatus converts a source program into machine-language instruction sequences that render the power consumption of a processor small. The machine-language instruction sequences have reduced number of bit changes in terms of the operation codes. This enables the processor to execute the machine-language instructions with less power consumption since when these instructions pass through the bus between the ROM and the instruction register bus, less power is consumed due to less bit changes (power consumption) in each signal line constituting the bus.
In the above program conversion apparatus, each digit of the machine-language instructions may correspond to one of the signal lines, the conversion means converts the plurality of instructions included in the source program one by one, and includes: a reading means for reading out the plurality of sets of two types of operation codes corresponding to the plurality of predetermined-type components; a calculation means for comparing, for each of the two types of operation codes in a set read by the reading means, a bit pattern of the operation code with bits in a corresponding position in an immediately preceding machine language instruction and calculating a number of bits in the bit pattern having different values from the immediately preceding machine language instruction; a judging means for judging which of the two types of operation code has a bit pattern with a lower number of different bit values; and a selecting means for selecting an operation code judged to have the bit pattern with the lower number of different bit values.
With the above construction, the program conversion apparatus converts a plurality of certain components of a source program into operation codes having short Hamming distances from the preceding operation codes, sequentially starting from the first component of the program. As a result, the machine-language instruction sequences converted from the source program have less bit changes in terms of the operation codes. This enables the processor to execute the machine-language instructions with less power consumption for the same reason stated earlier. It should be noted here that the Hamming distance is the sum of bit changes between two bit patterns having the same length, the bit change being a change between two values in the same digit. For example, between bit patterns “10011” and “10110”, there are bit changes in the third and fifth digits from left. In this case, the Hamming distance is 2.
In the above program conversion apparatus, the calculation means may include: an exclusive OR means for performing an exclusive OR for each digit between each of the two types of operation code in a set read by the reading means and the bits in the corresponding position in the immediately preceding machine language instruction; and an addition means for adding up each result of the exclusive OR means to obtain a sum for each of the two types of operation code, the sums being used as the number of bits in the bit pattern having different values from the immediately preceding machine language instruction.
With the above construction, it is possible to obtain the Hamming

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

Program conversion apparatus, processor, and record medium does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with Program conversion apparatus, processor, and record medium, we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and Program conversion apparatus, processor, and record medium will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-3261520

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.