JP6885801B2 - Bank dual port memory - Google Patents

Bank dual port memory Download PDF

Info

Publication number
JP6885801B2
JP6885801B2 JP2017124033A JP2017124033A JP6885801B2 JP 6885801 B2 JP6885801 B2 JP 6885801B2 JP 2017124033 A JP2017124033 A JP 2017124033A JP 2017124033 A JP2017124033 A JP 2017124033A JP 6885801 B2 JP6885801 B2 JP 6885801B2
Authority
JP
Japan
Prior art keywords
bank
mpua1
data
mpub2
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2017124033A
Other languages
Japanese (ja)
Other versions
JP2019008575A (en
Inventor
小谷 郁雄
郁雄 小谷
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.)
Toyo Electric Manufacturing Ltd
Original Assignee
Toyo Electric Manufacturing 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 Toyo Electric Manufacturing Ltd filed Critical Toyo Electric Manufacturing Ltd
Priority to JP2017124033A priority Critical patent/JP6885801B2/en
Publication of JP2019008575A publication Critical patent/JP2019008575A/en
Application granted granted Critical
Publication of JP6885801B2 publication Critical patent/JP6885801B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Description

本発明は、2つのマイクロプロセッサとデュアルポートメモリにて構成されるコンピュータシステムにおいて、該デュアルポートメモリにより前記2つのマイクロプロセッサ間のデータの授受を行う方法に関するものである。
The present invention relates to a method of exchanging data between two microprocessors in a computer system composed of two microprocessors and a dual port memory.

マイクロプロセッサは産業用制御機器において広く使用され、多くの製品の生産を担っている。そして、ますます複雑で高度化する機能のために、複数のマイクロプロセッサが用いられ分散して処理を行っている。 Microprocessors are widely used in industrial control equipment and are responsible for the production of many products. And because of the increasingly complex and sophisticated functions, multiple microprocessors are used to perform distributed processing.

例を挙げれば、PLC(Programmable Logic Controller)装置においては、ラダープログラムの実行、信号の入出力の処理や位置決め制御などに、それぞれの処理に適したマイクロプロセッサを用いることが広く行われている。また、モータを駆動するインバータ装置においては、モータのインバータ駆動にはこれに適した制御用マイクロプロセッサを使用し、例えば他の統括監視装置とのデータ送受信のためには通信用マイクロプロセッサが使用されている。ここで以下に、マイクロプロセッサをMPUとも表記する。 For example, in a PLC (Programmable Logic Controller) device, it is widely practiced to use a microprocessor suitable for each process for execution of a ladder program, signal input / output processing, positioning control, and the like. Further, in the inverter device for driving the motor, a control microprocessor suitable for the inverter drive of the motor is used, for example, a communication microprocessor is used for data transmission / reception with another general monitoring device. ing. Here, the microprocessor is also referred to as an MPU below.

そして、MPU間のデータの授受には、デュアルポートメモリ(以下に、デュアルポートメモリをDPMとも表記する)が使用されることが多く、図12に通常に実施されているMPUとDPMの使用例を示しこれについて説明を行う。 A dual-port memory (hereinafter, the dual-port memory is also referred to as DPM) is often used for exchanging data between MPUs, and FIG. 12 shows an example of using MPU and DPM which is normally carried out. Will be shown and this will be explained.

該図12において、1と2はマイクロプロセッサであるMPUAおよびMPUBであり、3はデュアルポートメモリであるDPMである。前記MPUA1とMPUB2は該DPM3を介して複数のデータの授受を行うもので、前記MPUA1とDPM3はコントロールバス11、アドレスバス12、データバス13、およびビジー信号14にて接続され、同様に前記MPUB2とDPM3はコントロールバス21、アドレスバス22、データバス23、およびビジー信号24にて接続されている、そして、前記コントロールバス11および21にはリード信号やライト信号が含まれている。 In FIG. 12, 1 and 2 are microprocessors MPUA and MPUB, and 3 is a dual port memory DPM. The MPUA1 and the MPUB2 exchange a plurality of data via the DPM3, and the MPUA1 and the DPM3 are connected by a control bus 11, an address bus 12, a data bus 13, and a busy signal 14, and similarly, the MPUB2. And DPM3 are connected by a control bus 21, an address bus 22, a data bus 23, and a busy signal 24, and the control buses 11 and 21 include a read signal and a write signal.

同じく図12において前記DPM3は、前記アドレスバス12と22が異なるアドレスを示していれば、前記MPUA1とMPUB2から同時にリードまたはライトのアクセスが可能であるが、同時に同じアドレスを示している(これを競合状態と表記する)とき前記DPM3は内蔵する調停の機能より調停を行って、例えばアクセスを許可する前記MPUA1への前記ビジー信号14はノンアクティブとし、アクセスを許可しない例えば前記MPUB2への前記ビジー信号24をアクティブとする。これにより、前記MPUA1は前記DPM3にアクセスが可能となるが、前記MPUB2は、アドレスの競合状態が無くなって前記ビジー信号24がノンアクティブになるまでウェイティング状態となる。
ここで、前記図12において同期信号15は、前記MPUA1とMPUB2のプログラム実行の同期を図るもので、これの説明はさらにあとで行う。
Similarly, in FIG. 12, if the address buses 12 and 22 indicate different addresses, the DPM 3 can access the read or write from the MPUA1 and the MPUB2 at the same time, but at the same time, the DPM3 indicates the same address (this can be seen). When the DPM3 is arbitrated by the built-in arbitration function, for example, the busy signal 14 to the MPUA1 that allows access is made inactive, and the busy signal 14 to the MPUB2 that does not allow access is made inactive. The signal 24 is activated. As a result, the MPUA1 can access the DPM3, but the MPUB2 is in a waiting state until the address conflict state disappears and the busy signal 24 becomes inactive.
Here, in FIG. 12, the synchronization signal 15 is intended to synchronize the program execution of the MPUA1 and the MPUB2, which will be described later.

かようなデュアルポートメモリの使用方法については従来から多くの発明が実施され、例えば特許文献1では、デュアルポートメモリが内蔵する調停機能を使用せず、2つのマイクロプロセッサ間にハードウェアによるフラグAおよびフラグBの接続を設け、ソフトウェアにより調停を行う発明が開示されている。デュアルポートメモリを使用するときは、競合状態における処理を確実に行うことが重要であり、該特許文献1はこれに着目したものと考えられる。 Many inventions have been conventionally made regarding such a method of using the dual port memory. For example, in Patent Document 1, the flag A by hardware is used between two microprocessors without using the arbitration function built in the dual port memory. And the invention in which the connection of the flag B is provided and the mediation is performed by software is disclosed. When using the dual port memory, it is important to surely perform the processing in the race condition, and it is considered that Patent Document 1 pays attention to this.

また特許文献2では、2つのマイクロプロセッサがデユアルポートメモリを経由して多量のデータの受け渡しを行おうとすると、デユアルポートメモリにデータの受け渡し処理のみで時間を費やしてしまい、主要な機能および性能に関する処理時間がなくなってしまう課題を挙げている。そしてこれの解決のために、2つのマイクロプロセッサ間にハードウェアによる割り込み信号の接続を設けて、同期アクセスと非同期アクセスにより課題を解消する発明が開示されている。 Further, in Patent Document 2, when two microprocessors try to transfer a large amount of data via the dual port memory, time is spent only in the data transfer process to the dual port memory, and the main functions and performances are related. It cites the problem of running out of processing time. Then, in order to solve this problem, an invention is disclosed in which an interrupt signal is connected by hardware between two microprocessors and the problem is solved by synchronous access and asynchronous access.

次に特許文献3では、2つのマイクロプロセッサ間のデータの書き込みおよび読み出しにおいて、データの同時性を保証しデータ転送の高速性を確保する課題を挙げている。そしてこれの解決のために、2つのマイクロプロセッサ間にハードウェアによる書き込みエリア選択信号生成回路を設けることにより、課題を解消する発明が開示されている。
Next, Patent Document 3 cites the problem of guaranteeing data simultaneity and ensuring high-speed data transfer in writing and reading data between two microprocessors. To solve this problem, an invention that solves the problem is disclosed by providing a write area selection signal generation circuit by hardware between two microprocessors.

特開平5−250250号公報Japanese Unexamined Patent Publication No. 5-250250 特開2000−242610号公報Japanese Unexamined Patent Publication No. 2000-242610 特開2007−328647号公報Japanese Unexamined Patent Publication No. 2007-328647

本発明の解決しようとする課題は、2つのMPUがDPMを経由して複数のデータの授受を行うとき、競合状態が発生してMPUの処理時間が長くなることがなきようにすること、データの同時性を確保すること、および種類が異なるDPMであっても新たなハードウェアの追加を不要とすることにある。次にこれらの課題の内容について、前記図12を参照しつつ図13および図14にてさらに詳細に説明を行う。 The problem to be solved by the present invention is to prevent a race condition from occurring and the processing time of the MPU from becoming long when two MPUs exchange a plurality of data via the DPM. The purpose is to ensure the simultaneity of the above, and to eliminate the need to add new hardware even for different types of DPM. Next, the contents of these problems will be described in more detail with reference to FIGS. 12 and 13 and 14.

始めに図13は前記図12の従来のDPMの使用例について、同期式の動作を説明するものであり、該図13の(a)、(b)、および(c)はそれぞれ前記MPUA1の処理、前記同期信号15、およびMPUB2の処理を時間の推移とともに表している。
そして該図13の(a)は、前記MPUA1が周期taにて時刻Ta1、Ta2、Ta3、およびTa4にて、順次a1、a2、a3、a4の処理を実行するとしている。そして処理a1において白抜きで示すta11は、前記MPUA1がMPUB2と競合状態に陥ることなく所定のジョブを実行するジョブ時間を表しており、網掛けで示すta13は前記MPUA1がMPUB2と競合状態が発生してウェイティングにより待機となったウェイティング時間の合計を表している。また図中のta12は余裕時間であり、前記ウェイティング時間ta13は該余裕時間ta12より短い必要がある。
First, FIG. 13 illustrates the synchronous operation of the conventional DPM usage example of FIG. 12, and FIGS. 13A, 13B, and 13C each process the MPUA1. , The processing of the synchronization signal 15, and MPUB2 is shown with the passage of time.
Then, in FIG. 13A, it is assumed that the MPUA1 sequentially executes the processes of a1, a2, a3, and a4 at the times Ta1, Ta2, Ta3, and Ta4 in the cycle ta. The ta11 shown in white in the process a1 represents the job time for executing a predetermined job without the MPUA1 competing with the MPUB2, and the shaded ta13 indicates that the MPUA1 competes with the MPUB2. It represents the total waiting time that was waited for by waiting. Further, ta12 in the figure is a margin time, and the waiting time ta13 needs to be shorter than the margin time ta12.

ここで前記処理a1にて説明を付加すると、MPUA1のウェイティングは前記時間(ta11+ta13)の全域において発生し得るものであり、該ウェィティングの発生により処理時間が長くなることを前記ta13に合計して表していることに注意が必要である。
そして、前記処理a2、a3、およびa4においても網掛け部分は、それぞれのウェイティング時間の合計を表している。
Here, if the description is added in the process a1, the waiting of the MPUA1 can occur in the entire range of the time (ta11 + ta13), and the fact that the processing time becomes longer due to the occurrence of the waiting is added to the ta13. It should be noted that it is represented.
Further, also in the processes a2, a3, and a4, the shaded portion represents the total waiting time of each.

