JP2000181783A - Mediation circuit - Google Patents

Mediation circuit

Info

Publication number
JP2000181783A
JP2000181783A JP10357797A JP35779798A JP2000181783A JP 2000181783 A JP2000181783 A JP 2000181783A JP 10357797 A JP10357797 A JP 10357797A JP 35779798 A JP35779798 A JP 35779798A JP 2000181783 A JP2000181783 A JP 2000181783A
Authority
JP
Japan
Prior art keywords
circuit
memory
output
access
access right
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
JP10357797A
Other languages
Japanese (ja)
Inventor
Eiji Yonezawa
栄治 米澤
Katsuyoshi Higashijima
勝義 東島
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 Holdings Corp
Original Assignee
Matsushita Electric Industrial Co 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 Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP10357797A priority Critical patent/JP2000181783A/en
Publication of JP2000181783A publication Critical patent/JP2000181783A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To reduce the number of access times to an arbitration circuit for preventing access contention in access to one memory that two processors share and to shorten time until the execution of memory access. SOLUTION: A D flip flop 1 outputting '1' when first and second processors do not access a memory and outputting '0' when the first and second processors access the memory and a combination circuit 100 generating the input of the D flip flop 1 so that the contention in access by an arbitration circuit for obtaining access right by the first and second processors and memory access with access for two times by the reading and the writing of the arbitration circuit are installed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、2つのプロセッサ
が共有する1つのメモリに対し、そのメモリアクセスの
競合を防止するための調停回路の改良を図ったものに関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement in an arbitration circuit for preventing contention of memory access for one memory shared by two processors.

【0002】[0002]

【従来の技術】図6は、2つのプロセッサ70、71に
対し1つのメモリ74を共有する環境において、2つの
プロセッサ70、71が同時に共有メモリ74をアクセ
スしないように,調停回路72を設けたプロセッサシス
テムを示すブロック図である。同図において、2つのプ
ロセッサ70,71、および共有メモリ74は、データ
バス73で接続されている。
2. Description of the Related Art FIG. 6 shows an arbitration circuit 72 provided in an environment where one memory 74 is shared by two processors 70 and 71 so that the two processors 70 and 71 do not access the shared memory 74 at the same time. FIG. 2 is a block diagram illustrating a processor system. In the figure, two processors 70, 71 and a shared memory 74 are connected by a data bus 73.

【0003】図7は、図6の調停回路72に関する従来
の動作を示した流れ図である。図7において、まずプロ
セッサ70がメモリアクセスを実行しようとした時に、
プロセッサ71がメモリアクセスを実行していないかを
確かめるために、プロセッサ70は調停回路72に対し
て値“1”を書込む(図7の状態T1)。次にプロセッ
サ70はその調停回路72が記憶している値を読み出す
(図7の状態T2)。そしてプロセッサ70は読み出し
た値を判定し(図7の状態T3)、その値が“1”なら
ばプロセッサ71がメモリアクセスを実行していない状
態と判断し、メモリアクセスを実行する(図7の状態T
4)。そしてプロセッサ70がメモリアクセスを終了し
たら、調停回路72に対して値“0”を書込み、自身の
アクセスが終了したことを示す(図7の状態T5)。
FIG. 7 is a flowchart showing a conventional operation of the arbitration circuit 72 shown in FIG. In FIG. 7, when the processor 70 first tries to execute a memory access,
In order to check whether the processor 71 is executing a memory access, the processor 70 writes a value “1” to the arbitration circuit 72 (state T1 in FIG. 7). Next, the processor 70 reads the value stored in the arbitration circuit 72 (state T2 in FIG. 7). Then, the processor 70 determines the read value (state T3 in FIG. 7), and if the value is “1”, determines that the processor 71 is not executing the memory access and executes the memory access (FIG. 7). State T
4). Then, when the processor 70 ends the memory access, the processor 70 writes the value “0” into the arbitration circuit 72 to indicate that the access of the processor 70 is completed (state T5 in FIG. 7).

【0004】また、プロセッサ70がメモリアクセスを
実行している間に、プロセッサ71もメモリアクセスを
実行しようとする時、最初の1回目のプロセッサ71の
動作は、調停回路72に値“1”を書込み(図7の状態
T1)、調停回路72から値を読み出し(図7の状態T
2)、その値を判定する(図7の状態T3)という動作
を行うが、2回目以降は調停回路72から読み出し(図
7の状態T2)、その値を判定する(図7の状態T
3)、という動作で済むようになっている。この動作を
実現した従来の調停回路として、例えば特開平5−12
7974号公報に示されたセマフォビット回路がある。
図8はその構成を示すもので、図9はその動作タイミン
グを示すものである。
When the processor 71 also attempts to execute a memory access while the processor 70 is executing a memory access, the first operation of the processor 71 sets the arbitration circuit 72 to a value “1”. Write (state T1 in FIG. 7), read the value from the arbitration circuit 72 (state T1 in FIG. 7).
2), the operation of judging the value (state T3 in FIG. 7) is performed. From the second time, the operation is read from the arbitration circuit 72 (state T2 in FIG. 7) and the value is judged (state T in FIG. 7).
3), the operation is completed. A conventional arbitration circuit realizing this operation is disclosed in, for example,
There is a semaphore bit circuit disclosed in Japanese Patent No. 7974.
FIG. 8 shows the configuration, and FIG. 9 shows the operation timing.

【0005】図8において、49,57はそれぞれ第
1,第2のプロセッサ70,71のデータバス、50,
58はそれぞれ第1,第2のプロセッサ70,71のラ
イト信号、51,59はそれぞれ第1,第2のプロセッ
サ70,71のリード信号、42は第2のプロセッサ7
1のライト信号58を非反転で入力し、出力バッファ5
6の出力を反転入力するAND回路、44は第1のプロ
セッサ70のライト信号50および出力バッファ52の
出力を非反転で入力し、ラッチ54の出力を反転入力す
るAND回路、43はこれら2つのAND回路42,4
3の出力を入力するOR回路、45は第2のプロセッサ
71のライト信号58および出力バッファ56の出力を
非反転で入力し、ラッチ48の出力を反転入力するAN
D回路、47は第1のプロセッサ70のライト信号50
を非反転入力し、出力バッファ52の出力を反転入力す
るAND回路、46はこれら2つのAND回路45,4
7の出力を入力するOR回路、41はOR回路43,4
6の出力をそれぞれS入力,R入力に入力するRSラッ
チ、48は第1のプロセッサ70のデータバス49から
の信号および第1のプロセッサ70のライト信号50を
それぞれD入力およびクロック(CLK)入力に入力す
るラッチ、54は第2のプロセッサ71のデータバス5
7からの信号および第2のプロセッサ71のライト信号
58をそれぞれD入力およびCLK入力に入力するラッ
チ、53はラッチ48,41のQ出力を入力するAND
回路、55はラッチ54のQ出力を非反転入力しラッチ
41のQ出力を反転入力するAND回路、52,56は
それぞれ第1,第2のプロセッサ70,71のリード信
号51,59の出力に応じてAND回路53,55の出
力を許可する出力バッファである。
In FIG. 8, reference numerals 49 and 57 denote data buses of the first and second processors 70 and 71, respectively.
58 is a write signal of each of the first and second processors 70 and 71, 51 and 59 are read signals of each of the first and second processors 70 and 71, and 42 is a second processor 7
1 write signal 58 is input non-inverted and output buffer 5
6 is an AND circuit that inverts the input of the output of the first processor 70, inputs the write signal 50 of the first processor 70 and the output of the output buffer 52 in a non-inverted manner, and an AND circuit 43 inverts and inputs the output of the latch 54. AND circuits 42, 4
An OR circuit 45 for inputting the output of the third processor 45 inputs the write signal 58 of the second processor 71 and the output of the output buffer 56 in a non-inverted manner, and inverts the output of the latch 48 for the input AN.
The D circuit 47 is a write signal 50 of the first processor 70.
, And an inverting input of the output of the output buffer 52. The AND circuit 46 includes these two AND circuits 45 and 4.
7 is an OR circuit for inputting the output of 7; 41 is OR circuits 43 and 4
RS latches for inputting the output of the first processor 70 to the S input and the R input, respectively. Reference numeral 48 designates a signal from the data bus 49 of the first processor 70 and a write signal 50 of the first processor 70 as a D input and a clock (CLK) input. , 54 is a data bus 5 of the second processor 71.
7 and the write signal 58 of the second processor 71 are respectively input to the D input and the CLK input, and 53 is an AND for inputting the Q outputs of the latches 48 and 41.
55, an AND circuit for non-inverting input of the Q output of the latch 54 and inverting input of the Q output of the latch 41; 52, 56 for outputting the read signals 51, 59 of the first and second processors 70, 71, respectively; This is an output buffer that permits the outputs of the AND circuits 53 and 55 in response.

【0006】次に動作について説明する。図8、図9に
おいて、プロセッサ70のデータバス49は、プロセッ
サ70が共有メモリ74に対しメモリアクセスを行ない
たい時、これに値“1”を出力してラッチ48に書込
み、その後この値を読み出してメモリアクセスを実行出
来るか、出来ないかを判定するものである。ラッチ48
はデータバス49の値を一時保持しておくものである。
Next, the operation will be described. 8 and 9, the data bus 49 of the processor 70 outputs the value "1" to the latch 48 when the processor 70 wants to access the shared memory 74, and then reads the value. It is determined whether the memory access can be executed or not. Latch 48
Is to temporarily hold the value of the data bus 49.

【0007】ライト信号50はラッチ48への書込みを
許可する信号である。リード信号51は、AND回路5
3および出力バッファ52を介してデータバス49にメ
モリアクセス実行可または不可の信号を読み出すことを
許可する信号である。データバス57、ラッチ54、ラ
イト信号58、リード信号59についてもプロセッサ7
1のメモリアクセスに関し同様の機能を有する。RSラ
ッチ41は2つのプロセッサ70,71のメモリアクセ
スの状態を入力し、S入力の値が“0”でR入力の値が
“0”の時、Q出力は前の値を保持し、S入力の値が
“1”でR入力の値が“0”の時、Q出力は値“1”を
出力し、S入力が値“0”でR入力が値“1”の時、Q
出力は値“0”を出力してラッチ48とラッチ54の出
力値を制御する。
The write signal 50 is a signal for permitting writing to the latch 48. The read signal 51 is output from the AND circuit 5
3 and a signal for permitting reading of a signal indicating whether or not memory access can be performed on the data bus 49 via the output buffer 52. The data bus 57, the latch 54, the write signal 58, and the read signal 59 are also processed by the processor 7.
One memory access has a similar function. The RS latch 41 inputs the state of memory access of the two processors 70 and 71. When the value of the S input is "0" and the value of the R input is "0", the Q output holds the previous value, When the input value is “1” and the R input value is “0”, the Q output outputs a value “1”. When the S input is “0” and the R input is “1”, the Q output is Q.
The output controls the output values of the latches 48 and 54 by outputting a value "0".

【0008】RSラッチ41への入力に関し、そのR入
力への信号は、AND回路45,47、及びOR回路4
6によって形成され、プロセッサ70がメモリアクセス
を終了した時、またはプロセッサ71がメモリアクセス
を要求し、プロセッサ70がメモリアクセスを実行して
いない時にその値が“1”になる。またそのS入力への
信号は、AND回路42,44、及びOR回路43によ
って形成され、プロセッサ71がメモリアクセスを終了
した時、またはプロセッサ70がメモリアクセスを要求
し、プロセッサ71がメモリアクセスを実行しない時に
その値が“1”になるようになっている。それ以外の時
は両方とも値は" 0" になる。
[0008] As for the input to the RS latch 41, the signal to the R input is supplied to the AND circuits 45 and 47 and the OR circuit 4.
6, the value becomes "1" when the processor 70 finishes the memory access or when the processor 71 requests the memory access and the processor 70 is not executing the memory access. The signal to the S input is formed by the AND circuits 42 and 44 and the OR circuit 43. When the processor 71 completes the memory access, or when the processor 70 requests the memory access, the processor 71 executes the memory access. When not performed, the value is set to “1”. Otherwise, both values are "0".

