JP2011010178A - Communication apparatus - Google Patents
Communication apparatus Download PDFInfo
- Publication number
- JP2011010178A JP2011010178A JP2009153557A JP2009153557A JP2011010178A JP 2011010178 A JP2011010178 A JP 2011010178A JP 2009153557 A JP2009153557 A JP 2009153557A JP 2009153557 A JP2009153557 A JP 2009153557A JP 2011010178 A JP2011010178 A JP 2011010178A
- Authority
- JP
- Japan
- Prior art keywords
- data
- signal
- register
- input delay
- sio
- 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.)
- Withdrawn
Links
Images
Landscapes
- Synchronisation In Digital Transmission Systems (AREA)
Abstract
Description
本発明は、シリアルでデータ通信を行なう技術に関し、特に、受信時におけるシリアルデータの入力遅延を計測して、データ転送レートを下げずにデータ通信を行なうことが可能な通信装置に関する。 The present invention relates to a technique for serial data communication, and more particularly to a communication apparatus capable of measuring data input delay at the time of reception and performing data communication without reducing a data transfer rate.
近年、パーソナルコンピュータなどの情報処理装置の高機能化、多機能化が進んでおり、様々な機能ブロックが搭載されるようになってきている。そのような機能ブロックの1つとして、クロック同期式シリアルI/O(Input/Output)を挙げることができる。下記の非特許文献1は、クロック同期式シリアルI/Oの1つであるシリアルGPIO(SGPIO)について規定している。
In recent years, information processing apparatuses such as personal computers have become highly functional and multifunctional, and various functional blocks have been installed. As one of such functional blocks, a clock synchronous serial I / O (Input / Output) can be cited. The following
このようなクロック同期式シリアルI/Oにおいては、接続されるデバイスや、コネクタ、ケーブルなどの形態によって、受信時にシリアルデータ入力遅延(レイテンシ)が発生する。そのため、入力遅延が大きくなると、シリアルデータ転送速度を遅くして接続しなければならなくなる。これに関連する技術として、下記の特許文献1〜3に開示された発明がある。
In such a clock synchronous serial I / O, a serial data input delay (latency) occurs at the time of reception depending on the form of the connected device, connector, cable, and the like. Therefore, if the input delay becomes large, the serial data transfer rate must be slowed down for connection. As technologies related to this, there are inventions disclosed in the following
特許文献1は、受信データ遅延に対してデータ転送レートを落とすことなくデータ通信を実現した半導体集積回路装置およびシステムの提供を目的とする。クロック生成回路により基本クロック信号を分周して伝送クロック信号を生成して外部デバイスに向けて出力し、入力端子に上記出力端子を通して外部デバイスに伝えられた伝送クロック信号に対応して上記外部デバイスからの送信データが入力される。かかる入力端子における受信データを取り込む入力回路として、上記基本クロックのエッジと上記伝送クロックを計数するカウンタ回路のカウンタ出力との組合せにより特定されるタイミング信号を用いる。
特許文献2は、動作環境の変動に係らず、高周波数の駆動クロック信号によって同期式DRAMからデータを読み出すことができる情報処理装置の提供を目的とする。入力されたクロックに同期させて、1クロック期間ごとにデータを出力する記憶部と、記憶部にクロックを入力し、データを受け取る制御部とを備える。制御部から出力され記憶部に入力される直前の駆動クロックを引き戻し、データを取り込むクロック信号として用いる。これにより、記憶部からのデータと、それを取り込むためのクロックのディレイとの差を小さく抑える。
特許文献3は、テスト装置のピン間スキューによる制限を受けることなく、高い精度でタイミングずれを除去することができるタイミング調整回路の提供を目的とする。タイミング調整回路に、データ入力回路のレプリカ回路を設ける。レプリカ回路は、初段回路とラッチ回路とを含む。初段回路は、外部クロック信号を受け参照クロック信号を出力する。クロックドライバ64からの内部クロック信号に同期して、参照クロック信号をラッチし、外部出力端子へ位相進み遅れ信号として出力する。
上述のように、受信時のシリアルデータ入力遅延を考慮してデータ転送速度を調整しなければならない。この場合、従来では、受信データ入力遅延時間の計測および調整は、製品設計段階において入力遅延のシミュレーションを行なうか、または製品評価段階においてオシロスコープなどの計測機器を用いて計測を行ない、そのシミュレーション結果または計測結果に基づいてシリアルクロック(SCLK)の周波数を変更することにより行なわれていた。 As described above, the data transfer rate must be adjusted in consideration of the serial data input delay during reception. In this case, conventionally, the received data input delay time is measured and adjusted by simulating the input delay in the product design stage or by using a measurement device such as an oscilloscope in the product evaluation stage. This is done by changing the frequency of the serial clock (SCLK) based on the measurement result.
しかしながら、製造ばらつきや、InitiatorとTargetとの間の接続形態の変化などにより、製品出荷後に実際の入力遅延時間が想定した値よりも大きくなった場合には対応ができない。そのため、通信エラーが発生して製品として正常に動作しなくなったり、最悪の場合には市場クレームに発展したりするといった問題があった。 However, if the actual input delay time becomes larger than the expected value after product shipment due to manufacturing variations or a change in the connection form between the initiator and the target, it cannot be dealt with. For this reason, there has been a problem that a communication error occurs and the product does not operate normally, or in the worst case, it develops into a market complaint.
また、シリアルデータを正常にラッチするためには、SCLK周期におけるサイクル時間を遅延時間よりも大きくする必要があり、SCLKの周波数を下げざるを得なくなる。これによって、データ転送レートが低下するといった問題もあった。 Further, in order to latch serial data normally, the cycle time in the SCLK cycle needs to be longer than the delay time, and the frequency of SCLK must be lowered. As a result, there is a problem that the data transfer rate is lowered.
また、現在、クロック同期シリアル通信は様々な製品に搭載されており、製品によってはLED(Light Emitted Device)表示や、液晶ディスプレイ表示用基板のインタフェースにクロック同期シリアル通信が採用されていることもある。そのため、製品毎に接続する基板が変更されたり、オプション基板として追加されたりすることが想定される。 At present, clock synchronous serial communication is mounted on various products, and depending on the product, clock synchronous serial communication may be adopted for the interface of LED (Light Emitted Device) display and liquid crystal display display board. . Therefore, it is assumed that the board to be connected for each product is changed or added as an optional board.
この場合、製品のメイン基板にInitiatorがあり、メイン基板に接続される基板にTargetがあるといった形態になる。このような製品形態においては、エンドユーザがオプション基板を購入して接続することになるため、遅延時間の再調整が必要になる可能性があるといった問題があった。 In this case, an initiator is provided on the main board of the product, and a target is provided on the board connected to the main board. In such a product form, since the end user purchases and connects the option board, there is a problem that the delay time may need to be readjusted.
さらには、メイン基板に接続される基板の故障についても、インタフェース信号の断線などによるTargetの通信異常しか検出することができず、上述のようなシリアルデータ入力遅延の増大によるデータ転送信号の品質悪化を検出することができない。 Furthermore, even for a failure of the board connected to the main board, only the communication abnormality of the target due to the disconnection of the interface signal or the like can be detected, and the quality of the data transfer signal deteriorates due to the increase in the serial data input delay as described above. Cannot be detected.
本発明は、上記問題点を解決するためになされたものであり、その目的は、シリアルデータの入力遅延を計測して、データ転送レートを下げずにデータ通信を行なうことが可能な通信装置を提供することである。 The present invention has been made in order to solve the above-described problems, and an object of the present invention is to provide a communication apparatus capable of measuring serial data input delay and performing data communication without lowering the data transfer rate. Is to provide.
本発明の一実施例によれば、クロックに同期してシリアルデータを送受信するイニシエータとターゲットとを含んだ通信装置が提供される。イニシエータは、ターゲットに対してシリアルデータの入力遅延検出モードであることを示すADJUST信号を出力するSIO制御部と、ターゲットから出力されるシリアルデータの入力遅延値を検出する入力遅延検出回路と、入力遅延検出回路によって検出された入力遅延値に基づいて、ターゲットから出力されるシリアルデータのラッチタイミングを調整する遅延調整回路とを含む。また、ターゲットは、SIO制御部からシリアルデータの入力遅延検出モードであることを示す信号を受けたときに、入力遅延値検出用のシリアルデータを出力するデータ出力回路を含む。 According to an embodiment of the present invention, a communication apparatus including an initiator and a target that transmit and receive serial data in synchronization with a clock is provided. The initiator outputs an ADJUST signal indicating that it is in a serial data input delay detection mode to the target, an input delay detection circuit that detects an input delay value of serial data output from the target, and an input A delay adjustment circuit for adjusting the latch timing of serial data output from the target based on the input delay value detected by the delay detection circuit. The target also includes a data output circuit that outputs serial data for detecting an input delay value when receiving a signal indicating that it is in the serial data input delay detection mode from the SIO control unit.
この実施例によれば、入力遅延検出回路がターゲットから出力されるシリアルデータの入力遅延値を検出し、遅延調整回路がターゲットから出力されるシリアルデータのラッチタイミングを調整するので、データ転送レートを下げずにデータ通信を行なうことが可能となる。 According to this embodiment, the input delay detection circuit detects the input delay value of the serial data output from the target, and the delay adjustment circuit adjusts the latch timing of the serial data output from the target. Data communication can be performed without lowering.
図1は、一般的な情報処理装置におけるクロック同期シリアルI/Oの接続例を説明するための図である。図1は、Initiator300と、Target400とが1:1で接続されている場合を示している。Initiator300から出力されるSLOAD信号、SCLK信号およびSDATA_OUT信号が、コネクタやケーブルを介してTarget400に入力される。同様に、Target400から出力されるSDATA_IN信号が、コネクタやケーブルを介してInitiator300に入力される。
FIG. 1 is a diagram for explaining a connection example of a clock synchronous serial I / O in a general information processing apparatus. FIG. 1 shows a case where the
図2は、Initiator300の内部構成を示すブロック図である。このInitiator300は、SIOブロック310と、CPU360とがCPUバス370を介して接続される。
FIG. 2 is a block diagram showing the internal configuration of the
SIOブロック310は、SIOデータ転送を制御するSIO制御部320と、シリアルクロックの周波数を切り替えるシリアルクロック制御部330と、データ送信を制御するデータ送信制御部340と、データ受信を制御するデータ受信制御部350とを含む。
The
また、SIO制御部320は、SIO制御レジスタ324、送信データレジスタ325、受信データレジスタ326などで構成されるレジスタ群322と、レジスタ群322をCPUバス370に接続するCPUバスI/F(Interface)323と、SIO制御レジスタ324に設定された内容に基づいてデータ送受信の開始を指示し、データ送受信の終了を検知するSIO送受信制御部321とを含む。
The
SIO制御レジスタ324は、SIOデータ転送ビット長を指定するdata_lenビットと、シリアルクロック周波数を設定するsclk_selビットと、データ転送の開始を指示するsio_en_regビットとを含む。なお、図示していないが、レジスタ群322には、データ転送が終了したことを示すレジスタも含まれる。
The
CPU360によってSIO制御レジスタ324のsclk_selビットにシリアルクロック周波数が設定されると、SIO送受信制御部321は、シリアルクロック制御部330に対してsclk_sel信号を出力する。
When the serial clock frequency is set in the sclk_sel bit of the SIO control register 324 by the
シリアルクロック制御部330は、SIO送受信制御部321からsclk_sel信号を受けると、システムクロックsysclkを分周して設定された周波数のシリアルクロックを生成し、sio_start信号がアサートされたときにSCLK信号としてTarget400に出力する。sio_start信号がネゲートされると、シリアルクロック制御部330は、SCLK信号に“H”レベルを出力する。また、シリアルクロック制御部330は、内部シリアルクロック信号としてデータ送信制御部340にtx_clk信号を出力し、データ受信制御部350にrx_clk信号を出力する。
When receiving the sclk_sel signal from the SIO transmission /
CPU360が送信データレジスタ325に送信データを設定すると、SIO送受信制御部321は、tx_data信号によってその送信データをデータ送信制御部340に出力する。そして、CPU360が、データ転送開始を示すsio_en_regに“1”を設定すると、SIO送受信制御部321は、データ送信制御部340に対してデータ送信開始を示すtx_start信号を出力する。
When the
データ送信制御部340は、CPU360がSIO制御レジスタ324に設定したデータ転送ビット長(data_len)および送信データ(tx_data)を保持している。そして、SIO送受信制御部321から出力されるtx_start信号が“H”レベルになるのを検出すると、tx_clk信号の立ち下がりエッジに同期して送信データ(tx_data)をLSBビットから順にSDATA_OUT信号としてTarget400に出力する。
The data
そして、データ送信制御部340は、データ転送ビット長分のデータの送信を終了すると、tx_end信号にsysclk信号の1クロック分の“H”レベルのパルスを出力して、SIO送受信制御部321にデータ送信の終了を通知する。
When the data
なお、CPU360は、SIO制御レジスタ324に値を設定することにより、LSBビットから順にデータを送信するか、MSBビットから順にデータを送信するかを切り替えることができる。
The
CPU360が、データ転送開始を示すsio_en_regに“1”を設定すると、SIO送受信制御部321は、データ受信制御部350に対してデータ受信開始を示すrx_start信号を出力する。
When the
データ受信制御部350は、CPU360がSIO制御レジスタ324に設定したデータ転送ビット長(data_len)を保持している。そして、SIO送受信制御部321から出力されるrx_start信号が“H”レベルになるのを検出すると、Target400から出力されるSDATA_IN信号をrx_clk信号の立ち上がりエッジに同期してラッチすることによりシリアルデータを受信する。このとき、データ受信制御部350は、LSBビットから順にシリアルデータを受信する。
The data
そして、データ受信制御部350は、データ転送ビット長分のシリアルデータをラッチすると、rx_end信号にsysclk信号の1クロック分の“H”レベルのパルスを出力し、ラッチしたシリアルデータをパラレルデータに変換してrx_data信号に出力する。SIO送受信制御部321は、rx_data信号によって受信データを受けると、受信データレジスタ326に受信データを設定する。これによって、CPU360が受信データレジスタ326から受信データを読み出すことができる。
When the data
なお、CPU360は、SIO制御レジスタ324に値を設定することにより、LSBビットから順にデータを受信するか、MSBビットから順にデータを受信するかを切り替えることができる。
The
図3は、図2に示すInitiator300の動作を説明するためのタイミングチャートである。図3においては、シリアルクロックSCLKの周波数がsysclkを2分周した周波数であり、データ転送ビット長が8ビットの場合を示している。図3においては、Initiator300がTarget400との間で、SDATA_OUTを介してのデータの送信と、SDATA_INを介しての別のデータの受信とを並列に行なう例を示している。当然のこととして、データの送信と別データの受信とは夫々単独に行なうことも可能である。
FIG. 3 is a timing chart for explaining the operation of the
まず、T1において、CPU360がSIO制御レジスタ324のsio_en_regビットに“1”を設定すると、データ転送が開始される。
First, at T1, when the
SIO送受信制御部321は、sio_en_regビットに“1”が設定されたのを検出すると、T2において、データ送信制御部340に対してsysclkの1クロック分の“H”レベルのパルスをtx_start信号に出力し、データ受信制御部350に対してsysclkの1クロック分の“H”レベルのパルスをrx_start信号に出力する。そして、SIO送受信制御部321は、Target400に対してSCLKの1クロック分の“L”レベルのパルスをSLOAD信号に出力する。
When detecting that the sio_en_reg bit is set to “1”, the SIO transmission /
T3において、SLOAD信号の立ち上がりと同時に、SIO送受信制御部321は、sio_start信号を“H”レベルにアサートして、シリアルクロック制御部330に対してSCLK信号の出力を指示する。このとき、SIO送受信制御部321は、sclk_sel信号によってSCLKの周波数としてsysclkを2分周した周波数とするよう指示する。
At T3, simultaneously with the rise of the SLOAD signal, the SIO transmission /
T4において、Target400に対するSCLK信号の出力が開始されると、データ送信制御部340は、tx_clk信号の立ち下がりに同期して、SCLKの立ち下がりのタイミングにSDATA_OUT信号によりシリアルデータをLSBから順に送信する。また、T5において、データ受信制御部350は、rx_clk信号の立ち上がりに同期して、SCLKの立ち上がりのタイミングにSDATA_IN信号によりシリアルデータをLSBから順に受信する。
When the output of the SCLK signal to the
T6において、8ビットのデータ送信が終了すると、データ送信制御部340は、SIO送受信制御部321に対してデータ送信完了を示すtx_end信号を“H”レベルにアサートする。また、8ビットのデータ受信が終了すると、データ受信制御部350は、SIO送受信制御部321に対してデータ受信完了を示すrx_end信号を“H”レベルにアサートする。
When the 8-bit data transmission ends at T6, the data
T7において、SIO送受信制御部321はtx_end信号とrx_end信号の両方が“H”レベルにアサートされたことに応じて、シリアルクロック制御部330に対してsio_start信号を“L”レベルにネゲートし、SCLKの出力を停止させる。T8において、シリアルクロック制御部330は、Target400に対してSLOAD信号に“L”レベルを出力し、8ビットのデータ受信が完了したことを通知する。
At T7, the SIO transmission /
なお、SIO送受信制御部321がsio_start信号をネゲートするまでに、CPU360が次のデータ転送開始を指示していれば、T8において、tx_start信号およびrx_start信号がアサートされ、T9以降において、SCLKの出力と次の8ビットのデータ転送が連続して行なわれる。
If the
図4は、SIOブロック310内のデータ受信制御部350およびTarget400の構成をさらに詳細に説明するためのブロック図である。データ受信制御部350は、データ受信の開始および終了を制御する受信制御シーケンサ351と、受信データのデータラッチタイミングのトリガ(data_en)信号を生成するデータラッチトリガ回路353と、データラッチトリガ回路353から出力されるdata_en信号によって受信データをラッチするデータラッチ回路354と、データラッチ回路354によってラッチされたシリアルデータ(sdata_in)をパラレルデータに変換して受信データバッファに格納するシリアル・パラレル変換回路352とを含む。
FIG. 4 is a block diagram for explaining the configuration of the data
また、受信制御シーケンサ351は、CPU360がSIO制御レジスタ324に設定した受信データビット長(data_len)を保持してカウントする受信データビットカウンタ355を有する。受信制御シーケンサ351は、SIO制御部320によってrx_start信号がアサートされると、データラッチトリガ回路353に対してrx_en信号をアサートし、受信データビットカウンタ355に受信データのビット数のカウントを開始させる。そして、受信データビットカウンタ355が受信データビット長だけ受信データをカウントしたときに、rx_en信号をネゲートする。
The
なお、以下においては、受信データビットカウンタ355がデクリメントカウンタによって構成される場合について説明するが、受信データのビット数をカウントできるものであれば、どのような構成であってもよい。 In the following, a case where the reception data bit counter 355 is configured by a decrement counter will be described, but any configuration may be used as long as the number of bits of reception data can be counted.
データラッチトリガ回路353は、受信制御シーケンサ351からのrx_en信号がアサートされると、データラッチ回路354がSDATA_IN信号のシリアルデータをラッチするタイミングを示すsdata_en信号を生成する。
When the rx_en signal from the
データラッチ回路354は、データラッチトリガ回路353から出力されるdata_en信号に同期してSDATA_IN信号のシリアルデータをラッチし、sdata_in信号としてシリアル・パラレル変換回路352に出力する。
The
シリアル・パラレル変換回路352は、データラッチ回路354から出力されるsdata_in信号およびデータラッチトリガ回路353から出力されるsdata_en信号を受け、sdata_en信号によってsdata_in信号に対して最大8ビットのビットシフトを行なってパラレルデータを生成し、そのパラレルデータを受信データバッファに格納する。
The serial /
図4において、SCLK(out)信号は、Initiator300の端子から出力されるSCLK信号であり、基板またはケーブルに接続される。SCLK(in)信号は、Target400の端子から入力され、Target400内の各回路に供給されるSCLK信号である。SDATA_IN信号は、Target400の端子から出力され、基板またはケーブルに接続されたInitiator300の端子から入力されて、データ受信制御部350に供給される信号である。
In FIG. 4, an SCLK (out) signal is an SCLK signal output from a terminal of the
Target400は、Initiator300に送信する送信データを生成し、SCLK(in)信号の立ち下がりエッジに同期してsdata_out信号として出力する送信データ回路410と、SCLK(in)信号の立ち上がりエッジに同期してシリアルデータをSDATA_INとして出力するデータ出力回路420とを含む。
The
図5は、図4に示すInitiator300のSIOブロック310およびTarget400において発生するシリアルデータの遅延時間を説明するためのタイミングチャートである。
FIG. 5 is a timing chart for explaining a delay time of serial data generated in the
T1において、SIO制御部320から出力されるrx_start信号がアサートされると、受信制御シーケンサ351は、データラッチトリガ回路353に対してrx_en信号をアサートする。このとき、受信データビットカウンタ355に、受信データビット長から1を差し引いた値“7”がロードされる。
When the rx_start signal output from the
T2において、データラッチトリガ回路353は、rx_en信号が“H”レベルであり、rx_clk信号が“L”レベルであることを検出し、data_en信号に“H”レベルのパルスを出力する。このとき、データラッチ回路354は、Target400からのSDATA_IN信号のシリアルデータをラッチし、sdata_in信号としてシリアル・パラレル変換回路352に出力する。
At T2, the data latch
T3において、データラッチトリガ回路353は、sdata_en信号に“H”レベルのパルスを出力して、シリアル・パラレル変換回路352に対してデータラッチ回路354からのsdata_in信号のラッチタイミングを指示する。このとき、受信データビットカウンタ355は、data_en信号の“H”レベルのパルスを検出して、ダウンカウントを行なう。
At
T4において、SCLK(out)信号が立ち上がる。このとき、rx_clk信号の立ち上がりに対して遅延時間(a)が発生する。また、T5において、SCLK(in)信号が立ち上がる。このとき、SCLK(out)信号の立ち上がりに対して遅延時間(b)が発生する。 At T4, the SCLK (out) signal rises. At this time, a delay time (a) occurs with respect to the rise of the rx_clk signal. At T5, the SCLK (in) signal rises. At this time, a delay time (b) occurs with respect to the rising edge of the SCLK (out) signal.
T6において、Target400内のデータ出力回路420がSCLK(in)信号の立ち上がりエッジに同期してSDATA_IN信号に次のシリアルデータ“#2”を出力する。このとき、SCLK(in)信号の立ち上がりに対して遅延時間(c)が発生する。
At T6, the
T7において、データラッチ回路354は、data_en信号の“H”レベルのパルスに応じてシリアルデータ“#2”をラッチする。このとき、SDATA_IN信号の変化点から、data_en信号が“H”レベルでありSCLK信号の立ち上がりエッジまでの時間がデータセットアップ時間(d)となる。また、受信データビットカウンタ355は、data_en信号の“H”レベルのパルスを検出して、ダウンカウントを行なう。以下、同様の処理が行われる。
At T7, the
受信データビットカウンタ355の値が“0”になると、T8において、受信制御シーケンサ351は、SIO制御部320に対してrx_end信号をアサートし、データ受信が完了したことをSIO制御部320に通知する。そして、rx_en信号に“L”レベルを出力し、データラッチトリガ回路353に対してデータ受信の終了を通知する。
When the value of the reception data bit counter 355 becomes “0”, the
図5に示すように、シリアルクロック制御部330によって生成されたSCLKは、Initiator300の端子から出力されるまでの遅延時間と、基板またはケーブルによる配線遅延時間とを加算した時間(a)だけ遅れて、SCLK(out)信号としてTarget400に入力される。
As shown in FIG. 5, the SCLK generated by the serial
また、Target400の端子に入力されるSCLK(out)信号は、時間(b)だけ遅れてSCLK(in)信号としてデータ出力回路420に入力される。さらに、時間(c)だけ遅れてデータ出力回路420からのSDATA_IN信号がデータラッチ回路354に入力される。
In addition, the SCLK (out) signal input to the terminal of the
Initiator300のデータラッチ回路354がSDATA_IN信号を正常にラッチするためには、data_en信号が“H”レベルであり、かつSCLK信号の立ち上がりの時間までにSDATA_IN信号が確定していること、すなわちデータセットアップ時間(d)が以下の条件を満たしていることが必要である。
In order for the
データセットアップ時間(d)=SCLK周期サイクル時間−((a)+(b)+(c))>0 …(1)
したがって、Initiator300のシリアルクロック制御部330から出力されたSCLK信号の立ち上がりから、SDATA_IN信号がInitiator300のデータラッチ回路354に入力されるまでの遅延時間(a)+(b)+(c)が大きくなり、SDATA_IN信号のデータセットアップ時間(d)を確保できない場合には、データラッチ回路354はデータを正常にラッチすることができない。
Data setup time (d) = SCLK period cycle time − ((a) + (b) + (c))> 0 (1)
Therefore, the delay time (a) + (b) + (c) from the rise of the SCLK signal output from the serial
(第1の実施の形態)
図6は、本発明の第1の実施の形態におけるクロック同期シリアルI/Oの接続例を説明するための図である。図6は、Initiator1と、Target2とが1:1で接続されている場合を示している。Initiator1から出力されるADJUST信号、SLOAD信号、SCLK信号およびSDATA_OUT信号が、コネクタやケーブルを介してTarget2に入力される。同様に、Target2から出力されるSDATA_IN信号が、コネクタやケーブルを介してInitiator1に入力される。
(First embodiment)
FIG. 6 is a diagram for explaining a connection example of the clock synchronous serial I / O in the first embodiment of the present invention. FIG. 6 shows a case where the
図7は、本発明の第1の実施の形態におけるInitiator1の内部構成を示すブロック図である。このInitiator1は、SIOブロック10と、CPU60とがCPUバス70を介して接続される。
FIG. 7 is a block diagram showing an internal configuration of the
SIOブロック10は、SIOデータ転送を制御するSIO制御部20と、シリアルクロックの周波数を切り替えるシリアルクロック制御部30と、データ送信を制御するデータ送信制御部40と、データ受信を制御するデータ受信制御部50とを含む。
The
また、SIO制御部20は、SIO制御レジスタ24、input_delayレジスタ25、adj_delayレジスタ26、latch_cycレジスタ27などで構成されるレジスタ群22と、レジスタ群22をCPUバス70に接続するCPUバスI/F23と、SIO制御レジスタ24に設定された内容に基づいてデータ送受信の開始を指示し、データ送受信の終了を検知するSIO送受信制御部21とを含む。
The
SIO制御レジスタ24は、SIOデータ転送ビット長を指定するdata_lenビット、シリアルクロック周波数を設定するsclk_selビット、データ転送の開始を指示するsio_en_regビット以外に、受信データの入力遅延を検出するためのモードを設定するadjust_regビットを含む。 The SIO control register 24 has a mode for detecting an input delay of received data, in addition to the data_len bit for specifying the SIO data transfer bit length, the sclk_sel bit for setting the serial clock frequency, and the sio_en_reg bit for instructing the start of data transfer. Contains the adjust_reg bit to set.
input_delayレジスタ25は、受信データの入力遅延値として後述するサンプルクロックsmpclkのクロック数が設定されるレジスタであり、CPU60から読出し可能である。
The
adj_delayレジスタ26は、受信データのデータラッチタイミングの調整値としてsmpclkのクロック数を設定するためのレジスタであり、CPU60によって設定可能である。
The
latch_cycレジスタ27は、受信データのデータラッチタイミングの周期としてsmpclkのクロック数を設定するためのレジスタであり、CPU60によって設定可能である。
The
CPU60によってSIO制御レジスタ24のsclk_selビットにシリアルクロック周波数が設定されると、SIO送受信制御部21は、シリアルクロック制御部30に対してsclk_sel信号を出力する。また、CPU60によってSIO制御レジスタ24のadjust_regビットに“1”が設定されると、SIO受信制御部21は、Target2に対して受信データ入力遅延検出モードであることを示すADJUST信号を出力する。
When the serial clock frequency is set in the sclk_sel bit of the SIO control register 24 by the
シリアルクロック制御部30は、SIO送受信制御部21からsclk_sel信号を受けると、smpclkを分周して設定された周波数のシリアルクロックを生成し、sio_start信号がアサートされたときにSCLK信号としてTarget2に出力する。sio_start信号がネゲートされると、シリアルクロック制御部30は、SCLK信号に“H”レベルを出力する。また、シリアルクロック制御部30は、内部シリアルクロック信号としてデータ送信制御部40にtx_clk信号を出力し、データ受信制御部50にrx_clk信号を出力する。
When receiving the sclk_sel signal from the SIO transmission /
CPU60が送信データレジスタに送信データを設定すると、SIO送受信制御部21は、tx_data信号によってその送信データをデータ送信制御部40に出力する。そして、CPU60が、データ転送開始を示すsio_en_regに“1”を設定すると、SIO送受信制御部21は、データ送信制御部40に対してデータ送信開始を示すtx_start信号を出力する。
When the
データ送信制御部40は、CPU60がSIO制御レジスタ24に設定したデータ転送ビット長(data_len)および送信データ(tx_data)を保持している。そして、SIO送受信制御部21から出力されるtx_start信号が“H”レベルになるのを検出すると、tx_clk信号の立ち下がりエッジに同期して送信データ(tx_data)をLSBビットから順にSDATA_OUT信号としてTarget2に出力する。
The data
そして、データ送信制御部40は、データ転送ビット長分のデータの送信を終了すると、tx_end信号にsmpclk信号の1クロック分の“H”レベルのパルスを出力して、SIO送受信制御部21にデータ送信の終了を通知する。
When the data
CPU60が、データ転送開始を示すsio_en_regに“1”を設定すると、SIO送受信制御部21は、データ受信制御部50に対してデータ受信開始を示すrx_start信号を出力する。
When the
データ受信制御部50は、CPU60がSIO制御レジスタ24に設定したデータ転送ビット長(data_len)を保持している。そして、SIO送受信制御部21から出力されるrx_start信号が“H”レベルになるのを検出すると、Target2から出力されるSDATA_IN信号をrx_clk信号の立ち上がりエッジに同期してラッチすることによりシリアルデータを受信する。
The data
このとき、データ受信制御部50は、SDATA_IN信号の入力遅延を検出し、その入力遅延値をinput_delay信号としてSIO制御部20に出力する。SIO制御部20は、入力遅延値をinput_delayレジスタ25に格納する。
At this time, the data
また、データ受信制御部50は、SIO制御部20のadj_delayレジスタ26およびlatch_cycレジスタ27に設定された値に応じて、SDATA_IN信号のシリアルデータのラッチタイミングを調整する。
Further, the data
そして、データ受信制御部50は、データ転送ビット長分のシリアルデータをラッチすると、rx_end信号にsmpclk信号の1クロック分の“H”レベルのパルスを出力し、ラッチしたシリアルデータをパラレルデータに変換してrx_data信号として出力する。SIO送受信制御部21は、rx_data信号によって受信データを受けると、受信データレジスタに受信データを設定する。これによって、CPU60が受信データレジスタから受信データを読み出すことができる。
When the data
図8は、本発明の第1の実施の形態におけるInitiator1の動作を説明するためのタイミングチャートである。図8においては、シリアルクロックSCLKの周波数の4倍の周波数を有するsmpclkが用いられ、データ転送ビット長が8ビットの場合を示している。図8においても、図3と同様に、Initiator300がTarget400との間で、SDATA_OUTを介してのデータの送信と、SDATA_INを介しての別のデータの受信とを並列に行なう例を示しており、データの送信と別データの受信とは夫々単独に行なうことも可能である。
FIG. 8 is a timing chart for explaining the operation of the
まず、T1において、CPU60がSIO制御レジスタ24のsio_en_regビットおよびadjust_regビットに“1”を設定すると、SIO送受信制御部21はデータ転送を開始する。
First, when the
SIO送受信制御部21は、sio_en_regビットおよびadjust_regビットに“1”が設定されたのを検出すると、T2において、Target2に対して受信データ入力遅延検出モードであることを示すADJUST信号に“H”レベルを出力すると共に、データ送信制御部40に対してsmpclkの1クロック分の“H”レベルのパルスをtx_start信号に出力し、データ受信制御部50に対してsmpclkの1クロック分の“H”レベルのパルスをrx_start信号に出力する。そして、SIO送受信制御部21は、Target2に対してSCLKの1クロック分の“L”レベルのパルスをSLOAD信号に出力する。
When the SIO transmission /
Target2は、ADJUST信号が“H”レベルになり受信データ入力遅延検出モードであることを検知すると、Initiator1に対してSDATA_IN信号に“0”、“1”を交互に繰り返すシリアルデータのパターンを出力する。
When
T3において、SLOAD信号の立ち上がりと同時に、SIO送受信制御部21は、sio_start信号を“H”レベルにアサートして、シリアルクロック制御部30に対してSCLK信号の出力を指示する。このとき、SIO送受信制御部21は、sclk_sel信号によってSCLKの周波数としてsmpclkを4分周した周波数とするよう指示する。
At T3, simultaneously with the rise of the SLOAD signal, the SIO transmission /
T4において、Target2に対するSCLK信号の出力が開始されると、データ送信制御部40は、tx_clk信号の立ち下がりに同期して、SCLKの立ち下がりのタイミングにSDATA_OUT信号によりシリアルデータをLSBから順に送信する。また、T5において、データ受信制御部50は、rx_clk信号の立ち上がりに同期して、SCLKの立ち上がりのタイミングにSDATA_IN信号によりシリアルデータをLSBから順に受信する。
When the output of the SCLK signal to
T6において、8ビットのデータ送信が終了すると、データ送信制御部40は、SIO送受信制御部21に対してデータ送信完了を示すtx_end信号を“H”レベルにアサートする。また、8ビットのデータ受信が終了すると、データ受信制御部50は、SIO送受信制御部21に対してデータ受信完了を示すrx_end信号を“H”レベルにアサートする。
When the 8-bit data transmission ends at T6, the data
T7において、SIO送受信制御部21はtx_end信号とrx_end信号の両方が“H”レベルにアサートされたことに応じて、シリアルクロック制御部30に対してsio_start信号を“L”レベルにネゲートし、SCLKの出力を停止させる。T8において、シリアルクロック制御部30は、Target2に対してSLOAD信号に“L”レベルを出力し、8ビットのデータ受信が完了したことを通知する。
At T7, the SIO transmission /
なお、SIO送受信制御部21がsio_start信号をネゲートするまでに、CPU60が次のデータ転送開始を指示していれば、T8において、tx_start信号およびrx_start信号がアサートされ、T9以降において、SCLKの出力と次の8ビットのデータ転送が連続して行なわれる。
If the
図9は、本発明の第1の実施の形態におけるSIOブロック10内のデータ受信制御部50およびTarget2の構成をさらに詳細に説明するためのブロック図である。データ受信制御部50は、データ受信の開始および終了を制御する受信制御シーケンサ51と、受信データのデータラッチタイミングのトリガ(data_en)信号を生成するデータラッチトリガ回路52と、受信データの入力遅延を検出する入力遅延検出回路53と、データラッチトリガ回路52から出力されるdata_en信号によって受信データをラッチするデータラッチ回路54と、データラッチ回路54によってラッチされたシリアルデータ(sdata_in)をパラレルデータに変換して受信データバッファに格納するシリアル・パラレル変換回路55とを含む。
FIG. 9 is a block diagram for explaining in further detail the configuration of the data
また、受信制御シーケンサ51は、CPU60がSIO制御レジスタ24に設定した受信データビット長(data_len)を保持してカウントする受信データビットカウンタ56を有する。受信制御シーケンサ51は、SIO制御部20によってrx_start信号がアサートされると、データラッチトリガ回路52に対してrx_en信号をアサートし、受信データビットカウンタ56に受信データのビット数のカウントを開始させる。そして、受信データビットカウンタ56が受信データビット長だけ受信データをカウントしたときに、rx_en信号をネゲートする。
The
データラッチトリガ回路52は、受信制御シーケンサ51からのrx_en信号がアサートされると、データラッチ回路54がSDATA_IN信号のシリアルデータをラッチするタイミングを示すdata_en信号を生成する。また、データラッチトリガ回路52は、遅延調整回路57を有しており、SIO制御部20のadj_delayレジスタ26に設定された値およびlatch_cycレジスタ27に設定された値に応じてdata_en信号およびsdata_en信号の出力タイミングを調整する。この遅延調整回路57の詳細については後述する。
When the rx_en signal from the
データラッチ回路54は、データラッチトリガ回路52から出力されるdata_en信号に同期して入力遅延検出回路53から出力されるSDATA_IN_F2信号のシリアルデータをラッチし、sdata_in信号としてシリアル・パラレル変換回路55に出力する。
The
シリアル・パラレル変換回路55は、データラッチ回路54から出力されるsdata_in信号およびデータラッチトリガ回路52から出力されるsdata_en信号を受け、sdata_en信号によってsdata_in信号に対して最大8ビットのビットシフトを行なってパラレルデータを生成し、そのパラレルデータを受信データバッファに格納する。
The serial /
また、Target2内の送信データ回路201は、ADJUST信号が“H”レベルになるのを検知し、SLOAD信号がアサートされると、sdata_out信号に“0”、“1”を交互に繰り返すシリアルデータのパターンを出力する。
Further, the
また、データ出力回路202は、SCLK(in)信号の立ち上がりエッジに同期して送信データ回路201から受けたシリアルデータをSDATA_IN信号としてInitiator1に出力する。
The
図10は、図9に示す入力遅延検出回路53の内部構成を示すブロック図である。この入力遅延検出回路53は、smpclkに同期して動作するものであり、遅延時間計測回路61と、データ不一致検出回路62と、フリップフロップFF1(63)およびFF2(64)とを含む。
FIG. 10 is a block diagram showing an internal configuration of the input
また、遅延時間計測回路61は、計測制御シーケンサ65と、遅延時間計測カウンタ(SCLK_D1)66とを含む。
The delay
計測制御シーケンサ65は、ADJUST信号が“H”レベルとなって受信データ入力遅延検出モードであることを確認し、SIO制御部20からのSLOAD信号がアサートされると、check_start信号をアサートしてデータ不一致検出回路62にデータ不一致の検出開始を指示する。
The
そして、計測制御シーケンサ65は、シリアルクロック制御部30からのrx_clk信号の立ち上がりエッジを検出すると、遅延時間計測カウンタ66に対してカウント開始を指示する。
When the
計測制御シーケンサ65は、データ不一致検出回路62からデータ不一致を検出したことを示すno_match信号を受けると、遅延時間計測カウンタ66にカウントの停止を指示し、check_start信号をネゲートしてデータ不一致検出回路62にデータ不一致の検出終了を指示する。
When the
遅延時間計測カウンタ66は、計測制御シーケンサ65からの指示に応じてカウンタの初期化(“0”クリア)を行なう。そして、計測制御シーケンサ65からカウント開始の指示を受けると、smpclk信号に同期してカウントアップを開始する。そして、計測制御シーケンサ65からカウント停止の指示を受けると、カウントアップを停止してSIO送受信制御部21に対してinput_delay信号によりカウント値を出力する。
The delay
SIO送受信制御部21は、遅延時間計測カウンタ66から出力されたカウント値をinput_delayレジスタ25に格納する。
The SIO transmission /
FF1(63)は、SDATA_IN信号をsmpclk信号の立ち上がりでサンプリングし、SDATA_IN_F信号としてデータ不一致検出回路62およびFF2(64)に出力する。
The FF1 (63) samples the SDATA_IN signal at the rising edge of the smpclk signal, and outputs it to the data
FF2(64)は、FF1(63)から出力されたSDATA_IN_F信号をsmpclk信号の立ち上がりでサンプリングし、SDATA_IN_F2信号としてデータ不一致検出回路62およびデータラッチ回路54に出力する。
The FF2 (64) samples the SDATA_IN_F signal output from the FF1 (63) at the rising edge of the smpclk signal, and outputs it to the data
なお、FF1(63)およびFF2(64)は、SDATA_INのデータ入力経路としても使用されるため、ADJUST信号のレベルに関係なく動作する。 Since FF1 (63) and FF2 (64) are also used as a data input path of SDATA_IN, they operate regardless of the level of the ADJUST signal.
データ不一致検出回路62は、SDATA_IN_F信号とSDATA_IN_F2信号とを比較してデータの一致/不一致を検出し、データが不一致の場合に遅延時間計測回路61に対してno_match信号を出力する。なお、SDATA_IN_F信号とSDATA_IN_F2信号とのデータ不一致は、SDATA_INの1ビット目と2ビット目のビット変化の遅延、すなわちSDATA_INの入力遅延となる。
The data
図11は、図10に示す入力遅延検出回路53の入力遅延検出動作を説明するためのタイミングチャートである。T1において、計測制御シーケンサ65は、データ転送開始時にSIO制御部20から出力されるSLOAD信号が“L”レベルになるのを検出すると、ADJUST信号の“H”レベルによって受信データ入力遅延検出モードであることを確認し、受信データの入力遅延検出動作を開始する。
FIG. 11 is a timing chart for explaining the input delay detection operation of the input
T2において、計測制御シーケンサ65は、check_start信号をアサートし、データ不一致検出回路62に対してデータ不一致の検出開始を指示すると共に、遅延時間計測カウンタ66に対してカウンタの初期化を指示する。T3において、遅延時間計測カウンタ66は、カウント値を“0”に初期化する。
At T2, the
T4およびT5において、計測制御シーケンサ65は、rx_clk信号が“L”レベルから“H”レベルに変化するのを検出すると、遅延時間計測カウンタ66にカウント動作を開始させる。
At T4 and T5, when the
T6において、SDATA_IN_F信号およびSDATA_IN_F2信号が共に“L”レベルであるため、データ不一致検出回路62はデータ一致と判定する。T7において、SDATA_IN_F信号が“H”レベルに変化すると、データ不一致検出回路62はデータ不一致と判定する。
At T6, since the SDATA_IN_F signal and the SDATA_IN_F2 signal are both at the “L” level, the data
T8において、データ不一致検出回路62は、no_match信号をアサートして計測制御シーケンサ65に対してデータ不一致検出を通知する。このとき、計測制御シーケンサ65は、遅延時間計測カウンタ66に対してカウント停止を指示する。
At T8, the data
T9において、計測制御シーケンサ65は、check_start信号をネゲートして、データ不一致検出回路62にデータ不一致の検出終了を指示する。なお、遅延時間計測カウンタ66のカウント値は、input_delay信号によってSIO制御部20に通知される。
At T9, the
図12は、図10に示す計測制御シーケンサ65の処理手順を説明するためのフローチャートである。まず、計測制御シーケンサ65は、SIO制御部20から出力されるADJUST信号が“1”であり、かつSLOAD信号が“0”であるか否かを判定する(S11)。ADJUST信号が“0”であるか、SLOAD信号が“1”であれば(S11,No)、ステップS11の処理を繰り返す。
FIG. 12 is a flowchart for explaining the processing procedure of the
ADJUST信号が“1”であり、かつSLOAD信号が“0”であれば(S11,Yes)、check_start信号を“1”にし、遅延時間計測カウンタ66を“0”に初期化する(S12)。
If the ADJUST signal is “1” and the SLOAD signal is “0” (S11, Yes), the check_start signal is set to “1” and the delay
次に、計測制御シーケンサ65は、シリアルクロック制御部30から出力されるrx_clk信号が“0”であるか否かを判定する(S13)。rx_clk信号が“1”であれば(S13,No)、ステップS13の処理を繰り返す。また、rx_clk信号が“0”であれば(S13,Yes)、rx_clk信号が“1”になるまで待機する(S14)。
Next, the
rx_clk信号が“1”になると(S14,Yes)、遅延時間計測カウンタ66に対してカウント開始を指示する(S15)。そして、データ不一致検出回路62から出力されるno_match信号が“1”であるか否かを判定する(S16)。
When the rx_clk signal becomes “1” (S14, Yes), the delay
計測制御シーケンサ65は、no_match信号が“1”であれば(S16,Yes)、遅延時間計測カウンタ66に対してカウント停止を指示し、データ不一致検出回路62に対してcheck_start信号に“0”を出力する(S17)。そして、ステップS11に戻って、以降の処理を繰り返す。
If the no_match signal is “1” (S16, Yes), the
図13は、図9に示すデータラッチトリガ回路52をさらに詳細に説明するためのブロック図である。データラッチトリガ回路52は、smpclkに同期して動作するものであり、データラッチトリガ制御シーケンサ71と、遅延調整回路57とを含む。また、遅延調整回路57は、data_en調整カウンタ(DATA_DLY)72と、data_en周期カウンタ(LATCH_CNT)73とを含む。なお、データラッチトリガ回路52は、受信データ入力遅延検出モードであるか否かに関係なく、常に動作する。
FIG. 13 is a block diagram for explaining the data latch
データラッチトリガ制御シーケンサ71は、SLOAD信号が“L”レベルから“H”レベルになる直前にSIO制御部20から出力されるadj_trg信号を受け、遅延調整を開始する。このとき、データラッチトリガ制御シーケンサ71は、遅延調整回路57に対してdly_start信号を出力して、data_en信号の遅延調整を開始させる。
The data latch
データラッチトリガ制御シーケンサ71は、遅延調整回路57から遅延調整が完了したことを示すdly_match信号を受けると、遅延調整回路57に対してcyc_start信号を出力して、data_en信号の周期を計測させる。遅延調整回路57は、所定の周期を計測したときに、データラッチトリガ制御シーケンサ71に対してcyc_match信号を出力する。
When the data latch
データラッチトリガ制御シーケンサ71は、遅延調整回路57から出力されるdly_match信号およびcyc_match信号に同期して、data_en信号を出力し、smpclkの1クロック後にsdata_en信号を出力する。
The data latch
data_en調整カウンタ72は、データラッチトリガ制御シーケンサ71から出力されるdly_start信号がアサートされると、“0”からカウントを開始する。そして、カウント値がadj_delayレジスタ26に設定される値と一致すると、data_en調整カウンタ72はカウントを停止して、dly_match信号をデータラッチトリガ制御シーケンサ71に出力する。
When the dly_start signal output from the data latch
data_en周期カウンタ73は、データラッチトリガ制御シーケンサ71から出力されるcyc_start信号がアサートされると、“0”からカウントを開始する。そして、カウント値がlatch_cycレジスタ27に設定される値と一致すると、data_en周期カウンタ73はカウントを停止して、cyc_match信号をデータラッチトリガ制御シーケンサ71に出力する。
When the cyc_start signal output from the data latch
CPU60は、受信データ入力遅延検出モードで得られた入力遅延値をadj_delayレジスタ26に設定することにより、シリアルデータの1ビット目のdata_en信号の出力タイミングを調整する。
The
また、CPU60は、SCLKの1周期がsmpclkの何クロックに相当するかをlatch_cycレジスタ27に設定することにより、シリアルデータの2ビット目以降のdata_en信号の出力タイミングを調整する。
Further, the
この遅延調整アルゴリズムは、Target2から出力されるSDATA_IN信号の入力遅延がSCLK信号の立ち上がりエッジに対して常に一定であり、1ビット目の入力遅延を調整すれば、2ビット目以降はSCLK周期でビット変化が発生することを前提としている。
In this delay adjustment algorithm, the input delay of the SDATA_IN signal output from
図14は、図13に示すデータラッチトリガ回路52の動作を説明するためのタイミングチャートである。図14においては、data_en信号の遅延調整値としてadj_delayレジスタ26に“3”が設定され、data_en信号の周期としてlatch_cycレジスタ27にsmpslkのクロック数である“4”から1を差し引いた“3”が設定される場合を示している。
FIG. 14 is a timing chart for explaining the operation of data latch
まず、データラッチトリガ回路52は、受信制御シーケンサ51から出力されるrx_en信号が“H”レベルになるのを検出して、data_en信号の遅延調整を開始する。
First, the data latch
T1において、SIO制御部20からのadj_trg信号に“H”レベルのパルスが出力されると、データラッチトリガ制御シーケンサ71は、dly_start信号に“H”レベルのパルスを出力して、data_en調整カウンタ72にカウントを開始させる。
When the “H” level pulse is output to the adj_trg signal from the
T2およびT3において、data_en調整カウンタ72は、smpclk信号の立ち上がりに同期してカウントアップを行なう。T4において、data_en調整カウンタ72は、カウント値とadj_dly信号の値とが一致するので、データラッチトリガ制御シーケンサ71に対してdly_match信号をアサートすると共に、カウント動作を停止する。
At T2 and T3, the data_en adjustment counter 72 counts up in synchronization with the rising edge of the smpclk signal. At T4, the data_en adjustment counter 72 asserts the dly_match signal to the data latch
データラッチトリガ制御シーケンサ71は、data_en調整カウンタ72からdly_match信号を受けると、T5において、data_en信号にシリアルデータの1ビット目に対応する“H”レベルのパルスを出力すると共に、cyc_start信号に“H”レベルのパルスを出力して、data_en周期カウンタ73にカウントを開始させる。このとき、data_en調整カウンタ72は、カウントを停止してカウント値を“0”クリアする。
When receiving the dly_match signal from the
T6において、データラッチトリガ制御シーケンサ71は、シリアル・パラレル変換回路55に対してsdata_en信号に“H”レベルのパルスを出力する。T6およびT7において、data_en周期カウンタ73は、smpclk信号の立ち上がりに同期してカウントアップを行なう。
At
T8において、data_en周期カウンタ73は、カウント値とlatch_cyc信号の値とが一致するので、データラッチトリガ制御シーケンサ71に対してcyc_match信号をアサートすると共に、カウント値を“0”クリアする。
At T8, the data_en cycle counter 73 asserts the cyc_match signal to the data latch
データラッチトリガ制御シーケンサ71は、data_en周期カウンタ73からcyc_match信号を受けると、T9において、data_en信号にシリアルデータの2ビット目に対応する“H”レベルのパルスを出力する。
When receiving the cyc_match signal from the
T10以降において、データラッチトリガ制御シーケンサ71は同様の動作を繰り返し、data_en信号に3ビット目以降のシリアルデータに対応する“H”レベルのパルスを出力する。
After T10, the data latch
T15において、受信制御シーケンサ51が、rx_end信号に“H”レベルを出力して、SIO制御部20にデータ受信の終了を通知する。そして、T16において、受信制御シーケンサ51がrx_en信号に“L”レベルを出力して、データラッチトリガ回路52にデータ受信の終了を通知する。このとき、data_en周期カウンタ73は、カウントを停止してカウント値を“0”クリアする。
At T15, the
図15は、図13に示すデータラッチトリガ回路52の処理手順を説明するためのフローチャートである。まず、データラッチトリガ制御シーケンサ71は、受信制御シーケンサ51から出力されるrx_en信号が“1”であるか否かを判定する(S21)。rx_en信号が“0”であれば(S21,No)、ステップS21の処理を繰り返す。
FIG. 15 is a flowchart for explaining the processing procedure of the data latch
rx_en信号が“1”であれば(S21,Yes)、データラッチトリガ制御シーケンサ71は、SIO制御部20から出力されるadj_trg信号が“1”であるか否かを判定する(S22)。
If the rx_en signal is “1” (S21, Yes), the data latch
adj_trg信号が“0”であれば(S22,No)、ステップS22の処理を繰り返す。また、adj_trg信号が“1”であれば(S22,Yes)、dly_start信号に“H”レベルのパルスを出力して、data_en調整カウンタ72に対してカウント開始を指示する(S23)。 If the adj_trg signal is “0” (S22, No), the process of step S22 is repeated. If the adj_trg signal is “1” (S22, Yes), an “H” level pulse is output to the dly_start signal to instruct the data_en adjustment counter 72 to start counting (S23).
data_en調整カウンタ72は、カウントを行ない(S24)、カウント値がadj_delayの値と一致するか否かを判定する(S25)。カウント値がadj_delayの値と一致しなければ(S25,No)、ステップS24に戻ってカウントアップを繰り返す。
The
また、カウント値とadj_delayの値とが一致すれば(S25,Yes)、data_en調整カウンタ72は、データラッチトリガ制御シーケンサ71に対してdly_match信号に“H”レベルのパルスを出力する(S26)。
If the count value matches the value of adj_delay (S25, Yes), the
データラッチトリガ制御シーケンサ71は、data_en調整カウンタ72からdly_match信号を受けると、data_en調整カウンタ72に対してカウントを停止させ、カウント値を“0”クリアさせる。そして、data_en信号に1回目の“H”レベルのパルスを出力し、smpclkの1クロック後にsdata_en信号に“H”レベルのパルスを出力する。そして、cyc_start信号に“H”レベルのパルスを出力して、data_en周期カウンタ73に対してカウント開始を指示する(S27)。
When the data latch
data_en周期カウンタ73は、カウントを行ない(S28)、カウント値がlatch_cycの値と一致するか否かを判定する(S29)。カウント値がlatch_cycの値と一致しなければ(S29,No)、ステップS28に戻ってカウントアップを繰り返す。 The data_en cycle counter 73 counts (S28), and determines whether the count value matches the value of latch_cyc (S29). If the count value does not match the value of latch_cyc (S29, No), the process returns to step S28 and repeats counting up.
また、カウント値とlatch_cycの値とが一致すれば(S29,Yes)、data_en周期カウンタ73は、データラッチトリガ制御シーケンサ71に対してcyc_match信号に“H”レベルのパルスを出力する。そして、data_en信号に“H”レベルのパルスを出力し、smpclkの1クロック後にsdata_en信号に“H”レベルのパルスを出力する(S30)。
If the count value matches the value of latch_cyc (S29, Yes), the
次に、データラッチトリガ制御シーケンサ71は、受信制御シーケンサ51から出力されるrx_en信号が“0”であるか否かを判定する(S31)。rx_en信号が“1”であれば(S31,No)、ステップS28に戻って以降の処理を繰り返す。また、rx_en信号が“0”であれば(S31,Yes)、data_en周期カウンタ73に対してカウントを停止させ、カウント値を“0”クリアさせ(S32)、ステップS21に戻って以降の処理を繰り返す。
Next, the data latch
以上説明したように、本実施の形態におけるInitiator1によれば、CPU60が、SIO制御部20に設けられたSIO制御レジスタ24のadjust_regビットに“1”を設定することによりADJUST信号に“H”レベルが出力され、Initiator1およびTarget2を受信データ入力遅延検出モードに移行させるようにした。これによって、任意のタイミングで、CPU60がシリアルデータの入力遅延を検出でき、入力遅延値に応じてシリアルデータのラッチタイミングを調整することが可能となった。
As described above, according to the
また、入力遅延検出回路53は、ADJUST信号が“H”レベルになるのを検出して、シリアルデータの入力遅延を検出し、その入力遅延値をSIO制御部20内のinput_delayレジスタ25に設定するようにした。これによって、CPU60は、シリアルデータの入力遅延値を容易に把握することが可能となった。したがって、受信データ入力遅延検出処理を実現するプログラムを製品に実装しておけば、製品出荷後においても任意のタイミングで受信データ入力遅延を検出することができる。
Further, the input
また、SIO制御部20に、CPU60が値を設定することができるadj_delayレジスタ26およびlatch_cycレジスタ27を設け、遅延調整回路57がこれらのレジスタの値に応じてシリアルデータのラッチタイミングを調整するようにした。これによって、シリアルデータの入力遅延値に応じてラッチタイミングを調整することができ、データ転送速度を下げずにシリアルデータを確実にラッチすることが可能となった。したがって、この入力遅延調整処理を実現するプログラムを製品に実装しておけば、製品出荷後においても任意のタイミングでシリアルデータのラッチタイミングを調整することができる。
Further, the
(第2の実施の形態)
第1の実施の形態において、製品出荷後であってもInitiatorとTargetとの間のシリアルデータの入力遅延調整が可能となることを説明した。しかしながら、エンドユーザが接続ケーブルを変更したり、Targetの特性を変更したりして、入力遅延が著しく大きくなる場合には、SIO通信エラーやデータ転送性能の悪化に至る場合も考えられる。本発明の第2の実施の形態においては、出力I/Oバッファの性能を高めることでSIO通信エラーやデータ転送性能の悪化を防止するものである。
(Second Embodiment)
In the first embodiment, it has been described that the serial data input delay adjustment between the initiator and the target is possible even after the product is shipped. However, when the end user changes the connection cable or changes the characteristics of the target and the input delay becomes remarkably large, the SIO communication error or the data transfer performance may be deteriorated. In the second embodiment of the present invention, the SIO communication error and the deterioration of the data transfer performance are prevented by improving the performance of the output I / O buffer.
図16は、本発明の第2の実施の形態におけるInitiatorのSIOブロックの詳細を説明するための図である。なお、このSIOブロック10’が、CPUバス70を介してCPU60と接続される点においては、図7に示すInitiator1の構成と同様である。また、図7および図9に示す第1の実施の形態におけるSIOブロック10と同様の構成および機能を有する部分については、同じ参照番号を付すものとする。
FIG. 16 is a diagram for explaining details of the SIO block of the initiator according to the second embodiment of this invention. The
SIOブロック10’は、SIO制御部81と、データ送信制御部40と、シリアルクロック制御部30と、データ受信制御部84と、4mAのドライブ能力を有する4mAIOセルブロック85−1〜85−4と、8mAのドライブ能力を有する8mAIOセルブロック86−1〜86−4とを含む。
The
SIO制御部81は、SIO制御レジスタ101と、SDATA_IN信号が変化しない一定時間を設定するためのdrv_dataレジスタ102と、SDATA_IN信号が一定時間変化しない場合に設定されるdrv_intレジスタ103とを含む。
The
SIO制御レジスタ101は、SIOデータ転送ビット長を指定するdata_lenビット、シリアルクロック周波数を設定するsclk_selビット、データ転送の開始を指示するsio_en_regビット、受信データの入力遅延を検出するためのモードを設定するadjust_regビット以外に、4mAIO85−1〜85−4および8mAIO86−1〜86−4のいずれを選択するかを指定する4ma_oe_regビットおよび8ma_oe_regビットを含む。 The SIO control register 101 sets a data_len bit for specifying the SIO data transfer bit length, a sclk_sel bit for setting the serial clock frequency, a sio_en_reg bit for instructing the start of data transfer, and a mode for detecting an input delay of received data. In addition to the adjust_reg bit, 4ma_oe_reg bit and 8ma_oe_reg bit for designating which of 4 mAIO 85-1 to 85-4 and 8 mAIO 86-1 to 86-4 are selected are included.
CPU60が4ma_oe_regビットに“1”を設定したときに、SIO制御部81から出力される4MA_OE信号によって4mAIO85−1〜85−4が選択され、それぞれSDATA_OUT信号、SCLK信号、ADJUST信号およびSLOAD信号を駆動する。
When the
また、CPU60が8ma_oe_regビットに“1”を設定したときに、SIO制御部81から出力される8MA_OE信号によって8mAIO86−1〜86−4が選択され、それぞれSDATA_OUT信号、SCLK信号、ADJUST信号およびSLOAD信号を駆動する。
Further, when the
データ受信制御部84は、受信制御シーケンサ51と、データラッチトリガ回路52と、データラッチ回路54と、シリアル・パラレル変換回路55と、入力遅延検出回路91とを含む。
The data
入力遅延検出回路91は、受信データの入力遅延を検出するときに、想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないか否かを検出する。このSDATA_IN信号が変化しない一定時間が、CPU60によってdrv_dataレジスタ102に設定され、入力遅延検出回路91にdrv_data信号として与えられる。
When detecting the input delay of the received data, the input
また、入力遅延検出回路91は、想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないこと、すなわち、入力遅延の計測値がdrv_dataとして設定された値と等しいことを検出したときに、drv_int信号によってSIO制御部81に通知する。SIO制御部81は、その情報をdrv_intレジスタ103に格納する。drv_intレジスタ103に格納された情報は、CPU60によって適宜読み出される。
Further, the input
CPU60は、drv_intレジスタの内容を読出し、想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないことを確認した場合、SIO制御レジスタ101の8ma_oe_regビットに“1”を設定して、4mAIOから8mAIOにI/O出力バッファを切り替える。
When the
図17は、本発明の第2の実施の形態における入力遅延検出回路91の内部構成を説明するためのブロック図である。この入力遅延検出回路91は、遅延時間計測回路110と、データ不一致検出回路62と、FF1(63)およびFF2(64)とを含む。また、遅延時間計測回路110は、計測制御シーケンサ114と、ドライブ切替え検出回路115と、遅延時間計測カウンタ116とを含む。なお、図10に示す第1の実施の形態における入力遅延検出回路53と同様の構成および機能を有する部分については、同じ参照番号を付すものとする。
FIG. 17 is a block diagram for explaining the internal configuration of the input
計測制御シーケンサ114は、ADJUST信号が“H”レベルとなって受信データ入力遅延検出モードであることを確認し、SIO制御部81からのSLOAD信号がアサートされると、check_start信号をアサートしてデータ不一致検出回路62にデータ不一致の検出開始を指示する。
The
そして、計測制御シーケンサ114は、シリアルクロック制御部30からのrx_clk信号の立ち上がりエッジを検出すると、遅延時間計測カウンタ116に対してカウント開始を指示する。遅延時間計測カウンタ116は、カウント値をドライブ切替え検出回路115に出力する。
When the
ドライブ切替え検出回路115は、drv_dataの値と遅延時間計測カウンタ116から出力されるカウント値とを比較し、一致したときにSIO制御部81に対してdrv_int信号を出力する。
The drive
また、drv_dataの値と遅延時間計測カウンタ116から出力されるカウント値とが一致する前に、データ不一致検出回路62がデータ不一致を検出した場合は、ドライブ切替え検出回路115からdrv_int信号は出力されない。
Also, if the data
計測制御シーケンサ114は、データ不一致検出回路62からデータ不一致を検出したことを示すno_match信号を受けるか、ドライブ切替え検出回路115がdrv_int信号に“H”レベルのパルスを出力すると、遅延時間計測カウンタ116にカウントの停止を指示し、check_start信号をネゲートしてデータ不一致検出回路62にデータ不一致の検出終了を指示する。
When the
図18は、図17に示す入力遅延検出回路91のドライブ切替え検出動作を説明するためのタイミングチャートである。図18においては、drv_dataレジスタ102に“6”が設定され、I/O出力バッファとして4mAIOセルブロックが選択されている場合を示している。
FIG. 18 is a timing chart for explaining the drive switching detection operation of the input
T1において、計測制御シーケンサ114は、データ転送開始時にSIO制御部81から出力されるSLOAD信号が“L”レベルになるのを検出すると、ADJUST信号の“H”レベルによって受信データ入力遅延検出モードであることを確認し、受信データの入力遅延検出を開始する。
In T1, when the
計測制御シーケンサ114は、check_start信号をアサートし、データ不一致検出回路62に対してデータ不一致の検出開始を指示すると共に、遅延時間計測カウンタ116に対してカウンタの初期化を指示する。T3において、遅延時間計測カウンタ116は、カウント値を“0”に初期化する。
The
T4およびT5において、計測制御シーケンサ114は、rx_clk信号が“L”レベルから“H”レベルに変化するのを検出すると、遅延時間計測カウンタ116にカウント動作を開始させる。
At T4 and T5, when the
T6において、no_match信号が“L”レベルのままであり、遅延時間計測カウンタ116のカウント値がdrv_dataの値と一致する。T7において、ドライブ切替え検出回路115は、SIO制御部81に対してdrv_int信号に“H”レベルを出力する。
At T6, the no_match signal remains at the “L” level, and the count value of the delay
T8において、計測制御シーケンサ114は、drv_int信号が“H”レベルになったのを検出して、check_start信号をネゲートして、データ不一致検出回路62にデータ不一致の検出終了を指示する。
At T8, the
図19は、図17に示す計測制御シーケンサ114の処理手順を説明するためのフローチャートである。まず、計測制御シーケンサ114は、SIO制御部81から出力されるADJUST信号が“1”であり、かつSLOAD信号が“0”であるか否かを判定する(S41)。ADJUST信号が“0”であるか、SLOAD信号が“1”であれば(S41,No)、ステップS41の処理を繰り返す。
FIG. 19 is a flowchart for explaining the processing procedure of the
ADJUST信号が“1”であり、かつSLOAD信号が“0”であれば(S41,Yes)、check_start信号を“1”にし、遅延時間計測カウンタ116を“0”に初期化する(S42)。
If the ADJUST signal is “1” and the SLOAD signal is “0” (S41, Yes), the check_start signal is set to “1” and the delay
次に、計測制御シーケンサ114は、シリアルクロック制御部30から出力されるrx_clk信号が“0”であるか否かを判定する(S43)。rx_clk信号が“1”であれば(S43,No)、ステップS43の処理を繰り返す。また、rx_clk信号が“0”であれば(S43,Yes)、rx_clk信号が“1”になるまで待機する(S44)。
Next, the
rx_clk信号が“1”になると(S44,Yes)、遅延時間計測カウンタ116に対してカウント開始を指示する(S45)。これと並行して、ドライブ切替え検出回路115は、ドライブ切替え検出動作を開始し、遅延時間計測カウンタ116のカウント値がdrv_dataの値と等しいか否かを判定する(S51)。等しい場合には(S51,Yes)、drv_int信号に“H”レベルのパルスを出力する(S52)。
When the rx_clk signal becomes “1” (S44, Yes), the delay
計測制御シーケンサ114は、データ不一致検出回路62から出力されるno_match信号が“1”であるか、またはdrv_int信号に“1”が出力されているかを判定する(S46)。
The
計測制御シーケンサ114は、no_match信号が“1”であるか、drv_int信号が“1”であれば(S46,Yes)、遅延時間計測カウンタ116に対してカウント停止を指示し、データ不一致検出回路62に対してcheck_start信号に“0”を出力する(S47)。そして、ステップS41に戻って、以降の処理を繰り返す。
If the no_match signal is “1” or the drv_int signal is “1” (S46, Yes), the
以上説明したように、本実施の形態におけるInitiator1によれば、ドライブ切替え検出回路115が想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないことを検出したときにdrv_int信号を出力し、その内容がSIO制御部81内のdrv_intレジスタ103に格納される。そして、CPU60がdrv_intレジスタ103の内容を読み出してI/O出力バッファを切り替えるようにしたので、第1の実施の形態において説明した効果に加えて、SIO通信エラーやデータ転送性能の悪化を防止することが可能となった。
As described above, according to the
(第3の実施の形態)
本発明の第3の実施の形態におけるInitiatorは、第2の実施の形態におけるInitiatorと同様に、SDATA_IN信号が一定時間変化しないことを検出するものであるが、その状態をシリアル通信状態異常としてCPUに通知するものである。
(Third embodiment)
The Initiator in the third embodiment of the present invention detects that the SDATA_IN signal does not change for a certain period of time as in the Initiator in the second embodiment. To notify.
図20は、本発明の第3の実施の形態におけるInitiatorのSIOブロックの詳細を説明するための図である。なお、このSIOブロック10”が、CPUバス70を介してCPU60と接続される点においは、図7に示すInitiator1の構成と同様である。また、図7および図9に示す第1の実施の形態におけるSIOブロック10と同様の構成および機能を有する部分については、同じ参照番号を付すものとする。
FIG. 20 is a diagram for explaining details of the SIO block of the initiator according to the third embodiment of this invention. The
SIOブロック10”は、SIO制御部120と、シリアルクロック制御部30と、データ受信制御部122とを含む。
The
SIO制御部120は、SDATA_IN信号が変化しない一定時間を設定するためのerr_dataレジスタ123と、SDATA_IN信号が一定時間変化しない場合にシリアル通信異常として設定されるerr_intレジスタ124とを含む。
The
データ受信制御部122は、受信制御シーケンサ51と、データラッチトリガ回路52と、データラッチ回路54と、シリアル・パラレル変換回路55と、入力遅延検出回路131とを含む。
The data
入力遅延検出回路131は、受信データの入力遅延を検出するときに、想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないか否かを検出する。このSDATA_IN信号が変化しない一定時間が、CPU60によってerr_dataレジスタ123に設定され、入力遅延検出回路131にerr_data信号として与えられる。
When detecting the input delay of the received data, the input
また、入力遅延検出回路131は、想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないこと、すなわち、入力遅延の計測値がerr_dataとして設定された値と等しいことを検出したときに、err_int信号によってSIO制御部120に通知する。SIO制御部120は、その情報をerr_intレジスタ124に格納する。err_intレジスタ124に格納された情報は、CPU60によって適宜読み出される。
Further, when the input
CPU60は、err_intレジスタ124の内容を読出し、想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないことを確認した場合、シリアル通信異常が発生していると判断する。
When the
図21は、本発明の第3の実施の形態における入力遅延検出回路131の内部構成を説明するためのブロック図である。この入力遅延検出回路131は、遅延時間計測回路141と、データ不一致検出回路62と、FF1(63)およびFF2(64)とを含む。また、遅延時間計測回路141は、計測制御シーケンサ151と、シリアル通信エラー検出回路152と、遅延時間計測カウンタ153とを含む。なお、図10に示す第1の実施の形態における入力遅延検出回路53と同様の構成および機能を有する部分については、同じ参照番号を付すものとする。
FIG. 21 is a block diagram for explaining the internal configuration of the input
計測制御シーケンサ151は、ADJUST信号が“H”レベルとなって受信データ入力遅延検出モードであることを確認し、SIO制御部120からのSLOAD信号がアサートされると、check_start信号をアサートしてデータ不一致検出回路62にデータ不一致の検出開始を指示する。
The
そして、計測制御シーケンサ151は、シリアルクロック制御部30からのrx_clk信号の立ち上がりエッジを検出すると、遅延時間計測カウンタ153に対してカウント開始を指示する。遅延時間計測カウンタ153は、カウント値をシリアル通信エラー検出回路152に出力する。
When the
シリアル通信エラー検出回路152は、err_dataの値と遅延時間計測カウンタ153から出力されるカウント値とを比較し、一致したときにSIO制御部120に対してerr_int信号を出力する。
The serial communication
また、err_dataの値と遅延時間計測カウンタ153から出力されるカウント値とが一致する前に、データ不一致検出回路62がデータ不一致を検出した場合は、シリアル通信エラー検出回路152からerr_int信号は出力されない。
Also, if the data
計測制御シーケンサ151は、データ不一致検出回路62からデータ不一致を検出したことを示すno_match信号を受けるか、シリアル通信エラー検出回路152がerr_int信号に“H”レベルのパルスを出力すると、遅延時間計測カウンタ153にカウントの停止を指示し、check_start信号をネゲートしてデータ不一致検出回路62にデータ不一致の検出終了を指示する。
When the
図22は、図21に示す入力遅延検出回路131のシリアル通信エラー検出動作を説明するためのタイミングチャートである。図22においては、err_dataレジスタ123に“14”が設定されている場合を示している。
FIG. 22 is a timing chart for explaining the serial communication error detection operation of the input
T1において、計測制御シーケンサ151は、データ転送開始時にSIO制御部120から出力されるSLOAD信号が“L”レベルになるのを検出すると、ADJUST信号の“H”レベルによって受信データ入力遅延検出モードであることを確認し、受信データの入力遅延検出を開始する。
In T1, when the
計測制御シーケンサ151は、check_start信号をアサートし、データ不一致検出回路62に対してデータ不一致の検出開始を指示すると共に、遅延時間計測カウンタ153に対してカウンタの初期化を指示する。T3において、遅延時間計測カウンタ153は、カウント値を“0”に初期化する。
The
T4およびT5において、計測制御シーケンサ151は、rx_clk信号が“L”レベルから“H”レベルに変化するのを検出すると、遅延時間計測カウンタ153にカウント動作を開始させる。
At T4 and T5, the
T6において、no_match信号が“L”レベルのままであり、遅延時間計測カウンタ153のカウント値がerr_dataの値と一致する。T7において、シリアル通信エラー検出回路152は、SIO制御部120に対してerr_int信号に“H”レベルを出力する。
At T6, the no_match signal remains at the “L” level, and the count value of the delay
T8において、計測制御シーケンサ151は、err_int信号が“H”レベルになったのを検出して、check_start信号をネゲートして、データ不一致検出回路62にデータ不一致の検出終了を指示する。
At T8, the
図23は、図21に示す計測制御シーケンサ151の処理手順を説明するためのフローチャートである。まず、計測制御シーケンサ151は、SIO制御部120から出力されるADJUST信号が“1”であり、かつSLOAD信号が“0”であるか否かを判定する(S61)。ADJUST信号が“0”であるか、SLOAD信号が“1”であれば(S61,No)、ステップS61の処理を繰り返す。
FIG. 23 is a flowchart for explaining the processing procedure of the
ADJUST信号が“1”であり、かつSLOAD信号が“0”であれば(S61,Yes)、check_start信号を“1”にし、遅延時間計測カウンタ153を“0”に初期化する(S62)。
If the ADJUST signal is “1” and the SLOAD signal is “0” (S61, Yes), the check_start signal is set to “1” and the delay
次に、計測制御シーケンサ151は、シリアルクロック制御部30から出力されるrx_clk信号が“0”であるか否かを判定する(S63)。rx_clk信号が“1”であれば(S63,No)、ステップS63の処理を繰り返す。また、rx_clk信号が“0”であれば(S63,Yes)、rx_clk信号が“1”になるまで待機する(S64)。
Next, the
rx_clk信号が“1”になると(S64,Yes)、遅延時間計測カウンタ153に対してカウント開始を指示する(S65)。これと並行して、シリアル通信エラー検出回路152は、シリアル通信エラー検出動作を開始し、遅延時間計測カウンタ153のカウント値がerr_dataの値と等しいか否かを判定する(S71)。等しい場合には(S71,Yes)、err_int信号に“H”レベルのパルスを出力する(S72)。
When the rx_clk signal becomes “1” (S64, Yes), the delay
計測制御シーケンサ151は、データ不一致検出回路62から出力されるno_match信号が“1”であるか、またはerr_int信号に“1”が出力されているかを判定する(S66)。
The
計測制御シーケンサ151は、no_match信号が“1”であるか、err_int信号が“1”であれば(S66,Yes)、遅延時間計測カウンタ153に対してカウント停止を指示し、データ不一致検出回路62に対してcheck_start信号に“0”を出力する(S67)。そして、ステップS61に戻って、以降の処理を繰り返す。
If the no_match signal is “1” or the err_int signal is “1” (
以上説明したように、本実施の形態におけるInitiator1によれば、シリアル通信エラー検出回路152が想定している入力遅延時間よりもさらにSDATA_IN信号が一定時間変化しないことを検出したときにerr_int信号を出力し、その内容がSIO制御部120内のerr_intレジスタ124に格納される。そして、CPU60がerr_intレジスタ124の内容を読み出すようにしたので、第1の実施の形態において説明した効果に加えて、CPU60がシリアル通信エラーの発生の有無を容易に判定することが可能となった。
As described above, according to the
今回開示された実施の形態は、すべての点で例示であって制限的なものではないと考えられるべきである。本発明の範囲は上記した説明ではなくて特許請求の範囲によって示され、特許請求の範囲と均等の意味および範囲内でのすべての変更が含まれることが意図される。 The embodiment disclosed this time should be considered as illustrative in all points and not restrictive. The scope of the present invention is defined by the terms of the claims, rather than the description above, and is intended to include any modifications within the scope and meaning equivalent to the terms of the claims.
1,300 Initiator、2,400 Target、10,10’,10”,310 SIOブロック、20,81,120,320 SIO制御部、21,321 SIO送受信制御部、22 レジスタ群、23 CPUバスI/F、24,101,324 SIO制御レジスタ、25 input_delayレジスタ、26 adj_delayレジスタ、27 latch_cycレジスタ、30,330 シリアルクロック制御部、40,340 データ送信制御部、50,84,122,350 データ受信制御部、51 受信制御シーケンサ、52 データラッチトリガ回路、53 入力遅延検出回路、54 データラッチ回路、55 シリアル・パラレル変換回路、56 受信データビットカウンタ、57 遅延調整回路、60,360 CPU、61,110 遅延時間計測回路、62 データ不一致検出回路、63,64 フリップフロップ、65,114,151 計測制御シーケンサ、66,116,153 遅延時間計測カウンタ、70,370 CPUバス、71 データラッチトリガ制御シーケンサ、72 data_en調整カウンタ、73 data_en周期カウンタ、85−1〜85−4 4mAIO、86−1〜86−4 8mAIO、91,131 入力遅延検出回路、102 drv_dataレジスタ、103 drv_intレジスタ、115 ドライブ切替え検出回路、123 err_dataレジスタ、124 err_intレジスタ、152 シリアル通信エラー検出回路、201 送信データ回路、202 データ出力回路、325 送信データレジスタ、326 受信データレジスタ。 1,300 Initiator, 2,400 Target, 10, 10 ′, 10 ″, 310 SIO block, 20, 81, 120, 320 SIO control unit, 21,321 SIO transmission / reception control unit, 22 register group, 23 CPU bus I / F, 24, 101, 324 SIO control register, 25 input_delay register, 26 adj_delay register, 27 latch_cyc register, 30, 330 Serial clock control unit, 40, 340 Data transmission control unit, 50, 84, 122, 350 Data reception control unit , 51 reception control sequencer, 52 data latch trigger circuit, 53 input delay detection circuit, 54 data latch circuit, 55 serial / parallel conversion circuit, 56 reception data bit counter, 57 delay adjustment circuit, 60 360 CPU, 61, 110 delay time measurement circuit, 62 data mismatch detection circuit, 63, 64 flip-flop, 65, 114, 151 measurement control sequencer, 66, 116, 153 delay time measurement counter, 70, 370 CPU bus, 71 data Latch trigger control sequencer, 72 data_en adjustment counter, 73 data_en period counter, 85-1 to 85-4 4 mAIO, 86-1 to 86-4 8 mAIO, 91, 131 input delay detection circuit, 102 drv_data register, 103 drv_int register, 115 Drive switching detection circuit, 123 err_data register, 124 err_int register, 152 serial communication error detection circuit, 201 transmission data circuit, 202 data output circuit, 325 transmission Receive data register, 326 Receive data register.
Claims (7)
前記イニシエータは、前記ターゲットに対してシリアルデータの入力遅延検出モードであることを示す信号を出力する制御手段と、
前記ターゲットから出力されるシリアルデータの入力遅延値を検出する入力遅延検出手段と、
前記入力遅延検出手段によって検出された入力遅延値に基づいて、前記ターゲットから出力されるシリアルデータのラッチタイミングを調整する遅延調整手段とを含み、
前記ターゲットは、前記制御手段からシリアルデータの入力遅延検出モードであることを示す信号を受けたときに、入力遅延値検出用のシリアルデータを出力するデータ出力手段を含む、通信装置。 A communication device including an initiator and a target that transmit and receive serial data in synchronization with a clock,
The initiator outputs a signal indicating a serial data input delay detection mode to the target;
Input delay detection means for detecting an input delay value of serial data output from the target;
Delay adjusting means for adjusting the latch timing of serial data output from the target based on the input delay value detected by the input delay detecting means,
The communication device includes a data output unit that outputs serial data for detecting an input delay value when the target receives a signal indicating that it is in a serial data input delay detection mode from the control unit.
前記入力遅延検出手段は、前記ターゲットから出力されるシリアルデータを前記サンプルクロックでサンプリングする第1のフリップフロップと、
前記第1のフリップフロップから出力される信号をさらに前記サンプルクロックでサンプリングする第2のフリップフロップと、
前記第1のフリップフロップから出力される信号と、前記第2のフリップフロップから出力される信号との不一致を検出するデータ不一致検出回路と、
前記データ不一致検出回路によってデータ不一致が検出された時間を計測して前記入力遅延値とする遅延時間計測回路とを含む、請求項1記載の通信装置。 The serial clock is a clock signal having a frequency that is an integer multiple of the sample clock;
The input delay detection means includes a first flip-flop that samples serial data output from the target with the sample clock;
A second flip-flop for further sampling the signal output from the first flip-flop with the sample clock;
A data mismatch detection circuit for detecting a mismatch between a signal output from the first flip-flop and a signal output from the second flip-flop;
The communication apparatus according to claim 1, further comprising: a delay time measuring circuit that measures a time when the data mismatch is detected by the data mismatch detection circuit and sets the input delay value as the time.
前記通信装置はさらに、前記第1のレジスタに格納された入力遅延値を読み出して、前記遅延調整手段を制御するプロセッサを含む、請求項1または2記載の通信装置。 The control means includes a first register for storing an input delay value detected by the input delay detection means,
The communication apparatus according to claim 1, further comprising a processor that reads the input delay value stored in the first register and controls the delay adjusting unit.
前記シリアルデータをラッチするタイミング信号の周期を前記サンプルクロックの何クロックとするかを設定する第3のレジスタとを含み、
前記遅延調整手段は、前記プロセッサによって設定された前記第2のレジスタおよび第3のレジスタの値に応じて前記タイミング信号を生成する、請求項3記載の通信装置。 The control means further includes a second register for setting how many clocks of the sample clock a timing signal for latching the serial data is delayed,
A third register for setting how many clocks of the sample clock the timing signal for latching the serial data is,
The communication apparatus according to claim 3, wherein the delay adjusting unit generates the timing signal according to values of the second register and the third register set by the processor.
前記制御手段はさらに、想定される入力遅延値よりも大きな値が前記プロセッサによって設定される第4のレジスタを含み、
前記制御手段は、前記入力遅延検出手段によって検出された入力遅延値が前記第4のレジスタに設定された値と等しくなったときに、前記複数の出力手段を切り替えて駆動能力が高い出力手段によって前記シリアルクロックを駆動させる、請求項4記載の通信装置。 The communication device further includes a plurality of output circuits having different driving capabilities,
The control means further includes a fourth register in which a value larger than an assumed input delay value is set by the processor;
When the input delay value detected by the input delay detection means becomes equal to the value set in the fourth register, the control means switches the plurality of output means and outputs the high drive capability. The communication apparatus according to claim 4, wherein the serial clock is driven.
前記複数の出力手段の切替えを制御する第6のレジスタとを含み、
前記プロセッサは、前記第5のレジスタが設定されたのを検出して、前記第6のレジスタに値を設定して前記複数の出力手段を切り替える、請求項5記載の通信装置。 The control means further includes a fifth register set when an input delay value detected by the input delay detection means becomes equal to a value set in the fourth register;
A sixth register for controlling switching of the plurality of output means,
The communication device according to claim 5, wherein the processor detects that the fifth register is set, sets a value in the sixth register, and switches the plurality of output units.
前記入力遅延検出手段によって検出された入力遅延値が前記第4のレジスタに設定された値と等しくなったときに、通信エラーが発生したことを前記プロセッサに通知するための情報が設定される第5のレジスタとを含む、請求項4記載の通信装置。 The control means further includes a fourth register in which a value larger than an assumed input delay value is set by the processor;
Information for notifying the processor that a communication error has occurred is set when the input delay value detected by the input delay detection means becomes equal to the value set in the fourth register. 5. The communication device according to claim 4, comprising 5 registers.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009153557A JP2011010178A (en) | 2009-06-29 | 2009-06-29 | Communication apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009153557A JP2011010178A (en) | 2009-06-29 | 2009-06-29 | Communication apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2011010178A true JP2011010178A (en) | 2011-01-13 |
Family
ID=43566291
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009153557A Withdrawn JP2011010178A (en) | 2009-06-29 | 2009-06-29 | Communication apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2011010178A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018196047A (en) * | 2017-05-19 | 2018-12-06 | 株式会社富士通ゼネラル | Communication system |
CN113204507A (en) * | 2021-04-25 | 2021-08-03 | 山东英信计算机技术有限公司 | Universal input/output data transmission method, device, equipment and medium |
JP2021128414A (en) * | 2020-02-12 | 2021-09-02 | 三菱電機株式会社 | Master device, slave device, and serial transmission system |
-
2009
- 2009-06-29 JP JP2009153557A patent/JP2011010178A/en not_active Withdrawn
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018196047A (en) * | 2017-05-19 | 2018-12-06 | 株式会社富士通ゼネラル | Communication system |
JP2021128414A (en) * | 2020-02-12 | 2021-09-02 | 三菱電機株式会社 | Master device, slave device, and serial transmission system |
JP7149974B2 (en) | 2020-02-12 | 2022-10-07 | 三菱電機株式会社 | Master device, slave device and serial transmission system |
CN113204507A (en) * | 2021-04-25 | 2021-08-03 | 山东英信计算机技术有限公司 | Universal input/output data transmission method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR102328014B1 (en) | Device including single wire interface and data processing system having the same | |
JP5175728B2 (en) | Test apparatus, adjustment method, and adjustment program | |
TWI723006B (en) | High speed data transfer using calibrated, single-clock source synchronous serializer-deserializer protocol | |
US8422619B2 (en) | Clock frequency divider circuit, clock distribution circuit, clock frequency division method, and clock distribution method | |
US20080143402A1 (en) | Digital pulse-width control apparatus | |
US20120294401A1 (en) | Method of calibrating signal skews in mipi and related transmission system | |
US7705687B1 (en) | Digital ring oscillator | |
US8856578B2 (en) | Integrated circuit device including skew adjustment circuit and skew adjustment method | |
KR20160147967A (en) | Duty cycle based timing margining for i/o ac timing | |
US7893740B2 (en) | Data signal generating apparatus | |
US7949080B2 (en) | Phase adjusting function evaluating method, transmission margin measuring method, information processing apparatus and computer readable information recording medium | |
KR20160042496A (en) | Duty cycle error detection device and duty cycle correction device having the same | |
JP4948421B2 (en) | Test apparatus, adjustment apparatus, adjustment method, and adjustment program | |
CN113252958A (en) | Digital oscilloscope and automatic calibration method for delay difference between channels thereof | |
JP2006238302A (en) | Serial/parallel conversion circuit and parallel/serial conversion circuit | |
JP2011010178A (en) | Communication apparatus | |
US9354274B2 (en) | Circuit test system electric element memory control chip under different test modes | |
JP2011061350A (en) | Receiving apparatus and receiving method thereof | |
US20130246831A1 (en) | Selection device, selection method and information processing device | |
CN108664066B (en) | Chip and voltage adjusting method thereof | |
JP2008219813A (en) | Lvds receiver, lvds receiving method, lvds data transmission system, and semiconductor device | |
JP2016063430A (en) | Transmitter/receiver circuit, integrated circuit and test method | |
US20060092051A1 (en) | Microcode configurable frequency clock | |
US20100033189A1 (en) | Semiconductor integrated circuit and test method using the same | |
CN116938352A (en) | Chip, bit error rate testing method and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A300 | Withdrawal of application because of no request for examination |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20120904 |