1. Field of the Invention
The present invention relates to a microprocessor, a microprocessor designing program for designing the microprocessor, and a microprocessor designing apparatus.
2. Description of the Related Art
Recently there have been proposed the designing environment, designing systems, designing support programs or designing support apparatuses which have an object of designing, at a short period of time, microprocessors best fitted to the applications. These have mainly an object of enhancing the computing performance of the microprocessor, such as high-speed computation by removing redundant processing and unnecessary facility and the like, detection and correction of computation processing program failures. For example, Japanese Patent Kokai No. 2003-202993 (Patent Document 1) discloses a system, a method and a program which have an object of enhancing the computation processing performance by having two processing instruction execution sections which enables a microprocessor to execute a byte code instruction, where a byte code instruction with high frequency of execution is processed by a first processing instruction execution section, and a byte code instruction with relatively low frequency of execution is processed by a second instruction execution section.
Incidentally, aside from enhancement of the microprocessor computing performance, reduction of power consumption of the microprocessor is demanded. The microprocessor consumes power to perform computation and to access a memory. Ordinarily, as the power consumption of the microprocessor becomes more, the calorific value and the amount of power supply noise increase. As a counter-measure against them, there arises a problem that it is required to enlarge a cooling device, or to increase the number of capacitors to be placed around the microprocessor. Also to avoid these problems, it is important to reduce the power used by the microprocessor.
However, for example, as a system disclosed in Patent Document 1, most of the conventional art places stress on performance enhancement of computation processing. On the other hand, it can be considered to reduce power consumption by making the computation processing more efficient. As a means of making the computation processing more efficient, for example, deletion of redundancy processing or unnecessary facility can be enumerated. However, it takes much time to perform them actually. Further, effect of the efficiency promotion by these means is restricted, and reduction of power consumption by efficiency promotion of computing processing has limitations.
In view of the foregoing problems, it is an object of the present invention to provide a microprocessor which can be operated with low power consumption, a microprocessor designing program which can design it at a short period of time, and a microprocessor designing apparatus.
A microprocessor designing program according to the present invention is a microprocessor designing program for designing a microprocessor which comprises a memory composed of a plurality of address areas, and a computation processing unit which executes an instruction of an execution program which is stored in the address area accessed to any of said address areas, wherein comprised are an execution program storing step which stores each of said execution programs in correspondence with the specification of the address area made for each of said execution programs, an access number totalizing step where the computation processing unit counts the total number of accesses, and an execution program name outputting step which outputs the execution program name in the order according to said total number.
A microprocessor designing apparatus according to the present invention, wherein packed is a microprocessor program according to the present invention, and comprised is an execution program name displaying means for displaying, in characters, an execution program outputted by said execution program name outputting step.
The microprocessor according to the present invention, wherein each of the execution programs stored in each of the address areas having a large total number of accesses is accumulated in each of the address areas adjacent or consecutive to each other in said memory.
Embodiments of the present invention will be described in detail with reference to the accompanying drawings.
A microprocessor designing apparatus according to the present invention includes ordinary elements of a computer system such a processor, a program memory, a data memory, memory controller, a keyboard, a display for displaying characters and/or images, I/O ports, and so on mutually connected via buses, like conventional microprocessor designing apparatuses.
The microprocessor 1 comprises a computation processing unit 2, a program bus 3, a data bus 4, ordinary internal program memories 5-1 and 5-2, a small-capacity internal program memory 5-3, and internal data memories 6-1 to 6-m (where m is a positive integer).
The computation processing unit 2 has facilities of accessing the internal program memories 5-1 and 5-2, the small-capacity internal program memory 5-3, the internal data memories 6-1 to 6-m, the external program memory 7, and the external data memory 8, and of executing the execution programs stored in them. Through the program bus 3, the computation processing unit 2 accesses the ordinary internal program memories 5-1 and 5-2, the small-capacity internal program memory 5-3 and the external program memory 7. Further, through the data bus 4 the computation processing unit 2 accesses the internal data memories 6-1 to 6-m, and the external data memory 8.
The internal program memories 5-1 and 5-2, the small-capacity internal program memory 5-3 and the external program memory 7 respectively store an execution program which is executed by the microprocessor 1. The execution program in this context is, for example, a program which is made by compiling source codes described by C or C++ language. Also, this execution program can perform, for example, the facility of a filter computing function. The ordinary internal program memories 5-1 and 5-2 are internal memories for program, which have a normal size capacity. On the other hand, the small-capacity internal program memory 5-3 is an internal program memory having a smaller capacity than the internal program memories 5-1 and 5-2. In the drawing, this memory is expressed in a size smaller than the ordinary internal program memories 5-1 and 5-2. These memories are different in capacity, for example: the programming ordinary internal memory 5-1 has a capacity of 50 KB, the programming ordinary internal memory 5-2 has a capacity of 40 KB, and the small-capacity internal program memory 5-3 has a capacity of 10 KB. Specifically, in this embodiment, provided are two ordinary internal program memories and one small-capacity internal program memory. However, the present invention has no limitation in respect to the number of the ordinary internal program memories and small-capacity internal program memories.
The internal data memories 6-1 to 6-m, and the external data memory 8 respectively store data to refer to, when the microprocessor 1 executes a program. The data in this context is, for example, an initial value or a constant which are used in a program.
The external program memory 7 is a memory packaged outside of the microprocessor 1. Ordinarily, execution programs which are executed at a low frequency of execution are stored in the external program memory 7. The external data memory 8 is a memory packaged outside of the microprocessor 1. Ordinarily, in the external data memory 8, data such as initial value and constant, which has a low frequency of access, are stored.
Ordinarily, the memory area for storing the execution program is composed of a plurality of the address areas 21-1 to 21-s (where “s” is a positive integer). The address areas 21-1 to 21-s may not be same respectively in size. Ordinarily, in each of the address areas 21-1 to 21-s, the execution programs are stored. For example, in the address area 21-10, the filter computing function is stored, and in the address area 21-15, a loop processing function is stored. Ordinarily, the facility realized by the execution programs which are stored in each of the address areas 21-1 to 21-s is different with each other.
Specifically, the memory area in the figure is a virtual memory area in the computer, where the microprocessor program is executed in correspondence with a memory area as hardware finally packaged.
The microprocessor designing program comprises an execution program storing step (S31), an access frequency totalizing step (S32), an execution program name outputting step (S33), and execution of the execution program storing step (S31), and the access frequency totalizing step (S33) enables the microprocessor designing apparatus to function, as an execution program storing step, an access frequency totalizing step, and an execution program name outputting step, respectively.
The execution program storing step stores each of the execution programs in said specified address areas in correspondence with the specification of the address areas made for each of the execution programs. The designer of the microprocessor 1 specifies an address area for each execution program. For example, an address area is specified by using an inputting apparatus (not shown) and the like, attached to an apparatus which packages the microprocessor designing program. For example, as shown in
The access frequency totalizing step counts a total number of accesses which the computation processing unit 2 makes to each of the address areas. Further, the access frequency totalizing step ordinarily counts the total number of accesses which the execution program stored in a virtual memory area makes in correspondence with the execution programs stored in the internal program memories 5-1 to 5-3. Also, the total number of the accesses may be counted while the computation processing unit 2 executes the execution program, accessing the address area. For each of the address areas, ordinarily stored are the execution programs for realizing the facilities different with each other. As the respective execution programs are different in facility to realize, ordinarily the number of accesses of the computation processing unit 2 is different in each of the address area. For example, when the computation processing unit 2 has a high frequency of using the filter computing function, the computation processing unit 2 makes an increased total number of accesses to the address areas 21-10 (hereinafter called “total number of accesses”) where the filter computing function is stored.
The execution program name outputting step outputs an execution program name in an order based on a total number of accesses. The execution program name is stored previously in the microprocessor designing apparatus and/or the microprocessor 1. The execution program name outputting step outputs, for example, an execution program name stored in the address area in the descending order of the total number of accesses. Further, the apparatus which packages the microprocessor designing program comprises an execution program name displaying step for displaying, in characters, a name of the execution program outputted by the execution program outputting step. As the execution program name is displayed in characters, the designer of the microprocessor 1 can confirm by the display of the microprocessor designing apparatus the execution program name stored in the address area, for example, in the descending order of the total number of accesses.
First, the designer of the microprocessor 1 creates source codes of the microprocessor 1 with a programming language such as C and C++ (S41). Next, the source code is converted to an execution program with a general compiling step (S42). Next, the designer of the microprocessor 1 specifies an address area for each of the execution programs.
The execution program storing step of the microprocessor designing program stores each of the execution programs in a specified address area (S43). Different execution programs are stored in each of the address areas 21-1 to 21-n. Here, as an example, an assumption is made that stored are a filter computing function in the address area 21-10, a loop processing function in the address area 21-15, an integrating function in the address area 21-30, and a string processing function in the address 21-50.
The access frequency totalizing step of the microprocessor designing program determines the total number of accesses which the execution program makes to each of the address areas 21-1 to 21-n. The total number of the accesses which the computation processing unit 2 makes to each of the address areas is counted while the computation processing unit 2 executes the execution program, accessing the address areas 21-1 to 21-n (S44). The computation processing unit 2 in this context is supposed to access in total 1000 times to the address area 21-10, 800 times to the address area 21-15, 600 times to the address area 21-30, 500 times to the address area 21-30, and 500 times to the address area 21-50. In all of the address areas 21-1 to 21-n, the top four areas having a large total number of the accesses are supposed to be the address areas 21-10, 21-15, 21-30 and 21-50.
The microprocessor designing program name outputting step outputs an execution program name in an order based on the total number of accesses (S45). Here, the execution program name outputting step sequentially outputs an execution program name which is stored in the address area, in the descending order of the total number of accesses. Further, an apparatus which packages the microprocessor designing program displays the execution program name, in characters, according to the execution program name displaying step.
As the execution program name is displayed in characters, the designer of the microprocessor 1 can confirm the execution program name in the descending order of the total number of accesses. According to displayed results, the designer of the microprocessor 1 judges whether the execution program is restored or not in the address area (S46). In this event, ordinarily the address area in which the execution program is restored is a new address area created by dividing again the memory area into a size different from that of the current address areas 21-1 to 21-n.
Currently, the address areas 21-10, 21-15, 21-30, and 21-50, which have a large total number of accesses, as shown in
Following the step of restoring these execution programs (S43), counting of the total number of accesses to each of the address areas 61-1 to 61-t (S44), and outputting of the execution program name based on the total number of accesses are performed in the same way. When the designer of the microprocessor 1 judges that it is not necessary to restore the execution program in the address area, the ordinary internal program memories 5-1 and 5-2, and the small-capacity internal program memory 5-3 are packaged in the microprocessor 1 (S47).
For example, as shown in
For example, as shown in
As the small-capacity internal program memory 5-3 shown in
As described above, the designer of the microprocessor 1 can determine the quantity and the storage capacity of the ordinary internal program memories 5-1 and 5-2 and the small-capacity internal program memory 5-3, and then separately store the execution programs in them. On the other hand, the microprocessor designing program can determine and then output the memory configuration including the quantity and storage capacity of the ordinary internal program memories 5-1 and 5-2, and the small-capacity internal program memory 5-3. In this event, the hardware information of the ordinary internal program memories 5-1 and 5-2 and the small-capacity internal program memory 5-3 is prepared to be inputted in the microprocessor designing program. The hardware information in this context includes, for example, storage capacity, packaging area, and power consumption. The inputted hardware information is stored as a database in the microprocessor designing program.
The above-described processing is an example where the microprocessor designing program enables the execution program to correspond to the memory identifier according to the storage capacity information. The microprocessor designing program may enable the execution program to correspond to a memory identifier based on packaging area and power consumption or combination thereof. Specifically, the database shown in
As described above, according to the embodiments of the present invention, the computation processing unit counts the total number of accesses for each of the address areas, and outputs the execution program name in an order based on said total number. Further, based on the hardware information of the memory, the memory configuration such as quantity and storage capacity of the internal program memories can be outputted as well. From these outputted contents, the designer of the microprocessor 1 can confirm an execution program having a high execution frequency and desired memory configuration. When the designer specifies an address area so that an execution program having a high execution frequency is centered on a certain part of the memory area, each of the execution programs is stored in said specified address area by the execution program storing step. At this time, as the address area where the execution program having a high execution frequency is stored is integrated in part of the memory area, the execution programs stored in these address areas can be packaged as a whole in a internal program memory having small storage capacity. Thus, it is possible to reduce the quantity and storage capacity of the internal program memories which the computation processing unit accesses frequently, which permits to reduce the power consumed by the microprocessor. Specifically, as the designer can package the internal program memories based on the outputted memory configuration, the designer can reduce his own manpower to review the memory configuration, and design the microprocessor at a shorter period of time. Therefore, according to the embodiments of the present invention, it is possible to design a microprocessor which can be operated with low power consumption at a short period of time.
This application is based on Japanese Patent Application No. 2007-081469 which is hereby incorporated by reference.
Number | Date | Country | Kind |
---|---|---|---|
2007-081469 | Mar 2007 | JP | national |