JPH03111961A - Program loading system for multi-cpu - Google Patents

Program loading system for multi-cpu

Info

Publication number
JPH03111961A
JPH03111961A JP24919689A JP24919689A JPH03111961A JP H03111961 A JPH03111961 A JP H03111961A JP 24919689 A JP24919689 A JP 24919689A JP 24919689 A JP24919689 A JP 24919689A JP H03111961 A JPH03111961 A JP H03111961A
Authority
JP
Japan
Prior art keywords
cpu
program
sub
main cpu
sub cpu
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
JP24919689A
Other languages
Japanese (ja)
Inventor
Takao Miyanaga
隆雄 宮永
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.)
Fujitsu Frontech Ltd
Original Assignee
Fujitsu Frontech Ltd
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 Fujitsu Frontech Ltd filed Critical Fujitsu Frontech Ltd
Priority to JP24919689A priority Critical patent/JPH03111961A/en
Publication of JPH03111961A publication Critical patent/JPH03111961A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To allow the system to optionally cope with a user's request by allowing a sub-CPU to execute a boot program loaded by a main CPU and load a program to be executed by the sub-CPU to a RAM in the sub-CPU. CONSTITUTION:The boot program for loading a program to be executed by the sub-CPU 2 is loaded to a 1st storage means 3 by the main CPU 1. Then, the sub-CPU 2 executes the loaded boot program and loads the program applied from the main CPU 1 to the RAM of the sub-CPU 2 by using a part of a 2nd storage means 4. When the boot program to be loaded from the main CPU 1 to the sub-CPU 2 is previously stored in the main CPU 1, the main CPU 1 can load the program to be executed to the sub-CPU 2 even if the program of the main CPU 1 or the program of the sub-CPU 2 is applied by a line or the like.

Description

【発明の詳細な説明】 〔概   要〕 複数のCPUからなるマルチCPUシステムに係り、さ
らに詳しくは、メインCPUとサブCPUとよりなるマ
ルチCPUのプログラムロード方式に関し、 ユーザの要求に対応してプログラムを簡単に変更できる
マルチCPUのプログラムロード方式を目的とし、 メインCPUと少なくとも1個のサブCPUとよりなる
マルチCPUシステムにおいて、前記メインCPUのバ
スに接続され、ブートプログラムを記憶する第1の記憶
手段と、前記メインCPUのバスと前記サブCPUのバ
スに接続される第2の記憶手段とを設け、前記メインC
PUによって前記第2の記憶手段に前記ブートプログラ
ムをロードし、前記サブCPUは該ロードしたブートプ
ログラムを実行して前記サブCPUのバスに接続された
RAMに前記サブCP tJが実行すべきプログラムを
ロードするように構成する。
[Detailed Description of the Invention] [Summary] This invention relates to a multi-CPU system consisting of a plurality of CPUs, and more specifically, to a program loading method for a multi-CPU consisting of a main CPU and a sub-CPU. In a multi-CPU system consisting of a main CPU and at least one sub-CPU, a first memory connected to the bus of the main CPU and storing a boot program is provided. and a second storage means connected to the bus of the main CPU and the bus of the sub CPU,
The boot program is loaded into the second storage means by the PU, and the sub CPU executes the loaded boot program and stores the program to be executed by the sub CPU tJ in a RAM connected to the bus of the sub CPU. Configure to load.

〔産業上の利用分野〕[Industrial application field]

本発明は、複数のCPUからなるマルチCPUシステム
に係り、さらに詳しくは、メインCPUとサブCPUと
よりなるマルチCPUのプログラムロード方式に関する
The present invention relates to a multi-CPU system comprising a plurality of CPUs, and more particularly to a program loading method for a multi-CPU comprising a main CPU and a sub-CPU.

〔従来の技術〕[Conventional technology]

各信号処理や制御装置においては、処理の高速化等のた
めに、例えば1つの装置であっても複数のCPUを使っ
たいわゆるマルチCPUシステムが多く用いられている
In each signal processing and control device, a so-called multi-CPU system using a plurality of CPUs is often used even in one device, for example, in order to speed up processing.

このようなマルチCPUシステムは、メインCPUとサ
ブCPUとからなり、例えば、回線等によって他の装置
からのデータさらには本体内から発生したデータの転送
をメインCPUが行っている。そして、サブCPUはメ
インCPUと、バッファを有するI10インタフェース
等によって接続され、それぞれI10インターフェイス
を介してメインCPUからのコマンドやデータを受け、
また、サブCPUの処理結果や状態をI10インタフェ
ースを介してメインCPUに加えている。
Such a multi-CPU system consists of a main CPU and a sub-CPU, and the main CPU transfers data from other devices and data generated within the main body, for example, via a line or the like. The sub-CPUs are connected to the main CPU through an I10 interface having a buffer, and each receives commands and data from the main CPU via the I10 interface.
Furthermore, the processing results and status of the sub CPU are added to the main CPU via the I10 interface.

