JPH05173889A - System for monitoring memory block - Google Patents

System for monitoring memory block

Info

Publication number
JPH05173889A
JPH05173889A JP26891291A JP26891291A JPH05173889A JP H05173889 A JPH05173889 A JP H05173889A JP 26891291 A JP26891291 A JP 26891291A JP 26891291 A JP26891291 A JP 26891291A JP H05173889 A JPH05173889 A JP H05173889A
Authority
JP
Japan
Prior art keywords
memory block
memory
cpu
address
monitoring
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
JP26891291A
Other languages
Japanese (ja)
Inventor
Tomoya Nakano
知也 中野
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP26891291A priority Critical patent/JPH05173889A/en
Publication of JPH05173889A publication Critical patent/JPH05173889A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PURPOSE:To prevent access where a program exceeds the range of a given memory block in a system where data is transmitted and received between programs through the use of the memory block. CONSTITUTION:A memory block monitoring device 5 which is provided with a memory block monitoring table 6 is provided between CPU 1 and a memory 9. A virtual address received from CPU 1 is checked through the use of the memory block monitoring table 6 so that access to the outside of the range of the memory block is prevented.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、リアルタイムシステム
などで主に共通リソースとして用いられるメモリブロッ
クの割り当てに関し、特にそのメモリブロックの割り当
てられた範囲を越えたアクセスの監視方式に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to allocation of a memory block mainly used as a common resource in a real-time system or the like, and more particularly to a method of monitoring access beyond the allocated range of the memory block.

【0002】[0002]

【従来の技術】従来から、メモリブロックはブロックご
とに使用中であるか否かは、オペレーティングシステム
(OS)によって管理されていた。しかし、プログラム
によるメモリブロックの範囲を越えたメモリアクセスに
ついては検出できないため、監視されていなかった。
2. Description of the Related Art Conventionally, whether or not each memory block is in use is managed by an operating system (OS). However, it was not monitored because the memory access beyond the memory block range by the program cannot be detected.

【0003】[0003]

【発明が解決しようとする課題】解決しようとする問題
点は、メモリブロックが連続したメモリ領域に割り当て
られているので、あるプログラムがメモリブロックの範
囲を越えて書き込みを行えば、他のメモリブロックの内
容を破壊する点である。したがって、この破壊されたメ
モリブロックを使用しているプログラムの正常な動作が
保証できなくなる。つまり、問題点はあるプログラムの
誤った処理が、他のプログラムの処理を誤らせることに
なるという点である。
The problem to be solved is that the memory blocks are allocated to consecutive memory areas. Therefore, if a program writes data beyond the range of the memory blocks, the other memory blocks will be deleted. The point is to destroy the contents of. Therefore, the normal operation of the program using the destroyed memory block cannot be guaranteed. In other words, the problem is that erroneous processing of one program causes erroneous processing of another program.

【0004】[0004]

【課題を解決するための手段】CPUとメモリとの間
に、メモリブロック先頭の実アドレスとブロックサイズ
とから構成されるメモリブロック監視テーブルを備えた
メモリブロック監視装置を設ける。そのメモリブロック
監視装置において、CPUから入力されるアドレス識別
子と,制御ビットと,メモリブロック番号と,オフセッ
トとから構成される仮想アドレスを,メモリブロック監
視テーブルを用いて実アドレスに変換し,このアドレス
変換の際に仮想アドレスがメモリブロックの範囲内であ
るか否かを監視することを特徴とする。
A memory block monitoring device having a memory block monitoring table composed of a real address of a memory block head and a block size is provided between a CPU and a memory. In the memory block monitoring device, a virtual address composed of an address identifier, a control bit, a memory block number, and an offset input from the CPU is converted into a real address using the memory block monitoring table, and this address is converted. It is characterized by monitoring whether or not the virtual address is within the range of the memory block during the conversion.

【0005】[0005]

【実施例】次に、図面を参照して本発明の実施例につい
て説明する。まず、概要を説明する。図1は、本発明の
一実施例を示す全体構成図である。図1において、1は
CPU,2はデータバス,3はアドレスバス,4は割り
込み線,5はメモリブロック監視装置,6はメモリブロ
ック監視テーブル,7はデータバス,8はアドレスバ
ス,9はメモリである。図2は、図1に示すメモリブロ
ック監視装置5の内部のメモリブロック監視テーブルの
構成図である。図2において、20はメモリブロック
(N)の先頭実アドレス,21はメモリブロック(N)
のサイズ,22はメモリブロック(N+1)の先頭実ア
ドレス,23はメモリブロック(N+1)のサイズであ
る。図3は、CPU1からメモリブロック監視装置5に
渡す仮想アドレスの構成図である。図3において、30
はアドレス識別子,31はブロック番号,32は制御ビ
ット,33はオフセットである。
Embodiments of the present invention will now be described with reference to the drawings. First, an outline will be described. FIG. 1 is an overall configuration diagram showing an embodiment of the present invention. In FIG. 1, 1 is a CPU, 2 is a data bus, 3 is an address bus, 4 is an interrupt line, 5 is a memory block monitoring device, 6 is a memory block monitoring table, 7 is a data bus, 8 is an address bus, and 9 is a memory. Is. FIG. 2 is a configuration diagram of a memory block monitoring table inside the memory block monitoring device 5 shown in FIG. In FIG. 2, reference numeral 20 is the start real address of the memory block (N), and 21 is the memory block (N).
, 22 is the head real address of the memory block (N + 1), and 23 is the size of the memory block (N + 1). FIG. 3 is a configuration diagram of virtual addresses passed from the CPU 1 to the memory block monitoring device 5. In FIG. 3, 30
Is an address identifier, 31 is a block number, 32 is a control bit, and 33 is an offset.

【0006】図1において、CPU1はアドレスバス3
を通して図3に示す仮想アドレスをメモリブロック監視
装置5に渡す。メモリブロック監視装置5では、メモリ
ブロック監視テーブル6を用いて、与えられた仮想アド
レスをチェックする。その値が正常であれば、上記仮想
アドレスを実アドレスに変換し、アドレスバス8を通し
てメモリ9にアクセスする。仮想アドレスの値が実アド
レスに変換できない場合には、この旨を割り込み線4に
よってCPUに通知する。
In FIG. 1, the CPU 1 is an address bus 3
The virtual address shown in FIG. 3 is passed to the memory block monitoring device 5 through. The memory block monitoring device 5 uses the memory block monitoring table 6 to check the given virtual address. If the value is normal, the virtual address is converted into a real address and the memory 9 is accessed through the address bus 8. When the value of the virtual address cannot be converted into the real address, the fact is notified to the CPU through the interrupt line 4.

【0007】図4は、メモリ9におけるメモリブロック
の割り当て例を示す説明図である。図5は、図4に示す
ようにメモリブロックが割り当てられた場合のメモリブ
ロック監視テーブル6の構成例を示す説明図である。図
6は、仮想アドレスから実アドレスへの変換例を示す説
明図である。ここで、図4〜図6にしたがって、メモリ
ブロック監視装置5の動作を具体的に説明する。図4に
示すように、メモリブロックがメモリ9上に割り付けら
れ、メモリブロック監視テーブル6が図5に示す値とな
っている場合には、メモリブロック監視装置5は図6に
示す変換動作を行う。
FIG. 4 is an explanatory diagram showing an example of memory block allocation in the memory 9. FIG. 5 is an explanatory diagram showing a configuration example of the memory block monitoring table 6 when the memory blocks are allocated as shown in FIG. FIG. 6 is an explanatory diagram showing an example of conversion from a virtual address to a real address. Here, the operation of the memory block monitoring device 5 will be specifically described with reference to FIGS. As shown in FIG. 4, when the memory block is allocated on the memory 9 and the memory block monitoring table 6 has the values shown in FIG. 5, the memory block monitoring device 5 performs the conversion operation shown in FIG. .

【0008】図7は、メモリブロック監視装置5の動作
を示すフローチャートである。メモリブロック監視装置
5では、メモリブロック監視テーブル6を用いて、図7
に示すようにして与えられた仮想アドレスをチェックす
る。ステップ70においては、CPU1から受け取った
仮想アドレスの値が“FF020010”であればステ
ップ71,ステップ72,ステップ73,ステップ74
へと進み,ステップ75において実アドレス“0008
0010”をメモリ9に出力する。仮想アドレスの値が
“FF020301”であれば、ステップ74において
オフセットが“0301”であって、サイズが“010
0”であるので、サイズよりもオフセットが大きくなる
ため、ステップ76に進み、CPU1に対して割り込み
線4により変換エラーを通知する。
FIG. 7 is a flow chart showing the operation of the memory block monitoring device 5. In the memory block monitoring device 5, the memory block monitoring table 6 is used to
Check the given virtual address as shown in. In step 70, if the value of the virtual address received from the CPU 1 is "FF020010", then step 71, step 72, step 73, step 74
In step 75, the real address "0008" is entered.
0010 ”is output to the memory 9. If the value of the virtual address is“ FF020301 ”, the offset is“ 0301 ”and the size is“ 010 ”in step 74.
Since it is 0 ″, the offset becomes larger than the size, so the routine proceeds to step 76, where a conversion error is notified to the CPU 1 through the interrupt line 4.

【0009】仮想アドレスの値が“00010001”
であれば、ステップ71においてアドレス識別子30が
“00”であるので、ステップ78へ進み、メモリ9に
対して実アドレス“00010001”を出力する。仮
想アドレスの値が“FF070000”であれば、ステ
ップ73において制御ビット32が“1”であるので、
ステップ76に進み、CPU1に対して割り込み線4に
より変換エラーを通知する。仮想アドレスの値が“FF
080010”であれば、ステップ74においてオフセ
ットが“0010”であって、サイズが“0000”で
あるので、ステップ76に進み、CPUIに対して割り
込み線4により変換エラ−を通知する。仮想アドレスの
値が“FF000002”であれば、ステップ72にお
いてブロック番号31が“00”であるので、ステップ
77へ進み、メモリブロック監視装置5の内部のメモリ
ブロック監視テーブル6の2番地にアクセスする。
The value of the virtual address is "00010001"
If so, since the address identifier 30 is "00" in step 71, the process proceeds to step 78, and the real address "00010001" is output to the memory 9. If the value of the virtual address is “FF070000”, the control bit 32 is “1” in step 73.
In step 76, the CPU 1 is notified of the conversion error by the interrupt line 4. The value of the virtual address is "FF
If it is "08010", since the offset is "0010" and the size is "0000" in step 74, the process proceeds to step 76 and the CPU I is notified of the conversion error by the interrupt line 4. If the value is "FF000002", since the block number 31 is "00" in step 72, the process proceeds to step 77, and the address 2 of the memory block monitoring table 6 inside the memory block monitoring device 5 is accessed.

【0010】[0010]

【発明の効果】以上説明したように本発明では、プログ
ラムによってメモリブロックをアクセスする際、メモリ
ブロックの範囲外のアクセスを検出することができるの
で、あるプログラムの誤った処理が他のプログラムの処
理を誤らせることを防ぐことができるという利点があ
る。
As described above, according to the present invention, when a memory block is accessed by a program, it is possible to detect an access outside the range of the memory block. Therefore, an erroneous process of one program is processed by another program. There is an advantage that it can be prevented from making a mistake.

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

【図1】本発明の一実施例を示す全体構成図である。FIG. 1 is an overall configuration diagram showing an embodiment of the present invention.

【図2】図1に示すメモリブロック監視装置の内部のメ
モリブロック監視テーブルの構成図である。
FIG. 2 is a configuration diagram of a memory block monitoring table inside the memory block monitoring device shown in FIG.

【図3】CPUからメモリブロック監視装置に渡す仮想
アドレスの構成図である。
FIG. 3 is a configuration diagram of virtual addresses passed from a CPU to a memory block monitoring device.

【図4】メモリにおけるメモリブロックの割り当て例を
示す説明図である。
FIG. 4 is an explanatory diagram showing an example of memory block allocation in a memory.

【図5】図4に示すようにメモリブロックが割り当てら
れた場合のメモリブロック監視テーブルの構成例を示す
説明図である。
5 is an explanatory diagram showing a configuration example of a memory block monitoring table when a memory block is allocated as shown in FIG.

【図6】仮想アドレスから実アドレスへの変換例を示す
説明図である。
FIG. 6 is an explanatory diagram showing an example of conversion from a virtual address to a real address.

【図7】メモリブロック監視装置の動作を示すフローチ
ャートである。
FIG. 7 is a flowchart showing the operation of the memory block monitoring device.

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

1 CPU 2,7 データバス 3,8 アドレスバス 4 割り込み線 5 メモリブロック監視装置 6 メモリブロック監視テーブル 9 メモリ 20 メモリブロック(N)の先頭実アドレス 21 メモリブロック(N)のサイズ 22 メモリブロック(N+1)の先頭実アドレス 23 メモリブロック(N+1)のサイズ 30 アドレス識別子 31 ブロック番号 32 制御ビット 33 オフセット 70〜78 処理ステップ 1 CPU 2,7 Data bus 3,8 Address bus 4 Interrupt line 5 Memory block monitoring device 6 Memory block monitoring table 9 Memory 20 Memory block (N) start real address 21 Memory block (N) size 22 Memory block (N + 1 ) Head real address 23 size of memory block (N + 1) 30 address identifier 31 block number 32 control bit 33 offset 70-78 processing step

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 メモリを構成する複数のメモリブロック
の状態を監視するためのメモリブロック監視テーブル
と、 CPUから入力される仮想アドレスをメモリ上の実アド
レスに変換するための変換手段と、 前記変換において前記CPUから入力された仮想アドレ
スがメモリブロックの範囲を越えているか否かを前記メ
モリブロック監視テーブルによって監視するための監視
手段とを備え,前記CPUと前記メモリとの間に設けら
れたメモリブロック監視装置によって構成したメモリブ
ロック監視方式。
1. A memory block monitoring table for monitoring the states of a plurality of memory blocks forming a memory, a conversion unit for converting a virtual address input from a CPU into a real address on the memory, and the conversion. A monitoring means for monitoring by the memory block monitoring table whether or not the virtual address input from the CPU exceeds the range of the memory block, and a memory provided between the CPU and the memory. A memory block monitoring method configured by a block monitoring device.
【請求項2】 メモリブロック監視テーブルは複数組の
メモリブロックの先頭実アドレスと,ブロックサイズと
を備えて構成した請求項1のメモリブロック監視方式。
2. The memory block monitoring system according to claim 1, wherein the memory block monitoring table is configured to include head real addresses of a plurality of sets of memory blocks and a block size.
【請求項3】 仮想アドレスはアドレス識別子と,制御
ビットと,メモリブロック番号と,オフセットとから構
成した請求項1のメモリブロック監視方式。
3. The memory block monitoring system according to claim 1, wherein the virtual address comprises an address identifier, a control bit, a memory block number, and an offset.
JP26891291A 1991-09-20 1991-09-20 System for monitoring memory block Pending JPH05173889A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP26891291A JPH05173889A (en) 1991-09-20 1991-09-20 System for monitoring memory block

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP26891291A JPH05173889A (en) 1991-09-20 1991-09-20 System for monitoring memory block

Publications (1)

Publication Number Publication Date
JPH05173889A true JPH05173889A (en) 1993-07-13

Family

ID=17464999

Family Applications (1)

Application Number Title Priority Date Filing Date
JP26891291A Pending JPH05173889A (en) 1991-09-20 1991-09-20 System for monitoring memory block

Country Status (1)

Country Link
JP (1) JPH05173889A (en)

Similar Documents

Publication Publication Date Title
JPH06290076A (en) Debugger device
JPS6055857B2 (en) How to identify memory
JPH05173889A (en) System for monitoring memory block
JPS6345649A (en) Action tracing system for processor
CN109697144B (en) Hard disk detection method of electronic equipment and electronic equipment
JPH02230356A (en) Bus extension device for information processor
JPH09167117A (en) Microcomputer and real time system using the microcomputer
JPS60134351A (en) System for registration of queue and detection of malfunction
JP2588903B2 (en) Data processing system
JPH03129536A (en) Brake address detecting device
JPH05165758A (en) Address setting system for input/output device
JPS59216227A (en) Data transfer system
JPS58114114A (en) Error reporting system for channel controller
JPH11212858A (en) Method and device for managing memory pool area
JPH05216779A (en) Memory monitor circuit
JPS6042496B2 (en) Parity error processing method
JPH1020968A (en) Selective hardware resetting circuit
JPS62154050A (en) Data processing system for control equipment
JPS61165160A (en) Bus controlling system
JPS6162142A (en) I/o controller
JPH03129531A (en) Control device
JPH0229833A (en) Maintenance diagnostic system
JPS62237554A (en) Digital output unit
JPS6388644A (en) Central processing unit
JPS63131246A (en) Page release device