[go: up one dir, main page]

JPH09231122A - Processor system - Google Patents

Processor system

Info

Publication number
JPH09231122A
JPH09231122A JP4155796A JP4155796A JPH09231122A JP H09231122 A JPH09231122 A JP H09231122A JP 4155796 A JP4155796 A JP 4155796A JP 4155796 A JP4155796 A JP 4155796A JP H09231122 A JPH09231122 A JP H09231122A
Authority
JP
Japan
Prior art keywords
processor
access
port memory
memory access
memory
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
JP4155796A
Other languages
Japanese (ja)
Inventor
Shinya Otsuji
信也 大辻
Takashi Hotta
多加志 堀田
Takanori Yokoyama
孝典 横山
Koji Ikeda
光二 池田
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP4155796A priority Critical patent/JPH09231122A/en
Publication of JPH09231122A publication Critical patent/JPH09231122A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)

Abstract

(57)【要約】 【課題】メモリアクセスをウェイトする機能を持たない
プロセッサのデュアルポートメモリへのアクセスの正常
性を保証する。 【解決手段】プロセッサ2はメモリアクセスを実行する
と、入力端子11よりSRFF8の状態を読み込む。SRFF8
は、アクセスの競合を示すDPRAM1の!BUSY端子6Lより
の信号によってセットされる。プロセッサ2は、SRFF8
の状態がセットされていれば、SRFF8内の値を出力端子
12からの出力によりリセットし、DPRAM1の同じ領域
に対し再度メモリアクセスを行う。DPRAM1のR/!W端子
の入力は、OR9によりSRFF8がセットされている間は、
書き込みが行われないようHiに固定される。
(57) [Abstract] [PROBLEMS] To guarantee the normality of access to a dual port memory of a processor that does not have a function of waiting for memory access. When a processor 2 executes a memory access, it reads the state of SRFF8 from an input terminal 11. SRFF8
Is set by a signal from the! BUSY terminal 6L of DPRAM1 indicating an access conflict. Processor 2 is SRFF8
If the state is set, the value in SRFF8 is reset by the output from the output terminal 12, and the same area of DPRAM1 is accessed again. The input of the R /! W terminal of DPRAM1 is set while SRFF8 is set by OR9.
Fixed to Hi to prevent writing.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、2つのプロセッサ
間で一つのメモリを共有するシステムにおける、メモリ
アクセスの技術に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory access technique in a system in which one processor shares one memory.

【0002】[0002]

【従来の技術】2つのプロセッサ間で一つのメモリを共
有するシステムとしては、マルチプロセッサシステム
や、異なるネットワーク間の通信プロトコルの変換など
を行うゲートウェイ装置がある。
2. Description of the Related Art As a system for sharing one memory between two processors, there are a multiprocessor system and a gateway device for converting a communication protocol between different networks.

【0003】このようなシステムでは、2つのプロセッ
サ間で共有するメモリとして、2つのプロセッサが同時
にアクセスを行うことのできるデュアルポートメモリ
(以下、DPRAM)が用いられることが多い。ただし、こ
のようなDPRAMでも、2つのプロセッサが同じアドレス
領域を同時にアクセスすることはできない。
In such a system, a dual port memory (hereinafter referred to as DPRAM) which can be simultaneously accessed by two processors is often used as a memory shared by the two processors. However, even with such a DPRAM, two processors cannot access the same address area at the same time.

【0004】そこで、DPRAMには、同じアドレス領域に
対する2つのプロセッサのReadまたはWriteが重複した
場合に後着のプロセッサに対してアクセスの不可を知ら
せるbusy信号を発する機能が備えられる場合が多い。こ
のようなDPRAMと、DPRAMからのbusy信号に応じてメモリ
アクセスにウェイトをかけ遅延させる機能を備えた2つ
のプロセッサを用いれば、DPRAMの同じアドレス領域へ
のアクセスが競合した場合にも正常なメモリアクセスを
行うことができるシステムを実現することができる。
Therefore, in many cases, the DPRAM is provided with a function of issuing a busy signal to the later-arriving processor indicating that the access is impossible when two processors read or write the same address area in duplicate. Using such a DPRAM and two processors with the function to delay and delay the memory access according to the busy signal from the DPRAM, normal memory can be used even when access to the same address area of the DPRAM conflicts. A system capable of accessing can be realized.

【0005】しかしながら、メモリアクセスにウェイト
をかけ遅延させるメモリアクセスウェイト機能を備えな
いプロセッサを用いる必要がある場合がある。プロセッ
サの一方に特殊な機能が必要であり、このような特殊な
機能を備えたプロセッサとして、メモリアクセスウェイ
ト機能を備えないプロセッサのみが実現、供給されてい
る場合などである。
However, there are cases where it is necessary to use a processor that does not have a memory access wait function for applying a wait to the memory access and delaying it. This is the case where one of the processors needs a special function, and as a processor having such a special function, only a processor having no memory access wait function is realized and supplied.

【0006】このようなメモリアクセスウェイト機能を
備えないプロセッサを用いる場合、このままでは正常な
メモリアクセスを保証することができないことになる。
If a processor without such a memory access wait function is used, normal memory access cannot be guaranteed as it is.

【0007】そこで、特開平5-20212号公報では、DPRAM
からメモリアクセスウェイト機能を備えないプロセッサ
へのbusy信号に基づいて、エラー信号を生成してメモリ
アクセスウェイト機能を備えないプロセッサに通知し、
そのメモリアクセスを禁止することが提案されている。
Therefore, in Japanese Unexamined Patent Publication No. 5-20212, DPRAM
Generates an error signal based on the busy signal to the processor that does not have the memory access wait function and notifies the processor that does not have the memory access wait function.
It has been proposed to prohibit that memory access.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、特開平
5-20212号公報記載のシステムでは、DPRAMへのメモリア
クセスの競合を完全には排除することができない。busy
信号が出力されてからメモリアクセスウェイト機能を備
えないプロセッサ自身が、そのメモリアクセスを禁止す
るまでのタイムラグの間、DPRAMへのメモリアクセスは
競合したままとなり、この間に、誤ったデータがDPRAM
に書き込まれてしまう可能性がある。
SUMMARY OF THE INVENTION
In the system described in Japanese Patent Laid-Open No. 5-20212, it is not possible to completely eliminate contention for memory access to DPRAM. busy
During the time lag between the signal being output and the processor itself that does not have the memory access wait function disabling that memory access, memory access to DPRAM remains in conflict, and erroneous data is stored in DPRAM during this time.
May be written to.

【0009】また、特開平5-20212号公報記載のシステ
ムでは、DPRAMへのメモリアクセスは競合は、ある程度
排除することができるが、メモリアクセスウェイト機能
を備えないプロセッサのメモリアクセスの正常性は保証
されない。禁止されたメモリアクセスの正常性を保証す
る手段が何ら講じられていないからである。
In the system disclosed in Japanese Patent Laid-Open No. 5-20212, the memory access to the DPRAM can be eliminated to some extent, but the normality of the memory access of the processor without the memory access wait function is guaranteed. Not done. This is because no means has been taken to guarantee the normality of the prohibited memory access.

【0010】そこで、本発明は、2つのプロセッサ間で
一つのメモリを共有するシステムであって、プロセッサ
としてメモリアクセスをウェイトする機能を持たないプ
ロセッサを用いた場合にも、メモリアクセスの正常性を
保証することのできるプロセッサシステムを提供するこ
とを目的とする。
Therefore, the present invention is a system in which one memory is shared between two processors, and the normality of memory access is ensured even when a processor having no function of waiting for memory access is used as the processor. It is an object to provide a processor system that can be guaranteed.

【0011】[0011]

【課題を解決するための手段】前記目的達成のために本
発明は、2つのプロセッサと、当該2つのプロセッサの
アクセスを各々受け付ける2つのポートを備え、2つの
ポートで受け付けたアクセスが競合した場合に、より後
にアクセスを受け付けたポートからアクセスの競合を通
知するビジー信号を出力するデュアルポートメモリとを
備えたプロセッサシステムであって、前記2つのポート
のうちの一方のポートからビジー信号が出力された際
に、当該ビジー信号を保持する保持回路を備え、前記一
方のポートでデュアルポートメモリへのアクセスが受け
付けられるプロセッサは、当該プロセッサのデュアルポ
ートメモリへのアクセスの実行後に、前記保持回路が保
持している内容を読み込み、前記保持回路が保持してい
る内容がビジー信号である場合に、前記実行したデュア
ルポートメモリへのアクセスを再度行うリトライ手段と
を有することを特徴とするプロセッサシステムを提供す
る。
In order to achieve the above object, the present invention comprises two processors and two ports for respectively accepting the accesses of the two processors, and when the accesses accepted by the two ports compete with each other. And a dual port memory that outputs a busy signal for notifying access conflict from a port that has accepted the access later, and a busy signal is output from one of the two ports. In this case, a processor that has a holding circuit that holds the busy signal and that receives access to the dual port memory at one of the ports is held by the holding circuit after the processor accesses the dual port memory. Read the contents, and the contents held by the holding circuit are busy signals. In some cases, to provide a processor system and having a retry means for accessing the dual port memory described above again.

【0012】本発明に係るプロセッサシステムによれ
ば、メモリアクセスをウェイトする機能を持たないプロ
セッサであっても、前記保持回路に保持されるビジー信
号の有無に応じて、アクセスのリトライを行うので、デ
ュアルポートへ正常なメモリアクセスを行うことができ
る。
According to the processor system of the present invention, the access is retried depending on the presence / absence of the busy signal held in the holding circuit even if the processor does not have the function of waiting the memory access. Normal memory access to the dual port can be performed.

【0013】また、前記デュアルポートメモリは、前記
2つのポートに当該ポートでアクセスが受け付けられる
プロセッサより入力される書き込み指示信号に応じて、
デュアルポートメモリへの書き込みアクセスを当該書き
込み指示信号が入力されたポートで受け付けるデュアル
ポートメモリである場合に、前記保持回路に保持されて
いる内容ががビジー信号である場合に、前記一方のポー
トでデュアルポートメモリへのアクセスが受け付けられ
るプロセッサから出力された書き込み指示信号の前記一
方のポートへの入力を抑止する抑止回路を備えれば、ア
クセスの競合時に即座に後着の書き込みアクセスを抑止
することができ、誤ったデータがDPRAMに書き込まれて
しまうことを防ぐことができる。
Further, the dual port memory is responsive to a write instruction signal input from a processor whose access is accepted to the two ports.
In the case of a dual port memory that accepts write access to the dual port memory at the port to which the write instruction signal is input, if the content held in the holding circuit is a busy signal, If a suppressor circuit that suppresses the input of the write instruction signal output from the processor that accepts access to the dual port memory to the one port is provided, immediately suppress the write access of the last arrival in the case of access conflict. It is possible to prevent erroneous data from being written to DPRAM.

【0014】[0014]

【発明の実施の形態】以下、本発明に係るプロセッサシ
ステムの実施の形態について説明する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of a processor system according to the present invention will be described below.

【0015】まず、第1の実施の形態について説明す
る。
First, a first embodiment will be described.

【0016】図1に、本第1実施形態に係るプロセッサ
システムの構成を示す。
FIG. 1 shows the configuration of a processor system according to the first embodiment.