上述ではメインCPUとサブCPU間のデータ転送を説
明したが、この他にメインCPUやサブCPUは時間の
監視や他の制御も行う。このマルチCPUシステムによ
り、例えば時間制御が短時間に要求されるものであって
も実現可能となっている。
Although data transfer between the main CPU and sub CPU has been described above, the main CPU and sub CPU also perform time monitoring and other controls. This multi-CPU system makes it possible to realize, for example, time control that is required in a short period of time.

前述したマルチCPUシステムのメインCPUは、主制
御のプログラムを記憶するROMと、データを記憶する
RAMと、回線装置さらには表示出力やプリンタ出力等
のインタフェースを有している。また、サブCPUにお
いては、時間管理用の時計、ブザー、キーボード制御等
のインタフェースとそれらのインタフェースを制御■す
るプログラムを記憶するROM、RAM、電源等の制御
を行う制御回路、さらにはバーコードリーダ等のそれぞ
れ各I10を制御するための回路からなっている。
The main CPU of the multi-CPU system described above has a ROM that stores a main control program, a RAM that stores data, a line device, and interfaces such as display output and printer output. In addition, the sub-CPU includes interfaces such as a clock for time management, a buzzer, keyboard control, etc., a ROM that stores programs that control these interfaces, a RAM, a control circuit that controls the power supply, etc., and a barcode reader. Each of these circuits includes a circuit for controlling each I10.

従来においては、上述したように複数のCPUを設け、
複数の処理をそれぞれのCPUにさせることによって、
高速で確実な制御を行っている。
Conventionally, as mentioned above, multiple CPUs are provided,
By having each CPU perform multiple processes,
It provides fast and reliable control.

特に、時間制御を高速を行うようなシステムにおいては
、それらを1個のCPUで行うには非常に高速のCPU
が必要であるが、処理の分散によって安価なCPUを使
うことができるという特徴を有している。
In particular, in systems that perform high-speed time control, it takes a very high-speed CPU to perform these tasks with a single CPU.
However, it has the characteristic that an inexpensive CPU can be used by distributing the processing.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

前述したようなマルチCPUシステムにおいては、メイ
ンCPUと制御用CPUにそれぞれ実行させるべきプロ
グラムを記憶するROMをそれぞれ設け、そのROMで
記憶するプログラムをそれぞれCPUが実行して制御を
行っている。
In the multi-CPU system as described above, the main CPU and the control CPU are each provided with a ROM that stores a program to be executed, and each CPU executes and controls the program stored in the ROM.

このため、装置ごとにユーザ対応の個別仕様とする場合
、各CPUのプログラムを変える必要がある。この時に
は、前述したROMを入れ換えなくてはならないという
問題を有していた。
Therefore, if each device is to have individual specifications for each user, it is necessary to change the program for each CPU. At this time, there was a problem in that the ROM mentioned above had to be replaced.

1個のCPUで実行した場合には、例えばメインCPU
に回線用のインタフェースを有する場合には、その回線
から実行すべきプログラムをロードすることにより、固
有のプログラム(ユーザ対応)をロードしてユーザの個
別使用に対応させることができるが、サブCPUの制御
までも仕様を変更する場合には、ROMをそのつど変更
しなければならないという問題を有していた。
When executed on one CPU, for example, the main CPU
If the sub-CPU has a line interface, by loading the program to be executed from that line, it is possible to load a unique program (user-compatible) to correspond to the user's individual use. When changing the specifications even for the control, there was a problem in that the ROM had to be changed each time.

また、同一の装置であっても、制御が異なるたびに処理
の内容を変更しなくてはならず、そのつとROMを入れ
換えなければならないという問題を有していた。
Further, even if the device is the same, the processing contents must be changed each time the control is different, and the ROM must be replaced.

本発明は、ユーザの要求に対応してプログラムを簡単に
変更できるマルチCPUのプログラムロード方式を目的
とする。
The object of the present invention is to provide a multi-CPU program loading method that allows programs to be easily changed in response to user requests.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理ブロック図である。 FIG. 1 is a block diagram of the principle of the present invention.

本発明は、メインCPU1と少なくとも1個のサブCP
U2とよりなるマルチCPUシステムにおける。
The present invention provides a main CPU 1 and at least one sub CPU.
In a multi-CPU system consisting of U2.

第1の記憶手段3は、前記サブCPU2のRAMに前記
サブCPU2が実行すべきプログラムをロードするブー
トプログラムを記憶し、前記メインCPUIのバス5に
接続される。例えばこの第1の記憶手段は前記ブートプ
ログラムを予め記憶しているROMである。或いは回線
等によって入力した前記ブートプログラムを記憶するR
AMである。
The first storage means 3 stores a boot program for loading a program to be executed by the sub CPU 2 into the RAM of the sub CPU 2, and is connected to the bus 5 of the main CPU. For example, this first storage means is a ROM that stores the boot program in advance. Alternatively, an R that stores the boot program input via a line etc.
It is AM.

