JPH0816529A - Method for accessing shared memory - Google Patents

Method for accessing shared memory

Info

Publication number
JPH0816529A
JPH0816529A JP6145186A JP14518694A JPH0816529A JP H0816529 A JPH0816529 A JP H0816529A JP 6145186 A JP6145186 A JP 6145186A JP 14518694 A JP14518694 A JP 14518694A JP H0816529 A JPH0816529 A JP H0816529A
Authority
JP
Japan
Prior art keywords
shared memory
area
access
computer
area data
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
JP6145186A
Other languages
Japanese (ja)
Inventor
Atsuo Fukuda
敦男 福田
Yasuhisa Masuo
泰央 増尾
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.)
Panasonic Electric Works Co Ltd
Original Assignee
Matsushita Electric Works 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 Matsushita Electric Works Ltd filed Critical Matsushita Electric Works Ltd
Priority to JP6145186A priority Critical patent/JPH0816529A/en
Publication of JPH0816529A publication Critical patent/JPH0816529A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To make each computer device surely recognize the area, to which the access is inhibited, even in the case of the change of computer devices connected to a shared memory. CONSTITUTION:Two computer devices are connected to different ports of a shared memory 2. The shared memory 2 is provided with ACCESS information set areas Aa and Ab where inhibit area data Da1,... and Db1,... indicating the areas to which the access from each computer device is inhibited are written. Inhibit area data Da1,... and Db1,... are written at the time of power-on of the system by each computer device which has areas to which the access from another computer device should be inhibited. At the time of access to the shared memory 2 from the computer device ($18, the computer device reads out inhibit area data Da1,... and Db1,... (S2); and if the accessed address is on the outside of inhibit area data Da1,... and Db1,... (S3), the computer device accesses the shared memory 2.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、それぞれ異なるコンピ
ュータ装置からアクセスされる複数のポートを有した共
有メモリについて、特定のコンピュータ装置からのアク
セスを許し他のコンピュータ装置からのアクセスを禁止
するアクセス禁止領域を各ポートごとに設定した共有メ
モリのアクセス方法に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a shared memory having a plurality of ports which are accessed by different computer devices, respectively, and allows access from specific computer devices and prohibits access from other computer devices. The present invention relates to a shared memory access method in which an area is set for each port.

【0002】[0002]

【従来の技術】従来より、複数個のプロセッサを備える
システムでは、図7に示すように、各プロセッサ3a,
3bごとのプロセッサバスBa,Bbを通して1つの共
有メモリ2を接続し、互いに他のプロセッサ3a,3b
が共有メモリ2に書き込んだデータを読み出すことによ
って、プロセッサ3a,3b間でデータを交換すること
が考えられている。ここに、プロセッサ3a,3bは、
それぞれROM4a,4bやRAM5a,5bのような
メモリとともに1つのコンピュータ装置(マイクロコン
ピュータやプログラマブルコントローラ)1a,1bを
構成する。
2. Description of the Related Art Conventionally, in a system including a plurality of processors, as shown in FIG.
One shared memory 2 is connected through the processor buses Ba and Bb for each of the processors 3b, and the other processors 3a and 3b are connected to each other.
It is considered that the data is exchanged between the processors 3a and 3b by reading the data written in the shared memory 2 by the processor. Here, the processors 3a and 3b are
Together with memories such as the ROMs 4a and 4b and the RAMs 5a and 5b, one computer device (microcomputer or programmable controller) 1a and 1b is configured.

【0003】ところで、共有メモリ2には、どのプロセ
ッサ3a,3bからもアクセスすることが可能な領域
と、特定のプロセッサ3a,3bからのアクセスは可能
であるが他のプロセッサ3a,3bからのアクセスは禁
止される領域とを設ける場合がある。たとえば、共有メ
モリ2の記憶領域の中で、コンピュータ装置1aはアク
セスできるがコンピュータ装置1bからのアクセスは禁
止される領域を設けるのである。
By the way, the shared memory 2 has an area which can be accessed by any of the processors 3a and 3b, and an area which can be accessed from specific processors 3a and 3b but is accessed from other processors 3a and 3b. May be provided with prohibited areas. For example, in the storage area of the shared memory 2, an area is provided in which the computer device 1a can be accessed but the access from the computer device 1b is prohibited.

【0004】[0004]

【発明が解決しようとする課題】上記構成では、アクセ
スが許可される領域および禁止される領域の情報は、各
コンピュータ装置1a,1bが保有しているものである
から、共有メモリ2に接続されるコンピュータ装置1
a,1bが変更されたり、共有メモリ2に接続されてい
るいずれかのコンピュータ装置1a,1bでこれらの情
報に変更が生じたときには、すべてのコンピュータ装置
1a,1bについて情報の変更が要求される。言い換え
ると、コンピュータ装置1aについて、動作を変更した
り、別のコンピュータ装置に取り替えたりすると、コン
ピュータ装置1bではアクセスの禁止されている領域を
正しく認識できなくなり、新たなコンピュータ装置では
アクセスが禁止されている領域にアクセスすることがあ
り、正常な動作が保証できなくなるという問題がある。
In the above configuration, since the information of the area where access is permitted and the area where access is prohibited is held by each computer device 1a, 1b, it is connected to the shared memory 2. Computer device 1
When a, 1b is changed or any of the computer devices 1a, 1b connected to the shared memory 2 changes the information, the information change is requested for all the computer devices 1a, 1b. . In other words, if the operation of the computer apparatus 1a is changed or the computer apparatus 1a is replaced with another computer apparatus, the computer apparatus 1b cannot correctly recognize the access prohibited area, and the new computer apparatus cannot access the area. However, there is a problem that the normal operation cannot be guaranteed because it may access the area.

【0005】本発明は上記問題点の解決を目的とするも
のであり、共有メモリに接続されているコンピュータ装
置に変更があっても、アクセスが禁止されている領域を
各コンピュータ装置に確実に認識させることができ、共
有メモリへのアクセスについて誤動作が生じないように
した共有メモリのアクセス方法を提供しようとするもの
である。
An object of the present invention is to solve the above problems, and even if the computer device connected to the shared memory is changed, each computer device can surely recognize the area where access is prohibited. Therefore, the present invention aims to provide a shared memory access method that prevents the malfunction of the access to the shared memory.

【0006】[0006]

【課題を解決するための手段】請求項1の発明は、それ
ぞれ異なるコンピュータ装置からアクセスされる複数の
ポートを有し他のコンピュータ装置からのアクセスを禁
止するアクセス不可領域を各ポートごとに設定した共有
メモリをアクセスする方法において、各コンピュータ装
置の動作開始時に各ポートを通してアクセス不可領域を
示す不可領域データを複数組ずつ共有メモリにそれぞれ
書き込み、各コンピュータ装置から共有メモリへのアク
セス時には他のコンピュータ装置により設定された不可
領域データを読み出すとともに、アクセスしたアドレス
が読み出した不可領域データのアドレスに含まれるとア
クセスを中止させることを特徴とする。
According to a first aspect of the present invention, an inaccessible area having a plurality of ports accessed from different computer devices and prohibiting access from other computer devices is set for each port. In a method of accessing a shared memory, a plurality of sets of inaccessible area data indicating inaccessible areas are written to the shared memory through each port at the start of operation of each computer, and when each computer accesses the shared memory, another computer is accessed. The unusable area data set by is read, and the access is stopped when the accessed address is included in the address of the read unusable area data.

【0007】請求項2の発明は、それぞれ異なるコンピ
ュータ装置からアクセスされる複数のポートを有し他の
コンピュータ装置からのアクセスを禁止するアクセス不
可領域を各ポートごとに設定した共有メモリをアクセス
する方法において、各コンピュータ装置の動作開始時に
各ポートを通してアクセス不可領域を示す不可領域デー
タを1組ずつ共有メモリにそれぞれ書き込み、各コンピ
ュータ装置から共有メモリへのアクセス時には他のコン
ピュータ装置により設定された不可領域データを読み出
すとともに、アクセスしたアドレスが読み出した不可領
域データのアドレスに含まれるとアクセスを中止させる
ことを特徴とする。
According to a second aspect of the present invention, there is provided a method of accessing a shared memory, which has a plurality of ports accessed from different computer devices, and sets an inaccessible area for prohibiting access from other computer devices for each port. In the above, at the time of starting the operation of each computer device, each set of inaccessible region data indicating the inaccessible region is written into the shared memory through each port, and when each computer device accesses the shared memory, the inaccessible region set by another computer device is set. It is characterized in that the data is read and the access is stopped when the accessed address is included in the read address of the impossible area data.

【0008】請求項3の発明は、それぞれ異なるコンピ
ュータ装置からアクセスされる複数のポートを有し他の
コンピュータ装置からのアクセスを禁止するアクセス不
可領域を各ポートごとに設定した共有メモリをアクセス
する方法において、各コンピュータ装置と共有メモリと
の間に挿入されたアドレス比較回路に対して他のコンピ
ュータ装置からアクセス不可領域を示す不可領域データ
を与え、各コンピュータ装置から共有メモリへのアクセ
ス時にはそのアドレスと他のコンピュータ装置により設
定された不可領域データとをアドレス比較回路で比較す
るとともに、アクセスしたアドレスが比較された不可領
域データのアドレスに含まれるとアクセスを中止させる
ことを特徴とする。
According to a third aspect of the present invention, there is provided a method of accessing a shared memory, which has a plurality of ports accessed from different computer devices and sets an inaccessible area for prohibiting access from other computer devices for each port. In the above, in the address comparison circuit inserted between each computer device and the shared memory, non-accessible area data indicating the inaccessible area is given from another computer device, and when the access is made from each computer device to the shared memory, the address The address comparing circuit compares the unusable area data set by another computer device, and suspends the access when the accessed address is included in the addresses of the compared unusable area data.

【0009】[0009]

【作用】請求項1の発明の構成によれば、各コンピュー
タ装置の動作開始時に各ポートを通してアクセス不可領
域を示す不可領域データを複数組ずつ共有メモリにそれ
ぞれ書き込んでおき、各コンピュータ装置から共有メモ
リにアクセスする際には、他のコンピュータ装置により
設定された不可領域データを読み出し、かつアクセスし
たアドレスが、読み出した不可領域データのアドレスに
含まれるとアクセスを中止させるから、各コンピュータ
装置によって他のコンピュータ装置からのアクセスを禁
止している領域が他のコンピュータによりアクセスされ
るのを確実に防止することができる。しかも、コンピュ
ータ装置の動作変更やコンピュータ装置の入替えなどに
よって、アクセス不可領域に変更が生じても、コンピュ
ータ装置の動作開始時にそのコンピュータ装置に対応し
たアクセス不可領域を共有メモリに書き込むから、アク
セスの禁止されている領域が誤ってアクセスされること
がないのである。また、アクセス不可領域を変更しても
誤動作が生じないから、アクセス不可領域を自由に設定
することができ、しかもアクセスが禁止されている領域
をアクセスすることによる誤動作の発生がなく安全に利
用することができるのである。
According to the structure of the present invention, a plurality of sets of inaccessible area data indicating inaccessible areas are written in the shared memory through the respective ports at the start of operation of each computer, and the shared memory is shared by each computer. When accessing the non-accessible area, the unusable area data set by another computer device is read, and the access is stopped if the accessed address is included in the address of the read out unusable area data. It is possible to reliably prevent an area for which access from the computer device is prohibited from being accessed by another computer. Moreover, even if the inaccessible area is changed due to the operation change of the computer apparatus or the replacement of the computer apparatus, the inaccessible area corresponding to the computer apparatus is written in the shared memory when the operation of the computer apparatus is started, so that the access is prohibited. That is, the area being accessed cannot be accessed by mistake. In addition, since the malfunction does not occur even if the inaccessible area is changed, the inaccessible area can be freely set, and there is no malfunction due to accessing the prohibited area for safe use. It is possible.

【0010】請求項2の発明の構成によれば、アクセス
不可領域を各コンピュータ装置について1箇所ずつとし
た点を除いて請求項1の構成と同様の構成であって、同
様に機能するものである。また、アクセス不可領域を各
ポートごとに1箇所ずつとしているから、共有メモリ内
で不可領域データに使用する領域が小さく、共有メモリ
の限られた記憶領域を無駄に使用することがないという
利点を有するのである。
According to the configuration of the invention of claim 2, the configuration is the same as the configuration of claim 1 except that one inaccessible area is provided for each computer device, and the same function is provided. is there. In addition, since there is one inaccessible area for each port, the area used for the inaccessible area data in the shared memory is small, and the limited storage area of the shared memory is not wasted. To have.

【0011】請求項3の発明の構成によれば、各コンピ
ュータ装置と共有メモリとの間に挿入されたアドレス比
較回路に対して他のコンピュータ装置からアクセス不可
領域を示す不可領域データを与え、各コンピュータ装置
から共有メモリへのアクセス時にはそのアドレスと他の
コンピュータ装置により設定された不可領域データとを
アドレス比較回路で比較するとともに、アクセスしたア
ドレスが比較された不可領域データのアドレスに含まれ
るとアクセスを中止させるから、請求項1の発明と同様
に、アクセス不可領域へのアクセスを確実に防止するこ
とができるとともに、アクセス不可領域を自由に設定す
ることができるのである。しかも、共有メモリに対して
アクセス不可領域を示す不可領域データを格納する必要
がなく、共有メモリの記憶容量に対する負担がなく、し
かもコンピュータ装置とは別に設けたアドレス比較回路
でアドレスを比較するから、コンピュータ装置でのアド
レス比較のための処理の負担がなく、高速な処理が期待
できるのである。
According to the configuration of the third aspect of the present invention, the non-accessible area data indicating the inaccessible area is given from another computer to the address comparison circuit inserted between each computer and the shared memory. At the time of accessing the shared memory from the computer device, the address is compared with the unusable area data set by another computer device by the address comparison circuit, and it is accessed if the accessed address is included in the address of the compared unusable area data. Therefore, the access to the inaccessible area can be surely prevented and the inaccessible area can be freely set, as in the first aspect of the invention. Moreover, it is not necessary to store the non-accessible area data indicating the non-accessible area in the shared memory, there is no burden on the storage capacity of the shared memory, and the address is compared by the address comparison circuit provided separately from the computer device. High-speed processing can be expected without the burden of processing for address comparison in the computer device.

【0012】[0012]

【実施例】【Example】

(実施例1)本実施例では、図7に示した従来構成と同
様に、共有メモリ2が2つのポートを有し、各ポートに
異なるプロセッサバスBa,Bbを介してコンピュータ
装置1a,1bが接続されているものとする。本実施例
における共有メモリ2の記憶領域の一部には、図1
(a)に示すように、互いに他のコンピュータ装置1
a,1bからのアクセスを禁止する領域としてのアクセ
ス不可領域情報を示す不可領域データDa1,……,
an、Db1,……,Dbnを書き込むためのアクセス情報
設定領域Aa,Abが設けられる。アクセス情報設定領
域Aa,Abは、各コンピュータ装置1a,1bに対応
して固定的に設定され、先頭アドレスが規定されてい
る。すなわち、本実施例の共有メモリ2は2個のポート
を備え、2つのコンピュータ装置1a,1bで共有メモ
リ2を共有しているから、2個のアクセス情報設定領域
Aa,Abが設けられている。各アクセス情報設定領域
Aa,Abに対して書き込む不可領域データDa1,…
…,Dan、Db1,……,Dbnの個数は、各アクセス情報
設定領域Aa,Abの大きさの範囲で任意である。ま
た、不可領域データDa1,……,Dan、Db1,……,D
bnは2ワードのデータであって、図2(a)のように、
アクセス不可領域Ca1,……,Can、Cb1,……,Cbn
とする先頭アドレスASと最終アドレスAEとの組、ま
たは先頭アドレスASとそのアクセス不可領域Ca1,…
…,Can、Cb1,……,Cbnの長さ(バイト数またはワ
ード数)LNとの組で表される。ここに、アクセス不可
領域Ca1,……,Canはコンピュータ装置1bからのア
クセスが禁止された領域であり、アクセス不可領域
b1,……,Cbnは、コンピュータ装置1aからのアク
セスが禁止された領域である。また、図1(a)におい
て空欄の領域は、両コンピュータ装置1a,1bからと
もにアクセスが可能な領域である。
(Embodiment 1) In this embodiment, similarly to the conventional configuration shown in FIG. 7, the shared memory 2 has two ports, and the computer devices 1a and 1b are connected to the respective ports via different processor buses Ba and Bb. Assume that they are connected. In a part of the storage area of the shared memory 2 in this embodiment, FIG.
As shown in (a), the other computer devices 1
Unusable area data D a1 , ..., Indicating inaccessible area information as an area for which access from a, 1b is prohibited
Access information setting areas Aa and Ab for writing D an , D b1 , ..., D bn are provided. The access information setting areas Aa and Ab are fixedly set corresponding to the respective computer devices 1a and 1b, and the start addresses are defined. That is, since the shared memory 2 of this embodiment has two ports and the two computer devices 1a and 1b share the shared memory 2, two access information setting areas Aa and Ab are provided. . Inaccessible area data D a1 , ... Which can be written in each access information setting area Aa, Ab
The number of D an , D an , D b1 , ..., D bn is arbitrary within the range of the size of each access information setting area Aa, Ab. Further, the impossible area data D a1 , ..., D an , D b1 ,.
bn is 2-word data, and as shown in FIG.
Inaccessible area C a1 , ..., C an , C b1 , ..., C bn
A combination of the start address AS and the end address AE, or the start address AS and its inaccessible area C a1 , ...
, C an , C b1 , ..., C bn and the length (the number of bytes or the number of words) LN. Here, the inaccessible areas C a1 , ..., C an are areas where access from the computer apparatus 1b is prohibited, and the inaccessible areas C b1 , ..., C bn are access areas which are prohibited from the computer apparatus 1a. This is the area that was created. The blank area in FIG. 1A is an area that can be accessed by both computer devices 1a and 1b.

【0013】上述したように、共有メモリ2にアクセス
情報設定領域Aa,Abを設けていることによって、各
コンピュータ装置1a,1bは、以下のように動作する
ことで、アクセスが禁止されている領域を識別する。す
なわち、各コンピュータ装置1a,1bは、電源投入時
のような動作開始時に、他のコンピュータ装置1a,1
bからのアクセスを禁止したい領域を示す不可領域デー
タDa1,……,Dan、Db1,……,Dbnを、アクセス情
報設定領域Aa,Abに書き込む。ただし、各コンピュ
ータ装置1a,1bでは、不可領域データDa1,……,
an、Db1,……,DbnはROM4a,4bまたはRA
M5a,5bに書き込まれている。次に、各コンピュー
タ装置1a,1bでは、図1(b)に示すように、共有
メモリ2にアクセスする際には(S1)、他のコンピュ
ータ装置1a,1bが書き込んだアクセス情報設定領域
Aa,Abの内容を読み出し(S2)、アクセスしよう
とするアドレスがアクセス情報設定領域Aa,Abに設
定されている不可領域データDa1,……,Dan、Db1
……,Dbnで示されたアクセス不可領域Ca1,……,C
an、Cb1,……,Cbnに含まれるか否かを判定する(S
3)。ここで、アクセスしようとするアドレスがアクセ
ス不可領域Ca1,……,Can、Cb1,……,Cbnに含ま
れていなければ共有メモリ2をアクセスし、含まれてい
れば共有メモリ2のアクセスを中止する(S4)。アク
セスの中止後は、アドレスを変更するなどして対処する
処理を行なったり、この処理を行なわずに他の処理に移
行したり、アクセスの中止によって異常を報知し処理を
停止したりすればよい。ここに、不可領域データDa1
……,Dan、Db1,……,Dbnは、各コンピュータ装置
1a,1bがそれぞれ共有メモリ2に書き込むから、両
コンピュータ装置1a,1bでアクセス不可領域Ca1
……,Can、Cb1,……,Cbnに重複が生じることがあ
るが、この場合には、どのコンピュータ装置1a,1b
もその領域にはアクセスできないから、アクセス不可領
域Ca1,……,Can、Cb1,……,Cbnであるにもかか
わらずアクセスするという誤動作が生じることはなくフ
ェールセーフに動作することになる。
As described above, since the shared memory 2 is provided with the access information setting areas Aa and Ab, each of the computer devices 1a and 1b operates in the following manner so that access is prohibited. Identify. That is, each of the computer devices 1a and 1b is connected to another computer device 1a or 1b when the operation is started such as when the power is turned on.
Write the unusable area data D a1 , ..., D an , D b1 , ..., D bn indicating the area for which access from b is prohibited in the access information setting areas Aa, Ab. However, in each of the computer devices 1a and 1b, the impossible area data D a1 , ...,
D an , D b1 , ..., D bn are ROMs 4a, 4b or RA
It is written in M5a and M5b. Next, in each of the computer devices 1a and 1b, as shown in FIG. 1B, when accessing the shared memory 2 (S1), the access information setting area Aa written by the other computer devices 1a and 1b, The contents of Ab are read (S2), and the address to be accessed is set to the access information setting areas Aa and Ab, and the disabled area data D a1 , ..., D an , D b1 ,
..., inaccessible area C a1 , indicated by D bn , ..., C
Whether it is included in an , C b1 , ..., C bn is determined (S
3). Here, if the address to be accessed is not included in the inaccessible areas C a1 , ..., C an , C b1 , ..., C bn , the shared memory 2 is accessed, and if it is included, the shared memory 2 is accessed. Access is stopped (S4). After the access is stopped, a process for dealing with it by changing the address may be performed, the process may be shifted to another process without performing this process, or the process may be stopped by notifying the abnormality by stopping the access. . Here, the impossible area data D a1 ,
.., D an , D b1 , ..., D bn are written in the shared memory 2 by the computer devices 1a and 1b, respectively, so that the inaccessible area C a1 in both computer devices 1a and 1b.
.., C an , C b1 , ..., C bn may overlap, but in this case, which computer device 1a, 1b
Can not be accessed in the region, the inaccessible area C a1, ......, C an, C b1, ......, to operate in a fail-safe never malfunction occurs that despite access is C bn become.

【0014】以上の処理手順によって、アクセスが禁止
された領域へのアクセスを確実に防止することができる
のである。コンピュータ装置1a,1bの動作を変更し
たり、コンピュータ装置1a,1bを取り替えたりした
場合も、コンピュータ装置1a,1bの動作開始時に各
コンピュータ装置1a,1bがアクセス情報設定領域A
a,Abに不可領域データDa1,……,Dan、Db1,…
…,Dbnを書き込むことによって上記動作が可能にな
り、誤動作を回避することができるのである。すなわ
ち、共有メモリ2の所望領域をアクセス不可領域Ca1
……,Can、Cb1,……,Cbnとして自由に設定するこ
とができ、しかも誤動作を回避することができて安全に
動作させることができる。
By the above processing procedure, it is possible to surely prevent access to the area where access is prohibited. Even when the operation of the computer devices 1a, 1b is changed or the computer devices 1a, 1b are replaced, each computer device 1a, 1b has the access information setting area A when the operation of the computer device 1a, 1b is started.
Impossible area data D a1 , ..., D an , D b1 ,.
.., D bn is written, the above operation becomes possible, and the malfunction can be avoided. That is, the desired area of the shared memory 2 is set to the inaccessible area C a1 ,
..., C an , C b1 , ..., C bn can be freely set, and further, malfunction can be avoided and the device can be operated safely.

【0015】なお、上記実施例ではコンピュータ装置1
a,1bが2台の場合について説明したが、3個以上の
場合であっても同様の動作が可能である。ただし、共有
メモリ2には、コンピュータ装置1a,1bの台数分の
ポートを設ける。また、共有メモリ2へのアクセスの際
に他のコンピュータ装置1a,1bで書き込まれた不可
領域データDa1,……,Dan、Db1,……,Dbnの範囲
内のアドレスであれば、読み書きをともに禁止している
が、書き込みのみ禁止し読み出しは可能としてもよい。
In the above embodiment, the computer device 1 is used.
Although the case where there are two a and 1b has been described, the same operation is possible even when there are three or more. However, the shared memory 2 is provided with ports for the number of computer devices 1a and 1b. Further, if the address is within the range of the unusable area data D a1 , ..., D an , D b1 , ..., D bn written by the other computer devices 1a, 1b when the shared memory 2 is accessed. Although both reading and writing are prohibited, only writing may be prohibited and reading may be possible.

【0016】(実施例2)実施例1では、共有メモリ2
の中でアクセス不可領域Ca1,……,Can、Cb1,…
…,Cbnを複数箇所に設定可能としていたが、本実施例
は、図3に示すように、アクセス不可領域Ca ,Cb
共有メモリ2に1箇所ずつ設定したものである。したが
って、共有メモリ2にアクセス情報設定領域Aa,Ab
として設けられた特定のアドレスに2組の不可領域デー
タDa ,Db が書き込まれるのであって、各コンピュー
タ装置1a,1bが共有メモリ2にアクセスする際に
は、互いに他のコンピュータ装置1a,1bが書き込ん
だ不可領域データDa ,Db を読み出してアクセス不可
領域Ca ,Cb か否かの判断を行なうのである。本実施
例では、共有メモリ2に1箇所ずつのアクセス不可領域
a ,Cb を設定した点のみが相違するが、他の構成は
実施例1と同様である。また、アクセス不可領域C a
b を1箇所ずつとしているから、多箇所に設ける場合
よりもメモリの管理が容易になるという利点を有してい
る。
(Second Embodiment) In the first embodiment, the shared memory 2
Inaccessible area C ina1, ……, Can, Cb1,…
…, CbnAlthough it was possible to set at multiple locations, this example
Is an inaccessible area C as shown in FIG.a, CbTo
It is set in the shared memory 2 one by one. But
Thus, the shared memory 2 has access information setting areas Aa and Ab.
2 sets of unusable area data at a specific address provided as
TA Da, DbIs written in each computer
When the access devices 1a and 1b access the shared memory 2,
Are written by the other computer devices 1a and 1b.
Area data Da, DbCannot be accessed by reading
Area Ca, CbIt is decided whether or not. Implementation
In the example, shared memory 2 has one inaccessible area
Ca, CbThe only difference is that
This is the same as in the first embodiment. Inaccessible area C a,
CbSince it is set at one place, if it is provided at multiple places
Has the advantage of easier memory management than
It

【0017】(実施例3)上記実施例では、共有メモリ
2へのアクセスの際に、指定したアドレスがアクセス不
可領域Ca1,……,Can、Cb1,……,Cbnか否かを各
コンピュータ装置1a,1bがソフトウェアで指示され
た手順に従って判定するようになっていたが、本実施例
では、図4に示すように、各コンピュータ装置1a,1
bと共有メモリ2との間のプロセッサバスBa,Bbに
アドレス比較回路6を設け、アドレス比較回路6に対し
て不可領域データDa1,……,Dan、Db1,……,Dbn
を与えているのである。図4においてはコンピュータ装
置1bのみが共有メモリ2の特定領域へのアクセスを禁
止されると仮定して、コンピュータ装置1bと共有メモ
リ2との間にのみアドレス比較回路6を挿入している
が、コンピュータ装置1aからのアクセスを禁止する領
域を設ける場合には、コンピュータ装置1との間にもア
ドレス比較回路6を設ける。すなわち、図5に示すよう
に、各コンピュータ装置1a,1bが共有メモリ2をア
クセスする際に(S1)、アドレス比較回路6におい
て、そのアドレスを不可領域データDa1,……,Dan
b1,……,Dbnと比較し、指定されたアドレスがアク
セス不可領域Ca1,……,Can、Cb1,……,Cbnに含
まれていなければ(S2)、判定フラグFLを「不一
致」として(S3)、この判定フラグFLを共有メモリ
2へのアクセスを行なったコンピュータ装置1a,1b
に返すとともに、共有メモリ2をアクセスする(S
4)。また、コンピュータ装置1a,1bからのアドレ
スがアドレス比較回路6に指定されたアクセス不可領域
a1,……,Can、Cb1,……,Cbnに含まれるときに
は、判定フラグFLを「一致」として(S5)、共有メ
モリ2へのアクセスを行なったコンピュータ装置1a,
1bに返し、アクセスを中止する。共有メモリ2へのア
クセスを行なったコンピュータ装置1a,1bでは、ア
ドレス比較回路6からの「不一致」の判定フラグFLに
よって共有メモリ2へのアクセスが行なわれたことを認
識し、「一致」の判定フラグFLによって共有メモリ2
へのアクセスが行なわれなかったことを認識する。ここ
で、アドレス比較回路6に対する不可領域データDa1
……,Dan、Db1,……,Dbnは、他のコンピュータ装
置1a,1bから与える。すなわち、図6に示すよう
に、共有メモリ2にはアクセス情報設定領域Aa,Ab
を設けずに、コンピュータ装置1a,1bからアドレス
比較回路6に対して不可領域データDa1,……,Dan
b1,……,Dbnを直接与えるのである。コンピュータ
装置1a,1bが3台以上であれば、各アドレス比較回
路6に複数種類の不可領域データDa1,……,Dan、D
b1,……,Dbnが与えられることになる。
[0017] (Embodiment 3) In the above-described embodiment, when the access to the shared memory 2, the specified address inaccessible area C a1, ......, C an, C b1, ......, whether C bn The respective computer devices 1a and 1b are designed to be determined according to the procedure instructed by the software, but in the present embodiment, as shown in FIG.
processor bus Ba between b and shared memory 2, the address comparison circuit 6 in Bb provided, impossible area data D a1 to the address comparison circuit 6, ......, D an, D b1, ......, D bn
Is given. In FIG. 4, assuming that only the computer device 1b is prohibited from accessing a specific area of the shared memory 2, the address comparison circuit 6 is inserted only between the computer device 1b and the shared memory 2. When the area for prohibiting access from the computer device 1a is provided, the address comparison circuit 6 is also provided between the computer device 1a and the computer device 1a. That is, as shown in FIG. 5, when each of the computer devices 1a and 1b accesses the shared memory 2 (S1), the address is compared in the address comparison circuit 6 with the unusable area data D a1 , ..., D an ,
D b1, ......, D bn compared to the address specified is inaccessible area C a1, ......, C an, C b1, ......, if it is not included in C bn (S2), the determination flag FL Is set as "mismatch" (S3), and the determination flag FL is set to the computer device 1a or 1b that has accessed the shared memory 2.
And the shared memory 2 is accessed (S
4). When the addresses from the computer devices 1a and 1b are included in the inaccessible areas C a1 , ..., C an , C b1 , ..., C bn designated by the address comparison circuit 6, the determination flag FL is set to “match”. (S5), the computer device 1a that has accessed the shared memory 2,
Return to 1b and stop access. The computer devices 1a and 1b that have accessed the shared memory 2 recognize that the shared memory 2 is accessed by the "mismatch" determination flag FL from the address comparison circuit 6, and determine the "match". Shared memory 2 by flag FL
Recognize that access was not made. Here, the impossible area data D a1 , for the address comparison circuit 6,
..., D an , D b1 , ..., D bn are given from the other computer devices 1a, 1b. That is, as shown in FIG. 6, the shared memory 2 has access information setting areas Aa and Ab.
, The unusable area data D a1 , ..., D an , from the computer devices 1a and 1b to the address comparison circuit 6.
D b1 , ..., D bn are directly given. If there are three or more computer devices 1a and 1b, each address comparison circuit 6 has a plurality of types of unusable area data D a1 , ..., D an , D.
b1 , ..., D bn will be given.

【0018】本実施例では、アドレスの比較を専用のハ
ードウェアで行なうことによって、プロセッサ3a,3
bの処理負担が軽減され、また領域データDa1,……,
an、Db1,……,Dbnを共有メモリ2に書き込まずに
アドレス比較回路6に直接与えることで、限られた記憶
容量しかない共有メモリ2の記憶領域をコンピュータ装
置1a,1b間で交換されるデータ以外の記憶に利用す
る必要がなく、共有メモリ2を有効に利用することがで
きるのである。他の構成および動作は実施例1と同様で
ある。
In the present embodiment, by comparing the addresses with dedicated hardware, the processors 3a, 3a
The processing load of b is reduced, and the area data D a1 , ...,
By directly supplying D an , D b1 , ..., D bn to the address comparison circuit 6 without writing them in the shared memory 2, the storage area of the shared memory 2 having a limited storage capacity is shared between the computer devices 1a and 1b. The shared memory 2 can be effectively used without having to use it for storing data other than exchanged data. Other configurations and operations are the same as those of the first embodiment.

【0019】[0019]

【発明の効果】請求項1の発明は、各コンピュータ装置
の動作開始時に各ポートを通してアクセス不可領域を示
す不可領域データを複数組ずつ共有メモリにそれぞれ書
き込んでおき、各コンピュータ装置から共有メモリにア
クセスする際には、他のコンピュータ装置により設定さ
れた不可領域データを読み出し、かつアクセスしたアド
レスが、読み出した不可領域データのアドレスに含まれ
るとアクセスを中止させるので、各コンピュータ装置に
よって他のコンピュータ装置からのアクセスを禁止して
いる領域が他のコンピュータによりアクセスされるのを
確実に防止することができるという利点があり、しか
も、コンピュータ装置の動作変更やコンピュータ装置の
入替えなどによって、アクセス不可領域に変更が生じて
も、コンピュータ装置の動作開始時にそのコンピュータ
装置に対応したアクセス不可領域を共有メモリに書き込
むから、アクセスの禁止されている領域が誤ってアクセ
スされることがないという利点がある。また、アクセス
不可領域を変更しても誤動作が生じないから、アクセス
不可領域を自由に設定することができ、しかもアクセス
が禁止されている領域をアクセスすることによる誤動作
の発生がなく安全に利用することができるという効果を
奏するのである。
According to the first aspect of the present invention, a plurality of sets of inaccessible area data indicating inaccessible areas are written in the shared memory through the respective ports when the operation of each computer is started, and the shared memory is accessed from each computer. In this case, the unusable area data set by the other computer device is read, and if the accessed address is included in the address of the read unreadable area data, the access is stopped. There is an advantage that it is possible to surely prevent the area that is prohibited from being accessed from other computers from being accessed, and moreover, due to the operation change of the computer device, the replacement of the computer device, etc. Even if changes occur, the computer Since writing inaccessible area corresponding to the computer device at the start of the operation to the shared memory, there is an advantage that has never Prohibited areas of access is incorrectly accessed. In addition, since the malfunction does not occur even if the inaccessible area is changed, the inaccessible area can be freely set, and there is no malfunction due to accessing the prohibited area for safe use. The effect is that it is possible.

【0020】請求項2の発明は、アクセス不可領域を各
コンピュータ装置について1箇所ずつとした点を除いて
請求項1の構成と同様の構成を有するから、請求項1の
発明と同様の効果を奏し、さらに、アクセス不可領域を
各ポートごとに1箇所ずつとしているから、共有メモリ
内で不可領域データに使用する領域が小さく、共有メモ
リの限られた記憶領域を無駄に使用することがないとい
う利点を有する。
Since the invention of claim 2 has the same configuration as that of claim 1 except that one inaccessible area is provided for each computer device, the same effect as the invention of claim 1 is obtained. In addition, since the inaccessible area is set to one for each port, the area used for the inaccessible area data in the shared memory is small, and the limited storage area of the shared memory is not wastefully used. Have advantages.

【0021】請求項3の発明は、各コンピュータ装置と
共有メモリとの間に挿入されたアドレス比較回路に対し
て他のコンピュータ装置からアクセス不可領域を示す不
可領域データを与え、各コンピュータ装置から共有メモ
リへのアクセス時にはそのアドレスと他のコンピュータ
装置により設定された不可領域データとをアドレス比較
回路で比較するとともに、アクセスしたアドレスが比較
された不可領域データのアドレスに含まれるとアクセス
を中止させるので、請求項1の発明と同様に、アクセス
不可領域へのアクセスを確実に防止することができると
ともに、アクセス不可領域を自由に設定することができ
るという利点がある。しかも、共有メモリに対してアク
セス不可領域を示す不可領域データを格納する必要がな
く、共有メモリの記憶容量に対する負担がなく、しかも
コンピュータ装置とは別に設けたアドレス比較回路でア
ドレスを比較するので、コンピュータ装置でのアドレス
比較のための処理の負担がなく、高速な処理が期待でき
るという効果を奏するのである。
According to a third aspect of the present invention, the non-accessible area data indicating the inaccessible area is given from another computer to the address comparison circuit inserted between each computer and the shared memory, and shared by each computer. At the time of accessing the memory, the address is compared with the unusable area data set by another computer by the address comparison circuit, and if the accessed address is included in the addresses of the compared unusable area data, the access is stopped. As in the case of the first aspect of the invention, it is possible to reliably prevent access to the inaccessible area and to set the inaccessible area freely. Moreover, since it is not necessary to store the non-accessible area data indicating the non-accessible area in the shared memory, there is no burden on the storage capacity of the shared memory, and the address is compared by the address comparison circuit provided separately from the computer device. Thus, the processing load for address comparison in the computer device is not imposed, and high-speed processing can be expected.

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

【図1】実施例1を示し、(a)は共有メモリの使用状
態を示す図、(b)はコンピュータ装置の動作説明図で
ある。
1A and 1B show a first embodiment, FIG. 1A is a diagram showing a usage state of a shared memory, and FIG. 1B is an operation explanatory diagram of a computer device.

【図2】実施例1における不可領域データの例を示す図
である。
FIG. 2 is a diagram illustrating an example of unusable area data according to the first embodiment.

【図3】実施例2における共有メモリの使用状態を示す
図である。
FIG. 3 is a diagram illustrating a usage state of a shared memory according to a second embodiment.

【図4】実施例3の要部のブロック図である。FIG. 4 is a block diagram of a main part of the third embodiment.

【図5】実施例3におけるコンピュータ装置の動作説明
図である。
FIG. 5 is a diagram illustrating the operation of the computer device according to the third embodiment.

【図6】実施例3における共有メモリの使用状態を示す
図である。
FIG. 6 is a diagram illustrating a usage state of a shared memory according to a third embodiment.

【図7】本発明を適用するシステムの構成例を示すブロ
ック図である。
FIG. 7 is a block diagram showing a configuration example of a system to which the present invention is applied.

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

1a コンピュータ装置 1b コンピュータ装置 2 共有メモリ 3a プロセッサ 3b プロセッサ 4a ROM 4b ROM 5a RAM 5b RAM 6 アドレス比較回路 Aa アクセス情報設定領域 Ab アクセス情報設定領域 Ca1,……,Can アクセス不可領域 Cb1,……,Cbn アクセス不可領域 Da1,……,Dan 不可領域データ Db1,……,Dbn 不可領域データ1a computer device 1b computer device 2 shared memory 3a processor 3b processor 4a ROM 4b ROM 5a RAM 5b RAM 6 address comparison circuit Aa access information setting area Ab access information setting area C a1 , ..., C an inaccessible area C b1 , ... …, C bn inaccessible area D a1 , ……, D an inaccessible area data D b1 , ……, D bn inaccessible area data

─────────────────────────────────────────────────────
─────────────────────────────────────────────────── ───

【手続補正書】[Procedure amendment]

【提出日】平成7年1月9日[Submission date] January 9, 1995

【手続補正1】[Procedure Amendment 1]

【補正対象書類名】図面[Document name to be corrected] Drawing

【補正対象項目名】図1[Name of item to be corrected] Figure 1

【補正方法】変更[Correction method] Change

【補正内容】[Correction content]

【図1】 FIG.

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 それぞれ異なるコンピュータ装置からア
クセスされる複数のポートを有し他のコンピュータ装置
からのアクセスを禁止するアクセス不可領域を各ポート
ごとに設定した共有メモリをアクセスする方法におい
て、各コンピュータ装置の動作開始時に各ポートを通し
てアクセス不可領域を示す不可領域データを複数組ずつ
共有メモリにそれぞれ書き込み、各コンピュータ装置か
ら共有メモリへのアクセス時には他のコンピュータ装置
により設定された不可領域データを読み出すとともに、
アクセスしたアドレスが読み出した不可領域データのア
ドレスに含まれるとアクセスを中止させることを特徴と
する共有メモリのアクセス方法。
1. A method of accessing a shared memory, which has a plurality of ports accessed from different computer devices, and sets an inaccessible area for prohibiting access from other computer devices for each port, At the start of the operation, each group writes inaccessible area data indicating an inaccessible area through each port to the shared memory, and when accessing the shared memory from each computer, the inaccessible area data set by another computer is read out.
A method for accessing a shared memory, wherein the access is stopped when the accessed address is included in the read address of the unreadable area data.
【請求項2】 それぞれ異なるコンピュータ装置からア
クセスされる複数のポートを有し他のコンピュータ装置
からのアクセスを禁止するアクセス不可領域を各ポート
ごとに設定した共有メモリをアクセスする方法におい
て、各コンピュータ装置の動作開始時に各ポートを通し
てアクセス不可領域を示す不可領域データを1組ずつ共
有メモリにそれぞれ書き込み、各コンピュータ装置から
共有メモリへのアクセス時には他のコンピュータ装置に
より設定された不可領域データを読み出すとともに、ア
クセスしたアドレスが読み出した不可領域データのアド
レスに含まれるとアクセスを中止させることを特徴とす
る共有メモリのアクセス方法。
2. A method of accessing a shared memory, which has a plurality of ports accessed from different computer devices, and sets an inaccessible area for prohibiting access from other computer devices for each port. At the start of the operation, each group writes inaccessible area data indicating an inaccessible area through each port into the shared memory, and when each computer accesses the shared memory, the inaccessible area data set by another computer is read out. A method for accessing a shared memory, wherein the access is stopped when the accessed address is included in the read address of the unreadable area data.
【請求項3】 それぞれ異なるコンピュータ装置からア
クセスされる複数のポートを有し他のコンピュータ装置
からのアクセスを禁止するアクセス不可領域を各ポート
ごとに設定した共有メモリをアクセスする方法におい
て、各コンピュータ装置と共有メモリとの間に挿入され
たアドレス比較回路に対して他のコンピュータ装置から
アクセス不可領域を示す不可領域データを与え、各コン
ピュータ装置から共有メモリへのアクセス時にはそのア
ドレスと他のコンピュータ装置により設定された不可領
域データとをアドレス比較回路で比較するとともに、ア
クセスしたアドレスが比較された不可領域データのアド
レスに含まれるとアクセスを中止させることを特徴とす
る共有メモリのアクセス方法。
3. A method for accessing a shared memory, which has a plurality of ports accessed from different computer devices, and sets an inaccessible area for prohibiting access from other computer devices for each port, The non-accessible area data indicating the non-accessible area is given from another computer to the address comparison circuit inserted between the shared memory and the shared memory. A method for accessing a shared memory, comprising: comparing the set unusable area data with an address comparison circuit, and suspending the access when the accessed address is included in the addresses of the compared unusable area data.
JP6145186A 1994-06-27 1994-06-27 Method for accessing shared memory Pending JPH0816529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP6145186A JPH0816529A (en) 1994-06-27 1994-06-27 Method for accessing shared memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP6145186A JPH0816529A (en) 1994-06-27 1994-06-27 Method for accessing shared memory

Publications (1)

Publication Number Publication Date
JPH0816529A true JPH0816529A (en) 1996-01-19

Family

ID=15379421

Family Applications (1)

Application Number Title Priority Date Filing Date
JP6145186A Pending JPH0816529A (en) 1994-06-27 1994-06-27 Method for accessing shared memory

Country Status (1)

Country Link
JP (1) JPH0816529A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761717B2 (en) 2001-07-10 2010-07-20 Trident Microsystems (Far East) Ltd. Memory device with data security in a processor

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7761717B2 (en) 2001-07-10 2010-07-20 Trident Microsystems (Far East) Ltd. Memory device with data security in a processor

Similar Documents

Publication Publication Date Title
US5056002A (en) Cache memory for use with multiprocessor systems
US5727172A (en) Method and apparatus for performing atomic accesses in a data processing system
US6141736A (en) Arrangement with master and slave units
US4924379A (en) Multiprocessor system with several processors equipped with cache memories and with a common memory
KR920004405B1 (en) Computer system for enabling to use address space effectively
JPH0816529A (en) Method for accessing shared memory
JPH09269934A (en) Data matching method and transmitting system for common memory
JPS6329859A (en) Memory protection circuit
JPS59116866A (en) Storage device of computer system
EP0818008B1 (en) Dynamic ram in a microprocessor system
JP2587468B2 (en) Lock data setting device
JP2736352B2 (en) Cache memory control method in multiprocessor system
JP2547329B2 (en) Lock data setting device
JPS6035694B2 (en) Main memory protection method
JP3371978B2 (en) Information processing device
JP2636760B2 (en) Multiprocessor system
JPH0241538A (en) Cache memory control system
JP2710475B2 (en) Memory control circuit
JPH03184128A (en) Duplex computer system
JPS61136149A (en) Main storage device
JPS6345669A (en) Multi-processor system
JPH04130553A (en) Electronic computer
JPS62151970A (en) Lock byte access system
JPS61296464A (en) Data processor
JPH04302044A (en) Multiprocessor system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20021105