JPH11338687A - Program rewriting system - Google Patents

Program rewriting system

Info

Publication number
JPH11338687A
JPH11338687A JP14337198A JP14337198A JPH11338687A JP H11338687 A JPH11338687 A JP H11338687A JP 14337198 A JP14337198 A JP 14337198A JP 14337198 A JP14337198 A JP 14337198A JP H11338687 A JPH11338687 A JP H11338687A
Authority
JP
Japan
Prior art keywords
program
host system
cpu
bus
rewriting
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP14337198A
Other languages
Japanese (ja)
Inventor
Masashi Ueki
正史 植木
Satoshi Tamae
敏 田前
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP14337198A priority Critical patent/JPH11338687A/en
Publication of JPH11338687A publication Critical patent/JPH11338687A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To easily rewrite a program of an extension unit without exerting influences on the operations of a host system and of other extension units. SOLUTION: This system easily rewrites memory contents without exerting influences on the operations of a host system and of other extension units by such manners that the operation of a CPU is stopped from a host system 10 through a bus interface 24 and in the meantime, a nonvolatile flash ROM 22 is directly accessed and program contents stored in the ROM 22 are rewritten.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、プログラム書換シ
ステムに係り、さらに詳しくは、ホストシステムに対し
て拡張バスを介して接続された拡張ユニット内のメモリ
に格納されたプログラム内容を書き換えるプログラム書
換システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program rewriting system, and more particularly, to a program rewriting system for rewriting a program stored in a memory in an extension unit connected to a host system via an extension bus. About.

【0002】[0002]

【従来の技術】従来より、パーソナルコンピュータ(以
下、パソコンと略称する)やワークステーション等から
なるホストシステムに対して、拡張バスを介して任意の
拡張ユニットを接続することにより、ホストシステムに
対して拡張すべき機能を実現していた。
2. Description of the Related Art Conventionally, an arbitrary extension unit is connected to a host system including a personal computer (hereinafter, abbreviated as a personal computer), a workstation, and the like via an extension bus. The functions to be extended were realized.

【0003】例えば、図9は、ホストシステムに複数の
拡張ユニットを接続した従来のシステム構成図を示した
もので、同図において、ホストシステム100は、デー
タや電源等を供給する拡張バス102を介して、複数の
拡張ユニット104、106が接続されており、各拡張
ユニットはホストシステム100に拡張すべき機能を実
現している。
For example, FIG. 9 shows a conventional system configuration diagram in which a plurality of expansion units are connected to a host system. In FIG. 9, a host system 100 includes an expansion bus 102 for supplying data, power and the like. A plurality of extension units 104 and 106 are connected via the extension unit, and each extension unit realizes a function to be extended to the host system 100.

【0004】図9に示される拡張ユニット106内に
は、拡張バス規格に基づいて動作するバスインターフェ
イス116を持っており、拡張バス102を介してホス
トシステム100との間で通信を行うものである。そし
て、その他の構成としては、拡張ユニット106の動作
の中心となって制御を行うCPU110と、そのCPU
110に供給するプログラムを格納する不揮発性メモリ
などからなるROM112、CPU110のワークメモ
リとして利用するRAM114などにより構成されてい
る。
[0006] The expansion unit 106 shown in FIG. 9 has a bus interface 116 that operates according to the expansion bus standard, and communicates with the host system 100 via the expansion bus 102. . As other configurations, the CPU 110 that performs control as the center of the operation of the extension unit 106, and the CPU 110
The ROM 110 includes a non-volatile memory for storing a program to be supplied to the CPU 110, a RAM 114 used as a work memory of the CPU 110, and the like.

【0005】拡張ユニット106におけるプログラム
(ファームウェア)は、ユニット内のROM112に格
納されるのが一般的であるが、このプログラム内容の誤
り、機能変更、バージョンアップなどによってプログラ
ム内容を変更させる必要が発生することがある。このた
め、拡張ユニット106内のROM112には、フラッ
シュEEPROMなどの書換え可能な不揮発性メモリを
使用することが行われている。
The program (firmware) in the expansion unit 106 is generally stored in the ROM 112 in the unit. However, it is necessary to change the program contents due to an error in the contents of the program, a change in function, or an upgrade. May be. For this reason, a rewritable nonvolatile memory such as a flash EEPROM is used as the ROM 112 in the extension unit 106.

【0006】また、図10は、ホストシステムが拡張バ
スを介して接続されている拡張ユニット内部のROMの
メモリ内容を書換える場合に使用するシステム構成図を
示したもので、同図において、拡張ユニット130に設
けられたROM書込み用コネクタ134を介してROM
112にデータ書込むためのROM書込み用外部装置1
32が接続されていて、ROM112のデータの書換え
が行われる。ROM112は、ROM書込み用コネクタ
134を介して電源、アドレス信号、データ信号及び書
込み信号等をROM書込み用外部装置132から得るこ
とができる。
FIG. 10 shows a system configuration diagram used when the host system rewrites the memory contents of the ROM in the expansion unit connected via the expansion bus. ROM via a ROM writing connector 134 provided in the unit 130
ROM writing external device 1 for writing data to 112
32 is connected, and the data in the ROM 112 is rewritten. The ROM 112 can obtain a power supply, an address signal, a data signal, a write signal, and the like from the ROM write external device 132 via the ROM write connector 134.

【0007】そして、ROM112のデータを書換える
場合は、信号の衝突を避けるために、CPU110のR
OM112に対するアクセスを禁止しなければならない
が、ROM112がCPU110に直接接続されている
ような単純な回路の場合、ROM112のバスをフロー
トするため、拡張ユニット116の電源を落とす方法が
とられている。すなわち、拡張ユニット116への電源
がホストシステム100から供給されている図10に示
すようなシステムでは、拡張ユニット116の電源を落
とすためにホストシステム100の電源も落さなければ
ならず、システム全体が機能を停止してしまう。
When the data in the ROM 112 is rewritten, the R of the CPU 110 is used to avoid signal collision.
Although access to the OM 112 must be prohibited, in the case of a simple circuit in which the ROM 112 is directly connected to the CPU 110, a method of turning off the power of the extension unit 116 is used to float the bus of the ROM 112. That is, in the system as shown in FIG. 10 in which the power to the expansion unit 116 is supplied from the host system 100, the power of the host system 100 must also be turned off in order to turn off the power of the expansion unit 116. Stops functioning.

【0008】このように、システム全体の電源を切断し
た場合は、拡張ユニット104はホストシステム100
からの電源供給を失ってしまい、内部の全ての回路が動
作を停止する。しかし、拡張ユニット130において、
ROM書込み用外部装置132から供給される電源は、
拡張ユニットの電源に電流が流れ込まない回路構成とな
っているため、ROM112のみに供給されるが、拡張
ユニット130内部の他の回路は動作させない。
As described above, when the power of the entire system is turned off, the expansion unit 104
The power supply from the power supply is lost, and all the internal circuits stop operating. However, in the extension unit 130,
The power supplied from the ROM writing external device 132 is
Since the circuit configuration is such that no current flows into the power supply of the extension unit, it is supplied only to the ROM 112, but other circuits inside the extension unit 130 are not operated.

【0009】そして、ROM書込み用外部装置132が
使用するアドレスバスやデータバスは、CPU110が
使用するものと共用であるが、ROM書込み用外部装置
132とROM112以外の回路は電源が切断されてい
るため、ROM書込み用外部装置132以外の回路は信
号を出力しない。これによって、信号の衝突を回避しつ
つROM112のメモリ内容の書換えが行われていた。
The address bus and the data bus used by the ROM writing external device 132 are shared with those used by the CPU 110, but the circuits other than the ROM writing external device 132 and the ROM 112 are powered off. Therefore, circuits other than the ROM writing external device 132 do not output signals. As a result, the content of the memory of the ROM 112 is rewritten while avoiding signal collision.

【0010】さらに、ホストシステム及び拡張ユニット
の電源を落とさずに、ホストシステムに接続した状態で
プログラムの書換えを行う方法としては、例えば、特開
平8−194621号公報に示されるようなダウンロー
ド装置がある。
Further, as a method of rewriting a program in a state of being connected to the host system without turning off the power of the host system and the extension unit, for example, a download apparatus as disclosed in Japanese Patent Application Laid-Open No. 8-194621 is disclosed. is there.

