JPH09282297A - Inter-cpu communication system using dual port memory - Google Patents

Inter-cpu communication system using dual port memory

Info

Publication number
JPH09282297A
JPH09282297A JP9145696A JP9145696A JPH09282297A JP H09282297 A JPH09282297 A JP H09282297A JP 9145696 A JP9145696 A JP 9145696A JP 9145696 A JP9145696 A JP 9145696A JP H09282297 A JPH09282297 A JP H09282297A
Authority
JP
Japan
Prior art keywords
sub
main cpu
cpu
information
data area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9145696A
Other languages
Japanese (ja)
Inventor
Kenichi Shiozawa
憲一 塩沢
Toshiyuki Hirata
敏之 平田
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.)
NEC Corp
NEC Telecom System Ltd
Original Assignee
NEC Corp
NEC Telecom System 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 NEC Corp, NEC Telecom System Ltd filed Critical NEC Corp
Priority to JP9145696A priority Critical patent/JPH09282297A/en
Publication of JPH09282297A publication Critical patent/JPH09282297A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the information transmission efficiency by improving dual port memory(DPRAM) utilization efficiency in the inter-CPU communication of 1:N composed of a main CPU and plural sub CPUs. SOLUTION: At the time of performing the inter-CPU communication using one DPRAM 5 between the main CPU 1 and the plural sub CPUs 2-4, the memory map of the DPRAM is divided into a status area 10 to the sub CPUs composed of areas 14-16 corresponding to the respective sub CPUs, the status area 11 to the main CPU composed of the areas 17-19 similarly and two data areas 12 and 13. By writing control information from the main CPU to the respective sub CPUs in the corresponding areas 14-16, writing the control information from the respective sub CPUs to the main CPU in the corresponding areas 17-19 and informing each other, the main CPU and the plural sub CPUs access both of the bisected data areas 12 and 13 inside the DPRAM.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、デュアルポートメ
モリを用いたCPU間通信システムに関し、特にマルチ
プロセッサシステムを構成する1つのメインCPUと複
数のサブCPUとの間でデュアルポートメモリを介して
情報伝送を行うCPU間通信システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a communication system between CPUs using a dual port memory, and particularly to information between one main CPU and a plurality of sub CPUs constituting a multiprocessor system via the dual port memory. The present invention relates to a communication system between CPUs that performs transmission.

【0002】[0002]

【従来の技術】従来のこの種のCPU間通信システム
は、メインCPUと複数(N個)のサブCPUとの通信
を1つのデュアルポートメモリ(通常、デュアルポート
RAM(Random Access Memory)
以下、DPRAMと略記)により実現する場合、図6に
示すようにDPRAMの内部をN個(例えば3個)に分
割し、それぞれの領域をi(i=1〜N)番目のサブC
PU個別に割り当てることにより、メインCPUと個々
のサブCPU間の情報伝送を行っていた。
2. Description of the Related Art In a conventional communication system between CPUs of this type, communication between a main CPU and a plurality (N) of sub CPUs is performed by one dual port memory (usually a dual port RAM (Random Access Memory)).
When implemented by DPRAM (hereinafter abbreviated), the inside of the DPRAM is divided into N (for example, 3) as shown in FIG. 6, and each region is divided into i (i = 1 to N) th sub-C.
Information is transmitted between the main CPU and each sub CPU by allocating each PU individually.

【0003】[0003]

【発明が解決しようとする課題】この従来のCPU間通
信システムでは、1:NのCPU間通信を行う場合、D
PRAM上にN分割された領域が必要となるが、サブC
PUの数が増加するに従い、限られたDPRAM領域の
分割数は増大し、個々のサブCPUに割り当てられる領
域量が減少する。さらに、メインCPUとある特定のサ
ブCPUとの間でのみ大量の情報をやりとりするような
場合には、その間他のN−1個の領域は、バス調停によ
り他のサブCPUがアクセス不可能である為使用される
ことはなく、DPRAM利用効率の面で問題が生じる。
In this conventional inter-CPU communication system, when performing 1: N inter-CPU communication, D
An area divided into N is required on the PRAM.
As the number of PUs increases, the number of divisions of the limited DPRAM area increases, and the area amount assigned to each sub CPU decreases. Further, when a large amount of information is exchanged only between the main CPU and a specific sub CPU, the other N-1 areas cannot be accessed by the other sub CPU due to the bus arbitration during that time. Since it is not used, there is a problem in terms of DPRAM utilization efficiency.

【0004】[0004]

【課題を解決するための手段】本発明のデュアルポート
メモリを用いたCPU間通信システムは、マルチプロセ
ッサシステムを構成する1つのメインCPUと複数のサ
ブCPUとの間でデュアルポートメモリを介して情報伝
送を行うCPU間通信システムにおいて、前記デュアル
ポート上で情報伝送に割り当てられるデータ領域の分割
数を2分割にとどめ、前記メインCPUと前記複数のサ
ブCPUのいずれかとの間の情報伝送要求の発生時点に
前記2分割されたデータ領域のうち使用可能ないずれか
を動的に割り当てる構成を有する。
According to an inter-CPU communication system using a dual port memory of the present invention, information is communicated between one main CPU and a plurality of sub CPUs constituting a multiprocessor system via the dual port memory. In an inter-CPU communication system that performs transmission, the number of divisions of a data area allocated for information transmission on the dual port is limited to two, and an information transmission request is generated between the main CPU and any of the plurality of sub CPUs. It has a configuration in which any usable one of the two divided data areas is dynamically assigned at a time point.

