JP2002236659A - Electronic control device for vehicle - Google Patents

Electronic control device for vehicle

Info

Publication number
JP2002236659A
JP2002236659A JP2001032624A JP2001032624A JP2002236659A JP 2002236659 A JP2002236659 A JP 2002236659A JP 2001032624 A JP2001032624 A JP 2001032624A JP 2001032624 A JP2001032624 A JP 2001032624A JP 2002236659 A JP2002236659 A JP 2002236659A
Authority
JP
Japan
Prior art keywords
data
communication
cpu
transmission
control data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001032624A
Other languages
Japanese (ja)
Inventor
Hiroo Kunibe
浩生 國部
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2001032624A priority Critical patent/JP2002236659A/en
Publication of JP2002236659A publication Critical patent/JP2002236659A/en
Pending legal-status Critical Current

Links

Landscapes

  • Bus Control (AREA)
  • Information Transfer Systems (AREA)
  • Communication Control (AREA)

Abstract

PROBLEM TO BE SOLVED: To ensure real-time processing of control data by shortening processing time required for communication. SOLUTION: A first CPU 10 includes a SPI 11, DMAs 12, 23, and RAMs 14, 15. A second CPU 20 includes a CPI 21, DMAs 22, 23, and RAMs 24, 25. Various types of control data are renewed in the first and second CPUs 10, 20 in order, and the renewed control data are mutually communicated between the respective CPUs. At this time, the respective CPUs 10, 20 renew the various types of control data by an individually set renewed cycle to store data renewed information corresponding to the renewed cycle at every renewal time. The CPUs 10, 20 regard the control data judged to have been renewed based on the stored data renewal information, as effective data to be transmitted at the time of the transmission, thereby transmitting only the effective data to a CPU on a receiving side.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、複数のCPUを具
備する車両用電子制御装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an electronic control unit for a vehicle having a plurality of CPUs.

【0002】[0002]

【従来の技術】複数のCPUで構成された車両用電子制
御システムにおいて、CPU間の通信をDMA(ダイレ
クトメモリアクセス)やSPI(同期式シリアル通信イ
ンターフェース)を用いて実施する場合に、DMAに転
送させるデータサイズを固定長とし、且つDMAの転送
回数をこのサイズ分だけの固定回数とするものがある。
また、通信データの異常を検出するため、データの送受
信時にソフト的にチェックサムやCRCなどの検査符号
値を計算して通信するものがある。
2. Description of the Related Art In a vehicular electronic control system composed of a plurality of CPUs, when communication between CPUs is performed using DMA (Direct Memory Access) or SPI (Synchronous Serial Communication Interface), the data is transferred to DMA. In some cases, the data size to be set is a fixed length, and the number of DMA transfers is a fixed number of times corresponding to this size.
In addition, in order to detect an abnormality in communication data, there is a communication method in which a check code value such as a checksum or a CRC is calculated by software when transmitting and receiving data.

【0003】上記従来技術におけるCPU間通信の構成
の一例を図15に示す。図15では、第1CPU10と
第2CPU20の構成例を示しており、各CPU10,
20は、1チャンネルのSPI11,21を通信の送受
信用に用い、2チャンネルのDMA12,13,22,
23を送信用及び受信用にそれぞれ用いる。SPI1
1,21は各々、送信データレジスタ及び受信データレ
ジスタを備える。また、DMA12,13,22,23
は各々、送信元アドレスレジスタ、送信先アドレスレジ
スタ及び転送回数カウントレジスタを備える。各SPI
11,21間は、クロック線とシリアル通信線とで接続
されており、通信のクロックは第1CPU10側から供
給される。
FIG. 15 shows an example of the configuration of communication between CPUs in the above-mentioned conventional technology. FIG. 15 shows a configuration example of the first CPU 10 and the second CPU 20.
Reference numeral 20 denotes one-channel SPIs 11 and 21 for transmitting and receiving communication, and two-channel DMAs 12, 13, 22 and
23 are used for transmission and reception, respectively. SPI1
Reference numerals 1 and 21 each include a transmission data register and a reception data register. DMAs 12, 13, 22, 23
Have a source address register, a destination address register, and a transfer count register. Each SPI
A clock line and a serial communication line are connected between 11 and 21, and a communication clock is supplied from the first CPU 10 side.

【0004】また、各CPU10,20は、制御データ
を一時的に格納するためのRAM14,15,24,2
5を2面ずつ持ち、そのうちRAM15,25はそれぞ
れ、各種制御で用いるデータを格納するための送信中間
バッファ15a,25aと受信中間バッファ15b,2
5bとを有する。また、RAM14,24はそれぞれ、
送受信データを格納するための送信バッファ14a,2
4aと受信バッファ14b,24bとを有する。これら
DMA、SPI及びRAMは、データバスにより互いに
接続されている。この場合、通信時には、RAM14,
24内の送受信バッファを用い、DMA、SPIを経由
して制御データの受け渡しが行われる。
[0004] Each of the CPUs 10 and 20 has a RAM 14, 15, 24, 2 for temporarily storing control data.
5, two of which have transmission intermediate buffers 15a and 25a and reception intermediate buffers 15b and 15b for storing data used in various controls.
5b. Also, the RAMs 14 and 24 respectively
Transmission buffers 14a, 14 for storing transmission / reception data
4a and reception buffers 14b and 24b. These DMA, SPI and RAM are connected to each other by a data bus. In this case, at the time of communication, the RAM 14,
The control data is transmitted and received via the DMA and the SPI by using the transmission / reception buffer in 24.

【0005】次に、各CPU間での通信動作を説明す
る。但しここでは、第1CPU10から第2CPU20
へデータ送信を行う場合について説明する。先ず通信開
始要求があると、第1CPU10は、送信中間バッファ
15a内の制御データを送信バッファ14aにコピーす
る。次に、送信バッファ14a内の全エリアに対しチェ
ックサム等の検査符号値を計算する。計算された値は送
信バッファ14a内の所定エリアに格納される。
Next, the communication operation between the CPUs will be described. However, here, the first CPU 10 to the second CPU 20
A case in which data is transmitted to the server will be described. First, when there is a communication start request, the first CPU 10 copies the control data in the transmission intermediate buffer 15a to the transmission buffer 14a. Next, check code values such as a checksum are calculated for all areas in the transmission buffer 14a. The calculated value is stored in a predetermined area in the transmission buffer 14a.

【0006】次に、第1CPU10は、送信用DMA1
2のレジスタに対し送信元、送信先及び転送回数を設定
して通信を開始する。但し、このとき設定する転送回数
は設計時に決めた送受信バッファサイズ固定である。通
信を開始すると、送信用DMA12は、レジスタに設定
された転送回数だけ送信バッファ14aのデータをSP
I11を通して第2CPU20に送信する。例えば転送
回数100として100バイトのデータを送る。
Next, the first CPU 10 transmits the DMA 1
The transmission source, the transmission destination, and the number of transfers are set in the second register, and communication is started. However, the number of transfers set at this time is fixed to the transmission / reception buffer size determined at the time of design. When the communication is started, the transmission DMA 12 transmits the data in the transmission buffer 14a to the SP for the number of times set in the register.
The data is transmitted to the second CPU 20 through I11. For example, 100-byte data is sent as the number of transfers 100.

【0007】また、第2CPU20では、受信用DMA
23も同様にして、レジスタに設定された転送回数だけ
SPI21からデータを取り込み、受信バッファ24b
に転送する。受信用DMA23が受信データの取り込み
を完了した時点で割り込みを発生させ、受信バッファ2
4b内の全エリアに対する検査符号値を計算する。最後
に、第2CPU20は、通信で受け取った検査符号値
と、この計算結果とが一致するか否かでデータの異常を
検出し、一致すれば正常と判断して受信バッファ24b
のデータを受信中間バッファ25bにコピーする。その
後、受信中間バッファ25bのデータが各種制御に用い
られる。
In the second CPU 20, a receiving DMA
Similarly, data is fetched from the SPI 21 by the number of transfers set in the register, and the reception buffer 24b
Transfer to When the reception DMA 23 completes the reception of the reception data, an interrupt is generated and the reception buffer 2
Check code values for all areas in 4b are calculated. Finally, the second CPU 20 detects an abnormality in the data based on whether or not the check code value received in the communication and the calculation result match.
Is copied to the reception intermediate buffer 25b. Thereafter, the data in the reception intermediate buffer 25b is used for various controls.

【0008】[0008]

【発明が解決しようとする課題】上記従来技術では、検
査符号値の計算対象領域を送信バッファ及び受信バッフ
ァの全域固定としており、バッファ内の未使用領域や、
前回の通信時から変化のないデータに対しても検査符号
値を計算してしまう。また、更新されていない送受信デ
ータであっても、送受信中間バッファと送受信バッファ
との間でコピーを実施してしまう。従って、検査符号値
の計算やデータのコピーに要する処理時間が長くなると
いう問題がある。
In the prior art, the check code value calculation target area is fixed to the entire area of the transmission buffer and the reception buffer.
The check code value is calculated for data that has not changed since the previous communication. In addition, even if the transmission / reception data is not updated, the data is copied between the transmission / reception intermediate buffer and the transmission / reception buffer. Therefore, there is a problem that the processing time required for calculating the check code value and copying the data becomes long.

【0009】そこで、例えば通信を時分割で行い、バッ
ファサイズを小さくすることにより処理時間の短縮を図
ることが考えられる。しかしながらこの場合、通信を時
分割した分だけ、同一データの実質的な通信周期が長く
なり、制御データのリアルタイム性が悪化するという問
題が生じる。つまり、制御データが更新されてから実際
に送信されるまでには最大で通信周期だけの遅れが生じ
るが、通信の時分割によりこの遅れが長くなってしま
う。
Therefore, it is conceivable to shorten the processing time by, for example, performing communication in a time-division manner and reducing the buffer size. However, in this case, a substantial communication cycle of the same data is lengthened by the time division of the communication, which causes a problem that the real-time property of the control data is deteriorated. That is, a delay of up to the communication cycle occurs at the maximum from when the control data is updated to when the control data is actually transmitted. However, this delay becomes longer due to time division of communication.

【0010】本発明は、上記問題に着目してなされたも
のであって、その目的とするところは、通信に要する処
理時間を短縮し、制御データのリアルタイム性を確保す
ることができる車両用電子制御装置を提供することであ
る。
SUMMARY OF THE INVENTION The present invention has been made in view of the above problems, and has as its object to reduce the processing time required for communication and to ensure real-time control data. It is to provide a control device.

【0011】[0011]

【課題を解決するための手段】請求項1に記載の発明で
は、各種制御データがCPUにより順次更新され、その
更新された制御データが各CPU間で相互に通信され
る。また特に、制御データが複数のデータ群に区分けさ
れ、CPUは、そのデータ群毎にデータ更新情報を記憶
する。また同CPUは、データ通信に際し、前記記憶し
たデータ更新情報に基づき更新有りと判断される制御デ
ータを通信対象の有効データとし、その有効データのみ
を受信側CPUに送信する。
According to the present invention, various control data are sequentially updated by the CPU, and the updated control data is mutually communicated between the CPUs. In particular, the control data is divided into a plurality of data groups, and the CPU stores data update information for each data group. In the data communication, the CPU sets control data determined to be updated based on the stored data update information as valid data to be communicated, and transmits only the valid data to the receiving CPU.

【0012】本発明によれば、データ更新情報に基づ
き、各データ群を単位として各種制御データを他のCP
Uに通信するかどうかが判断される。この場合、更新の
有無等の要因に関係なく一意に制御データを通信してい
た従来技術に比べてCPU間の通信データ量が削減でき
る。その結果、通信に要する処理時間を短縮し、ひいて
は制御データのリアルタイム性を確保することができる
ようになる。
According to the present invention, based on the data update information, various control data can be transferred to other CPs in units of each data group.
It is determined whether to communicate with U. In this case, the amount of communication data between the CPUs can be reduced as compared with the related art in which control data is uniquely communicated regardless of factors such as the presence or absence of updating. As a result, the processing time required for communication can be reduced, and the real-time control data can be secured.

【0013】また、請求項2に記載の発明では、CPU
は、個別に設定された更新周期で各種制御データを更新
し、その更新の都度、その時々の更新周期に対応するデ
ータ更新情報を記憶する。この場合、更新周期に対応す
るデータ更新情報によりデータ通信の要否が判断され、
更新済みと判断される制御データのみが通信される。従
ってやはり、通信処理時間を短縮する、リアルタイム性
を確保するといった効果が実現できる。
Further, in the invention according to claim 2, the CPU
Updates various control data at individually set update cycles, and stores data update information corresponding to the update cycle at each update. In this case, the necessity of data communication is determined based on the data update information corresponding to the update cycle,
Only the control data determined to be updated is communicated. Therefore, the effects of shortening the communication processing time and securing the real-time property can be realized.

【0014】請求項3に記載の発明では、前記データ更
新情報は、各制御データの更新周期の数に見合う数ビッ
ト分のデータよりなり、該データ更新情報の各ビットは
各更新周期と1対1に対応するものである。この場合、
制御データの更新の履歴が容易に確認できるようにな
る。
According to the third aspect of the present invention, the data update information is composed of data of several bits corresponding to the number of update cycles of each control data, and each bit of the data update information corresponds to each update cycle. This corresponds to 1. in this case,
The update history of the control data can be easily checked.

【0015】また、請求項4に記載の発明では、更新済
みの制御データを制御用メモリ部に順次格納すると共
に、該制御用メモリ部よりコピーした制御データを送信
データとして送信用メモリ部に一時的に格納する構成を
備える。そして、CPUは、データ通信に際し、前記デ
ータ更新情報に基づき有効データとされる制御データの
みを制御用メモリ部から送信用メモリ部へとコピーす
る。この場合、データ更新情報に基づき制御データが選
択的にコピーされるので、制御用メモリ部と送信用メモ
リ部との間のデータコピー量を削減することができる。
According to the present invention, updated control data is sequentially stored in the control memory unit, and the control data copied from the control memory unit is temporarily stored in the transmission memory unit as transmission data. It is provided with a configuration for storing the information. Then, at the time of data communication, the CPU copies only control data that is made valid data based on the data update information from the control memory unit to the transmission memory unit. In this case, since the control data is selectively copied based on the data update information, the amount of data copying between the control memory unit and the transmission memory unit can be reduced.

【0016】請求項5に記載の発明では、通信相手のC
PUより受信した制御データを受信用メモリ部に一時的
に格納する構成を更に備える。そして、複数のCPUの
うち送信側CPUは、制御データと共に前記データ更新
情報を受信側CPUに送信する。また、受信側CPU
は、受信したデータ更新情報に基づき有効データとされ
る制御データのみを受信用メモリ部から制御用メモリ部
へとコピーする。この場合にも、データ更新情報に基づ
き制御データが選択的にコピーされるので、制御用メモ
リ部と受信用メモリ部との間のデータコピー量を削減す
ることができる。
In the invention described in claim 5, the communication partner C
The system further includes a configuration for temporarily storing the control data received from the PU in the receiving memory unit. Then, the transmitting CPU among the plurality of CPUs transmits the data update information together with the control data to the receiving CPU. Also, the receiving CPU
Copies only the control data that is made valid data based on the received data update information from the receiving memory unit to the control memory unit. Also in this case, since the control data is selectively copied based on the data update information, the data copy amount between the control memory unit and the reception memory unit can be reduced.

【0017】請求項6に記載の発明では、送信前の制御
データについて検査符号値が計算されると共に、送信後
の制御データについて同じく検査符号値が計算され、そ
れら各々に計算された検査符号値が照合されて通信異常
が判定される。ここで特に、CPUは、前記データ更新
情報に基づき有効データとされる制御データのみを対象
に検査符号値を計算する。この場合、有効データだけを
対象に検査符号値が計算されるので、その計算量を削減
することができる。
According to the present invention, a check code value is calculated for control data before transmission, and a check code value is similarly calculated for control data after transmission, and the check code value calculated for each of them is calculated. Are collated to determine a communication abnormality. Here, in particular, the CPU calculates a check code value only for control data that is regarded as valid data based on the data update information. In this case, since the check code value is calculated only for the valid data, the calculation amount can be reduced.

【0018】上記の如くデータ更新情報に基づき制御デ
ータが選択的に通信されたとしても、毎回の送信データ
数が例えばメモリサイズで一義的に固定されるのであれ
ば、CPU間の通信時間は不変である。そこで、以下の
発明では、通信データ量をその都度設定して、通信時間
を最小限に削減することを提案する。
As described above, even if the control data is selectively communicated based on the data update information, the communication time between the CPUs does not change if the number of data to be transmitted each time is uniquely fixed, for example, by the memory size. It is. Therefore, the following invention proposes setting the communication data amount each time to reduce the communication time to a minimum.

【0019】すなわち、請求項7に記載の発明では、所
望の制御データを通信する際、該制御データを通信する
ためのメイン通信と、それに先立ち実施され、メイン通
信における通信データ量を通信相手側のCPUに通知す
るためのプレ通信とを実施する。この場合、送信側及び
受信側のCPUではそれぞれに、その都度の通信データ
量を知り得ることができ、毎回の通信時間を最小限に削
減することが可能となる。
That is, according to the seventh aspect of the present invention, when communicating desired control data, the main communication for communicating the control data and the communication data amount to be performed prior to the main communication are used to determine the communication data amount in the main communication. And pre-communication for notifying the CPU. In this case, the CPUs on the transmitting side and the receiving side can know the amount of communication data in each case, and the communication time for each time can be reduced to a minimum.

【0020】より具体的には、請求項8に記載したよう
に、複数のCPUのうち送信側CPUは、プレ通信に際
し、前記データ更新情報に基づき有効データとされる制
御データのみを対象に送信データ量を計算してそれを受
信側CPUに通知し、該受信側CPUは、前記通知され
た送信データ量分だけ制御データを受信すると良い。こ
れにより、メイン通信の実施に際し、所望の制御データ
が確実に送受信できる。
More specifically, as described in claim 8, the transmitting CPU among the plurality of CPUs transmits only control data that is made valid data based on the data update information at the time of pre-communication. The data amount is calculated and notified to the receiving CPU, and the receiving CPU may receive the control data by the notified transmission data amount. As a result, desired control data can be reliably transmitted and received when the main communication is performed.

【0021】また、請求項9に記載したように、複数の
CPUのうち送信側CPUは、メイン通信に際し、次回
のプレ通信での送信データ量情報を送信するための固定
データ量を受信側CPUに通知し、該受信側CPUは、
前記通知された送信データ量分だけ制御データを受信す
ると良い。これにより、プレ通信の実施に際し、次回の
メイン通信での送信データ量情報が確実に送受信でき
る。
According to a ninth aspect of the present invention, the transmitting CPU among the plurality of CPUs determines the fixed data amount for transmitting the transmission data amount information in the next pre-communication in the main communication. , And the receiving CPU
It is preferable that control data is received for the notified transmission data amount. Thus, when performing the pre-communication, the transmission data amount information in the next main communication can be reliably transmitted and received.

【0022】また、請求項10に記載したように、前記
CPUは、その都度の通信がプレ通信かメイン通信かを
識別するための通信識別情報を前記データ更新情報に付
加して受信側CPUに送信すると良い。これにより、プ
レ通信かメイン通信かを正しく識別できる。
Further, as described in claim 10, the CPU adds to the data update information communication identification information for identifying whether communication is pre-communication or main communication each time, and sends the data update information to the receiving CPU. Good to send. Thereby, it is possible to correctly identify whether the communication is the pre-communication or the main communication.

【0023】[0023]

【発明の実施の形態】以下、この発明を具体化した一実
施の形態を図面に従って説明する。本発明は、複数のC
PUを備える車両用電子制御ユニットとして具体化され
るものであり、CPU間通信を好適に実施するための特
徴的な構成及び作用を以下に詳しく説明する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS One embodiment of the present invention will be described below with reference to the drawings. The present invention provides a plurality of C
The present invention is embodied as an electronic control unit for a vehicle including a PU, and a characteristic configuration and operation for suitably performing communication between CPUs will be described in detail below.