第2の記憶手段4はRAM等よりなり、前記すI CP
U2が実行すべきプログラムをロードするブートプログ
ラムがロードされる。この第2の記憶手段4はサブCP
U2とメインCPUIのそれぞれのバス5,6に接続さ
れ、前記ブートプログラムがロードされた後サブCPU
2はこのプログラムを実行する。
The second storage means 4 consists of a RAM etc.
A boot program is loaded that loads the program that U2 is to run. This second storage means 4 is a sub-CP
It is connected to buses 5 and 6 of U2 and the main CPUI, respectively, and after the boot program is loaded, the sub CPU
2 executes this program.

〔作   用〕[For production]

メインCPUIによって前記第1の記憶手段4に、前記
サブCPU2が実行すべきプログラムをロードするブー
トプログラムをロードする。そしてそのブートプログラ
ムをロードの後、サブCPU2はそのロードしたブート
プログラムを実行し、メインCPUIから加わるプログ
ラムをサブCPU2内のRAMにロードする。メインC
PUIから加わるプログラムは、例えば第2の記憶手段
4内の一部を用いてサブCPU2内のRAMに転送する
A boot program that loads a program to be executed by the sub CPU 2 is loaded into the first storage means 4 by the main CPU. After loading the boot program, the sub CPU 2 executes the loaded boot program and loads the program added from the main CPU into the RAM in the sub CPU 2. Main C
A program added from the PUI is transferred to the RAM in the sub CPU 2 using a part of the second storage means 4, for example.

メインCPUI内に予めメインCPUIがサブCPU2
にa−ドすべきブートプログラムを記憶させておくこと
により、例えば回線等によってメインCPUのプログラ
ム、さらにはサブCPUのプログラムが加わっても、そ
れぞれのCPUに実行すべきプログラムをロードするこ
とができる。
The main CPU is installed in the main CPU in advance as a sub CPU2.
By storing the boot program to be loaded into the computer, even if a main CPU program or even a sub CPU program is added via a line, for example, the program to be executed can be loaded to each CPU. .

〔実  施  例〕〔Example〕

以下図面を用いて本発明の詳細な説明する。 The present invention will be described in detail below using the drawings.

第2図は本発明の実施例のシステム構成図、第3図は本
発明の実施例の各CPUの実行処理の説明図である。
FIG. 2 is a system configuration diagram of an embodiment of the present invention, and FIG. 3 is an explanatory diagram of execution processing of each CPU in the embodiment of the present invention.

メイン(MAIN)CPUIOのバス11にはROM1
2、RAM13、共通RAM16と、インタフェース1
4を介しメモリカード15が接続している。また、サブ
CPU1Bのバス17にはRAM19と共通RAM16
が接続している。ROM12には、■図示しない制御装
置を制御するメインCP U 1.0のプログラム、@
サブCPUl8がメインCPUl0からのプログラムを
RAM19にロードするためのブートプログラム、◎メ
インCPUがサブCPUにロードすべきメインCPUの
ブートプログラムを記憶している。
ROM1 is on the main (MAIN) CPUIO bus 11.
2. RAM 13, common RAM 16, and interface 1
A memory card 15 is connected via 4. In addition, the bus 17 of the sub CPU 1B includes a RAM 19 and a common RAM 16.
is connected. The ROM 12 contains ■ a main CPU 1.0 program that controls a control device (not shown);
The sub CPU 18 stores a boot program for loading the program from the main CPU 10 into the RAM 19, and the main CPU stores the main CPU boot program to be loaded into the sub CPU.

メインCPUl0が電源投入時に実行開始すると、まず
ROM12内のサブCPUのブートプログラムを共通R
AM16に格納する処理を実行する(■)。この処理に
よって共通RAM16にはサブCP018が実行すべき
ブートプログラムが格納される。共通RAM16はメイ
ンCPUl0内のメモリ空間上、さらにはサブCPU1
Bのメモリ空間上にそれぞれ共通に存在するメモリであ
り、サブCPU18がリセット後実行すべきアドレス上
に前述のブートプログラムが格納される。
When the main CPU l0 starts executing when the power is turned on, first the sub CPU's boot program in the ROM12 is transferred to the common R.
Execute the process of storing in AM16 (■). Through this process, the boot program to be executed by the sub CP018 is stored in the common RAM 16. The common RAM 16 is located in the memory space within the main CPU 10, and also in the sub CPU 1.
This memory exists in common in the memory space of B, and the above-mentioned boot program is stored at an address to be executed by the sub CPU 18 after being reset.

このブートプログラムの共通RAM16への格納時には
、メインCPUl0からサブCPU18へはリセット信
号が加わっており、サブCPUは18リセツト状態とな
っている(■)。そしてブートプログラムが共通RAM
16内にロード終了した時点で、サブCPU18のリセ
ットを解除する。
When this boot program is stored in the common RAM 16, a reset signal is applied from the main CPU 10 to the sub CPU 18, and the sub CPU is in the 18 reset state (■). And the boot program is common RAM
16, the reset of the sub CPU 18 is released.

共通RAM16には前述したように、サブCPU18が
リセット解除後実行すべきアドレスに(共通RAM内の
ロードしたアドレス)にブートプログラムはロードされ
ているので、サブCPU18はこのロードプログラムを
実行する。
As described above, the boot program is loaded in the common RAM 16 at the address to be executed by the sub CPU 18 after the reset is released (the loaded address in the common RAM), so the sub CPU 18 executes this load program.