【0017】図1において、デュアルポートメモリ(以
下、「DPRAM」と記す)1の、図中右側のポートには、
メモリアクセスに対しウェイト機能を持つプロセッサ3
がアドレスバス4R、データバス5Rにより接続されてい
る。また、右側のポートのリード/ライト指示信号(以
下、「R/!W信号」と記す)入力端子15には、プロセッ
サ3のR/!W信号出力端子16が接続されている。また、
2つのプロセッサ2、3が同じアドレス領域にメモリア
クセスした場合であって、プロセッサ3が後着であった
場合に!BUSY信号(Low信号)が出力される右側ポートの
!BUSY端子6Rには、プロセッサ3のメモリレディ(MR)
端子10に接続されている。メモリレディ(MR)端子10
に!BUSY信号(Low信号)が入力されているとき、プロセ
ッサ3はメモリアクセスをウェイトさせる。ただし、本
明細書では、文章作成上の技術的な問題から、図面では
上線を付して表した、Low信号(論理値0)を有意とし
て取り扱う信号の入出力端子の前に、!を付して表して
いる。
In FIG. 1, a dual port memory (hereinafter referred to as "DPRAM") 1 has a port on the right side in the drawing,
Processor 3 with wait function for memory access
Are connected by an address bus 4R and a data bus 5R. An R /! W signal output terminal 16 of the processor 3 is connected to a read / write instruction signal (hereinafter referred to as "R /! W signal") input terminal 15 of the right port. Also,
When two processors 2 and 3 access the same address area and the processor 3 arrives last, the BUSY signal (Low signal) is output from the right port.
! The BUSY terminal 6R has a memory ready (MR) for the processor 3.
It is connected to the terminal 10. Memory ready (MR) terminal 10
When the! BUSY signal (Low signal) is input to the processor 3, the processor 3 causes the memory access to wait. However, in this specification, before the input / output terminal of the signal that treats the Low signal (logical value 0) as significant, which is represented by an overline in the drawing, due to a technical problem in writing a sentence ,! It is indicated by adding.

【0018】一方、DPRAM1の図中左側のポートには、
メモリアクセスに対しウェイト機能を持たないプロセッ
サ2がアドレスバス4L、データバス5Lにより接続さ
れている。また、また、2つのプロセッサ2、3が同じ
アドレス領域にメモリアクセスした場合であって、プロ
セッサ2が後着であった場合に!BUSY信号(Low信号)が
出力される左側ポートの!BUSY端子6Lと左側ポートのR
/!W端子14は、 !BUSY信号保持回路7に接続されてい
る。
On the other hand, the port on the left side of the DPRAM 1 in the figure is
A processor 2 having no wait function for memory access is connected by an address bus 4L and a data bus 5L. When the two processors 2 and 3 access the same address area and the processor 2 arrives last, the! BUSY signal (Low signal) is output from the left port! BUSY terminal. 6L and left port R
The /! W terminal 14 is connected to the! BUSY signal holding circuit 7.

【0019】この!BUSY信号保持回路7は、信号を保持
可能なセットリセットフリップフロップ(以下、「SRF
F」と記す)8とORゲート9により構成されている。!BU
SY端子6Lは、SRFF8のセット入力端子(!S)に接続され
ており、SRFF8は、メモリアクセス競合時に!BUSY信号
によってセットされる。また、SRFF8の出力端子(Q)
は、プロセッサ2の入力端子11に接続されており、プ
ロセッサ2からSRFF8の保持している内容を取り込める
ようになっている。また、プロセッサ2の出力端子12
と、SRFF8のリセット入力端子(!R)は接続されており、
プロセッサ2は任意にSRFF8をリセットすることができ
る。
The! BUSY signal holding circuit 7 is a set-reset flip-flop (hereinafter referred to as "SRF") capable of holding a signal.
8) and an OR gate 9. ! BU
The SY terminal 6L is connected to the set input terminal (! S) of the SRFF 8, and the SRFF 8 is set by the! BUSY signal when there is a memory access conflict. Also, SRFF8 output terminal (Q)
Is connected to the input terminal 11 of the processor 2 so that the contents held by the SRFF 8 can be taken from the processor 2. In addition, the output terminal 12 of the processor 2
, And the reset input terminal (! R) of SRFF8 is connected,
Processor 2 can optionally reset SRFF8.

【0020】また、プロセッサ2のR/!W信号出力端子1
3は、SRFF8の出力端子(Q)と共にORゲート9に接続さ
れ、ORゲート9の出力はDPRAM1の左側ポートのR/!W信
号入力端子14に接続されている。
The R /! W signal output terminal 1 of the processor 2
3 is connected to the OR gate 9 together with the output terminal (Q) of the SRFF 8, and the output of the OR gate 9 is connected to the R /! W signal input terminal 14 of the left port of the DPRAM 1.

【0021】以下、このようなプロセッサシステムにお
けるメモリアクセスの動作について説明する。
The operation of memory access in such a processor system will be described below.

【0022】まず、図2に、メモリアクセスに対しウェ
イト機能を持たないプロセッサ2のDPRAM1へのメモリ
アクセスの手順を示す。
First, FIG. 2 shows a procedure of memory access to the DPRAM 1 of the processor 2 having no wait function for memory access.

【0023】図示するように、ウェイト機能を持たない
プロセッサ2は、まずメモリアクセスを実行する(20
0)。このメモリアクセスでは、DPRAM1の単一のアド
レスのアクセスの場合もあるし、複数のアドレスに連続
してアクセスする場合もある。そして、その実行が正常
であったかどうか確認のために入力端子11よりSRFF8
の状態を得る(201)。このとき、もし、DPRAM1に
おいてメモリアクセスの競合が生じており、プロセッサ
2が後着であった場合には、!BUSY端子6Lに出力され
たLow信号によってSRFF8はセットされている。
As shown in the figure, the processor 2 having no wait function first executes memory access (20).
0). In this memory access, a single address of the DPRAM 1 may be accessed, or a plurality of addresses may be continuously accessed. Then, SRFF8 from the input terminal 11 to confirm whether the execution was normal.
(201). At this time, if a memory access conflict occurs in the DPRAM 1 and the processor 2 arrives later, the SRFF 8 is set by the Low signal output to the! BUSY terminal 6L.