【0011】図11は、この特開平8−194621号
公報で開示されたダウンロード装置のブロック図を示し
たものである。図11において、CPU140は、シス
テムの中枢的な機能を果たす回路装置であり、バス15
4を通じて各種装置が相互に接続されている。ROM1
48は、システム起動用のプログラムや各種固定的なデ
ータを格納するメモリである。バンクメモリ回路150
は、その記憶領域全体が図12に示されるように、バン
ク1とバンク2の2つの領域に区分けされており、これ
らのアドレス配置がバンク切替回路152によって相互
に入れ替え可能なメモリを構成している。
FIG. 11 is a block diagram of a download apparatus disclosed in Japanese Patent Application Laid-Open No. 8-194621. In FIG. 11, a CPU 140 is a circuit device that performs a central function of the system.
Various devices are connected to each other through 4. ROM1
Reference numeral 48 denotes a memory for storing a system startup program and various fixed data. Bank memory circuit 150
As shown in FIG. 12, the entire storage area is divided into two areas, bank 1 and bank 2, and these address arrangements constitute a memory that can be interchanged by the bank switching circuit 152. I have.

【0012】このバンクメモリ回路150の2つのメモ
リ領域は、それぞれプログラムメモリ(ファーム領域1
68)及びワークメモリ(ワーク領域166)として使
用される。バンク切替回路152は、CPU140の出
力ポートから出力される所定のバンクセレクト信号に応
じて、バンクメモリ回路150におけるバンク1とバン
ク2のアドレス配置を入れ替えるようになっている。
The two memory areas of the bank memory circuit 150 are respectively programmed memory (firm area 1).
68) and a work memory (work area 166). The bank switching circuit 152 switches the address arrangement of the bank 1 and the bank 2 in the bank memory circuit 150 in accordance with a predetermined bank select signal output from the output port of the CPU 140.

【0013】上位インターフェイス部142は、ダウン
ロードを行うプログラムの供給源である図示しない上位
装置との間でインターフェイスを行う回路装置である。
フラッシュEEPROM146は、書込みが可能な不揮
発性メモリであって、不図示の上位装置からダウンロー
ドされたプログラムを保存するものである。また、バン
クメモリ回路150とフラッシュEEPROM146
は、ローカルバス156によって結ばれており、転送制
御回路144によってCPU140の動作に影響するこ
となくバンクメモリ回路150に格納されたプログラム
をフラッシュEEPROM146に転送するものであ
る。
The higher-level interface unit 142 is a circuit device that interfaces with a higher-level device (not shown) that is a supply source of a program to be downloaded.
The flash EEPROM 146 is a writable nonvolatile memory and stores a program downloaded from a higher-level device (not shown). Also, the bank memory circuit 150 and the flash EEPROM 146
Are connected by a local bus 156, and transfer a program stored in the bank memory circuit 150 to the flash EEPROM 146 by the transfer control circuit 144 without affecting the operation of the CPU 140.

【0014】図12は、上記した特開平8−19462
1号公報に開示されているダウンロード装置におけるア
ドレス空間の配置を示したものである。このアドレス空
間には、図11のROM148とバンクメモリ回路15
0とが割り当てられ、バンクメモリがワーク領域166
とファーム領域168とに分けられている。ワーク領域
166は、ファームウェアを実行する上で必要なデータ
を一時的に格納する領域であり、ファーム領域168
は、実行時にCPU140の参照するファームウェアを
格納するための領域である。
FIG. 12 shows the above-mentioned JP-A-8-19462.
1 shows an arrangement of an address space in a download device disclosed in Japanese Patent Application Publication No. JP-A-2005-11095. In this address space, the ROM 148 and the bank memory circuit 15 shown in FIG.
0, and the bank memory is allocated to the work area 166.
And a firmware area 168. The work area 166 is an area for temporarily storing data necessary for executing the firmware.
Is an area for storing firmware referred to by the CPU 140 during execution.

【0015】バンクメモリ回路150は、バンク切替回
路152によってバンク1とバンク2のアドレス配置を
入れ替えることにより、ワーク領域166とファーム領
域168の内容を瞬時に入れ替えることができる。
The bank memory circuit 150 can instantaneously exchange the contents of the work area 166 and the firmware area 168 by exchanging the address arrangement of the bank 1 and the bank 2 by the bank switching circuit 152.

【0016】そして、CPU140は、上位装置からダ
ウンロードされるファームウェアをその時点でワーク領
域166に配置されているバンクに格納する。データの
ダウンロードが全て完了した後、CPU140は転送制
御回路144を起動してワーク領域166に格納されて
いるファームウェアをフラッシュEEPROM146に
複写する。このデータ転送はローカルバス156を通じ
て行なわれるため、CPU140はファーム領域168
のプログラムを実行して他の処理を実行する。転送制御
回路144によるデータ転送が終了した場合、CPU1
40はバンク切替回路152にセレクト信号を出力して
バンクメモリの切替を行う。これにより、ワーク領域1
66とファーム領域168の内容が入れ替わって、CP
U140は更新後のファームウェアに基づいて処理が進
められる。
Then, the CPU 140 stores the firmware downloaded from the higher-level device in the bank currently arranged in the work area 166. After all data download is completed, the CPU 140 activates the transfer control circuit 144 and copies the firmware stored in the work area 166 to the flash EEPROM 146. Since this data transfer is performed through the local bus 156, the CPU 140
To execute other processing. When the data transfer by the transfer control circuit 144 ends, the CPU 1
Reference numeral 40 outputs a select signal to the bank switching circuit 152 to switch bank memories. Thereby, work area 1
66 and the contents of the firmware area 168 are switched, and the CP
In U140, the process proceeds based on the updated firmware.

【0017】また、この種のプログラム書換システムに
関する従来例としては、例えば、特開平9−21878
1号公報、あるいは特開平9−218788号公報など
に開示されたものがある。
A conventional example of this type of program rewriting system is disclosed in, for example, Japanese Patent Application Laid-Open No. 9-21878.
No. 1, Japanese Patent Application Laid-Open No. 9-218788, and the like.

【0018】[0018]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のプログラム書換システムにあっては、図10
に示すような、拡張バス102に接続された拡張ユニッ
ト130のROM112の内容を書き換える場合、ホス
トシステム100から供給される電源を落として、別に
用意したROM書込み用外部装置132により書込みを
行う必要があるため、ホストシステム100の動作や、
拡張バス102に接続されている他の全ての拡張ユニッ
トの動作を停止しなければならず、システム全体がダウ
ンするとともに、ROM書込み用外部装置132が別途
必要になるという問題があった。
However, in such a conventional program rewriting system, FIG.
When the contents of the ROM 112 of the expansion unit 130 connected to the expansion bus 102 are rewritten as shown in FIG. 1, it is necessary to turn off the power supplied from the host system 100 and perform writing by using a separately prepared external device 132 for ROM writing. Therefore, the operation of the host system 100,
The operation of all the other extension units connected to the extension bus 102 must be stopped, which causes a problem that the whole system is down and the ROM writing external device 132 is additionally required.

【0019】また、図11に示すように、ホストシステ
ムの電源及び拡張ユニットの電源を落とさずにメモリに
格納されたプログラム内容を書き換える方式では、プロ
グラムを書き換えている間、CPU140が実行するプ
ログラムを格納しておくメモリ領域を別に用意する必要
がある。従って、本来のプログラムメモリと、一時的に
プログラムを格納するワークメモリとを切り替える機構
と、複数のメモリと、ワークメモリの内容をフラッシュ
EEPROM146に転送する転送制御回路144とが
必要になり、システム構成が複雑になるという問題があ
った。
As shown in FIG. 11, in the method of rewriting the contents of the program stored in the memory without turning off the power of the host system and the power of the extension unit, the program executed by the CPU 140 during the rewriting of the program is executed. It is necessary to prepare a separate memory area for storing. Therefore, a mechanism for switching between an original program memory and a work memory for temporarily storing a program, a plurality of memories, and a transfer control circuit 144 for transferring the contents of the work memory to the flash EEPROM 146 are required. Was complicated.