このブートプログラム実行において、ブートすべきプロ
グラムをサブCPU1Bは共通RAMIG内のブートプ
ログラム以外の領域を用いて行う。
In executing this boot program, the sub CPU 1B executes the program to be booted using an area other than the boot program in the common RAMIG.

共通RAM16の一部に前述したブートプログラムが格
納されている。すなわち、まずメインCPUl0からメ
モリカード15内に格納されているサブCPUI 8が
実行すべきプログラムをインタフェース14を介して読
み出しく■)、共通RAM16に格納する。共通RAM
16に格納されたサブCPU18が実行すべきプログラ
ムをサブCPU18(ブートプログラム実行によって)
は読み出し、サブCPUI 8が有するRAM19にロ
ードする(■)。この共通RAM16はサブCPU18
が専有しているRAM19の容量より小さくてもよく、
例えばサブCPU18が実行すべきプログラムの容量が
共通RAM16より大きい場合には、メインCPUl0
がメモリカードからインタフェース14を介してプログ
ラムの一部を読み出して共通RAMに格納し、その格納
したプログラムをサブCPU18がRAM19に格納す
る手順を複数行い、目的のプログラムをRA M 19
にロードする。
The aforementioned boot program is stored in a part of the common RAM 16. That is, first, a program to be executed by the sub CPU 8 stored in the memory card 15 is read from the main CPU 10 via the interface 14) and stored in the common RAM 16. Common RAM
The program to be executed by the sub CPU 18 stored in the sub CPU 16 is executed by the sub CPU 18 (by executing the boot program).
is read and loaded into the RAM 19 of the sub CPU 8 (■). This common RAM 16 is used by the sub CPU 18
It may be smaller than the capacity of RAM19 exclusively occupied by
For example, if the capacity of the program to be executed by the sub CPU 18 is larger than that of the common RAM 16, the main CPU 10
reads a part of the program from the memory card via the interface 14 and stores it in the common RAM, and the sub CPU 18 performs a plurality of steps to store the stored program in the RAM 19, and the target program is stored in the RAM 19.
Load into.

以上の動作により、メモリカード15内のサブCPU1
8用のプログラムをサブCPU18が前述のブートプロ
グラムによってRAM19に格納するので、そのプログ
ラムを実行することにより、サブCPU1Bには予めブ
ートプログラム等を有さなくても目的のプログラムを実
行させることができる。すなわち、サブCP Uの実行
アドレス上にROMが存在しなくても、ロードを実行さ
せることができる。
With the above operation, the sub CPU 1 in the memory card 15
Since the sub CPU 18 stores the program for 8 in the RAM 19 using the boot program described above, by executing that program, the sub CPU 1B can execute the target program even if it does not have a boot program or the like in advance. . In other words, loading can be executed even if no ROM exists at the execution address of the sub CPU.

前述した説明においては、予めサブCPU18のブート
プログラムをROM12に格納し、そのブートプログラ
ムをロードしてサブCPUが実行し、その実行によって
メモリカード15の内容(サブCPUI Bのプログラ
ム)をRAM19に格納しているが、これに限るもので
はない。例えばメインCPUl0のROM12内にメモ
リカード15からプログラムを読み取って実行するイニ
シャルプログラムローダのみを格納し、メモリカード1
5内に記憶したプログラムによってサブCPUのブート
プログラム、さらにはサブCPUのプログラムを順次ロ
ードすることにより、メインCPUI OのROM12
にイニシャルプログラムローダのみを格納し、それ以外
は全てメモリカードに格納しておけば自由にメインプロ
グラムやサブCPUのプログラムを変更することができ
る。
In the above explanation, the boot program of the sub CPU 18 is stored in the ROM 12 in advance, the boot program is loaded and executed by the sub CPU, and the contents of the memory card 15 (the program of the sub CPU I B) are stored in the RAM 19 by the execution. However, it is not limited to this. For example, only an initial program loader that reads and executes a program from the memory card 15 is stored in the ROM 12 of the main CPU10, and the memory card 1
By sequentially loading the boot program of the sub CPU and further the sub CPU program using the program stored in the ROM 12 of the main CPU I
By storing only the initial program loader in the memory card and storing everything else in the memory card, the main program and sub-CPU programs can be changed freely.

第4図は本発明の他の実施例の詳細な構成図である。メ
インCPU20にはROM、RAMよりなるメモリ2L
液晶表示装置22、メモリカード23、回線インタフェ
ース24、プリンタ25がバスを介して接続している。
FIG. 4 is a detailed configuration diagram of another embodiment of the present invention. The main CPU 20 has 2L of memory consisting of ROM and RAM.
A liquid crystal display device 22, a memory card 23, a line interface 24, and a printer 25 are connected via a bus.

