1. Field of the Invention
The present invention relates to an execution method and architecture of firmware and, more particularly, to an execution method and architecture of multiple-program-banks firmware.
2. Description of Related art
Recently, consumer electronics, especially for devices having microprocessors such as digital still cameras (DSC), smart cards, communications devices and game machines, have become the main force for driving the growth of the semiconductor and electronic industry. Added with applications in car such as engine control and anti-braking system (ABS) and emerging applications such as electronic chip lock, global positioning system (GPS), cruise control, power window, thermostat air conditioning and electric massage chair, the usage of microprocessor gets more and more.
In the prior art, the instruction set executed by a microprocessor is a program arranged by a firmware. As shown in
Accordingly, the present invention aims to propose an execution method and architecture of multiple-program-banks firmware, which can accept external instructions to modify the content of the firmware. Moreover, the firmware program can manage itself to accomplish the optimization of program execution.
An object of the present invention is to use a storage device for storing program banks of firmware program. Because the storage address is not fixed and the storage capacity is large, the firmware program is not limited by capacity and fixed address. Therefore, firmware programs with more functions can be developed out, and high expansibility can be accomplished.
Another object of the present invention is to provide an execution method and architecture of multiple-program-banks firmware, which can accept commands of an external device via an external interface bus to modify the program content so as to make modification of firmware program easy.
Yet another object of the present invention is to provide an execution method and architecture of multiple-program-banks firmware, which can store a firmware program in different program banks with a No1 bank managing execution of the firmware program to accomplish self management of program and better execution efficiency.
The present invention proposes an execution architecture and method of multiple-program-banks firmware applied to an operation system having a microprocessor. The execution architecture of multiple-program-banks firmware comprises a common program ROM connected to the microprocessor and storing a firmware program, a memory bank connected to the microprocessor and the common program ROM and capable of temporarily storing several instruction sets, and a program bank storage device connected to the memory bank and storing several program banks. The execution method of multiple-program-banks firmware comprises the steps of: a microprocessor starting reading a firmware program stored in a common program ROM, storing firmware program banks originally stored in a program storage device into a memory bank, and the microprocessor executing the firmware program.
The various objects and advantages of the present invention will be more readily understood from the following detailed description when read in conjunction with the appended drawing, in which:
The present invention can split a firmware program executed on a computer into multiple program banks and store them into a memory bank. A No1 bank is then used to manage execution of these program banks to accomplish expansibility and self management.
As shown in
In Step S4, part of the firmware program is split into several blocks stored in the flash memory 26. The main part of the firmware program is stored in the common program ROM 20, and other part of the firmware program is separated into different functions stored in No1 bank, No. 2 bank . . . and No N bank. The No1 bank is used to manage execution of the firmware program. Moreover, the firmware program codes in the common program part include the following pseudo code:
If jump bank is registered
Jump to what bank
When jumping to another program bank like No 4 bank for execution, the execution codes stored in the No 4 bank will be transmitted from the memory bank 21 to the microprocessor 10 according to the last in first out (LIFO) or first in first out (FIFO) rule. During execution of the firmware program codes, at which program bank the program is executed will be recorded to facilitate tracking of the present program execution position.
Furthermore, the microprocessor 10 can accept commands of an external device via an external interface bus 33 to transmit new program codes from the memory bank 21 to a specified address for modifying the firmware program codes, or updated codes of the common programs are stored into the storage device through the common program RAM 22. The object of modifying program by using the same architecture can thus be accomplished to solve the problem that the firmware can't be expanded or updated in the prior art.
As shown in
Under the execution architecture of multiple-program-banks firmware shown in
To sum up, the execution architecture of firmware of the present invention arranges a firmware program into multiple blocks stored in multiple program banks and uses a No 1 bank for self management of the program. Moreover, the microprocessor can accept commands of an external device to modify the program content. Therefore, the present invention can effectively solve the problem that the firmware program has a fixed address and can't be changed in the prior art. Moreover, the present invention provides an architecture of firmware program for storing a firmware program in a nonvolatile memory. Because the storage capacity is large, the amount of program codes can be increased.
Although the present invention has been described with reference to the preferred embodiment thereof, it will be understood that the invention is not limited to the details thereof. Various substitutions and modifications have been suggested in the foregoing description, and other will occur to those of ordinary skill in the art. Therefore, all such substitutions and modifications are intended to be embraced within the scope of the invention as defined in the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
93140474 | Dec 2004 | TW | national |