JP4574377B2 - Data processing module and method for managing transmitted / received messages thereof - Google Patents

Data processing module and method for managing transmitted / received messages thereof Download PDF

Info

Publication number
JP4574377B2
JP4574377B2 JP2005033014A JP2005033014A JP4574377B2 JP 4574377 B2 JP4574377 B2 JP 4574377B2 JP 2005033014 A JP2005033014 A JP 2005033014A JP 2005033014 A JP2005033014 A JP 2005033014A JP 4574377 B2 JP4574377 B2 JP 4574377B2
Authority
JP
Japan
Prior art keywords
buffer
message
history
pointer
data processing
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
Application number
JP2005033014A
Other languages
Japanese (ja)
Other versions
JP2006222627A (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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2005033014A priority Critical patent/JP4574377B2/en
Publication of JP2006222627A publication Critical patent/JP2006222627A/en
Application granted granted Critical
Publication of JP4574377B2 publication Critical patent/JP4574377B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、データ処理モジュール及びその送受信メッセージの管理方法に関する。   The present invention relates to a data processing module and a method for managing transmission / reception messages thereof.

近年、通信プロトコルとして、マルチマスタの通信プロトコルが注目されている。マルチマスタのプロトコルでは、バスが解放されているとき、バスに接続されている複数の通信ノードのいずれもがデータをバス上に送信することができ、システムの柔軟性が高い等の特徴を持っている。このようなマルチマスタの通信プロトコルとして、自動車内のECU(電子制御ユニット)間のシリアル通信プロトコルとして用いられている、特開昭61−195453号公報に記載されたマルチマスタのCAN(Controller Area Network、以下、CANという)プロトコル(ISO11898、ISO11519シリーズで規格化)が知られている。このようなマルチマスタの通信プロトコルは、通信ノードの増減が簡単にできる等システムの柔軟性が高いため、上記した自動車分野に止まらず、FA(Factory Automation)、船舶、医療機器といった分野の通信プロトコルとしても有望視されている。   In recent years, multi-master communication protocols have attracted attention as communication protocols. In the multi-master protocol, 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. ing. As such a multi-master communication protocol, a multi-master CAN (Controller Area Network) described in Japanese Patent Application Laid-Open No. 61-195453 is used as a serial communication protocol between ECUs (electronic control units) in an automobile. , Hereinafter referred to as CAN) (standardized by ISO 11898 and ISO 11519 series) is known. Such a multi-master communication protocol has high system flexibility such that communication nodes can be easily increased / decreased. Therefore, the multi-master communication protocol is not limited to the above-described automobile field, but is a communication protocol in fields such as FA (Factory Automation), ships, and medical devices. As promising.

図12は、通信ノードとしてのCANの概略構成を表した図である。サブネットワークを構成するCANバス(図示せず)に接続されるCANトランシーバ60を有するCANモジュール11、1n、16を接続することが可能となっており、各CANモジュール11、1n、16がCPU I/F(インタフェース)40を介して、メッセージを送受信することが可能となっている。また、図12のCANモジュール19は、メッセージの受信のみを行うことが可能となっている。
特開昭61−195453号公報
FIG. 12 is a diagram illustrating a schematic configuration of a CAN as a communication node. It is possible to connect CAN modules 11, 1n, 16 having a CAN transceiver 60 connected to a CAN bus (not shown) constituting a sub-network, and each CAN module 11, 1n, 16 is connected to the CPU I. It is possible to send and receive messages via the / F (interface) 40. Further, the CAN module 19 in FIG. 12 can only receive a message.
JP-A 61-195453

CANプロトコルでは、特許文献1の30頁左下欄5)−1.1.4送信されるべきであるメッセージの待ち行列、及び同文献35頁左下欄5)−3.6 探索プロセス以下に示されたとおりメッセージ送信に先だって、送信要求ビットがセットされたバッファの中から送信候補メッセージを決定する送信サーチプロセスが行われる。また、メッセージを受信した場合も、特許文献1の30頁左下欄5)−1.1.5受信メッセージの待ち行列及び同文献35頁右上欄5)−3 データ交換DPRAM以下に示されたとおり受信メッセージの識別子がメッセージバッファ(同公報でいうDPRAM)に格納されているかどうか、を判定するため受信サーチプロセスが行われ、メッセージバッファに記憶する場合は割り込み要求ビットがセットされる。   In the CAN protocol, page 30, lower left column 5) -1.1.4 queue of messages to be transmitted, and page 35, lower left column 5) -3.6 The search process is shown below. As described above, prior to message transmission, a transmission search process is performed to determine a transmission candidate message from the buffer in which the transmission request bit is set. In addition, even when a message is received, page 30, lower left column 5) -1.1.5 queue of received messages and page 35, upper right column 5) -3 data exchange DPRAM as shown below A reception search process is performed to determine whether or not the identifier of the received message is stored in the message buffer (DPRAM as referred to in the same publication). When the received message identifier is stored in the message buffer, an interrupt request bit is set.

図13は、CANモジュールに備えられるメッセージバッファの構成を表した図であり、図14は、メッセージを受信した際の受信割り込み発生以降の動作を表したフローチャートである。従来は、図14に示されたとおり、受信割り込みの発生後(ステップS101)、CPUがすべての受信バッファにリードアクセスし(ステップS102)、各バッファが更新されたか否かを表すDNビット(データ更新ビット)の状態を確認して受信バッファの特定を行っていた(ステップS103)。また、送信プロセスも同様であり、すべてのバッファの探索を行って、TRQビット(送信要求ビット)の状態を確認して送信したバッファの特定を行っていた。   FIG. 13 is a diagram showing a configuration of a message buffer provided in the CAN module, and FIG. 14 is a flowchart showing an operation after a reception interrupt is generated when a message is received. Conventionally, as shown in FIG. 14, after the occurrence of a reception interrupt (step S101), the CPU performs read access to all reception buffers (step S102), and a DN bit (data) indicating whether or not each buffer has been updated. The status of the (update bit) is confirmed and the reception buffer is specified (step S103). The transmission process is the same, and all buffers are searched, the state of the TRQ bit (transmission request bit) is confirmed, and the transmitted buffer is specified.

図15上段の(A)は、CANによる受信書き込み(Rx)終了後の受信完了割込信号にCPUが追従できている場合のタイミングチャートであり、同図下段の(B)は、CANによる受信書き込み(Rx)終了後の受信完了割込信号にCPUが追従できなくなった状態のタイミングチャートである。同図(A)に表されたように、従来の方式は、その都度すべてのバッファをリードする必要があるため、バッファの特定に時間がかかり、CPUへの負荷も高い。更に同図(B)に表されたように、受信が先行しバッファの特定が遅れた場合には、複数のバッファでDNビット=1が検知され、送受信された順番がCPUからわからなくなってしまうという問題点があった。   (A) in the upper part of FIG. 15 is a timing chart in the case where the CPU can follow the reception completion interrupt signal after completion of reception writing (Rx) by CAN, and (B) in the lower part of FIG. 15 is reception by CAN. It is a timing chart of the state which became impossible for CPU to follow the reception completion interruption signal after completion | finish of writing (Rx). As shown in FIG. 5A, the conventional method needs to read all the buffers each time, so that it takes time to specify the buffers and the load on the CPU is high. Further, as shown in FIG. 5B, when reception precedes and buffer specification is delayed, DN bit = 1 is detected in a plurality of buffers, and the order of transmission / reception is lost from the CPU. There was a problem.

また、CANでは、予め送信/受信サーチを行ってからメッセージバッファの位置を指定しメッセージのリード/ライトを行っており、メッセージバッファ上のバッファ位置から、送受信が行われた順序を特定することができないという事情がある。また、上記した問題点は、送信のメッセージの順序を把握する際にも生じるものであり、複数の送信バッファないし受信バッファを備え、ダイレクトに位置を指定してリード/ライトを行う構成であれば、少なからず発生するものであるといえる。   In addition, the CAN performs a transmission / reception search in advance and then designates the position of the message buffer to read / write the message. The order in which transmission / reception is performed can be specified from the buffer position on the message buffer. There is a circumstance that cannot be done. The above-mentioned problem also occurs when grasping the order of messages to be transmitted. If the configuration includes a plurality of transmission buffers or reception buffers and performs direct read / write by specifying a position. It can be said that this is not a problem.

本発明の第1の視点によれば、本発明の第1の視点によれば、上述したCANに代表されるマルチマスタ方式のネットワークに接続されたデータ処理モジュールに、一のメッセージを格納可能なバッファを複数有するメッセージバッファ上の更新メッセージのバッファ位置を示す履歴情報を所定回数分格納可能な履歴バッファを備えて、メッセージの送受信順序を特定可能な送受信メッセージの管理方法が提供される。この方法によれば、まず、データ処理モジュール(CANモジュール)のメッセージハンドリング部は、まず任意のメッセージバッファの任意のバッファの更新を行った際に、該更新が行われたバッファの位置情報を、前記履歴バッファの次書き込み位置に格納(記録)する。また、前記メッセージハンドリング部は、CPU(Central Processing Unit)からのリードアクセスに応じて、前記履歴バッファのうちCPUから未参照の履歴情報の位置を示す未読ポインタを逐次更新する。前記履歴バッファの直近書き込み位置と未読ポインタは、CPUから参照可能であり、それぞれ、最新メッセージや最古の未読メッセージの格納位置を特定することが可能となる。 According to the first aspect of the present invention, according to the first aspect of the present invention, one message can be stored in the data processing module connected to the multi-master network represented by the above-mentioned CAN. Provided is a transmission / reception message management method that includes a history buffer capable of storing history information indicating a buffer position of an update message on a message buffer having a plurality of buffers for a predetermined number of times, and that can specify a message transmission / reception order. According to this method, first, when the message handling unit of the data processing module (CAN module) first updates an arbitrary buffer of an arbitrary message buffer, the position information of the updated buffer is obtained as follows: Store (record) at the next write position of the history buffer. In addition, the message handling unit sequentially updates an unread pointer indicating the position of history information unreferenced from the CPU in the history buffer in response to a read access from a CPU (Central Processing Unit). The latest write position and unread pointer in the history buffer can be referred to by the CPU, and the storage position of the latest message and the oldest unread message can be specified.

また、本発明の第2の視点によれば、上述の送受信メッセージの管理方法を実施するために適した構成、回路構成を備えたデータ処理モジュール(CANモジュール)が提供される。即ち、このデータ処理モジュール(CANモジュール)は、複数のバッファによって構成されて、送信するメッセージ及び受信したメッセージを格納可能なバッファを複数有するメッセージバッファと、少なくとも、受信メッセージが記憶されているバッファの番地と前記受信メッセージが受信された順番を保持・管理する履歴バッファと、メッセージバッファ上のメッセージの管理を行うメッセージハンドリング部とを備える。 Further, according to the second aspect of the present invention, there is provided a data processing module (CAN module) having a configuration and a circuit configuration suitable for implementing the above-described transmission / reception message management method. In other words, this data processing module (CAN module) includes a plurality of buffers, and includes a message buffer having a plurality of buffers capable of storing a message to be transmitted and a received message, and at least a buffer in which a received message is stored. A history buffer that holds and manages the address and the order in which the received messages are received, and a message handling unit that manages messages on the message buffer.

本発明によれば、処理すべきバッファを速やかに特定可能となり、CPUへの負荷及び、バッファの特定に遅れが生じる可能性を減ずることができる。また仮に、バッファの特定に遅れが生じた場合にも、送受信の順序を履歴バッファによって追跡し、処理漏れを無くすことが可能となる。   According to the present invention, it is possible to quickly specify a buffer to be processed, and it is possible to reduce the load on the CPU and the possibility of delay in specifying the buffer. In addition, even if there is a delay in specifying the buffer, the transmission / reception order can be traced by the history buffer, and processing omission can be eliminated.

続いて、本発明を実施するための最良の形態について図面を参照して詳細に説明する。図1は、本実施の形態に係るCANモジュール(データ処理モジュール)とCPU51、RAM52、周辺回路53を1チップで構成したCANデバイス100の概略構成を表した図である。例えば、周辺回路53は、I/O回路を含み、CANデバイス100の外部に設けられた各種センサ及び表示装置と接続され外部と内部との間のインターフェースを行い、CPU51は、各種センサからのデータをI/Oを介して取り出すと共にRAMを利用して所望の処理を実行してメッセージバッファに書き込む処理及びメッセージバッファに書き込まれたメッセージを取り出し所望の処理を実行した後I/Oを介して外部に接続された表示装置にデータを送信する処理等を行う。   Next, the best mode for carrying out the present invention will be described in detail with reference to the drawings. FIG. 1 is a diagram illustrating a schematic configuration of a CAN device 100 in which a CAN module (data processing module) according to the present embodiment, a CPU 51, a RAM 52, and a peripheral circuit 53 are configured in one chip. For example, the peripheral circuit 53 includes an I / O circuit, and is connected to various sensors and display devices provided outside the CAN device 100 and performs an interface between the outside and the inside. The CPU 51 receives data from the various sensors. Is taken out via I / O, and the RAM is used to execute a desired process to write to the message buffer, and the message written to the message buffer is taken out and the desired process is executed. A process of transmitting data to a display device connected to is performed.

CANモジュールは、メッセージハンドリング部2と、メッセージバッファ3と、CANプロトコル送信層4、マスクセット5、後述するCAN書き込みポインタにてリング状に書き込み制御されるリングバッファ6で構成された履歴バッファを備えている。   The CAN module includes a history buffer composed of a message handling unit 2, a message buffer 3, a CAN protocol transmission layer 4, a mask set 5, and a ring buffer 6 controlled to be written in a ring shape by a CAN write pointer described later. ing.

図2は、上述したCANモジュールのメッセージハンドリング部2の詳細構成を表した図である。図2を参照すると、メッセージハンドリング部2は、メッセージの送受信に必要な構成のほか、履歴情報提供機能を実現すべく、メッセージバッファ3及びリングバッファ6と接続され、メッセージバッファ3からデータを読み出すためのデータ処理回路、データを破壊されないようにするデータ保護回路として、フリップフロップ回路で構成されたCAN書き込みポインタ21、最古(未読)履歴情報ポインタ23を備え、更に、前記各ポインタの内容に従属する最新履歴情報ポインタ22、履歴無効フラグ24、オーバーフローフラグ25とを含んで構成される。また、図中2重線で囲まれた最新履歴情報ポインタ22、最古(未読)履歴情報ポインタ23、履歴無効フラグ24、オーバーフローフラグ25が、CPU51から見える状態に保持される。   FIG. 2 is a diagram showing a detailed configuration of the message handling unit 2 of the CAN module described above. Referring to FIG. 2, the message handling unit 2 is connected to the message buffer 3 and the ring buffer 6 in order to read out data from the message buffer 3 in order to realize a history information providing function in addition to a configuration necessary for transmitting and receiving messages. As a data protection circuit for preventing data from being destroyed, a CAN write pointer 21 and an oldest (unread) history information pointer 23 composed of flip-flop circuits are provided, and further dependent on the contents of each pointer. The latest history information pointer 22, the history invalid flag 24, and the overflow flag 25 are configured. In addition, the latest history information pointer 22, the oldest (unread) history information pointer 23, the history invalid flag 24, and the overflow flag 25 surrounded by a double line in the figure are kept visible to the CPU 51.

メッセージハンドリング部2は、メッセージバッファ3の所定バッファにメッセージ書き込みが完了すると、CAN書き込みポインタ21の値に基づいて、リングバッファ6に履歴情報(当該バッファのメッセージ番号)を記録する。最新履歴情報ポインタ22は、CAN書き込みポインタ21が示す位置の一つ前の位置を示し、直近に(一番最近に)書き込みが行われたバッファのメッセージ番号が格納される。また、最古(未読)履歴情報ポインタ23は、初期状態においては、CAN書き込みポインタ21と一致するが、CPU51からのリードアクセスと連動し、常に最も古く未読の履歴情報が示されるように遷移していく。   When message writing is completed in a predetermined buffer of the message buffer 3, the message handling unit 2 records history information (message number of the buffer) in the ring buffer 6 based on the value of the CAN write pointer 21. The latest history information pointer 22 indicates the position immediately before the position indicated by the CAN write pointer 21, and stores the message number of the buffer that was most recently written (most recently). The oldest (unread) history information pointer 23 coincides with the CAN write pointer 21 in the initial state. However, the oldest (unread) history information pointer 23 always shifts to indicate the oldest unread history information in conjunction with the read access from the CPU 51. To go.

また、履歴無効フラグ24は、リングバッファ6の資源が全く使われていない状態を示す。例えば、履歴無効フラグ24は、CAN書き込みポインタ21=最古(未読)履歴情報ポインタ23である場合にオン状態レベル「1」に設定され、CAN書き込みポインタ21≠最古(未読)履歴情報ポインタ23である場合にオフ状態レベル「0」に設定される。また、オーバーフローフラグ25は、リングバッファ6の資源が使われた状態を示す。例えば、オーバーフローフラグ25は、CAN書き込みポインタ21が最古(未読)履歴情報ポインタ23から一つ前の位置と一致する場合にオン状態レベル「1」に設定され、それ以外の場合にオフ状態レベル「0」に設定される。   The history invalid flag 24 indicates a state in which the resources of the ring buffer 6 are not used at all. For example, the history invalid flag 24 is set to the ON state level “1” when the CAN write pointer 21 = the oldest (unread) history information pointer 23, and the CAN write pointer 21 ≠ the oldest (unread) history information pointer 23. Is set to the off state level “0”. The overflow flag 25 indicates a state where the resources of the ring buffer 6 are used. For example, the overflow flag 25 is set to the on state level “1” when the CAN write pointer 21 coincides with the position immediately before the oldest (unread) history information pointer 23, and the off state level otherwise. Set to “0”.

図3は、メッセージバッファとリングバッファの構成を表した図である。図3を参照すると、メッセージバッファ3は、メッセージ優先度を表す識別子(ID)、送信要求メッセージであるか否かやメッセージ本文長を指定するコントロールフィールド(制御セグメント)、メッセージ本文の順で所定数(n個)のメッセージをバッファ可能となっている。   FIG. 3 is a diagram illustrating the configuration of the message buffer and the ring buffer. Referring to FIG. 3, the message buffer 3 has a predetermined number in the order of an identifier (ID) indicating message priority, a control field (control segment) for designating whether or not the message is a transmission request message, and a message body length, and a message body. (N) messages can be buffered.

また、リングバッファ6は、RHL0からRHL23までのアドレスに24個の受信履歴情報(Reception History List)を格納可能な構成であり、リングバッファ6は、THL0からTHL7までのアドレスに8個の送信履歴情報(Transmission History List)を格納可能な構成となっている。例えば、リングバッファ6のRHL0にメッセージ番号#1、RHL1にメッセージ番号#m、RHL2にメッセージ番号#3が記録されているとすると、同図矢線に示された通り、メッセージバッファ3のメッセージ番号#1、メッセージ番号#m、メッセージ番号#3の順にメッセージが受信されたことを意味している。   The ring buffer 6 is configured to store 24 reception history information (Reception History List) at addresses from RHL0 to RHL23. The ring buffer 6 has 8 transmission histories at addresses from THL0 to THL7. Information (Transmission History List) can be stored. For example, if message number # 1 is recorded in RHL0 of ring buffer 6, message number #m is recorded in RHL1, and message number # 3 is recorded in RHL2, the message number in message buffer 3 is indicated by the arrow in FIG. This means that messages are received in the order of # 1, message number #m, and message number # 3.

CANプロトコル送信層4は、CANプロトコルに従ってCANトランシーバとデータの送受信を行う。マスクセット5は、メッセージの所定部分(例えばIDの一部)をマスクする際に用いられ、例えば、IDが2進数4ビットのデータであるとして、0〜31番地のメッセージバッファのn番地のメッセージバッファ3にIDの1100が割り振られていた場合において、上位2ビットにマスクをかけることによって1100以外に0000、0100、1000が番地のメッセージバッファに格納されることになるよう用いられる。   The CAN protocol transmission layer 4 transmits / receives data to / from the CAN transceiver according to the CAN protocol. The mask set 5 is used when masking a predetermined part of the message (for example, a part of the ID). For example, assuming that the ID is binary 4-bit data, the message at address n in the message buffer at addresses 0 to 31 is used. When ID 1100 is assigned to the buffer 3, 0000, 0100, and 1000 other than 1100 are stored in the address message buffer by masking the upper 2 bits.