【0020】また、図11に示した従来技術の場合に
は、プログラムを上位システムからダウンロードする際
に、CPU140が本来の作業を中断してダウンロード
作業を行う必要があり、メモリ容量もプログラムの格納
に必要な容量の2倍以上が必要になる上、起動用ROM
を書き換える必要が生じても書換えることができないと
いう問題があった。
In the case of the prior art shown in FIG. 11, when a program is downloaded from a host system, the CPU 140 needs to interrupt the original work and perform the download work, and the memory capacity is not large enough to store the program. More than twice the capacity required for
However, there is a problem that even if it is necessary to rewrite, it cannot be rewritten.

【0021】さらに、上記した特開平9−218781
号公報、あるいは特開平9−218788号公報などで
は、ロードされたプログラムを一旦別の記憶部に格納し
たり、予備のメモリに書込むものであったため、余分な
記憶領域やメモリを別に用意しなくてはならないという
問題があった。
Further, the above-mentioned Japanese Patent Application Laid-Open No. 9-218781
In Japanese Unexamined Patent Application Publication No. 9-218788 and the like, the loaded program is temporarily stored in another storage unit or written in a spare memory, so that an extra storage area or memory is separately prepared. There was a problem that must be.

【0022】本発明は、上記に鑑みてなされたもので、
ホストシステムの動作や拡張バスに接続された他の拡張
ユニットの動作に影響を与えることなく、拡張ユニット
のプログラム内容を容易に書き換えることが可能であっ
て、ホストシステムや拡張ユニットの停止時間を短縮す
ることができるプログラム書換システムを得ることを目
的とする。
The present invention has been made in view of the above,
The program contents of the expansion unit can be easily rewritten without affecting the operation of the host system or the operation of other expansion units connected to the expansion bus, reducing the downtime of the host system or the expansion unit It is an object to obtain a program rewriting system that can perform the program.

【0023】[0023]

【課題を解決するための手段】上記目的を達成するため
に、この発明に係るプログラム書換システムにあって
は、ホストシステムに対して拡張バスを介して接続され
る拡張ユニット内に格納されたプログラムの書き換えを
行うプログラム書換システムにおいて、前記拡張ユニッ
トには、該拡張ユニット内を制御するCPUと、前記C
PUで実行されるプログラムを格納する書き換え可能な
不揮発性メモリと、前記ホストシステムから前記不揮発
性メモリにアクセスするとともに、前記ホストシステム
から前記CPUへリセット出力が可能なインターフェイ
ス回路と、を有し、前記ホストシステムが前記CPUを
動作停止状態としている間に前記不揮発性メモリに直接
アクセスして、前記不揮発性メモリに格納されたプログ
ラム内容を書き換えるものである。
In order to achieve the above object, in a program rewriting system according to the present invention, a program stored in an extension unit connected to a host system via an extension bus is provided. In the program rewriting system for rewriting a program, the extension unit includes a CPU for controlling the inside of the extension unit,
A rewritable nonvolatile memory for storing a program to be executed by a PU, and an interface circuit capable of accessing the nonvolatile memory from the host system and performing a reset output from the host system to the CPU, The host system directly accesses the non-volatile memory while the CPU is in an operation stop state, and rewrites a program stored in the non-volatile memory.

【0024】これによれば、ホストシステムがプログラ
ムの書き換えを行う拡張ユニットのCPUを動作停止状
態として、その間に不揮発性メモリに直接アクセスし
て、その不揮発性メモリに格納されているプログラム内
容を書き換えるようにしたため、ホストシステムや拡張
バスに接続された他の拡張ユニットの動作に影響を与え
ることなく、拡張ユニットのプログラム内容を容易に書
き換えることが可能となり、ホストシステムや拡張ユニ
ットを停止させる時間も短縮することができる。
According to this, the host system puts the CPU of the extension unit, which rewrites the program, into an operation halt state, during which the non-volatile memory is directly accessed to rewrite the program contents stored in the non-volatile memory. This makes it possible to easily rewrite the program contents of the expansion unit without affecting the operation of the host system and other expansion units connected to the expansion bus, and to reduce the time to stop the host system and the expansion unit can do.

【0025】つぎの発明に係るプログラム書換システム
にあっては、前記発明におけるインターフェイス回路
は、割込み信号によって前記ホストシステムへの割込み
を発生させる信号処理回路と、前記ホストシステムから
の要求に基づいて前記CPUを動作停止状態とするリセ
ットシーケンス回路と、前記リセットシーケンス回路か
らのセレクト信号により前記不揮発性メモリに接続され
るバスを前記ホストシステムあるいは前記CPUのうち
一方に切り替えるバスセレクタと、を有し、前記ホスト
システムは前記リセットシーケンス回路により前記CP
Uを動作停止状態とし、前記バスセレクタにより前記不
揮発性メモリに接続されたバスをホストシステムに接続
して、前記不揮発性メモリに格納されているプログラム
内容を書き換えるものである。
In the program rewriting system according to the next invention, the interface circuit according to the invention includes a signal processing circuit for generating an interrupt to the host system by an interrupt signal, and the signal processing circuit based on a request from the host system. A reset sequence circuit that causes the CPU to stop operating, and a bus selector that switches a bus connected to the nonvolatile memory to one of the host system or the CPU by a select signal from the reset sequence circuit, The host system operates the CP by the reset sequence circuit.
U is brought into an operation stop state, the bus connected to the nonvolatile memory by the bus selector is connected to the host system, and the contents of the program stored in the nonvolatile memory are rewritten.

【0026】これによれば、前記ホストシステムは、リ
セットシーケンス回路によってCPUを動作停止状態と
し、バスセレクタによって不揮発性メモリに接続された
バスをホストシステムに接続して、不揮発性メモリに格
納されているプログラム内容を書き換えるようにしたた
め、ホストシステムや他の拡張ユニットの動作に影響を
与えることなく、不揮発性メモリの内容を容易に書き換
えることができ、ホストシステムや拡張ユニットを停止
させる時間を短縮することができる。
According to this, the host system stops the operation of the CPU by the reset sequence circuit, connects the bus connected to the nonvolatile memory by the bus selector to the host system, and stores the bus in the nonvolatile memory. The contents of the non-volatile memory can be easily rewritten without affecting the operation of the host system and other expansion units, thereby reducing the time for stopping the host system and the expansion units. be able to.

【0027】つぎの発明に係るプログラム書換システム
にあっては、ホストシステムに対して拡張バスを介して
接続される拡張ユニット内に格納されたプログラムの書
き換えを行うプログラム書換システムにおいて、前記拡
張ユニットには、該拡張ユニット内を制御するCPU
と、前記CPUで実行されるプログラムを格納する書き
換え可能な不揮発性メモリと、前記ユニット本体の動作
時に前記不揮発性メモリに格納されたプログラム内容を
転送して実行する実行用メモリと、前記ホストシステム
から前記不揮発性メモリにアクセスするとともに、前記
ホストシステムから前記CPUへリセット出力が可能な
インターフェイス回路と、を有し、前記ホストシステム
が前記不揮発性メモリに直接アクセスして、前記不揮発
性メモリに格納されているプログラム内容を書き換える
ものである。
In a program rewriting system according to the next invention, in a program rewriting system for rewriting a program stored in an expansion unit connected to a host system via an expansion bus, Is a CPU that controls the inside of the expansion unit
A rewritable nonvolatile memory for storing a program to be executed by the CPU, an execution memory for transferring and executing program contents stored in the nonvolatile memory when the unit body operates, And an interface circuit capable of accessing the nonvolatile memory from the host system and capable of outputting a reset from the host system to the CPU, wherein the host system directly accesses the nonvolatile memory and is stored in the nonvolatile memory. It rewrites the contents of the program.

【0028】これによれば、ホストシステムが不揮発性
メモリに直接アクセスして、前記不揮発性メモリに格納
されているプログラム内容を書き換えるようにしたた
め、ホストシステム、拡張バスに接続された他の拡張ユ
ニット及びプログラムの書き換えを行っている拡張ユニ
ットの動作に影響を与えることなく、拡張ユニットのプ
ログラム内容を容易に書き換えることが可能となり、ホ
ストシステムや拡張ユニットを停止させる時間も短縮す
ることができる。
According to this, since the host system directly accesses the non-volatile memory and rewrites the program contents stored in the non-volatile memory, the host system, other expansion units connected to the expansion bus, and The program contents of the extension unit can be easily rewritten without affecting the operation of the extension unit that is rewriting the program, and the time for stopping the host system and the extension unit can be reduced.