【0009】プロセッサ70がメモリアクセスの実行を
するために、まずデータバス49に値“1”を出力し、
ライト信号50の値を“1”にしてラッチ48に値
“1”を書き込む(図9の状態C1)。この時、プロセ
ッサ71は何も動作していないので、プロセッサ71の
データバス57の値、及びラッチ54の出力Qの値は
“0”あり、これによりAND回路44の出力及びOR
回路43の出力は“1”になり、またこのときラッチ4
8の出力Qは“0”であるためAND回路45の出力は
“0”であり、AND回路47の出力は“0”であるた
め、OR回路46の出力は“0”である。これにより、
RSラッチ41はS入力の値が“1”になり、R入力の
値が“0”になるため、Q出力の値は“1”になる。
In order for the processor 70 to execute memory access, first, a value "1" is output to the data bus 49,
The value of the write signal 50 is set to "1", and the value "1" is written to the latch 48 (state C1 in FIG. 9). At this time, since the processor 71 is not operating at all, the value of the data bus 57 of the processor 71 and the value of the output Q of the latch 54 are “0”, whereby the output of the AND circuit 44 and the OR
The output of the circuit 43 becomes "1".
Since the output Q of 8 is “0”, the output of the AND circuit 45 is “0”, and the output of the AND circuit 47 is “0”, so that the output of the OR circuit 46 is “0”. This allows
Since the value of the S input of the RS latch 41 becomes “1” and the value of the R input becomes “0”, the value of the Q output becomes “1”.

【0010】次に、ラッチ48に書込まれた値は、リー
ド信号51の値を“1" にすることでAND回路53を
介してプロセッサ70のデータバスに読み出され(図9
状態のC2)、その後プロセッサ70内で判定を行な
う。この場合は、RSラッチ41の出力の値が“1" な
のでラッチ48の値はAND回路53によってマスクさ
れず、読み出される値はラッチ48の出力の値“1" そ
のものであり、これにより、メモリアクセスを行なえる
と判断する。
Next, the value written to the latch 48 is read to the data bus of the processor 70 via the AND circuit 53 by setting the value of the read signal 51 to "1" (FIG. 9).
In the state C2), a determination is made in the processor 70 thereafter. In this case, since the output value of the RS latch 41 is "1", the value of the latch 48 is not masked by the AND circuit 53, and the read value is the output value "1" of the latch 48 itself. Judge that access is possible.

【0011】この時に、プロセッサ71もメモリアクセ
スを実行しようとすると、まずデータバス57に値
“1”を書込み、ライト信号58の値を“1”にしてラ
ッチ54に対して値“1”の書込みを行なう(図9の状
態D1)。この時AND回路42、44の出力はともに
“0”になり、OR回路41の出力は“0”となる。ま
た、プロセッサ70がメモリアクセス実行中のため、A
ND回路47の出力は“0”となり、ラッチ48のQ出
力は“1”となるため、AND回路45の出力は”0”
となり、OR回路46の出力は”0”となる。このた
め、RSラッチ41はS入力、R入力ともに値が“0”
になり、Q出力は前の状態の値“1”を保持する。続い
て、プロセッサ71のリード信号59の値を“1”にし
てラッチ54の出力をプロセッサ71のデータバス57
に読み出し(図9の状態D2)、その後プロセッサ71
内で判断する。
At this time, when the processor 71 also attempts to execute memory access, first, a value "1" is written to the data bus 57, and the value of the write signal 58 is set to "1". Write is performed (state D1 in FIG. 9). At this time, the outputs of the AND circuits 42 and 44 both become "0", and the output of the OR circuit 41 becomes "0". Since the processor 70 is performing memory access, A
Since the output of the ND circuit 47 is "0" and the Q output of the latch 48 is "1", the output of the AND circuit 45 is "0".
And the output of the OR circuit 46 becomes "0". For this reason, the value of both the S input and the R input of the RS latch 41 is “0”.
, And the Q output holds the value “1” of the previous state. Subsequently, the value of the read signal 59 of the processor 71 is set to “1”, and the output of the latch 54 is output to the data bus 57 of the processor 71.
(State D2 in FIG. 9), and then the processor 71
Judge within.

【0012】この場合、ラッチ54の出力はAND回路
55によりRSラッチ1のQ出力でマスクされるため、
読み出された値は“0”であり、これにより、プロセッ
サ71はメモリアクセスを実行出来ないと判断し、よっ
て一方のプロセッサのメモリアクセスが終了するのを、
読み出し、判定の動作を行って待つ。
In this case, since the output of the latch 54 is masked by the Q output of the RS latch 1 by the AND circuit 55,
The read value is “0”, which causes the processor 71 to determine that the memory access cannot be executed, and thus, to terminate the memory access of one processor.
Perform reading and judgment operations and wait.

【0013】この終了判定の動作は、1回目のラッチ5
4への書込みの値“1”を保持しておき、その値を、2
つのプロセッサの動作状況を判断するRSラッチ41の
出力で制御するため、毎回の書込み動作が不要になり、
リード信号59の値を“1”にして、その値を読み出
し、プロセッサ71内で判断するという動作のみで済
む。
This end determination operation is performed by the first latch 5
The value “1” of the write to “4” is held, and the value is set to “2”.
Since the control is performed by the output of the RS latch 41 for judging the operation state of the two processors, each write operation becomes unnecessary,
Only the operation of setting the value of the read signal 59 to “1”, reading the value, and making a determination in the processor 71 is sufficient.

【0014】一方、プロセッサ70がメモリアクセスを
終了する時は、データバス49に値“0”を出力し、ラ
イト信号50の値を“1”にすることにより、この調停
回路に対しメモリアクセスを終了したことを示す。この
時、AND回路44の出力は“0”となり、プロセッサ
71のデータバス57の出力は“1”であり、AND回
路42の出力は“0”となるため、OR回路43の出力
は“0”となる。また、AND回路47の出力は“1”
となるため、OR回路46の出力は“1”となり、RS
ラッチ41は、S入力の値が“0”、R入力の値が
“1”になることにより、Q出力の値が“0”になる。
すると、今度はラッチ48の出力がマスクされ、ラッチ
54の出力がそのまま読み出されることにより、プロセ
ッサ71のメモリアクセスを実行することが出来る。そ
してそのメモリアクセスを実行し、終了したら、プロセ
ッサ71はデータバス57に値“0”を出力し、ライト
信号58の値を“1”にして自身のメモリアクセスが終
了したことを示す。
On the other hand, when the processor 70 terminates the memory access, it outputs a value "0" to the data bus 49 and sets the value of the write signal 50 to "1", so that the memory access to this arbitration circuit is performed. Indicates termination. At this time, the output of the AND circuit 44 is “0”, the output of the data bus 57 of the processor 71 is “1”, and the output of the AND circuit 42 is “0”, so that the output of the OR circuit 43 is “0”. ". The output of the AND circuit 47 is "1".
Therefore, the output of the OR circuit 46 becomes “1” and RS
When the value of the S input becomes “0” and the value of the R input becomes “1”, the value of the Q output of the latch 41 becomes “0”.
Then, the output of the latch 48 is masked and the output of the latch 54 is read as it is, so that the memory access of the processor 71 can be executed. Then, the memory access is executed, and upon completion, the processor 71 outputs a value “0” to the data bus 57 and changes the value of the write signal 58 to “1” to indicate that the own memory access is completed.

【0015】[0015]

【発明が解決しようとする課題】従来の調停回路は以上
のように構成されており、2つのプロセッサが1つのメ
モリを共有する場合に、そのメモリアクセスの競合を防
ぐことが可能となっている。しかしながら、この従来例
による調停回路では、プロセッサがメモリアクセスを行
う前に、アクセス権を取得するための「調停回路への書
き込み」、「調停回路の読み出し」と、アクセス権を放
棄するための「調停回路への書き込み」の計3回の調停
回路へのアクセスが必要となっていた。
The conventional arbitration circuit is configured as described above, and when two processors share one memory, it is possible to prevent contention of the memory access. . However, in the arbitration circuit according to the conventional example, before the processor performs memory access, “writing to the arbitration circuit” and “reading out of the arbitration circuit” for acquiring the access right and “ It is necessary to access the arbitration circuit a total of three times, "writing to the arbitration circuit".

【0016】本発明は、上記のような従来のものの問題
点を解決するためになされたもので、2つのプロセッサ
が共有するメモリに対しアクセスが競合するのを調停す
る作業をより高速に行うことができ、しかもその作業
を、従来例と比較してより小規模な回路構成で実現可能
にする調停回路を得ることを目的としている。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems of the related art, and it is an object of the present invention to arbitrate the conflict between accesses to a memory shared by two processors at a higher speed. It is another object of the present invention to provide an arbitration circuit which can realize the above-mentioned operation with a smaller circuit configuration as compared with the conventional example.

【0017】[0017]

【課題を解決するための手段】この課題を解決するため
に、本願の請求項1の発明に係る調停回路は、第1、第
2のデバイスが共有するメモリに対し、前記第1、第2
のデバイスによる前記メモリのアクセス競合を防止する
ための調停回路において、前記第1、第2のデバイスが
いずれも前記メモリにアクセスしておらず前記メモリへ
のアクセスが可能であるイネーブル状態と、前記第1、
第2のデバイスのいずれか一方が前記メモリへアクセス
しており、前記メモリへアクセスしていない方のデバイ
スからの前記メモリへのアクセスが不可能なディスイネ
ーブル状態,のいずれの状態にあるかを示すアクセス権
情報を記憶する第1の記憶回路と、前記第1、第2のデ
バイスのいずれか一方が前記メモリに対するアクセス権
を取得するために前記第1の記憶回路の情報を読み出し
たあとに前記第1の記憶回路の出力がディスイネーブル
状態である旨のアクセス権情報となり、前記第1、第2
のいずれかのデバイスが前記メモリに対するアクセス権
を放棄するために前記第1の記憶回路にイネーブル状態
である旨のアクセス権情報を書き込むときに前記第1の
記憶回路の出力がイネーブル状態である旨のアクセス権
情報となるように、当該第1の記憶回路に書き込むべき
アクセス権情報を生成するアクセス権情報生成回路とを
備えるようにしたものである。
In order to solve this problem, an arbitration circuit according to a first aspect of the present invention provides a arbitration circuit for a memory shared by a first device and a second device.
An arbitration circuit for preventing contention of the memory from being accessed by the device, wherein the first and second devices are not accessing the memory and are enabled to access the memory; First,
Whether any one of the second devices is accessing the memory, and the device that is not accessing the memory is in a disabled state in which the memory cannot be accessed. A first storage circuit for storing the access right information shown, and after one of the first and second devices reads the information of the first storage circuit to acquire the access right to the memory The output of the first storage circuit becomes access right information indicating that the output is in a disabled state, and the first and second storage circuits are output.
Indicating that the output of the first storage circuit is enabled when any one of the devices writes access right information indicating that the device is enabled in the first storage circuit to relinquish the access right to the memory. And an access right information generating circuit for generating access right information to be written to the first storage circuit so that the access right information becomes the first access right information.