【0005】また、上記構成において、前記デュアルポ
ートメモリ上に、前記2分割されたデータ領域の他に、
前記メインCPUから前記複数のサブCPUへの制御情
報を通知するための前記複数のサブCPUの各々に対応
した複数の対サブCPUステータス領域と、前記複数の
サブCPUから前記メインCPUへの制御情報を通知す
るための前記複数のサブCPUの各々に対応した複数の
対メインCPUステータス領域とを設け、これら対サブ
CPUステータス領域及び対メインCPUステータス領
域を通して前記複数のサブCPUの各々ごとの前記2分
割されたデータ領域に対するアクセス制御を行う構成と
することができる。
Further, in the above structure, in addition to the divided data area on the dual port memory,
A plurality of counter sub CPU status areas corresponding to each of the plurality of sub CPUs for notifying control information from the main CPU to the plurality of sub CPUs, and control information from the plurality of sub CPUs to the main CPU A plurality of pairs of main CPU status areas corresponding to each of the plurality of sub CPUs, and 2 of each of the plurality of sub CPUs through the pair of sub CPU status areas and the pair of main CPU status areas. It may be configured to perform access control for the divided data area.

【0006】さらに、前記メインCPUから前記複数の
サブCPUの各々に対し前記デュアルポートメモリの対
サブCPUステータス領域に設定された前記制御情報の
読み出しの契機を与えるための割り込み制御線を有し、
前記メインCPUから前記複数のサブCPUの各々への
情報伝送を行う場合、前記メインCPUが、前記2分割
されたデータ領域のどちら側を使用するかを指定し、こ
のデータ領域の指定情報を該当するサブCPU対応の前
記対サブCPUステータス領域に設定し、前記割り込み
制御線を通して該当するサブCPUに通知することによ
り、該当するデータ領域を介して該当するサブCPUへ
の情報伝送を行い、前記複数のサブCPUの各々から前
記メインCPUへの情報伝送を行う場合、該当するサブ
CPUが自己に対応する前記対メインCPUステータス
領域にデータ領域への書込要求情報を設定し、前記メイ
ンCPUが、ポーリングによりこの書込要求情報を認識
すると、前記2分割されたデータ領域のどちら側を使用
するかを指定し、このデータ領域の指定情報を該当する
サブCPU対応の前記対サブCPUステータス領域に設
定し、前記割り込み制御線を通して該当するサブCPU
に通知することにより、該当するデータ領域を介して該
当するサブCPUから情報伝送を受ける構成とすること
ができる。
Further, the main CPU has an interrupt control line for giving each of the plurality of sub CPUs a trigger for reading the control information set in the pair sub CPU status area of the dual port memory,
When information is transmitted from the main CPU to each of the plurality of sub CPUs, the main CPU designates which side of the divided data area is to be used, and the designation information of this data area is applied. Information is transmitted to the corresponding sub CPU through the corresponding data area by setting the corresponding sub CPU status area corresponding to the sub CPU and notifying the corresponding sub CPU through the interrupt control line. When information is transmitted from each of the sub CPUs to the main CPU, the corresponding sub CPU sets write request information to the data area in the corresponding main CPU status area, and the main CPU When this write request information is recognized by polling, which side of the two divided data areas is to be used is designated, Sub CPU that the designation information of the data area is set to the pair sub CPU status area of the sub CPU corresponding to the relevant, corresponding through said interrupt control line
Can be configured to receive information transmission from the corresponding sub CPU via the corresponding data area.

【0007】[0007]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面を参照して詳細に説明する。
Next, embodiments of the present invention will be described in detail with reference to the drawings.

【0008】図1(A)は、本発明の一実施の形態の構
成を示すブロック図である。本例のマルチプロセッサシ
ステムは、メインCPU1と、#1,#2及び#3の3
つのサブCPU2,3,4と、メインCPU1とサブC
PU2,3,4とからアクセスされる1つのデュアルポ
ートRAM(DPRAM)5と、サブCPU2,3,4
からDPRAM5へのアクセスの制限を行うバス調停回
路6と、メインCPU1から各サブCPU2,3,4に
対する制御情報読み出しの契機を与えるための割り込み
制御線7,8,9とから構成されている。バス調停回路
6は、DPRAM5に対する同時アクセスをハードウェ
アレベルで制限し、同時刻にDPRAM5にアクセス可
能となるサブCPU2〜4が必ず1つとなるようにす
る。
FIG. 1A is a block diagram showing the configuration of an embodiment of the present invention. The multiprocessor system of this example includes a main CPU 1 and three CPUs # 1, # 2 and # 3.
One sub CPU 2, 3, 4, main CPU 1 and sub C
One dual port RAM (DPRAM) 5 accessed from the PUs 2, 3 and 4 and the sub CPUs 2, 3 and 4
From the main CPU 1 to the sub-CPUs 2, 3 and 4 and interrupt control lines 7, 8 and 9 for giving a trigger for reading control information from the main CPU 1 to the sub CPUs 2, 3 and 4. The bus arbitration circuit 6 restricts simultaneous access to the DPRAM 5 at the hardware level so that only one sub CPU 2 to 4 can access the DPRAM 5 at the same time.

