JP2006252282A - Data processing module - Google Patents
Data processing module Download PDFInfo
- Publication number
- JP2006252282A JP2006252282A JP2005069213A JP2005069213A JP2006252282A JP 2006252282 A JP2006252282 A JP 2006252282A JP 2005069213 A JP2005069213 A JP 2005069213A JP 2005069213 A JP2005069213 A JP 2005069213A JP 2006252282 A JP2006252282 A JP 2006252282A
- Authority
- JP
- Japan
- Prior art keywords
- buffer
- message
- preparation information
- signal
- cpu
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、データ処理モジュールに関する。 The present invention relates to a data processing module.
近年、通信プロトコルとして、マルチマスタの通信プロトコルが注目されている。マルチマスタの通信プロトコルは、バスが解放されているときに、バスに接続されている複数の通信ノードのいずれもがデータをバス上に送信することができ、システムの柔軟性が高い等の特徴がある。このようなマルチマスタの通信プロトコルは、自動車内のECU(電子制御ユニット)間のシリアル通信プロトコルとして用いられており、通信ノードの増減が簡単にできる等、システムの柔軟性が高いため、上記した自動車分野に止まらず、FA(Factory Automation)、船舶、医療機器といった分野の通信プロトコルとしても有望視されている。 In recent years, multi-master communication protocols have attracted attention as communication protocols. Multi-master communication protocol is characterized in that when the bus is released, any of a plurality of communication nodes connected to the bus can transmit data on the bus, and the system is highly flexible. There is. Such a multi-master communication protocol is used as a serial communication protocol between ECUs (electronic control units) in an automobile, and can be easily increased or decreased in communication nodes. In addition to the automobile field, it is also promising as a communication protocol in fields such as FA (Factory Automation), ships, and medical equipment.
図8は、従来のCANの構成を模式的に示したブロック図である。CANモジュール11、1n、16は、通信ノードであり、CANトランシーバ60を介してCANバスに接続することが可能である。CANバスは、サブネットワークを構成する。各CANモジュール11、1n、16は、CPU I/F(インターフェース)40を介してCPU51との間で、メッセージを送受信することが可能である。また、CANモジュール19は、メッセージの受信のみを選択的に行うことが可能である。
FIG. 8 is a block diagram schematically showing the configuration of a conventional CAN. The CAN modules 11, 1 n, and 16 are communication nodes, and can be connected to the CAN bus via the
CANモジュール11、1n、16は、メッセージハンドリング部2と、メッセージバッファ3と、CANプロトコル送信層4と、マスクセット5と、を備える。メッセージハンドリング部2は、受信したメッセージをメッセージバッファ3(の所定アドレスのバッファ)にストアする処理や、メッセージバッファ3にストアされたメッセージから送信候補となるメッセージを選択する処理等を行う。メッセージバッファ3は、所定数のメッセージを格納することが可能なバッファであり、所定数のバッファに区切られており、バッファごとにアドレスが付与されている(図9参照)。メッセージは、識別子(ID)、コントロールフィールド(制御セグメント)、メッセージ本文の順に並べられた情報である(図9参照)。各バッファには、メッセージの他に、メッセージハンドリング部2に対し送信又は受信の準備ができたか否かを示す準備情報(RDY)が格納されている(図9参照)。準備情報(RDY)は、レベル「1」のときにメッセージハンドリング部2に対し送信又は受信の準備ができたことを示し、レベル「0」のときにメッセージハンドリング部2に対し送信又は受信の準備ができていないことを示す。メッセージバッファ3には、データや信号を同期させるためのクロック信号が反転して入力される(図9参照)。CANプロトコル送信層4は、CANプロトコルに従ってCANトランシーバとデータの送受信を行う。マスクセット5は、メッセージの所定部分(例えばIDの一部)をマスクする際に用いられる。
The CAN modules 11, 1 n, and 16 include a message handling unit 2, a
しかしながら、従来のCANモジュールでは、例えば、アドレス#nのバッファ内の準備情報(RDY#n)がレベル「1」のときでも、アドレス#nのバッファに対して、CPUからの(データ用)ライト信号が入力される(CPUがアクセスする)ことにより、CPUによるデータ(メッセージ)の書き込みが可能であった(図10参照)。そのため、誤ってCPUがバッファに新たなデータを書き込んだとき(上書きしたとき)に、送信の際に書き込まれた新たなデータを送信してしまうおそれがあり、また、誤った受信データを基準に受信格納の誤判断を行うおそれがあった。すなわち、準備状態(準備完了)となりメッセージハンドリング部にて送信又は受信の制御可能な状態となったバッファでも、CPUによる自由な書き換えが可能であったため、メッセージハンドリング部が送信又は受信処理をしようとしているときにもCPUによる書き換えが行われ、送信データが破壊されたり、受信データが上書きされてしまうなどの問題があった。 However, in the conventional CAN module, for example, even when the preparation information (RDY # n) in the buffer at address #n is level “1”, the write (for data) from the CPU to the buffer at address #n is performed. When a signal is input (accessed by the CPU), data (message) can be written by the CPU (see FIG. 10). For this reason, when the CPU erroneously writes new data to the buffer (overwriting), there is a risk of transmitting the new data written at the time of transmission, and based on erroneous received data. There was a risk of misjudgment of receiving and storing. In other words, even in a buffer that is in a ready state (preparation complete) and in a state in which transmission or reception can be controlled by the message handling unit, the CPU can freely rewrite, so the message handling unit tries to perform transmission or reception processing. There is a problem that the rewriting by the CPU is performed even when the data is transmitted, and the transmission data is destroyed or the reception data is overwritten.
また、従来のCANモジュールでは、例えば、アドレス#nのバッファ内の準備情報(RDY#n)に対して、CPUからの(RDY用)ライト信号が入力されることにより、CPUによる書き換えがいかなるタイミングでも可能であった(RDYが1→0に書き換わる例につき図11参照)。そのため、メッセージハンドリング部による送信ロード又は受信格納動作とタイミングが競合した場合に、バッファ内の準備情報(RDY)とデータ(メッセージ)の対応関係が保てなくなるおそれがあった。 In the conventional CAN module, for example, when a write signal (for RDY) is input from the CPU to the preparation information (RDY # n) in the buffer at the address #n, the rewriting by the CPU is performed at any timing. However, it was possible (see FIG. 11 for an example in which RDY is rewritten from 1 to 0). Therefore, when the timing conflicts with the transmission load or reception storage operation by the message handling unit, there is a possibility that the correspondence between the preparation information (RDY) in the buffer and the data (message) cannot be maintained.
以上のような問題が生ずるのは、メッセージバッファからCANバスへのメッセージの出力と、メッセージバッファへのCPUからのメッセージの書き込みが非同期で行われていたからである。 The above problem occurs because the message output from the message buffer to the CAN bus and the message writing from the CPU to the message buffer are performed asynchronously.
本発明の第1の視点においては、マルチマスタ方式のネットワークに接続されるデータ処理モジュールにおいて、所定数のバッファに区切られるとともに、前記バッファごとにアドレスが付与され、かつ、前記バッファごとにメッセージを格納することが可能なメッセージバッファと、前記バッファごとに対応して所定数設けられるとともに、送信又は受信の準備ができたか否かを知らせるための準備情報を保持する準備情報保持部と、前記バッファごとに対応して所定数設けられるとともに、前記準備情報が送信又は受信の準備ができていることを示しているときに、CPUから前記メッセージバッファへのライト信号の入力をマスクするマスク回路部と、を備え、前記ライト信号は、前記CPUから発信された信号であって前記バッファ内にデータを書き込むための信号であることを特徴とする。 In a first aspect of the present invention, a data processing module connected to a multi-master network is partitioned into a predetermined number of buffers, an address is given to each buffer, and a message is sent to each buffer. A message buffer that can be stored, a predetermined number corresponding to each buffer, a preparation information holding unit that holds preparation information for informing whether transmission or reception is ready, and the buffer A mask circuit unit that masks the input of a write signal from the CPU to the message buffer when the preparation information indicates that the preparation is ready for transmission or reception. The write signal is a signal transmitted from the CPU and the buffer Characterized in that it is a signal for writing data into.
本発明の第2の視点においては、マルチマスタ方式のネットワークに接続されるデータ処理モジュールにおいて、所定数のバッファに区切られるとともに、前記バッファごとにアドレスが付与され、かつ、前記バッファごとにメッセージを格納することが可能なメッセージバッファと、前記バッファごとに対応して所定数設けられるとともに、送信又は受信の準備ができたか否かを知らせるための準備情報を保持する準備情報保持部と、メッセージハンドリング部からのステート信号を受けているときに、前記CPUから各前記準備情報保持部への第2のライト信号の入力をマスクする第2のマスク回路部と、を備え、前記ステート信号は、前記メッセージハンドリング部から発信された信号であって送信ロード又は受信格納を行うために前記メッセージバッファのいずれか又はすべての前記バッファにアクセスしている状態を示す信号であり、前記第2のライト信号は、前記CPUから発信された信号であって所定アドレスに係る前記準備情報保持部内の準備情報を書き込むための信号であることを特徴とする。 In a second aspect of the present invention, a data processing module connected to a multi-master network is partitioned into a predetermined number of buffers, an address is given to each buffer, and a message is sent to each buffer. A message buffer that can be stored, a predetermined number corresponding to each buffer, a preparation information holding unit that holds preparation information for informing whether transmission or reception is ready, and message handling A second mask circuit unit that masks the input of a second write signal from the CPU to each of the preparation information holding units when receiving a state signal from the unit, A signal sent from the message handling unit before the transmission load or reception storage A signal indicating a state in which any or all of the message buffers are being accessed, and the second write signal is a signal transmitted from the CPU and stored in the preparation information holding unit relating to a predetermined address. It is a signal for writing preparation information.
本発明の第3の視点においては、マルチマスタ方式のネットワークに接続されるデータ処理モジュールにおいて、所定数のバッファに区切られるとともに、前記バッファごとにアドレスが付与され、かつ、前記バッファごとにメッセージを格納することが可能なメッセージバッファと、前記バッファごとに対応して所定数設けられるとともに、送信又は受信の準備ができたか否かを知らせるための準備情報を保持する準備情報保持部と、前記準備情報保持部ごとに対応して所定数設けられるとともに、メッセージハンドリング部からの対応するアドレスに係る第2のステート信号を受けているときに、前記CPUから対応するアドレスに係る前記準備情報保持部への第2のライト信号の入力をマスクする第3のマスク回路部と、を備え、前記第2のステート信号は、前記メッセージハンドリング部から発信された信号であって送信ロード又は受信格納を行うために前記メッセージバッファの所定アドレスに係る前記バッファにアクセスしている状態を示す信号であり、前記第2のライト信号は、前記CPUから発信された信号であって所定アドレスに係る前記準備情報保持部内の準備情報を書き込むための信号であることを特徴とする。 In a third aspect of the present invention, a data processing module connected to a multi-master network is partitioned into a predetermined number of buffers, an address is given to each buffer, and a message is sent to each buffer. A message buffer that can be stored, a predetermined number corresponding to each buffer, a preparation information holding unit that holds preparation information for informing whether transmission or reception is ready, and the preparation A predetermined number is provided corresponding to each information holding unit, and when receiving the second state signal related to the corresponding address from the message handling unit, the preparation information holding unit related to the corresponding address is received from the CPU. A third mask circuit portion for masking the input of the second write signal of The state signal 2 is a signal transmitted from the message handling unit, and is a signal indicating a state in which the buffer associated with a predetermined address of the message buffer is being accessed in order to perform transmission load or reception storage, The second write signal is a signal transmitted from the CPU and is a signal for writing the preparation information in the preparation information holding unit related to a predetermined address.
本発明の第4の視点においては、マルチマスタ方式のネットワークに接続されるデータ処理モジュールにおいて、IDが設定される領域と前記IDに対応したメッセージデータが書き込まれる領域とを備えた複数のバッファからなるメッセージバッファと、前記複数のバッファに対応して設けられ、前記複数のバッファのうちIDの設定が完了したバッファに対して準備完了を示す情報が書き込まれる準備情報保持回路と、前記準備情報保持回路が準備完了を示している前記メッセージバッファに書き込まれたメッセージデータをバス上に送信するメッセージハンドリング部と、前記メッセージバッファにIDを書き込むと共に前記準備完了情報を前記準備情報保持回路に書き込む前記CPUと、前記準備情報保持回路が準備完了を示しているときには、前記CPUからのメッセージデータの書き込みを禁止する第1のゲート回路と、を備えることを特徴とする。 In a fourth aspect of the present invention, a data processing module connected to a multi-master network includes a plurality of buffers each having an area in which an ID is set and an area in which message data corresponding to the ID is written. A message buffer, a preparation information holding circuit provided corresponding to the plurality of buffers, in which information indicating completion of preparation is written in a buffer for which ID setting has been completed among the plurality of buffers, and the preparation information holding A message handling unit that transmits message data written in the message buffer indicating that the circuit is ready on the bus; and the CPU that writes the ID to the message buffer and writes the ready information to the preparation information holding circuit And the preparation information holding circuit indicates completion of preparation. Sometimes, characterized in that it comprises a first gate circuit for inhibiting the writing of the message data from the CPU.
本発明(請求項1−3)によれば、送信又は受信の準備のできたメッセージバッファ中の所定アドレスのバッファに対して、CPUが誤ってデータを書き換えることがないので、ありえないデータを送信したり、誤った設定を前提に受信したりすることがない。 According to the present invention (Claim 1-3), since the CPU does not rewrite data by mistake to a buffer at a predetermined address in a message buffer ready for transmission or reception, it is possible to transmit impossible data. , Never receive on the premise of incorrect settings.
本発明(請求項2、4)によれば、メッセージハンドリング部の処理(送信ロード又は受信格納)開始から完了までの間において、メッセージハンドリング部は、準備情報(RDY)が送信又は受信の準備ができていることを示しているとき(レベル「1」)に、対応するバッファに対して、安全にデータを読み書きできる。 According to the present invention (claims 2 and 4), during the period from the start to the completion of processing (transmission load or reception storage) of the message handling unit, the message handling unit is ready for transmission or reception. When it is shown that the data is ready (level “1”), data can be safely read from and written to the corresponding buffer.
本発明(請求項3、5)によれば、送信又は受信の対象となるアドレスの準備情報(RDY)の書き込みを個別に禁止することができるので、送信又は受信の対象となるアドレスに係るデータ(メッセージ)についてメッセージハンドリング部が送信中又は受信中であっても、送信又は受信の対象とならないアドレスの準備情報(RDY)の書き込みを実行することができ、適切なプロテクトが可能となる。
According to the present invention (
本発明(請求項6、7)によれば、ゲート回路を付加することによって、CPUによるメッセージバッファの上書きを防止することが可能となり、送信中又は受信中のデータが破壊されることを防止することができる。
According to the present invention (
(実施形態1)
本発明の実施形態1に係るデータ処理モジュールについて図面を用いて説明する。図1は、本発明の実施形態1に係るCANモジュール(データ処理モジュール)を含むCANデバイスの構成を模式的に示したブロック図である。図2は、本発明の実施形態1に係るCANモジュール(データ処理モジュール)の細部の構成を模式的に示したブロック図である。
(Embodiment 1)
A data processing module according to
CANデバイス100は、CANモジュール(データ処理モジュール)と、CPU51と、RAM52と、周辺回路53と、を1チップで構成した装置である(図1参照)。
The
CANモジュールは、データの処理を行うデータ処理モジュールであり、メッセージハンドリング部2と、メッセージバッファ3と、CANプロトコル送信層4と、マスクセット5と、準備情報保持部6と、マスク回路部7と、を備える(図1及び図2参照)。
The CAN module is a data processing module for processing data, and includes a message handling unit 2, a
メッセージハンドリング部2は、受信したメッセージをメッセージバッファ3の所定のアドレスに係るバッファにストアする処理や、メッセージバッファ3にストアされたメッセージから送信候補となるメッセージを選択する処理等を行う(図1参照)。ここで、メッセージは、識別子(ID)、コントロールフィールド(制御セグメント)、メッセージ本文の順に並べられた情報である(図2参照)。識別子は、メッセージ優先度を表す識別子(ID)である。コントロールフィールド(制御セグメント)は、送信要求メッセージであるか否かやメッセージ本文長を指定するための情報である(図2参照)。
The message handling unit 2 performs processing for storing a received message in a buffer associated with a predetermined address of the
メッセージバッファ3は、所定数のメッセージを格納することが可能なバッファであり(図1参照)、所定数のバッファ(メールボックスに相当)に区切られており、バッファごとにアドレスが付与されている(図2参照)。なお、各バッファには、メッセージハンドリング部2に対し送信又は受信の準備ができたか否かを示す準備情報(RDY)が格納されていない。メッセージバッファ3には、データや信号を同期させるためのクロック信号が反転して入力されている(図2参照)。
The
CANプロトコル送信層4は、CANプロトコルに従ってCANトランシーバとデータの送受信を行う(図1参照)。
The CAN
マスクセット5は、メッセージの所定部分(例えばIDの一部)をマスクする際に用いられる(図1参照)。例えば、IDが2進数4ビットのデータであるとして、アドレス#0〜31のバッファを有するメッセージバッファ3のアドレス#nのバッファにIDが1100のメッセージが割り振られていた場合において、上位2ビットにマスクをかけることによって1100以外に0000、0100、1000のメッセージがアドレス#nのバッファに格納されることになるよう用いられる。
The mask set 5 is used when a predetermined part (for example, a part of ID) of a message is masked (see FIG. 1). For example, assuming that the ID is binary 4-bit data and the message with ID 1100 is assigned to the buffer with address #n of the
準備情報保持部6は、準備情報(RDY)を保持する部分であり、バッファごとに対応してアドレスが付与されている(図2参照)。ここで、準備情報(RDY)は、メッセージハンドリング部2に対し送信又は受信の準備ができたか否かを知らせるための情報であり、レベル「1」のときにメッセージハンドリング部2に対し送信又は受信の準備ができたことを示し、レベル「0」のときにメッセージハンドリング部2に対し送信又は受信の準備ができていないことを示す。準備情報保持部6に保持された準備情報(RDY)は、マスク回路部7に入力される。
The preparation
マスク回路部7は、準備情報(RDY)が送信又は受信の準備中のとき(レベル「1」のとき)に、CPU51からメッセージバッファ3への(データ用)ライト信号の入力をマスクする回路部である(図2参照)。ここで、ライト信号は、CPU51から発信された信号であって、メッセージバッファ3の所定アドレスのバッファ内にデータ(メッセージ)を書き込むためにアクセスするための信号である。なお、マスク回路部7は、準備情報(RDY)が送信又は受信の準備中でないとき(レベル「0」のとき)に、CPU51からメッセージバッファ3への(データ用)ライト信号の入力を可能にする。
The
周辺回路53は、例えば、I/O回路を含み、CANデバイス100の外部に設けられた各種センサ(図示せず)及び表示装置(図示せず)と接続され、外部と内部との間のインターフェースを行う。
The
CPU51は、各種センサ(図示せず)からのデータをI/Oを介して取り出すと共にRAM52を利用して所望の処理を実行してメッセージバッファ3にデータを書き込む処理を行う(図1参照)。CPU51は、メッセージバッファ3にデータを書き込む処理を行う際、メッセージバッファ3に向けて(データ用)ライト信号を出力する(図2参照)。CPU51は、メッセージバッファ3に書き込まれたメッセージを取り出し所望の処理を実行した後、I/Oを介して外部に接続された表示装置(図示せず)にデータを送信する処理等を行う。
The
次に、本発明の実施形態1に係るデータ処理モジュールの動作について説明する。図3は、本発明の実施形態1に係るCANモジュール(データ処理モジュール)の動作を説明するためのタイミングチャートである。例えば、アドレス#nのバッファに対応する準備情報保持部6の準備情報(RDY#n)がレベル「1」のときに、そのバッファに対して、CPUから(データ用)ライト信号が出力されても、マスク回路部7の出力信号がレベル「0」であるため、CPUによるデータの書き込みが行われない(図3参照)。なお、CPUがアドレス#nのバッファに対して書き込みを行う場合には、準備情報保持部6の準備情報(RDY#n)のレベルを「0」に設定し、その後、CPUから(データ用)ライト信号が出力されると、マスク回路部7の出力信号がレベル「1」であるため、CPUによるデータの書き込みが行われることになる。
Next, the operation of the data processing module according to the first embodiment of the present invention will be described. FIG. 3 is a timing chart for explaining the operation of the CAN module (data processing module) according to the first embodiment of the present invention. For example, when the preparation information (RDY # n) of the preparation
実施形態1によれば、準備情報(RDY)がレベル「1」のときに、CPUから(データ用)ライト信号が出力されて、対応するバッファにCPU51がデータを書き込もうとしても、書き込まれることがない。また、準備情報保持部6の準備情報(RDY)と、対応するメッセージバッファ3のデータ(メッセージ)との一貫性が保証され、従来の構成よりも正常に送信ロード又は受信格納動作を行うことができる。さらに、プログラムの暴走などによってもメッセージバッファ3が不要に書き換えられる可能性が低減する。
According to the first embodiment, when the preparation information (RDY) is level “1”, a write signal (for data) is output from the CPU, and the data is written even if the
(実施形態2)
次に、本発明の実施形態2に係るデータ処理モジュールについて図面を用いて説明する。図4は、本発明の実施形態2に係るCANモジュール(データ処理モジュール)の細部の構成を模式的に示したブロック図である。
(Embodiment 2)
Next, a data processing module according to the second embodiment of the present invention will be described with reference to the drawings. FIG. 4 is a block diagram schematically showing a detailed configuration of a CAN module (data processing module) according to the second embodiment of the present invention.
上述の実施形態1では、準備情報保持部6の出力及びマスク回路部7によってCPUからのライト信号をマスクし、CPUからのライト要求があった場合でも、メッセージバッファの書き換えを禁止するものについて説明したが、準備情報保持部6は、CPUによって書き換え可能である。そのため、CPUが準備情報保持部6に「0」を書き込んで、その後ライト信号を出力する場合には、メッセージハンドリング部2によるメッセージバッファ3へのCANバスから取り込まれたメッセージデータの書き込み又はメッセージバッファ3からCANバスへのメッセージデータの読み出し(出力)中にCPUによってメッセージバッファ3のバッファの中身が上書きされてしまうという可能性がある。従って、本発明の実施形態2に係るデータ処理モジュールでは、メッセージハンドリング部2がメッセージバッファ3にメッセージデータを書き込み又はメッセージバッファ3からのメッセージデータの読み出しを行っているときに、CPUによるメッセージバッファ3に格納されたデータの上書きを防止する。
In the first embodiment described above, the output of the preparation
実施形態2に係るデータ処理モジュールは、実施形態1に係るデータ処理モジュールの構成に加えて、さらに、第2のマスク回路部20を有する。第2のマスク回路部20は、メッセージハンドリング部(図1の2)からのステート信号を受けているときに、CPU51から各準備情報保持部6への(RDY用)ライト信号の入力をマスクする回路部である。第2のマスク回路部20から出力された信号は、各準備情報保持部6に入力される。ここで、ライト信号は、CPU51から発信された信号であって、所定アドレスの準備情報保持部6内に準備情報(RDY)を書き込むためにアクセスするための信号である。ステート信号は、メッセージハンドリング部(図1の2)から発信された信号であって、送信ロード又は受信格納を行うためにメッセージバッファ(図1の3)のいずれか又はすべてのバッファにアクセスしている状態を示す信号であり、ORゲート70にて送信ロード中であることを示す送信ロードステート信号、受信格納中であることを示す受信格納ステート信号の論理和となる信号である。
The data processing module according to the second embodiment further includes a second
次に、本発明の実施形態2に係るデータ処理モジュールの動作について説明する。図5は、本発明の実施形態2に係るCANモジュール(データ処理モジュール)の動作を説明するためのタイミングチャートである。例えば、送信ロード中又は受信格納中において、アドレス#nに係る準備情報保持部6の準備情報(RDY)がレベル「1」のときであって、メッセージハンドリング部からのステート信号(レベル「1」)が出力されているときに、その準備情報(RDY)に対して、CPUからアドレス#nに係る準備情報保持部6の準備情報(RDY)をクリア(レベル「0」)にするための(RDY用)ライト信号が出力されても、第2のマスク回路部20の出力信号がレベル「0」であるため、CPUによる準備情報(RDY)の書き換えが行われない(図5参照)。準備情報保持部6の準備情報(RDY#n)がレベル「0」のときであっても、同様である。つまり、各準備情報保持部6の準備情報(RDY)がどのレベルであっても、メッセージハンドリング部からのステート信号が出力されているときは、CPUから所定のアドレスに係る準備情報保持部6の準備情報(RDY)をクリア(レベル「0」)にするための(RDY用)ライト信号が出力されても、第2のマスク回路部20から出力される信号がレベル「0」であるため、当該所定のアドレスの準備情報(RDY)もCPUによる書き換えが行われない。なお、メッセージハンドリング部からのステート信号が出力されていないときに、各準備情報保持部6に対して、CPUから(RDY用)ライト信号が出力されていれば、第2のマスク回路部20から出力される信号がレベル「1」であるため、CPUによる準備情報のいずれかの書き換えが可能である。
Next, the operation of the data processing module according to the second embodiment of the present invention will be described. FIG. 5 is a timing chart for explaining the operation of the CAN module (data processing module) according to the second embodiment of the present invention. For example, when the preparation information (RDY) of the preparation
実施形態2によれば、送信ロード中又は受信格納中においては、CPUによる各準備情報保持部6の準備情報(RDY)をクリア(レベル「0」)にすることができないため、CPUは準備情報(RDY)がレベル「1」であるバッファへのアクセスができず、CPUによる当該バッファのデータの書き換えがない。そのため、メッセージハンドリング部の処理(送信ロード又は受信格納)開始から完了までの間において、メッセージハンドリング部は、準備情報(RDY)がレベル「1」であるメッセージバッファ中のバッファに対して、安全にデータを読み書きできる。
According to the second embodiment, the preparation information (RDY) of each preparation
(実施形態3)
次に、本発明の実施形態3に係るデータ処理モジュールについて図面を用いて説明する。図6は、本発明の実施形態3に係るCANモジュール(データ処理モジュール)の細部の構成を模式的に示したブロック図である。
(Embodiment 3)
Next, a data processing module according to the third embodiment of the present invention will be described with reference to the drawings. FIG. 6 is a block diagram schematically showing a detailed configuration of a CAN module (data processing module) according to the third embodiment of the present invention.
実施形態3に係るデータ処理モジュールは、実施形態1に係るデータ処理モジュールの構成に加えて、さらに、第3のマスク回路部30を有する。実施形態3に係るデータ処理モジュールの第3のマスク回路部30は、実施形態2に係るデータ処理モジュールの第2のマスク回路部(図4の20)のように1つのマスク回路部ですべての準備情報保持部をマスクする構成ではなく、準備情報保持部6ごとに個別にマスクする。CPU51からの(RDY用)ライト信号は、各第3のマスク回路部30に入力される。アドレス#0の準備情報保持部6に対応する第3のマスク回路部30は、メッセージハンドリング部(図1の2)からのアドレス#0に係るステート信号を受けているときに、CPU51から各準備情報保持部6への(RDY用)ライト信号の入力をマスクする。同じく、アドレス#nの準備情報保持部6に対応する第3のマスク回路部30は、メッセージハンドリング部(図1の2)からのアドレス#nに係るステート信号を受けているときに、CPU51から各準備情報保持部6への(RDY用)ライト信号の入力をマスクする。なお、実施形態3でのメッセージハンドリング部からのステート信号は、送信ロードステート信号及び受信格納ステート信号の論理和となる信号ではなく、各アドレスに対応する個別の送信ロードステート信号又は受信格納ステート信号である。
In addition to the configuration of the data processing module according to the first embodiment, the data processing module according to the third embodiment further includes a third
次に、本発明の実施形態3に係るデータ処理モジュールの動作について説明する。図7は、本発明の実施形態3に係るCANモジュール(データ処理モジュール)の動作を説明するためのタイミングチャートである。例えば、送信ロード中又は受信格納中において、図7のように、最初にアドレス#0、#nに係る準備情報保持部6の準備情報(RDY)がレベル「1」であり、メッセージハンドリング部からアドレス#0のステート信号がレベル「1」を出力し、かつ、アドレス#nのステート信号がレベル「0」を出力するときに、その準備情報(RDY)に対して、CPUからアドレス#0、#nに係る準備情報保持部6の準備情報(RDY)をレベル「0」にするための(RDY用)ライト信号が出力されたとする。この場合、アドレス#0に係る準備情報保持部6の準備情報(RDY#0)は、アドレス#0に係る第3のマスク回路部30の出力信号がレベル「0」であるため、書き換わらない(レベル「1」のまま)。一方、アドレス#nに係る準備情報保持部6の準備情報(RDY#n)は、アドレス#nに係る第3のマスク回路部30の出力信号がレベル「1」であるため、レベル「1」からレベル「0」に書き換わる。
Next, the operation of the data processing module according to the third embodiment of the present invention will be described. FIG. 7 is a timing chart for explaining the operation of the CAN module (data processing module) according to the third embodiment of the present invention. For example, during transmission loading or reception storage, as shown in FIG. 7, first, the preparation information (RDY) of the preparation
実施形態3によれば、送信又は受信の対象となるアドレスの準備情報(RDY)の書き込みを個別に禁止することができるので、送信又は受信の対象となるアドレスに係るデータ(メッセージ)についてメッセージハンドリング部が送信中又は受信中であっても、送信又は受信の対象とならないアドレスの準備情報(RDY)の書き込みを実行することができ、適切なプロテクトが可能となる。 According to the third embodiment, writing of the preparation information (RDY) of an address to be transmitted or received can be individually prohibited, so that message handling is performed on data (message) related to an address to be transmitted or received. Even when the unit is transmitting or receiving, it is possible to write the preparation information (RDY) of an address that is not a target of transmission or reception, and appropriate protection is possible.
上述した実施形態1〜3にて説明したように、従来の準備情報保持部6を利用してゲート回路(マスク回路部7、マスク回路部7及び受信格納ステート信号、送信ロードステート信号を受けるゲート)を付加することによって、CPUによるメッセージバッファの上書きを防止することが可能となり、送信中又は受信中のデータが破壊されることを防止することができる。
As described in the first to third embodiments, the gate circuit (the
2 メッセージハンドリング部
3 メッセージバッファ
4 CANプロトコル送信層
5 マスクセット
6 準備情報(RDY)保持部
7 マスク回路部
11、1n、16、19 CANモジュール(CAN コントローラ)
20 第2のマスク回路部
30 第3のマスク回路部
40 CPU I/F
51 CPU
52 RAM
53 周辺回路
60 CANトランシーバ
70 ORゲート
100 CANデバイス
2
20 Second
51 CPU
52 RAM
53
Claims (7)
所定数のバッファに区切られるとともに、前記バッファごとにアドレスが付与され、かつ、前記バッファごとにメッセージを格納することが可能なメッセージバッファと、
前記バッファごとに対応して所定数設けられるとともに、送信又は受信の準備ができたか否かを知らせるための準備情報を保持する準備情報保持部と、
前記バッファごとに対応して所定数設けられるとともに、前記準備情報が送信又は受信の準備ができていることを示しているときに、CPUから前記メッセージバッファへのライト信号の入力をマスクするマスク回路部と、
を備え、
前記ライト信号は、前記CPUから発信された信号であって前記バッファ内にデータを書き込むための信号であることを特徴とするデータ処理モジュール。 In a data processing module connected to a multi-master network,
A message buffer that is partitioned into a predetermined number of buffers, an address is given to each buffer, and a message can be stored for each buffer;
A predetermined number corresponding to each buffer, and a preparation information holding unit for holding preparation information for informing whether transmission or reception is ready;
A mask circuit that masks the input of a write signal from the CPU to the message buffer when a predetermined number is provided corresponding to each buffer and the preparation information indicates that transmission or reception is ready And
With
The data processing module, wherein the write signal is a signal transmitted from the CPU and a signal for writing data in the buffer.
前記ステート信号は、前記メッセージハンドリング部から発信された信号であって送信ロード又は受信格納を行うために前記メッセージバッファのいずれかの前記バッファにアクセスしている状態を示す信号であり、
前記第2のライト信号は、前記CPUから発信された信号であって所定アドレスに係る前記準備情報保持部内の準備情報を書き込むための信号であることを特徴とする請求項1記載のデータ処理モジュール。 A second mask circuit unit that masks input of a second write signal from the CPU to each of the preparation information holding units when receiving a state signal from a message handling unit;
The state signal is a signal transmitted from the message handling unit and is a signal indicating a state in which one of the message buffers is being accessed in order to perform transmission load or reception storage,
2. The data processing module according to claim 1, wherein the second write signal is a signal transmitted from the CPU and is a signal for writing preparation information in the preparation information holding unit relating to a predetermined address. .
前記第2のステート信号は、前記メッセージハンドリング部から発信された信号であって送信ロード又は受信格納を行うために前記メッセージバッファの所定アドレスに係る前記バッファにアクセスしている状態を示す信号であり、
前記第2のライト信号は、前記CPUから発信された信号であって所定アドレスに係る前記準備情報保持部内の準備情報を書き込むための信号であることを特徴とする請求項1記載のデータ処理モジュール。 A predetermined number is provided for each of the preparation information holding units, and the preparation information holding for the corresponding address is received from the CPU when receiving a second state signal related to the corresponding address from the message handling unit. A third mask circuit section for masking the input of the second write signal to the section,
The second state signal is a signal transmitted from the message handling unit and indicating a state in which the buffer associated with a predetermined address of the message buffer is being accessed in order to perform transmission load or reception storage. ,
2. The data processing module according to claim 1, wherein the second write signal is a signal transmitted from the CPU and a signal for writing preparation information in the preparation information holding unit related to a predetermined address. .
所定数のバッファに区切られるとともに、前記バッファごとにアドレスが付与され、かつ、前記バッファごとにメッセージを格納することが可能なメッセージバッファと、
前記バッファごとに対応して所定数設けられるとともに、送信又は受信の準備ができたか否かを知らせるための準備情報を保持する準備情報保持部と、
メッセージハンドリング部からのステート信号を受けているときに、前記CPUから各前記準備情報保持部への第2のライト信号の入力をマスクする第2のマスク回路部と、
を備え、
前記ステート信号は、前記メッセージハンドリング部から発信された信号であって送信ロード又は受信格納を行うために前記メッセージバッファのいずれか又はすべての前記バッファにアクセスしている状態を示す信号であり、
前記第2のライト信号は、前記CPUから発信された信号であって所定アドレスに係る前記準備情報保持部内の準備情報を書き込むための信号であることを特徴とするデータ処理モジュール。 In a data processing module connected to a multi-master network,
A message buffer that is partitioned into a predetermined number of buffers, an address is given to each buffer, and a message can be stored for each buffer;
A predetermined number corresponding to each buffer, and a preparation information holding unit for holding preparation information for informing whether transmission or reception is ready;
A second mask circuit unit that masks input of a second write signal from the CPU to each of the preparation information holding units when receiving a state signal from a message handling unit;
With
The state signal is a signal transmitted from the message handling unit and indicates a state in which any or all of the message buffers are accessed to perform transmission load or reception storage,
The data processing module, wherein the second write signal is a signal transmitted from the CPU, and is a signal for writing preparation information in the preparation information holding unit related to a predetermined address.
所定数のバッファに区切られるとともに、前記バッファごとにアドレスが付与され、かつ、前記バッファごとにメッセージを格納することが可能なメッセージバッファと、
前記バッファごとに対応して所定数設けられるとともに、送信又は受信の準備ができたか否かを知らせるための準備情報を保持する準備情報保持部と、
前記準備情報保持部ごとに対応して所定数設けられるとともに、メッセージハンドリング部からの対応するアドレスに係る第2のステート信号を受けているときに、前記CPUから対応するアドレスに係る前記準備情報保持部への第2のライト信号の入力をマスクする第3のマスク回路部と、
を備え、
前記第2のステート信号は、前記メッセージハンドリング部から発信された信号であって送信ロード又は受信格納を行うために前記メッセージバッファの所定アドレスに係る前記バッファにアクセスしている状態を示す信号であり、
前記第2のライト信号は、前記CPUから発信された信号であって所定アドレスに係る前記準備情報保持部内の準備情報を書き込むための信号であることを特徴とするデータ処理モジュール。 In a data processing module connected to a multi-master network,
A message buffer that is partitioned into a predetermined number of buffers, an address is given to each buffer, and a message can be stored for each buffer;
A predetermined number corresponding to each buffer, and a preparation information holding unit for holding preparation information for informing whether transmission or reception is ready;
A predetermined number is provided for each of the preparation information holding units, and the preparation information holding for the corresponding address is received from the CPU when receiving a second state signal related to the corresponding address from the message handling unit. A third mask circuit section for masking input of the second write signal to the section;
With
The second state signal is a signal transmitted from the message handling unit and indicating a state in which the buffer associated with a predetermined address of the message buffer is being accessed in order to perform transmission load or reception storage. ,
The data processing module, wherein the second write signal is a signal transmitted from the CPU, and is a signal for writing preparation information in the preparation information holding unit related to a predetermined address.
前記複数のバッファに対応して設けられ、前記複数のバッファのうちIDの設定が完了したバッファに対して準備完了を示す情報が書き込まれる準備情報保持回路と、
前記準備情報保持回路が準備完了を示している前記メッセージバッファに書き込まれたメッセージデータをバス上に送信するメッセージハンドリング部と、
前記メッセージバッファにIDを書き込むと共に前記準備完了情報を前記準備情報保持回路に書き込む前記CPUと、
前記準備情報保持回路が準備完了を示しているときには、前記CPUからのメッセージデータの書き込みを禁止する第1のゲート回路と、
を備えることを特徴とするデータ処理モジュール。 A message buffer comprising a plurality of buffers each having an area in which an ID is set and an area in which message data corresponding to the ID is written;
A preparation information holding circuit provided corresponding to the plurality of buffers, in which information indicating completion of preparation is written to a buffer in which setting of an ID is completed among the plurality of buffers;
A message handling unit for transmitting the message data written in the message buffer indicating that the preparation information holding circuit is ready on the bus;
Writing the ID into the message buffer and writing the preparation completion information into the preparation information holding circuit;
A first gate circuit for prohibiting writing of message data from the CPU when the preparation information holding circuit indicates completion of preparation;
A data processing module comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005069213A JP2006252282A (en) | 2005-03-11 | 2005-03-11 | Data processing module |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005069213A JP2006252282A (en) | 2005-03-11 | 2005-03-11 | Data processing module |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2006252282A true JP2006252282A (en) | 2006-09-21 |
Family
ID=37092704
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005069213A Pending JP2006252282A (en) | 2005-03-11 | 2005-03-11 | Data processing module |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2006252282A (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63650A (en) * | 1986-06-19 | 1988-01-05 | Toshiba Corp | Semiconductor memory |
JP2003509787A (en) * | 1999-09-15 | 2003-03-11 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Semaphore encoding method for ensuring data integrity in a CAN microcontroller and a CAN microcontroller performing the method |
-
2005
- 2005-03-11 JP JP2005069213A patent/JP2006252282A/en active Pending
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS63650A (en) * | 1986-06-19 | 1988-01-05 | Toshiba Corp | Semiconductor memory |
JP2003509787A (en) * | 1999-09-15 | 2003-03-11 | コーニンクレッカ フィリップス エレクトロニクス エヌ ヴィ | Semaphore encoding method for ensuring data integrity in a CAN microcontroller and a CAN microcontroller performing the method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110442463A (en) | Data transmission method and device in TEE system | |
CN103870323B (en) | Triggering routing unit | |
CN108733594B (en) | Memory controller and data storage device | |
US5089953A (en) | Control and arbitration unit | |
JP4574377B2 (en) | Data processing module and method for managing transmitted / received messages thereof | |
JP2006252282A (en) | Data processing module | |
EP1761856B1 (en) | Computer system and method for queuing interrupt messages in a device coupled to a parallel communications bus | |
CN112860595B (en) | PCI (peripheral component interconnect express) equipment or PCIE (peripheral component interconnect express) equipment, data access method and related assembly | |
US20030200401A1 (en) | Microcomputer system automatically backing-up data written in storage medium in transceiver, and transceiver connected thereto | |
JP4721741B2 (en) | Data processing module and message receiving method thereof | |
KR100636283B1 (en) | Message processing system and method using external storage | |
JP2011070259A (en) | Data transfer device and data transfer method | |
US6907503B2 (en) | Dual port RAM communication protocol | |
EP1761857A1 (en) | Computer system and method for transmitting interrupt messages through a parallel communication bus | |
JP2008299425A (en) | Data transfer device and data transfer method | |
CN109358903A (en) | Data access equipment and access errors notification method | |
KR0150068B1 (en) | Data que module and its control method | |
CN112346922B (en) | Server device and communication protocol method thereof | |
JP2023152146A (en) | Memory control apparatus and memory control method | |
TWI720565B (en) | Memory controller and data storage device | |
JP4969054B2 (en) | Information processing device | |
US20020156966A1 (en) | Dual port RAM with automatic write indicators | |
JP3388852B2 (en) | Multiplex transmission equipment | |
CN113094110A (en) | Method and system for filtering serial port data | |
CN112286657A (en) | Electronic device and interrupt processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Effective date: 20071212 Free format text: JAPANESE INTERMEDIATE CODE: A621 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20100917 |
|
A131 | Notification of reasons for refusal |
Effective date: 20100928 Free format text: JAPANESE INTERMEDIATE CODE: A131 |
|
A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20101129 |
|
A02 | Decision of refusal |
Effective date: 20110405 Free format text: JAPANESE INTERMEDIATE CODE: A02 |