【0024】図1は、本実施の形態の電子制御ユニット
においてCPU間通信にかかる構成を示す図面である。
図1の構成は、概ね従来技術である前記図15に準じて
おり、第1CPU10及び第2CPU20内のSPI、
DMAといった各モジュールの構成は前記図15と同一
である。すなわち、各CPU10,20は、第1CPU
10からの通信クロックに応じてSPI及びDMAを介
して双方向にシリアル通信を実施する。各CPU10,
20は、個別に設定された更新周期で各種制御データを
更新し、必要に応じて送信相手側のCPUに対して送信
する。ここで、制御データとしては8ms周期で更新さ
れるものや、その他に64ms、128ms等で更新さ
れるものがある。また、図1との相違点としては、RA
M14,15,24,25内のバッファ構成が異なり、
その詳細を図2及び図3を用いて説明する。
FIG. 1 is a diagram showing a configuration relating to communication between CPUs in the electronic control unit of the present embodiment.
The configuration of FIG. 1 substantially conforms to FIG. 15, which is a conventional technique, and includes SPIs in the first CPU 10 and the second CPU 20.
The configuration of each module such as DMA is the same as that of FIG. That is, each of the CPUs 10 and 20 is the first CPU
The bidirectional serial communication is performed via the SPI and the DMA in accordance with the communication clock from the CPU 10. Each CPU 10,
Reference numeral 20 updates various control data at individually set update intervals, and transmits the control data to the transmission partner CPU as necessary. Here, the control data includes data updated at a period of 8 ms and data updated at 64 ms, 128 ms, or the like. The difference from FIG. 1 is that RA
The buffer configuration in M14, 15, 24, 25 is different,
The details will be described with reference to FIGS.

【0025】なお本実施の形態では、RAM15,25
が制御用メモリ部に、RAM14,24の送信バッファ
14a,24aが送信用メモリ部に、RAM14,24
の受信バッファ14b,24bが受信用メモリ部に、そ
れぞれ該当する。
In this embodiment, the RAMs 15, 25
Is the control memory unit, the transmission buffers 14a and 24a of the RAMs 14 and 24 are the transmission memory units, and the RAMs 14 and 24 are the transmission buffers 14a and 24a.
Of the receiving buffers 14b and 24b correspond to the receiving memory unit.

【0026】図2において、(a)は送信中間バッファ
(図1の15a,25a)の構成を示し、(b)は送信
バッファ(図1の14a,24a)の構成を示す。図2
(a)に示すように、送信中間バッファには、各種制御
データの更新の有無(更新履歴)を表す更新情報IND
EXの記憶エリアが新たに付加されている。この更新情
報INDEXは、各制御データの更新周期の数に見合う
数ビット分のデータよりなり、該INDEXの各ビット
は各更新周期と1対1に対応している。この場合、各々
の更新周期での更新処理に際し、個々に対応するビット
に「1」が設定されるようになっている。この更新情報
INDEXは、どのデータを送信するかを判断するため
に用いられる。つまり本実施の形態では、個別の更新周
期に基づき各種制御データが複数のデータ群に区分けさ
れている。
In FIG. 2, (a) shows the configuration of the transmission intermediate buffer (15a, 25a in FIG. 1), and (b) shows the configuration of the transmission buffer (14a, 24a in FIG. 1). FIG.
As shown in (a), the transmission intermediate buffer has update information IND indicating whether or not various control data has been updated (update history).
An EX storage area is newly added. The update information INDEX is composed of several bits of data corresponding to the number of update cycles of each control data, and each bit of the INDEX has a one-to-one correspondence with each update cycle. In this case, at the time of the update process in each update cycle, "1" is set to each corresponding bit. This update information INDEX is used to determine which data is to be transmitted. That is, in the present embodiment, various types of control data are divided into a plurality of data groups based on individual update periods.

【0027】送信中間バッファ内のデータの配置は各制
御データの更新周期毎に分けられており、アドレスとサ
イズが静的に決められている。図2では、更新周期1〜
更新周期n+1のアドレスが設けられている。このよう
にすることで、送信データを更新周期毎に選択して送信
バッファにセットすることができる。なお、データの配
列は更新周期に限らず任意で良い。
The arrangement of data in the transmission intermediate buffer is divided for each control data update cycle, and the address and size are statically determined. In FIG.
An address of an update cycle n + 1 is provided. By doing so, transmission data can be selected for each update cycle and set in the transmission buffer. The arrangement of the data is not limited to the update cycle, but may be arbitrary.

【0028】また、図2(b)に示すように、送信バッ
ファには、既存の従来構成と同様に転送データエリアが
設けられると共に検査符号値の記憶エリアが設けられて
いる。またこの構成に対し、前記更新情報INDEXの
記憶エリアが新たに付加されており、この更新情報IN
DEXにより受信側にどのデータを送信したかが通知さ
れる。なお、転送データエリアは、想定される最大通信
量に見合うサイズに設定されている。
As shown in FIG. 2B, the transmission buffer is provided with a transfer data area and a check code value storage area as in the existing conventional configuration. Further, a storage area for the update information INDEX is newly added to this configuration.
DEX informs the receiving side which data has been transmitted. Note that the transfer data area is set to a size corresponding to the assumed maximum communication amount.

【0029】一方、図3において、(a)は受信中間バ
ッファ(図1の15b,25b)の構成を示し、(b)
は受信バッファ(図1の14b,24b)の構成を示
す。図3(a)に示すように、受信中間バッファは、前
記送信中間バッファと同様に、更新周期毎のエリアに分
けられ、アドレスとサイズが静的に決められている。こ
れにより、受信バッファにてデータを受信した際、その
受信データを受信中間バッファの個々に対応する更新周
期エリアに選択的に格納することができる。
On the other hand, in FIG. 3, (a) shows the configuration of the reception intermediate buffer (15b, 25b in FIG. 1), and (b)
Indicates the configuration of the reception buffer (14b, 24b in FIG. 1). As shown in FIG. 3A, the reception intermediate buffer is divided into areas for each update cycle, and the address and the size are statically determined, similarly to the transmission intermediate buffer. Thus, when data is received by the reception buffer, the reception data can be selectively stored in the update cycle area corresponding to each of the reception intermediate buffers.

【0030】また、図3(b)に示すように、受信バッ
ファは、前記送信バッファと同様の構成を有している。
特に、前記更新情報INDEXの記憶エリアが新たに付
加されており、この更新情報INDEXによりどのデー
タを受信したかが確認できるようになっている。
As shown in FIG. 3B, the reception buffer has the same configuration as the transmission buffer.
In particular, a storage area for the update information INDEX is newly added, and it is possible to confirm which data has been received by the update information INDEX.

【0031】次に、本実施の形態におけるCPU間通信
の動作を図4を用いて説明する。ここでは、仮に第1C
PU10から第2CPU20に対して制御データが送信
される場合について説明する。なお図4では、更新周期
mの制御データが更新される事例について示す。
Next, the operation of communication between CPUs in this embodiment will be described with reference to FIG. Here, temporarily, the first C
A case where control data is transmitted from the PU 10 to the second CPU 20 will be described. FIG. 4 shows a case where the control data of the update cycle m is updated.

【0032】図4において、第1CPU10では、通信
したい制御データの更新処理の最後、すなわち制御デー
タの更新が完了した時点で、先に説明した送信中間バッ
ファ15a内の更新情報INDEXのうち該当するビッ
トに「1」がセットされる(図4の(a))。
In FIG. 4, at the end of the update processing of the control data to be communicated, that is, at the time when the update of the control data is completed, the first CPU 10 Is set to "1" (FIG. 4A).

【0033】その後、周期的な通信開始要求が生じる
と、送信中間バッファ15a内の更新情報INDEXが
チェックされ、INDEXと、該INDEXの値が
「1」になっているビットに対応した制御データとが送
信バッファ14aにコピーされる(図4の(b))。こ
こで、コピーの順序にはINDEXに対応した規則性を
設ける。例えばINDEXの0番目のビットに対応する
データは送信バッファ14aの若いアドレスに配置し、
1番目のビットに対応するデータはその後といった具合
である。この規則により、受信側では、更新周期毎の所
望のデータを受信バッファから容易に取り出すことがで
きる。
Thereafter, when a periodic communication start request occurs, the update information INDEX in the transmission intermediate buffer 15a is checked, and INDEX and control data corresponding to the bit whose INDEX value is "1" are read. Is copied to the transmission buffer 14a (FIG. 4B). Here, regularity corresponding to INDEX is provided in the order of copying. For example, data corresponding to the 0th bit of INDEX is placed at a lower address of the transmission buffer 14a,
The data corresponding to the first bit is after that, and so on. According to this rule, the receiving side can easily retrieve desired data for each update cycle from the reception buffer.

【0034】上記の通り送信中間バッファ15aから送
信バッファ14aへのデータコピーが実施される際、更
新情報INDEXに基づきデータが選択的にコピーされ
るため、全データを一意にコピーしていた従来技術に比
べてコピーに要する処理負荷が減じられる。
As described above, when data is copied from the transmission intermediate buffer 15a to the transmission buffer 14a, the data is selectively copied based on the update information INDEX. The processing load required for copying is reduced as compared with the case of.

【0035】次に、送信バッファ14a内のデータに対
して、チェックサムやCRCにより検査符号値が計算さ
れる。この場合、送信バッファ14aには、今回新たに
更新された制御データのみが格納されており、そのデー
タを対象に検査符号値が計算されるので、従来技術に比
べて検査符号値の計算に要する処理負荷が軽減される。
つまり、従来技術では、送信バッファのサイズ分だけ検
査符号値が計算されていたのに対し、本実施の形態で
は、更新情報INDEXにより何のデータが格納されて
いるかが分かり通信として有効なデータサイズを知るこ
とができるので、そのサイズ分だけを対象に検査符号値
が計算される。
Next, a check code value is calculated for the data in the transmission buffer 14a by a checksum or CRC. In this case, only the control data newly updated this time is stored in the transmission buffer 14a, and the check code value is calculated for the data. Therefore, the check code value is required to be calculated as compared with the related art. The processing load is reduced.
That is, in the related art, the check code value is calculated by the size of the transmission buffer, whereas in the present embodiment, it is possible to determine what data is stored by the update information INDEX and to determine the effective data size for communication. , The check code value is calculated only for that size.

【0036】次に、送信用DMA12のレジスタに所望
の設定が行われ、送信バッファ14a内のデータがSP
I11を通じて第2CPU20(受信側CPU)に送信
される(図4の(c))。このとき、更新情報INDE
Xと、更新済みの制御データと、検査符号値とが送信さ
れる。
Next, desired settings are made in the register of the transmission DMA 12, and the data in the transmission buffer 14a is stored in the SP.
It is transmitted to the second CPU 20 (receiving CPU) through I11 ((c) in FIG. 4). At this time, the update information INDE
X, the updated control data, and the check code value are transmitted.

【0037】第2CPU20では、受信バッファ24b
内のデータのうち、どこまでが有効データであるかが、
受信したINDEXの情報をもとに調べられ、そのサイ
ズ分だけの検査符号値が計算される(図4の(d))。
更に、該計算した検査符号値と、第1CPU10より受
信した検査符号値とが照合されて通信異常の有無がチェ
ックされる。通信が正常であれば、受信バッファ24b
のデータが受信中間バッファ25bのINDEXに対応
するエリアにコピーされる。以上によりデータ受信が完
了する。データ受信時にもデータ送信時と同様に、受信
バッファ24bと受信中間バッファ25bとの間のデー
タコピー量や、検査符号値の計算に要する処理負荷が軽
減されるようになる。
In the second CPU 20, the reception buffer 24b
Of the data in the, how much is valid data,
A check is performed based on the received INDEX information, and check code values corresponding to the size are calculated ((d) in FIG. 4).
Further, the calculated check code value is compared with the check code value received from the first CPU 10 to check for a communication error. If the communication is normal, the reception buffer 24b
Is copied to the area corresponding to INDEX of the reception intermediate buffer 25b. Thus, data reception is completed. Similarly to the data transmission, the data copy amount between the reception buffer 24b and the reception intermediate buffer 25b and the processing load required to calculate the check code value are reduced at the time of data reception.

【0038】図5〜図7は、各CPU10,20による
通信処理を示すフローチャートであり、各フローチャー
トを詳細に説明する。先ず、更新情報INDEXをセッ
トする処理について図5のフローチャートを用いて説明
する。図5の処理は、所定の更新周期で実施される各制
御データの更新処理内において起動される。そして、当
該処理において、第1又は第2CPU10,20は、該
当する制御データを更新した後、送信中間バッファ内の
更新情報INDEXの各ビットのうち、今回の更新周期
に該当するビットに「1」をセットする(ステップ10
1)。なお、INDEXの他のビットはクリアはしな
い。
FIGS. 5 to 7 are flowcharts showing communication processing by each of the CPUs 10 and 20, and each flowchart will be described in detail. First, the process of setting the update information INDEX will be described with reference to the flowchart of FIG. The process of FIG. 5 is started in the process of updating each control data performed at a predetermined update cycle. Then, in the processing, after updating the corresponding control data, the first or second CPU 10 or 20 sets “1” to the bit corresponding to the current update cycle among the bits of the update information INDEX in the transmission intermediate buffer. (Step 10
1). The other bits of INDEX are not cleared.

【0039】次に、送信側CPUによる通信開始処理に
ついて図6のフローチャートを用いて説明する。通信開
始要求に伴い図6が起動し、先ずはじめに、通信開始要
求毎の初期化処理を実施する。すなわち、ステップ20
1では、送信有効データ数を表すサイズカウンタを
「0」にクリアする。また、ステップ202では、送信
中間バッファから送信バッファへのデータコピーに際
し、コピー先アドレスを初期設定する。ここでは、送信
バッファの通信データエリアの先頭アドレスを、コピー
先アドレスとして設定する。
Next, the communication start processing by the transmitting CPU will be described with reference to the flowchart of FIG. FIG. 6 is activated in response to a communication start request, and first, an initialization process is performed for each communication start request. That is, step 20
At 1, the size counter indicating the number of valid transmission data is cleared to "0". In step 202, a copy destination address is initialized when data is copied from the transmission intermediate buffer to the transmission buffer. Here, the start address of the communication data area of the transmission buffer is set as the copy destination address.

【0040】その後、ステップ203では、更新情報I
NDEXの各ビットを全て参照し終え、送信対象の全制
御データに対して更新の有無をチェックしたか否かを判
別する。このチェックは更新周期の数だけ実施され、チ
ェックが完了してしていなければ、後続のステップ20
4に進む。ステップ204では、送信中間バッファ内に
格納されている更新情報INDEXの各ビットについ
て、順に「1」であるか否かを判別する。これにより、
今回更新されたデータの有無が確認される。そして、ビ
ット=1であればステップ205に進む。
Thereafter, in step 203, the update information I
After all the bits of the NDEX have been referred to, it is determined whether or not all the control data to be transmitted has been checked for updates. This check is performed for the number of update cycles, and if the check has not been completed, the subsequent step 20 is executed.
Proceed to 4. In step 204, it is determined whether each bit of the update information INDEX stored in the transmission intermediate buffer is “1” in order. This allows
The presence or absence of the updated data is confirmed. If the bit is 1, the process proceeds to step 205.

【0041】ステップ205〜207は、送信中間バッ
ファから更新済みのデータを取り出し、送信バッファに
コピーする部分である。詳細には、ステップ205で
は、今回更新されたデータ(INDEXのビット=1に
相当するデータ)を、送信バッファの所定のコピー先に
コピーする。ステップ206では、送信有効データ数
(コピーデータの総量)をカウントするために、サイズ
カウンタに今回コピーしたデータサイズを加算する。そ
の後、ステップ207では、次回のデータコピーに備
え、送信バッファのコピー先アドレスを更新する。つま
り、今回のコピーの開始アドレスに今回コピーしたデー
タサイズを加算する。これらステップ205〜207に
より、前後するコピーデータが連続して送信バッファに
格納されるようになる。
Steps 205 to 207 are for extracting updated data from the transmission intermediate buffer and copying it to the transmission buffer. Specifically, in step 205, the data updated this time (data corresponding to INDEX bit = 1) is copied to a predetermined copy destination in the transmission buffer. In step 206, the data size copied this time is added to the size counter in order to count the number of valid transmission data (total amount of copy data). Thereafter, in step 207, the copy destination address of the transmission buffer is updated in preparation for the next data copy. That is, the data size copied this time is added to the start address of the current copy. By these steps 205 to 207, the copy data before and after are continuously stored in the transmission buffer.

【0042】一方、全制御データに対して更新の有無を
確認すると(ステップ203がYESになると)ステッ
プ208に進み、検査符号値の計算を実施する。但しこ
の場合、計算の対象は、先に送信中間バッファからコピ
ーされたデータ、すなわち通信上の有効データのみであ
り、前記ステップ206で算出したサイズカウンタの値
分のデータについて検査符号値を計算する。その後、ス
テップ209では、送信中間バッファの更新情報IND
EXを送信バッファの所定エリアにコピーする。続くス
テップ210では、次回の通信のために送信中間バッフ
ァ内の更新情報INDEXを「0」にクリアする。その
後、DMAレジスタセット処理へ移行する。
On the other hand, if it is confirmed whether or not all the control data has been updated (if step 203 becomes YES), the routine proceeds to step 208, where check code values are calculated. However, in this case, the target of calculation is only the data previously copied from the transmission intermediate buffer, that is, only valid data for communication, and the check code value is calculated for the data of the size counter value calculated in step 206. . Thereafter, in step 209, the update information IND of the transmission intermediate buffer
EX is copied to a predetermined area of the transmission buffer. In the following step 210, the update information INDEX in the transmission intermediate buffer is cleared to “0” for the next communication. Then, the process proceeds to the DMA register setting process.

【0043】図7は、DMAレジスタセット処理を示す
フローチャートである。図7において、ステップ301
〜303が送信用DMAのレジスタセット処理であり、
ステップ304〜306が受信用DMAレジスタのセッ
ト処理である。
FIG. 7 is a flowchart showing the DMA register setting process. Referring to FIG.
303 are register setting processes of the DMA for transmission,
Steps 304 to 306 correspond to the setting processing of the receiving DMA register.

【0044】詳しくは、ステップ301では、送信用D
MAの送信元アドレスレジスタに、該DMAにとっての
送信元である送信バッファの先頭アドレスをセットす
る。ステップ302では、送信用DMAの送信先アドレ
スレジスタに、該DMAにとっての送信先であるSPI
の送信データレジスタのアドレスをセットする。また、
ステップ303では、送信用DMAの転送回数カウント
レジスタに、該DMAによるデータの転送回数をセット
する。但しデータ転送回数は、送信バッファのサイズと
する。受信用DMAのレジスタセットも送信用DMAと
同様にして行う(ステップ304〜306)。ここまで
設定してDMAをスタートさせれば通信が開始される。
More specifically, in step 301, the transmission D
The head address of the transmission buffer which is the transmission source for the DMA is set in the transmission source address register of the MA. In step 302, the SPI address which is the transmission destination for the DMA is stored in the transmission destination address register of the transmission DMA.
Set the address of the transmission data register. Also,
In step 303, the number of data transfers by the DMA is set in the transfer count register of the DMA for transmission. However, the number of data transfers is the size of the transmission buffer. The register setting of the reception DMA is performed in the same manner as the transmission DMA (steps 304 to 306). If the settings are made up to this point and the DMA is started, communication is started.

【0045】次に、受信側CPUによるデータ受信処理
について説明する。図8は、受信用DMAでの転送終了
に同期する転送終了割り込み処理を示すフローチャート
である。
Next, the data receiving process by the receiving CPU will be described. FIG. 8 is a flowchart showing a transfer end interrupt process synchronized with the end of the transfer in the receiving DMA.

【0046】図8において、ステップ401では、受信
有効データ数を表すサイズカウンタを「0」にクリアす
る。また、ステップ402では、更新周期の数だけ更新
情報INDEXのチェックを実施したか否かを判別し、
チェックが完了してしていなければ、後続のステップ4
03に進む。ステップ403では、受信バッファ内に格
納されている更新情報INDEXにおいて「1」になっ
ているビットを検索する。そして、ビット=1を見つけ
ればステップ404に進む。ステップ404では、受信
有効データ数(転送データの総量)をカウントするため
に、サイズカウンタに今回コピーしたデータサイズを加
算する。
In FIG. 8, in step 401, a size counter indicating the number of valid reception data is cleared to "0". In step 402, it is determined whether or not the update information INDEX has been checked for the number of update cycles.
If the check has not been completed, the following step 4
Go to 03. In step 403, a search is made for a bit set to "1" in the update information INDEX stored in the reception buffer. If bit = 1 is found, the process proceeds to step 404. In step 404, the data size copied this time is added to the size counter in order to count the number of valid reception data (total amount of transfer data).

【0047】なお、ステップ402〜404の処理は、
送信側CPUでの送信有効データ数を求める処理(前記
図6のステップ203,204,206)に準じてお
り、実際には送信有効データ数と受信有効データ数とは
一致する。そのため、送信側CPUから送信有効データ
数の情報を送信し、それを受信有効データ数としても良
い。但し、送信側と受信側とで個別に演算すれば、その
分だけ通信データ数が削減できる。
The processing in steps 402 to 404 is as follows.
This is based on the process of obtaining the number of valid data in the transmitting CPU (steps 203, 204, and 206 in FIG. 6), and the number of valid data and the number of valid data actually match. Therefore, information on the number of valid transmission data may be transmitted from the transmitting CPU, and may be used as the number of valid reception data. However, if calculations are separately performed on the transmission side and the reception side, the number of communication data can be reduced by that amount.

【0048】受信有効データ数が分かると(ステップ4
02がYESになると)ステップ405に進み、受信有
効データを対象に検査符号値を計算する。その後、ステ
ップ406では、前記計算した検査符号値と送信側CP
Uより受信した検査符号値とを照合する。そして、不一
致であれば通信異常と判断し、受信中間バッファの更新
をせずにそのまま本処理を終了する。一致した場合は通
信正常と判断し、後続のステップ407に進む。
When the number of valid reception data is known (step 4
The process proceeds to step 405 (when 02 becomes YES) to calculate a check code value for the reception valid data. Thereafter, in step 406, the calculated check code value and the transmission-side CP
Check with the check code value received from U. If they do not match, it is determined that a communication error has occurred, and the process ends without updating the reception intermediate buffer. If they match, it is determined that the communication is normal, and the process proceeds to the subsequent step 407.

【0049】ステップ407〜412は受信中間バッフ
ァの更新処理を示す部分である。つまり、ステップ40
7では、サイズカウンタを「0」にクリアする。次に、
ステップ408では、更新周期の数だけ更新情報IND
EXのチェックを実施したか否かを判別し、全てチェッ
クが完了していれば処理を終了する。チェックが完了し
ていなければ、後続のステップ409に進む。ステップ
409では、何のデータが受信したかを更新情報IND
EXから検索する。そして、当該INDEXにおいて
「1」になっているビットを見つければステップ410
に進み、受信バッファのコピー元アドレスを更新する。
すなわち、受信バッファの先頭アドレスに、これまでに
取り出したデータの総量を示すサイズカウンタ値を加算
する。
Steps 407 to 412 are parts showing the update processing of the reception intermediate buffer. That is, step 40
At 7, the size counter is cleared to "0". next,
In step 408, the update information IND is updated by the number of update cycles.
It is determined whether or not the EX check has been performed, and if all the checks have been completed, the process ends. If the check is not completed, the process proceeds to the subsequent step 409. In step 409, the update information IND indicates what data has been received.
Search from EX. Then, if a bit that is "1" is found in the INDEX, step 410
To update the copy source address of the reception buffer.
That is, the size counter value indicating the total amount of data extracted so far is added to the head address of the reception buffer.

【0050】その後、ステップ411では、前記ステッ
プ410で求めた受信バッファのコピー元アドレスから
データを取り出し、そのデータを、受信中間バッファの
所定エリア(INDEXのビット=1に相当するデータ
エリア)にコピーする。続くステップ412では、次回
のデータ取り出しに備え、サイズカウンタに今回取り出
したデータサイズを加算する。以上の処理で受信動作が
完了する。
Thereafter, in step 411, data is taken out from the copy source address of the reception buffer obtained in step 410, and the data is copied to a predetermined area (data area corresponding to INDEX bit = 1) of the reception intermediate buffer. I do. In the following step 412, the data size extracted this time is added to the size counter in preparation for the next data extraction. The receiving operation is completed by the above processing.

【0051】以上詳述した本実施の形態によれば、以下
に示す効果が得られる。各CPU10,20は、各種制
御データの更新周期に対応する更新情報INDEXに基
づき、更新有りと判断される制御データを通信対象の有
効データとし、その有効データのみを受信側CPUに送
信する。この場合、更新済みと判断される制御データの
みが通信されるようになる。従って、更新の有無に関係
なく一意に制御データを通信していた従来技術に比べて
CPU間の通信データ量が削減できる。その結果、通信
に要する処理時間を短縮し、ひいては制御データのリア
ルタイム性を確保することができるようになる。
According to the embodiment described above, the following effects can be obtained. Each of the CPUs 10 and 20 uses the control data determined to be updated as valid data for communication based on the update information INDEX corresponding to the update cycle of various control data, and transmits only the valid data to the receiving CPU. In this case, only the control data determined to be updated is communicated. Therefore, the amount of communication data between CPUs can be reduced as compared with the related art in which control data is uniquely communicated regardless of whether or not there is an update. As a result, the processing time required for communication can be reduced, and the real-time control data can be secured.

【0052】またこの場合、更新情報INDEXに基づ
き有効データとされる制御データだけが各バッファ間で
選択的にコピーされる。従って、送信中間バッファから
送信バッファへのデータコピー量、並びに受信バッファ
から受信中間バッファへのデータコピー量が削減でき
る。
In this case, only the control data which is made valid data based on the update information INDEX is selectively copied between the buffers. Therefore, the data copy amount from the transmission intermediate buffer to the transmission buffer and the data copy amount from the reception buffer to the reception intermediate buffer can be reduced.

【0053】更に、更新情報INDEXに基づき有効デ
ータとされる制御データだけを対象に検査符号値が計算
されるので、その計算量を削減することができる。こう
してデータコピー量や検査符号値の計算量を削減するこ
とにより、CPUの処理負荷が大幅に軽減できるように
なる。
Further, since the check code value is calculated only for the control data which is made valid data based on the update information INDEX, the amount of calculation can be reduced. By thus reducing the amount of data copy and the amount of calculation of the check code value, the processing load on the CPU can be greatly reduced.

【0054】(第2の実施の形態)次に、本発明におけ
る第2の実施の形態について、上述した第1の実施の形
態との相違点を中心に説明する。
(Second Embodiment) Next, a second embodiment of the present invention will be described focusing on differences from the above-described first embodiment.

【0055】上記実施の形態は、CPUによるバッファ
間のコピー時間や検査符号値の計算処理時間を短縮する
ものであったが、CPU間通信時に要する通信時間とし
ては、これら以外にSPIモジュールによる通信時間が
含まれる。そこで、本実施の形態では、SPIモジュー
ルの通信時間を短縮する方法について説明する。
In the above-described embodiment, the copying time between buffers by the CPU and the calculation processing time of the check code value are shortened. Time is included. Therefore, in the present embodiment, a method for reducing the communication time of the SPI module will be described.

【0056】要するに、前記図1では、通信クロックが
第1CPU10から供給されており、出力されるクロッ
ク数は第1CPU10側の送信データ数に等しい。すな
わち、同クロック数は第1CPU10側で送信用DMA
に設定する転送回数と同一であり、従来この転送回数は
第1CPU10の送信バッファサイズと同一である。第
2CPU20側は、第1CPU10より供給される通信
クロックの数しか自身のデータを送信したり第1CPU
10からのデータを取り込んだりできないので、結局第
2CPU20側の送受信のバッファは第1CPU10の
送信バッファサイズと同一になってしまう。第2CPU
20の送信バッファサイズと第1CPU10の受信バッ
ファサイズが同一なので、結局これら4つ全てのバッフ
ァサイズは同一であり、従来のようにDMAの転送回数
をこのサイズで固定している以上は、SPIの通信時間
が第1CPU10の送信バッファサイズで一義的に固定
されてしまう。
In short, in FIG. 1, the communication clock is supplied from the first CPU 10, and the number of output clocks is equal to the number of transmission data on the first CPU 10. In other words, the same number of clocks is used by the first CPU 10 for the transmission DMA.
, And the number of transfers is conventionally the same as the transmission buffer size of the first CPU 10. The second CPU 20 transmits its own data only by the number of communication clocks supplied from the first CPU 10 or
Since the data from the first CPU 10 cannot be fetched, the transmission / reception buffer of the second CPU 20 becomes the same as the transmission buffer size of the first CPU 10. 2nd CPU
Since the size of the transmission buffer 20 and the size of the reception buffer of the first CPU 10 are the same, all four buffer sizes are the same. The communication time is uniquely fixed by the transmission buffer size of the first CPU 10.

【0057】この場合、上記の如く更新情報INDEX
に基づき制御データが選択的に通信されたとしてもSP
Iの通信時間は不変である。そこで本実施の形態では、
SPIで通信するデータも有効データに限定することに
よってSPIの通信時間も短縮する。すなわち、SPI
の通信時間を短縮するには、DMAの転送回数を従来の
ようなバッファサイズ固定ではなく、有効データ数にし
てやればよい。
In this case, as described above, the update information INDEX
SP even if control data is selectively communicated based on
The communication time of I is unchanged. Therefore, in this embodiment,
By limiting the data communicated by the SPI to valid data, the communication time of the SPI is also reduced. That is, SPI
In order to reduce the communication time, the number of DMA transfers may be set to the number of valid data instead of the fixed buffer size as in the related art.

【0058】図9は、第2の実施の形態におけるCPU
間通信の概要を示す構成図である。前記図1の構成で
は、第2CPU20側のDMA転送回数は第1CPU1
0より供給されるクロック数に依存してしまい、自身の
DMA転送回数が固定であったのに対し、図9の構成で
は、第2CPU20側が送信する有効データ数に応じて
自身のDMA転送回数が変更できる構成とする。
FIG. 9 shows a CPU according to the second embodiment.
FIG. 2 is a configuration diagram illustrating an outline of inter-communication. In the configuration of FIG. 1, the number of DMA transfers on the second CPU 20 side is the first CPU 1
The number of DMA transfers is dependent on the number of clocks supplied from 0, and the number of DMA transfers is fixed. On the other hand, in the configuration of FIG. 9, the number of DMA transfers is controlled according to the number of valid data transmitted by the second CPU 20 side. The configuration can be changed.

【0059】以下、図9の構成について説明する。図9
では、前記図1との相違点として、SPIモジュールが
2チャンネルずつ設けられている。つまり、第1CPU
10には、送信用DMA12に連動するSPI16と受
信用DMA13に連動するSPI17とが設けられ、第
2CPU20には、送信用DMA22に連動するSPI
26と受信用DMA23に連動するSPI27とが設け
られている。通信クロックは双方のCPU10,20か
ら供給されており、他方の送信データ量に依存すること
は無い。
Hereinafter, the configuration of FIG. 9 will be described. FIG.
In this embodiment, the difference from FIG. 1 is that two SPI modules are provided. That is, the first CPU
10 is provided with an SPI 16 linked to the transmission DMA 12 and an SPI 17 linked to the reception DMA 13, and the second CPU 20 is provided with an SPI 16 linked to the transmission DMA 22.
26 and an SPI 27 linked to the receiving DMA 23 are provided. The communication clock is supplied from both CPUs 10 and 20, and does not depend on the transmission data amount of the other.

【0060】また、各CPU10,20は、データ通信
に際して、DMAによる転送回数をデータ数に応じて可
変とし、送信データ量を示すデータを事前に送信する。
つまり、データ送信時に次回送信量を受信側CPUに通
知する構成とする。送信バッファ14a,24aと受信
バッファ14b,24bとには、新たに送信データ量情
報を格納するための記憶エリアが設けられている。
In data communication, each of the CPUs 10 and 20 makes the number of transfers by DMA variable according to the number of data, and transmits data indicating the amount of data to be transmitted in advance.
That is, the configuration is such that the next transmission amount is notified to the receiving CPU at the time of data transmission. The transmission buffers 14a and 24a and the reception buffers 14b and 24b are provided with storage areas for newly storing transmission data amount information.

【0061】次に、本実施の形態におけるCPU間通信
の動作を図10を用いて説明する。図10に示すよう
に、本実施の形態では、メイン通信とそれに先立って実
施されるプレ通信との2段階に分けて通信を行う。
Next, the operation of communication between CPUs in this embodiment will be described with reference to FIG. As shown in FIG. 10, in the present embodiment, communication is performed in two stages: main communication and pre-communication performed prior to the main communication.

【0062】すなわち、図中t1のタイミングではプレ
通信の通信開始要求が生じ、それに伴い該プレ通信の通
信開始処理が実施される。この通信開始処理では、更新
情報INDEXに基づき今回有効となる制御データが選
択され、メイン通信の送信データ量が計算される。ま
た、DMA通信では、メイン通信の送信データ量が受信
側CPUに送信される。その後、転送終了割り込み処理
では、今回のプレ通信に関して検査符号値が照合され
る。
That is, at the timing of t1 in the figure, a communication start request of the pre-communication is generated, and the communication start process of the pre-communication is performed accordingly. In this communication start process, control data that is valid this time is selected based on the update information INDEX, and the transmission data amount of the main communication is calculated. In the DMA communication, the transmission data amount of the main communication is transmitted to the receiving CPU. Thereafter, in the transfer end interrupt processing, the check code value is collated with respect to the current pre-communication.

【0063】その後、プレ通信開始要求(t1のタイミ
ング)から一定時間経過後のt2のタイミングではメイ
ン通信開始要求が生じ、それに伴い該メイン通信の通信
開始処理が実施される。この通信開始処理では、後続の
プレ通信(t3でのプレ通信)に備え、該プレ通信の送
信データ量が計算される。但し、プレ通信では制御デー
タを一切送信しないため、ここでの送信データ量は更新
情報INDEX等により決まる既知の固定サイズにな
る。また、DMA通信では、プレ通信にて通知されたメ
イン通信の送信データ量に基づき今回有効となる制御デ
ータが受信側CPUに送信される。また同時に、プレ通
信の送信データ量が受信側CPUに送信される。その
後、転送終了割り込み処理では、今回のメイン通信に関
して検査符号値が照合される。
Thereafter, at a timing t2 after a lapse of a predetermined time from the pre-communication start request (timing t1), a main communication start request is generated, and a communication start process of the main communication is performed accordingly. In the communication start process, the transmission data amount of the pre-communication is calculated in preparation for the subsequent pre-communication (pre-communication at t3). However, since no control data is transmitted in the pre-communication, the transmission data amount here is a known fixed size determined by the update information INDEX and the like. In the DMA communication, control data that becomes valid this time is transmitted to the receiving CPU based on the transmission data amount of the main communication notified by the pre-communication. At the same time, the transmission data amount of the pre-communication is transmitted to the receiving CPU. Thereafter, in the transfer end interrupt processing, the check code value is collated with respect to the current main communication.

【0064】また、その都度の通信の種類がプレ通信か
メイン通信かを識別するために、更新情報INDEXの
0ビット目が通信識別ビットとして用いられる。この場
合、プレ通信の通信開始処理では通信識別ビットに
「0」がセットされ、メイン通信の通信開始処理では通
信識別ビットに「1」がセットされるようになってい
る。
The 0th bit of the update information INDEX is used as a communication identification bit in order to identify whether the type of communication is pre-communication or main communication each time. In this case, "0" is set to the communication identification bit in the communication start processing of the pre-communication, and "1" is set to the communication identification bit in the communication start processing of the main communication.

【0065】なお、プレ通信は、既存のデータ通信周期
に同期して起動されれば良く、メイン通信はその一定期
間後に起動されれば良い。但し、プレ通信とメイン通信
との間の時間間隔をデータ通信周期よりも長くはしな
い。
The pre-communication may be started in synchronization with the existing data communication cycle, and the main communication may be started after a fixed period. However, the time interval between the pre-communication and the main communication is not longer than the data communication cycle.

【0066】図11〜図14には各CPU10,20に
よる各種処理のフローチャートを示し、その詳細を順次
説明する。図11は、プレ通信の通信開始処理を示すフ
ローチャートである。このプレ通信では、後続のメイン
通信のための準備を行う。なお、図11の処理は概ね前
記図6の処理に準じており、ステップ501〜510の
処理は前記図6のステップ201〜210と同一である
ため詳しい説明は省略する。つまりステップ501〜5
10では、更新情報INDEXに基づき送信中間バッフ
ァから送信バッファに制御データを選択的にコピーする
と共に、該当データを対象にデータサイズと検査符号値
とを計算する。
FIGS. 11 to 14 show flowcharts of various processes by the CPUs 10 and 20, and details thereof will be sequentially described. FIG. 11 is a flowchart showing a communication start process of the pre-communication. In this pre-communication, preparations are made for the subsequent main communication. Note that the processing in FIG. 11 is substantially similar to the processing in FIG. 6, and the processing in steps 501 to 510 is the same as that in steps 201 to 210 in FIG. That is, steps 501 to 5
At 10, the control data is selectively copied from the transmission intermediate buffer to the transmission buffer based on the update information INDEX, and the data size and the check code value are calculated for the corresponding data.

【0067】ステップ511,512が前記図6とは異
なる処理であり、ステップ511では、通信識別ビット
に「0」をセットする。また、ステップ512では、送
信データ量情報として計算したデータサイズ(ステップ
506の計算値)を所定の送信バッファエリアにセット
する。その後、図13に示すDMAレジスタセット処理
に移行する。
Steps 511 and 512 are different from those shown in FIG. 6. In step 511, the communication identification bit is set to "0". In step 512, the data size (the value calculated in step 506) calculated as the transmission data amount information is set in a predetermined transmission buffer area. Thereafter, the process proceeds to the DMA register setting process shown in FIG.

【0068】図12は、メイン通信の通信開始処理を示
すフローチャートである。この通信開始処理では、次回
のプレ通信の準備を行う。つまり、ステップ601で
は、プレ通信の送信データサイズを所定の送信バッファ
エリアにセットする。ここでの送信データサイズは、既
述の通り更新情報INDEX等により決まる既知の固定
サイズである。但しこのとき、プレ通信の送信データサ
イズが前記メイン通信の送信データサイズ(図11、ス
テップ512の値)と区別できるよう、各値を送信バッ
ファの異なるエリアに別々に格納する。また、ステップ
602では、プレ通信データを対象に検査符号値の計算
を行う。ステップ603では、通信識別ビットに「1」
をセットする。その後、図13に示すDMAレジスタセ
ット処理に移行する。
FIG. 12 is a flowchart showing the communication start processing of the main communication. In this communication start processing, preparation for the next pre-communication is performed. That is, in step 601, the transmission data size of the pre-communication is set in a predetermined transmission buffer area. The transmission data size here is a known fixed size determined by the update information INDEX and the like as described above. However, at this time, each value is separately stored in a different area of the transmission buffer so that the transmission data size of the pre-communication can be distinguished from the transmission data size of the main communication (the value of step 512 in FIG. 11). In step 602, a check code value is calculated for the pre-communication data. At step 603, the communication identification bit is set to "1".
Is set. Thereafter, the process proceeds to the DMA register setting process shown in FIG.

【0069】図13は、DMAのレジスタセット処理を
示すフローチャートである。これは、基本的に前記図7
で示したステップ301〜306の処理に準ずるが、送
受信のDMA転送回数の設定が異なる。
FIG. 13 is a flowchart showing the DMA register setting process. This is basically the same as FIG.
, But the setting of the number of times of DMA transfer for transmission and reception is different.

【0070】ステップ701,702では、送信用DM
Aに関して送信元アドレスレジスタ及び送信先アドレス
レジスタのセットを行う。続くステップ703では、通
信識別ビットに基づいて今回がプレ通信かメイン通信か
を判別し、プレ通信であればステップ704に進み、送
信用DMAの転送回数カウントレジスタにプレ通信の送
信データサイズをセットする。また、メイン通信であれ
ばステップ705に進み、送信用DMAの転送回数カウ
ントレジスタにメイン通信の送信データサイズをセット
する。
In steps 701 and 702, the transmission DM
A source address register and a destination address register are set for A. In the following step 703, it is determined whether the current communication is the pre-communication or the main communication based on the communication identification bit. If the communication is the pre-communication, the flow proceeds to step 704 to set the transmission data size of the pre-communication in the transfer count register of the transmission DMA. I do. If the communication is the main communication, the process proceeds to step 705, and the transmission data size of the main communication is set in the transfer count register of the transmission DMA.

【0071】その後、ステップ706,707では、受
信用DMAに関して送信元アドレスレジスタ及び送信先
アドレスレジスタのセットを行う。続くステップ708
では、受信用DMAの転送回数カウントレジスタに、送
信側CPUより受信した送信データサイズをセットす
る。ここまで設定してDMAをスタートさせれば通信が
開始される。
Thereafter, in steps 706 and 707, the source address register and the destination address register are set for the receiving DMA. Next step 708
Then, the transmission data size received from the transmitting CPU is set in the transfer count register of the receiving DMA. If the settings are made up to this point and the DMA is started, communication is started.

【0072】図14は、受信用DMAの転送終了割り込
み処理を示すフローチャートである。この処理も基本的
には既に説明した前記図8の処理に準じており、異なる
部分について説明する。前記図8では、先ずはじめに通
信データサイズを計算したが(ステップ401〜40
4)、図14では、送信側CPUから通信情報として既
に受信したデータサイズ情報があるためデータサイズの
計算が不要となる。そこで図14では、先ずステップ8
01において、送信側CPUからのデータサイズ情報を
基に検査符号値の計算を行う。また、続くステップ80
2では、前記計算した検査符号値と送信側CPUより受
信した検査符号値とが一致するかどうかを照合する。
FIG. 14 is a flowchart showing the transfer end interrupt processing of the receiving DMA. This processing is basically similar to the processing of FIG. 8 described above, and different parts will be described. In FIG. 8, the communication data size is calculated first (steps 401 to 40).
4) In FIG. 14, there is no need to calculate the data size because there is data size information already received as communication information from the transmitting CPU. Therefore, in FIG.
At 01, a check code value is calculated based on the data size information from the transmitting CPU. Also, the following step 80
In step 2, it is checked whether the calculated check code value matches the check code value received from the transmitting CPU.

【0073】また図14では、プレ通信かどうかの識別
処理をステップ803として新たに追加している。この
場合、更新情報INDEXに付加された通信識別ビット
に基づいて今回がプレ通信かどうかを判別する。プレ通
信であれば受信中間バッファへのデータコピー処理(ス
テップ804〜809)をスキップして本割り込み処理
を終了する。プレ通信でない場合は今回がメイン通信で
あると判断し、ステップ804〜809において、受信
バッファから受信中間バッファへのデータコピー処理を
実施する。但し、上記ステップ804〜809の処理
は、前記図8のステップ407〜412の処理と同一で
あるためここではその説明を省略する。
In FIG. 14, a process for identifying whether or not the communication is the pre-communication is newly added as step 803. In this case, it is determined whether or not this time is the pre-communication based on the communication identification bit added to the update information INDEX. In the case of the pre-communication, the data copy processing to the reception intermediate buffer (steps 804 to 809) is skipped, and the present interrupt processing ends. If it is not the pre-communication, it is determined that this is the main communication, and in steps 804 to 809, data copy processing from the reception buffer to the reception intermediate buffer is performed. However, the processing in steps 804 to 809 is the same as the processing in steps 407 to 412 in FIG.

【0074】以上第2の実施の形態によれば、上記第1
の実施の形態の効果に加え、以下の効果が得られる。す
なわち、送信側及び受信側のCPUではそれぞれに、そ
の都度の送信データ量(有効データ数)を知り得ること
ができ、毎回の通信時間を最小限に削減することが可能
となる。つまり、DMAの転送回数を有効データ数に限
定することができ、SPIによる通信時間を削減するこ
とが可能となる。
As described above, according to the second embodiment, the first
In addition to the effects of the embodiment, the following effects can be obtained. That is, each of the CPUs on the transmission side and the reception side can know the amount of transmission data (the number of valid data) in each case, and the communication time for each time can be reduced to a minimum. That is, the number of times of DMA transfer can be limited to the number of valid data, and the communication time by SPI can be reduced.

【0075】なお本発明は、上記以外に次の形態にて具
体化できる。上記実施の形態では、各種制御データの更
新周期に各々対応させて更新情報INDEXを記憶した
が、これを変更する。すなわち広義には、制御データを
複数のデータ群に区分けし、そのデータ群毎に更新情報
INDEXを記憶するものであれば良い。例えば、更新
周期ではなく、制御内容に対応させてデータ群を区分け
する。そしてCPUは、各データ群の中の何れかのデー
タが更新されるとINDEX情報も併せて更新する。ま
たCPUは、データ通信に際し、更新情報INDEXに
基づき更新有りと判断される制御データ(データ群)を
通信対象の有効データとし、その有効データのみを受信
側CPUに送信する。この場合にもやはり、通信処理時
間を短縮する、リアルタイム性を確保するといった効果
が実現できる。
The present invention can be embodied in the following modes other than the above. In the above embodiment, the update information INDEX is stored in correspondence with the update cycle of each type of control data, but this is changed. That is, in a broad sense, it is sufficient if control data is divided into a plurality of data groups and the update information INDEX is stored for each data group. For example, the data group is divided according to the control content instead of the update cycle. Then, when any data in each data group is updated, the CPU also updates the INDEX information. In data communication, the CPU uses control data (data group) determined to be updated based on the update information INDEX as valid data to be communicated, and transmits only the valid data to the receiving CPU. Also in this case, effects such as shortening the communication processing time and securing the real-time property can be realized.

【0076】また、更新情報INDEXの各ビットに優
先度を設け、優先度の高いデータを優先的に通信し、優
先度の低いデータを待たせるよう構成する。これによ
り、各CPUにおける送信及び受信バッファのサイズを
小さくすることが可能となる。
A priority is set for each bit of the update information INDEX, so that high-priority data is communicated preferentially, and low-priority data is made to wait. This makes it possible to reduce the size of the transmission and reception buffers in each CPU.

【0077】上記実施の形態では、制御データの更新周
期に同期させて更新情報INDEXを書き換えたが、こ
れに代えて、通信負荷の分散を図るべく通信開始要求に
同期させて更新情報INDEXを書き換える。この場
合、時分割通信に容易に対応できるようになる。また、
更新情報INDEXの書き換えについて、更新周期への
同期と通信開始への同期とを併用することも可能であ
る。以上のように、本発明によれば、通信負荷の削減、
分散が柔軟に実現できる。
In the above embodiment, the update information INDEX is rewritten in synchronization with the control data update cycle. Instead, the update information INDEX is rewritten in synchronization with the communication start request in order to distribute the communication load. . In this case, time division communication can be easily handled. Also,
Regarding rewriting of the update information INDEX, it is possible to use both synchronization to the update cycle and synchronization to the start of communication. As described above, according to the present invention, reduction of communication load,
Dispersion can be realized flexibly.

【0078】上記第2の実施の形態では、プレ通信及び
メイン通信の各送信データサイズが区別できるよう、各
値を送信バッファの異なるエリアに別々に格納したが、
これら送信データサイズを同一エリアに格納し、毎回上
書きする構成であっても良い。要は、プレ通信及びメイ
ン通信でそれぞれに必要なDMAの転送回数が適宜設定
できる構成であれば良い。
In the second embodiment, the values are separately stored in different areas of the transmission buffer so that the transmission data sizes of the pre-communication and the main communication can be distinguished.
The transmission data size may be stored in the same area and overwritten each time. In short, any configuration may be used as long as the number of DMA transfers required for each of the pre-communication and the main communication can be appropriately set.

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

【図1】電子制御ユニットにおけるCPU間通信のため
の構成を示す図。
FIG. 1 is a diagram showing a configuration for communication between CPUs in an electronic control unit.

【図2】送信中間バッファと送信バッファの構成を示す
図。
FIG. 2 is a diagram illustrating a configuration of a transmission intermediate buffer and a transmission buffer.

【図3】受信中間バッファと受信バッファの構成を示す
図。
FIG. 3 is a diagram showing a configuration of a reception intermediate buffer and a reception buffer.

【図4】CPU間通信の動作を説明するための図。FIG. 4 is a diagram illustrating an operation of communication between CPUs.

【図5】INDEXセット処理を示すフローチャート。FIG. 5 is a flowchart showing an INDEX setting process.

【図6】通信開始処理を示すフローチャート。FIG. 6 is a flowchart showing communication start processing.

【図7】DMAレジスタセット処理を示すフローチャー
ト。
FIG. 7 is a flowchart showing a DMA register setting process.

【図8】転送終了割り込み処理を示すフローチャート。FIG. 8 is a flowchart showing a transfer end interrupt process.

【図9】第2の実施の形態において、電子制御ユニット
におけるCPU間通信のための構成を示す図。
FIG. 9 is a diagram showing a configuration for communication between CPUs in an electronic control unit in the second embodiment.

【図10】CPU間通信の動作を説明するための図。FIG. 10 is a diagram for explaining the operation of communication between CPUs.

【図11】プレ通信の通信開始処理を示すフローチャー
ト。
FIG. 11 is a flowchart showing communication start processing of pre-communication.

【図12】メイン通信の通信開始処理を示すフローチャ
ート。
FIG. 12 is a flowchart illustrating communication start processing of main communication.

【図13】DMAレジスタセット処理を示すフローチャ
ート。
FIG. 13 is a flowchart showing a DMA register setting process.

【図14】転送終了割り込み処理を示すフローチャー
ト。
FIG. 14 is a flowchart illustrating a transfer end interrupt process.

【図15】従来技術におけるCPU間通信のための構成
を示す図。
FIG. 15 is a diagram showing a configuration for communication between CPUs in the related art.

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

10…第1CPU、20…第2CPU、14,15,2
4,25…RAM。
10 first CPU, 20 second CPU, 14, 15, 2
4, 25 ... RAM.

Claims (10)