次に前記図12の同期信号15は、該図13の(b)に示すとおり前記MPUA1が処理を開始するときに出力するフラグである。そして前記図13の(c)に示すように、前記MPUB2は該同期信号15に同期して、順次b1、b2、b3、b4の処理を実行する。ここで処理b1からb4において、白抜きの部分と網掛けの部分は前記MPUB2のそれぞれジョブ時間とウェイティング時間の合計である。 Next, the synchronization signal 15 of FIG. 12 is a flag output when the MPUA1 starts processing as shown in FIG. 13B. Then, as shown in FIG. 13 (c), the MPUB 2 sequentially executes the processes of b1, b2, b3, and b4 in synchronization with the synchronization signal 15. Here, in the processes b1 to b4, the white portion and the shaded portion are the total of the job time and the waiting time of the MPUB2, respectively.

該図13により上記で説明したとおり、前記MPUA1とMPUB2が前記DPM3を経由してデータの授受を行うときウェィティング時間が発生する。そして具体例を挙げれば、前記MPUA1はモータを駆動するインバータ装置を制御し、前記MPUB2はPROFIBUSなどの通信を制御するとき、前記MPUB2の動作により前記MPUA1のウェィティング時間、すなわち処理時間の長さが左右されることとなる。しかし前記MPUA1はインバータのパワー素子などの制御を行うもので、処理時間の長さが変更されるなど予期しない他からの影響は排除すべきである。
これにより本発明の第1の課題は、MPUにウェィティング時間が発生しないよう、DPMによる競合状態をなくすことである。
As described above with reference to FIG. 13, a waiting time occurs when the MPUA1 and the MPUB2 exchange data via the DPM3. Then, to give a specific example, when the MPUA1 controls an inverter device for driving a motor and the MPUB2 controls communication such as PROFIBUS, the waiting time of the MPUA1, that is, the length of the processing time is caused by the operation of the MPUB2. Will be affected. However, the MPUA1 controls the power element of the inverter, and unexpected influences such as a change in the length of the processing time should be eliminated.
Thereby, the first object of the present invention is to eliminate the race condition due to DPM so that the waiting time does not occur in the MPU.

次に本発明の第2の課題をふたたび前記図13にて説明する。前記MPUB2がMPUA1からデータを受け取るとき、該図13の(a)の処理a2と図13の(c)の処理b2のタイミングにて説明すると、前記MPUA1は処理a2において前記DPM3に全てのデータを時刻Ta2Eにてライトを完了する。これを換言すれば、時刻Ta2から時刻Ta2Eまでに前記MPUA1が前記DPM3にライトしたデータは、前記処理a1と処理a2によるものが混在することになる。 Next, the second problem of the present invention will be described again with reference to FIG. When the MPUB2 receives data from the MPUA1, the timing of the process a2 of FIG. 13A and the process b2 of FIG. 13C will be described. The MPUA1 transfers all the data to the DPM3 in the process a2. The light is completed at the time Ta2E. In other words, the data that the MPUA1 has written to the DPM3 from the time Ta2 to the time Ta2E is a mixture of the processing a1 and the processing a2.

したがって前記MPUB2は、処理b2において前記処理a1とa2による混在したデータをリードすることとなる。これは前記MPUB2が、例えば同一時刻のインバータの電流、電圧やトルク指令を受け取ろうとするときに同時性がなくなり障害となるものである。また、複数のデータにて1つの物理量とするときにも、前記処理a1とa2の処理によるデータが混在し支障が発生する。これにより本発明の第2の課題は、複数のデータについて同時性を確保することである。 Therefore, the MPUB2 reads the mixed data of the processes a1 and a2 in the process b2. This is an obstacle because the MPUB2 loses simultaneity when it tries to receive the current, voltage, or torque command of the inverter at the same time, for example. Further, even when a plurality of data are used as one physical quantity, the data obtained by the processes a1 and a2 are mixed and a problem occurs. Thereby, the second object of the present invention is to ensure the simultaneity of a plurality of data.

次に本発明の第3の課題は、前記図12におけるビジー信号14,15、および同期信号15のハードウェアによる接続をなくすことである。これによりビジー信号によるマイクロプロセッサのウェィティングのタイミング設計が不要となるとともに、どのようDPMの供給メーカや種類であっても同じようにデュアルポートメモリが使用可能となり、シンプルなDPMシステムを実現することができる。 Next, a third object of the present invention is to eliminate the hardware connection of the busy signals 14, 15 and the synchronization signal 15 in FIG. This eliminates the need to design the timing of weighting of the microprocessor by busy signals, and enables the same dual-port memory to be used regardless of the DPM supplier or type, realizing a simple DPM system. Can be done.

次に図14は、従来のDPMの使用例で非同期式の動作を説明するもので、前記図12において同期信号15を用いない場合である。該図14の(a)および(c)はそれぞれ前記MPUA1の処理、および前記MPUB2の処理を時間の推移とともに表している。そして、該図14の(a)MPUA1の処理に示すa1からa4、ta11、およびta13は、前記図13の(a)にて同じ符号を付すものと同じでありその説明は割愛する。また、該図14の(c)MPUB2の処理に示すb1からb4、tb11、およびtb13は、前記図13の(c)にて同じ符号を付すものと同じでありその説明は割愛する。
該図14で表すとおり前記MPDUA1とMPDUB2は、同期せずそれぞれの周期で処理を繰り返す。
Next, FIG. 14 illustrates the asynchronous operation in the conventional DPM usage example, and is the case where the synchronization signal 15 is not used in FIG. (A) and (c) of FIG. 14 represent the processing of the MPUA1 and the processing of the MPUB2 with the passage of time, respectively. The a1 to a4, ta11, and ta13 shown in the process of (a) MPUA1 in FIG. 14 are the same as those having the same reference numerals in (a) of FIG. 13, and the description thereof will be omitted. Further, b1 to b4, tb11, and tb13 shown in the process of (c) MPUB2 in FIG. 14 are the same as those having the same reference numerals in (c) of FIG. 13, and the description thereof will be omitted.
As shown in FIG. 14, the MPDUA1 and MPDUB2 are not synchronized and the processing is repeated in each cycle.

また、該図14のa1からa4、およびb1からb4において、白抜きで示す部分はジョブ時間を網掛けで示す部分はウェィティング時間の合計を表している。そして該図14においてもウェィティングが発生しているが、非同期式の場合でも本発明の第1の課題は、MPUにウェィティング時間が発生しないようDPMによる競合状態をなくすことである。 Further, in a1 to a4 and b1 to b4 of FIG. 14, the white portion represents the job time and the shaded portion represents the total waiting time. Although weighting also occurs in FIG. 14, the first problem of the present invention is to eliminate the race condition due to DPM so that the waiting time does not occur in the MPU even in the case of the asynchronous type.

次に該図14におけるデータの同時性について、前記MPUA1がMPUB2からデータを受け取る場合について説明する。始めに処理b2とa2において時刻T1は前記処理b2が終了する時刻であり、時刻T2は前記処理b3が開始する時刻である。そして前記処理a2にて、前記MPUA1がDPM3を経由してMPUB2から受け取るデータの内容をまとめると表1のとおりとなり、最悪のとき処理b1からb3のデータを混在して受け取ることとなる。これゆえ、非同期式の場合でも本発明の第2の課題は、複数のデータについて同時性を確保することである。
(表1)

Figure 0006885801
Next, regarding the simultaneity of the data in FIG. 14, the case where the MPUA1 receives the data from the MPUB2 will be described. First, in the processes b2 and a2, the time T1 is the time when the process b2 ends, and the time T2 is the time when the process b3 starts. Then, in the process a2, the contents of the data received by the MPUA1 from the MPUB2 via the DPM3 are summarized as shown in Table 1, and in the worst case, the data of the processes b1 to b3 are mixedly received. Therefore, even in the case of the asynchronous type, the second object of the present invention is to ensure the simultaneity of a plurality of data.
(Table 1)
Figure 0006885801

また、非同期式の前記図14においても第3の課題は、ビジー信号14および15のハードウェアによる接続をなくすことである。
Further, also in the asynchronous type FIG. 14, the third problem is to eliminate the hardware connection of the busy signals 14 and 15.

上記課題を本発明においては、次のように解決する。
(1)2つのマイクロプロセッサMPUA1およびMPUB2と、デュアルポートメモリにて構成されるマイクロプロセッサシステムにおいて、該MPUA1とMPUB2は該デュアルポートメモリを経由して複数のデータの授受を行うものである。
そして、前記デュアルポートメモリ内に、バンクAポインタ、バンクAメモリ、バンクBポインタ、およびバンクBメモリを設け、前記MPUA1は該バンクAポインタとバンクAメモリを用いて複数のデータを前記MPUB2に送り、前記MPUB2は該バンクBポインタとバンクBメモリを用いて複数のデータを前記MPUA1に送る機能を有している。
ここで前記バンクAメモリは、連続した複数のアドレスのメモリ領域を1つのバンクとして、バンクA0からバンクA(n−1)とn個の該バンクにて構成され、前記バンクAポインタは、前記MPUA1にて0から(n−1)の値を設定されて前記n個のバンクのうち1つのバンクを指定するものである。
そして前記MPUA1は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクAメモリ経由にて前記MPUB2に送るために、前記バンクAポインタが指定するバンクに複数のデータをライトする。次に、前記MPUA1はライトが終了した後、前記バンクAポインタの値を0から(n−1)の範囲で1だけ更新する。
また前記MPUB2は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクAメモリ経由にて前記MPUA1から受け取るとき、前記バンクAポインタが指定するバンクから1だけ前のバンクから複数のデータを処理の進捗に応じて逐次リードする。
一方前記バンクBメモリは、連続した複数のアドレスのメモリ領域を1つのバンクとして、バンクB0からバンクB(n−1)とn個の該バンクにて構成され、前記バンクBポインタは、前記MPUB2にて0から(n−1)の値を設定されて前記n個のバンクのうち1つのバンクを指定するものである。
そして前記MPUB2は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクBメモリ経由にて前記MPUA1に送るために、前記バンクBポインタが指定するバンクに複数のデータをライトする。次に、前記MPUB2はライトが終了した後、前記バンクBポインタの値を0から(n−1)の範囲で1だけ更新する。
また前記MPUA1は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクBメモリ経由にて前記MPUB2から受け取るとき、前記バンクBポインタが指定するバンクから1だけ前のバンクから複数のデータを処理の進捗に応じて逐次リードすることを特徴とするバンク方式のデュアルポートメモリである。
In the present invention, the above problems are solved as follows.
(1) In a microprocessor system composed of two microprocessors MPUA1 and MPUB2 and a dual port memory, the MPUA1 and MPUB2 exchange a plurality of data via the dual port memory.
Then, a bank A pointer, a bank A memory, a bank B pointer, and a bank B memory are provided in the dual port memory, and the MPUA1 sends a plurality of data to the MPUB2 using the bank A pointer and the bank A memory. The MPUB2 has a function of sending a plurality of data to the MPUA1 by using the bank B pointer and the bank B memory.
Here, the bank A memory is composed of banks A0 to banks A (n-1) and n of the banks, with memory areas of a plurality of consecutive addresses as one bank, and the bank A pointer is the same. A value from 0 to (n-1) is set in MPUA1 to specify one of the n banks.
Then, the MPUA1 writes a plurality of data to the bank designated by the bank A pointer in order to send the plurality of data to the MPUB2 via the bank A memory of the dual port memory for each process. Next, the MPUA1 updates the value of the bank A pointer by 1 in the range of 0 to (n-1) after the write is completed.
Further, when the MPUB2 receives a plurality of data from the MPUA1 via the bank A memory of the dual port memory for each process, the MPUB2 has a plurality of data from the bank one before the bank specified by the bank A pointer. Is sequentially read according to the progress of processing.
On the other hand, the bank B memory is composed of banks B0 to bank B (n-1) and n of the banks, with the memory areas of a plurality of consecutive addresses as one bank, and the bank B pointer is the MPUB2. In, a value from 0 to (n-1) is set to specify one of the n banks.
Then, the MPUB 2 writes a plurality of data to the bank designated by the bank B pointer in order to send the plurality of data to the MPUA 1 via the bank B memory of the dual port memory for each process. Next, the MPUB2 updates the value of the bank B pointer by 1 in the range of 0 to (n-1) after the write is completed.
Further, when the MPUA1 receives a plurality of data from the MPUB2 via the bank B memory of the dual port memory for each process, the MPUA1 receives a plurality of data from the bank one before the bank specified by the bank B pointer. This is a bank-type dual-port memory characterized in that the memory is sequentially read according to the progress of processing.