【0018】また、本願の請求項2の発明に係る調停回
路は、第1、第2のデバイスが共有するメモリに対し、
前記第1、第2のデバイスによる前記メモリのアクセス
競合を防止するための調停回路において、前記第1、第
2のデバイスがいずれも前記メモリにアクセスしておら
ず前記メモリへのアクセスが可能であるイネーブル状態
と、前記第1、第2のデバイスのいずれか一方が前記メ
モリへアクセスしており、前記メモリへアクセスしてい
ない方のデバイスからの前記メモリへのアクセスが不可
能なディスイネーブル状態,のいずれの状態にあるかを
示すアクセス権情報を記憶する第1の記憶回路と、前記
第1、第2のデバイスのいずれか一方が前記メモリに対
するアクセス権を取得するために前記第1の記憶回路の
情報を読み出したあとに前記第1の記憶回路の出力がデ
ィスイネーブル状態である旨のアクセス権情報となり、
前記第1、第2のいずれかのデバイスが前記メモリに対
するアクセス権を放棄するために前記第1の記憶回路に
イネーブル状態である旨のアクセス権情報を書き込むと
きに前記第1の記憶回路の出力がイネーブル状態である
旨のアクセス権情報となるように、当該第1の記憶回路
に書き込むべきアクセス権情報を生成するアクセス権情
報生成回路と、前記メモリに対して前記第1、第2のデ
バイスのどちらがアクセスを実行しているかを示すアク
セス実行情報を記憶する第2の記憶回路と、前記第2の
記憶回路の出力を入力とし、前記第1、第2のデバイス
のうち前記メモリに対するアクセス権を取得している方
のみが前記メモリに対するアクセス権を放棄するために
イネーブル状態である旨のアクセス権情報を前記第1の
記憶回路に書き込むことができるように、前記アクセス
権情報生成回路の入力を制御する入力制御回路とを備え
るようにしたものである。
An arbitration circuit according to a second aspect of the present invention provides a arbitration circuit for a memory shared by a first device and a second device.
An arbitration circuit for preventing contention for access to the memory by the first and second devices, wherein the first and second devices do not access the memory and can access the memory. A certain enable state, and a disable state in which one of the first and second devices is accessing the memory, and a device that is not accessing the memory cannot access the memory. , A first storage circuit for storing access right information indicating which state is in the first state, and the first storage circuit for storing one of the first and second devices to obtain an access right to the memory. After reading the information of the storage circuit, the output of the first storage circuit becomes access right information indicating that the output is in the disabled state,
An output of the first storage circuit when the first or second device writes access right information indicating that the device is enabled in the first storage circuit to relinquish the access right to the memory; An access right information generating circuit for generating access right information to be written to the first storage circuit so that the access right information indicates that the device is in an enabled state; and the first and second devices for the memory. A second storage circuit for storing access execution information indicating which one is executing access, and an output of the second storage circuit as an input, and an access right to the memory among the first and second devices. Is written to the first storage circuit, indicating that only the person who has acquired the access right is in the enabled state to give up the access right to the memory. As it can be, but which is adapted and an input control circuit for controlling the input of the access right information generating circuit.

【0019】また、本願の請求項3の発明に係る調停回
路は、請求項1記載の調停回路において、前記第1の記
憶回路は第1のDフリップフロップからなるものであ
り、前記アクセス権情報生成回路は、前記第1、第2の
デバイスが前記第1の記憶回路に対しデータの読み出し
を指示する第1、第2のリード信号と前記Dフリップフ
ロップの出力信号を入力とする第1の論理積回路と、前
記第1のデバイスが前記第1の記憶回路に対しデータの
書き込みを指示する第1のライト信号を反転入力し、前
記第1のデバイスが前記第1の記憶回路に対し書き込む
第1のライトデータを非反転入力する第2の論理積回路
と、前記第2のデバイスが前記第1の記憶回路に対しデ
ータの書き込みを指示する第2のライト信号を反転入力
し、前記第2のデバイスが前記第1の記憶回路に対し書
き込む第2のライトデータを非反転入力する第3の論理
積回路と、前記第1ないし第3の論理積回路の出力信号
を非反転入力するとともにリセット信号を反転入力しそ
の出力信号を前記第1のDフリップフロップのD入力に
出力する第1の論理和回路とからなるものとしたもので
ある。
According to a third aspect of the present invention, in the arbitration circuit according to the first aspect, the first storage circuit comprises a first D flip-flop, and the access right information The generation circuit includes a first and a second read signal for instructing the first and second devices to read data from the first storage circuit and a first signal that receives an output signal of the D flip-flop as an input. An AND circuit, and the first device inverts and inputs a first write signal for instructing the first storage circuit to write data, and the first device writes to the first storage circuit A second AND circuit for non-inverting input of the first write data, and the second device inverting and inputting a second write signal for instructing the first storage circuit to write data to the first storage circuit; 2 device A third AND circuit for non-inverting input of second write data to be written into the first storage circuit by a source, a non-inverting input of an output signal of the first to third AND circuits, and a reset signal. And a first OR circuit for inverting the input and outputting the output signal to the D input of the first D flip-flop.

【0020】また、本願の請求項4の発明に係る調停回
路は、請求項2記載の調停回路において、前記第1の記
憶回路は第1のDフリップフロップからなるものであ
り、前記アクセス権情報生成回路は、前記第1、第2の
デバイスが前記第1の記憶回路に対しデータの読み出し
を指示する第1、第2のリード信号と前記Dフリップフ
ロップの出力信号を入力とする第1の論理積回路と、前
記第1のデバイスが前記第1の記憶回路に対しデータの
書き込みを指示する第1のライト信号を反転入力し、前
記第1のデバイスが前記第1の記憶回路に対し書き込む
第1のライトデータを非反転入力する第2の論理積回路
と、前記第2のデバイスが前記第1の記憶回路に対しデ
ータの書き込みを指示する第2のライト信号を反転入力
し、前記第2のデバイスが前記第1の記憶回路に対し書
き込む第2のライトデータを非反転入力する第3の論理
積回路と、前記第1ないし第3の論理積回路の出力信号
を非反転入力するとともにリセット信号を反転入力しそ
の出力信号を前記第1のDフリップフロップのD入力に
出力する第1の論理和回路とからなるものであり、前記
第2の記憶回路は第2のDフリップフロップからなるも
のであり、前記入力制御回路は、前記第1のリード信号
を反転入力し前記第1のDフリップフロップの出力信号
を非反転入力する第4の論理積回路と、前記第1のライ
ト信号と前記第2のDフリップフロップの出力信号を非
反転入力し前記第1のDフリップフロップの出力信号を
反転入力する第5の論理積回路と、前記第4,第5の論
理積回路の出力信号を入力とする第2の論理和回路と、
前記第2の論理和回路の出力信号と前記リセット信号を
入力としその出力信号を前記第2のDフリップフロップ
のD入力に出力する第6の論理積回路とからなり、前記
第6の論理積回路の出力信号は、前記第2の論理積回路
に非反転入力されるとともに前記第3の論理積回路に反
転入力されるようにしたものである。
The arbitration circuit according to a fourth aspect of the present invention is the arbitration circuit according to the second aspect, wherein the first storage circuit comprises a first D flip-flop and the access right information The generation circuit includes a first and a second read signal for instructing the first and second devices to read data from the first storage circuit and a first signal that receives an output signal of the D flip-flop as an input. An AND circuit, and the first device inverts and inputs a first write signal for instructing the first storage circuit to write data, and the first device writes to the first storage circuit A second AND circuit for non-inverting input of the first write data, and the second device inverting and inputting a second write signal for instructing the first storage circuit to write data to the first storage circuit; 2 device A third AND circuit for non-inverting input of second write data to be written into the first storage circuit by a source, a non-inverting input of an output signal of the first to third AND circuits, and a reset signal. And a first OR circuit for inverting and inputting the output signal to the D input of the first D flip-flop, and wherein the second storage circuit comprises a second D flip-flop Wherein the input control circuit inverts the first read signal and non-inverts the output signal of the first D flip-flop, and outputs the first write signal and the first write signal. A fifth AND circuit for non-inverting the output signal of the second D flip-flop and inverting the output signal of the first D flip-flop; and outputting the output signals of the fourth and fifth AND circuits. 2nd to be input And the logical sum circuit,
A sixth AND circuit which receives the output signal of the second OR circuit and the reset signal as inputs, and outputs the output signal to the D input of the second D flip-flop, and the sixth AND circuit An output signal of the circuit is non-inverted to the second AND circuit and inverted to the third AND circuit.

【0021】[0021]

【発明の実施の形態】以下、本発明の実施の形態につい
て、図1ないし図5を用いて説明する。 (実施の形態1)本実施の形態1は、アクセス権を取得
するための「調停回路の読み出し」、アクセス権を放棄
するための「調停回路の書き込み」の計2回のアクセス
でメモリアクセスの競合の防止を行うことができるよう
にしたものであり、しかも従来例と比較してより小規模
な回路構成で、この調停を行うことを可能にしたもので
ある。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to FIGS. (Embodiment 1) In Embodiment 1, a memory access is performed by a total of two accesses, "reading of the arbitration circuit" for acquiring the access right and "writing of the arbitration circuit" for relinquishing the access right. The arbitration can be prevented with a smaller circuit configuration than that of the conventional example.

【0022】図1は、調停回路に関する本発明の動作を
示す流れ図である。図1において、まずプロセッサ70
が共有メモリ74にアクセスをしようとした時に、プロ
セッサ71が共有メモリ74へのアクセスを実行してい
ないかを確かめるために、調停回路72に対して、その
記憶している値を読み出す(図1の状態T11)。そし
て、読み出した値を判定し(図1の状態T12a )、そ
の値が“0”ならば、プロセッサ71が共有メモリ74
へのアクセスを実行していることになり、調停回路72
の値を再度読み出す(図1の状態T11)。値“1”が
読み出されるまでこの動作を繰り返し、値“1”が読み
出されたならば、プロセッサ71が共有メモリ74への
アクセスを実行していない状態と判断する。また、調停
回路72から値“1”を読み出した後に調停回路72の
値は自動的に“0”になり(図1の状態T12b)、そ
の後共有メモリ74へのアクセスを実行する(図1の状
態T13)。そして終了したら調停回路72に対して値
“1”を書込み、プロセッサ70の共有メモリ74への
アクセスが終了したことを示す(図1の状態T14)。
プロセッサ71がメモリアクセスを実行しようとすると
きも、プロセッサ70がメモリアクセスをする場合と同
様であるので説明を省略する。
FIG. 1 is a flowchart showing the operation of the present invention relating to the arbitration circuit. In FIG. 1, first, a processor 70
When the user attempts to access the shared memory 74, the stored value is read out to the arbitration circuit 72 in order to check whether the processor 71 has executed the access to the shared memory 74 (FIG. 1). State T11). Then, the read value is determined (state T12a in FIG. 1), and if the value is "0", the processor 71
Access to the arbitration circuit 72
Is read out again (state T11 in FIG. 1). This operation is repeated until the value “1” is read, and if the value “1” is read, it is determined that the processor 71 is not accessing the shared memory 74. Also, after reading the value “1” from the arbitration circuit 72, the value of the arbitration circuit 72 automatically becomes “0” (state T12b in FIG. 1), and then accesses the shared memory 74 (FIG. 1). State T13). When the processing is completed, the value “1” is written to the arbitration circuit 72, indicating that the access of the processor 70 to the shared memory 74 has been completed (state T14 in FIG. 1).
When the processor 71 attempts to execute a memory access, it is the same as the case where the processor 70 performs a memory access, and a description thereof will be omitted.