【特許請求の範囲】[Claims] 【請求項1】複数のCPUを備え、これら各CPUでは
各種制御データが順次更新され、その更新された制御デ
ータが各CPU間で相互に通信される車両用電子制御装
置において、制御データが複数のデータ群に区分けさ
れ、前記CPUは、そのデータ群毎にデータ更新情報を
記憶する手段と、データ通信に際し、前記記憶したデー
タ更新情報に基づき更新有りと判断される制御データを
通信対象の有効データとし、その有効データのみを受信
側CPUに送信する手段と、を備えることを特徴とする
車両用電子制御装置。
An electronic control unit for a vehicle in which a plurality of CPUs are provided, and various control data are sequentially updated in each of the CPUs, and the updated control data is mutually communicated between the CPUs. The CPU stores means for storing data update information for each data group, and, in data communication, the control data determined to be updated based on the stored data update information as an effective communication target. Means for transmitting only valid data to the receiving CPU as data.
【請求項2】前記CPUは、個別に設定された更新周期
で各種制御データを更新し、その更新の都度、その時々
の更新周期に対応するデータ更新情報を記憶する請求項
1に記載の車両用電子制御装置。
2. The vehicle according to claim 1, wherein the CPU updates various control data at individually set update cycles, and stores data update information corresponding to each update cycle each time the control data is updated. For electronic control device.
【請求項3】前記データ更新情報は、各制御データの更
新周期の数に見合う数ビット分のデータよりなり、該デ
ータ更新情報の各ビットは各更新周期と1対1に対応す
るものである請求項2に記載の車両用電子制御装置。
3. The data update information comprises several bits of data corresponding to the number of update cycles of each control data, and each bit of the data update information corresponds to each update cycle on a one-to-one basis. The vehicle electronic control device according to claim 2.
【請求項4】前記CPUには、更新済みの制御データを
格納する制御用メモリ部と、該制御用メモリ部よりコピ
ーした制御データを送信データとして一時的に格納する
送信用メモリ部とが設けられ、 当該CPUは、データ通信に際し、前記データ更新情報
に基づき有効データとされる制御データのみを制御用メ
モリ部から送信用メモリ部へとコピーする請求項1〜3
の何れかに記載の車両用電子制御装置。
4. The CPU has a control memory unit for storing updated control data, and a transmission memory unit for temporarily storing control data copied from the control memory unit as transmission data. Wherein the CPU copies only control data that is valid data based on the data update information from the control memory unit to the transmission memory unit during data communication.
An electronic control unit for a vehicle according to any one of the above.
【請求項5】請求項4に記載の車両用電子制御装置にお
いて、 前記CPUには、通信相手のCPUより受信した制御デ
ータを一時的に格納する受信用メモリ部が更に設けら
れ、 複数のCPUのうち送信側CPUは、制御データと共に
前記データ更新情報を受信側CPUに送信し、該受信側
CPUは、受信したデータ更新情報に基づき有効データ
とされる制御データのみを受信用メモリ部から制御用メ
モリ部へとコピーする車両用電子制御装置。
5. The electronic control unit for a vehicle according to claim 4, wherein the CPU further includes a receiving memory unit for temporarily storing control data received from a CPU of a communication partner. The transmitting CPU transmits the data update information together with the control data to the receiving CPU, and the receiving CPU controls only the control data that is regarded as valid data based on the received data update information from the receiving memory unit. Electronic control unit for vehicles that copies to the memory unit for vehicles.
【請求項6】送信前の制御データについて検査符号値を
計算すると共に、送信後の制御データについて同じく検
査符号値を計算し、それら各々に計算した検査符号値を
照合して通信異常を判定する車両用電子制御装置におい
て前記CPUは、前記データ更新情報に基づき有効デー
タとされる制御データのみを対象に検査符号値を計算す
る請求項1〜5の何れかに記載の車両用電子制御装置。
6. A check code value is calculated for control data before transmission, a check code value is similarly calculated for control data after transmission, and the calculated check code value is compared with each of them to determine a communication abnormality. The vehicle electronic control device according to any one of claims 1 to 5, wherein in the vehicle electronic control device, the CPU calculates a check code value only for control data that is valid data based on the data update information.
【請求項7】所望の制御データを通信する際、該制御デ
ータを通信するためのメイン通信と、それに先立ち実施
され、メイン通信における通信データ量を通信相手側の
CPUに通知するためのプレ通信とを実施する請求項1
〜6の何れかに記載の車両用電子制御装置。
7. When communicating desired control data, a main communication for communicating the control data and a pre-communication executed prior to the communication and notifying a communication data amount in the main communication to a CPU of a communication partner side. Claim 1 that implements
The electronic control unit for a vehicle according to any one of claims 1 to 6.
【請求項8】請求項7に記載の車両用電子制御装置にお
いて、 複数のCPUのうち送信側CPUは、プレ通信に際し、
前記データ更新情報に基づき有効データとされる制御デ
ータのみを対象に送信データ量を計算してそれを受信側
CPUに通知し、該受信側CPUは、前記通知された送
信データ量分だけ制御データを受信する車両用電子制御
装置。
8. The electronic control unit for a vehicle according to claim 7, wherein the transmitting CPU among the plurality of CPUs performs pre-communication.
Based on the data update information, the transmission data amount is calculated only for the control data that is regarded as valid data, and the transmission data amount is notified to the receiving CPU. Electronic control unit for a vehicle.
【請求項9】請求項7又は8に記載の車両用電子制御装
置において、 複数のCPUのうち送信側CPUは、メイン通信に際
し、次回のプレ通信での送信データ量情報を送信するた
めの固定データ量を受信側CPUに通知し、該受信側C
PUは、前記通知された送信データ量分だけ制御データ
を受信する車両用電子制御装置。
9. The electronic control unit for a vehicle according to claim 7, wherein the transmission-side CPU among the plurality of CPUs is configured to transmit the transmission data amount information in the next pre-communication in the main communication. Notify the receiving CPU of the data amount, and
The PU is an electronic control unit for a vehicle that receives control data by the notified transmission data amount.
【請求項10】請求項7〜9の何れかに記載の車両用電
子制御装置において、 前記CPUは、その都度の通信がプレ通信かメイン通信
かを識別するための通信識別情報を前記データ更新情報
に付加して受信側CPUに送信する車両用電子制御装
置。
10. The electronic control unit for a vehicle according to claim 7, wherein the CPU updates communication identification information for identifying whether communication is pre-communication or main communication each time the data is updated. An electronic control unit for a vehicle that transmits the information to the receiving CPU in addition to the information.
JP2001032624A 2001-02-08 2001-02-08 Electronic control device for vehicle Pending JP2002236659A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001032624A JP2002236659A (en) 2001-02-08 2001-02-08 Electronic control device for vehicle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001032624A JP2002236659A (en) 2001-02-08 2001-02-08 Electronic control device for vehicle

Publications (1)

Publication Number Publication Date
JP2002236659A true JP2002236659A (en) 2002-08-23

Family

ID=18896515

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001032624A Pending JP2002236659A (en) 2001-02-08 2001-02-08 Electronic control device for vehicle

Country Status (1)

Country Link
JP (1) JP2002236659A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008143478A (en) * 2006-12-13 2008-06-26 Denso Corp On-vehicle system
JP2008201386A (en) * 2007-02-22 2008-09-04 Auto Network Gijutsu Kenkyusho:Kk Vehicle-mounted communication system and vehicle-mounted communication method
JP2010508683A (en) * 2006-10-31 2010-03-18 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Data transmission block transmission method, data transmission block transmission method, and system for transmitting data transmission block
JP2017073621A (en) * 2015-10-06 2017-04-13 株式会社リコー Image processing apparatus, imaging device, image processing method and program
JP2021060870A (en) * 2019-10-08 2021-04-15 株式会社デンソー Electronic control device

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010508683A (en) * 2006-10-31 2010-03-18 ローベルト ボッシュ ゲゼルシャフト ミット ベシュレンクテル ハフツング Data transmission block transmission method, data transmission block transmission method, and system for transmitting data transmission block
JP2008143478A (en) * 2006-12-13 2008-06-26 Denso Corp On-vehicle system
JP2008201386A (en) * 2007-02-22 2008-09-04 Auto Network Gijutsu Kenkyusho:Kk Vehicle-mounted communication system and vehicle-mounted communication method
JP2017073621A (en) * 2015-10-06 2017-04-13 株式会社リコー Image processing apparatus, imaging device, image processing method and program
JP2021060870A (en) * 2019-10-08 2021-04-15 株式会社デンソー Electronic control device
JP7215389B2 (en) 2019-10-08 2023-01-31 株式会社デンソー electronic controller

Similar Documents

Publication Publication Date Title
CN101263465B (en) Method and system for bus arbitration
CN1996966B (en) Communication message converting apparatus and communication message converting method
KR101956940B1 (en) Method and device for serial data transmission which is adapted to memory sizes
US9800456B2 (en) On-board network system
JPH08510625A (en) Periodic transmission method of data between at least two distributed control devices
US5640602A (en) Transferring digital data in units of 2 bytes to increase utilization of a 2-byte-wide bus
KR101001074B1 (en) Method for transmittng data on a bus
US6151306A (en) Vehicle multiplex communication system
JP2002236659A (en) Electronic control device for vehicle
JPH07112201B2 (en) Method and apparatus for assigning addresses to remote terminals in a LAN
KR102303424B1 (en) Direct memory access control device for at least one processing unit having a random access memory
KR101596540B1 (en) Semiconductor integrated circuit device
JP2009017154A (en) On-vehicle gateway device
CN114003544A (en) Control chip, workload proving system and transmission method
US6499067B1 (en) Serial communication apparatus and serial communication system
JP2007081628A (en) Method, program, and device for designing network
JPH06301644A (en) Data transfer method
EP0829095B1 (en) Method and apparatus for reducing latency time on an interface by overlapping transmitted packets
US20050138236A1 (en) Direct memory access control device and method for automatically updating data transmisson size from peripheral
CN111694581B (en) Software upgrading method of automobile noise reduction system and automobile noise reduction system
JP3512278B2 (en) Serial communication processor
CN110554984B (en) CPLD-based serial port bridging method and system
JP2002204243A (en) Multiplex communication device for vehicle
KR100427764B1 (en) Apparatus for Interface between Devices of different Data Bus
JP2009010851A (en) On-vehicle gateway device