図4は、本実施の形態に係るCANモジュールにおいて、受信割り込みが発生した場合の動作を表した図である。図4を参照すると、CANモジュールによってメッセージバッファへの書き込みが行われ、受信割り込み信号がCPUに送信されると(ステップS001)、CPU51は、最古(未読)履歴情報ポインタ23で示された位置の最古(未読)履歴情報ポインタで示されるリングバッファの情報を読み出す(ステップS002)。上述のとおり、リングバッファ6は所定回数分(本実施の形態では23個)の履歴情報を記録可能であり、最古(未読)履歴情報ポインタの内容は、CPU51のリードアクセスと連動し、CPUは、最古(未読)履歴情報ポインタ23の内容にて、メッセージバッファ3の中で未だ参照されていない最古のバッファを特定することが可能となる(ステップS003)。   FIG. 4 is a diagram showing an operation when a reception interrupt occurs in the CAN module according to the present embodiment. Referring to FIG. 4, when writing to the message buffer is performed by the CAN module and a reception interrupt signal is transmitted to the CPU (step S001), the CPU 51 displays the position indicated by the oldest (unread) history information pointer 23. The ring buffer information indicated by the oldest (unread) history information pointer is read (step S002). As described above, the ring buffer 6 can record history information for a predetermined number of times (23 in this embodiment), and the content of the oldest (unread) history information pointer is linked to the read access of the CPU 51, and the CPU The oldest (unread) history information pointer 23 can identify the oldest buffer that has not been referred to in the message buffer 3 (step S003).

図5は、本実施の形態のメッセージ受信時の動作を表したタイミングチャートである。同図上段(A)CPUがCANモジュールの受信動作に追従できている状態においても、多数のDNビットを読み出す処理が不要となるため、CPU処理時間を大幅に短縮し負荷を低減することが可能となっている。また、同図下段(B)CPUがCANモジュールの受信動作に追従できていない状態になると、図15(B)で説明したとおり従来であればメッセージの格納順序が不定となるところであるが、本発明では、メッセージの到着順序で整理した情報をCPUに与えることができる。従って、CPUにメッセージバッファに先に格納されたメッセージから順に着実に処理させることや、最新履歴情報を用いて、最後に受信したメッセージを最初に処理させることも可能となる。   FIG. 5 is a timing chart showing the operation when a message is received according to this embodiment. (A) Even when the CPU can follow the receiving operation of the CAN module, it is not necessary to read many DN bits, so the CPU processing time can be greatly shortened and the load can be reduced. It has become. Also, if the lower part (B) of the figure is in a state where the CPU cannot follow the reception operation of the CAN module, as described with reference to FIG. In the invention, information arranged in the order of arrival of messages can be given to the CPU. Therefore, it is possible to cause the CPU to steadily process the messages stored in the message buffer first, and to process the last received message first using the latest history information.

また、本実施の形態では、図6に示したとおり、受信用のリングバッファ61、送信用のリングバッファ62、そして、CAN読み出しポインタ、最新履歴情報ポインタ、最古(未読)履歴情報ポインタ、履歴無効フラグ、オーバフローフラグに対応するポインタ(送信の場合はCAN書き込みポインタはCAN読み出しポインタとなる)、フラグをそれぞれ備えることによって、CPUが、CANモジュールが送信したメッセージの順序をCPUに提供可能な構成も採用可能である。   In this embodiment, as shown in FIG. 6, the ring buffer 61 for reception, the ring buffer 62 for transmission, the CAN read pointer, the latest history information pointer, the oldest (unread) history information pointer, the history Configuration in which the CPU can provide the CPU with the order of messages transmitted by the CAN module by providing a pointer corresponding to the invalid flag and the overflow flag (in the case of transmission, the CAN write pointer becomes a CAN read pointer) and a flag. Can also be adopted.

[実施例] [Example]

続いて、上記した本発明の作用効果をより具体的に説明すべく、上述した構成による動作例について順を追って説明する。図7は、初期状態、即ち、リングバッファ6に履歴情報が格納されていない状態を表した図である。リングバッファ6のRHL0〜23は不定であり、CAN書き込みポインタ21及び最古(未読)履歴情報ポインタ23は、初期位置RHL0を指した状態となっている。また、最新履歴情報ポインタ22は、CAN書き込みポインタ21より一つ戻った位置RHL23を指している。この状態では、CAN書き込みポインタ21と最古(未読)履歴情報ポインタ23が一致するため履歴無効フラグ24が立てられている。   Subsequently, in order to more specifically describe the above-described operation and effect of the present invention, an operation example having the above-described configuration will be described in order. FIG. 7 is a diagram showing an initial state, that is, a state in which history information is not stored in the ring buffer 6. RHL0 to RHL23 of the ring buffer 6 are indefinite, and the CAN write pointer 21 and the oldest (unread) history information pointer 23 are in a state pointing to the initial position RHL0. Further, the latest history information pointer 22 points to a position RHL 23 that is one return from the CAN write pointer 21. In this state, since the CAN write pointer 21 and the oldest (unread) history information pointer 23 match, the history invalid flag 24 is set.

図8は、図7の初期状態の後で、CANモジュールが2つのメッセージを受信し、最初のメッセージをバッファ#31に、次のメッセージをバッファ#1に格納した状態を表した図である。メッセージハンドリング部2によって、メッセージを格納したバッファの位置を示すメッセージ番号msg#31、msg#1がそれぞれRHL0、RHL1に記録されている。CAN書き込みポインタ21は、次に書き込むRHLを指しており、CPUのリードアクセスが行われていない現段階では最古(未読)履歴情報ポインタ23は、初期位置RHL0を指したままとなっている。また、最新履歴情報ポインタ22は、CAN書き込みポインタ21より一つ戻った位置RHL1を指している。この状態では、CAN書き込みポインタ21と最古(未読)履歴情報ポインタ23が一致しなくなったため履歴無効フラグ24はレベル「0」に変更される。従って、CPUとしては、履歴無効フラグ24により履歴情報が有効であることを確認し、最古(未読)履歴情報ポインタ23からメッセージ番号msg#31を、最新履歴情報ポインタ22からは、メッセージ番号msg#1を確認することが可能となっている。   FIG. 8 is a diagram showing a state where the CAN module receives two messages after the initial state of FIG. 7 and stores the first message in buffer # 31 and the next message in buffer # 1. Message numbers msg # 31 and msg # 1 indicating the position of the buffer storing the message are recorded in RHL0 and RHL1, respectively, by the message handling unit 2. The CAN write pointer 21 points to the RHL to be written next, and the oldest (unread) history information pointer 23 remains pointing to the initial position RHL0 at the present stage when the CPU does not perform read access. Further, the latest history information pointer 22 points to a position RHL1 that is one return from the CAN write pointer 21. In this state, since the CAN write pointer 21 and the oldest (unread) history information pointer 23 do not match, the history invalid flag 24 is changed to the level “0”. Therefore, the CPU confirms that the history information is valid by the history invalid flag 24, the message number msg # 31 from the oldest (unread) history information pointer 23, and the message number msg from the latest history information pointer 22. It is possible to confirm # 1.

