JP4801658B2 - Data transmission control method and data transmission control device - Google Patents

Data transmission control method and data transmission control device Download PDF

Info

Publication number
JP4801658B2
JP4801658B2 JP2007504604A JP2007504604A JP4801658B2 JP 4801658 B2 JP4801658 B2 JP 4801658B2 JP 2007504604 A JP2007504604 A JP 2007504604A JP 2007504604 A JP2007504604 A JP 2007504604A JP 4801658 B2 JP4801658 B2 JP 4801658B2
Authority
JP
Japan
Prior art keywords
data
data transmission
transmission
master device
transmitted
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
JP2007504604A
Other languages
Japanese (ja)
Other versions
JPWO2006090473A1 (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.)
Fujitsu Optical Components Ltd
Original Assignee
Fujitsu Optical Components Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Optical Components Ltd filed Critical Fujitsu Optical Components Ltd
Publication of JPWO2006090473A1 publication Critical patent/JPWO2006090473A1/en
Application granted granted Critical
Publication of JP4801658B2 publication Critical patent/JP4801658B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/28Timers or timing mechanisms used in protocols

Description

本発明は、データの送信技術に係り、特に、通信相手装置とデータ到達の確認応答を取りながら装置間でデータの伝送を行う際のデータ送信を高速化するためのデータ送信制御方法及びデータ送信制御装置に関する。   The present invention relates to a data transmission technique, and in particular, a data transmission control method and data transmission for speeding up data transmission when transmitting data between devices while receiving a data arrival confirmation response with a communication partner device. The present invention relates to a control device.

装置間でのデータ伝送方法としては様々な方法があるが、シリアルインターフェースによりデータを伝送する方法としてはフィリップス社により提唱されたI2Cインターフェースが知られている。   There are various methods for transmitting data between devices, and an I2C interface proposed by Philips is known as a method for transmitting data through a serial interface.

図5はデータ伝送のための装置間の接続概念で、上記のI2Cインターフェースによる装置間の接続の例を概念的に示したものである。
I2Cインターフェースでは、クロック信号線SCL(Serial Clock Line)700、および、データ信号線SDA(Serial Data Line)800の2種類の信号線を用いて、マスター装置500と複数のスレーブ装置100、200、900との間でデータの伝送を行うことができる。図5ではスレーブ装置が3台の場合を示しているが、スレーブ装置には7ビットのスレーブアドレスが割り当てられ、そのスレーブアドレスであらわされる範囲の任意台数のスレーブ装置が接続可能である。
FIG. 5 shows a concept of connection between devices for data transmission, and conceptually shows an example of connection between devices using the I2C interface.
In the I2C interface, a master device 500 and a plurality of slave devices 100, 200, 900 are used by using two types of signal lines, a clock signal line SCL (Serial Clock Line) 700 and a data signal line SDA (Serial Data Line) 800. Data can be transmitted to and from. Although FIG. 5 shows a case where there are three slave devices, a 7-bit slave address is assigned to the slave device, and an arbitrary number of slave devices within the range represented by the slave address can be connected.

クロック信号線SCL700はマスター装置からクロック信号を出力するための信号線であるが、スレーブ装置にてクロック信号線SCLを”Low”状態にしている場合はマスター装置はクロック信号線SCL700の出力を一時停止する。この状態を”クロックストレッチ”という。データ信号線SDA800はマスター装置とスレーブ装置の間でデータを送受信するための信号線であり、クロック信号線SCL700およびデータ信号線SDA800はそれぞれプルアップ抵抗(Rp)760、860を介して電源電圧(VDD)600に接続されている。   The clock signal line SCL700 is a signal line for outputting a clock signal from the master device. However, when the clock signal line SCL is in a “Low” state in the slave device, the master device temporarily outputs the clock signal line SCL700. Stop. This state is called “clock stretch”. The data signal line SDA800 is a signal line for transmitting and receiving data between the master device and the slave device. The clock signal line SCL700 and the data signal line SDA800 are connected to the supply voltage (Pp VDD) 600.

図6はデータ伝送のための装置間の信号線接続概念で、I2Cインターフェースによるマスター装置とスレーブ装置との間の信号線接続の例を概念的に示したものである。ここでは、上記図5の装置間の接続概念で示したスレーブ装置100とマスタ装置500と間の接続を例として示している。
クロック信号線SCL700およびデータ信号線SDA800は共にオープンドレイン駆動の双方向通信が可能な構成となっており、スレーブ装置100はオープンドレイン回路170、180及び対応する受信バッファ171、181を備え、また、送受信するデータ列111を記憶するデータ記憶部110を備えている。
マスター装置500も同様に、クロック信号線SCL700、データ信号線SDA800に対応するオープンドレイン回路570、580及び受信バッファ571、581を備えている。ここでは、マスター装置500のデータ記憶部の記述は省略している。
FIG. 6 is a conceptual diagram of signal line connection between devices for data transmission, and conceptually shows an example of signal line connection between a master device and a slave device using an I2C interface. Here, the connection between the slave device 100 and the master device 500 shown in the connection concept between the devices in FIG. 5 is shown as an example.
Both the clock signal line SCL700 and the data signal line SDA800 are configured to be capable of bidirectional communication with open drain drive, and the slave device 100 includes open drain circuits 170 and 180 and corresponding reception buffers 171 and 181; A data storage unit 110 that stores a data string 111 to be transmitted and received is provided.
Similarly, the master device 500 includes open drain circuits 570 and 580 and reception buffers 571 and 581 corresponding to the clock signal line SCL700 and the data signal line SDA800. Here, description of the data storage unit of the master device 500 is omitted.

図7はデータ伝送シーケンス(1)で、I2Cインターフェースによりマスター装置からスレーブ装置へデータ伝送する際のシーケンス例である。上記図5の装置間の接続概念で示したマスター装置500からスレーブ装置100へデータ列(データ1〜データn)を送信する場合を代表例として示している。   FIG. 7 shows a data transmission sequence (1), which is a sequence example when data is transmitted from the master device to the slave device through the I2C interface. A case where a data string (data 1 to data n) is transmitted from the master device 500 to the slave device 100 shown in the connection concept between the devices in FIG. 5 is shown as a representative example.

マスター装置500側からみたデータ伝送タイミングを時間軸850に沿って、またスレーブ装置100側からみたデータ伝送タイミングを時間軸810に沿って示している。
マスター装置500は、まずデータ伝送を開始するための条件であるスタート条件Sを生成した後(シーケンスMS01)、最初のバイトデータとして送信先となるスレーブ装置のアドレス(スレーブアドレス:7ビット)およびデータの伝送方向を示すR/W(Read/Write)ビット(1ビット)を送信する(シーケンスMS02、MS03)。図7の例では、データの伝送方向はマスター装置からみて送信つまり”Write”となるので、R/Wビットの値は”Write”を意味するビット値”0”に設定されている。スレーブ装置100は自装置に割り当てられたスレーブアドレスと、マスター装置から送信されてきたスレーブアドレス情報を照合し、一致した場合は確認応答情報であるアクノリッジ信号Aをマスター装置へ返信する(シーケンスMS04)。I2Cインターフェースでは、アクノリッジ信号とはデータ信号線SDAを”Low”にすることを意味する。
The data transmission timing seen from the master device 500 side is shown along the time axis 850, and the data transmission timing seen from the slave device 100 side is shown along the time axis 810.
The master device 500 first generates a start condition S that is a condition for starting data transmission (sequence MS01), and then, as the first byte data, the address (slave address: 7 bits) and data of the slave device that is the transmission destination The R / W (Read / Write) bit (1 bit) indicating the transmission direction is transmitted (sequence MS02, MS03). In the example of FIG. 7, since the data transmission direction is transmission, that is, “Write” as seen from the master device, the value of the R / W bit is set to the bit value “0” meaning “Write”. Slave device 100 collates the slave address assigned to itself with the slave address information transmitted from the master device, and if they match, acknowledge signal A, which is acknowledgment information, is returned to the master device (sequence MS04). . In the I2C interface, the acknowledge signal means that the data signal line SDA is set to “Low”.

