JP3074984B2 - Memory management device - Google Patents

Memory management device

Info

Publication number
JP3074984B2
JP3074984B2 JP04332771A JP33277192A JP3074984B2 JP 3074984 B2 JP3074984 B2 JP 3074984B2 JP 04332771 A JP04332771 A JP 04332771A JP 33277192 A JP33277192 A JP 33277192A JP 3074984 B2 JP3074984 B2 JP 3074984B2
Authority
JP
Japan
Prior art keywords
module
page
memory
page number
processor
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.)
Expired - Fee Related
Application number
JP04332771A
Other languages
Japanese (ja)
Other versions
JPH06180666A (en
Inventor
裕明 角田
哲 長尾
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 JP04332771A priority Critical patent/JP3074984B2/en
Publication of JPH06180666A publication Critical patent/JPH06180666A/en
Application granted granted Critical
Publication of JP3074984B2 publication Critical patent/JP3074984B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

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

【0001】[0001]

【産業上の利用分野】この発明は、産業用プラントコン
トローラ等の制御命令(POL命令)を格納するプログ
ラムメモリのページ管理機構をもつメモリ管理装置に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory management apparatus having a program memory page management mechanism for storing a control instruction (POL instruction) for an industrial plant controller or the like.

【0002】[0002]

【従来の技術】図8は従来のページ管理方式を示す図
で、1はモジュールを実行するプロセッサ、4は実行モ
ジュールを格納するメモリIC、3は実行モジュールを
ページ分割し、どのモジュールが、どのページに割り当
てられているかを管理するページ管理テーブル、5はペ
ージ番号(ページNo)に対応するページの物理番地
(ページのベースアドレス)をページ毎に管理するため
のページバンクテーブルである。
2. Description of the Related Art FIG. 8 is a diagram showing a conventional page management system, in which 1 is a processor for executing a module, 4 is a memory IC for storing an execution module, 3 is a page division of an execution module, A page management table 5 for managing whether pages are allocated to pages is a page bank table for managing a physical address (page base address) of a page corresponding to a page number (page No.) for each page.

【0003】プロセッサ1によって実行される実行モジ
ュールのプログラムエリアの情報は、プロセッサ1に搭
載される基本ソフト(通常オペレーティングシステム;
OSと呼ばれる)によって管理され、それぞれのエリア
をページ分割した場合、そのエリアの使用ページNoを
ページ管理テーブル3によって、実行モジュール毎に管
理する。例えば、実行モジュールNo.0のプログラム
が3ページに分割され、そのときのページNoが0、1
0、3であった場合、OSはモジュールNo.0の実行
開始において、ページ管理テーブル3からページNo.
0をロードし、プロセッサ1のプログラムカウンタにペ
ージNoのエントリ0と、ページNo.0からのオフセ
ットをセットする。
The information of the program area of the execution module executed by the processor 1 is stored in basic software (normal operating system;
When each area is divided into pages, the used page number of the area is managed by the page management table 3 for each execution module. For example, the execution module No. 0 is divided into three pages, and the page numbers at that time are 0, 1
If the number is 0 or 3, the OS sends the module number. 0 at the start of execution of page No. 0 from the page management table 3.
0 is loaded into the program counter of the processor 1 and the entry 0 of the page number and the page number. Set the offset from 0.

【0004】プロセッサ1はモジュール実行時、OSに
よってプログラムカウンタにセットされた値を基に、プ
ログラムカウンタからページNoを取り出し、ページバ
ンクテーブル5から指定されたページNoに対応するペ
ージの物理番地、ここでは100Hを取り出す。ページ
バンクテーブル5はページNoに対応するページの物理
番地(ページのベースアドレス)をページ毎に管理する
ためのテーブルであり、通常メモリに格納されている。
次にプログラムカウンタからオフセットを取り出し、ペ
ージの物理番地とを連結、あるいは加算することによっ
て、メモリIC4に存在する実行モジュールの物理アド
レスを生成する。ここで、ページのサイズはページバン
クテーブル5に格納されるページアドレス(物理アドレ
ス)を変更することで設定可能である。
When executing a module, the processor 1 extracts a page number from the program counter based on a value set in the program counter by the OS, and obtains a physical address of a page corresponding to the page number specified from the page bank table 5. Then take out 100H. The page bank table 5 is a table for managing a physical address (page base address) of a page corresponding to a page number for each page, and is normally stored in a memory.
Next, the physical address of the execution module existing in the memory IC 4 is generated by taking out the offset from the program counter and linking or adding the physical address of the page. Here, the page size can be set by changing the page address (physical address) stored in the page bank table 5.

【0005】[0005]

【発明が解決しようとする課題】従来のメモリ管理装置
は以上のように構成され、プロセッサ1がプログラムメ
モリ4から実行モジュールを読み出す場合、プログラム
カウンタのページNoからページバンクテーブル5に格
納されているページアドレスを読みだし、オフセットと
連結する必要があるため、次のような弊害が発生する。
即ち、ページサイズ小さく設定した場合、ページバン
クテーブルでページアドレスを管理する際のエントリ数
が多くなり、必然的に使用メモリが増大し、コストが上
がる。また、モジュール実行時、メモリへのアドレス生
成は高速化が要求されるが、従来のページ管理における
メモリアドレッシングのプロセスは複雑で、プロセッサ
によるアドレス生成時のテーブルアクセスのオーバヘッ
ドが大きい。また、プロセッサが実際に実行しているモ
ジュールNoや使用中のページNoを知りたい場合に
も、その判別処理に長時間を要すという問題点もあっ
た。
The conventional memory management device is configured as described above. When the processor 1 reads an execution module from the program memory 4, the execution module is stored in the page bank table 5 from the page number of the program counter. Since it is necessary to read the page address and concatenate it with the offset, the following adverse effects occur.
That is, when the page size is set to be small, the number of entries for managing the page address in the page bank table increases, which inevitably increases the used memory and increases the cost. Further, at the time of module execution, high-speed generation of addresses in a memory is required, but the process of memory addressing in the conventional page management is complicated, and the overhead of table access at the time of address generation by a processor is large. Further, when it is desired to know the module No. actually executed by the processor and the page No. being used, there is also a problem that it takes a long time for the determination process.

【0006】この発明は以上のような問題点を解消する
ためになされたもので、ページバンクテーブルを不要と
し、プロセッサによるアドレス生成時のテーブルアクセ
スのオーバヘッドを無くし、更に、簡単なH/W構成で
ページ管理を行うことのできるメモリ管理装置を実現す
ることを目的とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems. The present invention eliminates the need for a page bank table, eliminates the overhead of table access when an address is generated by a processor, and has a simple H / W configuration. It is an object of the present invention to realize a memory management device capable of performing page management by using the same.

【0007】[0007]

【課題を解決するための手段】この発明の請求項1に係
るメモリ管理装置は、モジュール毎に割り当てられたペ
ージ番号を格納するページ管理テーブル、プロセッサの
命令実行要求に応じ上記ページ管理テーブルから実行す
べきモジュールの命令に対応するページ番号を抽出しそ
のページ番号の格納を行うページ番号設定手段、命令実
行毎に動作するプログラムカウンタ、および上記ページ
番号設定手段に格納されたページ番号と上記プログラム
カウンタの出力とから上記メモリにアクセスして実行モ
ジュールの命令を読み出すべきアドレスを生成するアド
レス生成回路を備えたものである。
According to a first aspect of the present invention, there is provided a memory management apparatus which stores a page number assigned to each module, and executes the page management table in response to an instruction execution request from a processor. You
Page number setting means for extracting the page number corresponding to the instruction of the module to be stored and storing the page number, a program counter which operates each time the instruction is executed, and the page number stored in the page number setting means and the program counter. An address generation circuit is provided for accessing the memory from the output and generating an address from which an instruction of the execution module is to be read.

【0008】この発明の請求項2に係るメモリ管理装置
は、モジュール実行中、メモリへのアドレスが1ページ
を越えたか否かをプログラムカウンタの出力から判別
し、越えたときはページ管理テーブルから当該モジュー
ルに割り当てられた次のページ番号を抽出し、ページ番
号設定手段に格納するページ番号をこの新たに抽出した
ページ番号に更新するようにしたものである。
According to a second aspect of the present invention, during execution of a module, it is determined whether or not an address to a memory has exceeded one page from an output of a program counter. The next page number assigned to the module is extracted, and the page number stored in the page number setting means is updated to the newly extracted page number.

【0009】この発明の請求項3に係るメモリ管理装置
は、メモリの容量およびデータバス幅を設定するメモリ
種別設定手段を備え、この設定したメモリ種別によりプ
ログラムカウンタの桁上がりビット数を変更するように
したものである。
A memory management device according to a third aspect of the present invention includes a memory type setting means for setting a memory capacity and a data bus width, and changes the number of carry bits of a program counter according to the set memory type. It was made.

【0010】この発明の請求項4に係るメモリ管理装置
は、ページ管理テーブルに、各モジュールの実行中に有
効状態となるフラッグを設け、このフラッグの状態から
当該プロセッサにおける実行中のモジュールおよび使用
中のページ番号を判別し、上記モジュールの実行中に当
該モジュールの書き換え要求があると、未使用のページ
番号を検索してそのページ番号に対応するメモリ内に、
修正後のモジュールプログラムを書き込み、実行中の上
記モジュールを一旦停止して、替わりに修正後の上記モ
ジュールプログラムによりモジュールの再起動を行う
のである。また、この発明の請求項5に係るメモリ管理
装置は、複数のプロセッサを有するマルチプロセッサの
上記各プロセッサに互いに同一のページ管理テーブルと
メモリとを備え、一のプロセッサがダウンした場合、当
該プロセッサのページ管理テーブルのフラッグの状態の
情報を他の正常プロセッサに送ることにより、プロセッ
サ間のバンプレス切り替えを可能としたものである。
According to a fourth aspect of the present invention, there is provided a memory management apparatus, wherein a flag which is enabled during execution of each module is provided in the page management table, and the module being executed and the module being used in the processor are determined based on the state of the flag. Page number of the
When there is a request to rewrite the module, an unused page
Find the number and in the memory corresponding to that page number,
Write the modified module program and execute it
Stop the module temporarily and replace it with the above module
The module is restarted by the module program . According to a fifth aspect of the present invention, there is provided a memory management device, wherein each of the processors of a multiprocessor having a plurality of processors includes the same page management table and memory, and when one processor goes down, By sending the flag status information of the page management table to other normal processors, bumpless switching between processors is enabled.

【0011】[0011]

【作用】この発明においては、プロセッサからモジュー
ルの実行命令が出されると、ページ管理テーブルにアク
セスして当該モジュールに割り当てられたページ番号を
抽出する。抽出されたページ番号はページ番号設定手段
に格納され、このデータとプログラムカウンタの出力と
からアドレス生成回路が順次実行モジュールの命令を読
み出すべきメモリのアドレスを生成する。
According to the present invention, when a processor issues an instruction to execute a module, the processor accesses the page management table and extracts the page number assigned to the module. The extracted page number is stored in the page number setting means, and an address generation circuit generates an address of a memory from which the instruction of the execution module is to be sequentially read from the data and the output of the program counter.

【0012】生成したアドレスが1ページを越えると、
再度ページ管理テーブルにアクセスして残りのページ番
号を抽出する。ページ番号設定手段の格納データをこの
新しいページ番号に更新し、アドレス生成を続行する。
When the generated address exceeds one page,
Access the page management table again to extract the remaining page numbers. The data stored in the page number setting means is updated to this new page number, and the address generation is continued.

【0013】メモリ種別設定手段を設け、このデータに
よりプログラムカウンタの桁上がりビット数を変更する
ようにすれば、メモリ容量やデータバス幅が異なるメモ
リに対してもそのまま適用することができる。
If memory type setting means is provided and the number of carry bits of the program counter is changed by this data, the present invention can be applied to memories having different memory capacities and data bus widths.

【0014】また、ページ管理テーブルに所定のフラッ
グを設けることにより、実行中のモジュールや使用中の
ページ番号を即座に判別することができ、例えば、オン
ラインでモジュールを書き換えたりマルチプロセッサで
ホットスタンバイ動作を実現する場合等の処理内容が簡
便迅速に達成し得る。
By providing a predetermined flag in the page management table, it is possible to immediately determine the module being executed or the page number being used. For example, the module can be rewritten online or a hot standby operation can be performed by a multiprocessor. Can be easily and quickly achieved.

【0015】[0015]

【実施例】【Example】

実施例1.以下、この発明の実施例1を図について説明
する。図1において、1は命令実行の一連の動作を管理
し命令実行のタイミングを生成するプロセッサ、2はプ
ロセッサ1からの命令実行要求を受けて命令を実行する
命令実行H/W、3は各実行モジュール毎のページNo
の書かれているページ管理テーブル、4はモジュールを
格納するメモリICで、その空間はページ単位に細分化
されている。更に、21はステータスレジスタ21A、
およびページ番号設定手段としてのページNoレジスタ
21B等のレジスタを含むレジスタファイル、23はメ
インプロセッサからの起動によりメモリIC4にアクセ
スして命令をフエッチ、デコード、実行する命令実行
部、22は命令実行毎に桁上がりするプログラムカウン
タ、24はメモリIC4にアクセスして命令をリードす
るためのアドレスを生成するアドレス生成回路である。
Embodiment 1 FIG. Hereinafter, a first embodiment of the present invention will be described with reference to the drawings. In FIG. 1, reference numeral 1 denotes a processor that manages a series of instruction execution operations and generates instruction execution timing, 2 denotes an instruction execution H / W that executes an instruction in response to an instruction execution request from the processor 1, and 3 denotes each execution. Page No. for each module
Is a memory management IC for storing modules, and its space is subdivided in page units. Further, 21 is a status register 21A,
And a register file including a register such as a page number register 21B as a page number setting means; 23, an instruction execution unit that accesses the memory IC 4 to start, decode, and execute an instruction by starting from the main processor; A reference numeral 24 denotes an address generation circuit for generating an address for accessing the memory IC 4 and reading an instruction.

【0016】次に動作について説明する。POL命令の
実行は、プロセッサ1による命令実行H/W2の内部の
ステータスレジスタ21Aへの読み出し動作によって行
われる。命令実行H/W2は、このレジスタ21Aへの
読み出し動作があると、POLの1命令を実行する。P
OL命令実行時のバスエラーや演算エラー等のエラー情
報が、POL命令実行結果ステータスとして、ステータ
スレジスタ21Aに格納される。プロセッサ1には、そ
の読み出し動作の結果として、POL命令が実行される
と共に、ステータスレジスタ21Aの内容が、命令実行
H/W2からプロセッサ1に返される。プロセッサ1
は、命令実行H/W2から返されたステータスレジスタ
21Aの内容をチェックし、命令実行H/W2によるP
OL命令実行が正常に行われたかを確認する。プロセッ
サ1は、チェック結果によって、エラー等があればそれ
に応ずるエラー処理を行い、エラーが無ければ再度ステ
ータスレジスタ21Aへのアクセスを行うことで、次の
POL命令の実行を行う。
Next, the operation will be described. The execution of the POL instruction is performed by the processor 1 reading out the status register 21A inside the instruction execution H / W2. The instruction execution H / W2 executes one POL instruction when there is a read operation to the register 21A. P
Error information such as a bus error and an operation error during execution of the OL instruction is stored in the status register 21A as a POL instruction execution result status. As a result of the read operation, the processor 1 executes the POL instruction and returns the contents of the status register 21A from the instruction execution H / W2 to the processor 1. Processor 1
Checks the contents of the status register 21A returned from the instruction execution H / W2,
Check whether the OL instruction has been executed normally. Based on the check result, the processor 1 performs an error process corresponding to the error if there is any error, and executes the next POL instruction by accessing the status register 21A again if there is no error.

【0017】ここでページ管理テーブル3を使用したア
ドレス変換方法について図2のフローチャートを使用し
て説明するプロセッサ1は実行モジュールを起動する
時、S11においてページ管理テーブル3よりモジュー
ルNoからページNoを抽出し、S12でページNoレ
ジスタ21Bにその値をセットする。ここでページNo
は各ページのエントリを示す。
Here, an address conversion method using the page management table 3 will be described with reference to the flowchart of FIG . When starting the execution module, the processor 1 extracts the page number from the module number from the page management table 3 in S11, and sets the value in the page number register 21B in S12. Here page No.
Indicates an entry of each page.

【0018】命令実行H/W2では、S21でセットさ
れたこのページNoレジスタ21Bとプログラムカウン
タ22とをS22で連結することにより、S13でプロ
セッサ1からのステータスレジスタ21Aへの読み出し
動作によるPOL命令実行のタイミングで、メモリIC
4へのアドレスを生成する。
In the instruction execution H / W2, by linking the page number register 21B set in S21 and the program counter 22 in S22, the POL instruction execution by the reading operation from the processor 1 to the status register 21A in S13. At the timing of
4 is generated.

【0019】プログラムカウンタ22は各々のページの
ベース位置からの相対番地を示す。S23に示すように
POLの1命令実行毎に1インクリメントされていく。
このインクリメント動作によって、S24でページを越
えるアクセスが発生したかどうかをチェックし、越えた
ときはS25でその情報をステータスレジスタ21Aに
セットする。
The program counter 22 indicates the relative address of each page from the base position. As shown in S23, each time the POL instruction is executed, the value is incremented by one.
By this increment operation, it is checked in S24 whether or not an access beyond the page has occurred, and if it has been exceeded, the information is set in the status register 21A in S25.

【0020】通常、プロセッサ1はS13からS14の
ステップを繰り返し、命令実行H/W2はS22、S2
3、S24のステップを繰り返して制御命令を実行して
いく。
Normally, the processor 1 repeats the steps from S13 to S14, and the instruction execution H / W2 is S22, S2
3. The control command is executed by repeating the steps of S24.

【0021】POLの1命令を実行し、アドレスが1ペ
ージを越える場合(S24でYESの場合)、ステータ
スレジスタ21Aにその情報を格納する(S25)。S
13にてプロセッサ1はそのステータスレジスタ21A
の値により1ページを越えたアクセスが発生したことを
知るとS11に戻り、ページ管理テーブル3を参照して
S12で実行中のモジュールに対応する次のページNo
を抽出し、命令実行H/W2の内部にあるページNoレ
ジスタ21Bにその値をセットし、S13で命令実行を
再スタートする。
When one instruction of POL is executed and the address exceeds one page (YES in S24), the information is stored in the status register 21A (S25). S
At 13 the processor 1 sets its status register 21A
When it is determined that an access beyond one page has occurred based on the value of (1), the process returns to S11, and refers to the page management table 3 to check the next page No. corresponding to the module being executed in S12.
Is extracted, the value is set in the page number register 21B inside the instruction execution H / W2, and the instruction execution is restarted in S13.

【0022】以上のように、この実施例ではページ管理
テーブル3を有効に活用し、これから該当するページN
oを抽出してページNo設定レジスタ21Bに格納し、
プログラムカウンタ22からの出力とでアドレス生成回
路24が直接メモリIC4へアクセスするアドレスを生
成するので、ページバンクテーブルを使用しこれから読
み出したページアドレスにオフセットを結合してメモリ
ICへのアクセスを管理する従来の方式に比較して、処
理内容が簡単となって処理速度が向上する。
As described above, in this embodiment, the page management table 3 is effectively used, and the corresponding page N
o is extracted and stored in the page number setting register 21B,
Since the address generation circuit 24 generates an address for directly accessing the memory IC 4 with the output from the program counter 22, the access to the memory IC is managed by using the page bank table and combining the offset with the page address read from this. Compared with the conventional method, the processing content is simplified and the processing speed is improved.

【0023】実施例2.以下、この発明の実施例2を図
3および図4について説明する。図3において、21C
はメモリIC4の容量およびデータバス幅を設定するメ
モリ種別設定レジスタであり、図1と同一の部分には同
一の符号を付してその説明を省略する。
Embodiment 2 FIG. Hereinafter, a second embodiment of the present invention will be described with reference to FIGS. In FIG. 3, 21C
Is a memory type setting register for setting the capacity of the memory IC 4 and the data bus width. The same parts as those in FIG. 1 are denoted by the same reference numerals, and description thereof is omitted.

【0024】次に動作について説明する。通常使用する
メモリIC4はその容量、データバス幅によって必要な
アドレスの数は異なる。例えば、256kビットのSR
AM素子でもデータバス幅が1ビットではアドレスが1
8本必要であり、データバス幅が4ビットではアドレス
は16本必要である。メモリ容量が変われば、アドレス
数も異なる。よって、アドレス生成に使用するプログラ
ムカウンタ22の必要なビット数もメモリIC4の種別
によって変更する必要がある。
Next, the operation will be described. The number of necessary addresses of the normally used memory IC 4 differs depending on its capacity and data bus width. For example, 256 kbit SR
The address is 1 even if the data bus width is 1 bit even in the AM element.
Eight are required, and if the data bus width is 4 bits, 16 addresses are required. If the memory capacity changes, the number of addresses also changes. Therefore, it is necessary to change the required number of bits of the program counter 22 used for address generation according to the type of the memory IC 4.

【0025】図4において、このメモリIC4の容量お
よびデータバス幅を予めメモリ種別設定レジスタ21C
に設定し、プログラムカウンタ22の桁上がりするビッ
ト位置を設定値からデコードして可変にできるようにす
る。例えば、1ページ4kステップの命令をプログラム
カウンタ22でカウントするには12ビット必要である
が、容量の少ないメモリを使用して1ページ1kステッ
プの命令を格納した場合には、10ビットのプログラム
カウンタとなるので、メモリ種別設定レジスタ21Cに
メモリの種別を設定し、その情報をデコードし、プログ
ラムカウンタ22のビット11およびビット10をOF
Fにする。このように、メモリ種別設定レジスタ21C
の情報により、プログラムカウンタ22のページの桁上
がりを確認するビット位置を可変とし、ページNo設定
レジスタ21Bと連結することによって、生成するアド
レスをメモリ種別に応じて変更することが可能となる。
以降、命令の実行は実施例1と同様の方法で行う。
In FIG. 4, the capacity and data bus width of the memory IC 4 are set in advance in the memory type setting register 21C.
, So that the bit position at which the carry of the program counter 22 carries can be decoded from the set value and made variable. For example, a program counter 22 needs 12 bits to count a 4k step instruction per page, but if a 1 k step instruction per page is stored using a small-capacity memory, a 10 bit program counter Therefore, the memory type is set in the memory type setting register 21C, the information is decoded, and the bits 11 and 10 of the program counter 22 are turned off.
Change to F. Thus, the memory type setting register 21C
By changing the bit position for checking the carry of the page of the program counter 22 according to the information described above and connecting it to the page number setting register 21B, it is possible to change the generated address according to the memory type.
Thereafter, the execution of the instruction is performed in the same manner as in the first embodiment.

【0026】以上により、メモリ容量やデータバス幅が
異なるものにもそのまま適用することができ、より広範
囲な機能、プロセスの装置への適用が可能となる。
As described above, the present invention can be applied to devices having different memory capacities and data bus widths as they are, and a wider range of functions and processes can be applied to apparatuses.

【0027】実施例3.以下、この発明の実施例3を図
5および図6を用いて説明する。プログラムのメンテナ
ンスをプロセス制御中に行うには、対象プロセスを制御
しているモジュールの実行中断時間を最小限に抑えなけ
ればならない。
Embodiment 3 FIG. Hereinafter, a third embodiment of the present invention will be described with reference to FIGS. In order to perform the maintenance of the program during the process control, it is necessary to minimize the execution interruption time of the module controlling the target process.

【0028】ページ管理テーブル3には、図5で示され
るような実行モジュールの存在が有効か無効かを示すモ
ジュール有効フラグ3A、3B、3C、3Dが追加され
ている。今、実行中のモジュールの有効フラグ3A、3
B、3Cは、各々ONされている。
Module valid flags 3A, 3B, 3C and 3D are added to the page management table 3 as shown in FIG. 5 to indicate whether the execution module is valid or invalid. The valid flags 3A, 3A of the module currently being executed
B and 3C are each ON.

【0029】ここで、実行中のモジュールNo.4に、
メンテナンス用ツールからのプログラム書き換え要求が
あると、S31にてプロセッサ1は、ページ管理テーブ
ル3からモジュールNo.4に必要なページ数(図5の
場合、2ページ)と、使用していない空きページ(図5
の場合、No.40とNo.46)を検索し、メンテナ
ンス用ツールから送られたきたプログラムをこれらペー
ジNo.40とNo.46とに書き込む(S32)と同
時にページ管理テーブル3に以上の組み合わせを追加す
る(S33)。プロセッサ1のプログラム書き込み動作
中も、モジュールNo.4のPOL命令実行は中断しな
い。
Here, the module No. being executed. 4,
When there is a program rewrite request from the maintenance tool, in step S31, the processor 1 reads the module number from the page management table 3. 4 (2 pages in FIG. 5) and unused unused pages (FIG. 5).
In the case of No., 40 and No. 46) and retrieve the program sent from the maintenance tool into these page Nos. 40 and No. At the same time, the above combination is added to the page management table 3 (S33). During the program writing operation of the processor 1, the module No. 4 is not interrupted.

【0030】プログラムの書き込み動作が終了した時点
で、モジュールNo.4の実行を一旦停止し(S3
4)、モジュール有効フラグの変更のため、S35にて
今まで実行していたページNo.9とNo.12のペー
ジ管理テーブルのモジュール有効フラグ3AをOFF
し、新たに書き込んだページNo.40とNo.46の
モジュール有効フラグ3DをONする。モジュール有効
フラグ3Aおよび3Dの変更が完了したら、モジュール
No.4の実行を再起動する(S36)。以降、命令の
実行は実施例1と同様であり省略する。
When the program write operation is completed, the module No. 4 is temporarily stopped (S3
4), in order to change the module valid flag, the page No. executed so far in S35. 9 and no. Turn off module valid flag 3A in page management table 12
Then, the newly written page No. 40 and No. The module valid flag 3D of 46 is turned ON. When the change of the module valid flags 3A and 3D is completed, the module No. 4 is restarted (S36). Thereafter, the execution of the instruction is the same as in the first embodiment, and a description thereof will be omitted.

【0031】以上のように、この実施例のものでは、簡
便な処理でオンラインによるモジュールの書き換えが可
能となり、書き換えに要する実行停止時間も極く短時間
で済む。
As described above, in this embodiment, the module can be rewritten online with simple processing, and the execution stop time required for the rewriting can be extremely short.

【0032】実施例4. 図7はこの発明の実施例4を示すもので、複数のコント
ローラを使用するマルチプロセッサシステムに適用した
ものである。そして、ここでは、先のフラッグ情報を利
用することにより、あるプロセッサがダウンした場合に
正常プロセッサへのンプレス切り替えを実現すること
を目的としている。
Embodiment 4 FIG. FIG. 7 shows a fourth embodiment of the present invention, which is applied to a multiprocessor system using a plurality of controllers. And here, by utilizing the previous flag information, aims at realizing a bar Npuresu switching to normal processor when a processor goes down.

【0033】このマルチプロセッサシステムでは、各プ
ロセッサ10〜1Nはお互いに他のプロセッサの実行モ
ジュールを全て持っており、同一のページ管理テーブル
31〜3Nと同一のプログラムメモリ41〜4Nが存在
する。但し、ページ管理テーブル31〜3Nのモジュー
ル有効フラグは、自プロセッサが実行しているモジュー
ルのみ有効になっている。例えばプロセッサ10ではモ
ジュールNo.9のみが有効(31BがON)で、モジ
ュールNo.4、モジュールNo.63が無効(31
A、31CがOFF)、プロセッサ11ではモジュール
No.4が有効(32AがON)で、モジュールNo.
9、モジュールNo.63が無効(32B、32CがO
FF)であるように、各々のプロセッサ上では別々のモ
ジュールが実行されている。
In this multiprocessor system, each of the processors 10 to 1N has all the execution modules of the other processors, and has the same page management tables 31 to 3N and the same program memories 41 to 4N. However, the module validity flags of the page management tables 31 to 3N are valid only for the module being executed by the own processor. For example, in the processor 10, the module No. 9 is valid (31B is ON) and module No. 4, Module No. 63 is invalid (31
A, 31C are OFF). 4 is valid (32A is ON), and module No.
9, Module No. 63 is invalid (32B, 32C is O
FF), a separate module is running on each processor.

【0034】今、プロセッサ10に障害が発生し、復旧
不可能な故障を認識すると、プロセッサ10は、他のプ
ロセッサ、例えばプロセッサ11に対してページ管理テ
ーブル31のモジュール有効フラグの情報31A、31
B、31Cを通知するだけで、プロセッサ11は、これ
までプロセッサ10で実行していたモジュールおよび使
用していたページNoを把握することができるので、自
プロセッサ内のページ管理テーブル32のモジュール有
効フラグ32A、32B、32CのON/OFFを変更
して直ちにプロセッサ10の代行処理動作を立ち上げる
ことができる。
Now, when a failure occurs in the processor 10 and an irrecoverable failure is recognized, the processor 10 sends the information 31A, 31 of the module valid flag of the page management table 31 to another processor, for example, the processor 11.
The processor 11 can know the module that has been executed by the processor 10 and the page number that has been used up to now only by notifying the B and 31C. Therefore, the module valid flag of the page management table 32 in its own processor is provided. By changing ON / OFF of 32A, 32B, and 32C, the proxy processing operation of the processor 10 can be started immediately.

【0035】実施例5.なお、上記各実施例ではアドレ
ス生成回路24から出力されるアドレスが、1ページを
越えたか否かを判別する手段を設けて、越えた場合はペ
ージ管理テーブル3から残りページNoを抽出、ページ
No設定レジスタ21Bに入力する構成としたが、各モ
ジュールに割り当てるページ数がすべて1ページである
場合は、このような判別手段が不要となることは当然で
ある。
Embodiment 5 FIG. In each of the above-described embodiments, means for determining whether the address output from the address generation circuit 24 has exceeded one page is provided. If the address has exceeded, the remaining page number is extracted from the page management table 3, and Although the configuration is such that the input is made to the setting register 21B, if the number of pages allocated to each module is all one, it is natural that such a determination means becomes unnecessary.

【0036】[0036]

【発明の効果】この発明に係るメモリ管理装置は以上の
ように、所定のページ管理テーブル、ページ番号設定手
段、プログラムカウンタ、およびアドレス生成回路を備
えたので、メモリの利用率を上げるためページサイズを
小さくしても、比較的安価で簡単な構成で高速に処理す
ることができる。
As described above, the memory management device according to the present invention includes the predetermined page management table, the page number setting means, the program counter, and the address generation circuit. Can be processed at a high speed with a relatively inexpensive and simple configuration.

【0037】また、生成したアドレスが1ページを越え
たか否かを判別し、越えたときページ管理テーブルから
残りのページ番号を抽出設定するようにすれば、モジュ
ールによって必要メモリ容量が大幅に異なるシステムへ
の適用が容易となる。
Further, if it is determined whether or not the generated address exceeds one page and the remaining page number is extracted and set from the page management table when the generated address is exceeded, the required memory capacity differs greatly depending on the module. It is easy to apply to

【0038】更に、メモリ種別によりプログラムカウン
タの桁上がりビット数を変更するようにすれば、メモリ
の個々の種別に合わせた煩雑な回路設計を回避でき、開
発、設計に要する費用、期間の大幅削減が実現する。
Furthermore, if the number of carry bits of the program counter is changed according to the type of memory, complicated circuit design according to each type of memory can be avoided, and the cost and period required for development and design can be greatly reduced. Is realized.

【0039】また、ページ管理テーブルに所定のフラッ
グを設けることにより、実行中のモジュールや使用中の
ページ番号を即座に判別することができ、モジュールの
実行中にも、実行モジュールの書き換えが可能になり、
メインテナンスが簡便迅速に行える。更に、上記フラッ
グをマルチプロセッサの各ページ管理テーブルに設ける
ことにより、あるプロセッサがダウンした場合に正常プ
ロセッサへのバンプレス切り替えが可能となる。
By providing a predetermined flag in the page management table, the module being executed or the page number being used can be immediately identified , and the
Even during execution, the execution module can be rewritten,
Maintenance is Ru can easily quickly. Further, by providing the flag in each page management table of the multiprocessor, it is possible to switch bumpless to a normal processor when a certain processor goes down.

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

【図1】この発明の実施例1によるメモリ管理装置を示
すブロック図である。
FIG. 1 is a block diagram illustrating a memory management device according to a first embodiment of the present invention.

【図2】図1のメモリ管理装置の処理動作を示すフロー
チャートである。
FIG. 2 is a flowchart illustrating a processing operation of the memory management device of FIG. 1;

【図3】この発明の実施例2によるメモリ管理装置を示
すブロック図である。
FIG. 3 is a block diagram showing a memory management device according to a second embodiment of the present invention.

【図4】図3におけるプログラムカウンタ22の桁上げ
変更方式を示すブロック図である。
FIG. 4 is a block diagram showing a carry change method of a program counter 22 in FIG. 3;

【図5】この発明の実施例3によるメモリ管理装置を示
すブロック図である。
FIG. 5 is a block diagram showing a memory management device according to a third embodiment of the present invention.

【図6】図5のメモリ管理装置の処理動作を示すフロー
チャートである。
FIG. 6 is a flowchart showing a processing operation of the memory management device of FIG. 5;

【図7】この発明の実施例4によるメモリ管理装置を示
すブロック図である。
FIG. 7 is a block diagram showing a memory management device according to a fourth embodiment of the present invention.

【図8】従来のメモリ管理装置を示すブロック図であ
る。
FIG. 8 is a block diagram showing a conventional memory management device.

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

1 プロセッサ 2 命令実行H/W 21 レジスタファイル 21A ステータスレジスタ 21B ページNo設定レジスタ 21C メモリ種別設定レジスタ 22 プログラムカウンタ 23 命令実行部 24 アドレス生成回路 3 ページ管理テーブル 4 メモリIC Reference Signs List 1 processor 2 instruction execution H / W 21 register file 21A status register 21B page number setting register 21C memory type setting register 22 program counter 23 instruction execution unit 24 address generation circuit 3 page management table 4 memory IC

───────────────────────────────────────────────────── フロントページの続き (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 - 12/06 ──────────────────────────────────────────────────続 き Continued on the front page (58) Field surveyed (Int.Cl. 7 , DB name) G06F 12/00-12/06

Claims (5)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 プロセッサからの命令実行要求を受けて
H/Wが実行するモジュールをページ単位に分割して格
納するメモリを備え、上記プロセッサの命令実行要求
応じて実行すべきモジュールの命令を上記メモリから読
み出すためのメモリ管理装置において、 上記モジュール毎に割り当てられたページ番号を格納す
るページ管理テーブル、上記プロセッサの命令実行要求
に応じ上記ページ管理テーブルから実行すべきモジュー
ルの命令に対応するページ番号を抽出しそのページ番号
の格納を行うページ番号設定手段、命令実行毎に動作す
るプログラムカウンタ、および上記ページ番号設定手段
に格納されたページ番号と上記プログラムカウンタの出
力とから上記メモリにアクセスして実行モジュールの命
令を読み出すべきアドレスを生成するアドレス生成回路
を備えたことを特徴とするメモリ管理装置。
An instruction execution request from a processor is received.
A memory management device that includes a memory that divides a module executed by the H / W into pages and stores the module, and reads out an instruction of a module to be executed in response to an instruction execution request of the processor from the memory; A page management table for storing page numbers assigned to the modules, and a module to be executed from the page management table in response to an instruction execution request from the processor.
Page number setting means for extracting the page number corresponding to the instruction of the file and storing the page number, a program counter which operates each time the instruction is executed, and the page number stored in the page number setting means and the output of the program counter And an address generation circuit for generating an address from which the memory is accessed to read the instruction of the execution module.
【請求項2】 モジュール実行中、メモリへのアドレス
が1ページを越えたか否かをプログラムカウンタの出力
から判別し、越えたときはページ管理テーブルから当該
モジュールに割り当てられた次のページ番号を抽出し、
ページ番号設定手段に格納するページ番号をこの新たに
抽出したページ番号に更新するようにしたことを特徴と
する請求項1記載のメモリ管理装置。
2. During execution of a module, it is determined from the output of the program counter whether or not the address to the memory has exceeded one page, and if it has, the next page number assigned to the module is extracted from the page management table. And
2. The memory management device according to claim 1, wherein the page number stored in the page number setting means is updated to the newly extracted page number.
【請求項3】 メモリの容量およびデータバス幅を設定
するメモリ種別設定手段を備え、この設定したメモリ種
別によりプログラムカウンタの桁上がりビット数を変更
するようにしたことを特徴とする請求項1または2記載
のメモリ管理装置。
3. The memory device according to claim 1, further comprising a memory type setting means for setting a memory capacity and a data bus width, wherein the number of carry bits of the program counter is changed according to the set memory type. 3. The memory management device according to 2.
【請求項4】 ページ管理テーブルに、各モジュールの
実行中に有効状態となるフラッグを設け、このフラッグ
の状態から当該プロセッサにおける実行中のモジュール
および使用中のページ番号を判別し、上記モジュールの
実行中に当該モジュールの書き換え要求があると、未使
用のページ番号を検索してそのページ番号に対応するメ
モリ内に、修正後のモジュールプログラムを書き込み、
実行中の上記モジュールを一旦停止して、替わりに修正
後の上記モジュールプログラムによりモジュールの再起
動を行うことを特徴とする請求項1ないし3のいずれか
に記載のメモリ管理装置。
4. A flag which becomes effective during execution of each module is provided in the page management table, and a module being executed and a page number being used in the processor are determined from the state of this flag, and
If there is a request to rewrite the module during execution,
Search for the page number for the
Write the modified module program in the memory,
Stop the above running module and modify it instead
Module restart by the above module program
4. The memory management device according to claim 1, wherein the memory management device performs an operation .
【請求項5】 複数のプロセッサを有するマルチプロセ
ッサの上記各プロセッサに互いに同一のページ管理テー
ブルとメモリとを備え、上記ページ管理テーブルに、各
モジュールの実行中に有効状態となるフラッグを設け、
このフラッグの状態から当該プロセッサにおける実行中
のモジュールおよび使用中のページ番号を判別可能と
し、一のプロセッサがダウンした場合、当該プロセッサ
のページ管理テーブルの上記フラッグの状態の情報を他
の正常プロセッサに送ることにより、プロセッサ間のバ
ンプレス切り替えを可能としたことを特徴とする請求項
1ないし3のいずれかに記載のメモリ管理装置。
5. A multiprocessor having a plurality of processors, wherein each of the processors has the same page management table and memory, and the page management table has
Provide a flag that will be enabled during the execution of the module,
Running on this processor from the state of this flag
Module and page number in use can be determined
Claims and, if one processor is down by sending the information of the state of the flag in the page management table of the processor to other normal processors, characterized in that the enabling bumpless switching between processors
4. The memory management device according to any one of 1 to 3 .
JP04332771A 1992-12-14 1992-12-14 Memory management device Expired - Fee Related JP3074984B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP04332771A JP3074984B2 (en) 1992-12-14 1992-12-14 Memory management device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP04332771A JP3074984B2 (en) 1992-12-14 1992-12-14 Memory management device

Publications (2)

Publication Number Publication Date
JPH06180666A JPH06180666A (en) 1994-06-28
JP3074984B2 true JP3074984B2 (en) 2000-08-07

Family

ID=18258653

Family Applications (1)

Application Number Title Priority Date Filing Date
JP04332771A Expired - Fee Related JP3074984B2 (en) 1992-12-14 1992-12-14 Memory management device

Country Status (1)

Country Link
JP (1) JP3074984B2 (en)

Also Published As

Publication number Publication date
JPH06180666A (en) 1994-06-28

Similar Documents

Publication Publication Date Title
JP3074984B2 (en) Memory management device
US6393498B1 (en) System for reducing processor workloads with memory remapping techniques
EP1103898A2 (en) Microprocessor and memory
JP2627370B2 (en) Development support system
JP2853593B2 (en) Download device
JPH0784886A (en) Method and unit for cache memory control
JP3442972B2 (en) Information processing apparatus and rewritable nonvolatile memory rewriting method
JP3772003B2 (en) Memory management system and data management method
JP2659979B2 (en) Computer system
JPH06266618A (en) Information processor provided with main storage controller having error correction/detection function
JPH0378052A (en) Virtual storage control system
JPH11194968A (en) Storage control device and storage control method in data processing system
JPH0566992A (en) Data access system for eeprom
JPH05127979A (en) Memory address space extending device
JPH0756638B2 (en) Memory address space expansion device
JP2002259209A (en) Arithmetic processing system
JPH08202647A (en) Virtual port for computer input and output device
JP2001209578A (en) Management system for memory update history
JPH03127126A (en) Information processor
JP2002318779A (en) Device, and access method for its register
JPH0320834A (en) Initial diagnostic method for information processor
JPS6144339B2 (en)
JPH01287760A (en) Virtual storage control system
JPH0481934A (en) Information processor
JPH09297704A (en) Method and device for processing information

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees