JP3974370B2 - Master-slave communication method and system - Google Patents
Master-slave communication method and system Download PDFInfo
- Publication number
- JP3974370B2 JP3974370B2 JP2001320907A JP2001320907A JP3974370B2 JP 3974370 B2 JP3974370 B2 JP 3974370B2 JP 2001320907 A JP2001320907 A JP 2001320907A JP 2001320907 A JP2001320907 A JP 2001320907A JP 3974370 B2 JP3974370 B2 JP 3974370B2
- Authority
- JP
- Japan
- Prior art keywords
- master
- bus
- parity
- data
- address
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Bus Control (AREA)
- Information Transfer Systems (AREA)
- Small-Scale Networks (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、マスタ・スレーブ間通信方法及びそのシステムに関し、特に、マスタとスレーブ間をパラレルバスで接続し通信を行うマスタ・スレーブ間通信方法及びそのシステムに関する。
【0002】
【従来の技術】
通信装置や伝送装置などにおいては、プロセッサなどのマスタによって、装置内パッケージ等であるスレーブの監視及び制御を行っている。プロセッサなどのマスタと、被監視部であるスレーブとの通信方法としては、シリアル通信を行う方式と双方向パラレルバスにて接続しパラレル通信を行う方式とがある。
【0003】
一般的なプロセッサの構成においてはアドレスおよびデータはパラレルバスとして接続されるため、マスタ側であるプロセッサよりスレーブ側である被監視部との間をシリアル通信によってアクセスする方法では、純粋にアクセス時の信号転送に要する時間の他に、パラレル/シリアル相互変換に要する時間、送受信での同期確立のための手順に要する時間が必要となりアクセスの効率が低下してしまう。
【0004】
このため、アクセスの高速化を行うためには、アクセス通信路において高速信号の伝達が必要となるため、アクセス通信路の伝送特性が重要となってくる。従ってスレーブに対しスター型のポイント・ツー・ポイント接続とすることにより伝送特性を確保する方法が用いられてきたが、スター型のポイント・ツー・ポイント接続では、中心となるマスタに接続が集中するためスレーブつまり被監視パッケージの数が増えるに従い、マスタつまりプロセッサの回路規模が増大してしまう傾向があるという問題があった。
【0005】
図1は、従来のマスタ・スレーブ間通信方法を用いたバス構成の一例のブロック図を示す。同図中、マスタ10とスレーブ12a〜12xとの間は、アドレスバス14とデータバス16で接続されている。アドレスバス14は片方向バスで、マスタ10からスレーブ12a〜12xに信号を供給する。データバス16は双方向バスとなっており、ライト時はマスタ10からスレーブ12a〜12x側に信号を供給し、リード時はスレーブ12a〜12xからマスタ10側に信号を供給するよう、マスタ10,スレーブ12a〜12xそれぞれの内部でデータバス16に接続されたトライステートバッファ18,19a〜19xを切り替える。
【0006】
なお、図2に示すように、アドレスバス14は例えば24ビットであり、データバス16は例えば16ビットである。
【0007】
【発明が解決しようとする課題】
双方向パラレルバス構成とした場合、シリアル通信と同じクロック速度で通信できるデータ量を増やすことができる。監視通信路の接続本数は並列数に従って増えてしまうため、ポイント・ツー・マルチポイント接続にすることで、マスタであるプロセッサでの接続本数を抑えることができる。
【0008】
しかし、一般的に用いられている図1に示すような双方向パラレルバス構成とした場合はデータのリードとライトの切替制御、つまりトライステートバッファ18,19a〜19xの切替制御が必要であるため、切替に要する時間分のオーバーヘッドが発生してしまい、切替のタイミング制御が難しいなどの問題があり、アクセスの高速化を阻害するという問題があった。
【0009】
本発明は、上記の点に鑑みなされたものであり、従来と同等のビット数のバス構成で、バスの方向切替が不要となり、オーバーヘッドが削減され、データ通信の高速化を図ることができるマスタ・スレーブ間通信方法及びそのシステムを提供することを目的とする。
【0010】
【課題を解決するための手段】
請求項1,3に記載の発明は、マスタの出力するアドレスもしくはアドレス及びデータを前記複数のスレーブに供給する第1のバスと、前記複数のスレーブのいずれかが出力するデータを前記マスタに供給する第2のバスとを分離し、
前記マスタは、出力するアドレス及びデータからパリティを生成し前記アドレス及びデータに付加して前記第1のバスに出力し、
前記複数のスレーブは、前記第1のバスから供給されるアドレス及びデータからパリティを生成し前記第1のバスから供給されるアドレス及びデータに付加されたパリティと比較してエラー検出を行い、
前記複数のスレーブは、出力するデータからパリティを生成し前記データに付加して前記第2のバスに出力し、
前記マスタは、前記第2のバスから供給されるデータからパリティを生成し前記第2のバスから供給されるデータに付加されたパリティと比較してエラー検出を行い、
前記マスタは、前記第1のバスまたは第2のバスでエラーが検出されたとき、バスアクセスサイクルを終了することにより、
バスの方向切替が不要となるため切替制御に必要なタイミング計算が不要となりアクセスに要する制御を単純化することができ、また切替に伴うノイズが発生しないため、切替に必要としていたオーバーヘッドが削減され、データ通信の高速化を図ることが可能となり、エラー発生時に早急にバスアクセスサイクルを終了させることができる。
【0017】
請求項2,4に記載の発明では、マスタは、前記第1パリティ演算手段または第2パリティ演算手段でエラーが検出されたとき、異常の発生状態をスレーブ毎に保持することにより、
アクセス時にエラーが発生したスレーブを特定することが可能となる。
【0018】
【発明の実施の形態】
図3は、本発明のマスタ・スレーブ間通信方法を用いたバス構成の一実施例のブロック図を示す。同図中、マスタ20とスレーブ22a〜22xとの間は、アドレス/データバス24とデータバス26と制御線28で接続されている。アドレス/データバス24はマスタ20からスレーブ22a〜22xに信号を供給する片方向のバスであり、アドレス線とデータ線を共有してアドレスとデータとを時分割で送出することにより接続本数を削減している。データバス26はスレーブ22a〜22xからマスタ20に信号を供給する片方向のバスである。制御線28はマスタ20からスレーブ22a〜22xにリード/ライト制御信号及びストローブ信号を供給し、また、スレーブ22a〜22xからマスタ20に応答信号及びエラー信号を供給する。
【0019】
なお、図4に示すように、アドレス/データバス24は例えば24ビットにパリティ2ビットを加えた26ビットであり、データバス26は例えば16ビットにパリティ2ビットを加えた18ビットである。
【0020】
図5は、マスタ10の一実施例のブロック構成図を示す。同図中、ライト時にプロセッサ部30の出力するアドレス及び書き込みデータはアドレスバス31,双方向のデータバス32を通して変換部33に供給される。変換部33はアドレス及び書き込みデータを時分割でアドレス/データバス24及びパリティ生成部34に供給する。パリティ生成部34は時分割で供給されるアドレス,書き込みデータそれぞれから2ビットのパリティを生成してアドレス/データバス24に出力する。
【0021】
リード時には、プロセッサ部30はアドレスのみを出力し、変換部33はアドレスをアドレス/データバス24及びパリティ生成部34に供給し、パリティ生成部34は24ビットのアドレスから2ビットのパリティを生成してアドレス/データバス24に出力する。
【0022】
また、リード時にデータバス26を通して供給されるスレーブからの読み出しデータは変換部33及びパリティ演算部36に供給され、データバス26内の2ビットのパリティはパリティ演算部36に供給される。パリティ演算部36は16ビットの読み出しデータから2ビットのパリティを生成し、これをデータバス26内の2ビットのパリティと比較し、不一致の場合にのみエラー検出信号を変換部33に供給する。変換部33は上記エラー検出信号が供給されてないとき読み出しデータをデータバス32を通してプロセッサ部30に供給する。
【0023】
図6は、スレーブ22a〜22xの一実施例のブロック構成図を示す。同図中、ライト時にマスタからアドレス/データバス24を通して時分割で供給されるアドレス及び書き込みデータは変換部40及びパリティ演算部41に供給され、アドレス/データバス24内の2ビットのパリティはパリティ演算部41に供給される。パリティ演算部41は24ビットのアドレス,書き込みデータそれぞれから2ビットのパリティを生成し、これをアドレス/データバス24内の2ビットのパリティと比較し、不一致の場合にのみエラー検出信号を変換部40に供給する。
【0024】
変換部40は上記エラー検出信号が供給されてないときアドレス,書き込みデータそれぞれをラッチしてアドレスバス42,データバス43を通してレジスタ44に供給し、書き込みデータがレジスタ44に書き込まれる。
【0025】
リード時には、マスタからアドレス/データバス24を通して供給されるアドレスは変換部40及びパリティ演算部41に供給され、アドレス/データバス24内の2ビットのパリティはパリティ演算部41に供給される。パリティ演算部41は24ビットのアドレスから2ビットのパリティを生成し、これをアドレス/データバス24内の2ビットのパリティと比較し、不一致の場合にのみエラー検出信号を変換部40に供給する。
【0026】
変換部40は上記エラー検出信号が供給されてないときアドレスをラッチしてアドレスバス42を通してレジスタ44に供給し、レジスタ44の当該アドレスから読み出された読み出しデータはデータバス45を通して変換部40に供給される。変換部40は読み出しデータをデータバス26及びパリティ生成部46に供給する。パリティ生成部46は読み出しデータから2ビットのパリティを生成してデータバス26に出力する。
【0027】
次に、マスタ20からスレーブ22a〜22xのいずれかのレジスタ値を取得するリード時の動作について説明する。図7は、リード時のマスタの動作フローチャートを示す。
【0028】
ステップS1.プロセッサ部30よりアドレスが出力される
ステップS2.マスタ20内にてアドレスに対して付加するパリティ値の演算を行う。
【0029】
ステップS3.マスタ20より全スレーブ22a〜22xに対し制御線28で図9(B),(C)に示すストローブ制御信号およびリード/ライト制御信号を供給することによりリードアクセスの開始を通知する。なお、図9(A)にクロックを示す。
【0030】
ステップS4.上記ステップS3と同時にマスタ20よりアドレス/データバス24を通じて図9(D),(E)に示すアドレスおよび演算したパリティ値を送信する。このときの様子を図10に示す。
【0031】
ステップS5.以後、アドレスで指定したスレーブから応答信号が返送されるまで待機する。ただし、待機時間が予め定めた時間を超過した場合、プロセッサ部30はタイムアウト処理を実行してバスサイクルを終了し初期状態に復帰する。ここでアクセスしたスレーブ22a〜22xそれぞれ毎に異常結果をプロセッサ部30の内蔵レジスタに保持することで、タイムアウトの発生したスレーブを特定することが可能となる。
【0032】
図8は、リード時のスレーブの動作フローチャートを示す。
【0033】
ステップS6.各スレーブは供給されたアドレス値をデコードし、アクセス対象となるアドレスに対応するレジスタを持つスレーブは、受信アドレスのパリティ値の演算を行う。
【0034】
ステップS7.アクセス対象の当該スレーブで受信アドレスのパリティ演算結果が正常であれば、該当アドレスのレジスタの内容、すなわち返送データを読み出し、同時に読み出しデータに付加するパリティ値を演算する。
【0035】
ステップS8.図9(F),(G)に示す読み出しデータおよび付加パリティ値をデータバス26に送出するとともに、制御線28を通じて図9(H)に示す応答信号をマスタ20に通知する。このときの様子を図11に示す。
【0036】
ステップS9.ステップS6においてスレーブで受信アドレスのパリティ演算結果が異常であれば、制御線28を通じて応答信号をマスタに通知するとともに図9(I)に示すエラー信号をマスタ20に通知しアクセス異常の発生を通知する。
【0037】
なお、スレーブ側において応答信号を返送するまでの時間はスレーブ側のデバイスの応答時間により設定するものである。
【0038】
これにより、マスタは図7に示すステップS10〜S13の動作を行う。
【0039】
ステップS10.スレーブから応答信号が返送されたら、受信した読み出しデータのパリティ値の演算を行う。
【0040】
ステップS11.ステップS10における読み出しデータのパリティ演算結果が異常であれば、プロセッサ部30はパリティエラー処理としてバスサイクルを終了し、初期状態に復帰する。ここでアクセスしたスレーブ22a〜22xそれぞれ毎に異常結果をプロセッサ部30の内蔵レジスタに保持することで、アクセス時のパリティ異常の発生したスレーブを特定することが可能となる。
【0041】
ステップS12.ステップS10においてスレーブから応答信号と共にエラー信号が通知された場合、プロセッサ部30はパリティエラー処理としてバスサイクルを終了し、初期状態に復帰する。
【0042】
ステップS13.上記ステップS11,S12に該当しなければ、プロセッサ部30は読み出しデータを格納してアクセスサイクルを終了し、初期状態に復帰する。
【0043】
次に、マスタ20からスレーブ22a〜22xのいずれかのレジスタ値を設定するライト時の動作について説明する。
【0044】
図12は、リード時のマスタの動作フローチャートを示す。
【0045】
ステップS21.プロセッサ部30よりアドレスと書き込みデータが出力される。
【0046】
ステップS22.マスタ20内にてアドレスおよびデータに対して付加するパリティ値の演算を行う。
【0047】
ステップS23.マスタ20より全スレーブ22a〜22xに対し制御線28で図14(B),(C)に示すストローブ制御信号およびリード/ライト制御信号を供給することによりライトアクセスの開始を通知する。なお、図14(A)にクロックを示す。
【0048】
ステップS24.上記ステップS23と同時にマスタ20よりアドレス/データバス24を通じて図14(D)に示すようにアドレスおよび演算したパリティ値を送信する。
【0049】
ステップS25.マスタ20よりアドレス/データバス24を通じて図14(E)に示すようにデータおよび演算したパリティ値を送信する。
【0050】
ステップS26.以後、アドレスで指定したスレーブから応答信号が返送されるまで待機する。ただし、待機時間が予め定めた時間を超過した場合、プロセッサ部30はタイムアウト処理を実行してバスサイクルを終了し初期状態に復帰する。ここでアクセスしたスレーブ22a〜22xそれぞれ毎に異常結果をプロセッサ部30の内蔵レジスタに保持することで、タイムアウトの発生したスレーブを特定することが可能となる。
【0051】
図13は、ライト時のスレーブの動作フローチャートを示す。
【0052】
ステップS27.各スレーブはアドレス値をデコードし、アクセス対象のスレーブでは図14(F)に示すような選択信号を生成して、図14(G),(H)に示すようにアドレス及びデータをラッチする。アクセス対象となるアドレスに対応するレジスタを持つスレーブは受信アドレスのパリティ値の演算を行う。
【0053】
ステップS28.アクセス対象の当該スレーブは受信データのパリティ値の演算を行う。
【0054】
ステップS29.当該スレーブで受信アドレスおよび受信データのパリティ演算結果が正常であれば、図14(I)に示すようなライトパルスを生成して、該当レジスタにデータを書き込む。
【0055】
ステップS30.制御線28を通じて図14(J)に示す応答信号をマスタ20に通知する。
【0056】
ステップS31.ステップS27においてスレーブで受信アドレスまたは受信データのパリティ演算結果が異常であれば、制御線28を通じて応答信号をマスタに通知するとともに図14(K)に示すエラー信号をマスタ20に通知しアクセス異常の発生を通知する。
【0057】
これにより、マスタは次のステップS32,S33の動作を行う。
【0058】
ステップS32.スレーブから応答信号と共にアクセスエラーが通知された場合、プロセッサ部30はパリティエラー処理としてバスサイクルの終了を通知し、初期状態に復帰する。ここでアクセスしたスレーブ22a〜22xそれぞれ毎に異常結果をプロセッサ部30の内蔵レジスタに保持することで、アクセス時のパリティ異常の発生したスレーブを特定することが可能となる。
【0059】
ステップS33.上記ステップS32に該当しなければ、プロセッサ部30はアクセスサイクルを終了し、初期状態に復帰する。
【0060】
ところで、本発明では、アドレス/データバス24,データバス26それぞれが片方向のバスであるため、マスタ20内でデータバス26にトライステートバッファを設けてリード/ライトの切り替えを行う必要がない。このため、従来は図15(A)に示すクロックに対し、マスタ内のデータバスに設けたトライステートバッファでリード/ライト切り替えにを行うため図15(B)に示すように1クロック分の切り替え時間が必要であったが、本発明では図15(C)に示すように切り替え時間が不要となり、アクセスの高速化が可能となる。
【0061】
(付記1) 監視部であるマスタにより被監視部である複数のスレーブを監視及び制御するためのマスタ・スレーブ間通信方法において
前記マスタの出力するアドレスもしくはアドレス及びデータを前記複数のスレーブに供給する第1のバスと、前記複数のスレーブのいずれかが出力するデータを前記マスタに供給する第2のバスとを分離したことを特徴とするマスタ・スレーブ間通信方法。
【0062】
(付記2) 監視部であるマスタにより被監視部である複数のスレーブを監視及び制御するマスタ・スレーブ間通信システムにおいて
前記マスタの出力するアドレスもしくはアドレス及びデータを前記複数のスレーブに供給する第1のバスと、
前記第1のバスとは分離され前記複数のスレーブのいずれかが出力するデータを前記マスタに供給する第2のバスとを
有することを特徴とするマスタ・スレーブ間通信システム。
【0063】
(付記3) 付記2記載のマスタ・スレーブ間通信システムにおいて
前記マスタは、アドレスとデータを時分割で前記第1のバスに出力する時分割手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0064】
(付記4) 付記2または3記載のマスタ・スレーブ間通信システムにおいて
前記マスタは、出力するアドレス及びデータからパリティを生成し前記アドレス及びデータに付加して前記第1のバスに出力する第1パリティ生成手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0065】
(付記5) 付記4記載のマスタ・スレーブ間通信システムにおいて
前記複数のスレーブは、前記第1のバスから供給されるアドレス及びデータからパリティを生成し前記第1のバスから供給されるアドレス及びデータに付加されたパリティと比較してエラー検出を行う第1パリティ演算手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0066】
(付記6) 付記2または3記載のマスタ・スレーブ間通信システムにおいて
前記複数のスレーブは、出力するデータからパリティを生成し前記データに付加して前記第2のバスに出力する第2パリティ生成手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0067】
(付記7) 付記6記載のマスタ・スレーブ間通信システムにおいて
前記マスタは、前記第2のバスから供給されるデータからパリティを生成し前記第2のバスから供給されるデータに付加されたパリティと比較してエラー検出を行う第2パリティ演算手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0068】
(付記8) 付記5または7記載のマスタ・スレーブ間通信システムにおいて
前記マスタは、前記第1パリティ演算手段または第2パリティ演算手段でエラーが検出されたとき、バスアクセスサイクルを終了する終了手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0069】
(付記9) 付記8記載のマスタ・スレーブ間通信システムにおいて
前記マスタは、前記第1パリティ演算手段または第2パリティ演算手段でエラーが検出されたとき、異常の発生状態をスレーブ毎に保持する保持手段を
有することを特徴とするマスタ・スレーブ間通信システム。
【0070】
なお、アドレス/データバス24が請求項記載の第1のバスに対応し、データバス26が第2のバスに対応し、変換部33が時分割手段に対応し、パリティ生成部34が第1パリティ生成手段に対応し、パリティ生成部46が第2パリティ生成手段に対応し、パリティ演算部41が第1パリティ演算手段に対応し、パリティ演算部36が第2パリティ演算手段に対応し、ステップS11,S12,S32,S33が終了手段に対応し、プロセッサ部30の内蔵レジスタが保持手段に対応する。
【0071】
【発明の効果】
上述の如く、請求項1,3記載の発明は、バスの方向切替が不要となるため切替制御に必要なタイミング計算が不要となりアクセスに要する制御を単純化することができ、また切替に伴うノイズが発生しないため、切替に必要としていたオーバーヘッドが削減され、データ通信の高速化を図ることが可能となり、エラー発生時に早急にバスアクセスサイクルを終了させることができる。
【0076】
請求項2,4に記載の発明では、アクセス時にエラーが発生したスレーブを特定することが可能となる。
【図面の簡単な説明】
【図1】従来のマスタ・スレーブ間通信方法を用いたバス構成の一例のブロック図である。
【図2】従来のバス構成を説明するための図である。
【図3】本発明のマスタ・スレーブ間通信方法を用いたバス構成の一実施例のブロック図である。
【図4】本発明のバス構成を説明するための図である。
【図5】マスタの一実施例のブロック構成図である。
【図6】スレーブの一実施例のブロック構成図である。
【図7】リード時のマスタの動作フローチャートである。
【図8】リード時のスレーブの動作フローチャートである。
【図9】リード時の信号タイミングチャートである。
【図10】マスタからアドレスおよびデータを送信するときの様子を示す図である。
【図11】スレーブからデータを送信するときの様子を示す図である。
【図12】ライト時のマスタの動作フローチャートである。
【図13】ライト時のスレーブの動作フローチャートである。
【図14】ライト時の信号タイミングチャートである。
【図15】本発明の効果を説明するための図である。
【符号の説明】
20 マスタ
22a〜22x スレーブ
24 アドレス/データバス
26 データバス
28 制御線
30 プロセッサ部
31,42 アドレスバス
32,43,45 データバス
33,40 変換部
34 パリティ生成部
36,41 パリティ演算部
44 レジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a master / slave communication method and system, and more particularly, to a master / slave communication method and system for performing communication by connecting a master and a slave via a parallel bus.
[0002]
[Prior art]
In a communication apparatus, a transmission apparatus, and the like, a slave such as an in-apparatus package is monitored and controlled by a master such as a processor. As a communication method between a master such as a processor and a slave which is a monitored unit, there are a method of performing serial communication and a method of performing parallel communication by connecting with a bidirectional parallel bus.
[0003]
In a general processor configuration, the address and data are connected as a parallel bus. Therefore, the method of accessing the monitored part on the slave side from the processor on the master side by serial communication is purely at the time of access. In addition to the time required for signal transfer, the time required for parallel / serial mutual conversion and the time required for the procedure for establishing synchronization in transmission / reception are required, and access efficiency is reduced.
[0004]
For this reason, in order to increase the access speed, it is necessary to transmit a high-speed signal in the access communication path, so that the transmission characteristics of the access communication path are important. Therefore, a method of ensuring transmission characteristics by using a star-type point-to-point connection to the slave has been used, but in a star-type point-to-point connection, the connection is concentrated on the central master. Therefore, there is a problem that the circuit scale of the master, that is, the processor tends to increase as the number of slaves, that is, monitored packages increases.
[0005]
FIG. 1 is a block diagram showing an example of a bus configuration using a conventional master-slave communication method. In the figure, the
[0006]
As shown in FIG. 2, the
[0007]
[Problems to be solved by the invention]
When the bidirectional parallel bus configuration is used, the amount of data that can be communicated at the same clock speed as that of serial communication can be increased. Since the number of connections in the monitoring communication path increases according to the number of parallel connections, the number of connections in the master processor can be suppressed by using point-to-multipoint connection.
[0008]
However, in the case of the generally used bidirectional parallel bus configuration as shown in FIG. 1, switching control of data read and write, that is, switching control of the tri-state
[0009]
The present invention has been made in view of the above points, and has a bus configuration with the same number of bits as the conventional one, which eliminates the need for switching the bus direction, reduces overhead, and can achieve high-speed data communication. -It aims at providing the communication method between slaves, and its system.
[0010]
[Means for Solving the Problems]
According to the first and third aspects of the present invention, a first bus that supplies an address or address and data output from the master to the plurality of slaves, and data output from any of the plurality of slaves is supplied to the master. Separating from the second bus ,
The master generates parity from the output address and data, adds the parity to the address and data, and outputs the parity to the first bus.
The plurality of slaves generate a parity from the address and data supplied from the first bus and perform error detection in comparison with the parity added to the address and data supplied from the first bus;
The plurality of slaves generate parity from the output data, add the parity to the data, and output to the second bus,
The master performs error detection by generating parity from data supplied from the second bus and comparing with parity added to data supplied from the second bus;
The master terminates the bus access cycle when an error is detected on the first bus or the second bus,
Since there is no need to switch the bus direction, the timing calculation required for switching control is not required, and the control required for access can be simplified. In addition, the noise required for switching is not generated, reducing the overhead required for switching. , can increase the speed of data communication and Do Ri, it can be finished as soon as possible bus access cycle when an error occurs.
[0017]
In the second and fourth aspects of the invention, when an error is detected by the first parity calculation unit or the second parity calculation unit, the master holds an abnormality occurrence state for each slave.
It becomes possible to identify the slave in which an error occurred during access.
[0018]
DETAILED DESCRIPTION OF THE INVENTION
FIG. 3 shows a block diagram of an embodiment of a bus configuration using the master-slave communication method of the present invention. In the figure, the
[0019]
As shown in FIG. 4, the address /
[0020]
FIG. 5 shows a block diagram of an embodiment of the
[0021]
At the time of reading, the
[0022]
Also, read data from the slave supplied through the
[0023]
FIG. 6 shows a block diagram of an embodiment of the
[0024]
When the error detection signal is not supplied, the
[0025]
At the time of reading, the address supplied from the master through the address /
[0026]
When the error detection signal is not supplied, the
[0027]
Next, an operation at the time of reading from the
[0028]
Step S1. An address is output from the
[0029]
Step S3. The
[0030]
Step S4. Simultaneously with step S3, the addresses shown in FIGS. 9D and 9E and the calculated parity values are transmitted from the
[0031]
Step S5. Thereafter, it waits until a response signal is returned from the slave designated by the address. However, when the standby time exceeds a predetermined time, the
[0032]
FIG. 8 shows an operation flowchart of the slave at the time of reading.
[0033]
Step S6. Each slave decodes the supplied address value, and the slave having a register corresponding to the address to be accessed calculates the parity value of the received address.
[0034]
Step S7. If the parity calculation result of the received address is normal in the slave to be accessed, the contents of the register at the corresponding address, that is, the return data is read, and the parity value added to the read data is calculated at the same time.
[0035]
Step S8. The read data and additional parity values shown in FIGS. 9F and 9G are sent to the
[0036]
Step S9. If the parity calculation result of the received address is abnormal in the slave in step S6, the response signal is notified to the master through the
[0037]
The time until the response signal is returned on the slave side is set according to the response time of the device on the slave side.
[0038]
As a result, the master performs the operations of steps S10 to S13 shown in FIG.
[0039]
Step S10. When a response signal is returned from the slave, the parity value of the read data received is calculated.
[0040]
Step S11. If the parity calculation result of the read data in step S10 is abnormal, the
[0041]
Step S12. When the error signal is notified together with the response signal from the slave in step S10, the
[0042]
Step S13. If it does not correspond to the above steps S11 and S12, the
[0043]
Next, an operation at the time of writing for setting any register value from the
[0044]
FIG. 12 shows an operational flowchart of the master at the time of reading.
[0045]
Step S21. An address and write data are output from the
[0046]
Step S22. A parity value added to the address and data is calculated in the
[0047]
Step S23. The
[0048]
Step S24. Simultaneously with step S23, the address and the calculated parity value are transmitted from the
[0049]
Step S25. Data and the calculated parity value are transmitted from the
[0050]
Step S26. Thereafter, it waits until a response signal is returned from the slave designated by the address. However, when the standby time exceeds a predetermined time, the
[0051]
FIG. 13 shows an operation flowchart of the slave at the time of writing.
[0052]
Step S27. Each slave decodes the address value, and the slave to be accessed generates a selection signal as shown in FIG. 14 (F) and latches the address and data as shown in FIGS. 14 (G) and 14 (H). A slave having a register corresponding to the address to be accessed calculates the parity value of the received address.
[0053]
Step S28. The slave to be accessed calculates the parity value of the received data.
[0054]
Step S29. If the parity calculation result of the received address and received data is normal in the slave, a write pulse as shown in FIG. 14I is generated and data is written to the corresponding register.
[0055]
Step S30. A response signal shown in FIG. 14J is notified to the
[0056]
Step S31. When the parity calculation result of the received address or received data is abnormal in the slave in step S27, a response signal is notified to the master through the
[0057]
As a result, the master performs the operations of the following steps S32 and S33.
[0058]
Step S32. When an access error is notified together with the response signal from the slave, the
[0059]
Step S33. If the above step S32 is not applicable, the
[0060]
In the present invention, since each of the address /
[0061]
(Supplementary Note 1) In a master-slave communication method for monitoring and controlling a plurality of slaves as monitored units by a master as a monitoring unit, an address or address and data output from the master are supplied to the plurality of slaves. A master-slave communication method characterized by separating a first bus and a second bus for supplying data output from any of the plurality of slaves to the master.
[0062]
(Supplementary Note 2) In a master-slave communication system in which a master serving as a monitoring unit monitors and controls a plurality of slaves serving as monitored units, a first address or address and data output from the master is supplied to the plurality of slaves. And the bus
A master-slave communication system comprising: a second bus that is separated from the first bus and supplies data output from any of the plurality of slaves to the master.
[0063]
(Supplementary note 3) The master-slave communication system according to supplementary note 2, wherein the master has time division means for outputting addresses and data to the first bus in a time division manner. .
[0064]
(Supplementary Note 4) In the master-slave communication system according to Supplementary Note 2 or 3, the master generates a parity from the output address and data, adds the parity to the address and data, and outputs the first parity to the first bus. A master-slave communication system characterized by comprising generation means.
[0065]
(Supplementary Note 5) In the master-slave communication system according to Supplementary Note 4, the plurality of slaves generate a parity from the address and data supplied from the first bus and supply the address and data from the first bus. A master-slave communication system comprising: first parity calculation means for performing error detection in comparison with the parity added to.
[0066]
(Supplementary Note 6) In the master-slave communication system according to Supplementary Note 2 or 3, the plurality of slaves generate a parity from the output data, add the parity to the data, and output the second bus to the second bus A master-slave communication system comprising:
[0067]
(Supplementary note 7) In the master-slave communication system according to
[0068]
(Supplementary Note 8) In the master-slave communication system according to Supplementary Note 5 or 7, the master includes termination means for terminating a bus access cycle when an error is detected by the first parity calculation means or the second parity calculation means. A master-slave communication system characterized by comprising:
[0069]
(Supplementary note 9) In the master-slave communication system according to supplementary note 8, when the master detects an error in the first parity calculation means or the second parity calculation means, the master holds the state of occurrence of abnormality for each slave. A master-slave communication system characterized by comprising means.
[0070]
The address /
[0071]
【The invention's effect】
As described above, according to the first and third aspects of the invention, it is not necessary to switch the bus direction, so that the timing calculation required for the switching control is not required, and the control required for access can be simplified. because There does not occur, reduces the overhead that was required for switching, can increase the speed of data communication and do Ri, it can be finished as soon as possible bus access cycle when an error occurs.
[0076]
According to the second and fourth aspects of the present invention, it is possible to specify a slave in which an error has occurred during access.
[Brief description of the drawings]
FIG. 1 is a block diagram of an example of a bus configuration using a conventional master-slave communication method.
FIG. 2 is a diagram for explaining a conventional bus configuration;
FIG. 3 is a block diagram of an embodiment of a bus configuration using the master-slave communication method of the present invention.
FIG. 4 is a diagram for explaining a bus configuration of the present invention.
FIG. 5 is a block diagram of an embodiment of a master.
FIG. 6 is a block diagram of an embodiment of a slave.
FIG. 7 is an operation flowchart of the master at the time of reading.
FIG. 8 is an operation flowchart of a slave at the time of reading.
FIG. 9 is a signal timing chart at the time of reading.
FIG. 10 is a diagram illustrating a state when an address and data are transmitted from a master.
FIG. 11 is a diagram illustrating a state when data is transmitted from a slave.
FIG. 12 is an operation flowchart of the master at the time of writing.
FIG. 13 is an operation flowchart of a slave at the time of writing.
FIG. 14 is a signal timing chart during writing.
FIG. 15 is a diagram for explaining the effect of the present invention.
[Explanation of symbols]
20
Claims (4)
前記マスタの出力するアドレスもしくはアドレス及びデータを前記複数のスレーブに供給する第1のバスと、前記複数のスレーブのいずれかが出力するデータを前記マスタに供給する第2のバスとを分離し、
前記マスタは、出力するアドレス及びデータからパリティを生成し前記アドレス及びデータに付加して前記第1のバスに出力し、
前記複数のスレーブは、前記第1のバスから供給されるアドレス及びデータからパリティを生成し前記第1のバスから供給されるアドレス及びデータに付加されたパリティと比較してエラー検出を行い、
前記複数のスレーブは、出力するデータからパリティを生成し前記データに付加して前記第2のバスに出力し、
前記マスタは、前記第2のバスから供給されるデータからパリティを生成し前記第2のバスから供給されるデータに付加されたパリティと比較してエラー検出を行い、
前記マスタは、前記第1のバスまたは第2のバスでエラーが検出されたとき、バスアクセスサイクルを終了することを特徴とするマスタ・スレーブ間通信方法。In a master-slave communication method for monitoring and controlling a plurality of slaves that are monitored units by a master that is a monitoring unit, a first bus that supplies addresses or addresses and data output from the master to the plurality of slaves And a second bus that supplies data output from any of the plurality of slaves to the master ,
The master generates parity from the output address and data, adds the parity to the address and data, and outputs the parity to the first bus.
The plurality of slaves generate a parity from the address and data supplied from the first bus and perform error detection in comparison with the parity added to the address and data supplied from the first bus;
The plurality of slaves generate parity from the output data, add the parity to the data, and output to the second bus,
The master performs error detection by generating parity from data supplied from the second bus and comparing with parity added to data supplied from the second bus;
The master-slave communication method, wherein the master terminates a bus access cycle when an error is detected on the first bus or the second bus .
前記マスタは、前記第1のバスまたは第2のバスでエラーが検出されたとき、異常の発生状態をスレーブ毎に保持する
ことを特徴とするマスタ・スレーブ間通信方法。 In the master-slave communication method according to claim 1,
The master holds an abnormality occurrence state for each slave when an error is detected on the first bus or the second bus.
A master-slave communication method characterized by the above.
前記マスタの出力するアドレスもしくはアドレス及びデータを前記複数のスレーブに供給する第1のバスと、
前記第1のバスとは分離され前記複数のスレーブのいずれかが出力するデータを前記マスタに供給する第2のバスと、
前記マスタは、出力するアドレス及びデータからパリティを生成し前記アドレス及びデータに付加して前記第1のバスに出力する第1パリティ生成手段と、
前記複数のスレーブは、前記第1のバスから供給されるアドレス及びデータからパリティを生成し前記第1のバスから供給されるアドレス及びデータに付加されたパリティと比較してエラー検出を行う第1パリティ演算手段を
前記複数のスレーブは、出力するデータからパリティを生成し前記データに付加して前記第2のバスに出力する第2パリティ生成手段と、
前記マスタは、前記第2のバスから供給されるデータからパリティを生成し前記第2のバスから供給されるデータに付加されたパリティと比較してエラー検出を行う第2パリティ演算手段と、
前記マスタは、前記第1パリティ演算手段または第2パリティ演算手段でエラーが検出されたとき、バスアクセスサイクルを終了する終了手段を
有することを特徴とするマスタ・スレーブ間通信システム。 In a master-slave communication system that monitors and controls a plurality of slaves that are monitored units by a master that is a monitoring unit
A first bus for supplying an address or address and data output by the master to the plurality of slaves;
A second bus that is separated from the first bus and supplies the master with data output from any of the plurality of slaves;
The master generates first parity from the address and data to be output, adds the parity to the address and data, and outputs to the first bus; and
The plurality of slaves generate a parity from the address and data supplied from the first bus and perform error detection by comparing with a parity added to the address and data supplied from the first bus. Parity calculation means
The plurality of slaves generate second parity generation means for generating parity from the data to be output, adding the parity to the data, and outputting the data to the second bus;
The master generates a parity from data supplied from the second bus, and performs error detection in comparison with the parity added to the data supplied from the second bus;
The master has end means for ending a bus access cycle when an error is detected by the first parity calculation means or the second parity calculation means.
A master-slave communication system characterized by comprising:
前記マスタは、前記第1パリティ演算手段または第2パリティ演算手段でエラーが検出されたとき、異常の発生状態をスレーブ毎に保持する保持手段を
有することを特徴とするマスタ・スレーブ間通信システム。 The master-slave communication system according to claim 2,
The master-slave communication system characterized in that the master has holding means for holding an abnormality occurrence state for each slave when an error is detected by the first parity calculation means or the second parity calculation means .
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001320907A JP3974370B2 (en) | 2001-10-18 | 2001-10-18 | Master-slave communication method and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2001320907A JP3974370B2 (en) | 2001-10-18 | 2001-10-18 | Master-slave communication method and system |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2003124951A JP2003124951A (en) | 2003-04-25 |
JP3974370B2 true JP3974370B2 (en) | 2007-09-12 |
Family
ID=19138219
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2001320907A Expired - Fee Related JP3974370B2 (en) | 2001-10-18 | 2001-10-18 | Master-slave communication method and system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP3974370B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP6440475B2 (en) * | 2014-12-05 | 2018-12-19 | 日本無線株式会社 | Parallel communication device and parallel communication method |
-
2001
- 2001-10-18 JP JP2001320907A patent/JP3974370B2/en not_active Expired - Fee Related
Also Published As
Publication number | Publication date |
---|---|
JP2003124951A (en) | 2003-04-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1825382B1 (en) | Low protocol, high speed serial transfer for intra-board or inter-board data communication | |
US7650450B2 (en) | Serial bus system | |
EP0258872B1 (en) | Serial data transfer system | |
JP2738106B2 (en) | Multiplex communication controller | |
US6119183A (en) | Multi-port switching system and method for a computer bus | |
JP2000013414A (en) | Intra-device supervisory and control system | |
KR19990060566A (en) | Information exchange device between processes using internet | |
JP3974370B2 (en) | Master-slave communication method and system | |
JPH01208924A (en) | Apparatus for detecting and alarming error | |
JP2008187711A (en) | Communication gateway between two entities | |
US20020174282A1 (en) | Multiprocessor system | |
JP3459075B2 (en) | Synchronous serial bus method | |
JP3516422B2 (en) | System and method for interfacing peripheral circuits to a RISC bus using another bus template in a data communication adapter | |
JPH02219151A (en) | Computer input/output system and its channel diagnostics | |
JP2708366B2 (en) | Data processing system and auxiliary control device | |
WO1999044142A2 (en) | Interfacing peripheral devices via a slave group interface device to a bus | |
JPH05346810A (en) | Output abnormality processing system for programmable controller | |
KR960016659B1 (en) | Control bus apparatus of a processor in an exchanger | |
JP2000295114A (en) | Data transfer circuit | |
JPS6010379A (en) | Data transfer system of data processing system | |
JPH0554749B2 (en) | ||
JP2000003312A (en) | Synchronous serial communication system and control method therefor | |
JP2001297057A (en) | Bus controller | |
JPH04223733A (en) | Serial communication system | |
JPH10154971A (en) | Multiplex communication equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20041007 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20061013 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20061024 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20061222 |
|
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: 20070605 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070614 |
|
R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 Ref document number: 3974370 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100622 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110622 Year of fee payment: 4 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120622 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120622 Year of fee payment: 5 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130622 Year of fee payment: 6 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140622 Year of fee payment: 7 |
|
LAPS | Cancellation because of no payment of annual fees |