【0023】この動作を実現した,実施の形態1による
調停回路の回路図を示すものが図2であり、そのタイミ
ングを示すものが図3である。この図2において、1
は、クロック信号8の立ち上がりエッジのときのD入力
の値を保持しQ出力に出力するD 型フリップフロップ
(以下、DFF と称す)であり、プロセッサ70,71が
いずれも共有メモリにアクセスしておらず共有メモリへ
のアクセスが可能であるイネーブル状態と、プロセッサ
70,71のいずれか一方が共有メモリへアクセスして
おり、共有メモリへアクセスしていない方のプロセッサ
からの共有メモリへのアクセスが不可能なディスイネー
ブル状態,のいずれの状態にあるかを示すアクセス権情
報を記憶する。また、6はプロセッサ70がDFF1の保持
している値を読み出すときにプロセッサ70のリード信
号10を“0”に することにより、プロセッサ70の
リードデータ16にDFF1の出力Qを出力するためのAND
回路、7はプロセッサ71がDFF1の保持している値を読
み出すときにプロセッサ71のリード信号11を“0”
にすることにより、プロセッサ71のリードデータ17
にDFF1の出力Qを出力するためのAND 回路、3はプロセ
ッサ70,71のリード信号10,11およびDFF1の出
力Qを入力とするAND 回路、4はプロセッサ70のライ
ト信号12を反転入力し、プロセッサ71のライトデー
タ13を非反転入力するAND 回路、5はプロセッサ71
のライト信号14を反転入力し、プロセッサ71のライ
トデータ15を非反転入力するAND回路、2はこれら3
つのAND 回路3,4,5の出力を非反転入力し、リセッ
ト信号9を反転入力するOR回路であり、100はこれ
ら、AND 回路3,4,5およびOR回路2から構成され、
プロセッサ70,71のいずれか一方がDFF1の情報を読
み出したあとにDFF1の出力がディスイネーブル状態であ
る旨のアクセス権情報となり、プロセッサ70,71の
いずれかのプロセッサがDFF1にイネーブル状態である旨
のアクセス権情報を書き込むときにDFF1の出力がイネー
ブル状態である旨のアクセス権情報となるように、DFF1
に書き込むべきアクセス権情報を生成するアクセス権情
報生成回路としての組み合わせ回路である。
FIG. 2 shows a circuit diagram of the arbitration circuit according to the first embodiment which realizes this operation, and FIG. 3 shows its timing. In FIG. 2, 1
Is a D-type flip-flop (hereinafter, referred to as DFF) that holds the value of the D input at the rising edge of the clock signal 8 and outputs it to the Q output. And an enabled state in which access to the shared memory is possible and one of the processors 70 and 71 is accessing the shared memory, and an access to the shared memory from a processor that is not accessing the shared memory is performed. Access right information indicating which state of the disabled state is possible is stored. 6 is an AND for outputting the output Q of DFF1 to the read data 16 of the processor 70 by setting the read signal 10 of the processor 70 to "0" when the processor 70 reads the value held by DFF1.
The circuit 7 sets the read signal 11 of the processor 71 to "0" when the processor 71 reads the value held in DFF1.
The read data 17 of the processor 71
An AND circuit for outputting the output Q of DFF1 to the AND circuit 3, an AND circuit for receiving the read signals 10, 11 of the processors 70 and 71 and the output Q of the DFF1 as inputs, An AND circuit for non-inverting the write data 13 of the processor 71
The AND circuit 2 inverts the write signal 14 of the processor 71 and non-inverts the write data 15 of the processor 71.
An OR circuit for non-inverting input of the outputs of the two AND circuits 3, 4, 5 and for inverting input of the reset signal 9, and 100 composed of these AND circuits 3, 4, 5 and OR circuit 2,
After one of the processors 70 and 71 reads the information of DFF1, the output of DFF1 becomes access right information indicating that the output is in the disabled state, and the information that one of the processors 70 and 71 is enabled by DFF1. When writing the access right information of DFF1, the DFF1 output becomes the access right information that the output of DFF1 is enabled.
Is a combinational circuit as an access right information generation circuit for generating access right information to be written into the CAM.

【0024】また、12はプロセッサ70が、DFF1に書
き込むための負極性、即ち“0”のとき有効のライト信
号、13はプロセッサ70が、DFF1に書き込むためのラ
イトデータ、14はプロセッサ71が、DFF1に書き込む
ための負極性のライト信号、15はプロセッサ71が、
DFF1に書き込むためのライトデータ、9は、DFF1の初期
状態を“1”に決定するリセット信号である。
Reference numeral 12 denotes a negative polarity signal for the processor 70 to write to DFF1, that is, a write signal valid when it is "0", 13 denotes write data for the processor 70 to write to DFF1, and 14 denotes a write data for the processor 71. Negative write signal for writing to DFF1, 15 is the processor 71,
Write data 9 for writing to DFF1 is a reset signal for determining the initial state of DFF1 to "1".

【0025】次に動作について説明する。まず、初期状
態確定のため、リセット信号9を“0”にする(図3の
状態C1)とOR回路2の出力、すなわちDFF1の入力Dは
“1”となり、クロック信号8の立ち上がりでDFF1の出
力Qは不定状態から“1”になる(図3の状態C2)。こ
のリセット動作によりDFF1の出力Qが“1”に設定され
た状態において、プロセッサ70が共有メモリ74をア
クセスする場合について説明する。
Next, the operation will be described. First, when the reset signal 9 is set to "0" (state C1 in FIG. 3) to determine the initial state, the output of the OR circuit 2, that is, the input D of DFF1 becomes "1". The output Q changes from the undefined state to "1" (state C2 in FIG. 3). A case where the processor 70 accesses the shared memory 74 in a state where the output Q of DFF1 is set to “1” by the reset operation will be described.

【0026】プロセッサ70がそのリード信号10を
“0”にすると、AND 回路6を介してDFF1の出力Qがプ
ロセッサ70のリードデータ16に出力され、プロセッ
サ70はこの調停回路72よりアクセス権情報として値
“1”を読み出し、プロセッサ70は、共有メモリ74
に対して「アクセス権がある」と認識し(図3の状態C
3)、共有メモリ74へのアクセスを開始する(図3の
状態C4以降の状態)。即ち、この図3の状態C3にお
いて、プロセッサ70のリード信号10は“0”である
ため、AND 回路3の出力は“0”、プロセッサ70のラ
イト信号12およびプロセッサ71のライト信号14は
ともに“1”であるため、AND 回路4、5の出力は
“0”、またリセット信号9は“1”であるため、OR回
路2の出力すなわちDFF1の入力Dは“0”となり(図3
の状態C3)、DFF1の出力は“1”から“0”になる
(図3の状態C4)。これは、調停回路72の内容を読
み込み、それが”1”であれば、調停回路72を自動的
に”0”にリセットしていることを意味する。
When the processor 70 sets the read signal 10 to "0", the output Q of DFF1 is output to the read data 16 of the processor 70 through the AND circuit 6, and the processor 70 receives the access right information from the arbitration circuit 72 as the access right information. The processor 70 reads the value “1”, and the shared memory 74
Is recognized as having "access right" (state C in FIG. 3).
3), access to the shared memory 74 is started (the state after the state C4 in FIG. 3). That is, in the state C3 of FIG. 3, since the read signal 10 of the processor 70 is "0", the output of the AND circuit 3 is "0", and the write signal 12 of the processor 70 and the write signal 14 of the processor 71 are both "0". Since the output of the AND circuits 4 and 5 is "0" and the reset signal 9 is "1", the output of the OR circuit 2, that is, the input D of the DFF1 is "0" (FIG. 3).
State C3), the output of DFF1 changes from "1" to "0" (state C4 in FIG. 3). This means that the content of the arbitration circuit 72 is read, and if it is "1", the arbitration circuit 72 is automatically reset to "0".

【0027】次に、プロセッサ70が共有メモリ74を
アクセス中に、プロセッサ71が共有メモリ74にアク
セスしようとする場合について説明する。プロセッサ7
0が共有メモリ74をアクセスしている状態、すなわち
DFF1の出力Qが“0”のときに、プロセッサ71が共有
メモリ74にアクセスするために、プロセッサ71がそ
のリード信号11を“0”にすると、DFF1の出力QがAN
D回路7を介してプロセッサ71のリードデータ17に
出力され、プロセッサ71は“0”を読み出し、プロセ
ッサ71は、共有メモリ74に対して「アクセス権がな
い」と認識し(図3の状態C5)、共有メモリ74への
アクセスを行わない。
Next, a case where the processor 71 attempts to access the shared memory 74 while the processor 70 is accessing the shared memory 74 will be described. Processor 7
0 is accessing the shared memory 74, that is,
When the output Q of DFF1 is “0”, the processor 71 accesses the shared memory 74, and when the processor 71 sets the read signal 11 to “0”, the output Q of DFF1 becomes AN
The data is output to the read data 17 of the processor 71 via the D circuit 7, the processor 71 reads "0", and the processor 71 recognizes that "there is no access right" to the shared memory 74 (the state C5 in FIG. 3). ), The access to the shared memory 74 is not performed.

【0028】プロセッサ70の共有メモリ74へのアク
セスが終了したら、プロセッサ70はそのライト信号1
2を“0”、かつそのライトデータ13を“1”にする
ため、AND 回路4の出力は“1”になり、このためOR回
路2の出力すなわちDFF1の入力Dは“1”になり(図3
の状態C6)、DFF1の出力Qは“0”から“1”になる
(図3の状態C7)。
When the access of the processor 70 to the shared memory 74 is completed, the processor 70
2 to "0" and its write data 13 to "1", the output of the AND circuit 4 becomes "1", so that the output of the OR circuit 2, that is, the input D of DFF1 becomes "1" ( FIG.
State C6), the output Q of DFF1 changes from "0" to "1" (state C7 in FIG. 3).

【0029】同様に、プロセッサ71が共有メモリ74
をアクセスする場合について説明する。プロセッサ71
がそのリード信号11を“0”にすると、AND 回路3を
介してDFF1の出力Qがプロセッサ71のリードデータ1
7に出力され、プロセッサ71はこの調停回路72より
アクセス権情報として値“1”を読み出し、プロセッサ
70は、共有メモリ74に対して「アクセス権がある」
と認識し(図3の状態C9)、共有メモリ74へのアク
セスを開始する(図3の状態C10以降の状態)。即
ち、この図3の状態C9において、プロセッサ71のリ
ード信号11は“0”であるため、AND 回路3の出力は
“0”、プロセッサ71のライト信号14およびプロセ
ッサ70のライト信号12はともに“1”であるため、
AND 回路4、5の出力は“0”、またリセット信号9は
“1”であるため、OR回路2の出力すなわちDFF1の入力
Dは“0”となり(図3の状態C9)、DFF1の出力は
“1”から“0”になる(図3の状態C10)。
Similarly, the processor 71 stores the shared memory 74
The case of accessing will be described. Processor 71
When the read signal 11 is set to “0”, the output Q of DFF1 is output via the AND circuit 3 to the read data 1 of the processor 71.
7, the processor 71 reads the value “1” from the arbitration circuit 72 as access right information, and the processor 70 “has access right” to the shared memory 74.
(State C9 in FIG. 3), and access to the shared memory 74 is started (state after state C10 in FIG. 3). That is, in the state C9 of FIG. 3, since the read signal 11 of the processor 71 is "0", the output of the AND circuit 3 is "0", and the write signal 14 of the processor 71 and the write signal 12 of the processor 70 are both "0". 1 "
Since the outputs of the AND circuits 4 and 5 are "0" and the reset signal 9 is "1", the output of the OR circuit 2, that is, the input D of DFF1 becomes "0" (state C9 in FIG. 3) and the output of DFF1 Changes from "1" to "0" (state C10 in FIG. 3).

【0030】次に、プロセッサ71が共有メモリ74を
アクセス中に、プロセッサ70が共有メモリ74にアク
セスしようとする場合について説明する。
Next, a case where the processor 70 attempts to access the shared memory 74 while the processor 71 is accessing the shared memory 74 will be described.

【0031】プロセッサ71が共有メモリ74をアクセ
スしている状態、すなわちDFF1の出力Qが“0”のとき
に、プロセッサ70が共有メモリ74にアクセスするた
めに、プロセッサ70がそのリード信号10を“0”に
すると、DFF1の出力QがAND回路6を介してプロセッサ
70のリードデータ16に出力され、プロセッサ70は
“0”を読み出し、プロセッサ70は、共有メモリ74
に対して「アクセス権がない」と認識し(図3の状態C
11)、共有メモリ74へのアクセスを行わない。
When the processor 71 is accessing the shared memory 74, that is, when the output Q of DFF1 is "0", the processor 70 accesses the shared memory 74 so that the read signal 10 When it is set to "0", the output Q of DFF1 is output to the read data 16 of the processor 70 via the AND circuit 6, and the processor 70 reads "0".
Is recognized as "no access right" (state C in FIG. 3).
11), access to the shared memory 74 is not performed.

【0032】プロセッサ71の共有メモリ74へのアク
セスが終了したら、プロセッサ71はそのライト信号1
4を“0”、かつそのライトデータ15を“1”するた
め、AND 回路5の出力は“1”になり、これによりOR回
路2の出力すなわちDFF1の入力Dは“1”になり(図3
の状態C12)、DFF1の出力Qは“0”から“1”にな
る(図3の状態C13)。
When the access of the processor 71 to the shared memory 74 is completed, the processor 71
4 is set to "0" and its write data 15 is set to "1", the output of the AND circuit 5 becomes "1", whereby the output of the OR circuit 2, that is, the input D of DFF1 becomes "1". 3
State C12), the output Q of DFF1 changes from "0" to "1" (state C13 in FIG. 3).

