The present invention relates to a microcomputer control system which is controlled on the basis of programs or data stored in memory. A control system in which an incorporated ROM can be modified in a pseudo manner is described in e.g., Japanese Published Unexamined Patent Application No. Hei 7-182153.
The control device comprises a ROM storing a control program for effecting a control procedure and a processing unit that executes the control program to control the device, and further includes a loadable and unloadable nonvolatile memory storing a replacement program to replace part of the control program and replacement specification information indicating whether to carry out the replacement, whereby the control program executes the replacement program in accordance with the replacement specification information. As a result, the program can be modified without replacing the original program ROM.
Although the above-described control device enables program modifications to be made without replacing an original program ROM, since the modifications are determined by replacement specification information stored in a nonvolatile memory, for example, when part of a control program in the original program ROM is modified to newly create an upgraded control unit and a nonvolatile memory is used therein, if the modified portion is replacement specification information, in the nonvolatile memory, for directing replacement with the replacement program, the modified portion would not be used. To prevent this requires an additional nonvolatile memory for the replacement program, provided for modifications to the control program of the program ROM.
As described above, the above-described control device has given no consideration to independent modifications between a control program in an incorporated RON and an external replacement program.
An object of the present invention is to provide a microcomputer control system which enables independent modifications between a control program or data in an incorporated memory and a replacement program or data in an external memory.
To achieve the above object, the present invention appends version information to a control program or data in an incorporated memory and to a replacement program or data in an external memory, and determines from the version information whether to use the control program or data in the incorporated memory, or the replacement program or data in the external memory.
Without being limited to the version information, the above object of the present invention is achieved by comparing a plurality of programs or pieces of data to determine required programs or data, and based on the results, using internal or external programs or data.
a) and 2(b) are labels which show the contents of information stored in the ROM and EPROM of
a) and 5(b) are diagrams showing the contents of information stored in the ROM and EPROM of
a) and 7(b) are diagrams which show the contents of information stored in the ROM and EPROM of
a) and 8(b) are diagrams which show the contents of information stored in the ROM and EPROM of
a) and 10(b) are diagrams which show the contents of information stored in the ROM and EPROM of
a) and 12(b) are diagrams which show a concrete example of the contents of information stored in the RAM of
Hereinafter, various embodiments of the present invention will be described with reference to the accompanying drawings.
In
The CPU 1 is, within the above chip, linked with the ROM 2, RAM 3, I/O part 4, and EPROM 5 via the address bus 7, which denotes an address signal group, the data bus 8, which denotes an input/output data signal group of the CPU 1, and the control bus 9, which denotes a control signal group, such as read and write signals.
a) shows the contents of information stored in the ROM 2, and
In
In
At power on or reset, the CPU 1 issues an address to specify the storage area 200 in which a reset vector of ROM 2 is stored; reads the information (namely, a reset vector) from the storage area 200, and transfers control to the reset vector (a starting address at which the first program to be operated is stored).
The first program to be executed at power on or reset initializes the internal registers of the CPU 1, sets initial conditions of the I/O unit 4, internally initializes the RAM 3, and performs other initializations (step 30).
Next, it is judged whether the EPROM 5 is connected to the outside (step 31). To be more specific, the storage area of the EPROM 5 is read to check for the existence of data. If the EPROM 5 is not connected to the outside, control is transferred to step 36; if the EPROM 5 is connected to the outside, it is judged whether the EPROM is the proper EPROM conforming to a microcomputer control system of the embodiment (step 32). This is judged by accessing identification information (identification code) (e.g., a hash value or the like generated from, e.g., character code “ΔΔΔΔ” and data and program code within the EPROM 5) stored in advance in a predetermined storage area (storage area 210 in this example) of the EPROM 5 and checking to see whether the identification information (identification code) is appropriate. If the EPROM 5 is an EPROM conforming to the microcomputer control system, control is transferred to step 36.
When the EPROM 5 is an EPROM conforming to the microcomputer control system, version information (version number a) stored in the storage area 201 of the ROM 2 is compared with version information (version number b) stored in the storage area 211 of the EPROM 5 (step 33), and if the comparison shows that the version number b of the EPROM 5 is more recent, control is transferred to step 35; if the version number a of the ROM 2 is more recent, control is transferred to step 36 (step 34).
In step 35, the task addresses (in this example, TASK1b in storage area 212 and TASK2b address in storage area 213) stored in the EPROM 5 are registered in RAM 3.
In step 36, the task addresses (in this example, TASK1a in storage area 202 and TASK2a address in storage area 203) stored in the ROM 2 are registered in RAM 3. In this case, the task addresses registered in the RAM 3 are different from those shown in
Tasks registered in the EPROM 5 or the ROM 2 are read using the task addresses registered in the RAM 3. If the task addresses registered in the RAM 3 are the TASK1b and TASK2b addresses in the EPROM 5 as shown in
Conversely, if task addresses registered in the RAM 3 are the TASK1a and TASK2a addresses in the ROM 2, TASK1 executes a TASK1a routine stored in storage area 204 of the ROM 2 and TASK2 executes a TASK2a routine stored in storage area 205 of the ROM 2. In this case, the programs and data stored in the ROM 2 are preferentially used.
Each time the programs and data stored in the ROM 2 are modified to develop an upgraded microcomputer control system, the version number a of the programs and data is updated. Therefore, even if an external EPROM 5 is used in a microcomputer control system incorporating the ROM 2 storing unmodified programs and data, if the version number a is newer than the version number b of the EPROM 5, the modified programs and data will be used. Of course, if the programs and data of external EPROM 5 are modified and the version number b thereof is newer than the version number a of programs and data in the ROM 2, the programs and data of the EPROM 5 are used. In this way, any combination of the version number a of the ROM 2 and the version number b of the EPROM 5 becomes possible and the programs and data of the ROM 2 can be modified independent of those of the EPROM 5, and regardless of such a modification, the programs and data of the ROM 2 and those of the EPROM 5 are organically linked and used.
The version number a of programs and data in the RON 2 increases to indicate a newer version in the unit of a certain block, such as 100, 200, 300, and so forth, and the version number b increases with more detailed values, such as 101, 213, 365, and so forth. This always yields a difference between the version numbers a and b, so that which of the versions is newer or older can be determined from the values of the version numbers. Should the version numbers match, the programs and data of the RON 2 could be used without trouble.
In the embodiment of
a) shows the contents of information stored in ROM 2 in a one-chip microcomputer 6 respectively another embodiment of a microcomputer control system according to the present invention, and
In
In
Also, in this embodiment, all programs and data are stored in the above format in each of the ROM 2 and EPROM 5. In the embodiment shown in
Although reset vectors, identification codes, and version numbers a and b are the same as those in the embodiment described previously, in this embodiment, when a version number b of EPROM 5 assumes a maximum value (e.g., a hexadecimal number FFFF), like the previous embodiment, all tasks execute task routines within the EPROM 5, and in other cases, an algorithm dictates that version numbers are compared for each task. Accordingly, like the previous embodiment, when the version numbers a and b are compared, a version number a of the ROM 2 can be the above maximum value minus e.g., one (e.g., a hexadecimal number FFFE), or without making such a comparison, the version number b can be read to judge whether it is equal to the above maximum value.
When a version number b of the EPRON is not a maximum value, in
Similarly, a TASK2a version number stored in storage area 504 of the ROM 2 is compared with a TASK2b version number stored in storage area 514 of the EPROM 5, and a TASK1 address of the newer version number is registered in the RAM 3. If the TASK2b version number is newer, the TASK2b address corresponding thereto is registered in the RAM 3. In this example, assuming that the TASK2a version number of the ROM 2 is newer, the TASK2a address corresponding thereto is registered in the RAM 3.
As a result, as shown in
Of course, if the TASK1a address of the ROM 2 and the TASK2b address of the EPROM 5 are registered, the TASK1a routine of the ROM 2 and the TASK2b routine of the EPROM 5 will be executed.
This embodiment is also the same as the previous embodiment, in that the programs and data of the ROM 2 can be modified independent of those of the EPROM 5 and regardless of such a modification, the programs and data of the ROM 2 and those of the EPROM 5 are organically linked and used.
In the embodiment of
By the way, since the access speed of the ROM 2 of the one-chip microcomputer 6 is generally higher than that of the external EPROM 5, the use of the ROM 2 in the one-chip microcomputer 6 is advantageous to the system.
This embodiment, as in the embodiment described with reference to
Accordingly, on the assumption that, in
In this way, by storing subroutine call instructions in the EPROM 5, if the EPROM 5 is newer and programs and data stored therein are used, the subroutines 1b, 2b, and 3b stored in the EPROM 5 are used by the subroutine 1b, 2b, and 3b call instructions stored in the EPROM 5. In the embodiment of
If the external EPROM 5 is newer, no special arrangement is necessary because the subroutine addresses of the ROM 2 are already known. However, it goes without saying that it is more desirable to store the addresses of subroutines 1a, 2a, and 3a in the ROM 2 as subroutine 1a, 2a, and 3a addresses, as in this embodiment.
As described above, in this embodiment, like the previous embodiments, the programs and data of the ROM 2 can be modified independent of those of the EPROM 5, and these can be organically liked and used. Moreover, since only modified portions of programs and data of the ROM 2 have to be stored, the storage capacity can be reduced.
In the embodiment of
a) and 8(b) show an embodiment to which storage areas 251, 252, 261, and 262 are added to the embodiment of
a) shows the contents of information stored in the ROM 2 within the one-chip microcomputer 6 representing still another embodiment of a microcomputer control system according to the present invention, and
In
In
The TASK?a routine is a task not having processing substance and the TASK?b routine is a task having processing substance. When the ROM 2 is fabricated, the system is configured so as not to run into trouble depending on the existence or absence of the TASK?a routine, but if the TASK?b routine of the EPROM 5 is added to the system, the TASK?b routine will be newly executed.
As described above, if the TASK?b routine is added, an address is registered in the RAM 3 as shown in
Of course, if it is unnecessary to newly add processing, the TASK?b routine might be registered as a task not having processing substance. Alternatively, an address (e.g., address 0) which is impossible in the system configuration might be set as a TASK?b address. The setting of an address which is impossible in the system configuration, such as the TASK?b address, although the legality of a task address must be judged each time the task is used, poses no problem in terms of system configuration because, if a set address is e.g., address 0, it can be easily determined whether a set address is 0 or not.
In the embodiment of
a) and 10(b) illustrated an embodiment to which storage areas 551, 552, 553, 561, 562, and 563 are added to the embodiment of
a) shows the contents of information stored in the ROM 2 within the one-chip microcomputer 6 in yet another embodiment of a microcomputer control system according to the present invention, and
In
In
The TASK?a routine is a task not having processing substance and the TASK?b routine is a task having processing substance. When the ROM 2 is fabricated, the system is configured so as not to run into trouble depending on the existence or absence of the TASK?a routine, but if the TASK?b routine of the ROM 2 is added to the system, the TASK?b routine will be newly executed.
As described above, if the TASK?b routine is added, an address is registered in the RAM 3 as shown in
Of course, if it is unnecessary to newly add processing, the TASK?b routine might be registered as a task not having processing substance, or the TASK?b version number might be set to an old version number (e.g., 0) to register the TASK?a routine. Alternatively, an address (e.g., address 0) which is impossible in the system configuration might be set as a TASK?b address. The setting of an address which is impossible in the system configuration as the TASK?b address, although the legality of a task address must be judged each time the task is used, poses no problem in terms of system configuration because, if a set address is e.g., address 0, it can be easily determined whether a set address is 0 or not.
In the embodiment of
The techniques in
a) and 12(b) show a method of registering to the RAM 3 which is different from that shown in
a) gives information equivalent to that in
Similarly,
It goes without saying that if all' the bits of corresponding tasks are 1 in
The embodiment of
Information from the external device 10 is transferred to the data bus 8 of the one-chip microcomputer 6 via an interface 12 and stored in the flash memory 11.
A description will be made of the processing which is different from the processing contents in
(Step 141) Confirm the connection of an external device 10. With an external device which operates to read an information recording medium, such as a CD-ROM, when an information recording medium is not mounted in the device, it is judged that no. external device is connected, because information cannot be read.
(Step 142) Read information (identification information and version information) from the external device 10 and store it in the internal RAM 3. If information (identification information and version information) is not stored in the flash memory 11, store it directly in the flash memory 11 and go to step 146.
(Step 143) Judge whether the information stored in the internal RAM 3 is proper information (identification information). As proper information, for example, a copyright indication recorded in a volume descriptor of CD-ROM can be used. For other than proper information, go to step 147, and for proper information, compare version information (version number) stored in the internal RAM 3 and version information (version number) stored in the flash memory 11 (step 144).
As a result of the comparison performed in step 142, if the version information stored in the internal RAM 3 is newer, go to step 146, and if the version information stored in the flash memory 11 is newer, go to step 147 (step 146).
(Step 146) Read information (identification information and version information) from the internal RAM 3 and store it in the flash memory 11, then additionally read a processing program (task) having a changed version from the external device 10 and additionally store it in the flash memory 11.
If the information (identification information and version information) was, in step 142, stored directly in the flash memory 11 because it had not been stored in the flash memory 11, additionally read a processing program (task) having a changed version from the external device 10 and additionally store it in the flash memory 11.
(Step 147) Terminate the processing. After this, according to the same processing procedure (replace the EPROM in
In this embodiment, as an information recording medium, there can be used pressed CD-ROM disks, DVD-ROM disks, write-once CD-R disks, DVD-R disks, erasable CD-RW disks, and DVD-RAM disks, and the use of these media would make additional operations on version changes simpler than the use of an EPROM. Although this embodiment assumes, as an external device, the use of an information reproducing device that reads information from an information recording medium such as a CD-ROM, it is apparent that the use of devices for receiving and reproducing information transferred by broadcasting or communications would not depart from the scope of the present invention.
In the embodiment of
In this case, the relationship between the internal ROM 2 and EPROM 5 in
In the embodiment of
When version information is also encrypted, it is decrypted only when it must be used for comparison, to judge whether to store it in the flash memory 11.
In the embodiment of
A flow of actual processing will be described with reference to the flowchart of
(Step 161) Read encrypted information (identification information, version information, control program, data, etc.) stored in the external flash memory 11 into the internal RAM 3.
(Step 162) Decrypt the read encrypted information and store it in the external DRAM 13.
(Step 163) Terminate the processing. After this, according to the same processing procedure (replace the EPROM in
Although the amount of data read in a single read from the flash memory 11 in step 161 is limited by the buffer capacity of the internal RAM 3, if an encryption operation can be completed within the buffer capacity, the above processing can be successfully performed by repeating steps 161 and 162 a certain number of times.
The use of encrypted information prevents the contents of the flash memory 11 from leaking to the outside, and furthermore, the decrypted information stored in the DRAM 13 is lost at power off because of a refresh operation specific to the DRAM. A processing program for decryption is stored in the internal ROM 2 so that it cannot be easily read from the outside, providing security for the system. Each, time the power is turned on, the processing of
In the embodiment of
In this case, the relationship between the internal ROM 2 and EPROM 5 in
For identical version information (where the control program or data is by nature unchanged), its contents can be made different depending on revision information (revision number). Table 1 is an embodiment showing a concrete example of this.
Table 1 shows an embodiment in which the languages used differ depending on the revision numbers.
All data corresponding to the revision numbers is provided in the EPROM 5, flash memory 11, or DRAM 13; and, when the version number is the same and only the revision number is different, only the revision number of the control program or data stored in the EPROM 5, flash memory 11, or DRAM 13 has to be changed.
However, an algorithm for changing the language to be used, depending on the revision number, must be incorporated in the control program.
Although Table 1 uses revision numbers to identify languages, the revision numbers can also be used to identify countries (Japan, the United States, Chinese, etc.) to use the system, functions (function A, function A+B, etc.) and users (for company A use, for company B use, etc.).
When the above embodiments are used by users for their individual uses, with the microcomputer 6 standardized (programs and data stored in the ROM 2 are standardized), the embodiments can be customized for each user by the external EPROM 5, flash memory 11, or DRAM 13. In this case, as shown in
In the above embodiments, although a description has been made of the updating of processing, programs (tasks and subroutines) in the ROM 2 and external EPROM 5 within the one-chip microcomputer 6, it is apparent that the updating of data stored in the ROM 2 can be supported by the EPRON 5, flash memory 1, or DRAM 13.
Furthermore, in the above embodiments, although a non-erasable mask ROM has been used as a, ROM 2, a memory such as an erasable EPROM and a flash memory might also be used, and although an erasable EPROM memory, flash memory 11, or DRAM 13 has been used as an external memory, a non-erasable mask ROM might also be used.
In the above embodiments, although the addresses of programs (tasks and subroutines) to be executed have been registered in the RAM 2 of the one-chip microcomputer 6, the programs (tasks and subroutines) themselves to be executed, as well as the addresses, could alternatively be registered as items of information to be registered. Also, in a RAM, flash memory, DRAM, etc., the addresses of programs (tasks and subroutines) and the programs (tasks and subroutines) themselves to be executed can be registered. Such a RAM, flash memory, DRAM, etc., is connected external of the one-chip microcomputer 6.
Although version information is used in the foregoing description of the embodiments according to the present invention, programs, data information, and the like can be used for comparison without being confined to version information. For example, there can be used comment statements, copyright indication, program size, data size, program starting address, data starting address, and other information within programs or data.
As has been described below, according to the present invention, since a version number in a ROM within a one-chip microcomputer is compared with a version number in an external EPROM, flash memory, or DRAM, programs (tasks and subroutines) of a new version can always be executed and update data of a new version can be used. Also, the programs can be customized for each user.
Also, since only programs or data to be updated or modified is added to the outside, the programs or data to be added can be brought into a minimum size.
Since information in programs or data as well as version information can be used for comparison, version information can be made useless.
Number | Date | Country | Kind |
---|---|---|---|
P8-319558 | Nov 1996 | JP | national |
The present application is a continuation of application Ser. No. 09/308,578, filed May 21, 1999 now U.S. Pat. No. 6,496,978 which is a continuation of under 371 of PCT/JP97/03338, filed Sep. 9, 1997, the contents of which are incorporated herein by reference.
Number | Name | Date | Kind |
---|---|---|---|
5359730 | Marron | Oct 1994 | A |
5473540 | Schmitz | Dec 1995 | A |
5732275 | Kullick et al. | Mar 1998 | A |
5771348 | Kubatzki et al. | Jun 1998 | A |
5828888 | Kozaki et al. | Oct 1998 | A |
5878256 | Bealkowski et al. | Mar 1999 | A |
5881292 | Sigal et al. | Mar 1999 | A |
5930504 | Gabel | Jul 1999 | A |
6006034 | Heath et al. | Dec 1999 | A |
6067500 | Morimoto et al. | May 2000 | A |
6496978 | Ito | Dec 2002 | B1 |
20040003266 | Moshir et al. | Jan 2004 | A1 |
Number | Date | Country |
---|---|---|
4242430 | Aug 1992 | JP |
5233267 | Sep 1993 | JP |
6314190 | Nov 1994 | JP |
7248914 | Sep 1995 | JP |
7319684 | Dec 1995 | JP |
8272601 | Oct 1996 | JP |
Number | Date | Country | |
---|---|---|---|
20030033598 A1 | Feb 2003 | US |
Number | Date | Country | |
---|---|---|---|
Parent | 09308578 | May 1999 | US |
Child | 10268721 | US | |
Parent | PCT/JP97/03338 | Sep 1997 | US |
Child | 09308578 | US |