またそのバスには共通RAM26が接続している。メイ
ンCPU20は回線に接続されたサブ端末装置の主とし
た処理を行うものであり、回線から送られた情報の表示
(液晶表示装置22において出力する)やプリンタ25
による例えば表示の情報のプリント、さらには後述する
キーボードから加わった情報の回線インタフェース24
を介した例えばホストコンピュータへの情報の出力等を
行う。これらの処理プログラムはメモリ(ROM)21
に予め格納されており、電源投入後メインCPU20は
この処理プログラムを実行して各種制御を行う。
A common RAM 26 is also connected to the bus. The main CPU 20 performs the main processing of the sub-terminal device connected to the line, and displays information sent from the line (output on the liquid crystal display device 22) and the printer 25.
For example, printing of displayed information, and furthermore, the line interface 24 for information added from the keyboard, which will be described later.
For example, information is output to the host computer via the host computer. These processing programs are stored in the memory (ROM) 21.
After the power is turned on, the main CPU 20 executes this processing program to perform various controls.

一方、電源投入時にはサブCPU27が実行すべきブー
トプログラムを共通RAM26にロードする処理を行う
。第5図はメインCPUのイニシャルルーチンのフロー
チャートである。電源が投入されると、まずメインCP
Uはスタートベクタが格納されているアドレスからスタ
ートベクタを読み出し実行する(START)。そして
まずブー)ROM(ブートプログラムが格納されている
ROM)より共通RAMにプログラム転送するプログラ
ムを実行し、例えば共通RAM26の“′1000”か
ら“’IFFF”にブートプログラムをロードする。こ
の第1に転送するプログラムはサブCPUのロードプロ
グラムであり、このプログラムラメインcPU20に接
続されているバスに接続されている共通RAM26に格
納する(Sl)。本発明の実施例においては1.メイン
CPU20内のアドレス空間上のoooo’“がらIF
FF“′の合計8にバイトが共通RAMの領域である。
On the other hand, when the power is turned on, the sub CPU 27 performs a process of loading a boot program to be executed into the common RAM 26. FIG. 5 is a flowchart of the initial routine of the main CPU. When the power is turned on, the main CP
U reads out the start vector from the address where the start vector is stored and executes it (START). First, a program is executed to transfer the program from the ROM (ROM in which the boot program is stored) to the common RAM, and the boot program is loaded from "'1000" to "'IFFF" of the common RAM 26, for example. The first program to be transferred is a load program for the sub CPU, and is stored in the common RAM 26 connected to the bus connected to the main cPU 20 (Sl). In the embodiment of the present invention, 1. oooo'” IF on the address space in the main CPU 20
A total of 8 bytes of FF"' are the common RAM area.

第6図はサブCPU20とメインCPU27のメモリマ
ツプ図である。前述した処理s1によって、”FOOO
”から“FFFF”に配置されているブートプログラム
を共通RAMの“’1000”から“”IFFF”に格
納する。なお、図示しないがメインCPU内のROMに
は前述の処理等をする処理プログラムを格納している。
FIG. 6 is a memory map diagram of the sub CPU 20 and the main CPU 27. By the process s1 described above, “FOOO
” to “FFFF” is stored in the common RAM from “’1000” to “”IFFF”. Although not shown, a ROM in the main CPU stores a processing program that performs the above-mentioned processing.

処理S1の後にはベクタ領域をセット(Fooo)する
処理S2を実行する。このベクタ領域にはサブCPUが
リセット解除後に実行すべきアドレス(FOOO)が格
納されているものであり、メインCPU内のメモリ上に
は共通RAM26は“’oooo’”から” I F 
F F“であるが、サブCPU27上のメモリマツプ内
においては共通RAMは“”EOOO”から“”FFF
F”に設けられている。ここで“’F F F F’“
以前の例えば10バイトなどはメインCPU20が実行
すべき各種ベクタが格納されており、この部分のみをサ
ブCPUのベクタアドレスとするため、処理S2によっ
て専用のベクタアドレスをセットするのである。このセ
ットの後、メインCPU20はサブCPU26のリセッ
トの解除を行う(S3)。この解除によりサブCPU2
6はリセットが解除され、例えばベクタアドレスが格納
されている“F F F E ”“”FFFF”の16
ビツトよりなる値を読み出し、その値をスタートベクタ
として処理を実行する。
After the process S1, a process S2 for setting a vector area (Fooo) is executed. This vector area stores the address (FOOO) to be executed by the sub CPU after the reset is released, and the common RAM 26 on the memory in the main CPU is "from 'oooo'" to "IF".
However, in the memory map on the sub CPU 27, the common RAM is from "EOOO" to "FFF".
F”.Here, “'FF F F F’”
The previous 10 bytes, for example, store various vectors to be executed by the main CPU 20, and in order to use only this portion as the vector address for the sub CPU, a dedicated vector address is set in step S2. After this setting, the main CPU 20 cancels the reset of the sub CPU 26 (S3). By this cancellation, sub CPU2
6 is reset-released, for example, 16 of "FFFFE""FFFF" where the vector address is stored.
A value consisting of bits is read and processing is executed using that value as a start vector.

前述したように共通RAM26はサブCPU26内のメ
モリ上では、“EOOO”′から” F F F F”
に存在するので、前述した処理S2によって書かれた領
域から処理を実行する。
As mentioned above, the common RAM 26 is stored in the memory in the sub CPU 26 from "EOOO" to "F F F F".
Therefore, the process is executed from the area written in the above-mentioned process S2.

第7図はサブCPUのブートプログラムのフローチャー
トである。前述した処理S3によって、サブCPUがリ
セット解除されると実行を開始し、まず“Fooo”か
らローダプログラムをスター)(Sll)L、正規プロ
グラムを“o o o o ”から“’3FFF”に格
納にする処理SL2を実行する。
FIG. 7 is a flowchart of the sub CPU boot program. When the sub CPU is released from reset by the above-mentioned process S3, it starts execution, first starts the loader program from "Fooo" (Sll)L, and stores the regular program from "o o o o" to "'3FFF". SL2 is executed.

サブCPU27にはバスを介してキーボード制御回路2
8、ブザー29、時計30、RAM31、電源制御回路
32、バーコードリーダ33が接続しており、これらの
各回路を制御するプログラムをこのRAM31にロード
する。このメインCPUとサブCPU間のデータの転送
は、共通RA、 M26を介して行われる。
The keyboard control circuit 2 is connected to the sub CPU 27 via the bus.
8, a buzzer 29, a clock 30, a RAM 31, a power supply control circuit 32, and a barcode reader 33 are connected, and a program for controlling each of these circuits is loaded into the RAM 31. This data transfer between the main CPU and sub CPU is performed via the common RA, M26.

前述したようにブートプログラムは“”FOOO”から
“F F F F ”に格納されており、“Eooo”
から“E F F F ”はサブCPU27内のメモリ
上に存在するがまだ未使用の部分である。この未使用の
部分を使用し、サブCPU26用のプログラムをメイン
CPU20は先ず格納する(S4)。
As mentioned above, the boot program is stored in "FOOO" to "FFFF", and "Eooo"
"E F F F" exists on the memory in the sub CPU 27 but is still an unused portion. Using this unused portion, the main CPU 20 first stores a program for the sub CPU 26 (S4).

そしてそのプログラムを前述の処理S12において、サ
ブCPU27のRAM31上に格納するのである。サブ
CP tJは続いてプログラムロードが終了したか否か
を判別しく513)、してない場合(NO)には再度処
理312を繰り返す。
The program is then stored on the RAM 31 of the sub CPU 27 in the aforementioned process S12. The sub CP tJ then determines whether the program loading has been completed (513), and if not (NO), repeats the process 312 again.

前述したように転送すべき媒体は共通RAM26を介し
て行われるものであり、共通RAM26上の転送に用い
る領域は、”oooo”から“IFFF”(サブCPU
アドレスで“E O00”から” E F F F”)
であるので、正規のプログラムは分割されてロードされ
る。
As mentioned above, the medium to be transferred is via the common RAM 26, and the area used for transfer on the common RAM 26 is from "oooo" to "IFFF" (sub CPU
From “E O00” to “E F F F”)
Therefore, the regular program is loaded in parts.

処理(313)によってプログラムロードが終了したと
きには、ベクタ領域をセットすなわちローダプログラム
が格納されている“’FOOO”から“FFFF’”内
のベクタ領域“’FFFF”以前の例えば10バイトに
“0000″から実行すべきアドレスを格納する。また
、それ以外例えば割り込み等を行う場合には、割り込み
等のプログラムベクタをも格納する(314)。そして
ベクタが格納された領域以外の共通RA M H域を消
去(“F000″′から“FFFO”“)し、そしてサ
ブCPUは処理を終了する(315)。例えば、ソフト
ウェアインターラプタ等の処理をコマンドを実行するこ
とにより、ベクタから自動的にソフトウェアインターラ
プタの実行に移り、例えばソフトウエアインターラブタ
がOOOO”に予め設定されているならば、ロードした
サブCPUのプログラムを実行する。
When the program loading is completed by the process (313), the vector area is set, that is, the vector area is set to "0000", for example, 10 bytes before "'FFFF" in the vector area "'FFFF'" from "'FOOO" where the loader program is stored. Stores the address to be executed from. In addition, if an interrupt or the like is to be performed, a program vector for the interrupt or the like is also stored (314). Then, the common RAM H area other than the area where the vector is stored is erased (from "F000" to "FFFO"), and the sub CPU ends the processing (315). For example, the processing of the software interrupter, etc. By executing the command, the vector automatically shifts to execution of the software interrupter. For example, if the software interrupter is preset to "OOOO", the loaded sub-CPU program is executed.