図9は、図8のCANモジュールが2つのメッセージを受信した状態からCPUが一つのメッセージを読み出した状態を表した図である。CPUのリードアクセスが行われた結果、最古(未読)履歴情報ポインタ23が初期位置RHL0からRHL1に一つ移動している。一方、新たな履歴情報が書き込まれた訳ではないので、CAN書き込みポインタ21、最新履歴情報ポインタ22は移動していない。また、履歴無効フラグ24やオーバーフローフラグ25もレベル「0」のままである。この状態では、CPUは、履歴無効フラグ24により履歴情報が有効であることを確認し、最古(未読)履歴情報ポインタ23、最新履歴情報ポインタ22から、メッセージ番号msg#1を確認することが可能となっている。   FIG. 9 is a diagram illustrating a state where the CPU reads one message from a state where the CAN module of FIG. 8 has received two messages. As a result of the CPU read access, the oldest (unread) history information pointer 23 is moved from the initial position RHL0 to RHL1 by one. On the other hand, since the new history information is not written, the CAN write pointer 21 and the latest history information pointer 22 are not moved. Also, the history invalid flag 24 and the overflow flag 25 remain at level “0”. In this state, the CPU confirms that the history information is valid by the history invalid flag 24, and can confirm the message number msg # 1 from the oldest (unread) history information pointer 23 and the latest history information pointer 22. It is possible.

図10は、CPUのリードアクセスに対し、CANモジュールのメッセージ受信が多数先行した結果、リングバッファ6の空きが無くなった直後の状態を表した図である。同図では、CAN書き込みポインタ21がRHL8を指しているので、CANモジュールがRHL7にメッセージ番号msg#9を書き込んだ直後の状態を表している。また、最古(未読)履歴情報ポインタ23はRHL9を指しており、RHL9〜23、及び、RHL0〜7までの履歴情報が未だリードされていない状態(最古(未読)履歴情報ポインタ23に対し、CAN書き込みポインタ21が約一周先行している)となっている。履歴無効フラグ24はレベル「0」のままであり、CPUは、履歴情報が有効であることを確認し、最古(未読)履歴情報ポインタ23から、メッセージ番号msg#5、最新履歴情報ポインタ22からメッセージ番号msg#9を確認することが可能となっている。また、この状態となると、CAN書き込みポインタ21(=RHL8)と最古(未読)履歴情報ポインタ23から一つ戻った位置(=(RHL9−1)=RHL8)が一致するためオーバーフローフラグ25が立てられている。   FIG. 10 is a diagram showing a state immediately after the ring buffer 6 has run out as a result of many messages received by the CAN module preceding the read access of the CPU. In the figure, since the CAN write pointer 21 points to RHL8, the CAN module indicates a state immediately after the message number msg # 9 is written in RHL7. The oldest (unread) history information pointer 23 points to the RHL 9, and the history information from the RHL 9 to 23 and the RHL 0 to 7 is not yet read (in contrast to the oldest (unread) history information pointer 23. , The CAN write pointer 21 is preceded by about one round). The history invalid flag 24 remains at level “0”, and the CPU confirms that the history information is valid, and from the oldest (unread) history information pointer 23, the message number msg # 5, the latest history information pointer 22 Thus, the message number msg # 9 can be confirmed. In this state, the overflow flag 25 is set because the CAN write pointer 21 (= RHL8) and the position returned from the oldest (unread) history information pointer 23 (= (RHL9-1) = RHL8) match. It has been.

図11は、図10のオーバーフローが成立した状態から新たにメッセージを受信し、メッセージバッファに格納した状態を表した図である。オーバーフローフラグ25がレベル「1」の状態では、CAN書き込みポインタ21は現在の値(RHL8)保持し、CAN書き込みポインタ21の現在の位置から一つ戻った位置に履歴情報を上書きする特定制御が開始される。例えば、図11では、CAN書き込みポインタ21はRHL8を指したままであるが、一減されてRHL7にmsg#27が上書きされている。このような特定制御は、オーバフローフラグがクリアされるまで継続される。このような特定制御を行うことによって、最古(未読)履歴情報ポインタ23の値を保護するとともに、最新履歴情報ポインタ22に指定される位置に常に最新の履歴情報が格納される状態が保持される。   FIG. 11 is a diagram showing a state in which a new message is received from the state where the overflow of FIG. 10 is established and stored in the message buffer. When the overflow flag 25 is at the level “1”, the CAN write pointer 21 holds the current value (RHL8), and the specific control is started to overwrite the history information at a position returned from the current position of the CAN write pointer 21. Is done. For example, in FIG. 11, the CAN write pointer 21 remains pointing to RHL8, but is decremented and msg # 27 is overwritten in RHL7. Such specific control is continued until the overflow flag is cleared. By performing such specific control, the value of the oldest (unread) history information pointer 23 is protected, and the state where the latest history information is always stored at the position specified by the latest history information pointer 22 is maintained. The

以上のように、リングバッファ6の内容が更新されるため、CPUは、未参照であって最先に受信したメッセージが格納されたバッファや最新のメッセージが格納されたバッファを即時に特定することが可能となる。   As described above, since the contents of the ring buffer 6 are updated, the CPU immediately specifies a buffer in which a message that has not been referenced and is received first or a message that has been received first is stored. Is possible.

以上、本発明の一実施の形態及び実施例を説明したが、その原理からも明らかなとおり、本発明の技術的範囲は、上述した実施の形態に限定されるものではなく、履歴情報を参照可能とし、処理すべきメッセージを即座に決定できるようにしておくという本発明の要旨を逸脱しない範囲で、各種の変形・置換をなしうることが可能であることはいうまでもない。   The embodiment and examples of the present invention have been described above. However, as is clear from the principle, the technical scope of the present invention is not limited to the above-described embodiment, and reference is made to history information. Needless to say, various modifications and substitutions can be made without departing from the gist of the present invention, which allows the message to be processed to be determined immediately.

例えば、上述した実施の形態及び実施例では、CPUから読み出し可能とするポインタの例を示したが、追加のポインタを設けて、参照できるようにしておいてもよい。また、リングバッファのサイズ(履歴情報格納可能数)も特に限定されるものではなく、CPUの処理能力やメッセージバッファのサイズに応じて変更可能である。   For example, in the above-described embodiments and examples, an example of a pointer that can be read from the CPU has been described. However, an additional pointer may be provided so that it can be referred to. Also, the size of the ring buffer (the number of history information that can be stored) is not particularly limited, and can be changed according to the processing capacity of the CPU and the size of the message buffer.

また、上記した実施の形態及び実施例では、履歴情報が全く無い状態(初期状態)とオーバーフロー状態を簡単に区別すべく、CAN書き込みポインタ21と最古(未読)履歴情報ポインタ23の関係の判定基準(A=BとA=B−1)を区別して設けたが、直前の状態を保存するなどして、実質的なオーバーフロー状態を判断できるようにしても良い。   In the above-described embodiments and examples, the relationship between the CAN write pointer 21 and the oldest (unread) history information pointer 23 is determined in order to easily distinguish between a state where there is no history information (initial state) and an overflow state. Although the criteria (A = B and A = B-1) are distinguished from each other, a substantial overflow state may be determined by saving the immediately preceding state.