【0024】入力端子11がHigh(論理値1)であるな
らば、メモリアクセスは正常に行われなかった可能性が
あるので、SRFF8内の値をプロセッサ2の出力端子12
からの出力によりリセットした(202)後に、同じ領
域に対し再度メモリアクセスを行う(200)。
If the input terminal 11 is High (logical value 1), the memory access may not have been performed normally, so the value in SRFF8 is set to the output terminal 12 of the processor 2.
After resetting by the output from (202), memory access is performed again for the same area (200).

【0025】そして、ステップ201において入力端子
11の値がLow(論理値0)と判定されるまで、以上の
処理を繰り返し、入力端子11の値がLow(論理値0)
と判定されたなら次の処理に進む(203) ここで、図2に示したメモリアクセスの手順は、たとえ
ば、図3に示すようなプログラムによって実現すること
ができる。
The above processing is repeated until the value of the input terminal 11 is Low (logical value 0) in step 201, and the value of the input terminal 11 is Low (logical value 0).
If it is determined that the process proceeds to the next process (203), the memory access procedure shown in FIG. 2 can be realized by a program shown in FIG. 3, for example.

【0026】このプログラムの、第1行目はSRCのデー
タをDPRAM1のアドレスDSTに書き込む処理を表してお
り、第2行目は入力端子11の値がHigh(論理値)であ
る間、第3行目、第4行目の処理を繰り返すことを示し
ている。そして、第3行目は出力端子12からLow(論
理値0)を出力してSRFF8をリセットする処理を、第4
行目は第1行目と同じくSRCのデータをDPRAM1のアドレ
スDSTに書き込む処理を表している。
The first line of this program shows the process of writing the SRC data to the address DST of the DPRAM 1, and the second line is the third line while the value of the input terminal 11 is High (logical value). It indicates that the processing of the fourth and fourth rows is repeated. Then, in the third line, the process of outputting Low (logical value 0) from the output terminal 12 and resetting SRFF8 is performed.
The row shows the processing of writing the SRC data to the address DST of the DPRAM 1 as in the first row.

【0027】このように、本実施形態では、プロセッサ
2がメモリアクセスウェイト機能を持たないために、プ
ロセッサ2の行う処理に追加することが必要となるの
は、メモリアクセスのウェイト機能を持たないプロセッ
サ2のDPRAM1へのアクセス処理を、図2に示した手順
とすることのみである。さらには、たとえば、図3のプ
ログラムを、DPRAM1へのアクセスの際に呼び出され
る、引数としてSRCとDSTを受け取るモジュールとして用
意すれば、この図2の手順を実現するためのプログラム
の作成上の負担を、より小さくすることができる。
As described above, in the present embodiment, since the processor 2 does not have the memory access wait function, it is necessary to add to the processing performed by the processor 2 that the processor not having the memory access wait function. The access processing to the DPRAM 1 of No. 2 is only the procedure shown in FIG. Further, for example, if the program of FIG. 3 is prepared as a module that receives SRC and DST as arguments that are called when the DPRAM 1 is accessed, the burden of creating the program for realizing the procedure of FIG. Can be made smaller.

【0028】さて、ここで、このような本実施形態に係
るプロセッサシステムにおけるDPRAM1のアクセスのタ
イムチャートを図4に示す。
Now, FIG. 4 shows a time chart of access to the DPRAM 1 in the processor system according to the present embodiment.

【0029】図4の(1)(2)の様にプロセッサ3が
メモリアクセスを行っている時に、プロセッサ3のメモ
リアクセスが同一アドレスに対して行われると、(3)
に示されるようにプロセッサ2の側の!BUSY端子6Lに!
BUSY信号(LOW)が出力される。この!BUSY信号はSRFF8に
て保持され、SRFF8の出力信号は(4)に示すようにな
る。プロセッサ2はSRFF8の出力を得ることで、!BUSY
信号を検出し、SRFF8をリセットすると共に、前述した
ように従い同一アドレスに再度メモリアクセスを行う。
If the memory access of the processor 3 is performed to the same address while the processor 3 is performing the memory access as shown in (1) and (2) of FIG. 4, (3)
To the! BUSY terminal 6L on the processor 2 side as shown in!
BUSY signal (LOW) is output. This! BUSY signal is held by SRFF8, and the output signal of SRFF8 becomes as shown in (4). Processor 2 gets the output of SRFF8, and
The signal is detected, SRFF8 is reset, and memory access is again performed to the same address as described above.

【0030】ここで、プロセッサ2のメモリアクセスの
タイミングによっては、!BUSY信号6Lが解除された直
後からプロセッサ2のDPRAMへのアクセスを許可するよ
うにすると、メモリへの書込時に図3の(2)の斜線部
の様な異常データを書き込む恐れがある。そこで、本第
1実施形態では、ORゲート9によりSRFF8により保持さ
れた!BUSY信号と(5)に示すプロセッサ2のR/!W信号
のORをとった信号を、DPRAM1のR/!W信号入力端子14
に与える。これにより、メモリアクセス競合により!BUS
Y信号が出力されてからリトライ時の書き込みまでDPRAM
1への書き込みが行われなように抑止する。
Here, depending on the memory access timing of the processor 2, if access to the DPRAM of the processor 2 is allowed immediately after the! BUSY signal 6L is released, when writing to the memory, the There is a risk of writing abnormal data such as the shaded area in 2). Therefore, in the first embodiment, the signal obtained by ORing the! BUSY signal held by the SRFF 8 by the OR gate 9 and the R /! W signal of the processor 2 shown in (5) is used as the R /! W signal of the DPRAM 1. Input terminal 14
Give to. This causes memory access contention! BUS
DPRAM from Y signal output to writing at retry
Inhibit writing to 1.

【0031】以上、本発明の第1の実施形態について説
明した。
The first embodiment of the present invention has been described above.