(2)上記(1)において、前記MPUA1およびMPUB2はそれぞれ、テンポラリメモリAおよびテンポラリメモリBを備えている。
前記MPUB2は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクAメモリ経由にて前記MPUA1から受け取るとき、前記バンクAポインタが指定するバンクから1だけ前のバンクから複数のデータを連続してリードし、前記テンポラリメモリBに一括にてセーブしたあと、処理の進捗に応じて逐次、前記テンポラリメモリBからデータをリードする。
また前記MPUA1は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクBメモリ経由にて前記MPUB2から受け取るとき、前記バンクBポインタが指定するバンクから1だけ前のバンクから複数のデータを連続してリードし、前記テンポラリメモリAに一括してセーブしたあと、処理の進捗に応じて逐次、前記テンポラリメモリAからデータをリードすることを特徴とするバンク方式のデュアルポートメモリである。
(2) In the above (1), the MPUA1 and the MPUB2 include a temporary memory A and a temporary memory B, respectively.
When the MPUB2 receives a plurality of data from the MPUA1 via the bank A memory of the dual port memory for each process, the MPUB2 receives a plurality of data from the bank one before the bank specified by the bank A pointer. After reading continuously and saving in the temporary memory B in a batch, data is read from the temporary memory B sequentially according to the progress of the process.
Further, when the MPUA1 receives a plurality of data from the MPUB2 via the bank B memory of the dual port memory for each process, the MPUA1 receives a plurality of data from the bank one before the bank specified by the bank B pointer. This is a bank-type dual-port memory characterized in that data is continuously read from the temporary memory A, and then data is sequentially read from the temporary memory A according to the progress of processing.

以上で説明したとおり、2つのマイクロプロセッサがデュアルポートメモリを経由して複数のデータを授受するとき、デュアルポートメモリの競合状態を解消してマイクロプロセッサはウェィティング状態に陥ることなく安定に動作することとなり、マイクロプロセッサによる制御の信頼性を向上させるものである。
また、2つのマイクロプロセッサが相互に授受するデータの同時性を保証し、正確なデータによる制御の実行や各種データのトレースを可能とする。
そして、マイクロプロセッサとデュアルポートメモリ間の信号の接続本数を最小限なものとし、供給メーカや種類に依存することなく、さまざまなデュアルポートメモリをマイクロプロセッサと最小限の接続にて使用可能とするものである。
As explained above, when two microprocessors send and receive multiple data via the dual port memory, the conflict state of the dual port memory is resolved and the microprocessor operates stably without falling into the waiting state. As a result, the reliability of control by the microprocessor is improved.
It also guarantees the simultaneity of data exchanged between the two microprocessors, enabling accurate data control execution and tracing of various data.
The number of signal connections between the microprocessor and the dual-port memory is minimized, and various dual-port memories can be used with the minimum connection with the microprocessor regardless of the supplier and type. It is a thing.

本発明によるバンク方式のDPMの実施例1の構成を説明する図(その1)である。It is a figure (the 1) explaining the structure of Example 1 of the bank type DPM by this invention. 本発明によるバンク方式のDPMの実施例1の構成を説明する図(その2)である。It is a figure (the 2) explaining the structure of Example 1 of the bank type DPM by this invention. 実施例1のデータ転送を説明する図(その1)である。It is a figure (the 1) explaining the data transfer of Example 1. FIG. 実施例1のデータ転送を説明する図(その2)である。It is a figure (the 2) explaining the data transfer of Example 1. FIG. 実施例1のデータ転送を説明する図(その3)である。It is a figure (the 3) explaining the data transfer of Example 1. FIG. 実施例1のデータ転送を説明する図(その4)である。It is a figure (the 4) explaining the data transfer of Example 1. FIG. 本発明によるバンク方式のDPMの実施例2の構成を説明する図(その1)である。It is a figure (the 1) explaining the structure of Example 2 of the bank type DPM by this invention. 本発明によるバンク方式のDPMの実施例2の構成を説明する図(その2)である。It is a figure (the 2) explaining the structure of Example 2 of the bank type DPM by this invention. 実施例2のデータ転送を説明する図(その1)である。It is a figure (the 1) explaining the data transfer of Example 2. FIG. 実施例2のデータ転送を説明する図(その2)である。It is a figure (the 2) explaining the data transfer of Example 2. FIG. 実施例2のデータ転送を説明する図(その3)である。FIG. 3 is a diagram (No. 3) for explaining the data transfer of the second embodiment. 従来のDPMの使用例を説明する図である。It is a figure explaining the use example of the conventional DPM. 従来のDPMの動作を説明する図(同期式)である。It is a figure (synchronous type) explaining the operation of the conventional DPM. 従来のDPMの動作を説明する図(非同期式)である。It is a figure (asynchronous type) explaining the operation of the conventional DPM.

以下に本発明を実施例の図を示して説明を行う。図1は本発明の実施例1を示し、図2、図3、図4、図5、および図6は該図1の動作を補足して説明し、図7は本発明の実施例2を示し、図8、図9、図10、および図11は該図7の動作を補足して説明するものである。
Hereinafter, the present invention will be described with reference to diagrams of examples. FIG. 1 shows Example 1 of the present invention, FIGS. 2, 3, 4, 5, and 6 supplementarily explain the operation of FIG. 1, and FIG. 7 shows Example 2 of the present invention. 8, FIG. 9, FIG. 10, and FIG. 11 supplementarily explain the operation of FIG. 7.

図1は、本発明によるバンク方式のデュアルポートメモリの実施例1の構成を説明する図である。該図1において、MPUA1、コントロールバス11、アドレスバス12、データバス13、およびMPUB2、コントロールバス21、アドレスバス22、データバス23は、前記図12で同じ符号を付すものと同じ機能を有しておりこれの説明は割愛する。またDPM3は、前記図12のDPM3と同じデユアルポートメモリの機能を持っているが、本発明は該DPM3の内部構成に特徴を有するものである。 FIG. 1 is a diagram illustrating a configuration of a first embodiment of a bank type dual port memory according to the present invention. In FIG. 1, the MPUA 1, the control bus 11, the address bus 12, the data bus 13, and the MPUB 2, the control bus 21, the address bus 22, and the data bus 23 have the same functions as those having the same reference numerals in FIG. I will omit the explanation of this. Further, the DPM3 has the same dual port memory function as the DPM3 of FIG. 12, but the present invention is characterized by the internal configuration of the DPM3.

該図1のDPM3において、31、32はそれぞれバンクAポインタ、バンクAメモリであり、これらは前記MPUA1から前記MPUB2へデータを送るためのものである。そして該バンクAメモリ32は、連続した複数のアドレスのメモリ領域を1つのバンクとして、バンクA0、バンクA1からバンクA(n−1)とn個のバンクにて構成されている。ここでバンクA0からバンクA(n−1)のそれぞれを総称してバンクAと表記する。 In DPM3 of FIG. 1, 31 and 32 are a bank A pointer and a bank A memory, respectively, and these are for sending data from the MPUA1 to the MPUB2. The bank A memory 32 is composed of banks A0, banks A1 to banks A (n-1), and n banks, with memory areas of a plurality of consecutive addresses as one bank. Here, each of banks A0 to A (n-1) is collectively referred to as bank A.

また説明を容易とするために数値例にて示せば、前記DPM3の物理的なデータサイズが1ワードのとき、前記バンクAポインタ31のサイズは1ワードであり、バンクA0からバンクA(n−1)のそれぞれのバンクAのサイズは連続したアドレスの40ワードなどである。このとき前記バンクAメモリ32のサイズは、(40×n)ワードとなる。
そして、前記バンクAポインタ31、バンクAメモリ32、およびバンクA0からバンクA(n−1)は、前記DPM3内にメモリマッピングしたものである。
Further, to simplify the explanation, if a numerical example is shown, when the physical data size of the DPM3 is 1 word, the size of the bank A pointer 31 is 1 word, and the bank A0 to the bank A (n−). The size of each bank A in 1) is, for example, 40 words of consecutive addresses. At this time, the size of the bank A memory 32 is (40 × n) words.
Then, the bank A pointer 31, the bank A memory 32, and the bank A0 to the bank A (n-1) are memory-mapped in the DPM3.

次に前記MPUA1が、複数のデータを前記DPM3経由にて前記MPUB2へ送る手順を、該図1中に示すaからeにて説明する。
a:前記MPUA1は、処理の始めに前記バンクAポインタ31をリードする。
b:前記MPUA1は、前記バンクA0からバンクA(n−1)のうち、
前記バンクAポインタ31が示すNO.のバンクAに
処理の進捗に応じて逐次、
前記MPUB2へ送る複数のデータをライトする。
c:前記MPUA1は、処理の終わりに前記バンクAポインタ31の値を
1だけ加算する。ただし加算の結果、値がn以上となったら
0を前記バンクAポインタ31にライトする。

d:前記MPUB2は、処理の始めに前記バンクAポインタ31をリードする。
e:前記MPUB2は、前記バンクA0からバンクA(n−1)のうち、
前記バンクAポインタ31が1から(n−1)のときは
1だけ減算したNO.のバンクAから、
前記バンクAポインタ31が0のときはバンクA(n−1)から、
処理の進捗に応じて逐次、複数のデータをリードする。