また、上述した実施の形態及び実施例では、リングバッファを採用し、オーバーフロー時に特定制御が行われるものとして説明したが、その他当業者がなしうる修正を加えることが可能である。また、オーバーフロー状態が発生しないという前提の下では、通常のリングバッファリング制御を行うことで足りることになる。また例えば、リングバッファ以外のバッファ構成も採用可能であり、履歴情報の格納・読み出し手順もその他よく知られているのものを採用可能である。   In the above-described embodiments and examples, the ring buffer is used and specific control is performed at the time of overflow. However, other modifications that can be made by those skilled in the art can be added. Further, under the assumption that no overflow condition occurs, it is sufficient to perform normal ring buffering control. Further, for example, a buffer configuration other than the ring buffer can be adopted, and other well-known procedures for storing / reading history information can also be adopted.

本発明の第1の実施の形態に係るCANデバイスの概略構成を表した図である。1 is a diagram illustrating a schematic configuration of a CAN device according to a first embodiment of the present invention. 本発明の第1の実施の形態に係るメッセージハンドリング部の構成を説明するための図である。It is a figure for demonstrating the structure of the message handling part which concerns on the 1st Embodiment of this invention. 本発明の第1の実施の形態に係るメッセージバッファ及びリングバッファの構成を表した図である。It is a figure showing the structure of the message buffer and ring buffer which concern on the 1st Embodiment of this invention. 本発明の第1の実施の形態にCANデバイスにおける受信割り込み時の処理の流れを表した図である。It is a figure showing the flow of the process at the time of the reception interruption in a CAN device in the 1st Embodiment of this invention. 本実施の形態の動作を表したタイミングチャートである。It is a timing chart showing operation of this embodiment. 本発明の第1の実施の形態に係るメッセージバッファ及びリングバッファの別の構成を表した図である。It is a figure showing another structure of the message buffer and ring buffer which concern on the 1st Embodiment of this invention. 本発明の一実施例の動作を説明するための図である。It is a figure for demonstrating operation | movement of one Example of this invention. 本発明の一実施例の動作を説明するための図である。It is a figure for demonstrating operation | movement of one Example of this invention. 本発明の一実施例の動作を説明するための図である。It is a figure for demonstrating operation | movement of one Example of this invention. 本発明の一実施例の動作を説明するための図である。It is a figure for demonstrating operation | movement of one Example of this invention. 本発明の一実施例の動作を説明するための図である。It is a figure for demonstrating operation | movement of one Example of this invention. CAN(Controller Area Network)の概略構成を表した図である。It is a figure showing the schematic structure of CAN (Controller Area Network). CANモジュールに備えられるメッセージバッファの構成を表した図である。It is a figure showing the structure of the message buffer with which a CAN module is equipped. メッセージを受信した際の受信割り込み発生以降の動作を表したフローチャートである。It is a flowchart showing the operation | movement after reception interruption generation | occurrence | production when a message is received. 従来技術を説明するためのタイミングチャートである。It is a timing chart for demonstrating a prior art.

符号の説明Explanation of symbols

2 メッセージハンドリング部
3 メッセージバッファ
4 CANプロトコル送信層
5 マスクセット
6、61、62 リングバッファ
11、1n、16、19 CANモジュール(CAN コントローラ)
20 サーチ用共通アドレス生成部
21 CAN書き込みポインタ
22 最新履歴情報ポインタ
23 最古(未読)履歴情報ポインタ
24 履歴無効フラグ
25 オーバーフローフラグ
40 CPU I/F
51 CPU
52 RAM
53 周辺回路
60 CANトランシーバ
100 CANデバイス
2 Message handling unit 3 Message buffer 4 CAN protocol transmission layer 5 Mask set 6, 61, 62 Ring buffer 11, 1n, 16, 19 CAN module (CAN controller)
20 Search common address generator 21 CAN write pointer 22 Latest history information pointer 23 Oldest (unread) history information pointer 24 History invalid flag 25 Overflow flag 40 CPU I / F
51 CPU
52 RAM
53 Peripheral circuit 60 CAN transceiver 100 CAN device

Claims (18)

マルチマスタ方式のネットワークに接続され、一のメッセージを格納可能なバッファを複数有するメッセージバッファと、前記メッセージバッファ上のバッファの位置を示す履歴情報を所定回数分格納可能な履歴バッファを有するデータ処理モジュールにおける送受信メッセージの管理方法であって、
前記データ処理モジュールのメッセージハンドリング部が、前記メッセージバッファ上の更新が行われたバッファの位置情報を、前記履歴バッファの次書き込み位置に格納する工程と、
前記メッセージハンドリング部が、CPU(Central Processing Unit)からのリードアクセスに応じて、前記履歴バッファのうちCPUから未参照の履歴情報の位置を示す未読ポインタを逐次更新する工程と、を含み、
少なくとも前記履歴バッファの直近書き込み位置と、前記未読ポインタを、前記CPUから参照可能に保持すること、
を特徴とするデータ処理モジュールにおける送受信メッセージの管理方法。
A data processing module having a message buffer connected to a multi-master network and having a plurality of buffers capable of storing one message, and a history buffer capable of storing history information indicating the position of the buffer on the message buffer a predetermined number of times A method for managing sent and received messages in
And storing the message handling unit of the data processing module, the position information of the buffer has been updated on the message buffer, the next write position in the history buffer,
The message handling unit sequentially updating an unread pointer indicating a position of unreferenced history information from the CPU in the history buffer in response to a read access from a CPU (Central Processing Unit),
Holding at least the latest write position of the history buffer and the unread pointer so that the CPU can refer to them,
A method for managing transmitted and received messages in a data processing module.
前記バッファの位置情報を前記履歴バッファに格納する工程において、前記メッセージバッファのバッファの値が更新されたことに応じて、前記更新が行われたバッファの位置情報を格納することを特徴とする請求項1に記載のデータ処理モジュールにおける送受信メッセージの管理方法。The step of storing the position information of the buffer in the history buffer stores the position information of the buffer that has been updated in response to an update of a buffer value of the message buffer. Item 4. A method for managing transmission / reception messages in the data processing module according to Item 1. 前記メッセージハンドリング部は、前記履歴バッファへの書き込み位置より一つ前の位置を示す最新履歴情報ポインタを有し、
前記最新履歴情報ポインタを前記CPUから参照可能としたこと、
を特徴とする請求項1または2に記載のデータ処理モジュールにおける送受信メッセージの管理方法。
The message handling unit has a latest history information pointer that indicates a position immediately before a writing position in the history buffer,
Making it possible to refer to the latest history information pointer from the CPU;
The transmission / reception message management method in the data processing module according to claim 1 or 2.
前記メッセージハンドリング部は、前記履歴バッファへの履歴情報の格納有無を示す履歴無効フラグを有し、
前記メッセージハンドリング部は、前記履歴バッファの次書き込み位置と未読ポインタが一致する初期状態で前記履歴無効フラグをオン状態に設定し、前記履歴バッファの次書き込み位置と未読ポインタが不一致となった段階で前記履歴無効フラグをオフ状態に設定し、
前記CPUは、前記履歴無効フラグを参照して前記履歴バッファへの履歴情報の格納有無を判定すること、
を特徴とする請求項1乃至3いずれか一に記載のデータ処理モジュールにおける送受信メッセージの管理方法。
The message handling unit includes a history invalid flag indicating whether or not history information is stored in the history buffer;
The message handling unit, the history invalid flag in the initial state the next write position and unread pointer of the history buffer to match set to the ON state at the stage where the next write position and unread pointer of the history buffer is not matched Set the history invalid flag to an off state,
The CPU refers to the history invalid flag to determine whether or not history information is stored in the history buffer;
The transmission / reception message management method in the data processing module according to any one of claims 1 to 3 .
前記メッセージハンドリング部は、前記履歴バッファが空き領域が無くなったことを示すオーバーフローフラグを有し、
前記メッセージハンドリング部は、前記履歴バッファの次書き込み位置と未読ポインタより一つ前の位置が一致する状態で前記オーバーフローフラグをオン状態に設定し、
前記オーバーフローフラグがオン状態である場合は、前記メッセージハンドリング部は、前記履歴バッファの直近書き込み位置に、爾後の履歴情報を上書きすること、
を特徴とする請求項乃至4いずれか一に記載のデータ処理モジュールにおける送受信メッセージの管理方法。
The message handling unit has an overflow flag indicating that the history buffer has run out of free space;
The message handling unit sets the overflow flag to an on state in a state where the next write position of the history buffer and the position immediately before the unread pointer match.
When the overflow flag is in an on state, the message handling unit overwrites the latest history information at the latest write position of the history buffer;
The method for managing transmission / reception messages in the data processing module according to claim 1 .
前記履歴バッファとして、リングバッファを用いる請求項1乃至5いずれか一に記載のデータ処理モジュールにおける送受信メッセージの管理方法。The transmission / reception message management method in the data processing module according to claim 1, wherein a ring buffer is used as the history buffer. 一のメッセージを格納可能なバッファを複数有するメッセージバッファと、
メッセージを受信したとき前記受信メッセージの識別子(ID)に基づき前記メッセージバッファ内を走査し、前記受信メッセージを記憶するバッファを前記複数のバッファの中から選択するメッセージハンドリング部と、
前記複数のバッファのうち、受信メッセージが記憶されているバッファの番地を保持し、前記受信メッセージが受信された順番を管理する履歴バッファとを備えること、
を特徴とするデータ処理モジュール。
A message buffer having a plurality of buffers capable of storing one message ;
A message handling unit that scans the message buffer based on an identifier (ID) of the received message when a message is received, and selects a buffer for storing the received message from the plurality of buffers;
A history buffer that holds an address of a buffer in which received messages are stored among the plurality of buffers and manages an order in which the received messages are received;
A data processing module.
前記履歴バッファに管理された前記受信メッセージの受信された順番に基づいて前記メッセージバッファからデータを読み出すデータ処理回路を備えること、
を特徴とする請求項に記載のデータ処理モジュール。
A data processing circuit for reading data from the message buffer based on the order of reception of the received messages managed in the history buffer;
The data processing module according to claim 7 .
前記履歴バッファに記憶された受信メッセージを管理するための最古のバッファを示す最古履歴情報ポインタと、
前記メッセージハンドリング部によって選択されたバッファの番地を記憶する位置を示す書き込みポインタと、を備えること、
を特徴とする請求項又はに記載のデータ処理モジュール。
An oldest history information pointer indicating the oldest buffer for managing received messages stored in the history buffer;
A write pointer indicating a position for storing the address of the buffer selected by the message handling unit,
The data processing module according to claim 7 or 8 .
前記履歴バッファの空き容量が所定値以下になった場合に、前記書き込みポインタの番地を所定番地戻すことによって、前記履歴バッファに書き込まれた順番を先頭から所定順位まで保護するデータ保護回路を備えること、
を特徴とする請求項に記載のデータ処理モジュール。
A data protection circuit is provided that protects the order of writing to the history buffer from the top to a predetermined order by returning the address of the write pointer to a predetermined address when the free capacity of the history buffer becomes a predetermined value or less. ,
The data processing module according to claim 9 .
前記履歴バッファは、リングバッファによって構成されていること、
を特徴とする請求項7乃至10いずれか一に記載のデータ処理モジュール。
The history buffer is constituted by a ring buffer;
The data processing module according to any one of claims 7 to 10 .
マルチマスタ方式のネットワークに接続されるデータ処理モジュールにおいて、
送信するメッセージ及び受信したメッセージを格納可能なバッファを複数有するメッセージバッファと、
前記メッセージバッファ上の更新が行われたバッファの位置を示す履歴情報を所定回数分格納可能な履歴バッファと、
前記メッセージバッファ上のメッセージの管理を行うとともに、前記メッセージバッファのバッファの位置情報を前記履歴バッファに格納するメッセージハンドリング部とを備え、
前記メッセージハンドリング部は、前記履歴バッファ上の前記履歴情報の書き込み位置を示す書き込み位置ポインタと、
CPU(Central Processing Unit)からのリードアクセスに応じて、前記履歴バッファのうちCPUから未参照の履歴情報の位置を示す未読ポインタと、を備え、
少なくとも前記履歴バッファの直近書き込み位置と、前記未読ポインタを、前記CPUから参照可能に保持すること、
を特徴とするデータ処理モジュール。
In a data processing module connected to a multi-master network,
A message buffer having a plurality of buffers capable of storing a message to be transmitted and a received message;
A history buffer capable of storing history information indicating the position of the buffer on which update has been performed on the message buffer for a predetermined number of times;
A message handling unit for managing messages on the message buffer and storing buffer position information of the message buffer in the history buffer ;
The message handling unit, a write position pointer indicating a write position of the history information on the history buffer;
In response to a read access from a CPU (Central Processing Unit), an unread pointer indicating the position of history information that has not been referenced from the CPU in the history buffer,
Holding at least the latest write position of the history buffer and the unread pointer so that the CPU can refer to them,
A data processing module.
請求項12に記載のデータ処理モジュールにおいて、
少なくとも前記履歴バッファ、書き込み位置ポインタ、未読ポインタを送信メッセージ管理用と受信メッセージ管理用にそれぞれ個別に備えていること、
を特徴とするデータ処理モジュール。
The data processing module according to claim 12 ,
At least the history buffer, the write position pointer, and the unread pointer are individually provided for transmission message management and reception message management,
A data processing module.
送信するメッセージ及び受信したメッセージを格納可能なバッファを複数有するメッセージバッファと、
前記メッセージバッファ上の更新が行われたバッファの位置を示す履歴情報を所定回数分格納可能なリングバッファと、
前記メッセージバッファ上のメッセージの管理を行うメッセージハンドリング部とを備え、
前記メッセージハンドリング部は、前記リングバッファ上の前記履歴情報の書き込み位置を示す書き込み位置ポインタと、
CPU(Central Processing Unit)からのリードアクセスに応じて、前記リングバッファのうちCPUから未参照の履歴情報の位置を示す未読ポインタと、を備え、
少なくとも前記リングバッファの直近書き込み位置と、前記未読ポインタを、前記CPUから参照可能に保持すること、
を特徴とするデータ処理モジュール。
A message buffer having a plurality of buffers capable of storing a message to be transmitted and a received message;
A ring buffer capable of storing history information indicating the position of the buffer where the update has been performed on the message buffer for a predetermined number of times;
A message handling unit for managing messages on the message buffer;
The message handling unit includes a write position pointer indicating a write position of the history information on the ring buffer;
In response to a read access from a CPU (Central Processing Unit), an unread pointer that indicates a position of history information that is not referenced from the CPU in the ring buffer,
Holding at least the latest write position of the ring buffer and the unread pointer so that they can be referred to by the CPU;
A data processing module.
請求項14に記載のデータ処理モジュールにおいて、更に、
前記リングバッファへの書き込み位置より一つ前の位置を示す最新履歴情報ポインタを有し、
前記最新履歴情報ポインタを前記CPUから参照可能としたこと、
を特徴とするデータ処理モジュール。
15. The data processing module according to claim 14 , further comprising:
A latest history information pointer indicating a position immediately before the writing position to the ring buffer;
Making it possible to refer to the latest history information pointer from the CPU;
A data processing module.
請求項14又は15に記載のデータ処理モジュールにおいて、更に、
前記メッセージハンドリング部は、前記リングバッファの次書き込み位置と未読ポインタが一致する初期状態でオン状態に設定され、前記リングバッファの次書き込み位置と未読ポインタが不一致となった段階でオフ状態に設定される履歴無効フラグを有し、
前記CPUは、前記履歴無効フラグを参照して前記リングバッファへの履歴情報の格納有無を判定すること、
を特徴とするデータ処理モジュール。
The data processing module according to claim 14 or 15 , further comprising:
The message handling unit is set to an on state in an initial state where the next write position of the ring buffer matches an unread pointer, and is set to an off state when the next write position of the ring buffer and an unread pointer do not match. Has a history invalid flag,
The CPU refers to the history invalid flag to determine whether or not history information is stored in the ring buffer;
A data processing module.
請求項14乃至16いずれか一に記載のデータ処理モジュールにおいて、更に、
前記メッセージハンドリング部は、前記リングバッファの次書き込み位置と未読ポインタより一つ前の位置が一致する状態でオン状態に設定されるオーバーフローフラグを有し、
前記メッセージハンドリング部は、
前記オーバーフローフラグがオン状態である場合は、前記リングバッファの直近書き込み位置に爾後の履歴情報を上書きすること、
を特徴とするデータ処理モジュール。
The data processing module according to any one of claims 14 to 16 , further comprising:
The message handling unit has an overflow flag that is set to an on state in a state where the next write position of the ring buffer and the position before the unread pointer match.
The message handling unit
If the overflow flag is on, overwriting the latest history information at the latest write position of the ring buffer;
A data processing module.
請求項14乃至17いずれか一に記載のデータ処理モジュールにおいて、
少なくとも前記リングバッファ、書き込み位置ポインタ、未読ポインタ、履歴無効フラグ、オーバーフローフラグを、送信メッセージ管理用と受信メッセージ管理用にそれぞれ個別に備えていること、
を特徴とするデータ処理モジュール。
The data processing module according to any one of claims 14 to 17 ,
At least the ring buffer, the write position pointer, the unread pointer, the history invalid flag, and the overflow flag are individually provided for transmission message management and reception message management,
A data processing module.
JP2005033014A 2005-02-09 2005-02-09 Data processing module and method for managing transmitted / received messages thereof Expired - Fee Related JP4574377B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005033014A JP4574377B2 (en) 2005-02-09 2005-02-09 Data processing module and method for managing transmitted / received messages thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005033014A JP4574377B2 (en) 2005-02-09 2005-02-09 Data processing module and method for managing transmitted / received messages thereof