【0029】つぎの発明に係るプログラム書換システム
にあっては、前記発明におけるインターフェイス回路
は、割込み信号によって前記ホストシステムへの割込み
を発生させる信号処理回路と、前記ホストシステムから
の要求に基づいて前記CPUを動作停止状態とするリセ
ットシーケンス回路と、前記不揮発性メモリに接続され
るバスを前記ホストシステムあるいは前記CPUのうち
一方に切り替えるバスセレクタと、前記バスセレクタの
切替制御を行うバス切替制御回路と、を有し、前記不揮
発性メモリに格納されたプログラムを実行用メモリに転
送終了後、前記バス切替制御回路によりバスセレクタを
切換えて前記不揮発性メモリに接続されたバスをホスト
システムに接続して、前記不揮発性メモリに格納されて
いるプログラム内容を書き換えるものである。
In the program rewriting system according to the next invention, the interface circuit according to the invention comprises a signal processing circuit for generating an interrupt to the host system by an interrupt signal, and the signal processing circuit based on a request from the host system. A reset sequence circuit for stopping a CPU, a bus selector for switching a bus connected to the nonvolatile memory to one of the host system and the CPU, and a bus switching control circuit for performing switching control of the bus selector. After the transfer of the program stored in the nonvolatile memory to the execution memory is completed, the bus switching control circuit switches a bus selector to connect the bus connected to the nonvolatile memory to the host system. , Program contents stored in the non-volatile memory It is intended to be rewritten.

【0030】これによれば、ホストシステム、他の拡張
ユニット及びプログラムの書き換えを行っている拡張ユ
ニットの動作に影響を与えることなく、不揮発性メモリ
の内容を容易に書き換えることができ、ホストシステム
や拡張ユニットを停止させる時間を短縮することができ
る。
According to this, the contents of the non-volatile memory can be easily rewritten without affecting the operation of the host system, other extension units, and the extension units that are rewriting the program. The time for stopping the extension unit can be reduced.

【0031】[0031]

【発明の実施の形態】以下、この発明に係るプログラム
書換システムの実施の形態を図面に基づいて詳細に説明
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments of a program rewriting system according to the present invention will be described below in detail with reference to the drawings.

【0032】実施の形態1.図1は、本実施の形態1に
おける拡張ユニットのプログラム書換システムを説明す
る図であり、ホストシステムに複数の拡張ユニットが接
続されたシステム全体の構成図を示したものである。本
実施の形態1では、図1における拡張ユニット16の構
成に特徴があるが、それ以外のホストシステム10、拡
張バス12及び他の拡張ユニット14については従来例
(図9に示した対応する構成)と同様であるため、説明
を省略する。
Embodiment 1 FIG. 1 is a diagram for explaining a program rewriting system of an extension unit according to the first embodiment, and shows a configuration diagram of an entire system in which a plurality of extension units are connected to a host system. The first embodiment is characterized by the configuration of the expansion unit 16 in FIG. 1, but the other parts of the host system 10, the expansion bus 12, and the other expansion units 14 are the same as those of the conventional example (the corresponding configuration shown in FIG. 9). ) Is the same as that of FIG.

【0033】拡張ユニット16は、フラッシュROM2
2に格納されたプログラムをCPU20が実行すること
によって動作するユニットであって、CPU20からフ
ラッシュROM22を見た場合、リード・オンリー・メ
モリ(ROM)として見ることができる。バスインター
フェイス24は、ホストシステム10と拡張ユニットと
のインターフェイス機能を果たす回路であり、拡張バス
12を介してホストシステム10との間で通信を行うこ
とができる。また、バスインターフェイス24は、ホス
トシステム10の要求によってCPU20をリセットす
る機能を持っている。
The extension unit 16 is a flash ROM 2
When the flash ROM 22 is viewed from the CPU 20, the flash ROM 22 can be viewed as a read-only memory (ROM). The bus interface 24 is a circuit that performs an interface function between the host system 10 and the extension unit, and can communicate with the host system 10 via the extension bus 12. Further, the bus interface 24 has a function of resetting the CPU 20 in response to a request from the host system 10.

【0034】図2は、図1のバスインターフェイス24
内の詳細な回路構成を説明する図である。図2におい
て、バスインターフェイス24は、拡張バス信号処理回
路30、バスセレクタ32、リセットシーケンス回路3
4、I/Oポート36、38などにより構成されてい
る。拡張バス信号処理回路30は、フラッシュROM2
2とI/Oポート36をホストシステム10のアドレス
空間上にマップし、割込み信号42によってホストシス
テム10への割込みを発生させる信号処理回路である。
バスセレクタ32は、フラッシュROM22に接続する
バス40を、ホストシステム10、あるいはCPU20
のうち一方に切り替える動作を行うものである。
FIG. 2 shows the bus interface 24 of FIG.
FIG. 2 is a diagram illustrating a detailed circuit configuration in FIG. 2, the bus interface 24 includes an extended bus signal processing circuit 30, a bus selector 32, and a reset sequence circuit 3.
4, I / O ports 36, 38, etc. The expansion bus signal processing circuit 30 is a flash ROM 2
2 is a signal processing circuit that maps the I / O port 36 to the address space of the host system 10 and generates an interrupt to the host system 10 by the interrupt signal 42.
The bus selector 32 connects the bus 40 connected to the flash ROM 22 to the host system 10 or the CPU 20.
The operation is performed to switch to one of them.

【0035】リセットシーケンス回路34は、ホストシ
ステム10からの要求があるとCPU20のリセット処
理を行うシーケンス回路であり、CPUのリセット要求
通知用のI/Oポート36、CPUのリセット許可通知
用のI/Oポート38、ホストシステム10に対するR
OM書込み許可割込み42、CPUに対するリセット通
知割込み44をそれぞれ用いて、CPU20のリセット
処理と、ROM22のプログラムの書換えタイミングと
を調整するようにする。また、48は後述するバスセレ
クト信号である。
The reset sequence circuit 34 is a sequence circuit for performing a reset process of the CPU 20 when there is a request from the host system 10. / O port 38, R for host system 10
The reset processing of the CPU 20 and the rewriting timing of the program in the ROM 22 are adjusted using the OM write permission interrupt 42 and the reset notification interrupt 44 for the CPU, respectively. Reference numeral 48 denotes a bus select signal described later.

【0036】図3は、本実施の形態1のフラッシュRO
M22におけるプログラム書換え処理の流れを説明する
フローチャートである。まず、ホストシステム10で
は、拡張ユニット16のフラッシュROM22の書換え
処理が開始されると、CPU20の動作を停止させて、
フラッシュROM22のバス40をホストシステム側に
切り換えるため、I/Oポート36をセットして、バス
インターフェイス24に対してCPU20へのリセット
を要求する(ステップS100)。
FIG. 3 shows a flash RO according to the first embodiment.
It is a flowchart explaining the flow of the program rewriting process in M22. First, in the host system 10, when the rewriting process of the flash ROM 22 of the extension unit 16 is started, the operation of the CPU 20 is stopped, and
In order to switch the bus 40 of the flash ROM 22 to the host system side, the I / O port 36 is set, and the bus interface 24 is requested to reset the CPU 20 (step S100).

【0037】バスインターフェイス24では、CPU2
0のリセット要求を受けると(ステップS200)、リ
セットシーケンス回路34がCPU20への割り込みを
発生し(ステップS202)、CPU20へリセット通
知を行う(ステップS202)。CPU20は、リセッ
ト通知割込みを検出すると(ステップS300)、現在
実行中の処理を中断して、リセットがかかってもデータ
の不整合が起きない状態とし(ステップS302)、I
/Oポート38をセットして、バスインターフェイス2
4に対してリセット許可を通知する(ステップS30
4)。
In the bus interface 24, the CPU 2
When a reset request of 0 is received (step S200), the reset sequence circuit 34 generates an interrupt to the CPU 20 (step S202) and notifies the CPU 20 of a reset (step S202). When the CPU 20 detects the reset notification interrupt (step S300), it interrupts the process currently being executed and sets a state where no data inconsistency occurs even if the reset is applied (step S302).
I / O port 38 is set and bus interface 2
4 is notified of reset permission (step S30).
4).