ここで前記MPUA1とMPUB2は、相互に非同期にてそれぞれの処理を実行するものである。また前記のcで、前記バンクAポインタ31の値を1だけ加算によるロータリーアップカウンタとしたが、これに換えて1だけ減算としてロータリーダウンカウンタとしてもよい。
Next, a procedure in which the MPUA1 sends a plurality of data to the MPUB2 via the DPM3 will be described with reference to a to e shown in FIG.
a: The MPUA1 reads the bank A pointer 31 at the beginning of processing.
b: The MPUA1 is among the banks A0 to A (n-1).
No. indicated by the bank A pointer 31. In bank A of
Write a plurality of data to be sent to the MPUB2.
c: The MPUA1 adds the value of the bank A pointer 31 by 1 at the end of processing. However, if the value becomes n or more as a result of the addition, 0 is written to the bank A pointer 31.

d: The MPUB 2 reads the bank A pointer 31 at the beginning of processing.
e: The MPUB2 is among the banks A0 to A (n-1).
When the bank A pointer 31 is 1 to (n-1), the NO. From Bank A of
When the bank A pointer 31 is 0, from bank A (n-1),
Multiple data are read sequentially according to the progress of processing.

Here, the MPUA1 and the MPUB2 execute their respective processes asynchronously with each other. Further, in c, the value of the bank A pointer 31 is added to the rotary up counter by adding 1, but instead of this, the value of the bank A pointer 31 may be subtracted by 1 to be used as the rotary down counter.

かようにして、前記MPUA1が複数のデータを前記DPM3経由にて前記MPUB2に送るとき、前記バンクAポインタ31に基づき、前記MPUA1がライトする前記バンクAと、前記MPUB2がリードする前記バンクAは必ず異なるので、前記DPM3において競合状態が発生することがなく、これにより前記MPUA1およびMPUB2がウェィティング状態に陥ることがない。
また、前記MPUB2は必ず、前記MPUA1がライトを完了したバンクAからデータをリードするので、複数のデータの同時性が確保される。
さらに前記図1に示したとおり、前記MPUA1とMPUB2間にはハードウェアによる接続はなく、これによりビジー信号によるマイクロプロセッサのウェィティングのタイミング設計が不要となるものである。
In this way, when the MPUA1 sends a plurality of data to the MPUB2 via the DPM3, the bank A written by the MPUA1 and the bank A read by the MPUB2 are based on the bank A pointer 31. Since they are always different, a race condition does not occur in the DPM3, so that the MPUA1 and the MPUB2 do not fall into a waiting state.
Further, since the MPUB2 always reads data from the bank A in which the MPUA1 has completed writing, the simultaneity of a plurality of data is ensured.
Further, as shown in FIG. 1, there is no hardware connection between the MPUA1 and the MPUB2, which eliminates the need for timing design of the weighting of the microprocessor by a busy signal.

次に、前記MPUB2から前記MPUA1へデータを送るための構成と手順について説明を行う。前記図1のDPM3において、33、34はそれぞれバンクBポインタ、バンクBメモリであり、これらは前記MPUB2から前記MPUA1へデータを送るためのものである。そして該バンクBメモリ34は、連続した複数のアドレスのメモリ領域を1つのバンクとして、バンクB0、バンクB1からバンクB(n−1)とn個のバンクにて構成されている。ここでバンクB0からバンクB(n−1)のそれぞれを総称してバンクBと表記する。 Next, a configuration and a procedure for sending data from the MPUB2 to the MPUA1 will be described. In DPM3 of FIG. 1, 33 and 34 are a bank B pointer and a bank B memory, respectively, and these are for sending data from the MPUB2 to the MPUA1. The bank B memory 34 is composed of banks B0, banks B1 to banks B (n-1), and n banks, with memory areas of a plurality of consecutive addresses as one bank. Here, each of bank B0 to bank B (n-1) is collectively referred to as bank B.

また説明を容易とするために数値例にて示せば、前記DPM3の物理的なデータサイズが1ワードのとき、前記バンクBポインタ33のサイズは1ワードであり、バンクB0からバンクB(n−1)のそれぞれのバンクBのサイズは連続したアドレスの40ワードなどである。このとき前記バンクBメモリ34のサイズは、(40×n)ワードとなる。
そして、前記バンクBポインタ33、バンクBメモリ34、およびバンクB0からバンクB(n−1)は、前記DPM3内にメモリマッピングしたものである。
Further, to simplify the explanation, if a numerical example is shown, when the physical data size of the DPM3 is 1 word, the size of the bank B pointer 33 is 1 word, and the size of the bank B0 to the bank B (n-). The size of each bank B in 1) is, for example, 40 words of consecutive addresses. At this time, the size of the bank B memory 34 is (40 × n) words.
Then, the bank B pointer 33, the bank B memory 34, and the bank B0 to the bank B (n-1) are memory-mapped in the DPM3.

次に図2にて、前記MPUB2が複数のデータを前記DPM3経由にて、前記MPUA1へ送る手順を説明する。該図2においてf、g、およびhは前記MPUB2がデータを前記DPM3にライトする手順を、iおよびjは前記MPUA1がデータを前記DPM3からリードする手順を示すものである。そして、該fからj以外の符号を付すものは、前記図1で同じ符号のものと同じ機能を有しこれの説明は割愛する。 Next, in FIG. 2, a procedure in which the MPUB2 sends a plurality of data to the MPUA1 via the DPM3 will be described. In FIG. 2, f, g, and h indicate a procedure in which the MPUB2 writes data to the DPM3, and i and j indicate a procedure in which the MPUA1 reads data from the DPM3. Those having a reference numeral other than f to j have the same function as those having the same reference numeral in FIG. 1, and the description thereof will be omitted.

次に、該図2中に示すfからjにて説明する。
f:前記MPUB2は、処理の始めに前記バンクBポインタ33をリードする。
g:前記MPUB2は、前記バンクB0からバンクB(n−1)のうち、
前記バンクBポインタ33が示すNO.のバンクBに
処理の進捗に応じて逐次、
前記MPUA1へ送る複数のデータをライトする。
h:前記MPUB2は、処理の終わりに前記バンクBポインタ33の値を
1だけ加算する。ただし加算の結果、値がn以上となったら
0を前記バンクBポインタ33にライトする。

i:前記MPUA1は、処理の始めに前記バンクBポインタ33をリードする。
j:前記MPUA1は、前記バンクB0からバンクB(n−1)のうち、
前記バンクBポインタ33が1から(n−1)のときは
1だけ減算したNO.のバンクBから、
前記バンクBポインタ33が0のときはバンクB(n−1)から、
処理の進捗に応じて逐次、複数のデータをリードする。

ここで前記MPUB2とMPUA1は、相互に非同期にてそれぞれの処理を実行するものである。また前記のhで、前記バンクBポインタ33の値を1だけ加算によるロータリーアップカウンタとしたが、これに換えて1だけ減算としてロータリーダウンカウンタとしてもよい。
Next, it will be described from f to j shown in FIG.
f: The MPUB 2 reads the bank B pointer 33 at the beginning of processing.
g: The MPUB2 is among the banks B0 to B (n-1) from the bank B0.
No. indicated by the bank B pointer 33. In bank B of
Write a plurality of data to be sent to the MPUA1.
h: The MPUB 2 adds the value of the bank B pointer 33 by 1 at the end of processing. However, if the value becomes n or more as a result of the addition, 0 is written to the bank B pointer 33.

i: The MPUA1 reads the bank B pointer 33 at the beginning of processing.
j: The MPUA1 is among the banks B0 to B (n-1).
When the bank B pointer 33 is 1 to (n-1), the NO. From Bank B
When the bank B pointer 33 is 0, from bank B (n-1),
Multiple data are read sequentially according to the progress of processing.

Here, the MPUB2 and the MPUA1 execute their respective processes asynchronously with each other. Further, in h, the value of the bank B pointer 33 is added to the rotary up counter by adding 1, but instead of this, the value of the bank B pointer 33 may be subtracted by 1 to be used as the rotary down counter.

かようにして、前記MPUB2が複数のデータを前記DPM3経由にて前記MPUA1に送るとき、前記バンクBポインタ33に基づき、前記MPUB2がライトする前記バンクBと、前記MPUA1がリードする前記バンクBは必ず異なるので、前記DPM3において競合状態は発生することがなく、これにより前記MPUB2およびMPUA1がウェィティング状態に陥ることがない。
また、前記MPUA1は必ず、前記MPUB2がライトを完了したバンクBからデータをリードするので、複数のデータの同時性が確保される。
さらに前記図2に示したとおり、前記MPUB2とMPUA1間にはハードウェアによる接続はなく、これによりビジー信号によるマイクロプロセッサのウェィティングのタイミング設計が不要となるものである。
In this way, when the MPUB2 sends a plurality of data to the MPUA1 via the DPM3, the bank B written by the MPUB2 and the bank B read by the MPUA1 are transferred based on the bank B pointer 33. Since they are always different, no race condition occurs in the DPM3, so that the MPUB2 and the MPUA1 do not fall into the waiting state.
Further, since the MPUA1 always reads data from the bank B in which the MPUB2 has completed writing, the simultaneity of a plurality of data is ensured.
Further, as shown in FIG. 2, there is no hardware connection between the MPU B2 and the MPU A1, which eliminates the need for timing design of the weighting of the microprocessor by the busy signal.

前記図1にて前記MPUA1から前記MPUB2へ、また前記図2にて前記MPUB2から前記MPUA1へデータを送るための構成と手順について説明を行った。この両者は類似の動作であるが、代表して前記図1について各状態の時間的遷移を図3、図4、図5、および図6に示し、さらに本発明の実施例1について説明を行う。 The configuration and procedure for sending data from the MPUA1 to the MPUB2 in FIG. 1 and from the MPUB2 to the MPUA1 in FIG. 2 have been described. Although both of these are similar operations, the temporal transition of each state with respect to FIG. 1 is shown in FIGS. 3, 4, 5, and 6, and the first embodiment of the present invention will be described. ..

始めに図3において(a)および(b)は、それぞれ前記図1のMPUA1が実行する処理、およびバンクAポインタ31の値の時間的推移を表している。そして、前記MPUA1は該図3の(a)に示すとおり、所定の周期にて処理A1、処理A2、処理A3、および処理A4と順次実行し、前記図13の(a)にて示したウェィティング時間はないものである。また図中の時刻TA1、TA2、TA3、およびTA4は、処理A1からA4がそれぞれ終了する時刻を表している。 First, in FIG. 3, (a) and (b) represent the process executed by the MPUA1 in FIG. 1, and the time transition of the value of the bank A pointer 31, respectively. Then, as shown in (a) of FIG. 3, the MPUA1 sequentially executes the processing A1, the processing A2, the processing A3, and the processing A4 at a predetermined cycle, and the way shown in the (a) of FIG. There is no ting time. Further, the times TA1, TA2, TA3, and TA4 in the figure represent the times when the processes A1 to A4 are completed, respectively.