【0009】図1(B)は、図1(A)のDPRAM5
のメモリマップ図である。DPRAM5内部のメモリ領
域は、メインCPU1から各サブCPU2〜4への制御
情報を格納する対サブCPUステータス領域10と、各
サブCPUからメインCPUへの制御情報を格納する対
メインCPUステータス領域11と、メインCPU及び
各サブCPU間での実情報伝送(伝送情報格納)を行う
#1及び#2の2つのデータ領域12,13に大きく分
割される。対サブCPUステータス領域10は、更にそ
の内部が各サブCPU(#1)2,(#2)3,(#
3)4に対応する領域14,15,16に分割され、メ
インCPU1がその各領域14,15,16に対しアク
セスを行い、対応する各サブCPU2,3,4に対し、
割り込み制御線7,8,9を経て割り込みを送信する。
対メインCPUステータス領域11も同様に、更にその
内部が各サブCPU(#1)2,(#2)3,(#3)
4に対応する領域17,18,19に分割されている。
各サブCPU2,3,4からメインCPU1に対する要
求は、サブCPUの数が多くなることを考慮し、割り込
みは使用せず、メインCPU1が領域17,18,19
を定期的にポーリングすることによって認識する。メイ
ンCPU1及び各サブCPU2,3,4共に、データ領
域(#1)12,(#2)13のどちらに対してもアク
セスが可能であり、アクセス制御はメインCPU1から
の対サブCPUステータス領域10を更新することによ
り行う。
FIG. 1B shows the DPRAM 5 of FIG.
3 is a memory map diagram of FIG. The memory area inside the DPRAM 5 is a paired sub CPU status area 10 for storing control information from the main CPU 1 to each sub CPU 2 to 4, and a paired main CPU status area 11 for storing control information from each sub CPU to the main CPU. , And is largely divided into two data areas 12 and 13 # 1 and # 2 for transmitting actual information (storing transmission information) between the main CPU and each sub CPU. The sub-CPU status area 10 has the sub CPUs (# 1) 2, (# 2) 3, (#
3) Areas 14, 15 and 16 corresponding to 4 are divided, and the main CPU 1 accesses each of the areas 14, 15 and 16 to the corresponding sub CPUs 2, 3 and 4,
An interrupt is transmitted via the interrupt control lines 7, 8 and 9.
Similarly, the main CPU status area 11 has sub CPUs (# 1) 2, (# 2) 3, (# 3) inside thereof.
It is divided into areas 17, 18 and 19 corresponding to four.
Requests from the sub CPUs 2, 3 and 4 to the main CPU 1 consider that the number of sub CPUs is large, and interrupts are not used.
Recognize by polling periodically. Both the main CPU 1 and each of the sub CPUs 2, 3 and 4 can access any of the data areas (# 1) 12 and (# 2) 13, and access control is performed from the main CPU 1 to the sub CPU status area 10 By updating.

【0010】図2,図3,図4,図5は本発明の動作を
説明するためのフロー図である。図2はメインCPU1
からあるサブCPU(例えば、CPU(#1)2)へ情
報伝送を行う場合のメインCPU1側の手順、図3はそ
の場合のサブCPU2側の手順、図4はあるサブCPU
(例えば、CPU2)からメインCPU1へ情報伝送を
行う場合のサブCPU2側の手順、図5はその場合のメ
インCPU1側の手順を示す。図2〜図5共にメインC
PU1とサブCPU2の間の情報伝送手順を示している
が、これはひとつの例であり、実際には全てのサブCP
U2,3,4に対して同様な手順が践まれる。
2, FIG. 3, FIG. 4 and FIG. 5 are flow charts for explaining the operation of the present invention. 2 shows the main CPU 1
From the main CPU 1 side when transmitting information from a sub CPU to a certain sub CPU (for example, CPU (# 1) 2), FIG. 3 is a sub CPU 2 side procedure in that case, and FIG.
FIG. 5 shows a procedure on the side of the sub CPU 2 when information is transmitted from (for example, the CPU 2) to the main CPU 1, and FIG. 5 shows a procedure on the side of the main CPU 1 in that case. Main C in both Figures 2-5
The information transmission procedure between the PU 1 and the sub CPU 2 is shown, but this is only an example, and in reality all sub CPs are shown.
A similar procedure is practiced for U2,3,4.

【0011】次に、これらの図1〜図6を参照して本発
明の動作を説明する。
Next, the operation of the present invention will be described with reference to FIGS.

【0012】始めにメインCPU1からサブCPU(例
えば、サブCPU(#1)2)へ情報伝送を行う場合の
動作を説明する。メインCPU1は、まず、DPRAM
5のデータ領域(#1)12,(#2)13の空き状態
をチェックしあらかじめ設定された選択方法に従って空
いているデータ領域を1つ選択する(図2のステップS
101)。ここで、データ領域(#1)12が選択され
ればそれを確保し(ステップS111)、確保したデー
タ領域12に伝送すべき情報を書込み(ステップS11
2)、DPRAM5の対サブCPUステータス領域10
のうち伝送相手先のサブCPU(#1)2に対応する領
域14に「データ領域(#1)12の読出指示」を示す
制御情報をセットし(ステップS113)、割り込み制
御線7を通してサブCPU2に割り込みを送信し(ステ
ップS130)、その後、DPRAM5の対メインCP
Uステータス領域11(領域17〜19)のポーリング
を行いサブCPU2〜4からの情報があるかチェックす
る(ステップS131)。ステップS101の処理にお
いて、データ領域(#2)13が選択されればそれを確
保し(ステップS121)、上記と同様に、確保したデ
ータ領域13に伝送すべき情報を書込み(ステップS1
22)、対サブCPUステータス領域10のうち伝送相
手先のサブCPU(#1)2に対応する領域14に「デ
ータ領域(#2)13の読出指示」を示す制御情報をセ
ットし(ステップS123)、割り込み制御線7を通し
てサブCPU2に割り込みを送信し(ステップS13
0)、その後、対メインCPUステータス領域11(領
域17〜19)のポーリングを行いサブCPU2〜4か
らの情報があるかチェックする(ステップS131)。
ステップS101の処理において、空きデータ領域がな
ければ、データ領域12,13を使用している情報の伝
送処理を行い(ステップS151)、ステップS101
以降の処理を繰り返す。
First, the operation when information is transmitted from the main CPU 1 to the sub CPU (for example, the sub CPU (# 1) 2) will be described. First, the main CPU 1 is a DPRAM
5, the free state of the data areas (# 1) 12 and (# 2) 13 is checked and one free data area is selected according to a preset selection method (step S in FIG. 2).
101). If the data area (# 1) 12 is selected, it is secured (step S111), and information to be transmitted is written in the secured data area 12 (step S11).
2), DPRAM 5 counter sub CPU status area 10
In the area 14 corresponding to the sub CPU (# 1) 2 of the transmission destination, the control information indicating the "readout instruction of the data area (# 1) 12" is set (step S113), and the sub CPU 2 is operated through the interrupt control line 7. To the main CP of the DPRAM 5 (step S130).
The U status area 11 (areas 17 to 19) is polled to check if there is information from the sub CPUs 2 to 4 (step S131). In the process of step S101, if the data area (# 2) 13 is selected, it is secured (step S121), and similarly to the above, the information to be transmitted is written in the secured data area 13 (step S1).
22), the control information indicating the "readout instruction of the data area (# 2) 13" is set in the area 14 corresponding to the sub CPU (# 1) 2 of the transmission destination in the status area 10 for the sub CPU (step S123). ), And transmits an interrupt to the sub CPU 2 through the interrupt control line 7 (step S13
0) and then poll the main CPU status area 11 (areas 17 to 19) to check if there is information from the sub CPUs 2 to 4 (step S131).
If there is no empty data area in the processing of step S101, the transmission processing of information using the data areas 12 and 13 is performed (step S151), and step S101.
The subsequent processing is repeated.

【0013】一方、メインCPU1からの割り込みを受
信した(図3のステップS201)サブCPU2は、自
己対応のステータス領域14から制御情報を読み出し
(ステップS202)、データ領域12,13からの情
報の「読出指示」かチェックする(ステップS20
3)。「読出指示」だった場合、読出先がどちらのデー
タ領域か判定する(ステップS204)。データ領域
(#1)12の場合は、対メインCPUステータス領域
11のうち自己対応の領域17に「データ領域(#1)
12の読出中」を示す制御情報をセットし(ステップS
211)、データ領域12から伝送情報を読み出す(ス
テップS212)。読出先がデータ領域(#2)13の
場合は、上記と同様に、対メインCPUステータス領域
11のうち自己対応の領域17に「データ領域(#2)
13の読出中」を示す制御情報をセットし(ステップS
221)、データ領域13から伝送情報を読み出す(ス
テップS222)。データ領域12または13からの伝
送情報の読み出しが完了すると、ステータス領域17に
「要求無し」を示す制御情報をセットし(ステップS2
31)、情報伝送処理を終了する(ステップS23
2)。また、ステップS203の処理において、「読出
指示」でなかった場合は、他の該当処理を行う(ステッ
プS241)。
On the other hand, the sub CPU 2 which has received the interrupt from the main CPU 1 (step S201 in FIG. 3) reads the control information from the self-corresponding status area 14 (step S202), and the information from the data areas 12, 13 " Read instruction "(step S20
3). If it is a "read instruction", it is determined which data area the read destination is (step S204). In the case of the data area (# 1) 12, in the self-corresponding area 17 of the main CPU status area 11, "data area (# 1)"
12 is being read ”is set (step S
211), the transmission information is read from the data area 12 (step S212). When the read destination is the data area (# 2) 13, the data area (# 2) is stored in the self-corresponding area 17 of the main CPU status area 11 as described above.
13 is being read ”is set (step S
221), and the transmission information is read from the data area 13 (step S222). When the reading of the transmission information from the data area 12 or 13 is completed, the control information indicating "no request" is set in the status area 17 (step S2).
31), the information transmission process is terminated (step S23).
2). Further, in the process of step S203, if the instruction is not the "read instruction", another corresponding process is performed (step S241).

【0014】対メインCPUステータス領域11(領域
17〜19)のポーリング処理(図2のステップS13
1)を行っていたメインCPU1は、割り込みを送信し
たサブCPU(#1)2に対応するステータス領域17
の状態変化を監視し(ステップS132)、変化を検出
するとその内容が「要求無し」かどうかチェックし(ス
テップS133)、「要求無し」の場合はサブCPU2
側の情報伝送処理が完了したものと認識して自己の情報
伝送処理を終了させる(ステップS134)。ステータ
ス領域17の状態変化が無かったり、内容が「要求無
し」で無かった場合は、他の該当処理を行い(ステップ
S141)、ステップS131以降の処理を繰り返す。
Polling processing for the main CPU status area 11 (areas 17 to 19) (step S13 in FIG. 2)
The main CPU 1 which was performing 1) has a status area 17 corresponding to the sub CPU (# 1) 2 which has transmitted the interrupt.
(Step S132), the change is detected, it is checked whether the content is "no request" (step S133), and if "no request", the sub CPU 2
Upon recognizing that the information transmission processing on the side has been completed, the own information transmission processing is ended (step S134). If there is no change in the status of the status area 17 or if the content is not "no request", other applicable processing is performed (step S141), and the processing from step S131 onward is repeated.

【0015】次に、サブCPU(#1)2からメインC
PU1へ情報伝送を行う場合の動作を説明する。サブC
PU2は、まず、DPRAM5の対メインCPUステー
タス領域11のうち自己のステータス領域17に「書込
要求」をセットし(図4のステップS301)、メイン
CPU1からの割り込みを待つ(ステップS302)。
Next, from the sub CPU (# 1) 2 to the main C
The operation for transmitting information to PU1 will be described. Sub C
The PU 2 first sets “write request” in its own status area 17 of the main CPU status area 11 of the DPRAM 5 (step S301 in FIG. 4), and waits for an interrupt from the main CPU 1 (step S302).

【0016】メインCPU1は定期的に対メインCPU
ステータス領域11を各サブCPU2〜4対応(領域1
7〜19)にポーリングしており(図5のステップS4
01)、例えばサブCPU2のステータス領域17の状
態変化を検出すると(ステップS402)、その内容が
「書込要求」か判定する。ステータス領域17の状態変
化が無かったり、内容が「書込要求」で無かった場合
は、他の該当処理を行い(ステップS461)、ステッ
プS401以降の処理を繰り返す。メインCPU1は、
ステップS403の処理で「書込要求」を検出すると、
DPRAM5のデータ領域(#1)12,(#2)13
の空き状態をチェックしあらかじめ設定された選択方法
に従って空いているデータ領域を1つ選択する(ステッ
プS404)。ここで、データ領域(#1)12が選択
されればそれを確保し(ステップS411)、DPRA
M5の対サブCPUステータス領域10のうち伝送要求
元のサブCPU(#1)2に対応する領域14に「デー
タ領域(#1)12の書込指示」を示す制御情報をセッ
トし(ステップS412)、割り込み制御線7を通して
サブCPU2に割り込みを送信し(ステップS43
0)、その後、対メインCPUステータス領域11(領
域17〜19)のポーリングを行いサブCPU2〜4か
らの情報があるかチェックする(ステップS431)。
ステップS404の処理において、データ領域(#2)
13が選択されればそれを確保し(ステップS42
1)、上記と同様に、対サブCPUステータス領域10
のうち伝送要求先のサブCPU(#1)2に対応する領
域14に「データ領域(#2)13の書込指示」を示す
制御情報をセットし(ステップS422)、割り込み制
御線7を通してサブCPU2に割り込みを送信し(ステ
ップS430)、その後、対メインCPUステータス領
域11(領域17〜19)のポーリングを行いサブCP
U2〜4からの情報があるかチェックする(ステップS
431)。ステップS404の処理において、空きデー
タ領域がなければ、データ領域12,13を使用してい
る情報の伝送処理を行い(ステップS451)、ステッ
プS404以降の処理を繰り返す。
The main CPU 1 is a main CPU periodically
The status area 11 corresponds to each sub CPU 2 to 4 (area 1
7 to 19) (step S4 in FIG. 5).
01), for example, when the state change of the status area 17 of the sub CPU 2 is detected (step S402), it is determined whether the content is “write request”. If the status of the status area 17 has not changed or the content is not “write request”, other corresponding processing is performed (step S461) and the processing from step S401 onward is repeated. The main CPU1
When the "write request" is detected in the process of step S403,
Data areas (# 1) 12 and (# 2) 13 of the DPRAM 5
The empty state is checked and one empty data area is selected according to a preset selection method (step S404). Here, if the data area (# 1) 12 is selected, it is secured (step S411), and DPRA
In the area 14 corresponding to the sub CPU (# 1) 2 that is the transmission request source in the sub CPU status area 10 of M5, the control information indicating the "write instruction of the data area (# 1) 12" is set (step S412). ), And transmits an interrupt to the sub CPU 2 through the interrupt control line 7 (step S43
0) and then poll the main CPU status area 11 (areas 17 to 19) to check if there is information from the sub CPUs 2 to 4 (step S431).
In the process of step S404, the data area (# 2)
If 13 is selected, it is secured (step S42
1), in the same manner as above, the sub CPU status area 10
In the area 14 corresponding to the sub CPU (# 1) 2 which is the transmission request destination, the control information indicating the “write instruction of the data area (# 2) 13” is set (step S422), and the sub control is performed through the interrupt control line 7. An interrupt is transmitted to the CPU 2 (step S430), and then the main CPU status area 11 (areas 17 to 19) is polled to execute the sub CP.
Check if there is information from U2-4 (step S
431). If there is no free data area in the processing of step S404, the information transmission processing using the data areas 12 and 13 is performed (step S451), and the processing from step S404 onward is repeated.

【0017】一方、メインCPU1からの割り込みを受
信した(図4のステップS303)サブCPU2は、自
己対応のステータス領域14から制御情報を読み出し
(ステップS304)、データ領域12,13への情報
の「書込指示」かチェックする(ステップS305)。
「書込指示」だった場合、書込先がどちらのデータ領域
か判定する(ステップS306)。データ領域(#1)
12の場合は、対メインCPUステータス領域11のう
ち自己対応の領域17に「データ領域(#1)12の書
込中」を示す制御情報をセットし(ステップS31
1)、データ領域12へ伝送情報を書き込む(ステップ
S312)。書込先がデータ領域(#2)13の場合
は、上記と同様に、対メインCPUステータス領域11
のうち自己対応の領域17に「データ領域(#2)13
の書込中」を示す制御情報をセットし(ステップS32
1)、データ領域13へ伝送情報を書き込む(ステップ
S322)。データ領域12または13への伝送情報の
書き込みが完了すると、ステータス領域17に「要求無
し」を示す制御情報をセットし(ステップS331)、
メインCPU1からの割り込みを待つ(ステップS33
2)。また、ステップS305の処理において、「書込
指示」でなかった場合は、他の該当処理を行い(ステッ
プS351)、ステップS302以降の処理を繰り返
す。
On the other hand, the sub CPU 2 which has received the interrupt from the main CPU 1 (step S303 in FIG. 4) reads the control information from the self-corresponding status area 14 (step S304), and stores the information "" in the data areas 12 and 13. It is checked whether it is a "write instruction" (step S305).
If it is a "write instruction", it is determined which data area is the write destination (step S306). Data area (# 1)
In the case of 12, the control information indicating "writing of data area (# 1) 12" is set in the self-corresponding area 17 of the main CPU status area 11 (step S31).
1) Write transmission information in the data area 12 (step S312). When the writing destination is the data area (# 2) 13, the status of the main CPU status area 11 is the same as above.
In the self-corresponding area 17, the “data area (# 2) 13
Control information indicating "writing in progress" is set (step S32
1) Write the transmission information in the data area 13 (step S322). When the writing of the transmission information to the data area 12 or 13 is completed, the control information indicating "no request" is set in the status area 17 (step S331),
Wait for an interrupt from the main CPU 1 (step S33
2). Further, in the processing of step S305, if the instruction is not the "write instruction", other corresponding processing is performed (step S351), and the processing from step S302 is repeated.

【0018】対メインCPUステータス領域11(領域
17〜19)のポーリング処理(図5のステップS43
1)を行っていたメインCPU1は、割り込みを送信し
たサブCPU(#1)2に対応するステータス領域17
の状態変化を監視し(ステップS432)、変化を検出
するとその内容が「要求無し」かどうかチェックし(ス
テップS433)、「要求無し」の場合はサブCPU2
側の情報書込処理が完了したものと認識して該当するデ
ータ領域12,13から伝送情報を読み出す(ステップ
S434)。ステータス領域17の状態変化が無かった
り、内容が「要求無し」で無かった場合は、他の該当処
理を行い(ステップS441)、ステップS431以降
の処理を繰り返す。メインCPU1は、ステップS43
4の伝送情報読み出し処理が完了すると、サブCPU2
のステータス領域14に「該当するデータ領域の読出完
了」を意味する制御情報をセットし(ステップ43
5)、割り込み制御線7を通してサブCPU2に割り込
みを送信し(ステップS436)、情報転送処理を終了
する(ステップS437)。
Polling processing for the main CPU status area 11 (areas 17 to 19) (step S43 in FIG. 5)
The main CPU 1 which was performing 1) has a status area 17 corresponding to the sub CPU (# 1) 2 which has transmitted the interrupt.
(Step S432), if a change is detected, it is checked whether the content is "no request" (step S433). If "no request", the sub CPU 2
It is recognized that the side information writing process has been completed, and the transmission information is read from the corresponding data areas 12 and 13 (step S434). If there is no change in the status of the status area 17 or if the content is not "no request", other corresponding processing is performed (step S441), and the processing from step S431 onward is repeated. The main CPU1 carries out step S43.
When the transmission information reading process of 4 is completed, the sub CPU 2
The control information indicating "reading of the corresponding data area is completed" is set in the status area 14 (step 43).
5) Then, an interrupt is transmitted to the sub CPU 2 through the interrupt control line 7 (step S436), and the information transfer process ends (step S437).

【0019】データ領域への伝送情報の書き込み後、メ
インCPUからの割り込みを待っていた(図4のステッ
プS332)サブCPU2は、割り込みを受信すると
(ステップS333)、自己対応のステータス領域14
から制御情報を読み出し(ステップS334)、データ
領域12,13からの情報の「読出完了」かチェックす
る(ステップS335)。「読出完了」だった場合、情
報転送処理を終了する(ステップS336)。「読出完
了」でなかった場合は、他の該当処理を行い(ステップ
S341)、ステップS332以降の処理を繰り返す。
After writing the transmission information in the data area, the sub CPU 2 waiting for an interrupt from the main CPU (step S332 in FIG. 4) receives the interrupt (step S333), and then the self-corresponding status area 14
The control information is read from (step S334), and it is checked whether the information from the data areas 12 and 13 is "read complete" (step S335). When the reading is completed, the information transfer process is ended (step S336). If the reading is not completed, other relevant processing is performed (step S341) and the processing from step S332 is repeated.

【0020】以上説明したように本システムは、DPR
AM5上で情報伝送に割り当てられるデータ領域12,
13の分割数を2分割にとどめ、他に設けられたメイン
CPU1から複数(3)個のサブCPU2〜4に対す
る、個々のサブCPUに対応した複数のステータス領域
14〜16、及び複数のサブCPU2〜4からメインC
PU1に対する、個々のサブCPUに対応した複数のス
テータス領域17〜19を使用することにより、メイン
CPU1及び複数のサブCPU2〜4が、DPRAM5
内部の2分割されたデータ領域12,13のどちらに対
してもアクセス可能となり、効率的な情報伝送が実現さ
れる。
As described above, this system is a DPR
A data area 12 allocated for information transmission on the AM5,
The number of divisions of 13 is limited to two, and a plurality of status areas 14 to 16 corresponding to the individual sub CPUs and a plurality of sub CPUs 2 from the main CPU 1 provided to the plurality of (3) sub CPUs 2 to 4 are provided. From 4 to the main C
By using the plurality of status areas 17 to 19 corresponding to the individual sub CPUs for the PU 1, the main CPU 1 and the plurality of sub CPUs 2 to 4 are set to the DPRAM 5
Both internal data areas 12 and 13 can be accessed, and efficient information transmission is realized.

【0021】なお、各ステータス領域14〜19に書き
込まれる実際の値は、伝送手順の中で使用される各々の
意味をコード化した形で使用する。また、メインCPU
1は、ステータス領域17,18,19のポーリングに
よる状態検出結果と、他の様々な処理との優先順位によ
り、どのサブCPU(#1)2,(#2)3,(#3)
4との情報伝送を行うかのスケジューリングを行う。
The actual value written in each of the status areas 14 to 19 is used in the coded form of each meaning used in the transmission procedure. Also, the main CPU
1 indicates which sub CPU (# 1) 2, (# 2) 3, (# 3) depending on the priority of the status detection result by polling the status areas 17, 18 and 19 and various other processes.
It is scheduled whether or not to transmit information to the mobile station 4.

【0022】[0022]

【発明の効果】以上説明したように本発明によれば、メ
インCPUと複数のサブCPUとの間の情報伝送を1つ
のデュアルポートメモリを使用して行う際に、デュアル
ポート上で情報伝送に割り当てられるデータ領域の分割
数を2分割にとどめ、メインCPUと複数のサブCPU
のいずれかとの間の情報伝送要求の発生時点に2分割さ
れたデータ領域のうち使用可能ないずれかを動的に割り
当てるので、デュアルポートメモリの情報伝送部分が個
々のサブCPUに対しデータ領域として最大限使用さ
れ、デュアルポートメモリの利用効率を高めることが可
能となる。
As described above, according to the present invention, when the information transmission between the main CPU and the plurality of sub CPUs is performed using one dual port memory, the information transmission is performed on the dual port. The number of divisions of the allocated data area is limited to two, and the main CPU and multiple sub CPUs
One of the two divided data areas that can be used is dynamically allocated when an information transmission request is made between the sub-CPU and each of the sub-CPUs. It can be used to the maximum, and it is possible to improve the utilization efficiency of the dual port memory.

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

【図1】本発明の一実施の形態を示すブロック構成図で
あり、分図(A)は全体構成、分図(B)はそのうちの
デュアルポートメモリ(DPRAM)の領域構成を示
す。
FIG. 1 is a block configuration diagram showing an embodiment of the present invention, where FIG. 1A shows the overall configuration, and FIG. 1B shows the area configuration of a dual port memory (DPRAM).

【図2】本発明の動作を説明するための流れ図であり、
メインCPUからサブCPUへ情報伝送を行う場合のメ
インCPU側の処理を示す。
FIG. 2 is a flow chart for explaining the operation of the present invention,
7 shows processing on the main CPU side when information is transmitted from the main CPU to the sub CPU.

【図3】本発明の動作を説明するための流れ図であり、
メインCPUからサブCPUへ情報伝送を行う場合のサ
ブCPU側の処理を示す。
FIG. 3 is a flow chart for explaining the operation of the present invention,
7 shows processing on the sub CPU side when information is transmitted from the main CPU to the sub CPU.

【図4】本発明の動作を説明するための流れ図であり、
サブCPUからメインCPUへ情報伝送を行う場合のサ
ブCPU側の処理を示す。
FIG. 4 is a flow chart for explaining the operation of the present invention,
7 shows processing on the sub CPU side when information is transmitted from the sub CPU to the main CPU.

【図5】本発明の動作を説明するための流れ図であり、
サブCPUからメインCPUへ情報伝送を行う場合のメ
インCPU側の処理を示す。
FIG. 5 is a flow chart for explaining the operation of the present invention,
The processing on the main CPU side when information is transmitted from the sub CPU to the main CPU is shown.

【図6】従来技術で使用されるDPRAMのメモリマッ
プを示す図である。
FIG. 6 is a diagram showing a memory map of a DPRAM used in the conventional technique.

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

1 メインCPU 2,3,4 サブCPU 5 デュアルポートメモリ(DPRAM) 6 バス調停回路 12,13 データ領域 1 Main CPU 2, 3, 4 Sub CPU 5 Dual port memory (DPRAM) 6 Bus arbitration circuit 12, 13 Data area

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 マルチプロセッサシステムを構成する1
つのメインCPUと複数のサブCPUとの間でデュアル
ポートメモリを介して情報伝送を行うCPU間通信シス
テムにおいて、 前記デュアルポート上で情報伝送に割り当てられるデー
タ領域の分割数を2分割にとどめ、前記メインCPUと
前記複数のサブCPUのいずれかとの間の情報伝送要求
の発生時点に前記2分割されたデータ領域のうち使用可
能ないずれかを動的に割り当てることを特徴とするデュ
アルポートメモリを用いたCPU間通信システム。
1. A multiprocessor system comprising 1
In an inter-CPU communication system for transmitting information between one main CPU and a plurality of sub CPUs via a dual port memory, the number of divisions of a data area allocated for information transmission on the dual port is limited to two, and A dual port memory characterized by dynamically allocating any available one of the two divided data areas at the time of the information transmission request between the main CPU and any one of the plurality of sub CPUs. Communication system between CPUs.
【請求項2】前記デュアルポートメモリ上に、前記2分
割されたデータ領域の他に、前記メインCPUから前記
複数のサブCPUへの制御情報を通知するための前記複
数のサブCPUの各々に対応した複数の対サブCPUス
テータス領域と、前記複数のサブCPUから前記メイン
CPUへの制御情報を通知するための前記複数のサブC
PUの各々に対応した複数の対メインCPUステータス
領域とを設け、これら対サブCPUステータス領域及び
対メインCPUステータス領域を通して前記複数のサブ
CPUの各々ごとの前記2分割されたデータ領域に対す
るアクセス制御を行うことを特徴とする請求項1記載の
デュアルポートメモリを用いたCPU間通信システム。
2. Corresponding to each of the plurality of sub CPUs for notifying the control information from the main CPU to the plurality of sub CPUs, in addition to the divided data area on the dual port memory. The plurality of sub CPU status areas and the plurality of sub Cs for notifying control information from the plurality of sub CPUs to the main CPU
A plurality of main CPU status areas corresponding to each of the PUs are provided, and access control to the divided data area for each of the plurality of sub CPUs is performed through the pair sub CPU status area and the main CPU status area. The inter-CPU communication system using the dual port memory according to claim 1, which is performed.
【請求項3】 前記メインCPUから前記複数のサブC
PUの各々に対し前記デュアルポートメモリの対サブC
PUステータス領域に設定された前記制御情報の読み出
しの契機を与えるための割り込み制御線を有し、 前記メインCPUから前記複数のサブCPUの各々への
情報伝送を行う場合、前記メインCPUが、前記2分割
されたデータ領域のどちら側を使用するかを指定し、こ
のデータ領域の指定情報を該当するサブCPU対応の前
記対サブCPUステータス領域に設定し、前記割り込み
制御線を通して該当するサブCPUに通知することによ
り、該当するデータ領域を介して該当するサブCPUへ
の情報伝送を行い、 前記複数のサブCPUの各々から前記メインCPUへの
情報伝送を行う場合、該当するサブCPUが自己に対応
する前記対メインCPUステータス領域にデータ領域へ
の書込要求情報を設定し、前記メインCPUが、ポーリ
ングによりこの書込要求情報を認識すると、前記2分割
されたデータ領域のどちら側を使用するかを指定し、こ
のデータ領域の指定情報を該当するサブCPU対応の前
記対サブCPUステータス領域に設定し、前記割り込み
制御線を通して該当するサブCPUに通知することによ
り、該当するデータ領域を介して該当するサブCPUか
ら情報伝送を受けることを特徴とする請求項2記載のデ
ュアルポートメモリを用いたCPU間通信システム。
3. The main CPU to the plurality of sub-Cs
Pair of sub-ports of the dual port memory for each PU
When the main CPU has an interrupt control line for triggering the reading of the control information set in the PU status area and information is transmitted from the main CPU to each of the plurality of sub CPUs, the main CPU is It is specified which side of the data area divided into two is to be used, the specification information of this data area is set in the counter-to-sub CPU status area corresponding to the corresponding sub CPU, and the corresponding sub CPU is set to the corresponding sub CPU through the interrupt control line. By notifying, the information is transmitted to the corresponding sub CPU via the corresponding data area, and when the information is transmitted from each of the plurality of sub CPUs to the main CPU, the corresponding sub CPU corresponds to itself. Write request information to the data area is set in the status area for main CPU, and the main CPU executes polling. When the write request information is recognized by, which side of the divided data area is to be used is designated, and the designation information of this data area is set in the counter sub CPU status area corresponding to the corresponding sub CPU. 3. The CPU using the dual port memory according to claim 2, wherein information is transmitted from the corresponding sub CPU through the corresponding data area by notifying the corresponding sub CPU through the interrupt control line. Communications system.
JP9145696A 1996-04-12 1996-04-12 Inter-cpu communication system using dual port memory Pending JPH09282297A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9145696A JPH09282297A (en) 1996-04-12 1996-04-12 Inter-cpu communication system using dual port memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9145696A JPH09282297A (en) 1996-04-12 1996-04-12 Inter-cpu communication system using dual port memory

Publications (1)

Publication Number Publication Date
JPH09282297A true JPH09282297A (en) 1997-10-31

Family

ID=14026880

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9145696A Pending JPH09282297A (en) 1996-04-12 1996-04-12 Inter-cpu communication system using dual port memory

Country Status (1)

Country Link
JP (1) JPH09282297A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100460108B1 (en) * 2000-12-29 2004-12-03 엘지전자 주식회사 Operating Method of Processor Using Dual Port Memory
JP2015035184A (en) * 2013-08-09 2015-02-19 株式会社日立ハイテクノロジーズ Control device
US10846132B2 (en) 2017-12-07 2020-11-24 Toyota Jidosha Kabushiki Kaisha Information processing apparatus

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100460108B1 (en) * 2000-12-29 2004-12-03 엘지전자 주식회사 Operating Method of Processor Using Dual Port Memory
JP2015035184A (en) * 2013-08-09 2015-02-19 株式会社日立ハイテクノロジーズ Control device
US10846132B2 (en) 2017-12-07 2020-11-24 Toyota Jidosha Kabushiki Kaisha Information processing apparatus

Similar Documents

Publication Publication Date Title
US7181744B2 (en) System and method for transferring data between virtual machines or other computer entities
US6711643B2 (en) Method and apparatus for interrupt redirection for arm processors
CN1991768B (en) Instruction set architecture-based inter-sequencer communicating with a heterogeneous resource
US4720784A (en) Multicomputer network
US5507032A (en) Multiprocessor I/O request control system forming device drive queue and processor interrupt queue from rows and cells of I/O request table and interrupt request table
US6052729A (en) Event-reaction communication protocol in an object oriented processor array
CN109284074A (en) A kind of printing driving method, multiple nucleus system and terminal device based on multiple nucleus system
JPH09282297A (en) Inter-cpu communication system using dual port memory
US20110271060A1 (en) Method And System For Lockless Interprocessor Communication
EP0376003A2 (en) Multiprocessing system with interprocessor communications facility
JPH0675887A (en) Polling interval determining system
JPS63268035A (en) Remote terminal control system via local terminal simulator
CA1167986A (en) Communication multiplexer sharing a free running timer among multiple communication lines
JPH0573507A (en) Reliefing device in message communication between electronic computers
JPS6143369A (en) Multi-processor system
JPH0376497B2 (en)
CA1273114A (en) Multiprocess computer and method for operating same
JP2007506182A (en) Master / slave direct memory access hardware and software control methods and equipment
JP2002169699A (en) Communication system using multiple virtual computers
CN116974736A (en) Equipment virtualization method and related equipment
JPH056333A (en) Multi-processor system
JPH08221106A (en) Programmable controller
JPS5850410Y2 (en) Interrupt priority controller
JPH0495148A (en) Extended card access system
JPH06243104A (en) Inter-cpu communications system for multiprocessor system

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19991124