JPH0554002A - Inter-cpu interruption controller - Google Patents

Inter-cpu interruption controller

Info

Publication number
JPH0554002A
JPH0554002A JP21779191A JP21779191A JPH0554002A JP H0554002 A JPH0554002 A JP H0554002A JP 21779191 A JP21779191 A JP 21779191A JP 21779191 A JP21779191 A JP 21779191A JP H0554002 A JPH0554002 A JP H0554002A
Authority
JP
Japan
Prior art keywords
interrupt
cpu
interruption
information
register
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
JP21779191A
Other languages
Japanese (ja)
Inventor
Hirobumi Nishigaki
寛文 西垣
Takahiko Tanji
能彦 丹治
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 JP21779191A priority Critical patent/JPH0554002A/en
Publication of JPH0554002A publication Critical patent/JPH0554002A/en
Pending legal-status Critical Current

Links

Landscapes

  • Multi Processors (AREA)
  • Bus Control (AREA)

Abstract

PURPOSE:To provide an inter-CPU interruption controller which shortens the processing time of inter-CPU interruption and simplifies the interruption handling and is capable of interruption in plural levels among plural CPUs. CONSTITUTION:The same number of interruption registers 33, which have interruption storage parts 35 having interruption flags of CPUs for the same interruption levels of interruption destination CPUs and interruption storage information generating parts 34 generating storage information based on information in interruption storage parts 35 and write information, as interruption levels are provided correspondingly to individual interruption levels. An interruption request part 36 is provided which requests interruption to CPUs by levels based on information in interruption storage parts 35 of interruption registers 33.

Description

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

【0001】[0001]

【産業上の利用分野】本発明はレーザ加工機用数値制御
装置などに利用されるもので、機器内で複数のCPUを
使用し、各CPU間の情報のやり取りの実行に割込みを
使用する構成における複数CPU間の割込み制御装置に
関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention is used in a numerical control device for a laser beam machine, etc., and uses a plurality of CPUs in the equipment, and uses an interrupt to execute information exchange between the CPUs. And an interrupt control device between a plurality of CPUs.

【0002】[0002]

【従来の技術】近年マイクロコンピュータを使用した機
器においては、機器内の情報量の増加と処理の高速性が
要望されるようになり、複数のCPUを使用して各CP
Uに個別に特徴をもった機能を任せ、各CPU間で情報
のやり取りを行なわせて全体のシステムを構成する分散
型システムが増えてきている。
2. Description of the Related Art In recent years, in devices using microcomputers, an increase in the amount of information in the devices and a high processing speed are demanded, and a plurality of CPUs are used to control each CP.
There is an increasing number of distributed systems in which the U is individually assigned a function having a characteristic and information is exchanged between the CPUs to configure the entire system.

【0003】このような分散型システムのマイクロコン
ピュータを用いた機器において、各CPU間の情報のや
りとりを大量かつ高速に行うためのシステムとして、図
1に示すものが知られている。
In a device using such a distributed system microcomputer, a system shown in FIG. 1 is known as a system for exchanging information between CPUs in a large amount at high speed.

【0004】図1に示す従来例は、各CPU5に対し設
けられた割込み制御装置が、割込みを発生させるための
割込み発生部9と、他のCPU5から発生された割込み
を受信するための割込み受信部10とを備えている。こ
の割込み受信部10は、図2に示すように、相手方のす
べてのCPU5の割込み発生に対応できるよう多数の割
込みフラグ16で構成される割込み受信レジスタ15
と、自らのCPU5に割込み要求を発生する割込み要求
部17とから構成されている。又前記割込み発生部9
は、相手方のすべてのCPU5の割込み受信に対応でき
るよう多数の各CPU別の割込み発生部を有し、図2に
示すように、各CPU別の割込み発生部とこれに対応す
る各割込みフラグ16とが1対1対応で、割込み要求線
13で接続されている。
In the conventional example shown in FIG. 1, an interrupt control device provided for each CPU 5 receives an interrupt generation unit 9 for generating an interrupt and an interrupt reception for receiving an interrupt generated by another CPU 5. And a section 10. As shown in FIG. 2, the interrupt receiving unit 10 includes an interrupt receiving register 15 including a large number of interrupt flags 16 so as to be able to respond to the interrupt generation of all the CPUs 5 of the other party.
And an interrupt request unit 17 which issues an interrupt request to its own CPU 5. Also, the interrupt generation unit 9
Has a large number of interrupt generation units for each CPU so as to be able to handle the interrupt reception of all the CPUs 5 of the other party. As shown in FIG. 2, the interrupt generation units for each CPU and the interrupt flags 16 corresponding thereto are provided. And are in a one-to-one correspondence, and are connected by the interrupt request line 13.

【0005】しかしこの従来例によれば、CPU5間の
割込み通信を行なうCPU5の数が増えてくると、割込
み要求線13の数が幾何級数的に増大する。
However, according to this conventional example, when the number of CPUs 5 for performing interrupt communication between the CPUs 5 increases, the number of interrupt request lines 13 increases geometrically.

【0006】すなわちCPU5の数をMとすると、割込
み要求線13の数Wは式(1)のように示される。
That is, assuming that the number of CPUs 5 is M, the number W of interrupt request lines 13 is represented by the equation (1).

【0007】W=M×(M 1)・・・・・・(1) 図3の(a)にはCPU5の数が4個の場合を示してい
るが、この場合には割込み要求線13の数は12本とな
る。又図3の(b)にはCPU5の数が5個の場合を示
しているが、この場合には割込み要求線13の数は20
本となる。
W = M × (M 1) (1) FIG. 3A shows the case where the number of CPUs 5 is four. In this case, the interrupt request line 13 Will be 12. Further, FIG. 3B shows a case where the number of CPUs 5 is 5, but in this case, the number of interrupt request lines 13 is 20.
It will be a book.