一方、メインCPU20はサブCPU26のプログラム
のロードが終了したか否かを前述した処理S12、S1
3に対応して動作しており、正規プログラムを読み出し
て共通RAM26に格納する処理(S 4 ) 、さら
にはサブプログラムがロード終了であるかの判断(S5
)を実行し、終了−でないときには再度処理S4を繰り
返す。この繰り返しが前述のサブCPUの処理S12、
S13に対応するものであり、この2つのそれぞれの動
作によってサブCPU内に正規のプログラムがロードさ
れる。そして判断S5において、サブプログラムのロー
ドが終了したと判断したときには(YES) 、メイン
プログラムは正常動作すなわち通常の動作の処理を行う
。例えば、この正常処理とはターミナルの処理である。
On the other hand, the main CPU 20 determines whether or not the loading of the program of the sub CPU 26 is completed in the above-described processes S12 and S1.
3, it reads the regular program and stores it in the common RAM 26 (S4), and also determines whether the subprogram has finished loading (S5).
) is executed, and if it is not the end, the process S4 is repeated again. This repetition is the process S12 of the sub CPU mentioned above.
This corresponds to S13, and the regular program is loaded into the sub CPU by these two operations. Then, in judgment S5, when it is judged that the loading of the subprogram is completed (YES), the main program performs normal operation, that is, normal operation processing. For example, this normal processing is terminal processing.

サブCPU27がイニシャル処理を終了すると、例えば
キーボードからのコマンドの入力やバーコードリーグの
読み取りが行うことができ、基本的な端末装置としての
処理制御を行う。
When the sub CPU 27 completes the initial processing, it can input commands from the keyboard, read barcode leagues, and perform basic processing control as a terminal device.

前述したような処理によって、メモリ21内に格納され
ているプログラムをサブプログラムにロードし、サブプ
ログラムはそのロードしたプログラムを実行するので、
サブCPU内にROMを設けることなく、例えばメイン
CPU20の1個のROMにそれぞれメインCPUのプ
ログラム、サブCPUのプログラムさらにはロード用プ
ログラムを格納することにより、1個のROMでシステ
ムを立ち上げることができる。
Through the process described above, the program stored in the memory 21 is loaded into the subprogram, and the subprogram executes the loaded program.
For example, by storing the main CPU program, sub CPU program, and loading program in one ROM of the main CPU 20, the system can be started up with one ROM without providing a ROM in the sub CPU. I can do it.

一方、前述した処理においては、メモリカード23に予
め格納されているとしているが、これに限るものではな
い。例えば、メモリ21内にはメインCPUのブートR
OMのみを格納し、メモリカード23や回線インタフェ
ース24からメインCPUのプログラムさらにはサブC
PUのブートプログラムさらにはサブCPUの正規のプ
ログラムを入力してもよい。このときには第5図点線部
で示すように、メインCPUは電源立ち上げと同時にベ
クタを読み出しくS7)、続いてメインCPUのブート
ROM先頭アドレスから実行し、メモリカード23や回
線インタフェース24を介して加わるプログラムをメモ
リ21 (RAM)にロードする(S9)。また、サブ
CPUのブートプログラムとサブCPUのプログラムを
も同時にRAM21に格納する。そしてメインCPU2
0をサブリセットして前述の処理(Sl)から行う。
On the other hand, in the process described above, it is assumed that the information is stored in the memory card 23 in advance, but the information is not limited to this. For example, the main CPU's boot R is stored in the memory 21.
Only the OM is stored, and the main CPU program and even the sub-C are stored from the memory card 23 and line interface 24.
The PU boot program or even the sub-CPU regular program may be input. At this time, as shown by the dotted line in FIG. 5, the main CPU reads the vector at the same time as the power is turned on (S7), and then executes the vector from the start address of the main CPU's boot ROM and reads the vector via the memory card 23 and line interface 24. The program to be added is loaded into the memory 21 (RAM) (S9). Further, the sub CPU boot program and the sub CPU program are also stored in the RAM 21 at the same time. and main CPU2
0 is sub-reset and the process starts from the above-mentioned process (Sl).

以上のような処理によって、例えば、メモリ21内のR
OMには基本的なメインCPU20が実行すべきブート
プログラムを格納するだけで、外部からプログラムをロ
ードしてすべての制御プログラムをロードすることがで
きる。
Through the above processing, for example, R in the memory 21 is
By simply storing a basic boot program to be executed by the main CPU 20 in the OM, programs can be loaded from the outside and all control programs can be loaded.

以上述べたように、本発明によれば、1個のROMにブ
ートプログラムだけを格納し、メモリカードや回線から
プログラムをロードすることによってユーザ対応の制御
を自由に変更することができる。
As described above, according to the present invention, by storing only the boot program in one ROM and loading the program from a memory card or line, it is possible to freely change the control for the user.

〔発明の効果〕〔Effect of the invention〕

以上述べたように、本発明によれば、サブCPUにRO
Mを設けることなく、システムを立ち上げることができ
るので、仕様等の変更が発生しても簡単に使用変更に対
応することができる。また、ユーザ対応をも自由に行う
ことができる。
As described above, according to the present invention, the sub CPU has RO
Since the system can be started up without providing M, even if a change in specifications etc. occurs, it is possible to easily respond to changes in use. Additionally, users can be handled freely.

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