【0032】以下、本発明の第2の実施形態について説
明する。
The second embodiment of the present invention will be described below.

【0033】図5に、本第2実施形態に係るプロセッサ
システムの構成を図5に示す。
FIG. 5 shows the configuration of the processor system according to the second embodiment.

【0034】図示するように、本第2実施形態に係るプ
ロセッサシステムの、メモリウェイト機能を備えたプロ
セッサ3とDPRAM1との接続は、前述した第1実施形態
に係るプロセッサシステム(図1参照)のプロセッサ3
とDPRAM1との接続と同じである。
As shown in the figure, in the processor system according to the second embodiment, the connection between the processor 3 having the memory wait function and the DPRAM 1 is the same as that of the processor system according to the first embodiment (see FIG. 1). Processor 3
And DPRAM1 connection is the same.

【0035】また、メモリウェイト機能を備えていない
プロセッサ2とDPRAM1とは次のように接続されるてい
る。
Further, the processor 2 having no memory wait function and the DPRAM 1 are connected as follows.

【0036】すなわち、DPRAM1の図中左側のポートに
は、メモリアクセスに対しウェイト機能を持たないプロ
セッサ2がアドレスバス4L、データバス5Lにより接
続されている。
That is, the processor 2 having no wait function for memory access is connected to the port on the left side of the DPRAM 1 in the figure by the address bus 4L and the data bus 5L.

【0037】また、DPRAM1の左側のポートの!BUSY端子
6Lは、セットリセットフリップフロップ(SRFF)8の
セット入力端子(!S)に接続されている。SRFF8の出力
(Q)は、トリステートバッファ25を介してプロセッサ
2のデータバスの最上位端子(D7)に接続されている。ま
た、SRFF8のリセット入力端子(!R)も、トリステート
バッファ24を介してプロセッサ2のデータバスの最上
位端子(D7)に接続されている。
The! BUSY terminal 6L of the left port of the DPRAM 1 is connected to the set input terminal (! S) of the set / reset flip-flop (SRFF) 8. SRFF8 output
(Q) is connected to the uppermost terminal (D7) of the data bus of the processor 2 via the tristate buffer 25. The reset input terminal (! R) of the SRFF 8 is also connected to the uppermost terminal (D7) of the data bus of the processor 2 via the tristate buffer 24.

【0038】トリステートバッファ24、25は、AND
ゲート21、22、23を介してプロセッサ2がアドレ
スバス4Lに出力するアドレスと、プロセッサ2がR/!W
出力端子13に出力する信号によって、出力をハイイン
ピーダンスとする状態と、入力に従った出力を行う状態
(便宜上、「スルー状態」と呼ぶ)が制御される。ま
た、図示は、省略したが、プロセッサ2のデータバスの
最上位端子(D7)除く7つの端子(D0-D7)には、各々、
トリステートバッファ25と同じ状態に制御される7つ
のトリステートバッファを介して、Hi(論理値1)が接続
されている。
The tristate buffers 24 and 25 are ANDed
The address that the processor 2 outputs to the address bus 4L via the gates 21, 22, and 23, and the processor 2 outputs R /! W.
A signal output to the output terminal 13 controls a state in which the output has a high impedance and a state in which the output is performed according to the input (for convenience, referred to as “through state”). Although not shown in the figure, the seven terminals (D0-D7) except the highest-order terminal (D7) of the data bus of the processor 2 are respectively
Hi (logical value 1) is connected through seven tristate buffers controlled to the same state as the tristate buffer 25.

【0039】以下、このようなプロセッサシステムにお
けるメモリアクセスの動作について説明する。
The operation of memory access in such a processor system will be described below.

【0040】まず、図6に、メモリアクセスに対しウェ
イト機能を持たないプロセッサ2のDPRAM1へのメモリ
アクセスの手順を示す。
First, FIG. 6 shows a procedure of memory access to the DPRAM 1 of the processor 2 having no wait function for memory access.