【0038】バスインターフェイス24のリセットシー
ケンス回路34では、I/Oポート38へのアクセスに
よりリセット許可を検出すると(ステップS204)、
CPU20に対してリセット(動作停止)を発生させる
とともに(ステップS310)、バスセレクト信号48
によってバスセレクタ32を制御して、フラッシュRO
M22のバス40の接続をCPU20側からホストシス
テム10側に切り替える(ステップS206)。また、
バスインターフェイス24のリセットシーケンス回路3
4では、ホストシステム10に対する割込みを発生させ
て、ROMの書換え許可を通知し(ステップS20
8)、CPU20のリセットを完了する(ステップS2
10)。
When the reset sequence circuit 34 of the bus interface 24 detects the reset permission by accessing the I / O port 38 (step S204),
A reset (operation stop) is generated for the CPU 20 (step S310), and the bus select signal 48
The bus selector 32 is controlled by the
The connection of the bus 40 of the M22 is switched from the CPU 20 to the host system 10 (step S206). Also,
Reset sequence circuit 3 of bus interface 24
In step S4, an interrupt to the host system 10 is generated to notify the ROM rewrite permission (step S20).
8), reset of CPU 20 is completed (step S2)
10).

【0039】これに対して、ホストシステム10では、
フラッシュROM22の書換え許可が検出されると割り
込み処理を行い(ステップS110)、フラッシュRO
M22に対してアクセスを行って、ライト、リード、コ
ンペア等の処理を行ってROM22に格納されているプ
ログラム内容を書き換える(ステップS112)。RO
M22のプログラム内容の書換えが終了すると、ホスト
システム10は、I/Oポート36をリセットして、C
PU20へリセット解除を要求し(ステップS11
4)、ROMの書換え処理を終了する(ステップS11
6)。
On the other hand, in the host system 10,
When rewriting permission of the flash ROM 22 is detected, an interrupt process is performed (step S110), and the flash RO
M22 is accessed to perform write, read, compare, and other processing to rewrite the program contents stored in ROM 22 (step S112). RO
When the rewriting of the program content of M22 is completed, the host system 10 resets the I / O port 36 to
A request for reset release is issued to the PU 20 (step S11).
4), end the ROM rewriting process (step S11)
6).

【0040】バスインターフェイス24において、CP
U20へのリセット解除要求を受けると(ステップS2
20)、リセットシーケンス回路34は、バスセレクト
信号48によりバスセレクタ32を制御して、フラッシ
ュROM22へのバス40の接続をホストシステム10
側からCPU20側へ切替えると同時に、CPU20の
リセットを解除し(ステップS222)、CPU20の
リセット解除を完了する(ステップS224)。
In the bus interface 24, the CP
Upon receiving a reset release request to U20 (step S2)
20), the reset sequence circuit 34 controls the bus selector 32 with the bus select signal 48 to connect the bus 40 to the flash ROM 22 with the host system 10.
At the same time as switching from the side to the CPU 20 side, the reset of the CPU 20 is released (step S222), and the reset release of the CPU 20 is completed (step S224).

【0041】このようにして、リセットが解除されたC
PU20では、更新されたプログラム内容のフラッシュ
ROM22を参照して、初期プログラムの読込み(IP
L:イニシャル・プログラム・ローダ)から動作を開始
する(ステップS320)。
In this way, the reset C is released.
The PU 20 refers to the flash ROM 22 of the updated program contents and reads the initial program (IP
L: Initial program loader) (Step S320).

【0042】図4は、図1に示した本実施の形態1の構
成と図11に示した従来例の構成とを比較したものであ
る。図4中の点線で示した転送制御回路、ROM、バン
クメモリ回路及びバンク切替回路などは、従来例のシス
テムには必要であったが、本実施の形態1では必要のな
い回路であるため、構成が簡素化され、簡単なソフトウ
ェアでプログラムの書き換え動作を行うことができる。
FIG. 4 shows a comparison between the configuration of the first embodiment shown in FIG. 1 and the configuration of the conventional example shown in FIG. The transfer control circuit, the ROM, the bank memory circuit, the bank switching circuit, and the like shown by the dotted lines in FIG. 4 are necessary for the conventional system, but are unnecessary circuits in the first embodiment. The configuration is simplified, and the program rewriting operation can be performed with simple software.

【0043】以上述べたように、本実施の形態1によれ
ば、拡張ユニットのプログラムを書き換える際に、電源
等を落す必要がないので、ホストシステムの動作や拡張
バスに接続された他の拡張ユニットの動作に影響を与え
ることなく実行することができる。
As described above, according to the first embodiment, it is not necessary to turn off the power or the like when rewriting the program of the extension unit, so that the operation of the host system and other extension devices connected to the extension bus are not required. It can be performed without affecting the operation of the unit.

【0044】また、拡張ユニットにおけるプログラムの
書き換えは、簡単なソフトウェアとハードウェアとによ
り、拡張ユニットのプログラムを書換えることができ
る。さらに、システムを停止させる時間も、プログラム
を書換えるメモリアクセスの時間のみとなり、拡張ユニ
ットの停止時間を短縮することができる。
The rewriting of the program in the extension unit can be achieved by rewriting the program of the extension unit with simple software and hardware. Further, the time for stopping the system is only the time for memory access for rewriting the program, and the time for stopping the extension unit can be reduced.

【0045】実施の形態2.図5は、本実施の形態2に
おける拡張ユニットのプログラム書換システムを説明す
る図であり、ホストシステムに複数の拡張ユニットが接
続されたシステム全体の構成図を示したものである。本
実施の形態2では、図5における拡張ユニット50の構
成に特徴があるが、それ以外のホストシステム10、拡
張バス12及び他の拡張ユニット14については従来例
と同様であるため、説明を省略する。
Embodiment 2 FIG. 5 is a diagram for explaining a program rewriting system for an extension unit according to the second embodiment, and shows a configuration diagram of an entire system in which a plurality of extension units are connected to a host system. The second embodiment is characterized by the configuration of the extension unit 50 in FIG. 5, but the other parts of the host system 10, the extension bus 12, and the other extension units 14 are the same as those in the conventional example, and therefore the description is omitted. I do.

【0046】図5に示されるように、拡張ユニット50
は、CPU20、RAM52、ROM22、バスインタ
ーフェイス54などから構成されていて、CPU20が
RAM52の内容を参照して動作を行うユニットであ
る。ROM22は、CPU20が実行するプログラムを
格納するフラッシュROMであって、CPU20がイニ
シャル時にこのプログラムをRAM52に転送して実行
する。プログラムの転送後は、CPU20からフラッシ
ュROM22へアクセスが行われないので、ホストシス
テム10がフラッシュROM22に対して自由にアクセ
スすることができる。
As shown in FIG. 5, the extension unit 50
Is a unit composed of a CPU 20, a RAM 52, a ROM 22, a bus interface 54, and the like, in which the CPU 20 operates by referring to the contents of the RAM 52. The ROM 22 is a flash ROM for storing a program to be executed by the CPU 20, and transfers the program to the RAM 52 when the CPU 20 is initialized, and executes the program. After the transfer of the program, the CPU 20 does not access the flash ROM 22, so that the host system 10 can freely access the flash ROM 22.

【0047】バスインターフェイス54は、ホストシス
テム10と拡張ユニット50とのインターフェイス機能
を果たす回路であって、拡張バス12を介してホストシ
ステム10とCPU20との間で通信が行われる。ま
た、バスインターフェイス54は、ホストシステム10
からの要求によって、CPU20をリセットする機能を
有している。
The bus interface 54 is a circuit that functions as an interface between the host system 10 and the extension unit 50. Communication is performed between the host system 10 and the CPU 20 via the extension bus 12. The bus interface 54 is connected to the host system 10.
Has a function of resetting the CPU 20 in response to a request from the user.

【0048】図6は、図5のバスインターフェイス54
内の詳細な回路構成を説明する図である。図6におい
て、バスインターフェイス54は、上記実施の形態1の
場合と同じ拡張バス信号処理回路30、バスセレクタ3
2、リセットシーケンス回路34、I/Oポート36、
38に加えて、リセットシーケンス回路34と関係な
く、ROM22に接続されるバス40の切替えを行うバ
ス切替制御回路56、CPU20がフラッシュROM2
2のプログラム内容の実行用メモリであるRAM52へ
の転送終了を通知するI/Oポート60、ホストシステ
ム10がROM22への書込み許可を確認するI/Oポ
ート58などにより構成されている。なお、図6では、
実施の形態1と同一構成部分に同じ符号を付して、構成
説明を省略する。
FIG. 6 shows the bus interface 54 of FIG.
FIG. 2 is a diagram illustrating a detailed circuit configuration in FIG. In FIG. 6, the bus interface 54 includes the same extended bus signal processing circuit 30 and bus selector 3 as in the first embodiment.
2, reset sequence circuit 34, I / O port 36,
In addition to the reset sequence circuit 34, the bus switching control circuit 56 for switching the bus 40 connected to the ROM 22 and the CPU 20
The I / O port 60 notifies the end of the transfer of the contents of the program 2 to the RAM 52, which is an execution memory, and the I / O port 58, which allows the host system 10 to confirm the write permission to the ROM 22. In FIG. 6,
The same components as those in the first embodiment are denoted by the same reference numerals, and the description of the configuration will be omitted.

【0049】図7は、本実施の形態2のフラッシュRO
M22におけるプログラム書換え処理の流れを説明する
フローチャートである。まず、電源投入時には、フラッ
シュROM22へのバス40がCPU20側に切り替わ
っており、CPU20では、イニシャル処理がなされる
(ステップS600)。すなわち、CPU20は、フラ
ッシュROM22のプログラム内容を、実行用メモリで
あるRAM104に転送する(ステップS602)。そ
して、CPU20は、プログラム内容をRAM52へ転
送した後、転送が終了したことをI/Oポート60をセ
ットすることによってバスインターフェイス54へ通知
し(ステップS606)、プログラムが実行される(ス
テップS610)。
FIG. 7 shows a flash RO according to the second embodiment.
It is a flowchart explaining the flow of the program rewriting process in M22. First, when the power is turned on, the bus 40 to the flash ROM 22 is switched to the CPU 20 side, and the CPU 20 performs an initial process (step S600). That is, the CPU 20 transfers the contents of the program in the flash ROM 22 to the RAM 104, which is an execution memory (step S602). Then, after transferring the program contents to the RAM 52, the CPU 20 notifies the bus interface 54 of the completion of the transfer by setting the I / O port 60 (step S606), and the program is executed (step S610). .

【0050】上記したプログラム転送終了通知がバスイ
ンターフェイス54になされると(ステップS50
0)、バスインターフェイス54のバス切替制御回路5
6では、バスセレクト信号62によりフラッシュROM
22へのバス40がホストシステム10側に有効となる
ように切り替え(ステップS502)、I/Oポート5
8をセットすることにより、ホストシステム10側にR
OMの書換えの許可を通知して(ステップS504)、
フラッシュROM22へのバス40の切替えが終了する
(ステップS506)。
When the above-described program transfer end notification is sent to the bus interface 54 (step S50).
0), the bus switching control circuit 5 of the bus interface 54
6, the flash ROM is selected by the bus select signal 62.
The bus 40 to the I / O port 5 is switched so that the bus 40 to the I / O port 22 becomes effective on the host system 10 side (step S502).
By setting “8”, R is set on the host system 10 side.
Notification of OM rewriting permission is given (step S504).
The switching of the bus 40 to the flash ROM 22 ends (step S506).

【0051】また、ホストシステム10側において、フ
ラッシュROM22を書換える必要がある場合、ホスト
システム10は、バスインターフェイス54のバス切替
制御回路56のI/Oポート58にアクセスして、フラ
ッシュROM22の書換えが許可されているか否かを確
認する(ステップS400)。書換えが許可されていな
い場合は、書換えの許可があるまで確認を繰り返して待
機する。ROMの書換えが許可されている場合は、ホス
トシステム10がフラッシュROM22に対して、ライ
ト、リード、コンペア等によりアクセスを発生して、フ
ラッシュROM22の内容を書換える(ステップS40
2)。その間、CPU20はROM22の書換え作業の
影響を全く受けること無く、RAM52のプログラムを
参照しながら動作を継続することができる。
When the host system 10 needs to rewrite the flash ROM 22, the host system 10 accesses the I / O port 58 of the bus switching control circuit 56 of the bus interface 54 to rewrite the flash ROM 22. It is determined whether or not is permitted (step S400). If rewriting is not permitted, confirmation is repeated and waiting until rewriting is permitted. If the rewriting of the ROM is permitted, the host system 10 accesses the flash ROM 22 by writing, reading, comparing, etc., and rewrites the contents of the flash ROM 22 (step S40).
2). During that time, the CPU 20 can continue the operation while referring to the program in the RAM 52 without being affected by the rewriting operation of the ROM 22 at all.

【0052】ホストシステム10は、フラッシュROM
22の書き換えを行なった後、I/Oポート36をセッ
トして、バスインターフェイス54に対してCPU20
へのリセットを要求し(ステップS404)、ROMの
書換え処理を終了する(ステップS406)。バスイン
ターフェイス54では、このCPU20へのリセット要
求があると、CPU20に対して割り込みを発生させ、
CPU20へリセット通知が行われる(ステップS51
2)。
The host system 10 has a flash ROM
22 is rewritten, the I / O port 36 is set, and the CPU 20
Is requested (step S404), and the ROM rewriting process ends (step S406). The bus interface 54 generates an interrupt to the CPU 20 upon receiving a reset request to the CPU 20,
A reset notification is sent to the CPU 20 (step S51).
2).

【0053】CPU20において、リセット通知割込み
が検出されると(ステップS620)、現在実行中の処
理を中断して(ステップS622)、リセットがかかっ
たとしてもデータの不整合が起きない状態としてから、
I/Oポート38をセットして、バスインターフェイス
54に対してリセット許可を通知する(ステップS62
4)。
When the CPU 20 detects a reset notification interrupt (step S620), it interrupts the process currently being executed (step S622), and sets a state where data inconsistency does not occur even if a reset is applied.
The I / O port 38 is set, and the reset permission is notified to the bus interface 54 (step S62).
4).

【0054】バスインターフェイス54では、I/Oポ
ート38にアクセスして、リセット許可の有無を確認
し、リセット許可が無い場合は、リセット許可があるま
で待機する(ステップS514)。ここで、CPU20
からリセット許可があると、リセットシーケンス回路3
4に対してリセット許可が通知される。リセットシーケ
ンス回路34において、リセット許可が検出されるとC
PU20に対してリセットの発生・解除を行って(ステ
ップS516)、CPU20のリセット処理が完了する
(ステップS518)。リセットによってCPU20の
動作は、一時的に停止するが、すぐに解除されて、更新
されたフラッシュROM22の内容がRAM52に転送
し直され、書き換えられたプログラムに基づいて動作が
開始される。
The bus interface 54 accesses the I / O port 38 to confirm whether or not reset is permitted, and if not, waits until reset is permitted (step S514). Here, the CPU 20
From the reset sequence circuit 3
4 is notified of reset permission. When reset permission is detected in the reset sequence circuit 34, C
The reset is generated / released for the PU 20 (step S516), and the reset process of the CPU 20 is completed (step S518). Although the operation of the CPU 20 is temporarily stopped by the reset, it is immediately canceled, the updated content of the flash ROM 22 is transferred to the RAM 52 again, and the operation is started based on the rewritten program.

【0055】また、上記した実施の形態1と同様に、C
PU20をリセットして動作停止状態として(ステップ
S630)、フラッシュROM22の内容を書換えるこ
とももちろん可能である。
Further, similarly to the first embodiment, C
It is of course possible to rewrite the contents of the flash ROM 22 by resetting the PU 20 to set the operation stop state (step S630).