次にマスター装置500はスレーブ装置100のデータ記憶部110内のデータ格納領域のアドレスを意味するメモリアドレスを送信し(シーケンスMS05)、それに対するアクノリッジを受信後(シーケンスMS06)、マスタ装置500内のデータ記憶部から読み出した最初のデータであるデータ1を送信する(シーケンスMS07)。そして、それに対するアクノリッジが返送されたならば(シーケンスMS08)、同様にして順次データを送信していき、最後のデータであるデータnを送信して(シーケンスMS09)それに対するアクノリッジAを受信した(シーケンスMS10)後に、ストップ条件Pを生成して(シーケンスMS11)、データ伝送シーケンスを終結する。上記の伝送シーケンスの例では、データ列(データ1〜データn)を送信する直前に、そのデータ列を格納するスレーブ装置100のデータ格納領域のメモリアドレスを送信するシーケンスとなっているが、これについてはI2Cインターフェースでは特に規定されていない。   Next, the master device 500 transmits a memory address indicating the address of the data storage area in the data storage unit 110 of the slave device 100 (sequence MS05), and after receiving an acknowledge (sequence MS06), Data 1 that is the first data read from the data storage unit is transmitted (sequence MS07). Then, if an acknowledgment is returned (sequence MS08), data is sequentially transmitted in the same manner, data n which is the last data is transmitted (sequence MS09), and an acknowledge A is received (sequence MS09). After the sequence MS10), a stop condition P is generated (sequence MS11), and the data transmission sequence is terminated. In the example of the transmission sequence described above, the memory address of the data storage area of the slave device 100 that stores the data string is transmitted immediately before transmitting the data string (data 1 to data n). Is not specified in the I2C interface.

図8はデータ伝送シーケンス(2)で、I2Cインターフェースによりスレーブ装置からマスター装置へデータ伝送する際のシーケンス例である。前記図5の装置間の接続概念で示したスレーブ装置100からマスター装置500へデータ列(データ1〜データn)を送信する場合を代表例として示している。   FIG. 8 shows a data transmission sequence (2), which is a sequence example when data is transmitted from the slave device to the master device through the I2C interface. A case where a data string (data 1 to data n) is transmitted from the slave device 100 to the master device 500 shown in the connection concept between the devices in FIG. 5 is shown as a representative example.

マスター装置500側からみたデータ伝送タイミングを時間軸850に沿って、またスレーブ装置100側からみたデータ伝送タイミングを時間軸810に沿って示している。
マスター装置500は、まずデータ伝送を開始するための条件であるスタート条件Sを生成した後(シーケンスSM01)、スレーブ装置のアドレス情報(スレーブアドレス:7ビット)および次に送信する情報(メモリアドレス)の伝送方向を示すR/W(Read/Write)ビット(1ビット)を送信する(シーケンスSM02、SM03)。図8の例では、「メモリアドレス」情報の伝送方向はマスター装置からみて送信つまり”Write”となるので、”Write”を意味するビット値”0”にしておく。スレーブ装置100は自装置に割り当てられたスレーブアドレスと、マスター装置から送信されてきたスレーブアドレス情報を照合し、一致した場合は確認応答情報であるアクノリッジAをマスター装置へ返信する(シーケンスSM04)。次にマスター装置500はスレーブ装置100のデータ記憶部110内のデータ格納領域のアドレスである「メモリアドレス」情報を送信し(シーケンスMS05)、それに対するアクノリッジAを受信する(シーケンスSM06)。
The data transmission timing seen from the master device 500 side is shown along the time axis 850, and the data transmission timing seen from the slave device 100 side is shown along the time axis 810.
The master device 500 first generates a start condition S that is a condition for starting data transmission (sequence SM01), and then slave device address information (slave address: 7 bits) and information to be transmitted next (memory address). The R / W (Read / Write) bit (1 bit) indicating the transmission direction is transmitted (sequence SM02, SM03). In the example of FIG. 8, since the transmission direction of the “memory address” information is transmission, that is, “Write” as seen from the master device, the bit value “0” meaning “Write” is set. The slave device 100 collates the slave address assigned to the own device with the slave address information transmitted from the master device. If they match, the slave device 100 returns acknowledgment A as acknowledgment information to the master device (sequence SM04). Next, the master device 500 transmits “memory address” information, which is the address of the data storage area in the data storage unit 110 of the slave device 100 (sequence MS05), and receives an acknowledge A for the information (sequence SM06).

引き続いてマスタ装置500は再びスタート条件Sを生成し(シーケンスSM07)、同じスレーブ装置100のスレーブアドレス情報(7ビット)及び次のデータの伝送方向としてスレーブ装置100からマスター装置500への方向を意味するR/Wビット情報(“1”)を送信し(シーケンスSM08、SM09)、それに対する確認応答情報であるアクノリッジAを受信した後(シーケンスSM10)、スレーブ装置100からデータが送信されてくるのを待ち合わせる。   Subsequently, the master device 500 generates the start condition S again (sequence SM07), and means the direction from the slave device 100 to the master device 500 as the transmission direction of the slave address information (7 bits) of the same slave device 100 and the next data. R / W bit information (“1”) to be transmitted is transmitted (sequence SM08, SM09), and acknowledgment A corresponding thereto is received (sequence SM10), and then data is transmitted from slave device 100. Wait for.

一方、上記のシーケンスSM08、SM09でスレーブアドレス情報およびスレーブ装置からマスター装置へのデータ伝送を意味する値”1”のR/Wビットを受信したスレーブ装置100は、データ記憶部110内の上記シーケンスSM05で指定された「メモリアドレス」が示すデータ領域から最初のデータであるデータ1を読み出してマスター装置500へ送信し(シーケンスSM11)、マスタ装置からの確認応答情報であるアクノリッジAが返信されるのを待ち合わせる(シーケンスSM12)。以後順次データ記憶部110からデータを読み出して同様の手順でマスター装置500へ送信し、最後のデータであるデータnを送信後(シーケンスSM13、SM14)、マスター装置500が送信終了情報であるノンアクノリッジNAを返信し、その後ストップ条件を生成して(シーケンスSM15)データ伝送シーケンスを終結する。   On the other hand, the slave device 100 that has received the slave address information and the R / W bit of the value “1” indicating data transmission from the slave device to the master device in the above-described sequences SM08 and SM09, the sequence in the data storage unit 110 Data 1 that is the first data is read from the data area indicated by the “memory address” specified by SM05 and transmitted to master device 500 (sequence SM11), and acknowledgment A that is confirmation response information from the master device is returned. Wait for (sequence SM12). Thereafter, the data is sequentially read from the data storage unit 110 and transmitted to the master device 500 in the same procedure. After the data n as the last data is transmitted (sequences SM13 and SM14), the master device 500 transmits the non-acknowledgement as transmission end information. NA is returned, then a stop condition is generated (sequence SM15), and the data transmission sequence is terminated.

上記のシーケンスSM08、SM09でマスター装置からスレーブ装置へ送信されるデータ、つまり、スレーブアドレス情報(7ビット)と値”1”のR/Wビットは、スレーブ装置からマスター装置へのデータ送信要求を意味しているため、以降の記述ではこのデータのことを「データ送信要求」とも表記する。
また、上記の図8のデータ伝送シーケンス(2)に示されている「メモリアドレス」については、I2Cインターフェースでは特に規定されていない。
The data transmitted from the master device to the slave device in the above-described sequences SM08 and SM09, that is, the slave address information (7 bits) and the R / W bit of the value “1” are data transmission requests from the slave device to the master device. This means that this data is also referred to as “data transmission request” in the following description.
Further, the “memory address” shown in the data transmission sequence (2) in FIG. 8 is not particularly defined in the I2C interface.

図9はデータ伝送時の信号タイミング(1)で、I2Cインターフェースによるスタート条件の生成、データビットの伝送、及びストップ条件の生成の際のクロック信号SCL701とデータ信号SDA801との間の時間関係を示している。
スタート条件C01とはクロック信号SCL701が”High”状態の間にデータ信号SDA801が”High”から”Low”に変化した状態のことで、データ伝送の開始を意味する。I2Cインターフェースではスタート条件C01のセットアップ時間を示すtSU.STAおよびスタート条件C01のホールド時間を示すtHD.STAのそれぞれ最小値が規定されている。
FIG. 9 is a signal timing (1) at the time of data transmission, and shows a time relationship between the clock signal SCL701 and the data signal SDA801 at the time of generation of a start condition, transmission of a data bit, and generation of a stop condition by the I2C interface. ing.
The start condition C01 is a state in which the data signal SDA801 changes from “High” to “Low” while the clock signal SCL701 is in the “High” state, which means the start of data transmission. In the I2C interface, minimum values of t SU.STA indicating the setup time of the start condition C01 and t HD.STA indicating the hold time of the start condition C01 are defined.