【0041】プロセッサ2は、まずメモリアクセスを実
行する(601)。そして、その実行が正常であったか
どうかわからないため、D000のアドレスのデータを読み
込むようにアクセスする(602)。すると、図5にお
いて、アドレスバスの上位4ビット(A15、A14、A13、A
12)と接続された(A13は反転している)4入力のANDゲ
ート21の出力がHiになる。アドレスバスの最下位ビッ
ト(A0)とR/!W信号は4入力のANDゲート21の出力と共
に3入力のANDゲート22に接続されており、アドレスD0
00の読み込み時に3入力のANDゲート22の出力はHiにな
る。一方、3アドレスバスの最下位ビット(A0)とR/!W
信号は反転されて、4入力のANDゲート21の出力と共に
3入力のANDゲート23に接続されているため、アドレス
番地D000の読み込み時に3入力のANDゲート23の出力は
Lowになる。これにより、トリステートバッファ25は
スルー状態、トリステートバッファ24はハイインピー
ダンス状態となり、SRFF8の出力がデータバスの最上位
端子に入力され、プロセッサ2はSRFF8の出力状態を認
識することができる。
The processor 2 first executes memory access (601). Then, since it is unknown whether or not the execution was normal, access is made so as to read the data at the address of D000 (602). Then, in FIG. 5, the upper 4 bits of the address bus (A15, A14, A13, A
The output of the 4-input AND gate 21 connected to (12) (A13 is inverted) becomes Hi. The least significant bit (A0) of the address bus and the R /! W signal are connected to the 3-input AND gate 22 together with the output of the 4-input AND gate 21, and the address D0
When 00 is read, the output of the 3-input AND gate 22 becomes Hi. On the other hand, the least significant bit (A0) of the 3 address buses and R /! W
The signal is inverted and output with the AND gate 21 with 4 inputs
Since it is connected to the 3-input AND gate 23, the output of the 3-input AND gate 23 when the address D000 is read
It goes low. As a result, the tristate buffer 25 is in the through state, the tristate buffer 24 is in the high impedance state, the output of the SRFF 8 is input to the uppermost terminal of the data bus, and the processor 2 can recognize the output state of the SRFF 8.

【0042】ここで、もし、プロセッサ2が、メモリア
クセスの競合時に後着であった場合、!BUSY端子(Q)にLo
wが出力され、その信号はSRFF8のセット入力端子(!S)
に与えられSRFF8をセットする。したがい、プロセッサ
2がステップ602でアドレスD000から読み込んだデー
タが255であるならば、メモリアクセスは正常に行わ
れなかった可能性があると判断することができる。逆
に、アドレスD000から読み込んだデータが127である
ならば、メモリアクセスが正常に実行されたと判断する
ことができる。
Here, if the processor 2 is the last one at the time of contention for memory access, the! BUSY terminal (Q) is set to Lo.
w is output, and the signal is the set input terminal (! S) of SRFF8.
And set SRFF8. Therefore, if the data read from the address D000 by the processor 2 in step 602 is 255, it can be determined that the memory access may not have been normally performed. On the contrary, if the data read from the address D000 is 127, it can be determined that the memory access is normally executed.

【0043】そこで、次に、ステップ602で読み込ん
だデータが255であるか否かを判定し(603)、2
55でなければ正常にメモリアクセスが行われたものと
して次の処理に進む。
Then, next, it is judged whether or not the data read in step 602 is 255 (603), 2
If it is not 55, it is determined that the memory access is normally performed, and the process proceeds to the next process.

【0044】一方、ステップ602で読み込んだデータ
が255である場合には、アドレスD001に127を書き
込む(604)。この書き込みによって、4入力のANDゲ
ート21の出力がHiになり。3入力のANDゲート22の出
力はLowになる。一方、3入力のANDゲート23はHighに
なる。これにより、トリステートバッファ24はスルー
状態、トリステートバッファ25はハイインピーダンス
状態となり、データバスの最上位端子の状態LowがSRFF
8のリセット端子(!R)に入力され、SRFF8はリセットさ
れる。
On the other hand, when the data read in step 602 is 255, 127 is written in the address D001 (604). By this writing, the output of the 4-input AND gate 21 becomes Hi. The output of the 3-input AND gate 22 becomes low. On the other hand, the 3-input AND gate 23 becomes High. As a result, the tristate buffer 24 is in the through state, the tristate buffer 25 is in the high impedance state, and the state of the highest-order terminal of the data bus is SRFF.
8 is input to the reset terminal (! R) and SRFF8 is reset.

【0045】そして、DPRAM1の同じアドレスに再度メモ
リアクセスを行う(601)。
Then, memory access is performed again to the same address of DPRAM1 (601).

【0046】また、前述した本第1実施形態と同様に、
ORゲート9によりSRFF8により保持された!BUSY信号と
プロセッサ2のR/!W信号のORをとった信号を、DPRAM1
のR/!W信号入力端子14に与える、メモリアクセス競合
により!BUSY信号が出力されてからリトライ時の書き込
みまでDPRAM1への書き込みが行われなように抑止して
いる。
Further, like the first embodiment described above,
The signal obtained by ORing the! BUSY signal held by the SRFF 8 by the OR gate 9 and the R /! W signal of the processor 2 with the DPRAM 1
The R /! W signal input terminal 14 is used to prevent writing to the DPRAM 1 from output of the! BUSY signal due to memory access conflict to writing at the time of retry.

【0047】ここで、図6に示したメモリアクセスの手
順は、たとえば、図7に示すようなプログラムによって
実現することができる。
The memory access procedure shown in FIG. 6 can be realized by a program shown in FIG. 7, for example.

【0048】このプログラムの、第1行目では、変数Y
の値として127を定義している。第2行目はSRCのデ
ータをDPRAM1のアドレスDSTに書き込む処理を表してお
り、第3行目はアドレスD001からデータを読み込み、こ
の値を変数Xの値とする処理を表している。第4行目
は、Xの値が255である間、第5行目、第6行目の処
理を繰り返すことを示している。そして、第5行目はア
ドレスD001にY(127)を書き込んで、SRFF8をリセッ
トする処理を、第6行目は第1行目と同じくSRCのデー
タをDPRAM1のアドレスDSTに書き込む処理を表してい
る。
In the first line of this program, the variable Y
Is defined as 127. The second line shows the process of writing the SRC data to the address DST of the DPRAM 1, and the third line shows the process of reading the data from the address D001 and setting this value as the value of the variable X. The fourth line indicates that the processes of the fifth and sixth lines are repeated while the value of X is 255. The fifth line shows the process of writing Y (127) to the address D001 and resetting SRFF8, and the sixth line shows the process of writing the SRC data to the address DST of DPRAM1 as in the first line. There is.

【0049】このように、本第2実施形態でも、前記第
1実施形態と同様に、メモリアクセスウェイト機能を持
たないプロセッサを用いたプロセッサシステムにおい
て、メモリアクセスの正常性を保証することができる。
また、本題2実施形態では、メモリアクセスウェイト機
能を持たないプロセッサのデータバス以外の入出力端子
を第1実施形態のごとく利用できない場合でも実現する
ことができる。
As described above, also in the second embodiment, the normality of the memory access can be guaranteed in the processor system using the processor having no memory access wait function, as in the first embodiment.
The second embodiment can be realized even when the input / output terminals other than the data bus of the processor having no memory access wait function cannot be used as in the first embodiment.

【0050】なお、以上では、2つのプロセッサのうち
の一方のみが、メモリアクセスウェイト機能を持たない
プロセッサである場合について説明したが、2つのプロ
セッサの双方がメモリアクセスウェイト機能を持たない
場合でも以上で説明した2つの実施形態は同様に適用す
ることができる。すなわち、この場合には、各プロセッ
サとDPRAMの接続を、前記第1、第2実施形態における
プロセッサとDPRAMの接続と同じように行えばよい。
Although the case where only one of the two processors does not have the memory access wait function has been described above, even if both of the two processors do not have the memory access wait function, The two embodiments described above can be similarly applied. That is, in this case, the connection between each processor and the DPRAM may be made in the same manner as the connection between the processor and the DPRAM in the first and second embodiments.

【0051】[0051]

【発明の効果】以上のように、本発明によれば2つのプ
ロセッサ間で一つのメモリを共有するシステムであっ
て、プロセッサとしてメモリアクセスをウェイトする機
能を持たないプロセッサを用いた場合にも、メモリアク
セスの正常性を保証することのできるプロセッサシステ
ムを提供することができる。
As described above, according to the present invention, even in a system in which one memory is shared between two processors and a processor having no memory access wait function is used, A processor system capable of guaranteeing normality of memory access can be provided.

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

【図1】本発明の第1実施形態に係るプロセッサシステ
ムの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a processor system according to a first embodiment of the present invention.

【図2】本発明の第1実施形態におけるメモリアクセス
の手順を示す図である。
FIG. 2 is a diagram showing a procedure of memory access according to the first embodiment of the present invention.

【図3】本発明の第1実施形態におけるメモリアクセス
を実現するプログラムを示す図である。
FIG. 3 is a diagram showing a program that realizes a memory access according to the first embodiment of the present invention.

【図4】本発明の第1実施形態に係るプロセッサシステ
ムにおけるメモリアクセスのタイミングを示すタイムチ
ャートである。
FIG. 4 is a time chart showing memory access timing in the processor system according to the first embodiment of the present invention.

【図5】本発明の第2実施形態に係るプロセッサシステ
ムの構成を示す図である。
FIG. 5 is a diagram showing a configuration of a processor system according to a second embodiment of the present invention.

【図6】本発明の第2実施形態におけるメモリアクセス
の手順を示す図である。
FIG. 6 is a diagram showing a memory access procedure according to the second embodiment of the present invention.

【図7】本発明の第2実施形態におけるメモリアクセス
を実現するプログラムを示す図である。
FIG. 7 is a diagram showing a program for realizing a memory access according to the second embodiment of the present invention.

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

1…デュアルポートメモリ、2…ウェイト機能を持たな
いプロセッサ、3…ウェイト機能を持つプロセッサ、4
L、4R…アドレスバス、5L、5R…データバス、6
L、6R…!BUSY信号出力端子、7、20…!BUSY信号保
持回路、8…セットリセットフリップフロップ、9…2
入力ORゲート、10…メモリレディ端子、11…入力端
子、12…出力端子、13、14…R/!W信号出力端子、
21…4入力ANDゲート、22、23…3入力NDゲー
ト、24、25…トリステートバッフ
1 ... Dual port memory, 2 ... Processor without wait function, 3 ... Processor with wait function, 4
L, 4R ... Address bus, 5L, 5R ... Data bus, 6
L, 6R ...! BUSY signal output terminal, 7, 20 ...! BUSY signal holding circuit, 8 ... Set / reset flip-flop, 9 ... 2
Input OR gate, 10 ... Memory ready terminal, 11 ... Input terminal, 12 ... Output terminal, 13, 14 ... R /! W signal output terminal,
21 ... 4-input AND gate, 22, 23 ... 3-input ND gate, 24, 25 ... Tristate buffer

───────────────────────────────────────────────────── フロントページの続き (72)発明者 池田 光二 茨城県日立市大みか町七丁目1番1号 株 式会社日立製作所日立研究所内 ─────────────────────────────────────────────────── ─── Continuation of front page (72) Inventor Koji Ikeda 7-1 Omika-cho, Hitachi-shi, Ibaraki Hitachi Ltd. Hitachi Research Laboratory

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】2つのプロセッサと、 当該2つのプロセッサのアクセスを各々受け付ける2つ
のポートを備え、2つのポートで受け付けたアクセスが
競合した場合に、より後にアクセスを受け付けたポート
からアクセスの競合を通知するビジー信号を出力するデ
ュアルポートメモリとを備えたプロセッサシステムであ
って、 前記2つのポートのうちの一方のポートからビジー信号
が出力された際に、当該ビジー信号を保持する保持回路
を備え、 前記一方のポートでデュアルポートメモリへのアクセス
が受け付けられるプロセッサは、当該プロセッサのデュ
アルポートメモリへのアクセスの実行後に、前記保持回
路が保持している内容を読み込み、前記保持回路が保持
している内容がビジー信号である場合に、前記実行した
デュアルポートメモリへのアクセスを再度行うリトライ
手段とを有することを特徴とするプロセッサシステム。
1. A processor comprising two processors and two ports for respectively accepting the accesses of the two processors, and when the accesses accepted by the two ports conflict, the conflict of the access is accepted from the port accepting the access later. A processor system including a dual port memory that outputs a busy signal for notification, comprising a holding circuit that holds the busy signal when the busy signal is output from one of the two ports. The processor that accepts the access to the dual port memory at the one port reads the content held by the holding circuit after the execution of the access to the dual port memory by the processor, and holds the content held by the holding circuit. If the content is a busy signal, the dual port memory Processor system and having a retry means for performing re-access to.
【請求項2】請求項1記載のプロセッサシステムであっ
て、 前記一方のポートでデュアルポートメモリへのアクセス
が受け付けられるプロセッサは、当該プロセッサのデュ
アルポートメモリへのアクセスの実行後に、読み込んだ
前記保持回路が保持している内容がビジー信号である場
合に、前記保持回路の保持している内容を初期化する手
段を有することを特徴とするプロセッサシステム。
2. The processor system according to claim 1, wherein the processor accepting an access to the dual port memory at the one port receives the holding data after executing the access to the dual port memory of the processor. A processor system comprising means for initializing the content held by the holding circuit when the content held by the circuit is a busy signal.
【請求項3】請求項2記載のプロセッサシステムであっ
て、 前記デュアルポートメモリは、前記2つのポートに当該
ポートでアクセスが受け付けられるプロセッサより入力
される書き込み指示信号に応じて、デュアルポートメモ
リへの書き込みアクセスを当該書き込み指示信号が入力
されたポートで受け付けるデュアルポートメモリであっ
て、 前記保持回路に保持されている内容ががビジー信号であ
る場合に、前記一方のポートでデュアルポートメモリへ
のアクセスが受け付けられるプロセッサから出力された
書き込み指示信号の前記一方のポートへの入力を抑止す
る抑止回路を備えたことを特徴とするプロセッサシステ
ム。
3. The processor system according to claim 2, wherein the dual port memory is configured to be a dual port memory in response to a write instruction signal input from a processor whose access is accepted to the two ports. Is a dual-port memory that accepts the write access of at the port to which the write instruction signal is input, and when the content held in the holding circuit is a busy signal, the one port writes to the dual-port memory. A processor system comprising: a suppressor circuit that suppresses an input of a write instruction signal output from a processor to which access is accepted to the one port.
【請求項4】請求項2または3記載のプロセッサシステ
ムであって、 前記一方のポートでデュアルポートメモリへのアクセス
が受け付けられるプロセッサの特定アドレスへのアクセ
スに応じて前記保持回路の保持内容を初期化する初期化
回路と、 前記一方のポートでデュアルポートメモリへのアクセス
が受け付けられるプロセッサの特定アドレスへのリード
アクセスに応じて、前記保持回路の保持内容を当該プロ
セッサに当該リードアクセスに対するリードデータとし
て送る中継回路とを備えたことを特徴とするプロセッサ
システム。
4. The processor system according to claim 2, wherein the content held in the holding circuit is initialized in response to an access to a specific address of the processor, which accepts access to the dual port memory at the one port. In response to a read access to a specific address of the processor that accepts access to the dual port memory at the one port and an initialization circuit to be converted, the content held in the holding circuit is used as read data for the read access by the processor. A processor system comprising a relay circuit for sending.
【請求項5】請求項2または3記載のプロセッサシステ
ムであって、 前記一方のポートでデュアルポートメモリへのアクセス
が受け付けられるプロセッサは、前記保持回路の保持内
容を読み出すための入力端子と、前記保持回路を初期化
するための信号を出力するための出力端子とを、前記デ
ュアルポートメモリへのアクセスに用いる端子とは別個
に備えていることを特徴とするプロセッサシステム。
5. The processor system according to claim 2 or 3, wherein the processor accepting access to the dual port memory at the one port has an input terminal for reading the content held by the holding circuit, A processor system comprising: an output terminal for outputting a signal for initializing a holding circuit, separately from a terminal used for accessing the dual port memory.
JP4155796A 1996-02-28 1996-02-28 Processor system Pending JPH09231122A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4155796A JPH09231122A (en) 1996-02-28 1996-02-28 Processor system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4155796A JPH09231122A (en) 1996-02-28 1996-02-28 Processor system

Publications (1)

Publication Number Publication Date
JPH09231122A true JPH09231122A (en) 1997-09-05

Family

ID=12611741

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4155796A Pending JPH09231122A (en) 1996-02-28 1996-02-28 Processor system

Country Status (1)

Country Link
JP (1) JPH09231122A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100720663B1 (en) * 2005-08-03 2007-05-21 경북대학교 산학협력단 Dual-port RAM synchronization device and microprocessor using the device
JP2007316880A (en) * 2006-05-25 2007-12-06 Meidensha Corp Access right arbitration system for dual port memory
KR100847968B1 (en) * 2005-08-05 2008-07-22 키몬다 아게 Dual-port semiconductor memories
JP2009237980A (en) * 2008-03-27 2009-10-15 Hitachi Ltd Multiport memory and information processing system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100720663B1 (en) * 2005-08-03 2007-05-21 경북대학교 산학협력단 Dual-port RAM synchronization device and microprocessor using the device
KR100847968B1 (en) * 2005-08-05 2008-07-22 키몬다 아게 Dual-port semiconductor memories
JP2007316880A (en) * 2006-05-25 2007-12-06 Meidensha Corp Access right arbitration system for dual port memory
JP2009237980A (en) * 2008-03-27 2009-10-15 Hitachi Ltd Multiport memory and information processing system

Similar Documents

Publication Publication Date Title
US5398211A (en) Structure and method for providing prioritized arbitration in a dual port memory
CA2468797C (en) Supercharge message exchanger
JPH096717A (en) System and method for data processing containing buffering mechanism for inbound and outbound read as well as posted write
JPH01147647A (en) data processing equipment
JPH07105146A (en) Shared memory device
KR950010529B1 (en) Memory sharing device for interprocessor communication
JPH09231122A (en) Processor system
US5627968A (en) Data transfer apparatus which allows data to be transferred between data devices without accessing a shared memory
JPH04278286A (en) Semiconductor storage device and method for reading data from it
GB2412767A (en) Processor with at least two buses between a read/write port and an associated memory with at least two portions
JP5061504B2 (en) Dual port memory access right arbitration method
KR19980068130A (en) Data access control device using shared memory
KR100217743B1 (en) Shared memory connection device and its connection method
JP2537526B2 (en) Multiprocessor system
JPH0652067A (en) Multiport RAM check control method
JPH05257903A (en) Multiprocessor system
JPH07160655A (en) Memory access method
JPH0120453B2 (en)
JP3057754B2 (en) Memory circuit and distributed processing system
JP2856709B2 (en) Bus coupling system
JP2803616B2 (en) I/O bus interface control method
JPH0326867B2 (en)
JP2610971B2 (en) Direct memory access method between central processing units
JP2606824Y2 (en) Multiport memory device
KR960007835B1 (en) Common memory access device for multi-processor