次に前記図1において、前記バンクAメモリ32はn個のバンクにより構成されるものであるが、該図3ではnが4の場合で示している。そして、該図3の(b)バンクAポインタ31は前記時刻TA1まではバンクA2を指定しており、該図3の(a)においてMPUA1は、処理A1の進捗に応じて逐次、データを前記バンクA2にライトする。そして処理A1の終わりの時刻TA1にて、該図3の(b)バンクAポインタ31を1だけ加算して3とする。続いて該図3の(b)バンクAポインタ31は、時刻TA2、TA3、TA4において、それぞれ0、1、2と遷移する。 Next, in FIG. 1, the bank A memory 32 is composed of n banks, and is shown in FIG. 3 when n is 4. Then, the bank A pointer 31 of FIG. 3 (b) specifies the bank A2 until the time TA1, and in (a) of FIG. 3, the MPUA1 sequentially outputs data according to the progress of the process A1. Light to bank A2. Then, at the time TA1 at the end of the process A1, the bank A pointer 31 of FIG. 3 (b) is added by 1 to obtain 3. Subsequently, the bank A pointer 31 of FIG. 3 (b) transitions to 0, 1, and 2, respectively, at the times TA2, TA3, and TA4.

次に該図3の(c)および(d)は、それぞれ前記図1のMPUB2が実行する処理、および該MPUB2がアクセス(リード)するバンクAの時間的推移を表している。始めに前記MPUB2は該図3の(c)に示すとおり、所定の周期にて処理B1、処理B2、処理B3、および処理B4と順次実行し、前記図13の(c)にて示したウェィティング時間はないものである。また図中の時刻TB1、TB2、TB3、およびTB4は、それぞれ処理B1からB4が開始する時刻を表している。 Next, (c) and (d) of FIG. 3 represent the process executed by the MPUB 2 of FIG. 1, and the temporal transition of the bank A accessed (read) by the MPUB 2, respectively. First, as shown in (c) of FIG. 3, the MPUB2 sequentially executes processing B1, processing B2, processing B3, and processing B4 at a predetermined cycle, and the way shown in (c) of FIG. 13 There is no ting time. Further, the times TB1, TB2, TB3, and TB4 in the figure represent the times when the processes B1 to B4 start, respectively.

次に該図3の(d)は、前記MPUB2がリードするバンクAの遷移を示すが、どのバンクAからリードするかは処理の開始のときに決定する。これをさらに該図3の(c)、(d)にて説明すると、前記MPUB2は処理B1を開始するとき前記バンクAポインタ31の値3をリードし、これを1だけ減じた2、すなわちバンクA2からリードとし、処理B1の進捗に応じて逐次リードする。同様に前記MPUB2は、時刻TB2、TB3、およびTB4において、処理B2、B3、およびB4にてリードするバンクAをそれぞれバンクA3,バンクA0,およびバンクA0とするものである。 Next, FIG. 3D shows the transition of the bank A that the MPUB2 leads, and which bank A leads the bank A is determined at the start of the process. Further explaining this with reference to FIGS. 3 (c) and 3 (d), the MPUB 2 reads the value 3 of the bank A pointer 31 when the process B1 is started, and subtracts this by 1, that is, the bank. Leads are taken from A2, and the leads are sequentially read according to the progress of the process B1. Similarly, in the MPUB2, at the times TB2, TB3, and TB4, the banks A that are read in the processes B2, B3, and B4 are designated as banks A3, bank A0, and bank A0, respectively.

ここで該図3の(b)と(d)を対比すると、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは必ず相違している。これにより、前記DPM3において前記MPUA1と前記MPUB2による競合状態が発生することがなく、前記MPUA1およびMPUB2がともにウェィティング状態に陥ることがない。
また前記MPUB2は必ず、前記MPUA1がライトを完了したバンクAからデータをリードするので、複数のデータの同時性が確保される。
さらに前記バンクAポインタ31にてソフトウェアによる調停を行うので、前記MPUA1とMPUB2間にハードウェアによる接続と調停を不要とするものである。
Here, when (b) and (d) of FIG. 3 are compared, the bank A written by the MPUA1 and the bank A led by the MPUB2 are always different. As a result, the race condition between the MPUA1 and the MPUB2 does not occur in the DPM3, and both the MPUA1 and the MPUB2 do not fall into the waiting state.
Further, since the MPUB2 always reads data from the bank A in which the MPUA1 has completed writing, the simultaneity of a plurality of data is ensured.
Further, since the arbitration by software is performed by the bank A pointer 31, it is not necessary to connect and arbitrate by hardware between the MPUA1 and the MPUB2.

ここで該図3は、前記MPUA1とMPUB2が非同期で動作し、両者の処理時間が概ね等しい場合を想定している。また該図3の(d)の時刻TB4に続く網掛けは、前記MPUB2がリードするバンクA0が、前の時刻TB3から継続していることを示している。 Here, FIG. 3 assumes a case where the MPUA1 and the MPUB2 operate asynchronously and their processing times are substantially equal. Further, the shading following the time TB4 in FIG. 3D indicates that the bank A0 led by the MPUB2 continues from the previous time TB3.

前記図3にて前記図1における各状態の時間的推移を説明したが、続いて図4にて説明を行う。該図4の(a)、(b)、(c)、および(d)は前記図3のそれと同じ項目の時間的推移を表し、また該図4に符号を付すものは、前記図3に同じ符号を付すものと同じ機能や役割を有するものでその説明は割愛する。 The time transition of each state in FIG. 1 has been described with reference to FIG. 3, and then the transition with reference to FIG. 4 will be described. (A), (b), (c), and (d) of FIG. 4 represent the temporal transition of the same item as that of FIG. 3, and those having a reference numeral in FIG. 4 are shown in FIG. Those with the same reference numerals have the same functions and roles, and their explanations are omitted.

そして前記図3との相違は、該図4の(a)に示す前記MPUA1の処理時間が、該図4の(c)に示す前記MPUB2の処理時間より長い場合の時間的推移を示している。このとき該図4の(b)と(d)を対比すると、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは必ず相違している。これにより、前記DPM3において前記MPUA1と前記MPUB2による競合状態が発生することがなく、本発明の目的を達成することとなる。
ここで該図4の(d)の網掛けは、前記MPUB2がリードするバンクAが、一周期前の処理から継続していることを表している。
The difference from FIG. 3 shows the time transition when the processing time of the MPUA1 shown in FIG. 4A is longer than the processing time of the MPUB2 shown in FIG. 4C. .. At this time, when (b) and (d) of FIG. 4 are compared, the bank A written by the MPUA1 and the bank A led by the MPUB2 are always different. As a result, the object of the present invention can be achieved without causing a race condition between the MPUA1 and the MPUB2 in the DPM3.
Here, the shading in FIG. 4D indicates that the bank A led by the MPUB 2 continues from the processing one cycle before.

さらに、前記図1における各状態の時間的推移を、前記図3および図4に続いて図5にて説明する。該図5の(a)、(b)、(c)、および(d)は前記図3のそれと同じ項目の時間的推移を表し、また該図5に符号を付すもので、前記図3にて同じ符号を付すものはこれと同じ機能や役割を有しその説明は割愛する。 Further, the temporal transition of each state in FIG. 1 will be described with reference to FIG. 5 following FIGS. 3 and 4. (A), (b), (c), and (d) of FIG. 5 represent the temporal transition of the same item as that of FIG. Those with the same code have the same function and role, and the explanation is omitted.

そして前記図3、図4と該図5の相違は、該図5の(a)に示す前記MPUA1の処理時間が、該図5の(c)に示す前記MPUB2の処理時間より短い場合の時間的推移を示している。 The difference between FIGS. 3 and 4 and FIG. 5 is that the processing time of the MPUA1 shown in FIG. 5A is shorter than the processing time of the MPUB2 shown in FIG. 5C. It shows the transition.

ここで該図5の(b)と(d)を対比すると、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは常に必ず相違すべきが、時刻TA8からTB4において同じバンクA3となっている。これにより前記DPM3において、前記MPUA1と前記MPUB2にて競合状態が発生可能となって、本発明の目的の達成に支障となるものである。これの対策としてバンクAの数を増やせばよく、これについて図6にて説明を行う。 Here, when (b) and (d) of FIG. 5 are compared, the bank A written by the MPUA1 and the bank A led by the MPUB2 should always be different, but the same bank A3 is obtained from time TA8 to TB4. ing. As a result, in the DPM3, a race condition can occur between the MPUA1 and the MPUB2, which hinders the achievement of the object of the present invention. As a countermeasure against this, the number of banks A may be increased, which will be described with reference to FIG.

ここで前記TA8は、前記図5の(a)で処理A8が終了する時刻である。また、前記図5の(b)において網掛けで示すバンクAは、前記MPDUA1がバンクAにライトしても、前記MPDUB2がリードしないバンクAを表している。 Here, the TA8 is the time at which the process A8 ends in (a) of FIG. Further, the shaded bank A in FIG. 5B represents a bank A in which the MPDUB2 does not lead even if the MPDUA1 writes to the bank A.

前記図5においてバンクAの数は4であったが、これを5とした場合を図6に示して説明を行う。該図6の(a)、(b)、(c)、および(d)は前記図5のそれと同じ項目の時間的推移を表し、また該図6に符号を付すものは、前記図5にて同じ符号を付すものと同じ機能や役割を有しその説明は割愛する。 Although the number of banks A was 4 in FIG. 5, a case where this is set to 5 will be described with reference to FIG. (A), (b), (c), and (d) of FIG. 6 represent the temporal transition of the same item as that of FIG. 5, and those having a reference numeral in FIG. 6 are shown in FIG. It has the same function and role as those with the same code, and the explanation is omitted.

該図6の(b)において、バンクAポインタ31は0から4の範囲で遷移している。そして該図6の(b)と(d)を対比すると、時刻TA8からTB4のみならず全ての期間において、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは常に必ず相違している。 In FIG. 6B, the bank A pointer 31 transitions in the range of 0 to 4. Comparing (b) and (d) in FIG. 6, the bank A written by the MPUA1 and the bank A led by the MPUB2 are always different not only from time TA8 to TB4 but also in all periods. ..

かようにして、前記MPUA1が複数のデータを前記DPM3経由にて前記MPUB2に送るとき、前記バンクAポインタ31に基づき、前記MPUA1がライトする前記バンクAと、前記MPUB2がリードする前記バンクAは必ず異なるので、前記DPM3において競合状態が発生することがなく、これにより前記MPUA1およびMPUB2がウェィティング状態に陥ることがない。
また、前記MPUB2は必ず、前記MPUA1がライトを完了したバンクAからデータをリードするので、複数のデータの同時性が確保される。
さらに前記図1にて示したとおり、前記MPUA1とMPUB2間にはハードウェアによる接続はなく、これによりビジー信号によるマイクロプロセッサのウェィティングや割り込みのタイミング設計が不要となるものである。
In this way, when the MPUA1 sends a plurality of data to the MPUB2 via the DPM3, the bank A written by the MPUA1 and the bank A read by the MPUB2 are based on the bank A pointer 31. Since they are always different, a race condition does not occur in the DPM3, so that the MPUA1 and the MPUB2 do not fall into a waiting state.
Further, since the MPUB2 always reads data from the bank A in which the MPUA1 has completed writing, the simultaneity of a plurality of data is ensured.
Further, as shown in FIG. 1, there is no hardware connection between the MPUA1 and the MPUB2, which eliminates the need for weighting and interrupt timing design of the microprocessor by a busy signal.