【0033】また、図3の状態C4ないしC5におい
て、DFF1の出力Qは“0”であり、これによりAND 回路
3の出力は“0”となり、かつこのときプロセッサ70
のライト信号12、プロセッサ71のライト信号14が
“1”、すなわち、DFF1へのプロセッサ70,71から
の書き込みがなければ、AND 回路4,5の出力はともに
“0”となるので、DFF1の入力Dは“0”となり、DFF1
の出力Qは“0”になる(図3の状態C4ないしC6)
In the states C4 to C5 of FIG. 3, the output Q of DFF1 is "0", whereby the output of the AND circuit 3 becomes "0".
If the write signal 12 of the processor 71 and the write signal 14 of the processor 71 are "1", that is, if there is no writing to the DFF1 from the processors 70 and 71, the outputs of the AND circuits 4 and 5 both become "0". The input D becomes "0" and DFF1
Becomes "0" (states C4 to C6 in FIG. 3).
.

【0034】つまり、共有メモリ74にアクセスするた
めに、プロセッサ70、71のいずれかがDFF1を読み出
し、DFF1の出力が“0”となった後は、プロセッサ7
0、71のいずれかがDFF1に“1”を書き込むまでは、
DFF1の出力Qはディスイネーブル状態である“0”を保
持する。
That is, in order to access the shared memory 74, one of the processors 70 and 71 reads DFF1, and after the output of DFF1 becomes "0", the processor 7
Until either 0 or 71 writes “1” to DFF1,
The output Q of DFF1 holds "0" which is a disabled state.

【0035】また、DFF1の出力Qが“1”であり、プロ
セッサ70のリード信号10、プロセッサ71のリード
信号11がともに“1”、すなわちプロセッサ70,7
1からのDFF1の読み出しがなければ、AND 回路3の出力
は“1”となるため、DFF1の入力Dは“1”となり(図
3の状態C3ないしC5) 、DFF1の出力Qは“1”にな
る(図3の状態C4ないしC6) 。
The output Q of DFF1 is "1", and the read signal 10 of the processor 70 and the read signal 11 of the processor 71 are both "1".
If DFF1 is not read from 1, the output of the AND circuit 3 becomes "1", so that the input D of DFF1 becomes "1" (states C3 to C5 in FIG. 3), and the output Q of DFF1 becomes "1". (States C4 to C6 in FIG. 3).

【0036】つまり、共有メモリ74へのアクセスが終
了し、プロセッサ70、71のいずれかがDFF1に書き込
み、DFF1の出力が“1”となった後は、共有メモリ74
にアクセスするためにプロセッサ70、71がDFF1を読
み出すまでは、DFF1の出力Qはイネーブル状態である
“1”を保持する。
That is, after the access to the shared memory 74 is completed and one of the processors 70 and 71 writes to DFF1 and the output of DFF1 becomes "1",
Until the processors 70 and 71 read DFF1 to access, the output Q of DFF1 holds "1" which is an enabled state.

【0037】最後に、プロセッサ70、71が共有メモ
リへのアクセスをするために同時にDFF1を読み出した場
合について説明する。プロセッサ70、71が同時にDF
F1の出力Qを読み出すとAND 回路6を介してプロセッサ
70は“1”を読み出し、AND 回路7を介してプロセッ
サ71は“0”を読み出す(図3の状態C14)。この
ため、プロセッサ70は、共有メモリ74に対して「ア
クセス権がある」と認識し、プロセッサ71は、共有メ
モリ74に対して「アクセス権がない」と認識して、同
時にアクセスの要求が発生した場合にもアクセスの競合
を防ぐことが出来る。
Lastly, a case where the processors 70 and 71 simultaneously read DFF1 to access the shared memory will be described. Processors 70 and 71 are simultaneously DF
When the output Q of F1 is read, the processor 70 reads "1" via the AND circuit 6, and the processor 71 reads "0" via the AND circuit 7 (state C14 in FIG. 3). For this reason, the processor 70 recognizes that “there is an access right” to the shared memory 74, and the processor 71 recognizes that the “there is no access right” to the shared memory 74, and an access request occurs at the same time. In this case, access conflict can be prevented.

【0038】このように、本実施の形態1によれば、AN
D 回路3,4,5およびOR回路2により組み合わせ回路
100を構成し、この組み合わせ回路100により、プ
ロセッサ70,71のアクセス権の有無を示す情報を記
憶しているDフリップフロップ1の入力信号を生成し、
かつこのDフリップフロップ1の出力信号を組み合わせ
回路100の入力に帰還するように構成したことによ
り、アクセス権を取得するための調停回路の読み出し、
アクセス権を放棄するための調停回路の書き込みの計2
回のアクセスでメモリアクセスの競合の防止を行うこと
ができ、しかも従来例と比較してより小規模な回路規模
で、この調停を行うことが可能となる。
As described above, according to the first embodiment, AN
A combination circuit 100 is constituted by the D circuits 3, 4, 5 and the OR circuit 2, and the combination circuit 100 converts an input signal of the D flip-flop 1 storing information indicating whether or not the processor 70, 71 has an access right. Generate
In addition, since the output signal of the D flip-flop 1 is configured to be fed back to the input of the combinational circuit 100, the read of the arbitration circuit for acquiring the access right can be performed.
A total of 2 writes to the arbitration circuit to relinquish access rights
The contention of memory access can be prevented by a single access, and this arbitration can be performed with a smaller circuit scale as compared with the conventional example.

【0039】(実施の形態2)本実施の形態2は、一方
のプロセッサが共有メモリにアクセスしている状態にお
いて、他方のプロセッサからは調停回路に「アクセス権
がある」旨を書き込むことができないように、実施の形
態1を改良したものである。図4は、本発明の実施の形
態2における調停回路を実現する回路図であり、図5は
そのタイミング図である。図4において、1〜17まで
は図1の回路と同じ構成であるので説明を省略する。2
0はプロセッサ70のリード信号10を反転入力し、DF
F 1の出力Qを非反転入力するAND 回路、22はプロセ
ッサ70のライト信号12およびOR回路21の出力を非
反転入力し、DFF 1の出力Qを反転入力するAND 回路、
21はこれらAND 回路20、22の出力を入力とするOR
回路、19はこのOR回路21の出力およびリセット信号
9が非反転入力されるAND 回路、18はこのAND 回路1
9の出力がD入力に入力され、クロック信号8の立ち上
がりエッジのときの入力Dの値を保持し出力Qに出力す
るD型フリップフロップ(以下、DFF と称す)、であ
り、共有メモリに対してプロセッサ70,71のどちら
がアクセスを実行しているかを示すアクセス実行情報を
記憶する。また、200はこれらDFF 18、AND 回路2
0、AND 回路22、OR回路21、AND 回路19からな
り、DFF 18の出力を入力とし、プロセッサ70,71
のうち共有メモリ74に対するアクセス権を取得してい
る方のみがイネーブル状態である旨のアクセス権情報を
DFF 1に書き込めるように、組み合わせ回路100の入
力を制御する入力制御回路としての組み合わせ回路であ
る。
(Embodiment 2) In Embodiment 2, while one processor is accessing the shared memory, the other processor cannot write "access right" to the arbitration circuit. As described above, the first embodiment is improved. FIG. 4 is a circuit diagram for realizing the arbitration circuit according to the second embodiment of the present invention, and FIG. 5 is a timing chart thereof. In FIG. 4, 1 to 17 have the same configuration as the circuit of FIG. 2
0 inverts the read signal 10 of the processor 70 and outputs DF
An AND circuit 22 for non-inverting input of the output Q of F1; an AND circuit 22 for non-inverting input of the write signal 12 of the processor 70 and the output of the OR circuit 21 and inverting input of the output Q of DFF1;
An OR 21 receives the outputs of these AND circuits 20 and 22 as inputs.
A circuit 19 is an AND circuit to which the output of the OR circuit 21 and the reset signal 9 are non-inverted and input, and 18 is an AND circuit 1
9 is a D-type flip-flop (hereinafter, referred to as DFF) which receives the output of D at the D input, holds the value of the input D at the rising edge of the clock signal 8 and outputs it to the output Q. The access execution information indicating which of the processors 70 and 71 is executing the access is stored. 200 is the DFF 18, AND circuit 2
0, an AND circuit 22, an OR circuit 21, and an AND circuit 19. The outputs of the DFF 18 are input to the processors 70 and 71.
Out of the access right information that only the person who has acquired the access right to the shared memory 74 is in the enabled state.
This is a combination circuit as an input control circuit that controls the input of the combination circuit 100 so that it can be written into DFF1.

【0040】この構成により、この実施の形態2の調停
回路は、実施の形態1と比べてDFF1への書き込みを行う
ときに特徴があるものとなっている。即ち、この実施の
形態2の調停回路は、プロセッサ70が共有メモリ74
にアクセスしている状態において、プロセッサ71から
DFF1に“1”を書き込むことができず、プロセッサ70
からしかDFF1に“1”を書き込むことが出来ない。同様
にプロセッサ71が共有メモリ74にアクセスしている
状態において、プロセッサ70からDFF1に“1”を書き
込むことができず、プロセッサ71からしかDFF1に
“1”を書き込むことが出来ないものである。
With this configuration, the arbitration circuit of the second embodiment has a feature in performing writing to DFF1 as compared with the first embodiment. That is, in the arbitration circuit of the second embodiment, the processor 70
While the processor 71 is accessing
Since "1" cannot be written to DFF1, the processor 70
Only "1" can be written to DFF1. Similarly, while the processor 71 is accessing the shared memory 74, the processor 70 cannot write "1" to DFF1 and the processor 71 can only write "1" to DFF1.

【0041】次に動作について説明する。まず、初期状
態確定のため、リセット信号を“0”にする(図5の状
態C1)とAND 回路19の出力、すなわちDFF1の入力D
は“0”となり、クロック信号8の立ち上がりでDFF18
の出力Qは不定状態から“0”になる(図5の状態C
2)。
Next, the operation will be described. First, in order to determine the initial state, the reset signal is set to "0" (state C1 in FIG. 5) and the output of the AND circuit 19, that is, the input D of the DFF1 is inputted.
Becomes “0” and DFF18 at the rising edge of the clock signal 8.
Output from the undefined state to "0" (state C in FIG. 5).
2).

【0042】次に、このようにDFF18 の出力Qが“0”
に設定された状態において、プロセッサ70が共有メモ
リにアクセスする場合、プロセッサ70はDFF1の出力
“1”を読み出すのでプロセッサ70のリード信号10
は“0”となり、DFF1の出力Qは“1”であるので、AN
D 回路20の出力は“1”、OR回路21の出力は“1”
となり、このときリセット信号9は“1”であるので、
AND 回路19の出力は“1”、すなわちDFF18 の入力D
は“1”となり(図5の状態C3)、DFF18 の出力Qは
“0”から“1”になる(図5の状態C4)。また、プ
ロセッサ70は、DFF1の出力Qの値“1”を読み出し、
プロセッサ70は、共有メモリ74に対して「アクセス
権がある」と認識し(図5の状態C3)、共有メモリ7
4へアクセスを行う(図5の状態C4以降)。プロセッ
サ70が共有メモリ74にアクセス中に、プロセッサ7
1がDFF1を“1”にしようとすると、プロセッサ71の
ライト信号14は“0”、プロセッサ71のライトデー
タ15は“1”となるが、このときAND 回路19の出力
が“1”であるので、AND 回路5の出力は“0”とな
り、かつプロセッサ70のリード信号10、ライト信号
12は“0”、“1”であるので、AND 回路3、4の出
力も“0”となり、OR回路2の出力すなわちDFF1の入力
Dは“0”となり、プロセッサ71からDFF1への書き込
みがマスクされ、DFF1に“1”を書き込むことが出来な
い(図5の状態C6)。
Next, as described above, the output Q of DFF18 is "0".
When the processor 70 accesses the shared memory in the state set as “1”, the processor 70 reads the output “1” of DFF1, so that the read signal 10
Is "0" and the output Q of DFF1 is "1", so that AN
The output of the D circuit 20 is "1" and the output of the OR circuit 21 is "1".
At this time, since the reset signal 9 is "1",
The output of the AND circuit 19 is "1", that is, the input D of the DFF18.
Becomes "1" (state C3 in FIG. 5), and the output Q of DFF18 changes from "0" to "1" (state C4 in FIG. 5). Further, the processor 70 reads the value “1” of the output Q of DFF1, and
The processor 70 recognizes that the shared memory 74 has “access right” (state C3 in FIG. 5), and
4 is accessed (from state C4 in FIG. 5). While the processor 70 is accessing the shared memory 74, the processor 7
When 1 sets DFF1 to "1", the write signal 14 of the processor 71 becomes "0" and the write data 15 of the processor 71 becomes "1". At this time, the output of the AND circuit 19 is "1". Therefore, the output of the AND circuit 5 is "0", and the read signal 10 and the write signal 12 of the processor 70 are "0" and "1". Therefore, the outputs of the AND circuits 3 and 4 are also "0", and the OR The output of the circuit 2, that is, the input D of DFF1 becomes "0", the writing from the processor 71 to DFF1 is masked, and "1" cannot be written to DFF1 (state C6 in FIG. 5).

【0043】またプロセッサ70から共有メモリ74へ
のアクセスが終了した後、プロセッサ70がDFF1へ
“1”を書き込むため、プロセッサ70のライト信号1
2は“0”となり、かつこのときDFF1の出力Qは“0”
であり、プロセッサ70のリード信号10が“1”、そ
のライト信号が“0”であるためAND 回路20,22の
出力は“0”となり、これにより、OR回路21、AND 回
路19の出力は“0”すなわちDFF18 の入力Dは“0”
となって(図5の状態C6)、DFF18 の出力Qは“1”
から“0”になる(図5の状態C7)。
After the processor 70 completes the access to the shared memory 74, the processor 70 writes "1" to DFF1.
2 is "0", and the output Q of DFF1 is "0" at this time.
Since the read signal 10 of the processor 70 is “1” and the write signal thereof is “0”, the outputs of the AND circuits 20 and 22 become “0”, whereby the outputs of the OR circuit 21 and the AND circuit 19 become "0", that is, the input D of DFF18 is "0"
(State C6 in FIG. 5), and the output Q of DFF18 becomes "1".
To "0" (state C7 in FIG. 5).

【0044】プロセッサ71が共有メモリにアクセスす
る場合、プロセッサ71はDFF1を読み出すが、DFF18 の
入力Dは変化しないため、DFF18 の出力Qは“0”のま
まである。プロセッサ71はDFF1から“1”を読み出
し、プロセッサ71は、共有メモリ74に対して「アク
セス権がある」と認識し(図5の状態C9)、共有メモ
リ74へアクセスを行う(図5の状態C10以降の状
態)。
When the processor 71 accesses the shared memory, the processor 71 reads DFF1, but the output D of DFF18 remains "0" because the input D of DFF18 does not change. The processor 71 reads “1” from DFF1, and recognizes that the shared memory 74 has “access right” (state C9 in FIG. 5), and accesses the shared memory 74 (state C in FIG. 5). State after C10).

【0045】プロセッサ71が共有メモリ74にアクセ
ス中に、プロセッサ70がDFF1を“1”にしようとする
と、プロセッサ70のライト信号12は“0”、プロセ
ッサ70のライトデータ13は“1”となるが、AND 回
路19の出力が“0”であるので、AND 回路4の出力は
“0”となり、かつこのとき、プロセッサ71のライト
信号14は“1”、ライトデータ15は“0”であるた
め、AND 回路5の出力は”0”、DFF1の出力Qは“0”
であるためAND 回路3の出力は“0”であり、このた
め、OR回路2の出力すなわちDFF1の入力Dは“0”とな
り、プロセッサ70からDFF1への書き込みがマスクさ
れ、DFF1に“1”を書き込むことが出来ない(図5の状
態C11)。
If the processor 70 attempts to set DFF1 to "1" while the processor 71 is accessing the shared memory 74, the write signal 12 of the processor 70 becomes "0" and the write data 13 of the processor 70 becomes "1". However, since the output of the AND circuit 19 is "0", the output of the AND circuit 4 is "0", and at this time, the write signal 14 of the processor 71 is "1" and the write data 15 is "0". Therefore, the output of the AND circuit 5 is “0” and the output Q of DFF1 is “0”.
Therefore, the output of the AND circuit 3 is "0", the output of the OR circuit 2, that is, the input D of DFF1 is "0", the writing from the processor 70 to DFF1 is masked, and DFF1 is set to "1". Cannot be written (state C11 in FIG. 5).

【0046】またプロセッサ71が共有メモリ74への
アクセスが終了した後、プロセッサ70がDFF1へ“1”
を書き込むため、プロセッサ70のライト信号12は
“0”となるが、このときDFF1の出力Qは“0”であ
り、これにより、AND 回路20,22の出力はともに
“0”、OR回路21、AND 回路19の出力は“0”とな
るためDFF18 の入力Dは“0”となり(図5の状態C
6)、DFF18 の出力Qは“1”から“0”になる(図5
の状態C7)。つまり、DFF18 の出力Qは、プロセッサ
70が共有メモリ74にアクセスしているときに自動的
に“1”になり、またアクセスが終了したときに自動的
に“0”になる。
After the processor 71 completes the access to the shared memory 74, the processor 70 sets "1" to DFF1.
Is written, the write signal 12 of the processor 70 becomes "0". At this time, the output Q of DFF1 is "0", whereby the outputs of the AND circuits 20 and 22 are both "0" and the OR circuit 21 , And the output of the AND circuit 19 becomes "0", so that the input D of DFF18 becomes "0" (state C in FIG. 5).
6), the output Q of DFF18 changes from "1" to "0" (FIG. 5)
State C7). That is, the output Q of DFF18 automatically becomes "1" when the processor 70 is accessing the shared memory 74, and automatically becomes "0" when the access is completed.

【0047】仮に、いずれか一方のプロセッサが共有メ
モリ74にアクセス中で、アクセスしていない方のプロ
セッサが本来“0”であるDFF1への書き込みを行い
“1”にし、アクセスしていない方のプロセッサがDFF1
を読み、「アクセス権がある」と認識すると、2つのプ
ロセッサが同時に共有メモリ74にアクセスできてしま
うという不具合が生じることになる。これに対し、本実
施の形態2では、DFF18 の出力Qを使い、アクセス中の
プロセッサのみがDFF1への書き込みを出来るようにする
ことが出来る。
If one of the processors is accessing the shared memory 74 and the other processor is not accessing the shared memory 74, it writes DFF1 which is originally "0" to "1", and the other processor is not accessing the shared memory 74. Processor is DFF1
And recognizes that "there is an access right", a problem occurs that two processors can simultaneously access the shared memory 74. On the other hand, in the second embodiment, the output Q of DFF18 can be used so that only the accessing processor can write to DFF1.

【0048】このように、本実施の形態2によれば、AN
D 回路20,22,19およびOR回路21により組み合
わせ回路200を構成し、この組み合わせ回路200の
出力信号の状態をDフリップフロップ18により記憶し
てAND 回路22の入力に帰還し、かつこの組み合わせ回
路200の出力信号をAND 回路4,5にも入力するよう
に構成したことにより、アクセス権を取得するための調
停回路の読み出し、アクセス権を放棄するための調停回
路の書き込みの計2回のアクセスでメモリアクセスの競
合の防止を行うことができるばかりでなく、アクセス中
のプロセッサのみがDフリップフロップ1への書き込み
を行うことが可能となり、従来例とほぼ同等の回路規模
で、この調停を行うことが可能となる。
As described above, according to the second embodiment, AN
A combination circuit 200 is composed of the D circuits 20, 22, 19 and the OR circuit 21. The state of the output signal of the combination circuit 200 is stored by the D flip-flop 18 and is fed back to the input of the AND circuit 22. Since the output signal of the arbitration circuit 200 is also input to the AND circuits 4 and 5, the arbitration circuit for acquiring the access right and the arbitration circuit for relinquishing the access right are written twice. Not only can prevent memory access conflicts, but also allow only the accessing processor to write to the D flip-flop 1, and perform this arbitration with a circuit size substantially equal to that of the conventional example. It becomes possible.

【0049】なお、実施の形態1および2では、イネー
ブル状態は“1”,ディスイネーブル状態は“0”、プ
ロセッサ70,71のリード信号およびライト信号は負
極性であるものとして説明したが、これらは回路を構成
する論理を反転することにより、それぞれを逆に、即
ち、イネーブル状態は“0”,ディスイネーブル状態は
“1”、プロセッサ70,71のリード信号およびライ
ト信号は正極性であるものとしてもよい。
In the first and second embodiments, the enable state is "1", the disable state is "0", and the read and write signals of the processors 70 and 71 are negative. Are inverted by inverting the logic constituting the circuit, that is, the enable state is "0", the disable state is "1", and the read and write signals of the processors 70 and 71 have positive polarity. It may be.

【0050】また、実施の形態1および2では、2つの
プロセッサが共有する1つのメモリに対し、そのメモリ
アクセスの競合を防止する場合を例にとって説明した
が、これはプロセッサに限るものではなく、メモリを共
有するものの少なくとも一方が、プログラマブルなデバ
イスであってもよい。
Further, in the first and second embodiments, a case has been described as an example in which contention for memory access to one memory shared by two processors is prevented. However, this is not limited to the processor. At least one of those sharing the memory may be a programmable device.

【0051】[0051]

【発明の効果】以上のように、本願の請求項1の発明に
係る調停回路によれば、第1、第2のデバイスが共有す
るメモリに対し、前記第1、第2のデバイスによる前記
メモリのアクセス競合を防止するための調停回路におい
て、前記第1、第2のデバイスがいずれも前記メモリに
アクセスしておらず前記メモリへのアクセスが可能であ
るイネーブル状態と、前記第1、第2のデバイスのいず
れか一方が前記メモリへアクセスしており、前記メモリ
へアクセスしていない方のデバイスからの前記メモリへ
のアクセスが不可能なディスイネーブル状態,のいずれ
の状態にあるかを示すアクセス権情報を記憶する第1の
記憶回路と、前記第1、第2のデバイスのいずれか一方
が前記メモリに対するアクセス権を取得するために前記
第1の記憶回路の情報を読み出したあとに前記第1の記
憶回路の出力がディスイネーブル状態である旨のアクセ
ス権情報となり、前記第1、第2のいずれかのデバイス
が前記メモリに対するアクセス権を放棄するために前記
第1の記憶回路にイネーブル状態である旨のアクセス権
情報を書き込むときに前記第1の記憶回路の出力がイネ
ーブル状態である旨のアクセス権情報となるように、当
該第1の記憶回路に書き込むべきアクセス権情報を生成
するアクセス権情報生成回路とを備えるようにしたの
で、2つのデバイスが共有する1つのメモリへのアクセ
ス競合の防止のための調停回路へのアクセス回数を減少
させることが可能となるためメモリアクセス実行までの
時間を短縮することができる効果がある。
As described above, according to the arbitration circuit according to the first aspect of the present invention, the memory shared by the first and second devices is replaced by the memory by the first and second devices. An arbitration circuit for preventing access conflicts between the first and second devices, wherein none of the first and second devices has access to the memory, and the first and second devices can access the memory; Access indicating that one of the devices is accessing the memory, and that the device that is not accessing the memory is in a disabled state in which the memory cannot be accessed. A first storage circuit for storing the right information, and a first storage circuit for storing one of the first and second devices so as to obtain the access right to the memory. After reading out the information, the output of the first storage circuit becomes access right information indicating that it is in a disabled state, and the first or second device rejects the access right to the memory. When writing the access right information indicating the enabled state to the first storage circuit, the first storage circuit writes the access right information so that the output of the first storage circuit becomes the access right information indicating the enabled state. The access right information generation circuit for generating the access right information to be provided can reduce the number of accesses to the arbitration circuit for preventing contention for access to one memory shared by the two devices Therefore, there is an effect that the time until the execution of the memory access can be shortened.

