Claims
- 1. A microcomputer equipped with a cache memory, comprising:
a process switch control circuit that includes a first register, and stores cache usage information specifying cache memory usage rules for execution of a next process in the first register every time processes to be executed are switched; and a cache control circuit that includes a second register, stores the cache usage information in the second register after the cache usage information has been stored in the first register, and performs data input and output on the cache memory in accordance with the cache memory usage rules specified by the cache usage information stored in the second register.
- 2. The microcomputer according to claim 1, further comprising a cache usage information storing register that receives and holds the cache usage information of each process to be executed,
wherein the process switch control circuit obtains the cache usage information of a next process to be executed from the cache usage information storing register, and stores the obtained cache usage information in the first register.
- 3. The microcomputer according to claim 1, wherein the cache usage information specifies whether the cache memory is to be used in execution of each process.
- 4. The microcomputer according to claim 1, wherein the cache usage information is entry lock information that specifies whether new data are allowed to be stored in the cache memory in a case where a process is being executed using the cache memory.
- 5. The microcomputer according to claim 1, wherein the process switch control circuit compares a priority level of a process being currently executed with a priority level of the next process to be executed, and, if the priority level of the next process to be executed is higher than the priority level of the process being currently executed, stores the cache usage information in the first register.
- 6. The microcomputer according to claim 1, further comprising:
a memory into or out of which the value stored in the first register is inputted or outputted every time the process switch control circuit switches processes to be executed; and a stack pointer that holds the address of the memory, and performs a subtraction or an addition on the address when the value of the first register is inputted or outputted into or out of the memory.
- 7. The microcomputer according to claim 1, wherein the first register is a part of a program status register.
- 8. A method of controlling a cache memory of a microcomputer, comprising the steps of:
storing cache usage information specifying cache memory usage rules for execution of a next process in a first register, every time processes to be executed are switched; storing the cache usage information in a second register, after the cache usage information has been stored in the first register; and performing data input and output on the cache memory in accordance with the cache memory usage rules specified by the cache usage information stored in the second register.
- 9. A microcomputer that executes a process in synchronization with a clock, comprising:
a process switch control circuit that includes a first register, and stores clock usage information specifying which clock is to be used for execution of a next process in the first register every time processes to be executed are switched; and a clock control circuit that includes a second register, stores the clock usage information in the second register after the clock usage information has been stored in the first register, and selects and outputs a clock from a plurality of clocks in accordance with the clock usage information stored in the second register.
- 10. The microcomputer according to claim 9, wherein the clock control circuit selects and outputs the clock when the plurality of clocks become synchronous after the storing of the clock usage information in the second register.
- 11. A method of controlling a clock in a microcomputer that executes a process in synchronization with a clock, the method comprising the steps of:
storing clock usage information specifying which clock is to be used for execution of a next process in a first register every time processes to be executed are switched; storing the clock usage information in a second register after the storing thereof in the first register; and outputting a clock through a clock output circuit that outputs a plurality of clocks, in accordance with the clock usage information stored in the second register.
Priority Claims (1)
Number |
Date |
Country |
Kind |
2002-057351 |
Mar 2002 |
JP |
|
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is based upon and claims the benefits of priority from the prior Japanese Patent Application No. 2002-057351, filed on Mar. 4, 2002, the entire contents of which are incorporated herein by reference.