ここまで図1の前記MPUA1から前記MPUB2へデータを送る構成について、前記図3から図6にて時間的推移の説明を行った。そして、図2に示した前記MPUB2から前記MPUA1へ、データを送る場合の時間的推移も前記図3から図6と同様である、 Up to this point, the temporal transition of the configuration for transmitting data from the MPUA1 in FIG. 1 to the MPUB2 has been described with reference to FIGS. 3 to 6. The time transition when data is sent from the MPUB 2 to the MPUA 1 shown in FIG. 2 is also the same as in FIGS. 3 to 6.

次に図7は、本発明によるバンク方式のデュアルポートメモリの実施例2の構成を説明する図である。該図7において、前記図1と同じ符号を付すものはこれと同じ機能を有しておりこれの説明は割愛する。そして該図7において16は、前記MPUA1が内蔵するか外部に配置するテンポラリメモリAである。同様に26は、前記MPUB2が内蔵するか外部に配置するテンポラリメモリBである。 Next, FIG. 7 is a diagram illustrating the configuration of the second embodiment of the bank type dual port memory according to the present invention. In FIG. 7, those having the same reference numerals as those in FIG. 1 have the same functions, and the description thereof will be omitted. And in FIG. 7, 16 is a temporary memory A which the MPUA1 is built in or is arranged outside. Similarly, reference numeral 26 denotes a temporary memory B built in or externally provided by the MPUB 2.

始めに前記MPUA1が、複数のデータを前記DPM3経由にて前記MPUB2へ送る手順を、該図7中に示すaからfにて説明する。

a:前記MPUA1は、処理の始めに前記バンクAポインタ31をリードする。
b:前記MPUA1は、前記バンクA0からバンクA(n−1)のうち、
前記バンクAポインタ31が示すNO.のバンクAに
処理の進捗に応じて逐次、
前記MPUB2へ送る複数のデータをライトする。
c:前記MPUA1は、処理の終わりに前記バンクAポインタ31の値を
1だけ加算する。ただし加算の結果、値がn以上となったら
0を前記バンクAポインタ31にライトする。

d:前記MPUB2は、処理の始めに前記バンクAポインタ31をリードする。
e:前記MPUB2は、前記バンクA0からバンクA(n−1)のうち、
前記バンクAポインタ31が1から(n−1)のときは
1だけ減算したNO.のバンクAから、
前記バンクAポインタ31が0のときはバンクA(n−1)から、
処理の始めに一括して、全てのデータをリードする。

f:前記MPUB2は、上記のeで一括してリードした全てのデータを、
前記テンポラリメモリB26にセーブし、
処理の進捗に応じて逐次、前記MPUA1からのデータを
前記テンポラリメモリB26からリードする。

ここで前記MPUA1とMPUB2は、相互に非同期にてそれぞれの処理を実行するものである。また前記のcで、前記バンクAポインタ31の値を1だけ加算によるロータリーアップカウンタとしたが、これに換えて1だけ減算としてロータリーダウンカウンタとしてもよい。
First, a procedure in which the MPUA1 sends a plurality of data to the MPUB2 via the DPM3 will be described with reference to a to f shown in FIG. 7.

a: The MPUA1 reads the bank A pointer 31 at the beginning of processing.
b: The MPUA1 is among the banks A0 to A (n-1).
No. indicated by the bank A pointer 31. In bank A of
Write a plurality of data to be sent to the MPUB2.
c: The MPUA1 adds the value of the bank A pointer 31 by 1 at the end of processing. However, if the value becomes n or more as a result of the addition, 0 is written to the bank A pointer 31.

d: The MPUB 2 reads the bank A pointer 31 at the beginning of processing.
e: The MPUB2 is among the banks A0 to A (n-1).
When the bank A pointer 31 is 1 to (n-1), the NO. From Bank A of
When the bank A pointer 31 is 0, from bank A (n-1),
Read all the data at once at the beginning of the process.

f: The MPUB2 collectively reads all the data read in the above e.
Saved in the temporary memory B26,
The data from the MPUA1 is sequentially read from the temporary memory B26 according to the progress of the processing.

Here, the MPUA1 and the MPUB2 execute their respective processes asynchronously with each other. Further, in c, the value of the bank A pointer 31 is added to the rotary up counter by adding 1, but instead of this, the value of the bank A pointer 31 may be subtracted by 1 to be used as the rotary down counter.

かようにして、前記MPUA1が複数のデータを前記DPM3経由にて前記MPUB2に送るとき、前記バンクAポインタ31に基づき、前記MPUA1がライトする前記バンクAと、前記MPUB2がリードする前記バンクAは必ず異なるので、前記DPM3において競合状態が発生することがなく、これにより前記MPUA1およびMPUB2がウェィティング状態に陥ることがない。
また、前記MPUB2は必ず、前記MPUA1がライトを完了したバンクAからデータをリードするので、複数のデータの同時性が確保される。
さらに該図7に示したとおり、前記MPUA1とMPUB2間にはハードウェアによる接続はなく、これによりビジー信号によるマイクロプロセッサのウェィティングのタイミング設計が不要となるものである。
In this way, when the MPUA1 sends a plurality of data to the MPUB2 via the DPM3, the bank A written by the MPUA1 and the bank A read by the MPUB2 are based on the bank A pointer 31. Since they are always different, a race condition does not occur in the DPM3, so that the MPUA1 and the MPUB2 do not fall into a waiting state.
Further, since the MPUB2 always reads data from the bank A in which the MPUA1 has completed writing, the simultaneity of a plurality of data is ensured.
Further, as shown in FIG. 7, there is no hardware connection between the MPUA1 and the MPUB2, which eliminates the need for timing design of the weighting of the microprocessor by the busy signal.

次に図8にて、前記MPUB2が複数のデータを前記DPM3経由にて、前記MPUA1へ送る手順を説明する。該図8においてh、i、およびjは前記MPUB2がデータを前記DPM3にライトする手順を、k、m、およびnは前記MPUA1がデータを前記DPM3からリードする手順を示すものである。そして、該hからn以外の符号を付すものは、前記図7で同じ符号のものと同じ機能を有しこれの説明は割愛する。 Next, in FIG. 8, a procedure in which the MPUB2 sends a plurality of data to the MPUA1 via the DPM3 will be described. In FIG. 8, h, i, and j indicate a procedure in which the MPUB2 writes data to the DPM3, and k, m, and n indicate a procedure in which the MPUA1 reads data from the DPM3. Those having a reference numeral other than h to n have the same function as those having the same reference numerals in FIG. 7, and the description thereof will be omitted.

そして、該図8中に示すhからnにて説明する。
h:前記MPUB2は、処理の始めに前記バンクBポインタ33をリードする。
i:前記MPUB2は、前記バンクB0からバンクB(n−1)のうち、
前記バンクBポインタ33が示すNO.のバンクBに
処理の進捗に応じて逐次、
前記MPUA1へ送る複数のデータをライトする。
j:前記MPUB2は、処理の終わりに前記バンクBポインタ33の値を
1だけ加算する。ただし加算の結果、値がn以上となったら
0を前記バンクBポインタ33にライトする。

k:前記MPUA1は、処理の始めに前記バンクBポインタ33をリードする。
m:前記MPUA1は、前記バンクB0からバンクB(n−1)のうち、
前記バンクBポインタ33が1から(n−1)のときは
1だけ減算したNO.のバンクBから、
前記バンクBポインタ33が0のときはバンクB(n−1)から、
処理の始めに一括して、全てのデータをリードする。

n:前記MPUA1は、上記のmで一括してリードした全てのデータを、
前記テンポラリメモリA16にセーブし、
処理の進捗に応じて逐次、前記MPUB2からのデータを
前記テンポラリメモリA16からリードする。

ここで前記MPUB2とMPUA1は、相互に非同期にてそれぞれの処理を実行するものである。また前記のjで、前記バンクBポインタ33の値を1だけ加算によるロータリーアップカウンタとしたが、これに換えて1だけ減算としてロータリーダウンカウンタとしてもよい。
Then, it will be described from h to n shown in FIG.
h: The MPUB 2 reads the bank B pointer 33 at the beginning of processing.
i: The MPUB2 is among the banks B0 to B (n-1).
No. indicated by the bank B pointer 33. In bank B of
Write a plurality of data to be sent to the MPUA1.
j: The MPUB 2 adds the value of the bank B pointer 33 by 1 at the end of processing. However, if the value becomes n or more as a result of the addition, 0 is written to the bank B pointer 33.

k: The MPUA1 reads the bank B pointer 33 at the beginning of processing.
m: The MPUA1 is among the banks B0 to B (n-1).
When the bank B pointer 33 is 1 to (n-1), the NO. From Bank B
When the bank B pointer 33 is 0, from bank B (n-1),
Read all the data at once at the beginning of the process.

n: The MPUA1 collectively reads all the data read in m above.
Save to the temporary memory A16,
The data from the MPUB 2 is sequentially read from the temporary memory A16 according to the progress of the processing.

Here, the MPUB2 and the MPUA1 execute their respective processes asynchronously with each other. Further, in the above j, the value of the bank B pointer 33 is set as a rotary up counter by adding only 1, but instead of this, it may be used as a rotary down counter by subtracting only 1.

かようにして、前記MPUB2が複数のデータを前記DPM3経由にて前記MPUA1に送るとき、前記バンクBポインタ33に基づき、前記MPUB2がライトする前記バンクBと、前記MPUA1がリードする前記バンクBは必ず異なるので、前記DPM3において競合状態は発生することがなく、これにより前記MPUB2およびMPUA1がウェィティング状態に陥ることがない。
また、前記MPUA1は必ず、前記MPUB2がライトを完了したバンクBからデータをリードするので、複数のデータの同時性が確保される。
さらに該図8に示したとおり、前記MPUB2とMPUA1間にはハードウェアによる接続はなく、これによりビジー信号によるマイクロプロセッサのウェィティングのタイミング設計が不要となるものである。
In this way, when the MPUB2 sends a plurality of data to the MPUA1 via the DPM3, the bank B written by the MPUB2 and the bank B read by the MPUA1 are transferred based on the bank B pointer 33. Since they are always different, no race condition occurs in the DPM3, so that the MPUB2 and the MPUA1 do not fall into the waiting state.
Further, since the MPUA1 always reads data from the bank B in which the MPUB2 has completed writing, the simultaneity of a plurality of data is ensured.
Further, as shown in FIG. 8, there is no hardware connection between the MPU B2 and the MPU A1, which eliminates the need for timing design of the weighting of the microprocessor by the busy signal.

本発明の実施例2について、前記図7により前記MPUA1から前記MPUB2へ、また前記図8により前記MPUB2から前記MPUA1へデータを送るための構成と手順について説明を行った。この両者は類似の動作であるが、代表して前記図7について各状態の時間的遷移を図9、図10、および図11に示し、さらに本発明の実施例2について説明を行う。 Regarding Example 2 of the present invention, the configuration and procedure for sending data from the MPUA1 to the MPUB2 according to FIG. 7 and from the MPUB2 to the MPUA1 according to FIG. 8 have been described. Although both of these operations are similar, the temporal transition of each state is shown in FIGS. 9, 10 and 11 as a representative of FIG. 7, and the second embodiment of the present invention will be described.