【0056】図8は、図5に示した本実施の形態2の構
成と図11に示した従来例の構成とを比較したものであ
る。図5中の点線で示した転送制御回路、ROM、バン
クメモリ回路及びバンク切替回路などは、従来例のシス
テムでは必要であったが、本実施の形態1では必要のな
い回路であるため、構成が簡素化され、簡単なソフトウ
ェアでプログラムの書き換え動作を行うことができる。
FIG. 8 is a comparison between the configuration of the second embodiment shown in FIG. 5 and the configuration of the conventional example shown in FIG. The transfer control circuit, the ROM, the bank memory circuit, the bank switching circuit, and the like indicated by the dotted lines in FIG. 5 are necessary in the conventional system, but are unnecessary in the first embodiment. Is simplified, and the program rewriting operation can be performed with simple software.

【0057】以上述べたように、本実施の形態2によれ
ば、拡張ユニットのプログラムを書き換える際に、電源
等を落す必要がないので、ホストシステムの動作やホス
トシステムの拡張バスに接続されている他の拡張ユニッ
トの動作にも影響を与えることがなくなった。
As described above, according to the second embodiment, the power supply and the like do not need to be turned off when rewriting the program of the extension unit. Therefore, the operation of the host system and the connection to the extension bus of the host system are not required. It no longer affects the operation of other expansion units.

【0058】また、拡張ユニットにおけるプログラムの
書き換えは、簡単なソフトウェアとハードウェアにて拡
張ユニットのプログラムを書換えることができる。さら
に、プログラムの内容を更新した内容で動作させる場合
についても、リセットを発生する数ミリ秒のみ拡張ユニ
ットを停止させるのみであり、停止時間を更に短縮する
ことができる。
The rewriting of the program in the extension unit can be done by simple software and hardware. Further, when the program is operated with the updated content, the extension unit is only stopped for a few milliseconds at which a reset occurs, and the stop time can be further reduced.

【0059】[0059]

【発明の効果】以上説明したように、この発明に係るプ
ログラム書換システムによれば、ホストシステムや拡張
バスに接続された他の拡張ユニットの動作に影響を与え
ることなく、拡張ユニットのプログラム内容を容易に書
き換えることが可能となり、ホストシステムや拡張ユニ
ットを停止させる時間を短縮することができる。
As described above, according to the program rewriting system of the present invention, the program contents of the extension unit can be stored without affecting the operation of the host system and other extension units connected to the extension bus. Rewriting can be easily performed, and the time for stopping the host system or the extension unit can be reduced.

【0060】つぎの発明に係るプログラム書換システム
によれば、ホストシステムや他の拡張ユニットの動作に
影響を与えることなく、不揮発性メモリの内容を容易に
書き換えることができ、ホストシステムや拡張ユニット
を停止させる時間を短縮することができる。
According to the program rewriting system of the next invention, the contents of the non-volatile memory can be easily rewritten without affecting the operation of the host system and other extension units. The time to stop can be reduced.

【0061】つぎの発明に係るプログラム書換システム
によれば、ホストシステム、拡張バスに接続された他の
拡張ユニット及びプログラムの書き換えを行っている拡
張ユニットの動作に影響を与えることなく、拡張ユニッ
トのプログラム内容を容易に書き換えることが可能とな
り、ホストシステムや拡張ユニットを停止させる時間を
短縮することができる。
According to the program rewriting system of the next invention, the operation of the host system, the other extension units connected to the extension bus, and the extension unit that rewrites the program is not affected. The contents of the program can be easily rewritten, and the time for stopping the host system and the extension unit can be reduced.

【0062】つぎの発明に係るプログラム書換システム
によれば、ホストシステム、他の拡張ユニット及びプロ
グラムの書き換えを行っている拡張ユニットの動作に影
響を与えることなく、不揮発性メモリの内容を容易に書
き換えることができ、ホストシステムや拡張ユニットを
停止させる時間を短縮することができる。
According to the program rewriting system of the next invention, the contents of the nonvolatile memory can be easily rewritten without affecting the operations of the host system, other extension units, and the extension units which rewrite the program. Therefore, the time for stopping the host system and the extension unit can be reduced.

【図面の簡単な説明】[Brief description of the drawings]

【図1】 本実施の形態1における拡張ユニットのプロ
グラム書換システムを説明する図である。
FIG. 1 is a diagram illustrating a program rewriting system for an extension unit according to a first embodiment.

【図2】 図1のバスインターフェイス内の詳細な回路
構成を説明する図である。
FIG. 2 is a diagram illustrating a detailed circuit configuration in a bus interface of FIG. 1;

【図3】 本実施の形態1におけるフラッシュROMの
プログラム書換え処理の流れを説明するフローチャート
である。
FIG. 3 is a flowchart illustrating a flow of a flash ROM program rewriting process according to the first embodiment;

【図4】 図1に示した本実施の形態1の構成と図11
に示した従来例の構成とを比較したものである。
FIG. 4 shows the configuration of the first embodiment shown in FIG. 1 and FIG.
3 is compared with the configuration of the conventional example shown in FIG.

【図5】 本実施の形態2における拡張ユニットのプロ
グラム書換システムを説明する図である。
FIG. 5 is a diagram illustrating a program rewriting system for an extension unit according to the second embodiment.

【図6】 図5のバスインターフェイス内の詳細な回路
構成を説明する図である。
FIG. 6 is a diagram illustrating a detailed circuit configuration in the bus interface of FIG. 5;

【図7】 本実施の形態2におけるフラッシュROMの
プログラム書換え処理の流れを説明するフローチャート
である。
FIG. 7 is a flowchart illustrating the flow of a flash ROM program rewriting process according to the second embodiment;

【図8】 図5に示した本実施の形態2の構成と図11
に示した従来例の構成とを比較したものである。
8 shows the configuration of the second embodiment shown in FIG. 5 and FIG.
3 is compared with the configuration of the conventional example shown in FIG.

【図9】 ホストシステムに複数の拡張ユニットを接続
した従来のシステム構成図である。
FIG. 9 is a conventional system configuration diagram in which a plurality of extension units are connected to a host system.

【図10】 拡張ユニットに外部装置を接続して拡張ユ
ニット内部のROMのメモリ内容を書換える場合のシス
テム構成図である。
FIG. 10 is a system configuration diagram in a case where an external device is connected to the extension unit to rewrite a memory content of a ROM inside the extension unit.

【図11】 従来例のダウンロード装置の構成を説明す
るブロック図である。
FIG. 11 is a block diagram illustrating a configuration of a conventional download device.

【図12】 図11のダウンロード装置におけるアドレ
ス空間の配置を示す図である。
FIG. 12 is a diagram showing an address space arrangement in the download device of FIG. 11;

【符号の説明】[Explanation of symbols]