第1図は本発明の原理ブロック図、 第2図は本発明の実施例のシステム構成図、第3図は本
発明の実施例の各CPUの実行処理の説明図、 第4図は本発明の他の実施例の詳細な構成図、第5図は
メインCPUのイニシャルルーチンのフローチャート、 第6図はサブCPUとメインCPUのメモリマツプ図、 第7図はサブCPUのブートプログラムのフローチャー
トである。 1 ・・・ メインCPU。 2 ・・・ サブCPU。 3 ・・・ 第1の記憶手段、 4 ・・・ 第2の記憶手段、 5 ・・・ バス。
Fig. 1 is a principle block diagram of the present invention, Fig. 2 is a system configuration diagram of an embodiment of the present invention, Fig. 3 is an explanatory diagram of execution processing of each CPU in an embodiment of the present invention, and Fig. 4 is a diagram of the present invention. FIG. 5 is a flow chart of the initial routine of the main CPU, FIG. 6 is a memory map diagram of the sub CPU and main CPU, and FIG. 7 is a flow chart of the boot program of the sub CPU. 1... Main CPU. 2... Sub CPU. 3... first storage means, 4... second storage means, 5... bus.

Claims (1)

【特許請求の範囲】 メインCPU(1)と少なくとも1個のサブCPU(2
)とよりなるマルチCPUシステムにおいて、 前記メインCPU(1)のバス(5)に接続され、ブー
トプログラムを記憶する第1の記憶手段(3)と、 前記メインCPU(1)のバス(5)と前記サブCPU
(2)のバス(6)に接続される第2の記憶手段(4)
とを設け、 前記メインCPU(1)によって前記第2の記憶手段(
4)に前記ブートプログラムをロードし、前記サブCP
U(2)は該ロードしたブートプログラムを実行して前
記サブCPU(2)のバスに接続されたRAMに前記サ
ブCPU(2)が実行すべきプログラムをロードするこ
とを特徴とするマルチCPUのプログラムロード方式。
[Claims] A main CPU (1) and at least one sub CPU (2
), a first storage means (3) connected to the bus (5) of the main CPU (1) and storing a boot program; and a bus (5) of the main CPU (1). and said sub CPU
a second storage means (4) connected to the bus (6) of (2);
and the main CPU (1) stores the second storage means (
4) Load the boot program into the sub CP
A multi-CPU characterized in that U (2) executes the loaded boot program and loads a program to be executed by the sub CPU (2) into a RAM connected to a bus of the sub CPU (2). Program loading method.
JP24919689A 1989-09-27 1989-09-27 Program loading system for multi-cpu Pending JPH03111961A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP24919689A JPH03111961A (en) 1989-09-27 1989-09-27 Program loading system for multi-cpu

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP24919689A JPH03111961A (en) 1989-09-27 1989-09-27 Program loading system for multi-cpu

Publications (1)

Publication Number Publication Date
JPH03111961A true JPH03111961A (en) 1991-05-13

Family

ID=17189335

Family Applications (1)

Application Number Title Priority Date Filing Date
JP24919689A Pending JPH03111961A (en) 1989-09-27 1989-09-27 Program loading system for multi-cpu

Country Status (1)

Country Link
JP (1) JPH03111961A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007018071A (en) * 2005-07-05 2007-01-25 Nec Corp Multiprocessor system, method for starting multiprocessor system, boot program and portable terminal
JP2007026318A (en) * 2005-07-20 2007-02-01 Nec Corp Mobile phone, system and method for generating program, and system and method for updating program
JP2009176232A (en) * 2008-01-28 2009-08-06 Fujitsu Ltd Starting device, starting method, and starting program

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007018071A (en) * 2005-07-05 2007-01-25 Nec Corp Multiprocessor system, method for starting multiprocessor system, boot program and portable terminal
JP2007026318A (en) * 2005-07-20 2007-02-01 Nec Corp Mobile phone, system and method for generating program, and system and method for updating program
JP2009176232A (en) * 2008-01-28 2009-08-06 Fujitsu Ltd Starting device, starting method, and starting program

Similar Documents

Publication Publication Date Title
US5557766A (en) High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank
EP0524530B1 (en) DMA controller
US5367639A (en) Method and apparatus for dynamic chaining of DMA operations without incurring race conditions
JP2829091B2 (en) Data processing system
JPH09160861A (en) Information-processing system for transfer of command block to local processing side without intervention of local processor
JP2007035058A (en) Method of carrying out configuration of two or more agents in computer system, and device for it
JPH02267634A (en) Interrupt system
JP7470685B2 (en) Programming and Controlling Computational Units in Integrated Circuits
US7024495B2 (en) Programmable controller
JP5131269B2 (en) Multi-processing system
JPH03111961A (en) Program loading system for multi-cpu
JPH0916409A (en) Microcomputer
JP2568017B2 (en) Microprocessor and data processing system using the same
JPS6049352B2 (en) data processing equipment
JP2906958B2 (en) User program loading method
JP2001125659A (en) Information processor
JP2000040057A (en) Computer system, buffer controller and transferring method
JP2000207190A (en) System and method for rewrite firmware program
JP3168845B2 (en) Digital signal processor
JP3442972B2 (en) Information processing apparatus and rewritable nonvolatile memory rewriting method
JP2503318B2 (en) Character I / O control method
JPH0587856B2 (en)
JP3127737B2 (en) Digital signal processor
JP2515367B2 (en) DMA transfer control device
EP0503390A1 (en) Microcomputer having direct memory access mode