始めに図9について説明を行うが、該図9は実施例1の図3に対応している。さて該図9において(a)および(b)は、それぞれ前記図7のMPUA1が実行する処理、およびバンクAポインタ31の値の時間的推移を表している。そして、前記MPUA1は該図9の(a)に示すとおり、所定の周期にて処理A1、処理A2、処理A3、および処理A4と順次実行し、前記図13の(a)にて示したウェィティング時間はないものである。また図中の時刻TA1、TA2、TA3、およびTA4は、処理A1からA4がそれぞれ終了する時刻を表している。 First, FIG. 9 will be described, which corresponds to FIG. 3 of the first embodiment. By the way, in FIG. 9, (a) and (b) represent the process executed by the MPUA1 of FIG. 7, respectively, and the temporal transition of the value of the bank A pointer 31. Then, as shown in (a) of FIG. 9, the MPUA1 sequentially executes the processing A1, the processing A2, the processing A3, and the processing A4 at a predetermined cycle, and the way shown in the (a) of FIG. There is no ting time. Further, the times TA1, TA2, TA3, and TA4 in the figure represent the times when the processes A1 to A4 are completed, respectively.

次に前記図7において、前記バンクAメモリ32はn個のバンクにより構成されるものであるが、該図9ではnが4の場合で示している。そして、該図9の(b)バンクAポインタ31は前記時刻TA1まではバンクA2を指定しており、該図9の(a)においてMPUA1は、処理A1の進捗に応じて逐次、データを前記バンクA2にライトする。そして処理A1の終わりの時刻TA1にて、該図9の(b)バンクAポインタ31を1だけ加算して3とする。続いて該図9の(b)バンクAポインタ31は、時刻TA2、TA3、TA4において、それぞれ0、1、2と遷移する。 Next, in FIG. 7, the bank A memory 32 is composed of n banks, and is shown in FIG. 9 when n is 4. Then, the bank A pointer 31 of FIG. 9 (b) specifies the bank A2 until the time TA1, and in (a) of FIG. 9, the MPUA1 sequentially outputs data according to the progress of the process A1. Light to bank A2. Then, at the time TA1 at the end of the process A1, the bank A pointer 31 of FIG. 9 (b) is added by 1 to obtain 3. Subsequently, the bank A pointer 31 of FIG. 9 (b) transitions to 0, 1, and 2, respectively, at the times TA2, TA3, and TA4.

次に該図9の(c)および(d)は、それぞれ前記図7のMPUB2が実行する処理、および該MPUB2がアクセス(リード)するバンクAの時間的推移を表している。そして前記MPUB2は該図9の(c)に示すとおり、所定の周期にて処理B1、処理B2、処理B3、および処理B4と順次実行し、前記図13の(c)にて示したウェィティング時間はないものである。また図中の時刻TB1、TB2、TB3、およびTB4は、それぞれ処理B1からB4が開始する時刻を表している。 Next, (c) and (d) of FIG. 9 represent the process executed by the MPUB 2 of FIG. 7, respectively, and the temporal transition of the bank A accessed (read) by the MPUB 2. Then, as shown in FIG. 9 (c), the MPUB 2 sequentially executes the processes B1, the process B2, the process B3, and the process B4 at a predetermined cycle, and the waiting shown in the figure 13 (c). There is no time. Further, the times TB1, TB2, TB3, and TB4 in the figure represent the times when the processes B1 to B4 start, respectively.

次に該図9の(d)は、前記MPUB2がリードするバンクAの遷移を示すが、どのバンクAからリードするかは処理の開始のときに決定する。これをさらに該図9の(c)、(d)にて説明すると、前記MPUB2は処理B1を開始するとき前記バンクAポインタ31の値3をリードし、これを1だけ減じた2、すなわちバンクA2からリードとし、処理B1の始めにバンクA2の全てのデータを一括してリードし、前記テンポラリメモリ26に全てセーブする。そして前記MPUB2は処理B1の進捗に応じて逐次、前記テンポラリメモリ26から前記MPUA1のデータをリードする。 Next, FIG. 9D shows the transition of the bank A that the MPUB2 leads, and which bank A leads the bank A is determined at the start of the process. Further explaining this with reference to FIGS. 9 (c) and 9 (d), the MPUB 2 reads the value 3 of the bank A pointer 31 when the process B1 is started, and subtracts this by 1, that is, the bank. The read is performed from A2, all the data in the bank A2 is read at the beginning of the process B1, and all the data in the temporary memory 26 is saved. Then, the MPUB 2 sequentially reads the data of the MPUA 1 from the temporary memory 26 according to the progress of the process B1.

同様に前記MPUB2は、時刻TB2、TB3、およびTB4において、処理B2、B3、およびB4にて一括してリードするバンクAをそれぞれバンクA3,バンクA0,およびバンクA0とし、前記テンポラリメモリ26にセーブする。ここで該図9の(c)の各処理において網掛け部分は、前記MPUB2が一括してバンクAからリードし前記テンポラリメモリ26にセーブする時間を模擬的に表し短い時間である。すなわち本発明の実施例2では、前記MPUB2がバンクAを使用する時間を短くするものである。 Similarly, in the MPUB2, at the times TB2, TB3, and TB4, the banks A that are collectively read in the processes B2, B3, and B4 are set as banks A3, bank A0, and bank A0, respectively, and are saved in the temporary memory 26. To do. Here, in each process of FIG. 9C, the shaded portion is a short time that simulates the time that the MPUB 2 collectively reads from the bank A and saves it in the temporary memory 26. That is, in the second embodiment of the present invention, the time for the MPUB 2 to use the bank A is shortened.

ここで該図3の(b)と(d)を対比すると、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは必ず相違している。これにより、前記DPM3において前記MPUA1と前記MPUB2による競合状態が発生することがなく、前記MPUA1およびMPUB2がともにウェィティング状態に陥ることがない。
また前記MPUB2は必ず、前記MPUA1がライトを完了したバンクAからデータをリードするので、複数のデータの同時性が確保される。
さらに前記バンクAポインタ31にてソフトウェアによる調停を行うので、前記MPUA1とMPUB2間にハードウェアによる接続と調停を不要とするものである。
Here, when (b) and (d) of FIG. 3 are compared, the bank A written by the MPUA1 and the bank A led by the MPUB2 are always different. As a result, the race condition between the MPUA1 and the MPUB2 does not occur in the DPM3, and both the MPUA1 and the MPUB2 do not fall into the waiting state.
Further, since the MPUB2 always reads data from the bank A in which the MPUA1 has completed writing, the simultaneity of a plurality of data is ensured.
Further, since the arbitration by software is performed by the bank A pointer 31, it is not necessary to connect and arbitrate by hardware between the MPUA1 and the MPUB2.

ここで該図9は、前記MPUA1とMPUB2が非同期で動作し、両者の処理時間が概ね等しい場合を想定している。また該図9の(d)の時刻TB4に続く網掛けは、前記MPUB2がリードするバンクA0が、前の時刻TB3から継続していることを示している。 Here, FIG. 9 assumes a case where the MPUA1 and the MPUB2 operate asynchronously and their processing times are substantially equal. Further, the shading following the time TB4 in FIG. 9D indicates that the bank A0 led by the MPUB2 continues from the previous time TB3.

前記図9にて前記図7における各状態の時間的推移を説明した。続いて図10にて説明を行うが、該図10は実施例1の図4に対応している。さて該図10の(a)、(b)、(c)、および(d)は前記図9のそれと同じ項目の時間的推移を表し、また該図10に符号を付すものは、前記図9に同じ符号を付すものと同じ機能や役割を有するものでその説明は割愛する。 The time transition of each state in FIG. 7 has been described with reference to FIG. Subsequently, a description will be given with reference to FIG. 10, which corresponds to FIG. 4 of the first embodiment. By the way, (a), (b), (c), and (d) of FIG. 10 represent the temporal transition of the same item as that of FIG. It has the same function and role as the one with the same code, and the explanation is omitted.

そして前記図9との相違は、該図10の(a)に示す前記MPUA1の処理時間が、該図10の(c)に示す前記MPUB2の処理時間より長い場合の時間的推移を示している。このとき該図10の(b)と(d)を対比すると、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは必ず相違している。これにより、前記DPM3において前記MPUA1と前記MPUB2による競合状態が発生することがなく、本発明の目的を達成することとなる。
ここで該図10の(d)の網掛けは、前記MPUB2がリードするバンクAが、一周期前の処理から継続していることを表している。
The difference from FIG. 9 shows the time transition when the processing time of the MPUA1 shown in FIG. 10A is longer than the processing time of the MPUB2 shown in FIG. 10C. .. At this time, when (b) and (d) of FIG. 10 are compared, the bank A written by the MPUA1 and the bank A led by the MPUB2 are always different. As a result, the object of the present invention can be achieved without causing a race condition between the MPUA1 and the MPUB2 in the DPM3.
Here, the shading in FIG. 10D indicates that the bank A led by the MPUB 2 continues from the processing one cycle before.

さらに、前記図7における各状態の時間的推移を、前記図9および図10に続いて図11にて説明を行うが、該図11は実施例1の図5に対応している。さて該図11の(a)、(b)、(c)、および(d)は前記図9のそれと同じ項目の時間的推移を表し、また該図11に符号を付すもので、前記図9にて同じ符号を付すものはこれと同じ機能や役割を有しその説明は割愛する。 Further, the temporal transition of each state in FIG. 7 will be described with reference to FIG. 11 following FIGS. 9 and 10, but FIG. 11 corresponds to FIG. 5 of the first embodiment. By the way, (a), (b), (c), and (d) of FIG. 11 represent the temporal transition of the same item as that of FIG. 9, and the reference numeral is attached to FIG. Those with the same reference numerals have the same functions and roles, and their explanations are omitted.

そして前記図9、図10と該図11の相違は、該図11の(a)に示す前記MPUA1の処理時間が、該図9の(c)に示す前記MPUB2の処理時間より短い場合の時間的推移を示している。 The difference between FIGS. 9 and 10 and FIG. 11 is that the processing time of the MPUA1 shown in FIG. 11A is shorter than the processing time of the MPUB2 shown in FIG. 9C. It shows the transition.

ここで該図11の(b)と(d)を対比すると、前記MPUA1がライトするバンクAと前記MPUB2がリードするバンクAは常に必ず相違しており、前記図5にて問題となった時刻TA8からTB4においてもバンクAは相違している。
ここで前記TA8は、前記図11の(a)で処理A8が終了する時刻である。また、該図11の(b)において網掛けで示すバンクAは、前記MPDUA1がバンクAにライトしても、前記MPDUB2がリードしないバンクAを表している。
Here, when (b) and (d) of FIG. 11 are compared, the bank A written by the MPUA1 and the bank A led by the MPUB2 are always different, and the time at which the problem occurs in FIG. 5 Bank A is also different between TA8 and TB4.
Here, the TA8 is the time at which the process A8 ends in (a) of FIG. Further, the shaded bank A in FIG. 11B represents a bank A in which the MPDUB2 does not lead even if the MPDUA1 writes to the bank A.