【0052】また、本願の請求項2の発明に係る調停回
路によれば、第1、第2のデバイスが共有するメモリに
対し、前記第1、第2のデバイスによる前記メモリのア
クセス競合を防止するための調停回路において、前記第
1、第2のデバイスがいずれも前記メモリにアクセスし
ておらず前記メモリへのアクセスが可能であるイネーブ
ル状態と、前記第1、第2のデバイスのいずれか一方が
前記メモリへアクセスしており、前記メモリへアクセス
していない方のデバイスからの前記メモリへのアクセス
が不可能なディスイネーブル状態,のいずれの状態にあ
るかを示すアクセス権情報を記憶する第1の記憶回路
と、前記第1、第2のデバイスのいずれか一方が前記メ
モリに対するアクセス権を取得するために前記第1の記
憶回路の情報を読み出したあとに前記第1の記憶回路の
出力がディスイネーブル状態である旨のアクセス権情報
となり、前記第1、第2のいずれかのデバイスが前記メ
モリに対するアクセス権を放棄するために前記第1の記
憶回路にイネーブル状態である旨のアクセス権情報を書
き込むときに前記第1の記憶回路の出力がイネーブル状
態である旨のアクセス権情報となるように、当該第1の
記憶回路に書き込むべきアクセス権情報を生成するアク
セス権情報生成回路と、前記メモリに対して前記第1、
第2のデバイスのどちらがアクセスを実行しているかを
示すアクセス実行情報を記憶する第2の記憶回路と、前
記第2の記憶回路の出力を入力とし、前記第1、第2の
デバイスのうち前記メモリに対するアクセス権を取得し
ている方のみが前記メモリに対するアクセス権を放棄す
るためにイネーブル状態である旨のアクセス権情報を前
記第1の記憶回路に書き込むことができるように、前記
アクセス権情報生成回路の入力を制御する入力制御回路
とを備えるようにしたので、2つのデバイスが共有する
1つのメモリへのアクセス競合の防止のための調停回路
へのアクセス回数を減少させることが可能となるためメ
モリアクセス実行までの時間を短縮することができ、し
かも、一方のデバイスが共有メモリにアクセスした場
合、他方のデバイスからは調停回路にアクセス権がある
旨を書き込むことができないようにすることが可能とな
る効果がある。
According to the arbitration circuit of the second aspect of the present invention, contention for access to the memory shared by the first and second devices by the first and second devices is prevented. And an arbitration circuit for enabling the first and second devices to access the memory and not to access the memory; One of them is accessing the memory, and the access right information indicating which state is in a disabled state in which the device that is not accessing the memory cannot access the memory is stored. A first storage circuit and one of the first and second devices read information in the first storage circuit to acquire an access right to the memory. After that, the output of the first storage circuit becomes access right information indicating that the output is in the disabled state, and the first or second device relinquishes the access right to the memory so that the first memory device relinquishes the access right. The access right to be written to the first storage circuit so that the output of the first storage circuit becomes the access right information to the effect that the output is enabled when the access right information indicating the enabled state is written to the storage circuit. An access right information generating circuit for generating information;
A second storage circuit for storing access execution information indicating which one of the second devices is executing access, and an output of the second storage circuit as an input, the second storage circuit being one of the first and second devices; The access right information so that only the person who has acquired the access right to the memory can write the access right information to the effect that the access right to the memory is enabled to abandon the access right to the memory into the first storage circuit. Since an input control circuit for controlling the input of the generation circuit is provided, the number of accesses to the arbitration circuit for preventing contention for access to one memory shared by the two devices can be reduced. Therefore, it is possible to shorten the time until execution of memory access, and when one device accesses the shared memory, the other device Al is effective in making it possible to make it impossible to write that there is access to the arbitration circuit.

【0053】また、本願の請求項3の発明に係る調停回
路によれば、請求項1記載の調停回路において、前記第
1の記憶回路は第1のDフリップフロップからなるもの
であり、前記アクセス権情報生成回路は、前記第1、第
2のデバイスが前記第1の記憶回路に対しデータの読み
出しを指示する第1、第2のリード信号と前記Dフリッ
プフロップの出力信号を入力とする第1の論理積回路
と、前記第1のデバイスが前記第1の記憶回路に対しデ
ータの書き込みを指示する第1のライト信号を反転入力
し、前記第1のデバイスが前記第1の記憶回路に対し書
き込む第1のライトデータを非反転入力する第2の論理
積回路と、前記第2のデバイスが前記第1の記憶回路に
対しデータの書き込みを指示する第2のライト信号を反
転入力し、前記第2のデバイスが前記第1の記憶回路に
対し書き込む第2のライトデータを非反転入力する第3
の論理積回路と、前記第1ないし第3の論理積回路の出
力信号を非反転入力するとともにリセット信号を反転入
力しその出力信号を前記第1のDフリップフロップのD
入力に出力する第1の論理和回路とからなるものとした
ので、2つのデバイスが共有する1つのメモリへのアク
セス競合の防止のための調停回路へのアクセス回数を減
少させることが可能となるためメモリアクセス実行まで
の時間を短縮することができ、また従来よりも小規模な
回路規模でこれを実現することが出来る効果がある。
According to the arbitration circuit according to the third aspect of the present invention, in the arbitration circuit according to the first aspect, the first storage circuit comprises a first D flip-flop, and The right information generation circuit receives the first and second read signals for instructing the first storage circuit to read data from the first and second devices and the output signal of the D flip-flop. 1 logical product circuit, and the first device inverts and inputs a first write signal for instructing the first memory circuit to write data, and the first device inputs the first memory signal to the first memory circuit. A second AND circuit for non-inverting input of first write data to be written, and the second device inverting and inputting a second write signal for instructing the first memory circuit to write data; The second Third the device to the non-inverting input of the second write data to be written to said first memory circuit
And a non-inverted input of an output signal of the first to third AND circuits, and an inverted input of a reset signal.
Since the first OR circuit outputs the input, the number of accesses to the arbitration circuit for preventing contention for access to one memory shared by the two devices can be reduced. Therefore, there is an effect that the time until the memory access is executed can be shortened, and this can be realized with a smaller circuit scale than before.

【0054】また、本願の請求項4の発明に係る調停回
路によれば、請求項2記載の調停回路において、前記第
1の記憶回路は第1のDフリップフロップからなるもの
であり、前記アクセス権情報生成回路は、前記第1、第
2のデバイスが前記第1の記憶回路に対しデータの読み
出しを指示する第1、第2のリード信号と前記Dフリッ
プフロップの出力信号を入力とする第1の論理積回路
と、前記第1のデバイスが前記第1の記憶回路に対しデ
ータの書き込みを指示する第1のライト信号を反転入力
し、前記第1のデバイスが前記第1の記憶回路に対し書
き込む第1のライトデータを非反転入力する第2の論理
積回路と、前記第2のデバイスが前記第1の記憶回路に
対しデータの書き込みを指示する第2のライト信号を反
転入力し、前記第2のデバイスが前記第1の記憶回路に
対し書き込む第2のライトデータを非反転入力する第3
の論理積回路と、前記第1ないし第3の論理積回路の出
力信号を非反転入力するとともにリセット信号を反転入
力しその出力信号を前記第1のDフリップフロップのD
入力に出力する第1の論理和回路とからなるものであ
り、前記第2の記憶回路は第2のDフリップフロップか
らなるものであり、前記入力制御回路は、前記第1のリ
ード信号を反転入力し前記第1のDフリップフロップの
出力信号を非反転入力する第4の論理積回路と、前記第
1のライト信号と前記第2のDフリップフロップの出力
信号を非反転入力し前記第1のDフリップフロップの出
力信号を反転入力する第5の論理積回路と、前記第4,
第5の論理積回路の出力信号を入力とする第2の論理和
回路と、前記第2の論理和回路の出力信号と前記リセッ
ト信号を入力としその出力信号を前記第2のDフリップ
フロップのD入力に出力する第6の論理積回路とからな
り、前記第6の論理積回路の出力信号は、前記第2の論
理積回路に非反転入力されるとともに前記第3の論理積
回路に反転入力されるようにしたので、2つのデバイス
が共有する1つのメモリへのアクセス競合の防止のため
の調停回路へのアクセス回数を減少させることが可能と
なるためメモリアクセス実行までの時間を短縮すること
ができ、一方のデバイスが共有メモリにアクセスした場
合、他方のデバイスからは調停回路にアクセス権がある
旨を書き込むことができないようにすることが可能とな
り、かつ従来と同等規模の回路規模でこれを実現するこ
とが出来る効果がある。
According to the arbitration circuit of the invention of claim 4 of the present application, in the arbitration circuit of claim 2, the first storage circuit comprises a first D flip-flop, and The right information generation circuit receives the first and second read signals for instructing the first storage circuit to read data from the first and second devices and the output signal of the D flip-flop. 1 logical product circuit, and the first device inverts and inputs a first write signal for instructing the first memory circuit to write data, and the first device inputs the first memory signal to the first memory circuit. A second AND circuit for non-inverting input of first write data to be written, and the second device inverting and inputting a second write signal for instructing the first memory circuit to write data; The second Third the device to the non-inverting input of the second write data to be written to said first memory circuit
And a non-inverted input of an output signal of the first to third AND circuits, and an inverted input of a reset signal.
A first OR circuit for outputting to the input, the second storage circuit includes a second D flip-flop, and the input control circuit inverts the first read signal. A fourth AND circuit which inputs the output signal of the first D flip-flop and inputs the output signal of the first D flip-flop in a non-inverted manner; A fifth AND circuit for inverting and inputting the output signal of the D flip-flop of
A second OR circuit that receives an output signal of the fifth AND circuit, an input signal that receives the output signal of the second OR circuit and the reset signal, and outputs the output signal of the second D flip-flop. And a sixth AND circuit for outputting to the D input. An output signal of the sixth AND circuit is non-inverted input to the second AND circuit and inverted to the third AND circuit. Since the input is made, it is possible to reduce the number of accesses to the arbitration circuit for preventing access conflicts to one memory shared by the two devices, so that the time until memory access is executed is reduced. When one device accesses the shared memory, it is possible to prevent the other device from writing that the arbitration circuit has the access right, and the same as before. There is an effect that it is possible to achieve this on a scale of circuit scale.

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

【図1】本発明の実施の形態1の調停回路の動作の流れ
図である。
FIG. 1 is a flowchart of an operation of an arbitration circuit according to Embodiment 1 of the present invention.

【図2】本発明の実施の形態1の調停回路を実現した回
路図である。
FIG. 2 is a circuit diagram that realizes an arbitration circuit according to the first embodiment of the present invention.

【図3】図2の回路のタイミング図である。FIG. 3 is a timing diagram of the circuit of FIG. 2;

【図4】本発明の実施の形態2の調停回路を実現した回
路図である。
FIG. 4 is a circuit diagram that realizes an arbitration circuit according to a second embodiment of the present invention.

【図5】図4の回路のタイミング図である。FIG. 5 is a timing diagram of the circuit of FIG. 4;

【図6】メモリ共有の2つのプロセッサからなるシステ
ムを示すブロック図である。
FIG. 6 is a block diagram showing a system including two processors sharing a memory;

【図7】従来の調停回路回路の動作の流れ図である。FIG. 7 is a flowchart showing the operation of a conventional arbitration circuit.

【図8】図7の調停回路の回路図である。FIG. 8 is a circuit diagram of the arbitration circuit of FIG. 7;

【図9】図8の回路のタイミング図である。FIG. 9 is a timing diagram of the circuit of FIG. 8;

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