データビットの伝送の際は、クロック信号SCL701が”High”の間はデータ信号SDA801の状態は一定でなければならず、データ信号SDA801が”High”と”Low”の間で状態を変更できるのはクロック信号SCL701が”Low”のときに限られ、データ信号SDA801はクロック信号SCL701の立ち上がりでサンプルされる。I2Cインターフェースでは、データ信号SDA801のセットアップ時間tSU.DAT、データ信号SDA801のホールド時間tHD.DAT、クロック信号SCL701の Low信号パルス幅tLOW、およびクロック信号SCL701のHigh信号パルス幅tHIGHのそれぞれの最小値が規定されている。During the transmission of data bits, the state of the data signal SDA801 must be constant while the clock signal SCL701 is “High”, and the state can be changed between the “High” and “Low” of the data signal SDA801. Is limited to when the clock signal SCL701 is "Low", and the data signal SDA801 is sampled at the rising edge of the clock signal SCL701. In the I2C interface, the setup time t SU.DAT of the data signal SDA801, the hold time t HD.DAT of the data signal SDA801, the low signal pulse width t LOW of the clock signal SCL701, and the high signal pulse width t HIGH of the clock signal SCL701, respectively. The minimum value is specified.

ストップ条件C02とはクロック信号SCL701が”High”状態の間にデータ信号SDA801が”Low”から”High”に変化した状態のことで、データ伝送の終結を意味する。I2Cインターフェースでは、ストップ条件C02のセットアップ時間tSU.STO、およびストップ条件C02と次のスタート条件C03との間隔tBUFのそれぞれの最小値が規定されている。The stop condition C02 is a state in which the data signal SDA801 changes from “Low” to “High” while the clock signal SCL701 is in the “High” state, and means the end of data transmission. In the I2C interface, the minimum value of the setup time t SU.STO of the stop condition C02 and the interval t BUF between the stop condition C02 and the next start condition C03 is defined.

図10はデータ伝送時の信号タイミング(2)で、I2Cインターフェースにおけるデータ信号SDA801の確定時間tAAとクロックストレッチ許容時間tStrechの時間関係について示している。
前記図9のデータ伝送時の信号タイミング(1)で示したように、データ信号SDA801はクロック信号SCL701の立ち上がりでサンプルされる。このため、例えば、スレーブ装置からマスター装置にデータを送信する際に、スレーブ装置のデータ記憶部からのデータ読み出しに時間を要し、データ信号SDA801の確定時間tAAが大きくなり、その結果データ信号SDA801の出力が遅延する場合がある。このようなときは、クロックストレッチ、つまり、スレーブ装置側でクロック信号SCL801を”Low”状態に保持しておくことによりデータ信号SDA801のサンプリングが行われないようにすることができ、これによりデータ信号SDA801の確定時間tAAを引き延ばすことができる。図10のデータ伝送時の信号タイミング(2)はこのような状況を示している。I2Cインターフェースではデータ信号SDA801の確定時間tAA、およびクロックストレッチ許容時間tStrechについてはその上限値は規定されていない。
FIG. 10 shows a signal timing (2) at the time of data transmission, and shows the time relationship between the fixed time t AA of the data signal SDA801 and the clock stretch allowable time t Strech in the I2C interface.
As shown in the signal timing (1) at the time of data transmission in FIG. 9, the data signal SDA801 is sampled at the rising edge of the clock signal SCL701. For this reason, for example, when data is transmitted from the slave device to the master device, it takes time to read data from the data storage unit of the slave device, and the determination time t AA of the data signal SDA801 increases, and as a result, the data signal The output of SDA801 may be delayed. In such a case, sampling of the data signal SDA801 can be prevented from being performed by clock stretching, that is, by holding the clock signal SCL801 in the "Low" state on the slave device side. The determination time t AA of SDA 801 can be extended. Signal timing (2) during data transmission in FIG. 10 shows such a situation. In the I2C interface, the upper limit is not defined for the fixed time t AA of the data signal SDA801 and the clock stretch allowable time t Strech .

図11は従来技術のデータ送信制御の信号タイミング概要で、I2Cインターフェースにおいて、マスター装置500から従来技術で構成されるスレーブ装置900へ最初の1バイトを送信し、それに対してスレーブ装置900が最初の送信データであるデータ1をマスター装置500へ送信開始するまでの信号タイミング関係を概念的に示している。
従来技術で構成されているスレーブ装置900は、マスター装置500により生成されたスタート条件Sを検出後(タイミングT901)、マスター装置500から送信されてくる7ビットのスレーブアドレス情報と(タイミングT902)引き続いて送信されてくるR/Wビットを受信した時点(1バイト受信)でクロックストレッチを設定し、受信した1バイトに含まれるスレーブアドレス情報とR/Wビット情報を解析し、スレーブアドレスが自装置のアドレスと一致しかつR/Wビットの値が”1”であることから、マスター装置500からのスレーブ装置900に対するデータ送信要求であると判定する (タイミングT903) 。そして、データ記憶部910から最初の送信データであるデータ1を読み出した後に(タイミングT904)、アクノリッジAを送信してクロックストレッチを解除し(タイミングT905)、読み出したデータ1の送信を開始する(タイミングT906)。この例では、スレーブ装置900の内部メモリであるデータ記憶部910からのデータ読み出しに時間を要し(タイミングT904)、データ信号SDA801の確定時間tAAおよびクロックストレッチ時間tStrechが大きな値となっている場合を示している。
FIG. 11 is an outline of signal timing of data transmission control in the prior art. In the I2C interface, the first one byte is transmitted from the master device 500 to the slave device 900 configured in the prior art, and the slave device 900 first responds. The signal timing relationship until transmission of data 1 as transmission data to the master device 500 is conceptually shown.
After detecting the start condition S generated by the master device 500 (timing T901), the slave device 900 configured in the prior art continues with the 7-bit slave address information transmitted from the master device 500 (timing T902). When the received R / W bit is received (1 byte reception), clock stretch is set, the slave address information and R / W bit information included in the received 1 byte are analyzed, and the slave address is Since the R / W bit value is “1”, it is determined that the request is a data transmission request from the master device 500 to the slave device 900 (timing T903). Then, after data 1 as the first transmission data is read from the data storage unit 910 (timing T904), the acknowledge A is transmitted to cancel the clock stretch (timing T905), and transmission of the read data 1 is started (time T904). Timing T906). In this example, it takes time to read data from the data storage unit 910 which is the internal memory of the slave device 900 (timing T904), and the fixed time t AA and the clock stretch time t Strech of the data signal SDA801 become large values. Shows the case.

図12は従来技術のデータ送信制御装置の構成で、上記図5の接続概念で示したスレーブ装置900を従来技術で構成されているものとして示している。
マスタ装置500よりクロック信号線SCL700の制御の基にデータ信号線SDA800を介して送信されてくる情報はバッファ981を経由して受信レジスタ901に入力される。受信データ解析部902はクロックストレッチを設定した後、受信レジスタ901に格納されているデータを読み込んでその内容を解析し、例えば、それがマスター装置からのデータ送信要求を意味する情報であれば、データ読み出し送信部903を起動してデータ記憶部910に格納されているデータ列911から最初のデータを読み出して確認応答(アクノリッジ)を送信し、クロックストレッチ解除後にその読み出した最初のデータを送信する。
以降、マスタ装置500からの確認応答情報の受信を待ち合わせ、確認応答情報受信後にクロックストレッチを設定した状態でデータ列911から次に送信すべきデータを読み出し、クロックストレッチを解除してその読み出したデータを送信する、処理をマスター装置500から送信終了情報(ノンアクノリッジ)が返信されるまで繰り返す。ここで、クロックストレッチの設定および解除はオープンドレイン回路970を駆動することにより行われ、データおよび確認応答情報の送信はオープンドレイン回路980を駆動することにより行われる。
FIG. 12 shows the configuration of a data transmission control device of the prior art, and shows that the slave device 900 shown in the connection concept of FIG. 5 is configured by the prior art.
Information transmitted from the master device 500 via the data signal line SDA800 under the control of the clock signal line SCL700 is input to the reception register 901 via the buffer 981. After setting the clock stretch, the reception data analysis unit 902 reads the data stored in the reception register 901 and analyzes the contents thereof.For example, if it is information indicating a data transmission request from the master device, The data read / send unit 903 is activated to read the first data from the data string 911 stored in the data storage unit 910, send an acknowledgment (acknowledge), and send the read first data after canceling the clock stretch. .
After that, it waits for the receipt of the confirmation response information from the master device 500, reads the data to be transmitted next from the data string 911 with the clock stretch set after receiving the confirmation response information, cancels the clock stretch, and reads the read data. The process is repeated until transmission end information (non-acknowledgement) is returned from the master device 500. Here, setting and canceling of the clock stretch is performed by driving the open drain circuit 970, and transmission of data and acknowledgment information is performed by driving the open drain circuit 980.

一方、データ読み出し送信部903は、受信データ解析部902から起動された時のみ、データ記憶部910に格納されているデータ列911から所定の順序でデータを読み出し、その読み出したデータを受信データ解析部902に引き渡す。
このように、従来技術のデータ送信制御では、クロックストレッチの状態でデータ記憶部910からデータ読み出した後にその読み出したデータをデータ信号線SDA800へ出力する構成になっており、データ信号線SDA800へのデータ送出タイミングがデータ記憶部910からのデータ読み出し時間に影響され、その分だけ遅延する方向に変動していた。
On the other hand, the data read / transmit unit 903 reads data in a predetermined order from the data string 911 stored in the data storage unit 910 only when activated by the received data analysis unit 902, and the read data is analyzed for the received data Delivered to part 902.
As described above, the conventional data transmission control is configured to output data to the data signal line SDA800 after the data is read from the data storage unit 910 in the clock stretch state, and to the data signal line SDA800. The data transmission timing is affected by the data reading time from the data storage unit 910, and fluctuates in a direction of delay by that amount.

図13は従来技術のデータ送信制御の動作フロー(1)で、マスター装置よりデータ送信要求情報の1バイト情報を受信した時点以降のスレーブ装置900(従来技術の送信制御装置として構成されている)のデータ送信制御の処理手順を示している。
従来技術で構成されているスレーブ装置900は、マスター装置500から最初の1バイト目のデータを受信すると(ステップS901)、まずクロックストレッチを設定してクロック信号線SCL900を”Low”に保持した後(ステップS902)、この受信した最初のバイトに含まれるスレーブアドレスとR/Wビットの内容を解析し、スレーブアドレスが自装置アドレスと一致しR/Wビットの値が”1”の場合は、スレーブ装置からマスター装置方向へのデータ送信要求を意味していると判定する(ステップS903)。そして、データ記憶部910内の送信データ列が格納されている領域の先頭から最初のデータを読み出した後(ステップS904)、上記ステップS901で受信した第1バイト目の情報に対する確認応答情報(アクノリッジ)をマスター装置500へ送信した後に(ステップS905)クロックストレッチを解除し(ステップS906)、上記ステップS904で読み出したデータをマスター装置500へ送信する(ステップS907)。
FIG. 13 is an operation flow (1) of the data transmission control of the prior art, and the slave device 900 after the time when the 1-byte information of the data transmission request information is received from the master device (configured as a prior art transmission control device). The processing procedure of the data transmission control is shown.
When the slave device 900 configured in the prior art receives the first byte of data from the master device 500 (step S901), first, after setting the clock stretch and holding the clock signal line SCL900 at "Low" (Step S902), analyzing the slave address and the contents of the R / W bit included in the first byte received, if the slave address matches the own device address and the value of the R / W bit is `` 1 '', It is determined that it means a data transmission request from the slave device to the master device (step S903). Then, after reading the first data from the beginning of the area where the transmission data string is stored in the data storage unit 910 (step S904), the confirmation response information (acknowledgement) for the information of the first byte received in step S901 above ) Is transmitted to the master device 500 (step S905), the clock stretch is canceled (step S906), and the data read in step S904 is transmitted to the master device 500 (step S907).

次に、マスター装置500から確認応答情報(アクノリッジ)または送信終了情報(ノンアクノリッジ)が受信されるのを待ち合わせ(ステップS908)、受信情報がアクノリッジかノンアクノリッジかを判定し(ステップS909)、ノンアクノリッジの場合(YES)は処理を終了し、アクノリッジの場合(NO)は次の処理を行う。
クロックストレッチを設定した後に(ステップS910)、データ記憶部910内の送信データ列911より次に送信するデータを読み出して(ステップS911)クロックストレッチを解除した後(ステップS912)読み出したデータを送信し(ステップS913)、ステップS908に戻る。
ここで、上記のデータ記憶部910内に格納されているデータ列911の先頭領域アドレスの決定方法については本動作フローには記載されていないが、前記図8のデータ伝送シーケンス(2)で示したシーケンスSM05において、マスター装置500からスレーブ装置900に予め通知される。
Next, it waits for receipt of acknowledgment information (acknowledge) or transmission end information (non-acknowledge) from master device 500 (step S908), and determines whether the received information is acknowledge or non-acknowledge (step S909). If acknowledged (YES), the process is terminated, and if acknowledged (NO), the next process is performed.
After setting the clock stretch (step S910), the next data to be transmitted is read from the transmission data string 911 in the data storage unit 910 (step S911). After the clock stretch is canceled (step S912), the read data is transmitted. (Step S913), the process returns to Step S908.
Here, although the method for determining the head area address of the data string 911 stored in the data storage unit 910 is not described in this operation flow, it is shown by the data transmission sequence (2) in FIG. In the sequence SM05, the master device 500 notifies the slave device 900 in advance.

図14は従来技術のデータ送信制御の動作フロー(2)で、従来技術のデータ送信制御装置として構成されたマスター装置が自律的にスレーブ装置に対してデータを送信する場合のマスター装置側のデータ送信制御の処理手順を示している。
従来技術で構成されているマスター装置は、自装置のデータ記憶部内に記憶されているデータ列からデータを読み取った後(S921)そのデータをスレーブ装置へ送信し(ステップS922)、スレーブ装置からの確認応答情報(アクノリッジ)の返信を待ち合わせる(ステップS923)。スレーブ装置から確認応答情報を受信したら、直前に送信したデータがデータ列の最終データか否かを判定し(S924)、最終データでなければ(NO)ステップS921に戻って次のデータ読み出しを行い、最終データの場合は(YES)処理を終了する。このように、従来技術のデータ送信制御方法では、自律的なタイミングで自装置からデータを送信する場合は、まずデータ記憶部よりデータを読み出した後にその読み出したデータを送信し、その送信したデータに対する確認応答情報が通信相手装置から返送されるのを待ち合わせる。そして、この処理手順を繰り返すことによりデータ列を送信するため、データ記憶部からのデータ読み出し処理時間の変動によりデータ送信タイミングが変動することになり、データ列全体の送信完了時間もかなり変動することになる。
FIG. 14 is an operation flow (2) of the data transmission control of the prior art. Data on the master device side when the master device configured as the data transmission control device of the prior art autonomously transmits data to the slave device. The processing procedure of transmission control is shown.
The master device configured in the prior art reads the data from the data string stored in its own data storage unit (S921) and transmits the data to the slave device (step S922). It waits for a reply of confirmation response information (acknowledge) (step S923). When confirmation response information is received from the slave device, it is determined whether or not the data transmitted immediately before is the final data of the data string (S924). If it is not the final data (NO), return to step S921 to read the next data In the case of final data (YES), the process is terminated. As described above, in the data transmission control method of the prior art, when data is transmitted from the own device at an autonomous timing, the data is first read from the data storage unit, and then the read data is transmitted. Wait until the acknowledgment information for is returned from the communication partner device. Since the data sequence is transmitted by repeating this processing procedure, the data transmission timing varies due to variations in the data read processing time from the data storage unit, and the transmission completion time of the entire data sequence also varies considerably. become.

以上に述べたI2Cインターフェースによるデータ伝送技術については、非特許文献1にその詳細が開示されている。
I2Cバス仕様書、バージョン2.1、2000年1月、日本フィリップス社発行。
The details of the data transmission technology using the I2C interface described above are disclosed in Non-Patent Document 1.
I2C bus specification, version 2.1, published in January 2000 by Philips Japan.

(発明が解決しようとする課題)
従来のI2Cインターフェース仕様に準拠したスレーブ装置は、前記のようにクロックストレッチを利用してデータ送信のタイミング調整を行っていた。例えば、マスター装置からのデータ送信要求に対してスレーブ装置がデータ列を送信する際は、データ記憶部からデータを読み出すのに時間を要するため読み出し時間の間はクロックストレッチによりデータの伝送を一時停止させていた。このクロックストレッチ状態は1バイトのデータを読み出す毎に発生し、大量のデータ列の伝送の際はシステム全体のデータ伝送性能を低下させる要因になっていた。
また、前記のような従来のI2Cインターフェースをベースにしたデータ送信制御では、例えば、光モジュールの設計に使用されているSFP(Small Form-factor Pluggable)仕様に適合させようとする場合などは、データ信号SDAの確定時間tAA(例えば4.5μs以内)やクロックストレッチ許容時間tStrech(例えば5μs以内)が非常に短い為、マスター装置からデータを受信したらスレーブ装置は直ちにマスター装置へデータを送信しなければならず、従来のデータ送信制御方法では対応が困難な場合がある。
本発明は、装置間でデータ到達の確認応答を取りながらデータの送受信を行う際のデータ伝送を高速化するデータ送信制御方法及びデータ送信制御装置を提供することを目的とする。
(課題を解決するための手段)
(Problems to be solved by the invention)
A slave device compliant with the conventional I2C interface specification adjusts the timing of data transmission using clock stretching as described above. For example, when a slave device transmits a data string in response to a data transmission request from a master device, it takes time to read data from the data storage unit, so data transmission is temporarily suspended by clock stretching during the read time. I was letting. This clock stretch state occurs every time 1-byte data is read, and when transmitting a large amount of data string, it has been a factor of reducing the data transmission performance of the entire system.
In the data transmission control based on the conventional I2C interface as described above, for example, when trying to conform to the SFP (Small Form-factor Pluggable) specification used in the design of the optical module, The signal SDA decision time t AA (for example, within 4.5 μs) and the clock stretch allowable time t Strech (for example, within 5 μs) are very short, so when receiving data from the master device, the slave device must immediately send data to the master device. In other words, it may be difficult to cope with the conventional data transmission control method.
SUMMARY OF THE INVENTION An object of the present invention is to provide a data transmission control method and a data transmission control device for speeding up data transmission when data is transmitted / received while receiving acknowledgment of data arrival between devices.
(Means for solving the problem)

本発明は、データ記憶部に格納されているデータ列から所定の順序でデータを読み出し、通信相手装置からのデータ到達の確認応答を取りながらデータの送信を制御する方法において、予め前記データ記憶部から送信するデータを読み出して送信レジスタへ格納し、データ送信タイミング検出時に前記送信レジスタに格納されているデータを送信する、ように構成した。
これにより、データの送信タイミング検出時点にはすでに送信レジスタに次に送信すべきデータが格納されており、送信レジスタからデータ信号線へ送信スイッチを切り替えるだけの処理時間でデータを送出することができ、データ送信タイミングの遅延を最小限に抑えることができる。
The present invention relates to a method for reading data in a predetermined order from a data string stored in a data storage unit and controlling transmission of data while receiving a confirmation of arrival of data from a communication partner device. The data to be transmitted is read out and stored in the transmission register, and the data stored in the transmission register is transmitted when the data transmission timing is detected.
As a result, the data to be transmitted next is already stored in the transmission register when the data transmission timing is detected, and the data can be transmitted within the processing time required to switch the transmission switch from the transmission register to the data signal line. The delay in data transmission timing can be minimized.

また本発明は、前記データ送信タイミングは通信相手装置からのデータ送信要求情報受信時、自装置からの自律的なデータ送信要求発生時、および通信相手装置からのデータ到達の確認応答情報受信時のいずれかである、ように構成することもできる。
これにより、データを送信する条件として考えられる全ての場合を網羅した形でデータ送信のタイミング遅延を抑制でき、装置全体のデータ送信の高速化を図ることができる。
In the present invention, the data transmission timing is determined when the data transmission request information is received from the communication partner device, when the autonomous data transmission request is generated from the own device, and when the data arrival confirmation response information is received from the communication partner device. It can also be configured to be either.
Thereby, the timing delay of data transmission can be suppressed in a form that covers all cases considered as conditions for transmitting data, and the data transmission speed of the entire apparatus can be increased.

本発明はさらに、I2Cシリアルインターフェースの通信プロトコルに準拠してデータ送信およびデータ到達の確認応答を行う、ように構成することができる。
これによれば、I2Cシリアルインターフェースの通信プロトコルに準拠した形で、様々の装置間の接続に汎用的に対応しながらデータ送信の高速化を図ることができる。
The present invention can be further configured to perform data transmission and confirmation of data arrival in accordance with the communication protocol of the I2C serial interface.
According to this, in accordance with the communication protocol of the I2C serial interface, it is possible to increase the speed of data transmission while generally supporting connection between various devices.