かように本発明の実施例2では、2つのマイクロプロセッサにそれぞれテンポラリメモリを設けることにより、2つのマイクロプロセッサがデータの授受を行うとき、デュアルポートメモリにおいて確実に競合状態が発生することを解消するものである。
また、1つのマイクロプロセッサは必ず、他のマイクロプロセッサがライトを完了したデュアルポートメモリからデータをリードするので、複数のデータの同時性が確保される。
さらに、2つのマイクロプロセッサ間には割り込み信号やビジー信号などの接続がなく、よりシンプルなハードウェアを実現するものである。
As described above, in the second embodiment of the present invention, by providing the temporary memories in each of the two microprocessors, it is possible to solve the problem that a conflict state is surely generated in the dual port memory when the two microprocessors exchange data. Is what you do.
Also, since one microprocessor always reads data from the dual-port memory that the other microprocessor has completed writing, the simultaneity of a plurality of data is ensured.
Furthermore, there is no connection such as an interrupt signal or a busy signal between the two microprocessors, which realizes simpler hardware.

産業用の製造装置に使用されるインバータ、PLC、およびその他制御機器には、複数のマイクロプロセッサが組み込まれ、それぞれに適した処理を分担して実行している。そして、各マイクロプロセッサ間ではデータの授受が重要であるが、本発明のバンク方式のデュアルポートメモリを使用することにより、簡単で確実なデータの授受を実現する。
これにより、マイクロプロセッサシステムのハードウェアのみならず、相互に干渉しない複数のマイクロプロセッサのソフトウェアの組み込みを実現するものである。
Inverters, PLCs, and other control equipment used in industrial manufacturing equipment are equipped with a plurality of microprocessors, and the processing suitable for each is shared and executed. Data transfer between microprocessors is important, but by using the bank-type dual-port memory of the present invention, simple and reliable data transfer can be realized.
As a result, not only the hardware of the microprocessor system but also the software of a plurality of microprocessors that do not interfere with each other can be embedded.

1 MPUA
2 MPUB 11、21 コントロールバス
12、22 アドレスバス
13、23 データバス
14、24 ビジー信号
15 同期信号
16 テンポラリメモリA
26 テンポラリメモリB
3 DPM、またはデュアルポートメモリ
31 バンクAポインタ
32 バンクAメモリ
33 バンクBポインタ
34 バンクBメモリ
1 MPUA
2 MPUB 11, 21 Control bus 12, 22 Address bus 13, 23 Data bus 14, 24 Busy signal 15 Synchronous signal 16 Temporary memory A
26 Temporary memory B
3 DPM, or dual port memory
31 Bank A pointer 32 Bank A memory 33 Bank B pointer 34 Bank B memory

Claims (2)

2つのマイクロプロセッサMPUA1およびMPUB2と、デュアルポートメモリにて構成されるマイクロプロセッサシステムにおいて、該MPUA1とMPUB2は該デュアルポートメモリを経由して複数のデータの授受を行うものであって、
前記デュアルポートメモリ内に、バンクAポインタ、バンクAメモリ、バンクBポインタ、およびバンクBメモリを設け、前記MPUA1は該バンクAポインタとバンクAメモリを用いて複数のデータを前記MPUB2に送り、前記MPUB2は該バンクBポインタとバンクBメモリを用いて複数のデータを前記MPUA1に送る機能を有し、
前記バンクAメモリは、連続した複数のアドレスのメモリ領域を1つのバンクとして、バンクA0からバンクA(n−1)とn個の該バンクにて構成され、
前記バンクAポインタは、前記MPUA1にて0から(n−1)の値を設定されて前記n個のバンクのうち1つのバンクを指定するものであり、
前記MPUA1は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクAメモリ経由にて前記MPUB2に送るために、前記バンクAポインタが指定するバンクに複数のデータをライトする。そして、前記MPUA1はライトが終了した後、前記バンクAポインタの値を0から(n−1)の範囲で1だけ更新する。
そして前記MPUB2は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクAメモリ経由にて前記MPUA1から受け取るとき、前記バンクAポインタが指定するバンクから1だけ前のバンクから複数のデータを処理の進捗に応じて逐次リードする。
次に前記バンクBメモリは、連続した複数のアドレスのメモリ領域を1つのバンクとして、バンクB0からバンクB(n−1)とn個の該バンクにて構成され、
前記バンクBポインタは、前記MPUB2にて0から(n−1)の値を設定されて前記n個のバンクのうち1つのバンクを指定するものであり、
前記MPUB2は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクBメモリ経由にて前記MPUA1に送るために、前記バンクBポインタが指定するバンクに複数のデータをライトする。そして、前記MPUB2はライトが終了した後、前記バンクBポインタの値を0から(n−1)の範囲で1だけ更新する。
そして前記MPUA1は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクBメモリ経由にて前記MPUB2から受け取るとき、前記バンクBポインタが指定するバンクから1だけ前のバンクから複数のデータを処理の進捗に応じて逐次リードすることを特徴とするバンク方式のデュアルポートメモリ。
In a microprocessor system composed of two microprocessors MPUA1 and MPUB2 and a dual port memory, the MPUA1 and MPUB2 exchange a plurality of data via the dual port memory.
A bank A pointer, a bank A memory, a bank B pointer, and a bank B memory are provided in the dual port memory, and the MPUA1 sends a plurality of data to the MPUB 2 using the bank A pointer and the bank A memory. The MPUB2 has a function of sending a plurality of data to the MPUA1 using the bank B pointer and the bank B memory.
The bank A memory is composed of banks A0 to bank A (n-1) and n of the banks, with memory areas of a plurality of consecutive addresses as one bank.
The bank A pointer is set with a value from 0 to (n-1) in the MPUA1 to specify one of the n banks.
The MPUA1 writes a plurality of data to the bank designated by the bank A pointer in order to send the plurality of data to the MPUB2 via the bank A memory of the dual port memory for each process. Then, after the write is completed, the MPUA1 updates the value of the bank A pointer by 1 in the range of 0 to (n-1).
When the MPUB2 receives a plurality of data from the MPUA1 via the bank A memory of the dual port memory for each process, the MPUB2 has a plurality of data from the bank one before the bank specified by the bank A pointer. Is sequentially read according to the progress of processing.
Next, the bank B memory is composed of banks B0 to bank B (n-1) and n of the banks, with the memory areas of a plurality of consecutive addresses as one bank.
The bank B pointer is set with a value from 0 to (n-1) in the MPUB2 to specify one of the n banks.
The MPUB2 writes a plurality of data to the bank designated by the bank B pointer in order to send the plurality of data to the MPUA1 via the bank B memory of the dual port memory for each process. Then, after the write is completed, the MPUB2 updates the value of the bank B pointer by 1 in the range of 0 to (n-1).
When the MPUA1 receives a plurality of data from the MPUB2 via the bank B memory of the dual port memory for each process, the MPUA1 receives a plurality of data from the bank one before the bank specified by the bank B pointer. A bank-type dual-port memory characterized by sequentially reading according to the progress of processing.
請求項1において、
前記MPUA1およびMPUB2はそれぞれ、テンポラリメモリAおよびテンポラリメモリBを備え、
前記MPUB2は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクAメモリ経由にて前記MPUA1から受け取るとき、前記バンクAポインタが指定するバンクから1だけ前のバンクから複数のデータを連続してリードし、前記テンポラリメモリBに一括にてセーブしたあと、処理の進捗に応じて逐次、前記テンポラリメモリBからデータをリードし、
前記MPUA1は、1回の処理ごとに複数のデータを前記デュアルポートメモリのバンクBメモリ経由にて前記MPUB2から受け取るとき、前記バンクBポインタが指定するバンクから1だけ前のバンクから複数のデータを連続してリードし、前記テンポラリメモリAに一括してセーブしたあと、処理の進捗に応じて逐次、前記テンポラリメモリAからデータをリードすることを特徴とするバンク方式のデュアルポートメモリ。
In claim 1,
The MPUA1 and MPUB2 include a temporary memory A and a temporary memory B, respectively.
When the MPUB2 receives a plurality of data from the MPUA1 via the bank A memory of the dual port memory for each process, the MPUB2 receives a plurality of data from the bank one before the bank specified by the bank A pointer. After reading continuously and saving in the temporary memory B in a batch, data is read from the temporary memory B sequentially according to the progress of the process.
When the MPUA1 receives a plurality of data from the MPUB2 via the bank B memory of the dual port memory for each process, the MPUA1 receives a plurality of data from the bank one before the bank specified by the bank B pointer. A bank-type dual-port memory characterized in that data is read continuously from the temporary memory A after being continuously read and collectively saved in the temporary memory A, and then sequentially read from the temporary memory A according to the progress of processing.
JP2017124033A 2017-06-26 2017-06-26 Bank dual port memory Active JP6885801B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017124033A JP6885801B2 (en) 2017-06-26 2017-06-26 Bank dual port memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017124033A JP6885801B2 (en) 2017-06-26 2017-06-26 Bank dual port memory

Publications (2)

Publication Number Publication Date
JP2019008575A JP2019008575A (en) 2019-01-17
JP6885801B2 true JP6885801B2 (en) 2021-06-16

Family

ID=65026009

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017124033A Active JP6885801B2 (en) 2017-06-26 2017-06-26 Bank dual port memory

Country Status (1)

Country Link
JP (1) JP6885801B2 (en)

Also Published As

Publication number Publication date
JP2019008575A (en) 2019-01-17

Similar Documents

Publication Publication Date Title
US5021950A (en) Multiprocessor system with standby function
US4426681A (en) Process and device for managing the conflicts raised by multiple access to same cache memory of a digital data processing system having plural processors, each having a cache memory
US4380798A (en) Semaphore register including ownership bits
US10657039B2 (en) Control device for a motor vehicle
US9063907B2 (en) Comparison for redundant threads
JPH05197582A (en) Fault tolerant processor having majority decision system, whose dynamic reconstitution is possible
JP6535459B2 (en) Programmable logic controller, basic unit, control method and program
JPS5924462B2 (en) Shared memory access control method
JP2007219678A (en) Multilayer bus system
CN114253884B (en) FPGA-based multi-master-to-multi-slave access arbitration method, system and storage medium
WO1995006286A2 (en) Integrated multi-threaded host adapter
JPH0497472A (en) Semiconductor integrated circuit device
JP6885801B2 (en) Bank dual port memory
JPS6043546B2 (en) Data transfer error handling method
CN101446820B (en) Data communication and interrupt dispatch method and device for motion controller
JP2001005720A (en) Common memory access management device
EP0114839B1 (en) A high performance multi-processor system
JP2020140380A (en) Semiconductor device and debugging system
CN219349507U (en) Multiprocessor system, mainboard and electronic equipment
JP6626216B2 (en) controller
US7065669B2 (en) System and method for providing a write strobe signal to a receiving element before both an address and data signal
EP3327521B1 (en) Duplexing process control device
JPS5840619A (en) Sequence controller and its control method
JPS6232483B2 (en)
US20020069311A1 (en) Bus control device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200312

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20201225

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20210202

R155 Notification before disposition of declining of application

Free format text: JAPANESE INTERMEDIATE CODE: R155

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210513

R150 Certificate of patent or registration of utility model

Ref document number: 6885801

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150