【0008】上記の場合は割込みレベルを考慮しない場
合であったが、実際には割込みレベルを考慮しなければ
ならない場合の方が多く、N段階の割込みレベルが存在
する場合には、割込み要求線13の数Wは式(2)のよ
うに示される。
In the above case, the interrupt level was not taken into consideration, but in many cases the interrupt level must actually be taken into consideration. If there are N levels of interrupt levels, the interrupt request line The number W of 13 is expressed as in equation (2).

【0009】 W=N×M×(M 1)・・・・・・(2) 従って、例えばCPU5の数が4個、割込みレベルが7
段階である場合には、割込み要求線13の数が、84本
にもなってしまう。このように上記従来例は、CPU5
の数が増大すると割込み要求線13の数が極端に増大
し、特に、CPU5の増大に加え、割込みレベル数が大
きくなると、これに対応することが事実上不可能になる
という問題を有している。
W = N × M × (M 1) (2) Therefore, for example, the number of CPUs 5 is 4 and the interrupt level is 7
In the stage, the number of interrupt request lines 13 becomes 84. As described above, in the conventional example described above, the CPU 5
The number of interrupt request lines 13 increases extremely as the number of interrupts increases, and in particular, when the number of interrupt levels increases in addition to the increase in the CPU 5, there is a problem that it is practically impossible to deal with this. There is.

【0010】このような問題点を解消した従来例とし
て、図4、図5に示す従来例がある。
As a conventional example that solves such a problem, there are conventional examples shown in FIGS.

【0011】この従来例は、割込む側のCPUが割込み
先のCPUのローカルバスの占有権を獲得し、割込み情
報を格納することでCPU間の割込みを行なうものであ
る。
In this conventional example, the interrupting CPU obtains the exclusive right of the local bus of the interrupt destination CPU and stores the interrupt information to perform the interrupt between the CPUs.

【0012】図4に示すように各CPU21に対応し
て、バス制御部18、バッファ19、メモリ22、割込
み制御部23、I/O24、CPU間割込み制御装置2
5が設けられている。前記CPU間割込み制御装置25
は、図5に示すように、CPU毎に個別の割込みフラグ
の構成をとる割込み格納部30をもつ割込みレジスタ2
9と、割込み要求部31とから構成される。割込みレジ
スタ29の内部構造は表1に示すようになっている。表
2は割込みレジスタ29内の割込みフラングの状態遷移
表である。図6は割込みレジスタ29と割込み要求部3
1の回路構成の1例を示したものである。
As shown in FIG. 4, corresponding to each CPU 21, a bus control unit 18, a buffer 19, a memory 22, an interrupt control unit 23, an I / O 24, and an inter-CPU interrupt control device 2 are provided.
5 are provided. Inter-CPU interrupt controller 25
Is an interrupt register 2 having an interrupt storage unit 30 having an individual interrupt flag configuration for each CPU, as shown in FIG.
9 and an interrupt request unit 31. The internal structure of the interrupt register 29 is shown in Table 1. Table 2 is a state transition table of the interrupt flag in the interrupt register 29. FIG. 6 shows the interrupt register 29 and the interrupt request unit 3.
1 shows an example of a circuit configuration of 1.

【0013】[0013]

【表1】 [Table 1]

【0014】[0014]

【表2】 [Table 2]

【0015】又図4、図5に示すように、各CPU21
のローカル上にある前記割込みレジスタ29に個別にア
クセスすることを管理する管理情報を格納する共通メモ
リ20を備えている。この共通メモリ20は割込みレジ
スタ用アクセス制御格納部32を有している。このアク
セス制御格納部32は、表3に示すように、各割込みレ
ジスタ29に対応するセマフォフラグを備えている。
As shown in FIGS. 4 and 5, each CPU 21
There is provided a common memory 20 for storing management information for managing the individual access to the interrupt register 29 which is locally present. The common memory 20 has an interrupt register access control storage unit 32. The access control storage unit 32, as shown in Table 3, has a semaphore flag corresponding to each interrupt register 29.

【0016】[0016]

【表3】 [Table 3]

【0017】次に上記従来例のCPU間の割込み動作を
説明する。各CPU21に付設されたCPU間割込み制
御装置25の割込みレジスタ29は、他のCPU21の
すべてに対応した割込みフラグを持っているため、各C
PU21からのアクセスが混在するおそれがある。この
ため、他のCPU21による割込み発生処理、自らのC
PU21による割込み受信処理における割込みレジスタ
29への読出し、書込みの一連のアクセスを保証する必
要があり、この保証のために、共通メモリ20上のアク
セス制御格納部32は、各CPU21の割込みレジスタ
29のアクセス権を個別に管理するために割込みレジス
タ29の数だけセマフォフラグを持つように構成され、
これによりアクセス権の制御を行なっている。
Next, the interrupt operation between the CPUs of the above conventional example will be described. Since the interrupt register 29 of the inter-CPU interrupt control device 25 attached to each CPU 21 has an interrupt flag corresponding to all the other CPUs 21, each C
Access from the PU 21 may be mixed. For this reason, the interrupt generation processing by the other CPU 21 and its own C
It is necessary to guarantee a series of read and write access to the interrupt register 29 in the interrupt reception processing by the PU 21, and for this guarantee, the access control storage unit 32 on the common memory 20 stores the interrupt register 29 of each CPU 21. In order to individually manage the access right, it is configured to have semaphore flags for the number of interrupt registers 29,
This controls the access right.

【0018】図7は上記アクセス権の制御を示すフロー
チャートである。割込みを要求するCPUは、共通メモ
リ20上の割込みレジスタ用アクセス制御格納部32に
アクセスし、相手方のCPUの割込みレジスタ29に対
応するセマフォフラグが“0”であるか否かを判定し、
これが“1”のときは他のCPUがアクセス権を獲得し
ているので、他のCPUのアクセス権の解放を待つ(ス
テップ#1)。これが“0”のときは前記対応するセマ
フォフラグに“1”を書込んでアクセス権を獲得し、こ
れを他のCPUに知らせる(ステップ#2)。そして対
応する割込みレジスタ29への一連の処理を行い(ステ
ップ#3)、その後直ちに前記セマフォフラグを“0”
にし、アクセス権を解放する(ステップ#4)。
FIG. 7 is a flowchart showing the control of the access right. The CPU requesting the interrupt accesses the interrupt register access control storage unit 32 on the common memory 20, determines whether the semaphore flag corresponding to the interrupt register 29 of the other CPU is “0”,
When this is "1", the other CPU has acquired the access right, and therefore waits for the release of the access right of the other CPU (step # 1). When it is "0", "1" is written in the corresponding semaphore flag to acquire the access right, and this is notified to the other CPU (step # 2). Then, a series of processing to the corresponding interrupt register 29 is performed (step # 3), and immediately thereafter, the semaphore flag is set to "0".
To release the access right (step # 4).

【0019】図8は、i番目のCPU(CPU−i)か
らj番目のCPU(CPU−j)への割込みを行なう際
のフローチャートを示している。割込みを要求するCP
U−iは、先ず相手側のCPU−jの割込みレジスタ2
9に対応するセマフォフラグに対し、アクセス権制御の
フローに従ってアクセス権を獲得する(ステップ#1
1、#12)。次いでCPU−iがCPU−jのローカ
ルエリアにある割込みレジスタ29にアクセスし、その
内容を読出し、次いで自らのCPU−i用の割込みフラ
グのみを“1”に変更する(ステップ#13、#1
4)。その情報をもとに割込み要求部31がCPU−j
に対して割込み制御部23を介して割込み要求を行なう
(図5参照、ステップ#16)。同時にCPU−iは前
記セマフォフラグを“0”にし、前記割込みレジスタ2
9へのアクセス権の解放を行う(ステップ#15)。
FIG. 8 shows a flow chart when the interrupt from the i-th CPU (CPU-i) to the j-th CPU (CPU-j) is performed. CP requesting an interrupt
U-i is the interrupt register 2 of the CPU-j on the other side.
The access right is acquired for the semaphore flag corresponding to 9 according to the access right control flow (step # 1).
1, # 12). Next, the CPU-i accesses the interrupt register 29 in the local area of the CPU-j, reads the contents, and then changes only its own interrupt flag for the CPU-i to "1" (steps # 13, # 1).
4). Based on this information, the interrupt request unit 31 determines that the CPU-j
An interrupt request is issued via the interrupt controller 23 (see FIG. 5, step # 16). At the same time, the CPU-i sets the semaphore flag to "0", and the interrupt register 2
The access right to 9 is released (step # 15).

【0020】割込みを要求された側のCPU−jは、割
込み要求を認識し、現行処理の中断処理を行い(ステッ
プ#17、#18)、次いで共通メモリ20内にあるC
PU−jの割込みレジスタ用のセマフォフラグに対して
アクセス権制御のフロー(図7参照)に従ってアクセス
権を獲得する(ステップ#19、#20)。そして前記
割込みレジスタ29を読出すことにより、割込みを要求
してきたCPU−iを認識する(ステップ#21、#2
2)。さらに割込みを要求してきたCPU−iに対応す
る割込みフラグのみを“0”に変更して割込み要因を初
期化する(ステップ#23、#24)。最後にCPU−
jの割込みレジスタ用セマフォフラグを“0”として、
割込みレジスタのアクセス権の解放を行い、その割込み
に対応した処理を実行した後、割込み処理からの復帰処
理を行なう(ステップ#25、#26、#27)。
The CPU-j on the side requested to interrupt recognizes the interrupt request, interrupts the current process (steps # 17, # 18), and then C in the common memory 20.
The access right is acquired in accordance with the access right control flow (see FIG. 7) for the semaphore flag for the interrupt register of PU-j (steps # 19, # 20). Then, by reading the interrupt register 29, the CPU-i requesting the interrupt is recognized (steps # 21 and # 2).
2). Further, only the interrupt flag corresponding to the CPU-i which has requested the interrupt is changed to "0" to initialize the interrupt factor (steps # 23, # 24). Finally CPU-
Set the interrupt register semaphore flag of j to "0",
The access right of the interrupt register is released, the process corresponding to the interrupt is executed, and then the process of returning from the interrupt process is executed (steps # 25, # 26, # 27).

【0021】なお、図7、図8において、aで示す処理
は分断を禁止するアクセスであり、これをハードウェア
的に保証する必要がある。このための1方法として、T
AS(テストアンドセット)命令を持つことにより分断
禁止を保証する方法がある。
In FIG. 7 and FIG. 8, the processing indicated by a is access that prohibits division, and it is necessary to guarantee this in terms of hardware. As one method for this, T
There is a method of guaranteeing division prohibition by having an AS (test and set) instruction.

【0022】又bで示す処理は、図7のアクセス権制御
フローを示している。
The process indicated by b shows the access right control flow of FIG.

【0023】[0023]

【発明が解決しようとする課題】図5に示す従来例は、
上記のように他のCPUによる割込み発生処理、自らの
CPUによる割込み受信処理に関する一連のアクセスを
保証するために、共通メモリ上にアクセス制御格納部を
設け、このアクセス制御格納部を各CPUのローカルの
割込みレジスタに個別に対応したセマフォフラグで構成
し、前記アクセス権制御フローを行なう必要があった。
そしてこのアクセス権制御フローは、複雑であると共に
処理時間が長くなるという問題があった。
The conventional example shown in FIG.
As described above, in order to guarantee a series of accesses relating to interrupt generation processing by another CPU and interrupt reception processing by its own CPU, an access control storage unit is provided on the common memory, and this access control storage unit is local to each CPU. It was necessary to configure the interrupt register of semaphore flag individually and perform the access right control flow.
The access right control flow is complicated and the processing time is long.

【0024】又CPUの数をM個とし、割込みレベルを
N段階とすると、前記セマフォフラグの数は(M×N)
個となり、その数は極端に増大して、アクセス権の管理
が複雑になってしまうという問題もあった。
If the number of CPUs is M and the interrupt level is N stages, the number of semaphore flags is (M × N).
There is also a problem that the number of individuals becomes extremely large, and the management of access rights becomes complicated.

【0025】なお、図5に示す割込みレジスタ用アクセ
ス制御格納部32を省略し、図8にbで示すアクセス権
制御フローを省略すると、次のような不都合が生じる。
If the interrupt register access control storage unit 32 shown in FIG. 5 is omitted and the access right control flow shown in FIG. 8B is omitted, the following inconvenience occurs.

【0026】図9は、このような場合においてCPU−
2が割込み要求を発生させたときの、受信側CPUに付
設されたCPU間割込み制御装置における割込みレジス
タ内の割込みフラグの遷移を表わしている。図9に示す
場合は、P、Qで示す期間、他のCPUによるアクセス
の禁止が保証されてCPU−2のみの割込み要求が発生
した場合であるので、正常な処理が行なわれている。し
かし前記P、Qをハードウェア的に保証することは困難
であり、これが保証されない場合は複数のCPUの割込
み要求が混在して、図10及び図11に示すように正常
な処理が行なわれない事態を招く。
FIG. 9 shows the CPU-
2 shows the transition of the interrupt flag in the interrupt register in the inter-CPU interrupt control device attached to the receiving CPU when the interrupt request is generated. In the case shown in FIG. 9, since the prohibition of access by the other CPUs is guaranteed and the interrupt request of only the CPU-2 occurs during the period shown by P and Q, normal processing is performed. However, it is difficult to guarantee P and Q by hardware, and if this is not guaranteed, interrupt requests from a plurality of CPUs are mixed and normal processing is not performed as shown in FIGS. 10 and 11. Cause a situation.

【0027】図10は、CPU−2とCPU−Mとが同
一の割込みレジスタに対して割込みを要求した場合を示
す。この場合図9に示すPの禁止期間が保証されず、C
PU−2及び、これに続いてCPU−Mが割込みレジス
タを読出し、その後にCPU−2の書込みによりCPU
−2用フラグが“1”となった後に、CPU−Mの書込
みによりCPU−2用フラグが“0”となり、CPU−
M用フラグが“1”となる(表2参照)ことになり、C
PU−2の割込み要求が消滅してしまうという不都合が
生ずる。
FIG. 10 shows a case where the CPU-2 and the CPU-M request an interrupt to the same interrupt register. In this case, the prohibited period of P shown in FIG.
The PU-2 and, subsequently, the CPU-M read the interrupt register, and then write to the CPU-2 to
-2 flag becomes "1", then CPU-M write causes the CPU-2 flag to become "0",
The M flag becomes "1" (see Table 2), and C
The inconvenience that the interrupt request of PU-2 disappears occurs.

【0028】図11は、受信CPUがCPU−2からの
割込みを認識している間にCPU−Mから割込み要求が
発生した場合を示す。この場合は図9に示すQの禁止期
間が保証されず、受信CPU及び、これに続いてCPU
−Mが割込みレジスタを読出し、その後に受信CPUの
書込みによりCPU−2用フラグを“0”に変更して割
込み要因を初期化するが、次いでCPU−Mの書込みに
よりCPU−2用フラグ及びCPU−M用フラグが
“1”となる(表2参照)結果、CPU−2用フラグが
“1”に復帰し、二重に割込みが発生するという不都合
が生ずる。
FIG. 11 shows a case where an interrupt request is issued from CPU-M while the receiving CPU recognizes the interrupt from CPU-2. In this case, the prohibited period of Q shown in FIG. 9 is not guaranteed, and the receiving CPU and the CPU subsequent to this are not guaranteed.
-M reads the interrupt register and then writes the receiving CPU to change the CPU-2 flag to "0" to initialize the interrupt factor. Then, write CPU-M to the CPU-2 flag and CPU. As a result of the -M flag being set to "1" (see Table 2), the CPU-2 flag is returned to "1", resulting in a double interrupt.

【0029】本発明は上記従来例の問題点を解消すると
共に、複数の割込みレベルまで対応が可能となるCPU
間割込み制御装置を提供することを目的とする。
The present invention solves the above-mentioned problems of the conventional example and enables a CPU up to a plurality of interrupt levels.
An object is to provide an inter-interruption control device.

【0030】[0030]

【課題を解決するための手段】本発明は上記目的を達成
するため、機器内で複数のCPUを有し、割込みをかけ
るCPUが割込みを受けるCPUのローカルバスのバス
占有権を獲得して割込みを行うシステムにおける各CP
Uに付設されたCPU間割込み制御装置において、割込
みを受けるCPU側の各割込みレベルが同一で各CPU
からの割込みフラグを持つ割込み格納部と、前記割込み
格納部の情報と書込み情報とをもとに格納情報を作成す
る割込み格納情報作成部とから構成された割込みレジス
タを、割込みレベルの夫々に対応するようにその対応数
だけ備え、前記割込みレジスタの割込み格納部の情報を
もとにCPUに対して割込みの要求をレベル別に要求す
る割込み要求部を備え、前記複数の割込みレジスタの中
から1つを選択してアクセス可能な状態とするアドレス
デコーダを備え、前記割込みレジスタを、割込みレベル
毎にアクセスし、割込み格納部の情報により前記割込み
格納部への書込み動作を管理するように構成したことを
特徴とする。
In order to achieve the above object, the present invention has a plurality of CPUs in a device, and the interrupting CPU acquires the bus exclusive right of the local bus of the CPU that receives the interrupt and interrupts. CP in the system
In the inter-CPU interrupt control device attached to U, each interrupt level on the side of the CPU receiving the interrupt is the same
An interrupt register composed of an interrupt storage unit having an interrupt flag from, and an interrupt storage information creation unit that creates storage information based on the information in the interrupt storage unit and write information corresponds to each interrupt level. As many as the corresponding number, and an interrupt request unit for requesting an interrupt request to the CPU for each level based on the information in the interrupt storage unit of the interrupt register. Is configured to access the interrupt register for each interrupt level and manage the write operation to the interrupt storage unit according to the information of the interrupt storage unit. Characterize.

【0031】[0031]

【作用】本発明によれば、割込みレベル毎の割込みレジ
スタに割込み格納部及び割込み格納情報作成部を持って
いるため、前記割込み格納情報作成部の特徴を生かすこ
とにより、割込みレジスタへのアクセス権の制御は不要
になり、図5に示す従来例のように共通メモリ上にアク
セス制御格納部を配置する必要がなくなる。
According to the present invention, since the interrupt register for each interrupt level has the interrupt storing section and the interrupt storing information creating section, the access right to the interrupt register can be obtained by utilizing the characteristics of the interrupt storing information creating section. Control becomes unnecessary, and it becomes unnecessary to dispose the access control storage unit on the common memory as in the conventional example shown in FIG.

【0032】[0032]

【実施例】図4及び図12〜図17に基き本発明の実施
例を説明する。
EXAMPLE An example of the present invention will be described with reference to FIGS. 4 and 12 to 17.

【0033】本実施例も上記従来例と同様、割込みをか
けるCPU(送信CPU)が割込み先のCPU(受信C
PU)のローカルバスのバス占有権を獲得し割込み情報
を格納することでCPU間の割込みを行うように構成さ
れている。その基本的システムは図4に示されている
が、上記従来例では共通メモリ20上にセマフォフラグ
で構成されたアクセス制御格納部を設け、図8にbで示
すアクセス権制御フローを有しているのに対し、本実施
例ではそれらを設けず、各ローカルエリアに配したCP
U間割込み制御装置25にアクセス権制御機能をもたせ
た点に特徴を有している。
In this embodiment as well, similar to the above-mentioned conventional example, the CPU (transmission CPU) that issues an interrupt is the CPU (reception C) that is the interruption destination.
It is configured to perform an interrupt between CPUs by acquiring the bus occupation right of the local bus (PU) and storing the interrupt information. The basic system is shown in FIG. 4, but in the above-mentioned conventional example, an access control storage unit constituted by a semaphore flag is provided on the common memory 20, and the access right control flow shown in FIG. 8 is provided. On the other hand, in the present embodiment, the CPs provided in each local area without providing them
The U-interrupt controller 25 is characterized in that it has an access right control function.

【0034】図4に示すシステムの基本的構成は、上記
従来例について説明したものと同様であるので、その説
明を省略する。
The basic configuration of the system shown in FIG. 4 is the same as that explained in the above-mentioned conventional example, and therefore its explanation is omitted.

【0035】CPU間割込み制御装置25は、図12に
示すように、複数の割込みレジスタ33、割込み要求部
36及びアドレスデコーダ37を備えている。
As shown in FIG. 12, the inter-CPU interrupt controller 25 comprises a plurality of interrupt registers 33, an interrupt request unit 36 and an address decoder 37.

【0036】割込みレジスタ33は、受信CPU側の割
込みレベルが同一で各送信CPUからのフラグをもつ割
込み格納部35と、前記割込み格納部35の情報と書込
み情報とをもとに格納情報を作成する割込み格納情報作
成部34とにより構成されている。そして、CPU間割
込み制御装置25は、図12及び表4に示すように、割
込みレベル1用割込みレジスタ、割込みレベル2用割込
みレジスタ・・・・・・、割込みレベルN用割込みレジ
スタからなる割込みレジスタ群、すなわち割込みレベル
毎に対応するように設けられた割込みレジスタ群を備え
ている。
The interrupt register 33 creates stored information based on the information in the interrupt storage unit 35 and the interrupt storage unit 35 having the same interrupt level on the receiving CPU side and the flag from each transmitting CPU. And the interrupt storage information creation unit 34. Then, the inter-CPU interrupt controller 25, as shown in FIG. 12 and Table 4, is an interrupt register including an interrupt register for interrupt level 1, an interrupt register for interrupt level 2, ..., An interrupt register for interrupt level N. A group, that is, an interrupt register group provided so as to correspond to each interrupt level.

【0037】[0037]

【表4】 [Table 4]

【0038】割込み要求部36は、前記割込み格納部3
5の情報をもとに、当該CPU21に対し割込みの要求
を、レベル別に要求する機能を有している。
The interrupt request unit 36 is the interrupt storage unit 3
It has a function of requesting an interrupt request to the CPU 21 for each level based on the information of 5.

【0039】アドレスデコーダ38は、前記複数の割込
みレジスタ33の内から1つを選択してアクセス可能の
状態とする機能を有している。
The address decoder 38 has a function of selecting one of the plurality of interrupt registers 33 to make it accessible.

【0040】表5は前記割込み格納部35内の割込みフ
ラグの状態遷移を示している。この表に示すように、ア
クセス後のフラグ情報は、アクセス前フラグ情報と書込
みフラグ情報との排他的論理和となる。
Table 5 shows the state transition of the interrupt flag in the interrupt storage unit 35. As shown in this table, the flag information after access is the exclusive OR of the pre-access flag information and the write flag information.

【0041】[0041]

【表5】 [Table 5]

【0042】すなわち、割込みフラグへの“0”の書込
みは内部情報を変化させず、“1”の書込みは内部情報
を反転させる。そして“1”の書込みを、割込みを発生
させるフラグ、又は初期化するフラグに対してのみ行
い、他のフラグには“0”を書込むことにより、その内
部情報の保持を行うようにすることができる。
That is, writing "0" to the interrupt flag does not change the internal information, and writing "1" inverts the internal information. Then, write "1" only to a flag that generates an interrupt or a flag that initializes, and write "0" to other flags to retain the internal information. You can

【0043】送信CPU21は割込みを発生させるため
のフラグを事前に知っているため、そのフラグのみ
“1”にして割込みレジスタ33に書込むことにより、
他のフラグの情報を保持することができる。又受信CP
U21は、割込まれた割込みレベルの割込みレジスタ3
3を読出すことにより、送信CPU21がどのCPU2
1であるか認識でき、前記割込みレジスタ33に対し、
初期化を必要とするフラグのみ“1”にして書込むこと
により、他のCPU用フラグの情報を保持できる。
Since the transmitting CPU 21 knows the flag for generating an interrupt in advance, by setting only that flag to "1" and writing it in the interrupt register 33,
Information on other flags can be held. Also received CP
U21 is the interrupt register 3 of the interrupt level interrupted
By reading out 3, the sending CPU 21 determines which CPU 2
It is possible to recognize whether it is 1, and to the interrupt register 33,
By writing only the flags that require initialization to "1" and writing, the information of other CPU flags can be held.

【0044】図13は送信CPU21から割込みレジス
タ33にアクセスするためのフローチャートを示す。図
14は受信CPUが割込みレジスタ33にアクセスする
ためのフローチャートを示す。これらの説明は後に図1
7に基いて具体的に行なう。
FIG. 13 shows a flowchart for accessing the interrupt register 33 from the transmission CPU 21. FIG. 14 shows a flowchart for the receiving CPU to access the interrupt register 33. These explanations will be given later in FIG.
Concretely based on 7.

【0045】図15、図16は本実施例の構成をより具
体的に示したものである。対応する割込みレベル別に分
けられた各割込みレジスタ33は、CPU−1フラグ用
〜CPU−Mフラグ用の計Mビットで、データバスに接
続されている。割込み格納情報部34は、入力としてデ
ータバスと割込み格納部35の出力があり、排他的論理
和で構成され、割込み格納部35に接続されている。割
込み格納部35は、バッファを介してデータバスと接続
され、読出しができる。
FIG. 15 and FIG. 16 more specifically show the configuration of this embodiment. Each interrupt register 33 divided according to the corresponding interrupt level has a total of M bits for the CPU-1 flag to the CPU-M flag and is connected to the data bus. The interrupt storage information unit 34 has a data bus as an input and an output of the interrupt storage unit 35, is configured by exclusive OR, and is connected to the interrupt storage unit 35. The interrupt storage unit 35 is connected to the data bus via the buffer and can be read.

【0046】割込み要求部36は、割込み格納部35の
出力を割込みレベル毎に論理和をとった構成であり、C
PU21に対し割込み要求レベル別に割込み要求を発生
する。すなわち割込み要求部37は、割込み要求信号レ
ベル1、割込み要求信号レベル2、・・・・・・、割込
み要求信号レベルNのいずれかを割込み制御部23(図
4)に送信する。アドレスデコーダ37は、接続された
アドレスバスからのアドレス信号に基き、各割込みレジ
スタ33からその1つを選択する。
The interrupt request unit 36 has a configuration in which the output of the interrupt storage unit 35 is logically ORed for each interrupt level.
An interrupt request is issued to the PU 21 for each interrupt request level. That is, the interrupt request unit 37 transmits one of the interrupt request signal level 1, the interrupt request signal level 2, ..., And the interrupt request signal level N to the interrupt control unit 23 (FIG. 4). The address decoder 37 selects one of the interrupt registers 33 based on the address signal from the connected address bus.

【0047】次に図17に基き、CPU−iからCPU
−jへの割込みレベルkの割込み動作を説明する。
Next, based on FIG. 17, CPU-i to CPU
The interrupt operation of interrupt level k to -j will be described.

【0048】先ずCPU−iは、受信CPUであるCP
U−jのローカルバスのバス占有権を、バス制御部18
(図4)を介して獲得する。次いでCPU−iはCPU
−jに付設されたCPU間割込み制御装置25の割込み
レベルk用割込みレジスタ33のCPU−i用フラグが
“1”か“0”かを判定し、“1”である場合は待機す
る(ステップ#31)。“0”である場合には前記フラ
グに対応するビットのみを“1”にして前記割込みレジ
スタ33に書込み、これに基いて割込み格納情報作成部
34は、CPU−i用フラグのみ“1”に反転させ、割
込み格納部35に格納する(ステップ#32)。割込み
格納部35は、CPU−i用割込み情報を割込み要求部
36に伝達し、割込み要求部36がCPU−jに割込み
レベルkの割込み処理を要求する(ステップ#33)。
CPU−jは、割込みレベルkの割込み要求を認識し
(ステップ#34)、現行処理を中断する(ステップ#
35)。
First, the CPU-i is a CP which is a receiving CPU.
The bus control right of the U-j local bus is given to the bus control unit 18
(Via Figure 4). Then CPU-i is CPU
It is determined whether the CPU-i flag of the interrupt register 33 for the interrupt level k of the inter-CPU interrupt controller 25 attached to -j is "1" or "0", and if it is "1", the process waits (step). # 31). If it is "0", only the bit corresponding to the flag is set to "1" and written in the interrupt register 33. Based on this, the interrupt storage information creation unit 34 sets only the CPU-i flag to "1". It is inverted and stored in the interrupt storage unit 35 (step # 32). The interrupt storing unit 35 transmits the CPU-i interrupt information to the interrupt requesting unit 36, and the interrupt requesting unit 36 requests the CPU-j to perform interrupt processing at the interrupt level k (step # 33).
The CPU-j recognizes the interrupt request of the interrupt level k (step # 34) and interrupts the current process (step # 34).
35).

【0049】次いでCPU−jは、割込みレベルkの割
込みレジスタ33を読出し(ステップ#36)、CPU
−i用フラグが“1”であることを認識し、CPU−i
からの割込みと認識する(ステップ#37)。そして前
記割込みレジスタ33にCPU−i用フラグに対応する
ビットのみを“1”にして書込む(ステップ#38)。
前記割込み格納情報作成部34はCPU−i用フラグの
みを“0”に反転させ、割込み格納部35に格納する。
これによりCPU−i用フラグは初期化される(ステッ
プ#39)。その後、CPU−jは、CPU−iからの
割込みレベルkの割込み処理を実行し、次いで割込み処
理からの復帰処理を実行する(ステップ#40、#4
1)。 上記に説明したCPU間割込み制御装置25
は、各割込みレベル毎の割込みレジスタ33内に割込み
格納情報作成部34を持ち、その特徴をいかすことによ
り、図5に示す従来例のように共通メモリ上に、アクセ
ス制御格納部を配置する必要がなくなる。
Next, the CPU-j reads the interrupt register 33 of the interrupt level k (step # 36), and the CPU
Recognizing that the flag for -i is "1", CPU-i
It is recognized as an interrupt from (step # 37). Then, only the bit corresponding to the CPU-i flag is set to "1" and written in the interrupt register 33 (step # 38).
The interrupt storage information creation unit 34 inverts only the CPU-i flag to "0" and stores it in the interrupt storage unit 35.
As a result, the CPU-i flag is initialized (step # 39). After that, the CPU-j executes the interrupt processing of the interrupt level k from the CPU-i, and then executes the return processing from the interrupt processing (steps # 40, # 4).
1). Inter-CPU interrupt control device 25 described above
Has an interrupt storage information creation unit 34 in the interrupt register 33 for each interrupt level, and it is necessary to arrange the access control storage unit on the common memory as in the conventional example shown in FIG. Disappears.

【0050】上記に本実施例のCPU間割込み制御装置
についての基本的構成、作用を説明したが、更に図17
にI、IIで示す処理フローを実行することにより、割込
みに付随した多数の情報を受渡す処理を円滑に行なうこ
とができる。すなわち、共通メモリ20(図4)上に割
込みCPU別に情報格納部を設け、各割込みレジスタ3
3内の割込みフラグを利用して情報の格納、情報の読出
し処理を実行することができる。図17のIで示す処理
フローは、CPU−i、レベルkのときの情報を共通メ
モリ20上に格納する処理(ステップ#51)を示し、
図17のIIで示す処理フローは、Iで示す処理で書込ま
れた情報を共通メモリ20から読出す処理(ステップ#
52)であるが、これらにおいて共通メモリ20上の情
報格納部に対するアクセス権は、前記割込みレジスタ3
3内の割込みフラグにより保証される。このように、上
記CPU間割込み制御装置は割込みによるCPU間の情
報の受渡しの展開性に富んでいる。
The basic structure and operation of the inter-CPU interrupt control device of this embodiment have been described above.
By executing the process flow indicated by I and II, it is possible to smoothly perform the process of delivering a large amount of information associated with the interrupt. That is, an information storage unit is provided for each interrupt CPU on the common memory 20 (FIG. 4), and each interrupt register 3
Information can be stored and information can be read out by using the interrupt flag in 3. The process flow indicated by I in FIG. 17 shows a process (step # 51) of storing information at the time of CPU-i and level k in the common memory 20,
The process flow indicated by II in FIG. 17 is a process of reading the information written in the process indicated by I from the common memory 20 (step #
52), the access right to the information storage section on the common memory 20 in these is the interrupt register 3
Guaranteed by the interrupt flag in 3. As described above, the inter-CPU interrupt control device is highly expandable in the transfer of information between CPUs by an interrupt.

【0051】[0051]

【発明の効果】本発明によれば、従来例には必要であっ
た共通メモリ上のアクセス制御格納部、及びこのアクセ
ス制御格納部を使用したアクセス権制御フローが不要と
なるので、CPU間割込みの処理時間を短縮でき、構造
を簡単にすることができるにもかかわらず、複数CPU
間の複数レベルでの割込みを可能とすることができるC
PU間割込み制御装置を提供することができる。
According to the present invention, the access control storage unit on the common memory and the access right control flow using this access control storage unit, which were required in the conventional example, are not required, so that an interrupt between CPUs is not required. Although the processing time can be shortened and the structure can be simplified, multiple CPUs can be used.
C capable of enabling interrupts at multiple levels between
An inter-PU interrupt controller can be provided.

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

【図1】第1の従来例を示す構成図。FIG. 1 is a configuration diagram showing a first conventional example.

【図2】第1の従来例のCPU間割込み制御装置を示す
構成図。
FIG. 2 is a configuration diagram showing a first conventional CPU interrupt control device.

【図3】第1の従来例の問題点を示す説明図。FIG. 3 is an explanatory diagram showing a problem of the first conventional example.

【図4】本発明及び第2の従来例で使用されるシステム
を示す構成図。
FIG. 4 is a configuration diagram showing a system used in the present invention and a second conventional example.

【図5】第2の従来例におけるCPU間割込み制御装置
とアクセス制御格納部とを示す構成図。
FIG. 5 is a configuration diagram showing an inter-CPU interrupt control device and an access control storage unit in a second conventional example.

【図6】第2の従来例における割込みレジスタと割込み
要求部とを示す回路構成図。
FIG. 6 is a circuit configuration diagram showing an interrupt register and an interrupt request unit in a second conventional example.

【図7】第2の従来例におけるアクセス権制御の動作を
示すフローチャート。
FIG. 7 is a flowchart showing an operation of access right control in the second conventional example.

【図8】第2の従来例におけるCPU間割込み制御装置
の動作を示すフローチャート。
FIG. 8 is a flowchart showing the operation of the inter-CPU interrupt control device in the second conventional example.

【図9】第2の従来例における割込みレジスタ内の割込
み格納部におけるフラグ遷移を示す説明図。
FIG. 9 is an explanatory diagram showing flag transitions in the interrupt storage unit in the interrupt register in the second conventional example.

【図10】第2の従来例においてアクセス権の制御フロ
ーが無い場合に生ずる問題点を示す説明図。
FIG. 10 is an explanatory diagram showing a problem that occurs when there is no access right control flow in the second conventional example.

【図11】第2の従来例においてアクセス権の制御フロ
ーが無い場合に生ずる問題点を示す説明図。
FIG. 11 is an explanatory diagram showing a problem that occurs when there is no access right control flow in the second conventional example.

【図12】本発明の実施例におけるCPU間割込み制御
装置の内部構成図。
FIG. 12 is an internal configuration diagram of an inter-CPU interrupt control device according to an embodiment of the present invention.

【図13】本発明の実施例における送信CPUから割込
みレジスタをアクセスする際の動作を説明するフローチ
ャート。
FIG. 13 is a flowchart illustrating an operation when accessing the interrupt register from the transmission CPU according to the embodiment of the present invention.

【図14】本発明の実施例における受信CPUから割込
みレジスタをアクセスする際の動作を説明するフローチ
ャート。
FIG. 14 is a flowchart illustrating an operation when accessing the interrupt register from the receiving CPU according to the embodiment of the present invention.

【図15】本発明の実施例におけるCPU間割込み制御
装置を示す構成図。
FIG. 15 is a configuration diagram showing an inter-CPU interrupt control device in an embodiment of the present invention.

【図16】本発明の実施例における割込みレジスタ及び
割込み要求部を示す回路構成図。
FIG. 16 is a circuit configuration diagram showing an interrupt register and an interrupt request unit in the embodiment of the present invention.

【図17】本発明の実施例におけるCPU間割込み制御
装置の動作を説明するフローチャート。
FIG. 17 is a flowchart illustrating the operation of the inter-CPU interrupt control device according to the embodiment of the present invention.

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

21 CPU 33 割込みレジスタ 34 割込み格納情報作成部 35 割込み格納部 36 割込み要求部 37 アドレスデコーダ 21 CPU 33 Interrupt Register 34 Interrupt Storage Information Creation Unit 35 Interrupt Storage Unit 36 Interrupt Request Unit 37 Address Decoder

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 機器内で複数のCPUを有し、割込みを
かけるCPUが割込みを受けるCPUのローカルバスの
バス占有権を獲得して割込みを行うシステムにおける各
CPUに付設されたCPU間割込み制御装置において、 割込みを受けるCPU側の各割込みレベルが同一で各C
PUからの割込みフラグを持つ割込み格納部と、前記割
込み格納部の情報と書込み情報とをもとに格納情報を作
成する割込み格納情報作成部とから構成された割込みレ
ジスタを、割込みレベルの夫々に対応するようにその対
応数だけ備え、 前記割込みレジスタの割込み格納部の情報をもとにCP
Uに対して割込みの要求をレベル別に要求する割込み要
求部を備え、 前記複数の割込みレジスタの中から1つを選択してアク
セス可能な状態とするアドレスデコーダを備え、 前記割込みレジスタを、割込みレベル毎にアクセスし、
割込み格納部の情報により前記割込み格納部への書込み
動作を管理するように構成したことを特徴とするCPU
間割込み制御装置。
1. An inter-CPU interrupt control attached to each CPU in a system having a plurality of CPUs in a device, and a CPU issuing an interrupt acquires a bus occupation right of a local bus of the CPU receiving the interrupt and makes an interrupt. In the device, each interrupt level on the CPU side that receives an interrupt is the same, and each C
An interrupt register composed of an interrupt storage unit having an interrupt flag from the PU and an interrupt storage information creation unit that creates storage information based on the information in the interrupt storage unit and write information is provided for each interrupt level. The corresponding number is provided so as to correspond to the CP, based on the information in the interrupt storage section of the interrupt register.
An interrupt request unit for requesting an interrupt to U by level is provided, and an address decoder for selecting one of the plurality of interrupt registers to make it accessible is provided. Access each time,
CPU configured to manage write operation to the interrupt storage unit based on information in the interrupt storage unit
Interrupt control device.
JP21779191A 1991-08-29 1991-08-29 Inter-cpu interruption controller Pending JPH0554002A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21779191A JPH0554002A (en) 1991-08-29 1991-08-29 Inter-cpu interruption controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21779191A JPH0554002A (en) 1991-08-29 1991-08-29 Inter-cpu interruption controller

Publications (1)

Publication Number Publication Date
JPH0554002A true JPH0554002A (en) 1993-03-05

Family

ID=16709787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21779191A Pending JPH0554002A (en) 1991-08-29 1991-08-29 Inter-cpu interruption controller

Country Status (1)

Country Link
JP (1) JPH0554002A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8438112B2 (en) 2005-01-13 2013-05-07 Samsung Electronics Co., Ltd. Host device, portable storage device, and method for updating meta information regarding right objects stored in portable storage device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8438112B2 (en) 2005-01-13 2013-05-07 Samsung Electronics Co., Ltd. Host device, portable storage device, and method for updating meta information regarding right objects stored in portable storage device

Similar Documents

Publication Publication Date Title
JPH04246745A (en) Memory access system
JP2591502B2 (en) Information processing system and its bus arbitration system
US6567908B1 (en) Method of and apparatus for processing information, and providing medium
JPS6119062B2 (en)
JPH0798663A (en) Asynchronous i/o control system
JPH0554002A (en) Inter-cpu interruption controller
EP0587370A1 (en) Method and apparatus for software sharing between multiple controllers
JP3049125B2 (en) CPU interrupt controller
JPH0581209A (en) Inter-cpu interruption control device
JPH11232213A (en) Data transfer system for input/output device
JPH0553999A (en) Inter-cpu interruption controller
JPH0544238B2 (en)
JPH0581208A (en) Inter-cpu interruption control device
JPH0554000A (en) Inter-cpu interruption controller
JPH0844661A (en) Information processor
JP2731768B2 (en) Memory controller
JPH0844662A (en) Information processor
JPH11184761A (en) Read modify write control system
JP2007241922A (en) Arbitration method for use of shared resource, and arbitration device therefor
JPH0754544B2 (en) Image memory access circuit
US20190243782A1 (en) Apparatus and method for interfacing with common memory
JP2001273191A (en) Computer system
JP2752834B2 (en) Data transfer device
JP2591785B2 (en) Computer equipment
JPS63259746A (en) Inter-bank-memory data transmission system