(発明の効果)
装置間でデータの確認応答を取りながらデータを伝送する際に、次に送信すべきデータを送信タイミング検出前に予めデータ記憶部から読み出して送信レジスタに格納しておくことにより、送信タイミング検出時点では送信レジスタに格納されているデータを直ちにデータ信号線へ出力することができ、データ伝送の高速化を図ることができる。
(The invention's effect)
When transmitting data while receiving data acknowledgment between devices, the data to be transmitted next is read from the data storage unit in advance and stored in the transmission register before detecting the transmission timing, so that the transmission timing detection point In this case, the data stored in the transmission register can be immediately output to the data signal line, and the data transmission speed can be increased.

本発明のデータ送信制御装置の構成Configuration of data transmission control device of the present invention 本発明のデータ送信制御の動作フロー(1)Operation flow (1) of data transmission control of the present invention 本発明のデータ送信制御の動作フロー(2)Operation flow (2) of data transmission control of the present invention 本発明のデータ送信制御の信号タイミング概要Outline of signal timing of data transmission control of the present invention データ伝送のための装置間の接続概念Connection concept between devices for data transmission データ伝送のための装置間の信号接続概念Signal connection concept between devices for data transmission データ送受信シーケンス(1)Data transmission / reception sequence (1) データ送受信シーケンス(2)Data transmission / reception sequence (2) データ伝送時の信号タイミング(1)Signal timing during data transmission (1) データ伝送情報の信号タイミング(2)Signal timing of data transmission information (2) 従来技術のデータ送信制御の信号タイミング概要Overview of signal timing for conventional data transmission control 従来技術のデータ送信制御装置の構成Configuration of prior art data transmission control device 従来技術のデータ送信制御の動作フロー(1)Operation flow of conventional data transmission control (1) 従来技術のデータ送信制御の動作フロー(2)Operation flow of conventional data transmission control (2)

(実施例)
図1は本発明のデータ送信制御装置の構成で、ここでは前記図5の接続概念で示したスレーブ装置100が本発明のデータ送信制御装置として構成されている場合の例を示している。
本発明のデータ送信制御装置では、まずデータ読み出し部103はデータ記憶部110内に格納されているデータ列111からデータを読み出して送信レジスタ104に格納し、その旨を受信データ解析部102に通知する。
一方、マスター装置500よりデータ信号線SDA800を介して送信されてくる情報はバッファ181を経由して受信レジスタ101に入力され、受信データ解析部102は受信レジスタ101に格納されているデータを読み込んでクロックストレッチを設定した後その内容を解析し、それがマスター装置からのデータ送信要求情報の場合は確認応答情報(アクノリッジ)を返信した後クロックストレッチを解除する。クロックストレッチの設定および解除はクロック信号線SCL700のオープンドレイン回路170を駆動することにより行う。
その後送信スイッチ105をONにし、送信レジスタに格納されているデータをオープンドレイン回路180に出力してデータ信号線SDA800にシリアル信号として送信すると同時に、データ読み出し部103を起動してデータ記憶部110からの次のデータの読み出し処理を開始する。
一方、受信データ解析部102は上記で起動したデータ読み出し部103の次のデータ読み出し処理と並行してマスター装置からの確認応答情報(アクノリッジ)の受信を待ち合わせ、確認応答情報を受信した時点でデータ読み出し部103からの次のデータ読み出し完了の通知がきていれば送信スイッチ105をONにして送信レジスタに格納されているデータをマスター装置へ送信する。この時点では、次のデータ読み出し処理は先行して実施されているため、通常は送信レジスタ104には既に次に送信すべきデータが格納されており、送信スイッチ105をONにする処理のみで直ちに送信レジスタに格納されているデータがマスター装置へ送信される。ここで、確認応答情報を受信したか否かの判定処理の間は実際はクロックストレッチを設定する場合があるが、メモリからのデータ読み出し時間に比べると無視できる時間であるため、本発明の本質には影響しない。
(Example)
FIG. 1 shows a configuration of a data transmission control device according to the present invention. Here, an example in which the slave device 100 shown in the connection concept of FIG. 5 is configured as a data transmission control device according to the present invention is shown.
In the data transmission control device of the present invention, first, the data reading unit 103 reads data from the data string 111 stored in the data storage unit 110, stores the data in the transmission register 104, and notifies the reception data analysis unit 102 to that effect. To do.
On the other hand, information transmitted from the master device 500 via the data signal line SDA800 is input to the reception register 101 via the buffer 181, and the reception data analysis unit 102 reads the data stored in the reception register 101. After setting the clock stretch, the contents thereof are analyzed, and if it is data transmission request information from the master device, the acknowledgment response information (acknowledge) is returned and then the clock stretch is canceled. The setting and cancellation of the clock stretch is performed by driving the open drain circuit 170 of the clock signal line SCL700.
After that, the transmission switch 105 is turned on, and the data stored in the transmission register is output to the open drain circuit 180 and transmitted as a serial signal to the data signal line SDA800. At the same time, the data reading unit 103 is activated and the data storage unit 110 The next data reading process is started.
On the other hand, the reception data analysis unit 102 waits for the receipt of confirmation response information (acknowledge) from the master device in parallel with the next data read processing of the data read unit 103 activated above, and the data is received when the confirmation response information is received. If the notification of the completion of the next data read from the read unit 103 is received, the transmission switch 105 is turned on to transmit the data stored in the transmission register to the master device. At this time, since the next data reading process is performed in advance, normally, the data to be transmitted next is already stored in the transmission register 104, and immediately after only the process of turning ON the transmission switch 105, Data stored in the transmission register is transmitted to the master device. Here, during the process of determining whether or not the acknowledgment information has been received, a clock stretch may actually be set. However, since this time is negligible compared to the data reading time from the memory, the essence of the present invention. Has no effect.

また、受信データ解析部102はデータ読み出し部103の次のデータ読み出し処理と並行動作するのではなく、データ読み出し部103からの次のデータの読み出し完了通知を待ち合わせ、読み出し完了通知を認知した時点でマスター装置からの確認応答情報(アクノリッジ)の受信を待ち合わせるように構成してもよい。この場合でも、通常は確認応答情報(アクノリッジ)の受信タイミングの方がデータ記憶部からのデータ読み出し完了タイミングより遅くなるため、同様にデータの送信タイミングを速めることができる。
上記の処理手順を、マスター装置からのデータ送信の終了を示す送信終了情報(ノンアクノリッジ)を受信するまで繰り返して、データ送信シーケンスを終結する。
このようにして、従来技術のようにデータ記憶部110からデータを読み出した後にそのデータを送信するのではなく、通信相手装置からの応答確認情報の受信待ちの間に並行して次に送信するデータをデータ記憶部110から読み出して準備しておくために、データ読み出し時間の分だけデータ送信タイミングが速くなり、データ送信の高速化を図ることができる。
上記の実施例は、スレーブ装置側に本発明のデータ送信制御の構成を組み込んだ場合で説明したが、これをマスター装置に組み込んでマスター装置からスレーブ装置へデータ送信した場合も同様に構成することができ、データの送信相手であるスレーブ装置からの確認応答情報の受信待ちの間に次の送信データを送信レジスタに格納しておくことにより、データ記憶部からのデータ読み出し時間分の処理スピードを向上させることができる。
In addition, the reception data analysis unit 102 does not operate in parallel with the next data reading process of the data reading unit 103, but waits for a read completion notification of the next data from the data reading unit 103 and recognizes the read completion notification. You may comprise so that reception of the confirmation response information (acknowledgement) from a master apparatus may be waited. Even in this case, the reception timing of the confirmation response information (acknowledgement) is usually later than the data reading completion timing from the data storage unit, so that the data transmission timing can be similarly accelerated.
The above processing procedure is repeated until the transmission end information (non-acknowledgement) indicating the end of data transmission from the master device is received, and the data transmission sequence is terminated.
In this way, instead of transmitting the data after reading the data from the data storage unit 110 as in the prior art, the data is transmitted next in parallel while waiting for reception of the response confirmation information from the communication partner device. Since data is read from the data storage unit 110 and prepared, the data transmission timing is accelerated by the data read time, and the data transmission speed can be increased.
The above embodiment has been described in the case where the configuration of the data transmission control of the present invention is incorporated on the slave device side. However, the same configuration is also adopted when the data is transmitted from the master device to the slave device by incorporating it in the master device. By storing the next transmission data in the transmission register while waiting for reception of the acknowledgment information from the slave device that is the data transmission partner, the processing speed for the data read time from the data storage unit can be increased. Can be improved.

図2は本発明のデータ送信制御の動作フロー(1)で、マスター装置500からデータ送信要求情報を受信した際のスレーブ装置100のデータ送信制御の処理手順を示している。
本発明の送信制御装置で構成されているスレーブ装置100は、まずデータ記憶部110から最初に送信すべきデータを予め読み出して送信レジスタ104に格納しておく(ステップS101)。
次に、マスター装置500から最初の1バイトを受信した時点で(ステップS102)クロックストレッチを設定してクロック信号線SCL700を”Low”に保持した後(ステップS103)、受信した1バイト目に格納されているスレーブアドレス情報とR/Wビットの内容を解析し、スレーブアドレスが自装置に割り当てられているアドレスと一致し、R/Wビットの値が”1”でスレーブ装置からマスター装置へのデータ送信要求であると判定した場合は(ステップS104)、確認応答情報(アクノリッジ)をマスター装置500へ送信した後(ステップS105)、クロックストレッチを解除し(ステップS106)、送信スイッチ105をON(接続)状態に切り替えて送信レジスタのデータをマスター装置へ送信する(ステップ107)。ここで、データ記憶部110内の送信データ列111の先頭領域アドレスについては、本動作フローには記述されていないが、前記図8のデータ伝送シーケンス(2)で示したシーケンスSM05においてマスター装置500からスレーブ装置100に予め通知される。
次にデータ記憶部110内のデータ列111より次のデータを読み出して送信レジスタ104に格納した後(ステップS108)、マスター装置500からの確認応答情報(アクノリッジ)または送信終了情報(ノンアクノリッジ)の受信を待ち合わせ(ステップS109)、受信した情報がノンアクノリッジかアクノリッジかを判定し(ステップS110)、ノンアクノリッジの場合は(YES)処理を終了し、そうでなくアクノリッジの場合は(NO)、送信レジスタ104に格納されているデータを送信スイッチ105を切り替えて送信し(ステップS111)、上記のステップS108へ戻る。上記のステップS110の処理では、受信したデータが確認応答情報(アクノリッジ)か否かを判定する処理の間クロックストレッチを設定する場合があるが、メモリからのデータ読み出し時間に比較すると無視できるため、本発明の本質には影響しない。
このように、時間を要するメモリからのデータ読み出し処理の間ではクロックストレッチが設定されないためデータ送信タイミングの遅延が最小限に抑えられ、データ送信の高速化を図ることができる。
FIG. 2 shows an operation flow (1) of data transmission control according to the present invention, and shows a processing procedure of data transmission control of the slave device 100 when data transmission request information is received from the master device 500.
The slave device 100 configured by the transmission control device of the present invention first reads data to be transmitted first from the data storage unit 110 and stores it in the transmission register 104 (step S101).
Next, when the first byte is received from the master device 500 (step S102), the clock stretch is set and the clock signal line SCL700 is held "Low" (step S103), and then stored in the received first byte. The slave address information and the contents of the R / W bit are analyzed, the slave address matches the address assigned to the own device, the value of the R / W bit is “1”, and the slave device to the master device If it is determined that the request is a data transmission request (step S104), the acknowledgment information (acknowledge) is transmitted to the master device 500 (step S105), the clock stretch is canceled (step S106), and the transmission switch 105 is turned on ( Switch to the (connection) state and transmit the data in the transmission register to the master device (step 107). Here, although the start area address of the transmission data string 111 in the data storage unit 110 is not described in this operation flow, the master device 500 in the sequence SM05 shown in the data transmission sequence (2) of FIG. To the slave device 100 in advance.
Next, after the next data is read from the data string 111 in the data storage unit 110 and stored in the transmission register 104 (step S108), confirmation response information (acknowledge) or transmission end information (non-acknowledge) from the master device 500 is stored. Waits for reception (step S109), determines whether the received information is non-acknowledged or acknowledged (step S110), terminates the process if it is non-acknowledged (YES), and transmits if it is not acknowledged (NO) and transmits The data stored in the register 104 is transmitted by switching the transmission switch 105 (step S111), and the process returns to step S108. In the process of step S110 described above, a clock stretch may be set during the process of determining whether the received data is confirmation response information (acknowledgement), but it can be ignored compared to the data read time from the memory. It does not affect the essence of the present invention.
As described above, since the clock stretch is not set during the data reading process from the time-consuming memory, the delay of the data transmission timing can be minimized and the data transmission can be speeded up.

図3は本発明のデータ送信制御の動作フロー(2)で、本発明のデータ送信制御装置により構成されたマスター装置500が自律的にスレーブ装置100に対してデータを送信する場合のデータ送信制御の処理手順を示している。
マスター装置500は、自装置のデータ記憶部から送信データを読み出した後そのデータを送信レジスタへ格納する(ステップS121)。そして、送信レジスタに格納されているデータを送信スイッチを切り替えて送信した後(ステップS122)、データ記憶部から次に送信すべきデータを読み出して送信レジスタへ格納し(ステップS123)、直前にスレーブ装置100へ送信したデータに対するスレーブ装置100からの確認応答情報(アクノリッジ)の受信を待ち合わせ、確認応答情報を受信したら(ステップS124)直前に送信したデータが最終データか否かを判定し(ステップS125)、最終データでない場合は(NO)上記のステップS122に戻り、最終の場合は(YES)処理を終了する。このようにして、送信レジスタに格納されているデータを送信スイッチを切り替えるだけの処理で行い、時間を要するデータ記憶部からのデータ読み出し処理を、直前に送信したデータにたいする通信相手装置からの確認応答情報(アクノリッジ)の返送に要する時間帯の間に行うため、確認応答情報を受信した時点では通常は既に送信レジスタに次に送信すべきデータが格納された状態になっており、最小限の処理時間で次のデータを送信することができる。
FIG. 3 is an operation flow (2) of the data transmission control of the present invention. Data transmission control when the master apparatus 500 configured by the data transmission control apparatus of the present invention autonomously transmits data to the slave apparatus 100. The processing procedure of is shown.
The master device 500 reads the transmission data from the data storage unit of its own device, and then stores the data in the transmission register (step S121). After the data stored in the transmission register is transmitted by switching the transmission switch (step S122), the data to be transmitted next is read from the data storage unit and stored in the transmission register (step S123), and the slave is immediately before. Waiting for the receipt of acknowledgment information (acknowledge) from the slave device 100 for the data sent to the device 100, and receiving the acknowledgment information (step S124), it is determined whether the data sent immediately before is the final data (step S125). ), If it is not final data (NO), return to the above step S122, and if it is final (YES), the process is terminated. In this way, the data stored in the transmission register is processed by simply switching the transmission switch, and the data read processing from the data storage unit that takes time is performed as a confirmation response from the communication partner device for the data transmitted immediately before. Since it is performed during the time period required for returning information (acknowledgement), the data to be transmitted next is normally already stored in the transmission register when the acknowledgment information is received. The next data can be transmitted in time.

図4は本発明のデータ送信制御の信号タイミング概要で、I2Cインターフェースにより、本発明のデータ送信制御装置として構成されているスレーブ装置100がマスター装置500からデータ送信要求を受信時点から、最初の送信データであるデータ1をマスター装置500へ送信開始するまでの信号タイミング関係を概念的に示している。
スレーブ装置100は、マスター装置500により生成されたスタート条件Sを検出後(タイミングT101)、マスター装置500から送信されてくる7ビットのスレーブアドレス情報を受信し(タイミングT102)、引き続いて送信されてくるR/Wビットを受信した時点でクロックストレッチを設定して、受信した最初の1バイトに含まれるスレーブアドレス情報とR/Wビット情報を解析し、スレーブアドレスが自装置のアドレスと一致しかつR/Wビットの値が”1”であることから、スレーブ装置100に対するデータ送信要求であると判定する (タイミングT103) 。その後スレーブ装置100は確認応答情報(アクノリッジ)Aを送信してクロックストレッチを解除した後(タイミングT104)、送信レジスタ104に格納されているデータを送信開始する(タイミングT105)。このように、本発明の構成では、上記のタイミングT103とT104の間に従来技術では必要だったデータ記憶部110からのデータ読み出し処理時間が不要となり、クロックストレッチ状態の継続時間が最小限に抑制され、高速にデータ送信を行うことができる。
FIG. 4 is an outline of signal timing for data transmission control according to the present invention. The slave device 100 configured as the data transmission control device according to the present invention receives the data transmission request from the master device 500 through the I2C interface. The signal timing relationship until data 1 as data is started to be transmitted to the master device 500 is conceptually shown.
After detecting the start condition S generated by the master device 500 (timing T101), the slave device 100 receives the 7-bit slave address information transmitted from the master device 500 (timing T102), and is subsequently transmitted. Set the clock stretch when the incoming R / W bit is received, analyze the slave address information and R / W bit information contained in the first received byte, and the slave address matches the address of the device Since the value of the R / W bit is “1”, it is determined that the request is a data transmission request to the slave device 100 (timing T103). Thereafter, the slave device 100 transmits confirmation response information (acknowledge) A to cancel the clock stretch (timing T104), and then starts transmitting the data stored in the transmission register 104 (timing T105). As described above, in the configuration of the present invention, the time for reading data from the data storage unit 110, which was necessary in the prior art between the timings T103 and T104, is unnecessary, and the duration time of the clock stretch state is minimized. Therefore, data transmission can be performed at high speed.

以上実施例においては、装置間の通信インターフェースとしてI2Cインターフェースを用いた場合を代表例として説明したが、他の通信インターフェースを用いた場合でも本発明は同様に適用できる。
また、本発明は実施例の構成の中のマスター装置、スレーブ装置のいずれにも適用できるだけでなく、データの到達の確認応答を行いながらデータ通信する任意の装置に対しても同様に適用できる。
In the above embodiments, the case where the I2C interface is used as a communication interface between apparatuses has been described as a representative example. However, the present invention can be similarly applied even when other communication interfaces are used.
Further, the present invention can be applied not only to the master device and the slave device in the configuration of the embodiment, but also to any device that performs data communication while confirming the arrival of data.

符号の説明Explanation of symbols

100,200,900 スレーブ装置
101 受信レジスタ
102 受信データ解析部
103 データ読み出し部
104 送信レジスタ
105 送信スイッチ
110,910 データ記憶部
111,911 データ列
170,180,570,580,970,980 オープンドレイン回路
171,181,571,581,971,981 バッファ
500 マスター装置
600 電源電圧
700 クロック信号線SCL
701 クロック信号SCL
760,860 プルアップ抵抗(Rp)
800 データ信号線SDA
801 データ信号SDA
810 スレーブ装置側の時間軸
850 マスター装置側の時間軸
100,200,900 slave device
101 Receive register
102 Received data analysis unit
103 Data reading part
104 Transmit register
105 Transmit switch
110,910 Data storage
111,911 data strings
170,180,570,580,970,980 Open drain circuit
171,181,571,581,971,981 buffer
500 master device
600 Supply voltage
700 Clock signal line SCL
701 Clock signal SCL
760,860 Pull-up resistor (Rp)
800 Data signal line SDA
801 Data signal SDA
810 Slave device time axis
850 Master device time axis

Claims (6)

データ記憶部に格納されているデータ列から所定の順序でデータを読み出し、通信相手装置からのデータ到達の確認応答を取りながらデータの送信を制御する方法において、
前記通信相手装置からクロック信号線により送信されるクロック信号を受信し、
予め前記データ記憶部から送信するデータを読み出して送信レジスタへ格納し、
前記通信相手装置から情報を受信したとき、前記クロック信号線を送信停止状態に設定し、
前記通信相手装置から受信した前記情報がデータ送信要求情報であることを判定し、
前記クロック信号線の前記送信停止状態を解除し、
データ送信タイミング検出時に前記送信レジスタに格納されているデータを送信する、
ことを特徴とするデータ送信制御方法。
In a method of reading data in a predetermined order from a data string stored in a data storage unit and controlling transmission of data while taking a confirmation response of data arrival from a communication partner device,
Receiving a clock signal transmitted by a clock signal line from the communication partner device;
Read the data to be transmitted from the data storage unit in advance and store it in the transmission register,
When receiving information from the communication partner device, set the clock signal line to a transmission stop state,
Determining that the information received from the communication partner device is data transmission request information;
Cancel the transmission stop state of the clock signal line,
Transmitting data stored in the transmission register at the time of data transmission timing detection;
And a data transmission control method.
請求項1に記載のデータ送信制御方法において、
前記データ送信タイミングは、前記通信相手装置となるマスタ装置の制御に基づいてデータ送受信するスレーブ装置が前記マスタ装置から前記データ送信要求情報を受信した時、または、前記スレーブ装置が前記マスタ装置へ送信したデータに対するデータ到達の確認応答情報を前記マスタ装置から受信した時である、
ことを特徴とするデータ送信制御方法。
The data transmission control method according to claim 1,
Wherein the data transmission timing, the transmission when the slave device for data transmission and reception based on the control of the communication partner apparatus to become the master device receives the data transmission request information from the master device or the slave device to the master device The data arrival confirmation response information for the received data is received from the master device,
And a data transmission control method.
請求項1に記載のデータ送信制御方法において、
I2Cシリアルインターフェースの通信プロトコルに準拠してデータ送信およびデータ到達の確認応答を行う、
ことを特徴とするデータ送信制御方法。
The data transmission control method according to claim 1,
In accordance with the communication protocol of the I2C serial interface, send data and confirm the arrival of data,
And a data transmission control method.
送信するデータ列を格納するデータ記憶部と、
通信相手装置からクロック信号線により送信されるクロック信号を受信する手段と、
前記通信相手装置との間でデータ到達の確認応答を取りながらデータを送信する手段、
予め前記データ記憶部から送信するデータを読み出す手段と、
前記読み出したデータを格納する送信レジスタと、
前記通信相手装置から情報を受信したとき、前記クロック信号線を送信停止状態に設定して、受信した前記情報がデータ送信要求情報であることを判定してから、前記クロック信号線の前記送信停止状態を解除する手段と、
データ送信タイミング検出時に前記送信レジスタに格納されているデータを送信する手段を備える、
ことを特徴とするデータ送信制御装置。
A data storage unit for storing a data string to be transmitted;
Means for receiving a clock signal transmitted by a clock signal line from a communication partner device;
It means for transmitting data while taking the acknowledgment data arrival with the communication partner apparatus,
Means for reading data to be transmitted from the data storage unit in advance;
A transmission register for storing the read data;
When receiving information from the communication partner device, the clock signal line is set to a transmission stop state, and it is determined that the received information is data transmission request information, and then the transmission of the clock signal line is stopped. Means for releasing the state;
Means for transmitting data stored in the transmission register when detecting data transmission timing;
A data transmission control device.
請求項に記載のデータ送信制御装置において、
前記データ送信制御装置は前記通信相手装置となるマスタ装置の制御に基づいてデータ送受信を行い、前記データ送信タイミングは、前記マスタ装置から前記データ送信要求情報を受信した時、または、前記マスタ装置へ送信したデータに関するデータ到達の確認応答情報を前記マスタ装置から受信した時である、
ことを特徴とするデータ送信制御装置。
In the data transmission control device according to claim 4 ,
Wherein the data transmission control unit performs data transmission and reception based on the control of the master device to be the communication partner device, wherein the data transmission timing, when receiving the data transmission request information from the master device, or to the master device When the data arrival confirmation response information regarding the transmitted data is received from the master device,
A data transmission control device.
請求項に記載のデータ送信制御装置において、
I2Cシリアルインターフェースの通信プロトコルに準拠してデータ送信およびデータ到達の確認応答を行う、
ことを特徴とするデータ送信制御装置。
In the data transmission control device according to claim 4 ,
In accordance with the communication protocol of the I2C serial interface, send data and confirm the arrival of data,
A data transmission control device.
JP2007504604A 2005-02-25 2005-02-25 Data transmission control method and data transmission control device Expired - Fee Related JP4801658B2 (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2005/003204 WO2006090473A1 (en) 2005-02-25 2005-02-25 Data transmission control method and data transmission control apparatus

Publications (2)

Publication Number Publication Date
JPWO2006090473A1 JPWO2006090473A1 (en) 2008-07-24
JP4801658B2 true JP4801658B2 (en) 2011-10-26

Family

ID=36927124

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007504604A Expired - Fee Related JP4801658B2 (en) 2005-02-25 2005-02-25 Data transmission control method and data transmission control device

Country Status (2)

Country Link
JP (1) JP4801658B2 (en)
WO (1) WO2006090473A1 (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4918866B2 (en) * 2006-03-13 2012-04-18 ミツミ電機株式会社 COMMUNICATION DEVICE, SEMICONDUCTOR INTEGRATED CIRCUIT DEVICE, AND COMMUNICATION SYSTEM
JP2009244991A (en) * 2008-03-28 2009-10-22 Fujitsu Ten Ltd Data communication method, data communication system, electronic control unit, and circuit board
US9588931B2 (en) * 2012-02-15 2017-03-07 Lattice Semiconductor Corporation Communication bridging between devices via multiple bridge elements
JP6178060B2 (en) 2012-09-26 2017-08-09 日本電産サンキョー株式会社 Information processing apparatus and data communication method
JP2016063359A (en) 2014-09-17 2016-04-25 株式会社東芝 Bus interface circuit
CN113055289B (en) 2016-07-01 2023-12-08 华为技术有限公司 Message forwarding method, device and system based on service function chain SFC
JP7207013B2 (en) 2019-02-27 2023-01-18 住友電気工業株式会社 Optical transceiver control method and optical transceiver
US11687475B1 (en) 2021-12-22 2023-06-27 Himax Technologies Limited Large touch display integrated circuit and operation method thereof

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001168939A (en) * 1999-12-06 2001-06-22 Nippon Avionics Co Ltd Data transmission system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06120986A (en) * 1992-10-02 1994-04-28 Hitachi Ltd Buffer management system
JP2003345732A (en) * 2002-05-27 2003-12-05 Matsushita Electric Ind Co Ltd Serial communication device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001168939A (en) * 1999-12-06 2001-06-22 Nippon Avionics Co Ltd Data transmission system

Also Published As

Publication number Publication date
JPWO2006090473A1 (en) 2008-07-24
WO2006090473A1 (en) 2006-08-31

Similar Documents

Publication Publication Date Title
JP4801658B2 (en) Data transmission control method and data transmission control device
JP4773742B2 (en) 2-wire interface between chips
US9544258B2 (en) Network, head subscriber and data transmission method
JP4420009B2 (en) Asynchronous serial communication method and asynchronous serial communication device
JP2019507926A (en) Bus bridge for converting requests between module bus and AXI bus
CN114286992A (en) Daisy chain complex commands
US20160224488A1 (en) Bidirectional communication method between a master terminal and a slave terminal on a single transmission line
EP2846470A1 (en) A method of mobile terminal internal communications
JP6197447B2 (en) Optical transceiver
WO2010103987A1 (en) Data transmission system and data read method thereof
JP2016111672A (en) Communication method, communication system, and communication device
US8989203B2 (en) Electronic device, communication control method, and recording medium
KR100855968B1 (en) Method for compensating propagation delay of tri-state bidirectional bus and semiconductor device using the same
US20170091601A1 (en) Control device, image forming apparatus, and control method
JP2011119999A (en) Communication apparatus and master device
JP2010166309A (en) Optical data link
JP5334173B2 (en) Data transfer system and retry control method
JP2007156935A (en) Data input/output system, slave equipment, and signal processing method thereof
US20160139860A1 (en) Communication system, image forming apparatus and communication method
US6925111B2 (en) Data communication method and communication control apparatus
JP2012094081A (en) Bus arbitration circuit and bus arbitration method
JP6163941B2 (en) Control device and image forming apparatus
JP2012203474A (en) Memory card
JP3434787B2 (en) HDLC frame conversion circuit
JP6440475B2 (en) Parallel communication device and parallel communication method

Legal Events

Date Code Title Description
A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100118

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110215

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110413

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

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

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

Free format text: PAYMENT UNTIL: 20140812

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees