JPS63156261A - Decision system for memory access condition - Google Patents

Decision system for memory access condition

Info

Publication number
JPS63156261A
JPS63156261A JP61304593A JP30459386A JPS63156261A JP S63156261 A JPS63156261 A JP S63156261A JP 61304593 A JP61304593 A JP 61304593A JP 30459386 A JP30459386 A JP 30459386A JP S63156261 A JPS63156261 A JP S63156261A
Authority
JP
Japan
Prior art keywords
data
information
memory
read
area
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
JP61304593A
Other languages
Japanese (ja)
Inventor
Toshio Oma
大間 俊雄
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 Ltd
Original Assignee
Fujitsu 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 Ltd filed Critical Fujitsu Ltd
Priority to JP61304593A priority Critical patent/JPS63156261A/en
Publication of JPS63156261A publication Critical patent/JPS63156261A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To decide whether the operation of a memory is possible or not at each time of access by storing information classification data correspondingly to addresses and reading out this data at the time of memory access from a processor to compare it with operation classification information from the processor. CONSTITUTION:Information classification data indicating address area information of the memory is read out from an information classification storage part 4b and is stored in an information classification register 6. Meanwhile, a processor 1 sends operation classification data indicating the classification of instruction read or data read/write together with an address and data information at the time of accessing the memory and stores this operation classification data in an operation classification register 5. A deciding circuit 7 compares stored data of registers 5 and 6 to decide whether the access operation is possible or not. Consequently, the erroneous access to an unused area or the memory access to destroy the contents of an instruction area or a read-only data area is immediately detected. Thus, the safety of the system is improved.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はメモリアクセス条件の判定方式に係り、特に蓄
積プログラム方式におけるメモリアクセスの動作可否を
判定する方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a method for determining memory access conditions, and particularly to a method for determining whether or not memory access is possible in a storage program method.

〔従来の技術〕[Conventional technology]

従来のメモリアクセス条件を判定する方式としては、第
2図(最終図)に示すメモリキ一方式が知られている。
As a conventional method for determining memory access conditions, a memory access method shown in FIG. 2 (final diagram) is known.

第2図において、15は記憶部、16は中央制御装2で
、中央制御装置16から書込み動作時に送られてくるキ
ー情報がキーレジスタ17に格納される。
In FIG. 2, 15 is a storage unit, 16 is a central control unit 2, and key information sent from the central control unit 16 during a write operation is stored in a key register 17.

一方、誤った書込み動作により、記憶部15の内容が破
壊されることを防ぐため、記憶部15の2にワード単位
に書込み動作の条件を記憶するロックレジスタ18が設
けられている。
On the other hand, in order to prevent the contents of the storage section 15 from being destroyed due to an erroneous write operation, a lock register 18 is provided in the storage section 2 of the storage section 15 to store write operation conditions in units of words.

キー比較回路19はキーレジスタ17よりのキー情報と
、ロックレジスタ18よりの書込み動作の条件とを比較
し、書込み可、不可を下記の表に従って判定する。
The key comparison circuit 19 compares the key information from the key register 17 and the write operation conditions from the lock register 18, and determines whether writing is possible or not according to the table below.

制御回路20はキー比較回路1つの判定結果が書込み可
の場合にのみ、記憶部15への書込み動作を行ない、条
件が不一致で書込み不可の場合は中央制御装置16へエ
ラーを通知する。
The control circuit 20 performs a write operation to the storage unit 15 only when the determination result of one key comparison circuit is that writing is possible, and notifies the central control unit 16 of an error when the conditions do not match and writing is not possible.

メモリキーによるメモリ内容の保護は、書込み動作のと
きのみ行ない、その他の場合は常に条件一致として扱う
The memory contents are protected by the memory key only during a write operation, and in other cases it is always treated as a condition match.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

しかるに、上記のメモリキ一方式は記憶部15への書込
み動作時のみ条件を判定し、メモリ破壊を防止する方式
であるため、命令読出し、データ読出し時の条件不一致
を検出することができなかった。
However, since the above-mentioned memory key system determines the conditions only during the write operation to the storage unit 15 and prevents memory destruction, it is not possible to detect mismatch of conditions when reading instructions or reading data.

また、メモリキーの設定範囲も一定エリア(例えば、2
にワード単位)で指定するため、ファイル作成時にメモ
リの割付を考慮する必要があり、更に条件の設定も各ア
ドレス対応にはできないという問題点があった。
Also, the setting range of the memory key is set in a certain area (for example, 2
Because it is specified in word units), it is necessary to consider memory allocation when creating a file, and there is also the problem that conditions cannot be set for each address.

本発明は上記の点に鑑みてfl1作されたもので、上記
の諸問題点を解決したメモリアクセス条件の判定方式を
提供することを目的とする。
The present invention was created in view of the above points, and an object of the present invention is to provide a method for determining memory access conditions that solves the above problems.

〔問題点を解決するための手段〕[Means for solving problems]

本発明のメモリアクセス条件の判定方式は、メモリの各
アドレス対応に情報種別データが予め記憶されている情
報種別記憶部と、メモリアクセス時に動作種別データを
送出するプロセッサと、動作種別データを記憶する記憶
部&と、情報種別データと動作種別データとを比較し、
メモリアクセスの動作の可否を判定する判定手段とから
なる。
The memory access condition determination method of the present invention includes an information type storage section in which information type data is stored in advance for each address of the memory, a processor that sends out operation type data at the time of memory access, and a processor that stores the operation type data. Compare the storage section &, the information type data and the operation type data,
and determining means for determining whether or not a memory access operation is possible.

〔作用〕[Effect]

メモリのアドレスのエリア情報の種別、すなわち未使用
エリア、命令エリア、読出し専用データエリア及び読出
し・書込みデータエリアのいずれであるかを示す情報種
別データは、プロセッサからのアドレス情報に基づいて
情報種別記憶部から読出されて判定手段に供給される。
Information type data indicating the type of area information of the memory address, that is, unused area, instruction area, read-only data area, or read/write data area, is stored based on the address information from the processor. The data is read out from the section and supplied to the determination means.

一方、プロセッサはメモリアクセス時にアドレス情報及
びデータ情報と共に、命令読出し、データ読出し及びデ
ータ書込みのいずれであるかを示す動作種別データを送
出して記憶手段に記憶させる。
On the other hand, when accessing the memory, the processor sends out operation type data indicating whether it is instruction reading, data reading, or data writing, together with address information and data information, and stores it in the storage means.

判定手段は上記の情報種別データと動作種別データとを
比較参照し、条件の一致、不一致を判定する。プロセッ
サからの命令読出しく1−フェッチ)時には命令エリア
のみ使用可能である。また、プロセッサからのオペラン
ド読出しくP−フェッチ)については、ロード系命令の
場合は読出し専用データエリア及び読出し・書込みデー
タエリアの両方について使用可能である。史に、P−フ
ェッチのストア系命令の場合は読出し・書込みデータエ
リアのみ使用可能で、ジャンプ系命令では命令エリアの
み使用可能である。
The determining means compares and refers to the information type data and the operation type data, and determines whether the conditions match or do not match. Only the instruction area can be used when reading an instruction from the processor (1-fetch). Furthermore, for operand reading (P-fetch) from the processor, both the read-only data area and the read/write data area can be used in the case of load-related instructions. Historically, for P-fetch store instructions, only the read/write data area can be used, and for jump instructions, only the instruction area can be used.

この条件に従って、判定手段はメモリアクセス動作の可
否を、メモリアクセスの種別毎に常時判定する。
According to this condition, the determining means constantly determines whether or not a memory access operation is possible for each type of memory access.

〔実施例〕〔Example〕

第1図は本発明の一実施例の構成図を示す。同図中、プ
ロセッサ1とメモリ装置2との間は、双方向のバス(デ
ータバス及びアドレスバスよりなる)3を介して接続さ
れている。
FIG. 1 shows a configuration diagram of an embodiment of the present invention. In the figure, a processor 1 and a memory device 2 are connected via a bidirectional bus 3 (consisting of a data bus and an address bus).

メモリ装置2は、例えばランダム・アクセス・メモリ(
RAM)からなるメモリ4と、動作種別レジスタ5、情
報種別レジスタ6、判定回路7、ラッチ8,10、ゲー
ト9及び11とからなる。
The memory device 2 is, for example, a random access memory (
It consists of a memory 4 (RAM), an operation type register 5, an information type register 6, a determination circuit 7, latches 8 and 10, and gates 9 and 11.

メモリ4はプログラム情報を格納するプログラム記憶部
4aの他に、プログラム記憶部4aの各アドレス対応に
、そのアドレスのエリア情報の種別を示す情報種別デー
タが予め記憶されている情報種別記憶部4bとからなる
The memory 4 includes, in addition to a program storage section 4a that stores program information, an information type storage section 4b in which information type data indicating the type of area information of that address is stored in advance for each address of the program storage section 4a. Consisting of

上記の情報種別データは、プログラム記憶部4aの対応
するアドレスが、未使用エリアのとき’ oo ’ 、
命令が格納されている命令エリアのとき’01’、l出
し専用データエリアのとき’10’、データの読出しと
書込みの両方が可能な読出し・書込みデータエリアのと
き7117なる値として情報枝別記憶部4bに格納され
ている。
The above information type data is 'oo' when the corresponding address of the program storage unit 4a is an unused area;
Information is stored by branch as a value of '01' if it is an instruction area where instructions are stored, '10' if it is an output-only data area, and 7117 if it is a read/write data area where both reading and writing of data is possible. It is stored in the section 4b.

未使用エリアは、命令読出しやデータの書込みや読出し
がいずれも不可であるエリアであるが、将来、プログラ
ムの書替えによって別のエリアへ変更することもできる
The unused area is an area in which neither command reading nor data writing or reading is possible, but it can be changed to another area by rewriting the program in the future.

プロセッサ1はメモリアクセス時にアドレス情報、デー
タ情報の外に、動作種別データをメモリ装N2側へ送出
する。この動作種別データは、例えば命令読出しのとき
’01’、ロード系命令のとき’io’、ストア系命令
のとき7117なる値とされる。
When accessing the memory, the processor 1 sends operation type data to the memory device N2 side in addition to address information and data information. This operation type data has a value of, for example, '01' for a read instruction, 'io' for a load type instruction, and 7117 for a store type instruction.

次に上記構成の本実施例の動作につき説明する。Next, the operation of this embodiment having the above configuration will be explained.

プロセッサ1のメモリアクセス時にプロセッサ1からの
アドレス情報及び動作種別データはバス3へ送出され、
このうちアドレス情報はアドレスバス12を介してメモ
リ4に供給され、動作種別データはアドレスバス12を
介して動作種別レジスタ5に供給され、ここで一時記憶
される。また、ストア系命令の場合にプロセッサ1から
送出されるデータ情報はバス3及びデータバス13を介
してラッチ8に一詩保持される。
When processor 1 accesses memory, address information and operation type data from processor 1 are sent to bus 3,
Of these, address information is supplied to the memory 4 via the address bus 12, and operation type data is supplied to the operation type register 5 via the address bus 12, where it is temporarily stored. Further, data information sent from the processor 1 in the case of a store-related instruction is held in the latch 8 via the bus 3 and the data bus 13.

メモリ4に入力されたアドレス情報に基づき、情報種別
記憶部4bからそのアドレスの情報種別データが読出さ
れて情報種別レジスタ6に供給され、ここで一時記憶さ
れる。
Based on the address information input to the memory 4, the information type data of that address is read out from the information type storage section 4b and supplied to the information type register 6, where it is temporarily stored.

判定回路7は動作種別レジスタ5よりの動作種別データ
と情報種別レジスタ6よりの情報種別データとが夫々供
給され、次表に従うてメモリアクセス動作の可否を判定
する。
The determination circuit 7 is supplied with operation type data from the operation type register 5 and information type data from the information type register 6, and determines whether or not a memory access operation is possible according to the following table.

上記表かられかるように、判定回路7は命令読出しの場
合には命令エリアのみ使用可能であるので、読出し専用
データエリア、読出し・書込みデータエリア及び未使用
エリアへのアクセスはエラーと判定する。同様に、スト
ア系命令の場合には、読出し・書込みデータエリアへの
アクセスのみ可能であり、この場合は判定回路7はゲー
ト9を開き、ラッチ8の記憶データ情報をプログラム記
憶部4aの指定アドレスへ書込ませるが、それ以外の未
使用エリア、命令エリア、読出し専用データエリアへの
アクセスはエラーと判定し、ゲート9を閉じ、データ情
報の書込みを禁止する。
As can be seen from the above table, since only the instruction area can be used in the case of instruction reading, the determination circuit 7 determines that access to the read-only data area, read/write data area, and unused area is an error. Similarly, in the case of a store-related instruction, only access to the read/write data area is possible, and in this case, the determination circuit 7 opens the gate 9 and transfers the stored data information of the latch 8 to the designated address of the program storage section 4a. However, access to other unused areas, instruction areas, and read-only data areas is determined to be an error, gate 9 is closed, and writing of data information is prohibited.

また、ロード系命令の場合は、上記表かられかるように
、読出し専用データエリアと読出し・書込みデータエリ
アの両方へのアクセスは可能であるので、判定回路7は
これらの場合は正常と判定してゲート11を開き、プロ
グラム記憶部4a内の指定アドレスから読出されたデー
タ情報をラッチ10、ゲート11を通してバス3へ送出
する。
In addition, in the case of a load type instruction, as shown in the table above, it is possible to access both the read-only data area and the read/write data area, so the determination circuit 7 determines that the instruction is normal in these cases. The gate 11 is opened, and the data information read from the specified address in the program storage section 4a is sent to the bus 3 through the latch 10 and the gate 11.

しかし、ロード系命令であるにも拘らず、未使用エリア
又は命令エリアへのアクセスの場合は、判定回路7はエ
ラーと判定し、ゲート11を閉じる。
However, even though the instruction is a load type instruction, if the access is to an unused area or an instruction area, the determination circuit 7 determines that there is an error and closes the gate 11.

このように、本実施例によれば、従来はストア系命令の
判定しかできなかったのに対し、命令読出し、ロード系
命令のメモリアクセス条件の判定も行なう、しかも従来
の2にワード単位ではなく、1ワ一ド単位で未使用エリ
アへのアクセスや命令エリア、読出し専用データエリア
の破壊等を直ちに検出できる。
In this way, according to this embodiment, whereas conventionally only store-related instructions could be determined, the memory access conditions for instruction read and load-related instructions can also be determined. , access to unused areas, destruction of instruction areas, read-only data areas, etc. can be immediately detected in units of one word.

なお、判定回路7にはジャンプ系命令の場合には、命令
エリアのみ正常と判定し、それ以外のエリアへのアクセ
スはエラーと判定する機能を追加してもよい。
Note that the determination circuit 7 may be provided with a function that determines that only the instruction area is normal in the case of a jump instruction, and that access to other areas is determined to be an error.

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

上述の如く、本発明によれば、メモリアクセスの種別毎
に、アクセス可能なエリアの種別を常時判定するように
したため、未使用エリアへの誤ったアクセスや命令エリ
ア、読出し専用データエリアを破壊するようなメモリア
クセスを直ちに検出することができ、これによりプログ
ラムの暴走やメモリ内容の破壊を未然に防止することが
でき、システムの安定性を向上することができる等の特
長を有するものである。
As described above, according to the present invention, the type of accessible area is constantly determined for each type of memory access, which prevents erroneous access to unused areas and destruction of instruction areas and read-only data areas. Such memory accesses can be immediately detected, thereby preventing runaway programs and destruction of memory contents, and improving system stability.

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

第1図は本発明の一実施例の構成図、 第2図は従来のメモリキ一方式の一例の構成図である。 図において、 1はプロセッサ、 2はメモリ装置、 3はバス、 4はメモリ、 4aはプログラム記憶部、 4bは情報種別記憶部、 5は動作種別レジスタ、 6は情報種別レジスタ、 7は判定回路である。 木宅矧0−爽朽か1り構仄図 第1図 オ(水の/モ2リャーラ「式の→11の47(ff第2
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is a block diagram of an example of a conventional memory key system. In the figure, 1 is a processor, 2 is a memory device, 3 is a bus, 4 is a memory, 4a is a program storage unit, 4b is an information type storage unit, 5 is an operation type register, 6 is an information type register, and 7 is a determination circuit. be. Kikuyaku 0 - Soukukuka 1ri structure diagram 1st figure
figure

Claims (1)

【特許請求の範囲】 メモリ(4)の各アドレス対応に、そのアドレスのエリ
ア情報の種別を示す情報種別データが予め記憶されてい
る情報種別記憶部(4b)と、メモリアクセス時に少な
くともアドレス情報と共に、命令読出し、データ読出し
及びデータ書込みのいずれであるかを示す動作種別デー
タを送出するプロセッサ(1)と、 該動作種別データを記憶する記憶手段(5)と、該プロ
セッサ(1)からのアドレス情報に基づいて該情報種別
記憶部(4b)から読出された該情報種別データと、該
記憶手段(5)よりの該動作種別データとを比較し、メ
モリアクセス動作の可否を判定する判定手段(6、7)
とからなることを特徴とするメモリアクセス条件の判定
方式。
[Claims] An information type storage unit (4b) in which information type data indicating the type of area information of the address is stored in advance for each address of the memory (4), and at least the address information at the time of memory access. , a processor (1) that sends out operation type data indicating whether it is an instruction read, a data read, or a data write; a storage means (5) that stores the operation type data; and an address from the processor (1). determining means (for determining whether or not a memory access operation is possible by comparing the information type data read from the information type storage section (4b) based on the information with the operation type data from the storage means (5); 6, 7)
A memory access condition determination method characterized by comprising the following steps.
JP61304593A 1986-12-19 1986-12-19 Decision system for memory access condition Pending JPS63156261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61304593A JPS63156261A (en) 1986-12-19 1986-12-19 Decision system for memory access condition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61304593A JPS63156261A (en) 1986-12-19 1986-12-19 Decision system for memory access condition

Publications (1)

Publication Number Publication Date
JPS63156261A true JPS63156261A (en) 1988-06-29

Family

ID=17934867

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61304593A Pending JPS63156261A (en) 1986-12-19 1986-12-19 Decision system for memory access condition

Country Status (1)

Country Link
JP (1) JPS63156261A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302226A (en) * 1994-05-02 1995-11-14 Nec Corp Memory illegal access detection circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07302226A (en) * 1994-05-02 1995-11-14 Nec Corp Memory illegal access detection circuit

Similar Documents

Publication Publication Date Title
US4434464A (en) Memory protection system for effecting alteration of protection information without intervention of control program
US5396609A (en) Method of protecting programs and data in a computer against unauthorized access and modification by monitoring address regions
US5809544A (en) Microcontroller which limits access to internal memory
EP0449255B1 (en) Micro controller
RU2266559C2 (en) Microprocessor circuit for data carrier and method for providing access to data, loaded in memory
EP0109504A2 (en) Protection system for storage and input/output facilities and the like
EP0230350B1 (en) Protection of data in a multiprogramming data processing system
US6647475B2 (en) Processor capable of enabling/disabling memory access
US5564036A (en) Memory protective circuit
JPS63156261A (en) Decision system for memory access condition
JPS62160554A (en) Device for preventing wrong access to memory
JPS63317975A (en) Right protecting mechanism for magnetic disk device
JPH01123342A (en) Writing protecting circuit for memory
JPS6346466B2 (en)
JPS6074059A (en) Access control system for storage device
JPS6329859A (en) Memory protection circuit
JPH01232452A (en) One-chip processor
JPS6250863B2 (en)
KR920002829B1 (en) Memory access control system
KR950011060B1 (en) Method of semaphore control in multiprocessor system
JPS62212733A (en) Overflow detecting mechanism for stack area
JP2619671B2 (en) Memory control circuit
JPS63250753A (en) Memory access checking system
JPH06309236A (en) Illegal write detecting circuit for memory
JPS6226738B2 (en)