10 ホストシステム、12 拡張バス、14,16
拡張ユニット、20CPU、22 ROM(フラッシュ
ROM)、24 バスインターフェイス、30 拡張バ
ス信号処理回路、32 バスセレクタ、34 リセット
シーケンス回路、36,38 I/Oポート、40 バ
ス、50 拡張ユニット、52 RAM、54 バスイ
ンターフェイス、56 バス切替制御回路、58,60
I/Oポート。
10 host system, 12 expansion bus, 14, 16
Extension unit, 20 CPU, 22 ROM (flash ROM), 24 bus interface, 30 extension bus signal processing circuit, 32 bus selector, 34 reset sequence circuit, 36, 38 I / O port, 40 bus, 50 extension unit, 52 RAM, 54 bus interface, 56 bus switching control circuit, 58, 60
I / O port.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 ホストシステムに対して拡張バスを介し
て接続される拡張ユニット内に格納されたプログラムの
書き換えを行うプログラム書換システムにおいて、 前記拡張ユニットには、 該拡張ユニット内を制御するCPUと、 前記CPUで実行されるプログラムを格納する書き換え
可能な不揮発性メモリと、 前記ホストシステムから前記不揮発性メモリにアクセス
するとともに、前記ホストシステムから前記CPUへリ
セット出力が可能なインターフェイス回路と、 を有し、 前記ホストシステムが前記CPUを動作停止状態として
いる間に前記不揮発性メモリに直接アクセスして、前記
不揮発性メモリに格納されたプログラム内容を書き換え
ることを特徴とするプログラム書換システム。
1. A program rewriting system for rewriting a program stored in an extension unit connected to a host system via an extension bus, wherein the extension unit includes: a CPU controlling the inside of the extension unit; A rewritable nonvolatile memory for storing a program to be executed by the CPU; and an interface circuit capable of accessing the nonvolatile memory from the host system and outputting a reset from the host system to the CPU. And a program rewriting system for directly accessing the non-volatile memory while the host system keeps the CPU in an operation stopped state and rewriting a program content stored in the non-volatile memory.
【請求項2】 前記インターフェイス回路は、割込み信
号によって前記ホストシステムへの割込みを発生させる
信号処理回路と、前記ホストシステムからの要求に基づ
いて前記CPUを動作停止状態とするリセットシーケン
ス回路と、前記リセットシーケンス回路からのセレクト
信号により前記不揮発性メモリに接続されるバスを前記
ホストシステムあるいは前記CPUのうち一方に切り替
えるバスセレクタと、 を有し、 前記ホストシステムは、前記リセットシーケンス回路に
より前記CPUを動作停止状態とし、前記バスセレクタ
により前記不揮発性メモリに接続されたバスをホストシ
ステムに接続して、前記不揮発性メモリに格納されてい
るプログラム内容を書き換えることを特徴とする請求項
1に記載のプログラム書換システム。
A signal processing circuit for generating an interrupt to the host system by an interrupt signal; a reset sequence circuit for stopping the CPU based on a request from the host system; A bus selector that switches a bus connected to the nonvolatile memory to one of the host system and the CPU according to a select signal from a reset sequence circuit, wherein the host system controls the CPU by the reset sequence circuit. 2. The program according to claim 1, wherein the operation is stopped, and a bus connected to the non-volatile memory by the bus selector is connected to a host system to rewrite a program stored in the non-volatile memory. Program rewriting system.
【請求項3】 ホストシステムに対して拡張バスを介し
て接続される拡張ユニット内に格納されたプログラムの
書き換えを行うプログラム書換システムにおいて、 前記拡張ユニットには、 該拡張ユニット内を制御するCPUと、 前記CPUで実行されるプログラムを格納する書き換え
可能な不揮発性メモリと、 前記ユニット本体の動作時に前記不揮発性メモリに格納
されたプログラム内容を転送して実行する実行用メモリ
と、 前記ホストシステムから前記不揮発性メモリにアクセス
するとともに、前記ホストシステムから前記CPUへリ
セット出力が可能なインターフェイス回路と、 を有し、 前記ホストシステムが前記不揮発性メモリに直接アクセ
スして、前記不揮発性メモリに格納されているプログラ
ム内容を書き換えることを特徴とするプログラム書換シ
ステム。
3. A program rewriting system for rewriting a program stored in an expansion unit connected to a host system via an expansion bus, wherein the expansion unit includes: a CPU controlling the inside of the expansion unit; A rewritable nonvolatile memory for storing a program to be executed by the CPU; an execution memory for transferring and executing program contents stored in the nonvolatile memory when the unit body is operating; An interface circuit for accessing the non-volatile memory and capable of outputting a reset from the host system to the CPU; and wherein the host system directly accesses the non-volatile memory and is stored in the non-volatile memory. The feature is that the contents of the program Program rewrite system that.
【請求項4】 前記インターフェイス回路は、割込み信
号によって前記ホストシステムへの割込みを発生させる
信号処理回路と、前記ホストシステムからの要求に基づ
いて前記CPUを動作停止状態とするリセットシーケン
ス回路と、前記不揮発性メモリに接続されるバスを前記
ホストシステムあるいは前記CPUのうち一方に切り替
えるバスセレクタと、前記バスセレクタの切替制御を行
うバス切替制御回路と、 を有し、 前記不揮発性メモリに格納されたプログラムを実行用メ
モリに転送終了後、前記バス切替制御回路によりバスセ
レクタを切換えて前記不揮発性メモリに接続されたバス
をホストシステムに接続して、前記不揮発性メモリに格
納されているプログラム内容を書き換えることを特徴と
する請求項3に記載のプログラム書換システム。
A signal processing circuit for generating an interrupt to the host system by an interrupt signal; a reset sequence circuit for stopping the CPU based on a request from the host system; A bus selector for switching a bus connected to the nonvolatile memory to one of the host system and the CPU, and a bus switching control circuit for performing switching control of the bus selector. After the transfer of the program to the execution memory is completed, a bus selector is switched by the bus switching control circuit to connect the bus connected to the nonvolatile memory to the host system, and the contents of the program stored in the nonvolatile memory are transferred. 4. The program rewriting system according to claim 3, wherein the program rewriting is performed. Temu.
JP14337198A 1998-05-25 1998-05-25 Program rewriting system Pending JPH11338687A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14337198A JPH11338687A (en) 1998-05-25 1998-05-25 Program rewriting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14337198A JPH11338687A (en) 1998-05-25 1998-05-25 Program rewriting system

Publications (1)

Publication Number Publication Date
JPH11338687A true JPH11338687A (en) 1999-12-10

Family

ID=15337239

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14337198A Pending JPH11338687A (en) 1998-05-25 1998-05-25 Program rewriting system

Country Status (1)

Country Link
JP (1) JPH11338687A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1457880A1 (en) * 2003-03-10 2004-09-15 Samsung Electronics Co., Ltd. Methods, circuits, and data structures for programming electronic devices
JP2007058288A (en) * 2005-08-22 2007-03-08 Hitachi Kokusai Electric Inc Information processing apparatus
US7831740B2 (en) 2003-03-10 2010-11-09 Samsung Electronics Co., Ltd. Method and circuit for programming electronic devices
JP2012038125A (en) * 2010-08-09 2012-02-23 Nec Corp Controlled device, controlled method, control device and control system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1457880A1 (en) * 2003-03-10 2004-09-15 Samsung Electronics Co., Ltd. Methods, circuits, and data structures for programming electronic devices
US7831740B2 (en) 2003-03-10 2010-11-09 Samsung Electronics Co., Ltd. Method and circuit for programming electronic devices
JP2007058288A (en) * 2005-08-22 2007-03-08 Hitachi Kokusai Electric Inc Information processing apparatus
JP2012038125A (en) * 2010-08-09 2012-02-23 Nec Corp Controlled device, controlled method, control device and control system
US8606985B2 (en) 2010-08-09 2013-12-10 Nec Corporation Controlled device to control switching between transmission paths for transmitting data at different rate

Similar Documents

Publication Publication Date Title
US20100122017A1 (en) Memory controller, non-volatile memory system, and host device
JPH08101751A (en) Pc card and pc card system
JPH04315253A (en) Electronic equipment
JP3173407B2 (en) Microcomputer with built-in flash EEPROM
US6000005A (en) Method of writing a flash memory including dynamically switching and allocating memory spaces to the flash memory blocks
JPH11338687A (en) Program rewriting system
US6934537B2 (en) Radio communication device, method of and program for rewriting boot program therefor
JPH10333898A (en) Microcomputer
JP3956305B2 (en) Nonvolatile semiconductor memory device and data processing device
JPH09146767A (en) Method for reloading program
JP2000293376A (en) Circuit and method for switching boot program
JP2853593B2 (en) Download device
JPH1027097A (en) Method and device for rewriting data of flash rom
JPH0554009A (en) Program load system
JP2000207190A (en) System and method for rewrite firmware program
US20030225963A1 (en) Data processing apparatus and data processing method
JP2000099452A (en) Dma control device
JP3997505B2 (en) System program rewriting method for programmable controller
JP2001134543A (en) Electronic equipment
JPH1050086A (en) Microcomputer having eeprom and its rewriting method
GB2304209A (en) Starting up a processor system
JP2000029673A (en) Program control system
US20010037437A1 (en) Information processing device
JPH09244902A (en) Download circuit
JPH08265488A (en) Facsimile equipment

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20040706

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040727

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040924

A02 Decision of refusal

Effective date: 20041019

Free format text: JAPANESE INTERMEDIATE CODE: A02

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20041217

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050106

A912 Removal of reconsideration by examiner before appeal (zenchi)

Effective date: 20050210

Free format text: JAPANESE INTERMEDIATE CODE: A912