1、18 Dフリップフロップ 41 RSラッチ 3,4,5,6,7,19、20、22、42、44、
45、47、53、55 AND回路 2,21,43,46 OR回路 48,14,27,34,41,47 ラッチ 49,57 データバス 40,58 ライト信号 41,59 リード信号 42,66 出力バッファ 70,71 マイクロプロセッサ 72 調停回路 73 データバス 74 共有メモリ 10 プロセッサ70のリード信号 11 プロセッサ71のリード信号 12 プロセッサ70のライト信号 13 プロセッサ70のライトデータ 14 プロセッサ71のライト信号 15 プロセッサ71のライトデータ 16 プロセッサ70のリードデータ 17 プロセッサ71のリードデータ 100、200 組み合わせ回路
1, 18 D flip-flop 41 RS latch 3, 4, 5, 6, 7, 19, 20, 22, 42, 44,
45, 47, 53, 55 AND circuit 2, 21, 43, 46 OR circuit 48, 14, 27, 34, 41, 47 Latch 49, 57 Data bus 40, 58 Write signal 41, 59 Read signal 42, 66 Output buffer 70, 71 Microprocessor 72 Arbitration circuit 73 Data bus 74 Shared memory 10 Processor 70 read signal 11 Processor 71 read signal 12 Processor 70 write signal 13 Processor 70 write data 14 Processor 71 write signal 15 Processor 71 write data 16 Read Data of Processor 70 17 Read Data of Processor 71 100, 200 Combination Circuit

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 第1、第2のデバイスが共有するメモリ
に対し、前記第1、第2のデバイスによる前記メモリの
アクセス競合を防止するための調停回路において、 前記第1、第2のデバイスがいずれも前記メモリにアク
セスしておらず前記メモリへのアクセスが可能であるイ
ネーブル状態と、前記第1、第2のデバイスのいずれか
一方が前記メモリへアクセスしており、前記メモリへア
クセスしていない方のデバイスからの前記メモリへのア
クセスが不可能なディスイネーブル状態,のいずれの状
態にあるかを示すアクセス権情報を記憶する第1の記憶
回路と、 前記第1、第2のデバイスのいずれか一方が前記メモリ
に対するアクセス権を取得するために前記第1の記憶回
路の情報を読み出したあとに前記第1の記憶回路の出力
がディスイネーブル状態である旨のアクセス権情報とな
り、前記第1、第2のいずれかのデバイスが前記メモリ
に対するアクセス権を放棄するために前記第1の記憶回
路にイネーブル状態である旨のアクセス権情報を書き込
むときに前記第1の記憶回路の出力がイネーブル状態で
ある旨のアクセス権情報となるように、当該第1の記憶
回路に書き込むべきアクセス権情報を生成するアクセス
権情報生成回路とを備えたことを特徴とする調停回路。
An arbitration circuit for preventing contention of access to the memory by the first and second devices with respect to a memory shared by the first and second devices, wherein the first and second devices are provided. Are not accessing the memory and are able to access the memory, and one of the first and second devices is accessing the memory and accessing the memory. A first storage circuit for storing access right information indicating which state is a disabled state in which access to the memory from a device that is not available is not possible; and the first and second devices Read out the information of the first storage circuit in order to obtain the access right to the memory, and then output the first storage circuit Access right information indicating that the first storage circuit is in an enabled state in order to relinquish the access right to the memory by the first or second device. An access right information generation circuit for generating access right information to be written to the first storage circuit so that the output of the first storage circuit becomes access right information indicating that the output is in an enabled state at the time of writing. An arbitration circuit characterized in that:
【請求項2】 第1、第2のデバイスが共有するメモリ
に対し、前記第1、第2のデバイスによる前記メモリの
アクセス競合を防止するための調停回路において、 前記第1、第2のデバイスがいずれも前記メモリにアク
セスしておらず前記メモリへのアクセスが可能であるイ
ネーブル状態と、前記第1、第2のデバイスのいずれか
一方が前記メモリへアクセスしており、前記メモリへア
クセスしていない方のデバイスからの前記メモリへのア
クセスが不可能なディスイネーブル状態,のいずれの状
態にあるかを示すアクセス権情報を記憶する第1の記憶
回路と、 前記第1、第2のデバイスのいずれか一方が前記メモリ
に対するアクセス権を取得するために前記第1の記憶回
路の情報を読み出したあとに前記第1の記憶回路の出力
がディスイネーブル状態である旨のアクセス権情報とな
り、前記第1、第2のいずれかのデバイスが前記メモリ
に対するアクセス権を放棄するために前記第1の記憶回
路にイネーブル状態である旨のアクセス権情報を書き込
むときに前記第1の記憶回路の出力がイネーブル状態で
ある旨のアクセス権情報となるように、当該第1の記憶
回路に書き込むべきアクセス権情報を生成するアクセス
権情報生成回路と、 前記メモリに対して前記第1、第2のデバイスのどちら
がアクセスを実行しているかを示すアクセス実行情報を
記憶する第2の記憶回路と、 前記第2の記憶回路の出力を入力とし、前記第1、第2
のデバイスのうち前記メモリに対するアクセス権を取得
している方のみが前記メモリに対するアクセス権を放棄
するためにイネーブル状態である旨のアクセス権情報を
前記第1の記憶回路に書き込むことができるように、前
記アクセス権情報生成回路の入力を制御する入力制御回
路とを備えたことを特徴とする調停回路。
2. An arbitration circuit for preventing contention of access of the memory by the first and second devices to a memory shared by the first and second devices, wherein the first and second devices are provided. Are not accessing the memory and are able to access the memory, and one of the first and second devices is accessing the memory and accessing the memory. A first storage circuit for storing access right information indicating which state is a disabled state in which access to the memory from a device that is not available is not possible; and the first and second devices Read out the information of the first storage circuit in order to obtain the access right to the memory, and then output the first storage circuit Access right information indicating that the first storage circuit is in an enabled state in order to relinquish the access right to the memory by the first or second device. An access right information generating circuit for generating access right information to be written to the first storage circuit so that the output of the first storage circuit becomes access right information indicating that the output of the first storage circuit is enabled when writing; A second storage circuit that stores access execution information indicating which of the first and second devices is executing access to the first and second devices, and an output of the second storage circuit as an input, Second
Only the device that has acquired the access right to the memory among the devices can write the access right information indicating that the device is in the enabled state to abandon the access right to the memory to the first storage circuit. And an input control circuit for controlling an input of the access right information generation circuit.
【請求項3】 請求項1記載の調停回路において、 前記第1の記憶回路は第1のDフリップフロップからな
るものであり、 前記アクセス権情報生成回路は、 前記第1、第2のデバイスが前記第1の記憶回路に対し
データの読み出しを指示する第1、第2のリード信号と
前記Dフリップフロップの出力信号を入力とする第1の
論理積回路と、 前記第1のデバイスが前記第1の記憶回路に対しデータ
の書き込みを指示する第1のライト信号を反転入力し、
前記第1のデバイスが前記第1の記憶回路に対し書き込
む第1のライトデータを非反転入力する第2の論理積回
路と、 前記第2のデバイスが前記第1の記憶回路に対しデータ
の書き込みを指示する第2のライト信号を反転入力し、
前記第2のデバイスが前記第1の記憶回路に対し書き込
む第2のライトデータを非反転入力する第3の論理積回
路と、 前記第1ないし第3の論理積回路の出力信号を非反転入
力するとともにリセット信号を反転入力しその出力信号
を前記第1のDフリップフロップのD入力に出力する第
1の論理和回路とからなるものであることを特徴とする
調停回路。
3. The arbitration circuit according to claim 1, wherein said first storage circuit comprises a first D flip-flop, and said access right information generation circuit comprises: said first and second devices. A first AND circuit that inputs first and second read signals for instructing the first storage circuit to read data and an output signal of the D flip-flop; and A first write signal for instructing data writing to one storage circuit is inverted and input,
A second AND circuit for non-inverting input of first write data written by the first device to the first storage circuit; and writing of data to the first storage circuit by the second device. Inverts a second write signal indicating
A third AND circuit for non-inverting input of second write data written by the second device to the first storage circuit; and a non-inverting input of an output signal of the first to third AND circuits. And a first OR circuit for inverting the reset signal and outputting the output signal to the D input of the first D flip-flop.
【請求項4】 請求項2記載の調停回路において、 前記第1の記憶回路は第1のDフリップフロップからな
るものであり、 前記アクセス権情報生成回路は、 前記第1、第2のデバイスが前記第1の記憶回路に対し
データの読み出しを指示する第1、第2のリード信号と
前記Dフリップフロップの出力信号を入力とする第1の
論理積回路と、 前記第1のデバイスが前記第1の記憶回路に対しデータ
の書き込みを指示する第1のライト信号を反転入力し、
前記第1のデバイスが前記第1の記憶回路に対し書き込
む第1のライトデータを非反転入力する第2の論理積回
路と、 前記第2のデバイスが前記第1の記憶回路に対しデータ
の書き込みを指示する第2のライト信号を反転入力し、
前記第2のデバイスが前記第1の記憶回路に対し書き込
む第2のライトデータを非反転入力する第3の論理積回
路と、 前記第1ないし第3の論理積回路の出力信号を非反転入
力するとともにリセット信号を反転入力しその出力信号
を前記第1のDフリップフロップのD入力に出力する第
1の論理和回路とからなるものであり、 前記第2の記憶回路は第2のDフリップフロップからな
るものであり、 前記入力制御回路は、 前記第1のリード信号を反転入力し前記第1のDフリッ
プフロップの出力信号を非反転入力する第4の論理積回
路と、 前記第1のライト信号と前記第2のDフリップフロップ
の出力信号を非反転入力し前記第1のDフリップフロッ
プの出力信号を反転入力する第5の論理積回路と、 前記第4,第5の論理積回路の出力信号を入力とする第
2の論理和回路と、 前記第2の論理和回路の出力信号と前記リセット信号を
入力としその出力信号を前記第2のDフリップフロップ
のD入力に出力する第6の論理積回路とからなり、 前記第6の論理積回路の出力信号は、前記第2の論理積
回路に非反転入力されるとともに前記第3の論理積回路
に反転入力されることを特徴とする調停回路。
4. The arbitration circuit according to claim 2, wherein said first storage circuit comprises a first D flip-flop, and said access right information generation circuit comprises: said first and second devices. A first AND circuit that inputs first and second read signals for instructing the first storage circuit to read data and an output signal of the D flip-flop; and A first write signal for instructing data writing to one storage circuit is inverted and input,
A second AND circuit for non-inverting input of first write data written by the first device to the first storage circuit; and writing of data to the first storage circuit by the second device. Inverts a second write signal indicating
A third AND circuit for non-inverting input of second write data written by the second device to the first storage circuit; and a non-inverting input of an output signal of the first to third AND circuits. And a first OR circuit for inverting the reset signal and outputting the output signal to the D input of the first D flip-flop, wherein the second storage circuit is a second D flip-flop. A fourth AND circuit which inverts the first read signal and non-inverts the output signal of the first D flip-flop; and A fifth AND circuit for non-inverting input of a write signal and an output signal of the second D flip-flop and inverting input of an output signal of the first D flip-flop; and the fourth and fifth AND circuits Output signal A second OR circuit which receives the output signal of the second OR circuit and the reset signal, and outputs the output signal to the D input of the second D flip-flop. Arbitration, wherein an output signal of the sixth AND circuit is non-inverted input to the second AND circuit and invertedly input to the third AND circuit. circuit.
JP10357797A 1998-12-16 1998-12-16 Mediation circuit Pending JP2000181783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10357797A JP2000181783A (en) 1998-12-16 1998-12-16 Mediation circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10357797A JP2000181783A (en) 1998-12-16 1998-12-16 Mediation circuit

Publications (1)

Publication Number Publication Date
JP2000181783A true JP2000181783A (en) 2000-06-30

Family

ID=18455978

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10357797A Pending JP2000181783A (en) 1998-12-16 1998-12-16 Mediation circuit

Country Status (1)

Country Link
JP (1) JP2000181783A (en)

Similar Documents

Publication Publication Date Title
JP3661235B2 (en) Shared memory system, parallel processor and memory LSI
US5293491A (en) Data processing system and memory controller for lock semaphore operations
JPH07105146A (en) Common memory device
JP2010055440A (en) Distributed shared memory multiprocessor and data processing method
US6202117B1 (en) Host adapter integrated circuit having autoaccess pause
US7069363B1 (en) On-chip bus
JP2000181783A (en) Mediation circuit
US6292861B1 (en) Processor having interface with bus arbitration circuit
JPH051504B2 (en)
JP3093374B2 (en) Interrupt controller
JP2852149B2 (en) Semaphore bit circuit
JPH11203253A (en) Exclusive access control method for shared resource
JPS63298555A (en) Shared memory control system
JPH11273380A (en) Lsi operation mode setting signal fetching method and lsi with mode signal fetching function
JPH05282246A (en) Microcomputer
JPH0551931B2 (en)
JP2806700B2 (en) Multi-processing system
JPH08180027A (en) Arbitration circuit
JPS61275954A (en) Memory access control system
JPH1063566A (en) Memory arbitrating circuit and electronic circuit
JPS60201465A (en) Data processing device
JPS59123063A (en) Access system of shared resource of multi-processor system
JPH04131955A (en) Multiprocessor type programmable controller
JPS588012B2 (en) Memory control circuit
JPH06274460A (en) Inter-different speed processor data communication system