Publications (2)

Publication Number Publication Date
JP2006222627A JP2006222627A (en) 2006-08-24
JP4574377B2 true JP4574377B2 (en) 2010-11-04

Family

ID=36984658

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005033014A Expired - Fee Related JP4574377B2 (en) 2005-02-09 2005-02-09 Data processing module and method for managing transmitted / received messages thereof

Country Status (1)

Country Link
JP (1) JP4574377B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5708165B2 (en) * 2011-04-05 2015-04-30 株式会社デンソー In-vehicle communication device
JP2012222466A (en) * 2011-04-05 2012-11-12 Denso Corp Multiplex communication device and multiplex communication method
US9485113B2 (en) * 2013-10-11 2016-11-01 Ge Aviation Systems Llc Data communications network for an aircraft
CN112379844A (en) * 2020-11-25 2021-02-19 深圳市华宝电子科技有限公司 Data protection method and device, electronic terminal and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004258856A (en) * 2003-02-25 2004-09-16 Seiko Epson Corp Data transfer control system, electronic apparatus, and data transfer control method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004258856A (en) * 2003-02-25 2004-09-16 Seiko Epson Corp Data transfer control system, electronic apparatus, and data transfer control method

Also Published As

Publication number Publication date
JP2006222627A (en) 2006-08-24

Similar Documents

Publication Publication Date Title
JP6961063B2 (en) Network hub, transfer method and in-vehicle network system
US6857030B2 (en) Methods, system and article of manufacture for pre-fetching descriptors
JP6961062B2 (en) Electronic control unit, communication method and in-vehicle network system
JP5505516B2 (en) Information processing system and information transmission method
JP4574377B2 (en) Data processing module and method for managing transmitted / received messages thereof
JP5686095B2 (en) Relay device, communication harness, and communication system
EP2869206B1 (en) Device and method for priority based message processing
CN116233036B (en) DMA transmission control method and device
JP4601456B2 (en) Data processing module and method for determining storage location of received message
JP4721741B2 (en) Data processing module and message receiving method thereof
JP4522846B2 (en) Data processing module and method for determining candidate message for sending
EP1894089B1 (en) Data pipeline management system and method for using the system
WO2017047657A1 (en) Buffer control apparatus, communication node, and relay apparatus
JP4708901B2 (en) Data processing module and method for preparing message transmission
JP4531555B2 (en) Data processing module and method for determining candidate message for sending
JP4492955B2 (en) Data processing module and method for determining candidate message for sending
US6940865B2 (en) System and method for interleaving frames with different priorities
CN112559196B (en) Transmission method for sharing communication data between processes
JP2004350138A (en) Data relaying apparatus and multiplex communication system
JP3388852B2 (en) Multiplex transmission equipment
US9641463B2 (en) Relating buffer management
JP2007034892A (en) Data processing module and its message transmission termination processing method
JP2006252282A (en) Data processing module
JP4969054B2 (en) Information processing device
JP2005284840A (en) Message communication circuit, message transmission method, message management method, and message communication system

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20071212

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100426

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100518

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100720

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: 20100817

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20100818

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130827

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees