JP2020046800A - Semiconductor device - Google Patents

Semiconductor device Download PDF

Info

Publication number
JP2020046800A
JP2020046800A JP2018173335A JP2018173335A JP2020046800A JP 2020046800 A JP2020046800 A JP 2020046800A JP 2018173335 A JP2018173335 A JP 2018173335A JP 2018173335 A JP2018173335 A JP 2018173335A JP 2020046800 A JP2020046800 A JP 2020046800A
Authority
JP
Japan
Prior art keywords
delay
circuit
signal
data signal
trigger
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018173335A
Other languages
Japanese (ja)
Inventor
孝征 螢原
Takayuki Hotaruhara
孝征 螢原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2018173335A priority Critical patent/JP2020046800A/en
Publication of JP2020046800A publication Critical patent/JP2020046800A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Memory System (AREA)
  • Pulse Circuits (AREA)

Abstract

To provide a semiconductor device shortening a calibration time of an interface circuit.SOLUTION: A reception control circuit 110 of an interface circuit 101 installed in a semiconductor device comprises delay circuits 34_0 to 34_2 including delay lines to which data signals DATA0 to DATA2 are inputted, registers 35_0 to 35_2, and a calibration circuit 33. The register stores a data signal propagating in the delay line associating with a position on the delay line. The calibration circuit configures a delay amount of at lease one of either a strobe signal DQS or the data signals DATA0 to DATA2 based on the data signals DATA0 to DATA2 stored in the register.SELECTED DRAWING: Figure 2

Description

本開示は、半導体装置に関し、たとえば、ストローブ信号およびデータ信号の送受信を行うインタフェース回路を備えた半導体装置において好適に用いられるものである。   The present disclosure relates to a semiconductor device, and is suitably used, for example, in a semiconductor device including an interface circuit for transmitting and receiving a strobe signal and a data signal.

外部メモリとSoC(System on Chip)との間でデータの送受信を行う場合を例に挙げる。この場合、送信側のインタフェース回路は、ストローブ信号とともにそのストローブ信号に同期したデータ信号を受信側のインタフェース回路に向けて送信する。受信側のインタフェース回路は、データ信号の有効ウィンドウの中心でデータ信号をサンプリングできるように、ストローブ信号またはデータ信号の位相シフトを行う。確実にデータをサンプリングできるように、初期化時などに予め位相シフト量の調整(すなわち、キャリブレーション)が行われる。   A case where data is transmitted and received between an external memory and an SoC (System on Chip) will be described as an example. In this case, the transmission-side interface circuit transmits the strobe signal and a data signal synchronized with the strobe signal to the reception-side interface circuit. The receiving-side interface circuit shifts the phase of the strobe signal or the data signal so that the data signal can be sampled at the center of the effective window of the data signal. In order to reliably sample data, the phase shift amount is adjusted (ie, calibrated) in advance at the time of initialization or the like.

たとえば、特開2008−052335号公報(特許文献1)に記載のインタフェース回路は、ストローブ信号を遅延させる可変遅延回路と、この可変遅延回路の遅延シフト量を調整する遅延調整回路とを有する。遅延調整回路は、キャリブレーション時に、ストローブ信号の遅延シフト量を変えながらデータ信号をサンプリングし、サンプリングされたデータ信号の値が期待値と一致するか否かを判定する。これにより、遅延調整回路は、セットアップ限界およびホールド限界を検出し、その中間位置を最適遅延量として算出する。   For example, the interface circuit described in Japanese Patent Application Laid-Open No. 2008-052335 (Patent Document 1) includes a variable delay circuit that delays a strobe signal, and a delay adjustment circuit that adjusts a delay shift amount of the variable delay circuit. The delay adjustment circuit samples the data signal during calibration while changing the delay shift amount of the strobe signal, and determines whether or not the value of the sampled data signal matches an expected value. As a result, the delay adjustment circuit detects the setup limit and the hold limit, and calculates the intermediate position as the optimum delay amount.

特開2008−052335号公報JP 2008-052335 A

上記の特許文献などに開示されている従来技術の問題点は、キャリブレーションに長時間を要する点にある。その理由は、セットアップおよびホールドの限界遅延をサーチして有効ウィンドウを決定するまでに、ストローブ信号の遅延シフト量を変えながら多数回のデータ信号のサンプリングを行わなければならないからである。   The problem of the prior art disclosed in the above patent documents and the like is that calibration takes a long time. The reason is that a large number of samplings of the data signal must be performed while changing the delay shift amount of the strobe signal before searching the setup and hold limit delays to determine the effective window.

その他の課題と新規な特徴は、本明細書の記述および添付図面から明らかになるであろう。   Other problems and novel features will be apparent from the description of this specification and the accompanying drawings.

一実施形態による半導体装置は、ストローブ信号およびデータ信号を受信するインタフェース回路を備える。インターフェース回路は、データ信号が入力される遅延線と、その遅延線を伝送中のデータ信号を遅延線上の位置に対応付けて保持するためのレジスタとを備える。ストローブ信号およびデータ信号のうち少なくとも一方の遅延量は、レジスタに保持されたデータ信号に基づいて設定される。   A semiconductor device according to one embodiment includes an interface circuit that receives a strobe signal and a data signal. The interface circuit includes a delay line to which a data signal is input, and a register for holding the data signal being transmitted through the delay line in association with a position on the delay line. The delay amount of at least one of the strobe signal and the data signal is set based on the data signal held in the register.

上記の実施形態によれば、インタフェース回路のキャリブレーション時間を従来よりも短縮することができる。   According to the above embodiment, the calibration time of the interface circuit can be reduced as compared with the related art.

第1の実施形態の半導体装置を利用したシステムの構成例を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration example of a system using the semiconductor device according to the first embodiment. 図1の受信制御回路の構成を示すブロック図である。FIG. 2 is a block diagram illustrating a configuration of a reception control circuit in FIG. 1. 図2の遅延回路およびレジスタの具体的構成例を示す回路図である。FIG. 3 is a circuit diagram illustrating a specific configuration example of a delay circuit and a register in FIG. 2. 図3の遅延回路の変形例を示す回路図である。FIG. 4 is a circuit diagram illustrating a modification of the delay circuit of FIG. 3. インタフェース回路のキャリブレーションの手順の概略を説明するための図である。FIG. 4 is a diagram for explaining an outline of a procedure of calibration of an interface circuit. レジスタを構成する各フリップフロップに保持される信号の一例を示す図である。FIG. 3 is a diagram illustrating an example of a signal held in each flip-flop forming a register. 図6の例において、入力データ信号、各遅延素子の出力信号、およびトリガ信号の波形を示す図である。FIG. 7 is a diagram illustrating waveforms of an input data signal, an output signal of each delay element, and a trigger signal in the example of FIG. 6. データトレーニングの手順を示すフローチャートである。It is a flowchart which shows the procedure of data training. 最適な参照電圧の大きさについて説明するための図である。FIG. 4 is a diagram for explaining an optimum magnitude of a reference voltage. 参照電圧トレーニングの手順を説明するためのフローチャートである。9 is a flowchart illustrating a procedure of reference voltage training. データ信号の遅延量を常時観測する手順を示すフローチャートである。6 is a flowchart illustrating a procedure for constantly observing a delay amount of a data signal. 第4の実施形態の半導体装置において、インタフェース回路の受信制御回路の構成を示すブロック図である。FIG. 14 is a block diagram illustrating a configuration of a reception control circuit of an interface circuit in a semiconductor device according to a fourth embodiment. 図12のレジスタの構成を示す回路図である。FIG. 13 is a circuit diagram illustrating a configuration of a register in FIG. 12. 第4の実施形態において、インタフェース回路101のキャリブレーションの手順を示すフローチャートである。15 is a flowchart illustrating a procedure for calibrating an interface circuit according to a fourth embodiment. 第4の実施形態の半導体装置において、ビットごとの遅延回路に入力されている1サイクルパルスの波形を示す図である。FIG. 16 is a diagram illustrating a waveform of a one-cycle pulse input to a delay circuit for each bit in the semiconductor device according to the fourth embodiment. 第5の実施形態の半導体装置において、受信制御回路で用いられる遅延線およびレジスタの構成を示すブロック図である。FIG. 15 is a block diagram illustrating a configuration of a delay line and a register used in a reception control circuit in a semiconductor device according to a fifth embodiment. 第5の実施形態において、インタフェース回路101のキャリブレーションの手順を示すフローチャートである。15 is a flowchart illustrating a procedure of calibration of an interface circuit according to a fifth embodiment. 第5の実施形態の半導体装置において、ストローブ信号をトリガとして、ビットごとにレジスタに取り込まれた1サイクルパルスの波形を示す図である。FIG. 21 is a diagram showing a waveform of a one-cycle pulse taken into a register for each bit by using a strobe signal as a trigger in the semiconductor device of the fifth embodiment. 第5の実施形態の半導体装置において、ビットごとの入力信号の立上がりエッジまたは立下がりエッジに基づいて生成されたトリガに応答して、各レジスタに取り込まれた1サイクルパルスの波形を示す図である。FIG. 18 is a diagram showing a waveform of a one-cycle pulse fetched into each register in response to a trigger generated based on a rising edge or a falling edge of an input signal for each bit in the semiconductor device of the fifth embodiment. .

以下、各実施形態について図面を参照して詳しく説明する。なお、同一または相当する部分には同一の参照符号を付して、その説明を繰返さない。   Hereinafter, each embodiment will be described in detail with reference to the drawings. The same or corresponding parts have the same reference characters allotted, and description thereof will not be repeated.

<第1の実施形態>
[半導体装置およびシステムの概略構成]
図1は、第1の実施形態の半導体装置を利用したシステムの構成例を示すブロック図である。
<First embodiment>
[Schematic Configuration of Semiconductor Device and System]
FIG. 1 is a block diagram illustrating a configuration example of a system using the semiconductor device according to the first embodiment.

図1を参照して、半導体システムは、複数の信号線を介して相互に接続された第1の半導体装置100Aと第2の半導体装置100Bとを含む。半導体装置100A,100Bについて総称する場合またはいずれか一方を示す場合に半導体装置100と記載する。   Referring to FIG. 1, the semiconductor system includes a first semiconductor device 100A and a second semiconductor device 100B interconnected via a plurality of signal lines. The semiconductor devices 100A and 100B are referred to as the semiconductor device 100 when they are collectively referred to or when only one of them is indicated.

図1の半導体装置100A,100Bを接続する信号線は、ストローブ信号DQS用の信号線と、データ信号DATA用の信号線とを含む。図1の例では、ストローブ信号DQSは差動信号であり、データ信号DATAはシングルエンドのパラレル信号である。図1では、データ信号DATAのうち2ビット(DATA0,DATA1)が代表的に示されている。   The signal lines connecting the semiconductor devices 100A and 100B of FIG. 1 include a signal line for a strobe signal DQS and a signal line for a data signal DATA. In the example of FIG. 1, the strobe signal DQS is a differential signal, and the data signal DATA is a single-ended parallel signal. FIG. 1 representatively shows two bits (DATA0, DATA1) of data signal DATA.

以下の説明では、データ信号DATAを構成するビットごとの信号をビット信号DATA0、ビット信号DATA1、…のように記載する。   In the following description, a signal for each bit constituting the data signal DATA is described as a bit signal DATA0, a bit signal DATA1,.

各半導体装置100は、インタフェース回路101(101A,101B)と、内部回路102(102A,102B)とを含む。第1の半導体装置100Aは、たとえば、SoC(System on a Chip)である。この場合、内部回路102Aは、CPU(Central Processing Unit)、RAM(Random Access Memory)、ROM(Read Only Memory)、および各種の周辺回路などを含む。第2の半導体装置100Bは、たとえば、SDRAM(Synchronous Dynamic Random Access Memory)である。この場合、内部回路102Bは、メモリセルアレー、デコーダ、およびセンスアンプなどを含む。   Each semiconductor device 100 includes an interface circuit 101 (101A, 101B) and an internal circuit 102 (102A, 102B). The first semiconductor device 100A is, for example, an SoC (System on a Chip). In this case, the internal circuit 102A includes a CPU (Central Processing Unit), a RAM (Random Access Memory), a ROM (Read Only Memory), and various peripheral circuits. The second semiconductor device 100B is, for example, an SDRAM (Synchronous Dynamic Random Access Memory). In this case, internal circuit 102B includes a memory cell array, a decoder, a sense amplifier, and the like.

なお、半導体装置100AとしてのSoCと、半導体装置100Bとしてのメモリ装置とが、1つのチップまたはパッケージに集積されていてもよい。この場合、図1に示す構成全体が1つの半導体装置に相当する。   Note that the SoC as the semiconductor device 100A and the memory device as the semiconductor device 100B may be integrated in one chip or package. In this case, the entire configuration illustrated in FIG. 1 corresponds to one semiconductor device.

各インタフェース回路101は、ストローブ信号DQSの送受信に用いられるドライバ60およびレシーバ30と、データ信号DATAの送受信に用いられるドライバ61_0,61_1およびレシーバ31_0,31_1と、受信制御回路110とを含む。なお、図1および図2では、インタフェース回路101のうち、主としてデータ受信に関係する一部の共通の構成のみが示されている。   Each interface circuit 101 includes a driver 60 and a receiver 30 used for transmitting and receiving the strobe signal DQS, drivers 61_0, 61_1 and receivers 31_0, 31_1 used for transmitting and receiving the data signal DATA, and a reception control circuit 110. Note that FIGS. 1 and 2 show only a part of the common configuration of the interface circuit 101 mainly related to data reception.

ドライバ61_0,61_1,…について総称する場合またはいずれか1つを示す場合にドライバ61と記載する。レシーバ31_0,31_1,…について総称する場合またはいずれか1つを示す場合にレシーバ31と記載する。   When the drivers 61_0, 61_1,... Are collectively referred to, or when any one of the drivers 61_0, 61_1,. When the receivers 31_0, 31_1,... Are collectively referred to, or when any one of the receivers 31_0, 31_1,.

以下、インタフェース回路101Aが送信側であり、インタフェース回路101Bが受信側の場合について説明する。送信側と受信側とが逆の場合も同様である。   Hereinafter, a case where the interface circuit 101A is on the transmission side and the interface circuit 101B is on the reception side will be described. The same applies to the case where the transmitting side and the receiving side are reversed.

送信側のインタフェース回路101Aは、ストローブ信号DQSを受信側インタフェース回路101Bにドライバ60を介して出力する。さらに、送信側インタフェース回路101Aは、このストローブ信号DQSに同期するビット信号DATA0,DATA1を受信側インタフェース回路101Bに向けてドライバ61_0,61_1をそれぞれ介して出力する。ここで、ドライバ60,61は、送信信号の波形を整形するバッファとして機能する。   The transmission-side interface circuit 101A outputs the strobe signal DQS to the reception-side interface circuit 101B via the driver 60. Further, the transmission-side interface circuit 101A outputs bit signals DATA0 and DATA1 synchronized with the strobe signal DQS to the reception-side interface circuit 101B via the drivers 61_0 and 61_1, respectively. Here, the drivers 60 and 61 function as buffers for shaping the waveform of the transmission signal.

受信側のインタフェース回路101Bは、レシーバ30を介してストローブ信号DQSを受信するとともに、レシーバ31_0,レシーバ31_1を介してビット信号DATA0,DATA1をそれぞれ受信する。ここで、レシーバ30,31は、受信信号の波形を整形するバッファとして機能する。   The interface circuit 101B on the receiving side receives the strobe signal DQS via the receiver 30, and receives the bit signals DATA0 and DATA1 via the receivers 31_0 and 31_1, respectively. Here, the receivers 30 and 31 function as buffers for shaping the waveform of the received signal.

各インタフェース回路101の受信制御回路110は、受信したストローブ信号DQSおよび/またはデータ信号DATAの位相シフトを行う。さらに、受信制御回路110は、位相シフト後のストローブ信号DQSの立上がりおよび/または立下がりのタイミングで、位相シフト後の各ビット信号のサンプリングを行う。   The reception control circuit 110 of each interface circuit 101 shifts the phase of the received strobe signal DQS and / or the data signal DATA. Further, reception control circuit 110 samples each bit signal after the phase shift at the rising and / or falling timing of strobe signal DQS after the phase shift.

[受信制御回路の構成]
図2は、図1の受信制御回路の構成を示すブロック図である。図2では、図1の受信制御回路110とともに、ストローブ信号DQSをそれぞれ受信するレシーバ30と、ビット信号DATA0,DATA1,DATA2をそれぞれ受信するレシーバ31_0,31_1,31_2とが示されている。図2の例では、データ信号DATAの3ビット分(ビット信号DATA0,DATA1,DATA2)が代表的に示されている。
[Configuration of reception control circuit]
FIG. 2 is a block diagram showing a configuration of the reception control circuit of FIG. FIG. 2 shows, together with the reception control circuit 110 of FIG. 1, a receiver 30 that receives the strobe signal DQS, and receivers 31_0, 31_1, and 31_2 that receive the bit signals DATA0, DATA1, and DATA2, respectively. In the example of FIG. 2, three bits (bit signals DATA0, DATA1, DATA2) of the data signal DATA are representatively shown.

図2を参照して、レシーバ30は、差動のストローブ信号DQSを受信して、シングルエンドのストローブ信号DQSに変換して出力する。   Referring to FIG. 2, receiver 30 receives differential strobe signal DQS, converts it to single-ended strobe signal DQS, and outputs the same.

レシーバ31_0〜31_2は、ビット信号DATA0〜DATA2をそれぞれ受信し、受信したビット信号を参照電圧VREFと比較する。たとえば、レシーバ31は、受信したビット信号が参照電圧VREF以上のときハイ(H)レベルの信号を出力し、受信したビット信号が参照電圧VREF未満のときロー(L)レベルの信号を出力する。なお、ビット信号の大きさと出力信号の論理レベルとの対応関係は逆であってもよい。   The receivers 31_0 to 31_2 receive the bit signals DATA0 to DATA2, respectively, and compare the received bit signals with a reference voltage VREF. For example, the receiver 31 outputs a high (H) level signal when the received bit signal is equal to or higher than the reference voltage VREF, and outputs a low (L) level signal when the received bit signal is lower than the reference voltage VREF. The correspondence between the magnitude of the bit signal and the logic level of the output signal may be reversed.

受信制御回路110は、参照電圧生成器32と、遅延回路34_S,34_0,34_1,34_2と、サンプリング回路36_0,36_1,36_2と、レジスタ35_0,35_1,35_2と、キャリブレーション回路33とを含む。   The reception control circuit 110 includes a reference voltage generator 32, delay circuits 34_S, 34_0, 34_1, 34_2, sampling circuits 36_0, 36_1, 36_2, registers 35_0, 35_1, 35_2, and a calibration circuit 33.

以下の説明では、遅延回路34_S,34_0,34_1,34_2について総称する場合またはいずれか1つを示す場合に遅延回路34と記載する。同様に、サンプリング回路36_0,36_1,36_2について総称する場合またはいずれか1つを示す場合にサンプリング回路36と記載する。レジスタ35_0,35_1,35_2について総称する場合またはいずれか1つを示す場合にレジスタ35と記載する。   In the following description, when the delay circuits 34_S, 34_0, 34_1, and 34_2 are collectively referred to, or when any one is indicated, the delay circuit 34 is described. Similarly, when the sampling circuits 36_0, 36_1, and 36_2 are collectively referred to, or when any one of them is indicated, the sampling circuit 36 is described. When the registers 35_0, 35_1, and 35_2 are collectively referred to or when any one of them is indicated, the register 35 is described.

受信制御回路110の構成要素のうち、参照電圧生成器32は、前述の参照電圧VREFを生成し、生成した参照電圧VREFを各レシーバ31に供給する。   Among the components of the reception control circuit 110, the reference voltage generator 32 generates the above-described reference voltage VREF, and supplies the generated reference voltage VREF to each receiver 31.

遅延回路34_Sはストローブ信号DQSに対応して設けられる。遅延回路34_0,34_1,34_2は、ビット信号DATA0,DATA1,DATA2にそれぞれ対応して設けられる。各遅延回路34は、遅延量を可変に制御することができ、これにより、受信信号の位相を所望の値だけシフトさせる。各遅延回路34の遅延量は、遅延コードを用いて設定される。各遅延回路34は、共通の構成を有しており、その具体的構成例については、図3および図4を参照して説明する。   Delay circuit 34_S is provided corresponding to strobe signal DQS. The delay circuits 34_0, 34_1, and 34_2 are provided corresponding to the bit signals DATA0, DATA1, and DATA2, respectively. Each delay circuit 34 can variably control the amount of delay, thereby shifting the phase of the received signal by a desired value. The delay amount of each delay circuit 34 is set using a delay code. Each of the delay circuits 34 has a common configuration, and a specific configuration example will be described with reference to FIGS.

サンプリング回路36_0,36_1,36_2は、ビット信号DATA0,DATA1,DATA2にそれぞれ対応して設けられる。各サンプリング回路36は、対応の遅延回路34を通過した対応のビット信号と、遅延回路34_Sを通過したストローブ信号DQSとを受信する。各サンプリング回路36は、受信したストローブ信号DQSの立上がりおよび/または立下がりのタイミングで、対応するビット信号をサンプリングする。   The sampling circuits 36_0, 36_1, and 36_2 are provided corresponding to the bit signals DATA0, DATA1, and DATA2, respectively. Each sampling circuit 36 receives the corresponding bit signal passed through the corresponding delay circuit 34 and the strobe signal DQS passed through the delay circuit 34_S. Each sampling circuit 36 samples a corresponding bit signal at the rising and / or falling timing of the received strobe signal DQS.

レジスタ35_0,35_1,35_2は、遅延回路34_0,34_1,34_2にそれぞれ対応して設けられる。各レジスタ35は、トリガを受けたときに、対応する遅延回路34の信号伝送経路を伝送中のビット信号(すなわち、信号伝送経路上の複数個所における信号の論理値(“H”または“L”))を、信号伝送経路上の位置に対応付けて保持するように構成される。このときのトリガは、対応する遅延回路34を伝送中のビット信号の立上がりエッジまたは立下がりエッジを利用して生成される。   The registers 35_0, 35_1, and 35_2 are provided corresponding to the delay circuits 34_0, 34_1, and 34_2, respectively. When a trigger is received, each register 35 receives a bit signal being transmitted through the signal transmission path of the corresponding delay circuit 34 (that is, the logical value (“H” or “L”) of a signal at a plurality of locations on the signal transmission path. )) Is held in association with the position on the signal transmission path. The trigger at this time is generated using the rising edge or the falling edge of the bit signal being transmitted through the corresponding delay circuit 34.

これによって、各レジスタ35は、対応する遅延回路34に1サイクルパルスが入力された場合に、入力された1サイクルパルス自身の立上がりエッジまたは立下がりエッジに基づいて適切なタイミングでトリガをかけることによって、1サイクルパルスの信号全体を確実に保持することできる。この結果、保持された1サイクルパルスの立上がりエッジから立下がりエッジまでに相当する有効ウィンドウを検出することが可能になる。   Thus, when a one-cycle pulse is input to the corresponding delay circuit 34, each register 35 triggers at an appropriate timing based on the rising edge or the falling edge of the input one-cycle pulse itself. (1) The entire signal of the one-cycle pulse can be reliably held. As a result, it is possible to detect an effective window corresponding to a period from the rising edge to the falling edge of the held one-cycle pulse.

なお、1サイクルパルスとは、クロック信号の1サイクルでLレベル、Hレベル、Lレベルの順にまたはHレベル、Lレベル、Hレベルの順に変化する1ショットパルスをいう。以下、Lレベル、Hレベル、Lレベルの順に変化する波形をLHL波形と称し、Hレベル、Lレベル、Hレベルの順に変化する波形をHLH波形と称する。   Note that a one-cycle pulse is a one-shot pulse that changes in the order of L level, H level, L level or H level, L level, H level in one cycle of a clock signal. Hereinafter, a waveform that changes in the order of L level, H level, and L level is called an LHL waveform, and a waveform that changes in the order of H level, L level, and H level is called an HLH waveform.

キャリブレーション回路33は、各レジスタ35に保持された1サイクルパルスの信号波形に基づいて、ビット信号ごとの有効ウィンドウのサイズ(有効ウィンドウの幅とも称する)を計算する。キャリブレーション回路33は、計算した有効ウィンドウサイズに基づいて、遅延回路34の遅延量を表す遅延コードの最適値を決定する。   The calibration circuit 33 calculates the effective window size (also referred to as the effective window width) for each bit signal based on the signal waveform of the one-cycle pulse held in each register 35. The calibration circuit 33 determines the optimum value of the delay code representing the delay amount of the delay circuit 34 based on the calculated effective window size.

[遅延回路およびレジスタの回路構成例]
図3は、図2の遅延回路およびレジスタの具体的構成例を示す回路図である。図3を参照して、図2の遅延回路34は、信号伝送経路である遅延線50と、マルチプレクサ51とを含む。
[Example of circuit configuration of delay circuit and register]
FIG. 3 is a circuit diagram showing a specific configuration example of the delay circuit and the register of FIG. Referring to FIG. 3, delay circuit 34 of FIG. 2 includes a delay line 50 as a signal transmission path and a multiplexer 51.

遅延線50は、互いに縦続接続された複数の遅延素子D1〜D11,DOを含む。遅延素子D1〜D11,DOについて、総称する場合またはいずれか1つを示す場合に遅延素子Dと記載する。遅延素子Dは、たとえば、偶数個のCMOS(Complementary Metal Oxide Semiconductor)インバータを直列に接続することによって構成されたバッファである。遅延線50の一端(すなわち、図3の遅延素子D1側)から入力ビット信号DATA_inが入力される。   Delay line 50 includes a plurality of delay elements D1 to D11 and DO connected in cascade. The delay elements D <b> 1 to D <b> 11 and DO are collectively referred to as “delay element D” when they are collectively referred to or when any one is indicated. The delay element D is, for example, a buffer configured by connecting an even number of complementary metal oxide semiconductor (CMOS) inverters in series. An input bit signal DATA_in is input from one end of the delay line 50 (that is, the delay element D1 side in FIG. 3).

マルチプレクサ51には、遅延素子D1〜D11,DOの各々の出力信号が入力される。マルチプレクサ51は、遅延コードDCに応じてこれらの遅延素子Dの出力信号のうちの1つを選択し、選択した信号を出力ビット信号DATA_outとして出力する。いずれの遅延素子Dの出力信号を出力するかに応じて、出力ビット信号DATA_outの遅延量を変更することができる。   The output signals of the delay elements D1 to D11 and DO are input to the multiplexer 51. The multiplexer 51 selects one of these output signals of the delay element D according to the delay code DC, and outputs the selected signal as an output bit signal DATA_out. The delay amount of the output bit signal DATA_out can be changed according to which output signal of the delay element D is output.

図2のレジスタ35は、複数のフリップフロップFF1〜FF11と、トリガ生成回路40とを含む。フリップフロップFF1〜FF11について、総称する場合またはいずれか1つを示す場合にフリップフロップFFと記載する。なお、本明細書では、便宜上、トリガ生成回路40をレジスタ35の構成の一部として記載しているが、トリガ生成回路40をレジスタ35とは別個の構成と捉えてもよい。   2 includes a plurality of flip-flops FF1 to FF11 and a trigger generation circuit 40. The flip-flops FF1 to FF11 are referred to as flip-flops FF when they are collectively referred to or when any one is indicated. In this specification, for convenience, the trigger generation circuit 40 is described as a part of the configuration of the register 35, but the trigger generation circuit 40 may be regarded as a configuration separate from the register 35.

フリップフロップFF1〜FF11は、遅延素子D1〜D11にそれぞれ対応して設けられる。各フリップフロップFFは、共通のトリガ信号cal_smpl_trgに応答して、対応する遅延素子Dの出力信号の論理値を保持する。具体的に図3の例では、各フリップフロップFFは、共通のトリガ信号cal_smpl_trgの立上がりエッジのタイミングで、対応する遅延素子Dの出力信号を保持する。なお、図3の場合とは異なるが、フリップフロップFFは、トリガ信号cal_smpl_trgの立下がりエッジのタイミングで、対応する遅延素子Dの出力信号を保持するように構成されていてもよい。   The flip-flops FF1 to FF11 are provided corresponding to the delay elements D1 to D11, respectively. Each flip-flop FF holds the logical value of the output signal of the corresponding delay element D in response to the common trigger signal cal_smpl_trg. Specifically, in the example of FIG. 3, each flip-flop FF holds the output signal of the corresponding delay element D at the timing of the rising edge of the common trigger signal cal_smpl_trg. Note that, although different from the case of FIG. 3, the flip-flop FF may be configured to hold the output signal of the corresponding delay element D at the timing of the falling edge of the trigger signal cal_smpl_trg.

トリガ生成回路40は、対応する遅延線50を伝送中のビット信号の立上がりエッジまたは立下がりエッジに基づいてトリガ信号cal_smpl_trgを生成する。より詳細には、トリガ生成回路40は、ある特定の遅延素子D(図3の例では遅延素子D8)の出力信号の立上がりまたは立下がりのタイミングを基準にして、生成するトリガ信号cal_smpl_trgの立上がりのタイミングを決定する。   The trigger generation circuit 40 generates a trigger signal cal_smpl_trg based on a rising edge or a falling edge of the bit signal being transmitted through the corresponding delay line 50. More specifically, the trigger generation circuit 40 generates the rising edge of the trigger signal cal_smpl_trg based on the rising or falling timing of the output signal of the specific delay element D (the delay element D8 in the example of FIG. 3). Determine the timing.

ただし、実際上は、トリガ生成回路40自身の遅延のために、遅延素子D8の出力信号の立上がりまたは立下がりのタイミングよりも遅れたタイミングで、トリガ信号cal_smpl_trgがLレベルからHレベルに切り替わる。図3の例では、LHL波形を有する1サイクルパルスが入力されたときに、遅延線50の末端近くの遅延素子D11の出力信号がLレベルからHレベルに変化する直前のタイミングでトリガがかかるように、遅延素子D8の出力信号に基づいてトリガ信号cal_smpl_trgが生成されている。これによって、1サイクルパルスの立上がりエッジおよび立下がりエッジの両方を含む波形全体を、確実にレジスタ35に取り込むことができる。   However, in practice, the trigger signal cal_smpl_trg switches from the L level to the H level at a timing later than the rising or falling timing of the output signal of the delay element D8 due to the delay of the trigger generation circuit 40 itself. In the example of FIG. 3, when a one-cycle pulse having an LHL waveform is input, a trigger is activated at a timing immediately before the output signal of the delay element D11 near the end of the delay line 50 changes from L level to H level. The trigger signal cal_smpl_trg is generated based on the output signal of the delay element D8. Thus, the entire waveform including both the rising edge and the falling edge of the one-cycle pulse can be reliably captured in the register 35.

ここで、遅延素子D8の出力信号の立上がりエッジおよび立下がりエッジのうちどちらを基準にするかは、エッジ選択信号RF_SELに従って決定される。たとえば、トリガ生成回路40は、エッジ選択信号RF_SELがHレベルの場合に遅延素子D8の出力信号の立上がりを基準にし、エッジ選択信号RF_SELがLレベルの場合に遅延素子D8の出力信号の立下がりを基準にして、トリガ信号cal_smpl_trgをLレベルからHレベルに変化させる。なお、エッジ選択信号RF_SELの論理値と遅延素子D8の出力信号の立上がりおよび立下がりとの対応関係は、上記と逆であってもよい。   Here, which of the rising edge and the falling edge of the output signal of the delay element D8 is used as a reference is determined according to the edge selection signal RF_SEL. For example, the trigger generation circuit 40 uses the rising edge of the output signal of the delay element D8 as a reference when the edge selection signal RF_SEL is at the H level, and determines the falling edge of the output signal of the delay element D8 when the edge selection signal RF_SEL is at the L level. The trigger signal cal_smpl_trg is changed from the L level to the H level on the basis of the reference. Note that the correspondence between the logical value of the edge selection signal RF_SEL and the rise and fall of the output signal of the delay element D8 may be opposite to the above.

また、レジスタ35によるビット信号の取り込みを行うか否かを切り替えるために、イネーブル信号CAL_ENが用いられる。たとえば、トリガ生成回路40は、イネーブル信号CAL_ENがアサート(たとえば、Hレベル)の場合に、ビット信号に基づいてトリガ信号cal_smpl_trg信号を生成し、イネーブル信号CAL_ENがネゲート(たとえば、Lレベル)の場合に、トリガ信号cal_smpl_trgを生成しない。   In addition, the enable signal CAL_EN is used to switch whether or not the register 35 takes in the bit signal. For example, trigger generation circuit 40 generates a trigger signal cal_smpl_trg signal based on a bit signal when enable signal CAL_EN is asserted (for example, H level), and generates a signal when enable signal CAL_EN is negated (for example, L level). , Does not generate the trigger signal cal_smpl_trg.

以下、トリガ生成回路40の具体的な回路構成例について説明する。図3に示すように、トリガ生成回路40は、インバータ43と、マルチプレクサ42と、ANDゲート41とを含む。インバータ43は、遅延素子D8の出力信号の論理値と反対の論理値を有する信号(以下、論理反転信号と称する)を出力する。   Hereinafter, a specific circuit configuration example of the trigger generation circuit 40 will be described. As shown in FIG. 3, the trigger generation circuit 40 includes an inverter 43, a multiplexer 42, and an AND gate 41. Inverter 43 outputs a signal having a logic value opposite to the logic value of the output signal of delay element D8 (hereinafter, referred to as a logical inversion signal).

マルチプレクサ42は、エッジ選択信号RF_SELに応じて、遅延素子D8の出力信号およびインバータ43の出力信号(すなわち、遅延素子D8の出力信号に対する論理反転信号)の一方を出力する。以下の説明では、エッジ選択信号RF_SELがHレベルのときマルチプレクサ42は遅延素子D8の出力信号を選択し、エッジ選択信号RF_SELがLレベルのときマルチプレクサ42はインバータ43の出力信号を選択するものとする。   The multiplexer 42 outputs one of the output signal of the delay element D8 and the output signal of the inverter 43 (ie, a logically inverted signal with respect to the output signal of the delay element D8) according to the edge selection signal RF_SEL. In the following description, it is assumed that the multiplexer 42 selects the output signal of the delay element D8 when the edge selection signal RF_SEL is at the H level, and selects the output signal of the inverter 43 when the edge selection signal RF_SEL is at the L level. .

ANDゲート41は、イネーブル信号CAL_ENとマルチプレクサ42の出力信号との論理積を、トリガ信号cal_smpl_trgとして各フリップフロップFFに出力する。   The AND gate 41 outputs the logical product of the enable signal CAL_EN and the output signal of the multiplexer 42 to each flip-flop FF as a trigger signal cal_smpl_trg.

したがって、イネーブル信号CAL_ENがネゲート(Lレベル)のとき、トリガ生成回路40から各フリップフロップFFに出力される信号はLベルに固定されるので、レジスタ35には対応するビット信号が格納されない。   Therefore, when the enable signal CAL_EN is negated (L level), the signal output from the trigger generation circuit 40 to each flip-flop FF is fixed at L level, and the corresponding bit signal is not stored in the register 35.

一方、イネーブル信号CAL_ENがアサート(Hレベル)のとき、トリガ生成回路40は、マルチプレクサ42の出力信号(すなわち、遅延素子D8の出力信号またはその論理反転信号)に基づいてトリガ信号cal_smpl_trgを生成して各フリップフロップFFに出力する。この結果、トリガ信号cal_smpl_trgの立上がりエッジ(または、立下がりエッジ)のタイミングでレジスタ35にデータ信号DATAが格納される。   On the other hand, when the enable signal CAL_EN is asserted (H level), the trigger generation circuit 40 generates the trigger signal cal_smpl_trg based on the output signal of the multiplexer 42 (ie, the output signal of the delay element D8 or its logically inverted signal). Output to each flip-flop FF. As a result, the data signal DATA is stored in the register 35 at the timing of the rising edge (or falling edge) of the trigger signal cal_smpl_trg.

[遅延回路の変形例]
図3の遅延回路34は、入力ビット信号DATA_inが遅延線50の端部に入力され、出力ビット信号DATA_outが遅延線50の任意の箇所から出力可能なように構成されていた。したがって、遅延線50からの出力ビット信号DATA_outの出力位置に応じてビット信号の遅延量が決定される。なお、この回路構成の場合には、入力ビット信号DATA_inは、出力ビット信号DATA_outの出力位置にかかわらず、遅延線50の一端から他端までの全経路を伝送する。
[Modification of delay circuit]
The delay circuit 34 of FIG. 3 is configured such that the input bit signal DATA_in is input to an end of the delay line 50 and the output bit signal DATA_out can be output from an arbitrary position of the delay line 50. Therefore, the bit signal delay amount is determined according to the output position of output bit signal DATA_out from delay line 50. In this circuit configuration, the input bit signal DATA_in transmits the entire path from one end to the other end of the delay line 50 regardless of the output position of the output bit signal DATA_out.

一方、以下に示す変形例の遅延回路34Aは、入力ビット信号DATA_inは遅延線50Aの任意の箇所に入力可能であり、出力ビット信号DATA_outは遅延線50Aの端部である出力端から出力されるように構成される。したがって、遅延線50への入力ビット信号DATA_inの入力位置に応じてビット信号の遅延量が決定される。なお、この回路構成の場合には、入力ビット信号DATA_inは、遅延線50の出力端と反対側の端部に入力されない限り、遅延線50の全経路を伝送しない。以下、図面を参照して詳しく説明する。   On the other hand, in a delay circuit 34A according to a modified example described below, the input bit signal DATA_in can be input to an arbitrary portion of the delay line 50A, and the output bit signal DATA_out is output from an output terminal which is an end of the delay line 50A. It is configured as follows. Therefore, the delay amount of the bit signal is determined according to the input position of the input bit signal DATA_in to the delay line 50. In this circuit configuration, the input bit signal DATA_in is not transmitted through the entire path of the delay line 50 unless it is input to the end of the delay line 50 opposite to the output end. Hereinafter, this will be described in detail with reference to the drawings.

図4は、図3の遅延回路の変形例を示す回路図である。図4では、変形例の遅延回路34Aとともに、図3と同じ構成のレジスタ35の回路構成も示されている。   FIG. 4 is a circuit diagram showing a modification of the delay circuit of FIG. FIG. 4 also shows a circuit configuration of the register 35 having the same configuration as that of FIG. 3 together with the delay circuit 34A of the modified example.

図4を参照して、遅延回路34Aは、互いに縦続接続された複数の遅延素子D1〜D11,DOを含む。遅延素子D1〜D11,DOによって遅延線50Aが構成される。遅延素子D1は、図3の場合と同様のバッファの構成を有している。遅延素子D2〜D11,DOは、図3の場合と異なり、マルチプレクサの構成を有している。   Referring to FIG. 4, delay circuit 34A includes a plurality of delay elements D1 to D11 and DO connected in cascade. A delay line 50A is configured by the delay elements D1 to D11 and DO. The delay element D1 has the same buffer configuration as in FIG. The delay elements D2 to D11 and DO have a multiplexer configuration, unlike the case of FIG.

具体的に、遅延素子Di(i=2〜11)は、遅延コードDCに従って、入力ビット信号DATA_inと前段の遅延素子Di−1の出力信号とのうちいずれか一方を選択し、選択した信号を後段の遅延素子Dに出力する。遅延素子DOも同様に、遅延コードDCに従って、入力ビット信号DATA_inと前段の遅延素子D11の出力信号とのうちいずれか一方を選択し、選択した信号を出力ビット信号DATA_outとして出力する。   Specifically, the delay element Di (i = 2 to 11) selects one of the input bit signal DATA_in and the output signal of the preceding delay element Di-1 according to the delay code DC, and outputs the selected signal. Output to the delay element D at the subsequent stage. Similarly, the delay element DO selects one of the input bit signal DATA_in and the output signal of the preceding delay element D11 according to the delay code DC, and outputs the selected signal as the output bit signal DATA_out.

上記の回路構成において、遅延コードDCは、遅延素子D2〜D11,DOのうちどの遅延素子が選択されたか(またはいずれも非選択であるか)を表すコード番号である。たとえば、遅延コードDCによって、遅延素子D9が選択された場合には、入力ビット信号DATA_inは、遅延素子D9〜D11,DOを通過した後に、出力ビット信号DATA_outとして遅延回路34Aから出力される。   In the above circuit configuration, the delay code DC is a code number indicating which of the delay elements D2 to D11 and DO has been selected (or whether all of them are unselected). For example, when the delay element D9 is selected by the delay code DC, the input bit signal DATA_in is output from the delay circuit 34A as the output bit signal DATA_out after passing through the delay elements D9 to D11 and DO.

[インタフェース回路のキャリブレーション手順]
(1.キャリブレーション手順の概略)
次に、図2のインタフェース回路101のキャリブレーションの手順について説明する。
[Calibration procedure of interface circuit]
(1. Outline of calibration procedure)
Next, a procedure of calibration of the interface circuit 101 in FIG. 2 will be described.

図5は、インタフェース回路のキャリブレーションの手順の概略を説明するための図である。図5では、図2のストローブ信号DQSの波形と、ビット信号DATA0,DATA1,DATA2として各遅延回路34に入力される1サイクルパルスの波形とが示されている。1サイクルパルスの波形は、LHL波形の場合とHLH波形の場合とが重ねて示されている。   FIG. 5 is a diagram for explaining an outline of a procedure for calibrating the interface circuit. FIG. 5 shows the waveform of the strobe signal DQS of FIG. 2 and the waveform of one cycle pulse input to each delay circuit 34 as the bit signals DATA0, DATA1, and DATA2. The waveform of the one-cycle pulse is shown with the LHL waveform and the HLH waveform superimposed.

キャリブレーションの手順は、図5(A)に示すビットデスキューと、図5(B)に示す有効ウィンドウサイズの検出およびそれに基づくタイミング調整とに大別される。この明細書では、後者の有効ウィンドウサイズ検出およびそれに基づくタイミング調整を「データトレーニング」と称する。   The calibration procedure is roughly divided into the bit deskew shown in FIG. 5A and the detection of the effective window size shown in FIG. 5B and the timing adjustment based thereon. In this specification, the latter detection of the effective window size and the timing adjustment based thereon are referred to as “data training”.

まず、ビットデスキューについて説明する。ストローブ信号DQSおよび送信側のインタフェース回路101Aでは、ストローブ信号DQSとデータ信号DATAとは、互いに同期するように生成されている。しかし、温度および電源電圧などの変化ために、受信側のインタフェース回路101Bではストローブ信号DQSと各ビット信号DATA0〜DATA2との間にタイミングのずれ(スキュー)が生じる場合がある。そこで、位相ずれの調整(デスキュー)がビットごとに行われる(「ビットデスキュー」と称する)。   First, the bit deskew will be described. In the strobe signal DQS and the transmission-side interface circuit 101A, the strobe signal DQS and the data signal DATA are generated so as to be synchronized with each other. However, due to changes in the temperature, the power supply voltage, and the like, a timing shift (skew) may occur between the strobe signal DQS and each of the bit signals DATA0 to DATA2 in the interface circuit 101B on the receiving side. Therefore, adjustment (deskew) of the phase shift is performed for each bit (referred to as “bit deskew”).

具体的に図5(A)では、LHL波形を有する1サイクルパルスが、ビット信号DATA0,DATA1,DATA2としてビットごとに示されている。この場合、ビットごとの1サイクルパルスがLレベルからHレベルに変化するタイミングがストローブ信号DQSの立上がりに同期するように、ビットごとの遅延回路34_0〜34_2の遅延量が調整される。   Specifically, in FIG. 5A, a one-cycle pulse having an LHL waveform is shown for each bit as bit signals DATA0, DATA1, and DATA2. In this case, the delay amount of the delay circuits 34_0 to 34_2 for each bit is adjusted such that the timing at which the one-cycle pulse for each bit changes from the L level to the H level is synchronized with the rising of the strobe signal DQS.

なお、図5(A)の場合とは逆の波形であるHLH波形を有する1サイクルパルスの場合には、ビットごとの1サイクルパルスがHレベルからLレベルに変化するタイミングがストローブ信号DQSの立上がりに同期するように、遅延回路34_0〜34_2の遅延量が調整される。   In the case of a one-cycle pulse having an HLH waveform that is the reverse of the case of FIG. 5A, the timing at which the one-cycle pulse for each bit changes from the H level to the L level is the rising edge of the strobe signal DQS. The delay amounts of the delay circuits 34 </ b> _ <b> 0 to 34 </ b> _ <b> 2 are adjusted so as to synchronize with.

次に、データトレーニングについて説明する。受信側のインタフェース回路101Bでは、一般的には、各ビット信号の有効ウィンドウ(図5で斜線で示している範囲)の中心で各ビット信号がサンプリングされるように、ストローブ信号DQSと各ビット信号との間のタイミングが調整される。ところが、温度および電源電圧などの変化ために、ビットごとに有効ウィンドウのサイズが異なる場合がある。そこで、ビットごとに有効ウィンドウサイズを求め、最小となる有効ウィンドウの中心位置で各ビット信号がサンプリングされるように、ストローブ信号DQSと各ビット信号との間のタイミングが調整される。   Next, data training will be described. In the interface circuit 101B on the receiving side, generally, the strobe signal DQS and each bit signal are sampled so that each bit signal is sampled at the center of the effective window (the area shown by hatching in FIG. 5) of each bit signal. The timing between is adjusted. However, the size of the effective window may be different for each bit due to changes in temperature, power supply voltage, and the like. Therefore, the effective window size is determined for each bit, and the timing between the strobe signal DQS and each bit signal is adjusted so that each bit signal is sampled at the center position of the minimum effective window.

具体的に図5(B)に示す例では、ビット信号DATA0〜DATA2のうちビット信号DATA1の有効ウィンドウサイズが最小である。したがって、ビット信号DATA1の有効ウィンドウの中央位置でサンプリングされるように、遅延回路34_Sの遅延量が調整される。これによって、ストローブ信号DQSの立上がりのタイミングが時刻t1から時刻t2に変化する。   Specifically, in the example shown in FIG. 5B, the effective window size of the bit signal DATA1 among the bit signals DATA0 to DATA2 is the smallest. Therefore, the delay amount of the delay circuit 34_S is adjusted such that the sampling is performed at the center position of the effective window of the bit signal DATA1. Thus, the rising timing of strobe signal DQS changes from time t1 to time t2.

なお、ストローブ信号DQSとデータ信号DATAとの位相関係は相対的なものなので、遅延回路34_Sによってストローブ信号DQSを遅らせるのに代えて、遅延回路34_0〜34_2によって同じシフト量だけビット信号DATA0〜DATA2を進めるように調整にしてもよい。   Since the phase relationship between the strobe signal DQS and the data signal DATA is relative, instead of delaying the strobe signal DQS by the delay circuit 34_S, the bit signals DATA0 to DATA2 are shifted by the same shift amount by the delay circuits 34_0 to 34_2. Adjustments may be made to proceed.

(2.有効ウィンドウサイズの計算方法)
次に、レジスタ35に保持された1サイクルパルスに基づいて有効ウィンドウサイズを計算する手順について説明する。
(2. Calculation method of effective window size)
Next, a procedure for calculating the effective window size based on the one-cycle pulse held in the register 35 will be described.

図6は、レジスタを構成する各フリップフロップに保持される信号の一例を示す図である。図7は、図6の例において、入力データ信号、各遅延素子の出力信号、およびトリガ信号の波形を示す図である。   FIG. 6 is a diagram showing an example of a signal held in each flip-flop constituting the register. FIG. 7 is a diagram showing waveforms of an input data signal, an output signal of each delay element, and a trigger signal in the example of FIG.

図6および図7を参照して、図7の時刻t11でトリガ信号cal_smpl_trgがLレベルからHレベルに立上がる。時刻t11では、遅延素子D10の出力信号はLレベルからHレベルに変化する直後の状態であり、遅延素子D11の出力信号はLレベルからHレベルに変化する直前の状態である。したがって、トリガ信号cal_smpl_trgの立上がりに応答して、対応するフリップフロップFF11に保持される信号の論理値はLレベルであり、フリップフロップFF10に保持される信号の論理値はHレベルである。   Referring to FIGS. 6 and 7, at time t11 in FIG. 7, trigger signal cal_smpl_trg rises from L level to H level. At time t11, the output signal of the delay element D10 is in a state immediately after changing from L level to H level, and the output signal of the delay element D11 is in a state immediately before changing from L level to H level. Therefore, in response to the rise of trigger signal cal_smpl_trg, the logic value of the signal held in corresponding flip-flop FF11 is at L level, and the logic value of the signal held in flip-flop FF10 is at H level.

また、時刻t11において、遅延素子D6〜D9の出力信号は、LレベルからHレベルに切り替わった後、Hレベルのまま維持された状態である。したがって、時刻t11におけるトリガ信号cal_smpl_trgの立上がりに応答して、対応のフリップフロップFF6〜FF9に保持される信号の論理値はHレベルである。   At time t11, the output signals of the delay elements D6 to D9 are switched from the L level to the H level, and are maintained at the H level. Therefore, in response to the rise of trigger signal cal_smpl_trg at time t11, the logic values of the signals held in corresponding flip-flops FF6 to FF9 are at the H level.

また、時刻t11において、遅延素子D5の出力信号は、HレベルからLレベルに戻る直前の状態であり、遅延素子D4の出力信号は、HレベルからLレベルに戻った直後の状態である。したがって、トリガ信号cal_smpl_trgの立上がりに応答して、対応するフリップフロップFF5に保持される信号の論理値はHレベルであり、フリップフロップFF4に保持される信号の論理値はLレベルである。   At time t11, the output signal of the delay element D5 is in a state immediately before returning from the H level to the L level, and the output signal of the delay element D4 is in a state immediately after returning to the L level from the H level. Therefore, in response to the rise of trigger signal cal_smpl_trg, the logic value of the signal held in corresponding flip-flop FF5 is at H level, and the logic value of the signal held in flip-flop FF4 is at L level.

また、時刻t11において、遅延素子D1〜D3の出力信号は、HレベルからLレベルに戻った後、Lレベルのまま維持された状態である。したがって、時刻t11におけるトリガ信号cal_smpl_trgの立上がりに応答して、対応のフリップフロップFF1〜FF3に保持される信号の論理値はLレベルである。   Further, at time t11, the output signals of the delay elements D1 to D3 are maintained at the L level after returning from the H level to the L level. Therefore, in response to the rise of trigger signal cal_smpl_trg at time t11, the logic values of the signals held in corresponding flip-flops FF1 to FF3 are at L level.

よって、以上説明した結果から、Hレベルの信号を保持している遅延素子D5〜D11の遅延時間が有効ウィンドウサイズに対応することがわかる。   Therefore, it can be seen from the results described above that the delay time of the delay elements D5 to D11 holding the H level signal corresponds to the effective window size.

(3.データトレーニングの手順)
図8は、データトレーニングの手順を示すフローチャートである。以下、図2、図3および図8などを参照して、これまで説明したデータトレーニングの手順を総括する。
(3. Data training procedure)
FIG. 8 is a flowchart showing the procedure of data training. Hereinafter, the data training procedure described so far will be summarized with reference to FIGS.

以下のデータトレーニングは、インタフェース回路の初期化時のキャリブレーション期間において、さらには、その後に遅延量にずれが生じた場合の再キャリブレーションの期間において実行される。また、以下の説明では、図1のインタフェース回路101Aを送信側とし、インタフェース回路101Bを受信側とする。   The following data training is executed during a calibration period at the time of initialization of the interface circuit, and further during a re-calibration period when a delay occurs in the delay amount. In the following description, the interface circuit 101A in FIG. 1 is the transmitting side, and the interface circuit 101B is the receiving side.

なお、図5(A)を参照して説明したビットデスキューは、スキューが小さく必要とされないか、または既に完了しているものとする。ビットデスキューを含めたキャリブレーションの手順については、第4および第5の実施形態で説明する。   It is assumed that the bit deskew described with reference to FIG. 5A has a small skew and is not required or has already been completed. The calibration procedure including the bit deskew will be described in the fourth and fifth embodiments.

まず、キャリブレーション期間の最初に、受信側のインタフェース回路101Bのキャリブレーション回路33は、イネーブル信号CAL_ENをアサート(たとえば、Hレベル)にする。   First, at the beginning of the calibration period, the calibration circuit 33 of the interface circuit 101B on the receiving side asserts the enable signal CAL_EN (for example, H level).

また、送信側のインタフェース回路101Aから受信側のインタフェース回路101Bに出力する1サイクルパルスとしてLHL波形のパルス信号を用いる場合には、キャリブレーション回路33は、遅延素子D8の出力信号がマルチプレクサ42によって選択されるようにエッジ選択信号RF_SELの論理値を設定する。1サイクルパルスがHLH波形の場合には、キャリブレーション回路33は、マルチプレクサ42によってインバータ43の出力信号(すなわち、遅延素子D8の出力信号の論理反転信号)が選択されるようにエッジ選択信号RF_SELの論理値を設定する。   When a pulse signal having an LHL waveform is used as one cycle pulse output from the interface circuit 101A on the transmitting side to the interface circuit 101B on the receiving side, the calibration circuit 33 selects the output signal of the delay element D8 by the multiplexer 42. The logical value of the edge selection signal RF_SEL is set so that When the one-cycle pulse has the HLH waveform, the calibration circuit 33 outputs the edge selection signal RF_SEL so that the multiplexer 42 selects the output signal of the inverter 43 (that is, the logically inverted signal of the output signal of the delay element D8). Set a logical value.

図8のステップS101において、図1の送信側のインタフェース回路101Aは、受信側のインタフェース回路101Bに向けて、ビットごとに1サイクルパルスを送信する。前述のように、1サイクルパルスは、LHL波形であってもよいし、HLH波形であってもよい。送信されたパルス信号は、ビットごとに設けられた遅延回路34に入力される。   In step S101 in FIG. 8, the transmission-side interface circuit 101A in FIG. 1 transmits a one-cycle pulse for each bit to the reception-side interface circuit 101B. As described above, the one-cycle pulse may have an LHL waveform or an HLH waveform. The transmitted pulse signal is input to a delay circuit 34 provided for each bit.

次のステップS102において、各レジスタ35に設けられたトリガ生成回路40は、対応する遅延回路34の遅延線50を伝送中の1サイクルパルスの立上がりエッジまたは立下がりエッジに基づいてトリガ信号cal_smpl_trgを生成する。各レジスタ35は、生成されたトリガ信号cal_smpl_trgに応答して、対応する遅延回路34を伝送中の1サイクルパルスを、伝送経路上の位置に対応付けて保持する。   In the next step S102, the trigger generation circuit 40 provided in each register 35 generates the trigger signal cal_smpl_trg based on the rising edge or the falling edge of the one-cycle pulse being transmitted through the delay line 50 of the corresponding delay circuit 34. I do. Each register 35 holds, in response to the generated trigger signal cal_smpl_trg, the one-cycle pulse being transmitted through the corresponding delay circuit 34 in association with the position on the transmission path.

より詳細には、各遅延回路34は、縦続接続された複数の遅延素子D1〜D11,DOを含む遅延線50を備える。各レジスタ35は、遅延素子D1〜遅延素子D11にそれぞれ対応するフリップフロップFF1〜FF11を備える。各フリップフロップFFは、対応する遅延素子Dの出力信号の論理値を、トリガ信号cal_smpl_trgが活性化するタイミングで保持する。   More specifically, each delay circuit 34 includes a delay line 50 including a plurality of delay elements D1 to D11 and DO connected in cascade. Each register 35 includes flip-flops FF1 to FF11 corresponding to the delay elements D1 to D11, respectively. Each flip-flop FF holds the logic value of the output signal of the corresponding delay element D at the timing when the trigger signal cal_smpl_trg is activated.

ここで、トリガ生成回路40は、1サイクルパルスがLHL波形の場合には、遅延線50の末端近傍に位置する遅延素子D11の出力信号がLレベルからHレベルに切り替わるタイミング付近で、トリガ信号cal_smpl_trgが活性化するように構成されている。逆に、1サイクルパルスがHLH波形の場合には、トリガ生成回路40は、遅延線50の末端近傍に位置する遅延素子D11の出力信号がHレベルからLレベルに切り替わるタイミング付近で、トリガ信号cal_smpl_trgが活性化するように構成されている。これによって、各レジスタ35は、1サイクルパルスの波形の全体(すなわち、立上がりエッジから立下がりエッジまで)を確実に保持することができる。   Here, when the one-cycle pulse has the LHL waveform, the trigger generation circuit 40 generates the trigger signal cal_smpl_trg near the timing when the output signal of the delay element D11 located near the end of the delay line 50 switches from L level to H level. Are configured to be activated. Conversely, when the one-cycle pulse has the HLH waveform, the trigger generation circuit 40 generates the trigger signal cal_smpl_trg near the timing at which the output signal of the delay element D11 located near the end of the delay line 50 switches from the H level to the L level. Are configured to be activated. Thus, each register 35 can reliably hold the entire waveform of the one-cycle pulse (that is, from the rising edge to the falling edge).

その次のステップS103において、キャリブレーション回路33は、各レジスタ35に格納されたデータに基づいて、ビットごとの有効ウィンドウサイズ(すなわち、1サイクルパルスの立上がりから立下がりまでの間隔)を計算する。   In the next step S103, the calibration circuit 33 calculates the effective window size for each bit (that is, the interval from the rise to the fall of one cycle pulse) based on the data stored in each register 35.

その次のステップS104において、キャリブレーション回路33は、ビットごとに算出された有効ウィンドウサイズの最小値の半分を、各ビット信号に対するストローブ信号DQSの遅延量に設定する。この場合、キャリブレーション回路33は、各ビット信号とストローブ信号DQSとの相対的な関係がそのような遅延量となるように、ストローブ信号DQS用の遅延回路34_Sのための遅延コードを設定してもよいし、各ビット信号用の遅延回路34_0〜34_2のための遅延コードを設定してもよいし、両方の遅延コードを設定してもよい。   In the next step S104, the calibration circuit 33 sets half of the minimum value of the effective window size calculated for each bit as the delay amount of the strobe signal DQS for each bit signal. In this case, the calibration circuit 33 sets a delay code for the delay circuit 34_S for the strobe signal DQS such that the relative relationship between each bit signal and the strobe signal DQS is such a delay amount. Alternatively, a delay code for each bit signal delay circuit 34_0 to 34_2 may be set, or both delay codes may be set.

[第1の実施形態の効果]
上記のとおり、第1の実施形態の半導体装置によれば、ビットごとに設けられた遅延回路に1サイクルパルスを1度だけ入力するだけで、ビットごとの有効ウィンドウサイズを決定することができる。したがって、データトレーニング(すなわち、ストローブ信号の遅延量の設定)に要する時間を極めて短縮することができる。この結果、インタフェース回路の初期化時のキャリブレーションに要する時間を短縮することができ、さらには、再キャリブレーション時の待ち時間を短縮することができる。
[Effect of First Embodiment]
As described above, according to the semiconductor device of the first embodiment, the effective window size for each bit can be determined only by inputting one cycle pulse once to the delay circuit provided for each bit. Therefore, the time required for data training (that is, setting of the amount of delay of the strobe signal) can be significantly reduced. As a result, the time required for calibration when initializing the interface circuit can be reduced, and the waiting time for re-calibration can be reduced.

<第2の実施形態>
第2の実施形態では、第1の実施形態で説明したデータトレーニングに、データ信号DATA用のレシーバ31に入力する参照電圧の最適化の手順を組み合わせる場合について説明する。この明細書では、レシーバ31に入力する参照電圧の最適化の手順を、「参照電圧トレーニング」と称する。
<Second embodiment>
In the second embodiment, a case will be described in which the data training described in the first embodiment is combined with a procedure for optimizing a reference voltage input to the receiver 31 for the data signal DATA. In this specification, the procedure for optimizing the reference voltage input to the receiver 31 is referred to as “reference voltage training”.

[最適な参照電圧について]
図9は、最適な参照電圧の大きさについて説明するための図である。具体的に、図9では、クロック信号が高周波の場合において、LHL波形を有する1サイクルパルス70の時間変化の模式図と、HLH波形を有する1サイクルパルス71の時間変化の模式図とが重ねて示されている。図9の縦軸は電圧である。
[Optimal reference voltage]
FIG. 9 is a diagram for describing an optimal magnitude of the reference voltage. Specifically, in FIG. 9, when the clock signal has a high frequency, a schematic diagram of the time change of the one-cycle pulse 70 having the LHL waveform and a schematic diagram of the time change of the one-cycle pulse 71 having the HLH waveform overlap. It is shown. The vertical axis in FIG. 9 is the voltage.

一般に、クロック信号の周波数が高くなるほど、データ信号DATAのHレベルとLレベルとの切り替わりが緩やかになる。このため、レシーバ31に入力される参照電圧を適切な値に設定しないと有効ウィンドウサイズが小さくなってしまい、結果として、ストローブ信号DQSの遅延量の設定が困難になる。   In general, as the frequency of the clock signal increases, the switching between the H level and the L level of the data signal DATA becomes gentler. Therefore, unless the reference voltage input to the receiver 31 is set to an appropriate value, the effective window size becomes small, and as a result, it becomes difficult to set the delay amount of the strobe signal DQS.

たとえば、図9の例では、参照電圧をV1に設定したときの有効ウィンドウサイズはT1で表される。この場合、1サイクルパルスがLHL波形を有する場合(70)のウィンドウサイズと1サイクルパルスがHLH波形を有する場合(71)のウィンドウサイズとは同じである。   For example, in the example of FIG. 9, the effective window size when the reference voltage is set to V1 is represented by T1. In this case, the window size when the one-cycle pulse has the LHL waveform (70) is the same as the window size when the one-cycle pulse has the HLH waveform (71).

一方、参照電圧V2に設定した場合には、LHL波形を有する1サイクルパルス70の場合のウィンドウサイズはT2となり、HLH波形を有する1サイクルパルス71の場合のウィンドウサイズはT3(ただし、T3>T2)となる。したがって、最終的に、参照電圧V2の場合の有効ウィンドウサイズは両者の共通部分であるT2となり、参照電圧がV1の場合の有効ウィンドウサイズであるT1よりも小さくなる。   On the other hand, when the reference voltage V2 is set, the window size for the one-cycle pulse 70 having the LHL waveform is T2, and the window size for the one-cycle pulse 71 having the HLH waveform is T3 (where T3> T2 ). Therefore, finally, the effective window size in the case of the reference voltage V2 is T2 which is a common part of both, and is smaller than the effective window size T1 in the case of the reference voltage V1.

以上から、有効ウィンドウサイズを最大にするには、参照電圧をV1に設定するのが望ましい。以下、有効ウィンドウサイズの最適化(すなわち、参照電圧トレーニング)の手順について説明する。   From the above, in order to maximize the effective window size, it is desirable to set the reference voltage to V1. Hereinafter, a procedure of optimizing the effective window size (that is, reference voltage training) will be described.

[参照電圧トレーニングの手順]
図10は、参照電圧トレーニングの手順を説明するためのフローチャートである。以下の説明では、半導体装置100インタフェース回路101の構成は第1の実施形態の場合と同じであるので、第1の実施形態の図1〜図3を適宜参照する。また、図1のインタフェース回路101Aを送信側とし、インタフェース回路101Bを受信側とする。図5(A)を参照しながら説明したビットデスキューは、スキューが小さく必要とされないか、または既に完了しているものとする。
[Reference voltage training procedure]
FIG. 10 is a flowchart for explaining the procedure of reference voltage training. In the following description, since the configuration of the interface circuit 101 of the semiconductor device 100 is the same as that of the first embodiment, FIGS. 1 to 3 of the first embodiment will be appropriately referred to. The interface circuit 101A in FIG. 1 is the transmitting side, and the interface circuit 101B is the receiving side. It is assumed that the bit deskew described with reference to FIG. 5A has a small skew and is not required or has already been completed.

まず、キャリブレーション期間の最初に、図2に示す受信側のインタフェース回路101Bのキャリブレーション回路33は、イネーブル信号CAL_ENをアサート(たとえば、Hレベル)にする。   First, at the beginning of the calibration period, the calibration circuit 33 of the interface circuit 101B on the receiving side shown in FIG. 2 asserts the enable signal CAL_EN (for example, H level).

次に、受信側のキャリブレーション回路33は、参照電圧コードを順次変更しながら、ステップS202〜S205を繰り返す(図10のステップS201〜S206に対応する)。参照電圧コードは図2の参照電圧生成器32から出力可能な参照電圧VREFに対応しており、参照電圧コードを変化させることによって、参照電圧VREFを最小値から最大値まで変化させることができる。   Next, the calibration circuit 33 on the receiving side repeats steps S202 to S205 while sequentially changing the reference voltage code (corresponding to steps S201 to S206 in FIG. 10). The reference voltage code corresponds to the reference voltage VREF that can be output from the reference voltage generator 32 in FIG. 2, and the reference voltage VREF can be changed from the minimum value to the maximum value by changing the reference voltage code.

具体的に、ステップS202において、キャリブレーション回路33は、参照電圧コードを設定することによって、参照電圧コードに応じた電圧値を参照電圧生成器32に出力させる。   Specifically, in step S202, the calibration circuit 33 causes the reference voltage generator 32 to output a voltage value corresponding to the reference voltage code by setting the reference voltage code.

次のステップS203において、送信側のインタフェース回路101Aは、受信側のインタフェース回路101Bに向けて、ビットごとにLHL波形の1サイクルパルスを送信する。受信側のインタフェース回路101Bのキャリブレーション回路33は、ビットごとに受信したLHL波形の1サイクルパルスを用いて、図8のステップS101〜S103で説明した手順でデータトレーニングを実行する。これによって、ビットごとにウィンドウサイズが決定される。   In the next step S203, the transmission-side interface circuit 101A transmits a one-cycle pulse of the LHL waveform for each bit to the reception-side interface circuit 101B. The calibration circuit 33 of the interface circuit 101B on the receiving side executes data training in the procedure described in steps S101 to S103 of FIG. 8 using the one-cycle pulse of the LHL waveform received for each bit. Thus, the window size is determined for each bit.

その次のステップS204において、送信側のインタフェース回路101Aは、受信側のインタフェース回路101Bに向けて、ビットごとにHLH波形の1サイクルパルスを送信する。受信側のインタフェース回路101Bのキャリブレーション回路33は、ビットごとに受信したHLH波形の1サイクルパルスを用いて、図8のステップS101〜S103で説明した手順でデータトレーニングを実行する。これによって、ビットごとにウィンドウサイズが決定される。   In the next step S204, the transmitting-side interface circuit 101A transmits a one-cycle pulse of the HLH waveform for each bit to the receiving-side interface circuit 101B. The calibration circuit 33 of the interface circuit 101B on the receiving side performs data training using the one-cycle pulse of the HLH waveform received bit by bit according to the procedure described in steps S101 to S103 in FIG. Thus, the window size is determined for each bit.

その次のステップS205において、キャリブレーション回路33は、LHL波形の場合のウィンドウサイズとHLH波形の場合のウィンドウサイズとの小さいほうを、現在の参照電圧コードに対応する有効ウィンドウサイズに決定する。より正確には、LHL波形の場合のウィンドウとHLH波形の場合のウィンドウとの共通部分(すなわち、両者の論理積)が最終的な有効ウィンドウに相当する。   In the next step S205, the calibration circuit 33 determines the smaller of the window size for the LHL waveform and the window size for the HLH waveform as the effective window size corresponding to the current reference voltage code. More precisely, the common part of the window in the case of the LHL waveform and the window in the case of the HLH waveform (that is, the logical product of both) corresponds to the final effective window.

以上のステップS202〜S205が、各参照電圧コードに対して実行される。最終的にステップS207において、キャリブレーション回路33は、有効ウィンドウサイズが最大の場合に対応する参照電圧コードを選択し、参照電圧生成器32に対して設定する参照電圧コードを、この選択した参照電圧コードの値に決定する。   The above steps S202 to S205 are executed for each reference voltage code. Finally, in step S207, the calibration circuit 33 selects a reference voltage code corresponding to the case where the effective window size is the maximum, and replaces the reference voltage code set for the reference voltage generator 32 with the selected reference voltage. Determine the value of the code.

[第2の実施形態の効果]
以上のとおり、第2の実施形態では、参照電圧トレーニングとデータトレーニングとを組み合わせてキャリブレーションを行う場合について説明した。この場合、設定可能な全参照電圧コードの各々に対してデータトレーニングを実行することになるが、ビットごとに設けられた遅延回路に1サイクルパルスを入力するだけで、ビットごとの有効ウィンドウサイズを決定することができる。したがって、インタフェース回路の初期化時のキャリブレーションに要する時間を短縮することができ、さらには、再キャリブレーション時の待ち時間を短縮することができる。
[Effect of Second Embodiment]
As described above, in the second embodiment, the case where the calibration is performed by combining the reference voltage training and the data training has been described. In this case, data training is performed for each of the settable reference voltage codes. However, by inputting a one-cycle pulse to a delay circuit provided for each bit, the effective window size for each bit can be reduced. Can be determined. Therefore, the time required for calibration at the time of initialization of the interface circuit can be reduced, and the waiting time at the time of re-calibration can be reduced.

<第3の実施形態>
第3の実施形態では、キャリブレーション時だけではなく、半導体装置の通常使用時においてもデータ信号DATAを常時観測することによって、データ信号DATAの有効ウィンドウサイズが閾値を超えて変化した場合には、再キャリブレーションを行う場合について説明する。
<Third embodiment>
In the third embodiment, the data signal DATA is always observed not only at the time of calibration but also at the time of normal use of the semiconductor device, so that when the effective window size of the data signal DATA changes beyond the threshold value, The case of performing re-calibration will be described.

ここで、第3の実施形態の場合には、遅延回路34は、図3を参照して説明したように、入力ビット信号DATA_inが遅延線50の端部に入力され、出力ビット信号DATA_outが遅延線50の任意の箇所から出力可能なように構成されている必要がある。この構成の遅延回路34では、入力ビット信号DATA_inは、出力ビット信号DATA_outの出力位置にかかわらず、遅延線50の一端から他端までの全経路を伝送するので、データ信号DATAの常時観測が可能であるからである。以下、データ信号DATA信号の遅延量の検査手順について説明する。   Here, in the case of the third embodiment, the delay circuit 34 receives the input bit signal DATA_in at the end of the delay line 50 and outputs the output bit signal DATA_out as described with reference to FIG. It must be configured to be able to output from any point on the line 50. In the delay circuit 34 having this configuration, the input bit signal DATA_in is transmitted through the entire path from one end to the other end of the delay line 50 regardless of the output position of the output bit signal DATA_out, so that the data signal DATA can be constantly observed. Because it is. The procedure for checking the delay amount of the data signal DATA will be described below.

[遅延量の検査手順]
図11は、データ信号の遅延量を常時観測する手順を示すフローチャートである。
[Inspection procedure of delay amount]
FIG. 11 is a flowchart showing a procedure for constantly observing the delay amount of the data signal.

第3の実施形態では、遅延回路34の構成は図3と同じかまたはそれに類似したものに限定され、図4で説明した遅延回路34Aの構成を用いることができない。その他の装置構成は第1の実施形態の場合と同様である。したがって、以下の説明では、図1〜図3を適宜参照する。初期化時のキャリブレーションは完了しているものとする。   In the third embodiment, the configuration of the delay circuit 34 is limited to the same as or similar to that of FIG. 3, and the configuration of the delay circuit 34A described in FIG. 4 cannot be used. Other device configurations are the same as in the first embodiment. Therefore, in the following description, FIGS. It is assumed that the calibration at the time of initialization has been completed.

各インタフェース回路101のキャリブレーション回路33は、イネーブル信号CAL_ENを常時アサート(たとえば、Hレベル)にする。したがって、トリガ生成回路40は、対応する遅延回路34によって受信されたビット信号が、LレベルからHレベルに変化するタイミングまたはLレベルからHレベルに変化するタイミングでトリガ信号cal_smpl_trgを生成する。このトリガ信号cal_smpl_trgに応答して、レジスタ35は遅延線50を伝送中のビット信号を、遅延線50上の位置に対応付けて取り込む。   The calibration circuit 33 of each interface circuit 101 always asserts the enable signal CAL_EN (for example, H level). Therefore, the trigger generation circuit 40 generates the trigger signal cal_smpl_trg at the timing when the bit signal received by the corresponding delay circuit 34 changes from the L level to the H level or from the L level to the H level. In response to the trigger signal cal_smpl_trg, the register 35 captures the bit signal being transmitted through the delay line 50 in association with the position on the delay line 50.

ステップS301において、キャリブレーション回路33は、ビットごとにレジスタ35に保持されているデータを取り込む。なお、実使用時のビット信号の波形は様々なものがあるが、保持データの中に立上がりエッジと立下がりエッジとを含んでいるものであれば、遅延量の検査に用いることができる。   In step S301, the calibration circuit 33 takes in the data held in the register 35 for each bit. There are various types of bit signal waveforms in actual use. If the stored data includes a rising edge and a falling edge, the bit signal can be used for testing the amount of delay.

次のステップS302において、キャリブレーション回路33は、取り込んだビット信号のデータが、以前と異なっているか判定する。この結果、誤差範囲を超えるような違いが生じていない場合には、現在の遅延量の設定値が維持される。その後、遅延量の検査手順はステップS301に戻る。   In the next step S302, the calibration circuit 33 determines whether the data of the acquired bit signal is different from the previous data. As a result, if there is no difference exceeding the error range, the current set value of the delay amount is maintained. Thereafter, the procedure for checking the delay amount returns to step S301.

ステップS302の判定の結果、誤差範囲を超える違いが生じている場合には、キャリブレーション回路33は、再キャリブレーションを実行する。具体的に、ステップS303において、キャリブレーション回路33は、各レジスタ35に格納されたデータに基づいて、ビットごとの有効ウィンドウサイズを計算する。次のステップS304において、キャリブレーション回路33は、ビットごとに算出された有効ウィンドウサイズの最小値の半分を、各ビット信号に対するストローブ信号DQSの遅延量に設定する。   If the result of determination in step S302 is that there is a difference exceeding the error range, the calibration circuit 33 executes re-calibration. Specifically, in step S303, the calibration circuit 33 calculates an effective window size for each bit based on the data stored in each register 35. In the next step S304, the calibration circuit 33 sets half of the minimum value of the effective window size calculated for each bit as the delay amount of the strobe signal DQS for each bit signal.

[第3の実施形態の効果]
環境温度、電源電圧などが時間的に変動することによって、有効ウィンドウサイズは劣化する。第3の実施形態の半導体装置100では、データ信号DATAの遅延量を常時観測することによって、遅延量に変動が生じた場合には、再キャリブレーションを行う。これによって、常に最適な状態でインタフェース回路101を動作させることが可能になる。
[Effects of Third Embodiment]
As the environmental temperature, the power supply voltage and the like fluctuate with time, the effective window size deteriorates. In the semiconductor device 100 according to the third embodiment, when the delay amount fluctuates by constantly observing the delay amount of the data signal DATA, recalibration is performed. This makes it possible to always operate the interface circuit 101 in an optimal state.

<第4の実施形態>
第4の実施形態では、レジスタ35を構成する各フリップフロップFFに供給するためのトリガ信号として、ストローブ信号DQSが用いられる。これによって、各レジスタ35に保持されたデータに基づいて、ビットデスキューとデータトレーニングとの両方を行うことができる。以下、図面を参照して具体的に説明する。
<Fourth embodiment>
In the fourth embodiment, a strobe signal DQS is used as a trigger signal for supplying each flip-flop FF included in the register 35. Thereby, based on the data held in each register 35, both bit deskew and data training can be performed. Hereinafter, a specific description will be given with reference to the drawings.

[受信制御回路の構成]
図12は、第4の実施形態の半導体装置において、インタフェース回路の受信制御回路の構成を示すブロック図である。
[Configuration of reception control circuit]
FIG. 12 is a block diagram illustrating a configuration of a reception control circuit of an interface circuit in the semiconductor device according to the fourth embodiment.

図12のインタフェース回路101の受信制御回路110は、図2のインタフェース回路101の受信制御回路110に対応するものである。ただし、各レジスタの構成が、図12の受信制御回路110と図2の受信制御回路110とで異なる。   The reception control circuit 110 of the interface circuit 101 shown in FIG. 12 corresponds to the reception control circuit 110 of the interface circuit 101 shown in FIG. However, the configuration of each register is different between the reception control circuit 110 of FIG. 12 and the reception control circuit 110 of FIG.

具体的に、図12の受信制御回路110は、遅延回路34_Sを通過したストローブ信号DQSが各レジスタ35Aに取り込まれる点で、図2の受信制御回路110と異なる。この場合、各レジスタ35Aは、ストローブ信号DQSの立上がりをトリガとして、対応する遅延回路34の信号伝送経路である遅延線50上を伝送中のビット信号を、遅延線50上の位置に対応付けて保持可能なように構成されている。   Specifically, the reception control circuit 110 in FIG. 12 differs from the reception control circuit 110 in FIG. 2 in that the strobe signal DQS passed through the delay circuit 34_S is taken into each register 35A. In this case, each register 35A associates a bit signal being transmitted on the delay line 50, which is a signal transmission path of the corresponding delay circuit 34, with a position on the delay line 50, triggered by the rise of the strobe signal DQS. It is configured to be able to hold.

図13は、図12のレジスタの構成を示す回路図である。図13では、図12のレジスタ35Aに加えて、遅延回路34を構成する遅延線50の構成も示されている。   FIG. 13 is a circuit diagram showing a configuration of the register of FIG. FIG. 13 also shows the configuration of the delay line 50 forming the delay circuit 34 in addition to the register 35A of FIG.

図13のレジスタ35Aでは、トリガ生成回路40Aの構成が図3のレジスタ35のトリガ生成回路40と異なる。具体的に、トリガ生成回路40Aは、ストローブ信号DQSとイネーブル信号CAL_ENとの論理積を出力するANDゲート41を含む。ANDゲート41の出力信号は、トリガ信号cal_smpl_trgとして各フリップフロップFFに入力される。   In the register 35A of FIG. 13, the configuration of the trigger generation circuit 40A is different from that of the trigger generation circuit 40 of the register 35 of FIG. Specifically, trigger generation circuit 40A includes an AND gate 41 that outputs a logical product of strobe signal DQS and enable signal CAL_EN. The output signal of the AND gate 41 is input to each flip-flop FF as a trigger signal cal_smpl_trg.

したがって、イネーブル信号CAL_ENがネゲート(Lレベル)のとき、トリガ生成回路40Aから各フリップフロップFFに出力される信号はLベルに固定されるので、レジスタ35Aを構成する複数のフリップフロップFFには対応するビット信号が格納されない。一方、イネーブル信号CAL_ENがアサート(Hレベル)のとき、トリガ生成回路40Aは、ストローブ信号DQSをトリガ信号cal_smpl_trgとして各フリップフロップFFに出力する。したがって、ストローブ信号DQSの立上がりエッジで、各フリップフロップFFは、対応する遅延素子Dの出力信号の論理値を取り込む。   Therefore, when the enable signal CAL_EN is negated (L level), the signal output from the trigger generation circuit 40A to each flip-flop FF is fixed to L-level, so that it corresponds to the plurality of flip-flops FF constituting the register 35A. Is not stored. On the other hand, when the enable signal CAL_EN is asserted (H level), the trigger generation circuit 40A outputs the strobe signal DQS to each flip-flop FF as a trigger signal cal_smpl_trg. Therefore, at the rising edge of strobe signal DQS, each flip-flop FF takes in the logic value of the output signal of corresponding delay element D.

図12および図13のその他の構成は、第1の実施形態の図2および図3の場合と同様であるので、同一または相当する部分には同一の参照符号を付して説明を繰り返さない。   Since the other configurations in FIGS. 12 and 13 are the same as those in FIGS. 2 and 3 of the first embodiment, the same or corresponding portions are denoted by the same reference characters and description thereof will not be repeated.

[キャリブレーションの手順]
次に、図12のインタフェース回路101のキャリブレーションの手順について説明する。図14は、第4の実施形態において、インタフェース回路101のキャリブレーションの手順を示すフローチャートである。以下の手順は、インタフェース回路101の初期化時のキャリブレーションとして、もしくはその後に遅延量にずれが生じた場合における再キャリブレーションとして実行される。また、以下の説明では、図1のインタフェース回路101Aを送信側とし、インタフェース回路101Bを受信側とする。
[Calibration procedure]
Next, a procedure of calibration of the interface circuit 101 in FIG. 12 will be described. FIG. 14 is a flowchart illustrating the procedure of calibration of the interface circuit 101 in the fourth embodiment. The following procedure is executed as calibration at the time of initialization of the interface circuit 101 or as re-calibration when a delay occurs in the amount of delay thereafter. In the following description, the interface circuit 101A in FIG. 1 is the transmitting side, and the interface circuit 101B is the receiving side.

図1および図12〜図14を参照して、まず、キャリブレーション期間の最初に、受信側のインタフェース回路101Bのキャリブレーション回路33は、イネーブル信号CAL_ENをアサート(たとえば、Hレベル)にする。   Referring to FIG. 1 and FIGS. 12 to 14, first, at the beginning of the calibration period, the calibration circuit 33 of the interface circuit 101B on the receiving side asserts the enable signal CAL_EN (for example, H level).

図14のステップS401において、図1の送信側のインタフェース回路101Aは、受信側のインタフェース回路101Bに向けて、ストローブ信号DQS信号を出力するとともに、ビットごとに1サイクルパルスを送信する。なお、前述のように、1サイクルパルスは、LHL波形であってもよいし、HLH波形であってもよい。送信されたストローブ信号DQS信号は、遅延回路34_Sに入力され、送信された1サイクルパルス信号は、ビットごとに設けられた遅延回路34_0〜34_2に入力される。   In step S401 in FIG. 14, the transmission-side interface circuit 101A in FIG. 1 outputs a strobe signal DQS signal to the reception-side interface circuit 101B and transmits one cycle pulse for each bit. As described above, the one-cycle pulse may have an LHL waveform or an HLH waveform. The transmitted strobe signal DQS signal is input to delay circuit 34_S, and the transmitted one-cycle pulse signal is input to delay circuits 34_0 to 34_2 provided for each bit.

次のステップS402において、各レジスタ35Aは、ストローブ信号DQSの立上がりエッジをトリガとして、対応する遅延回路34を伝送中の1サイクルパルスを保持する。より詳細には、各レジスタ35Aを構成するフリップフロップFF1〜FF11は、対応する遅延線50の遅延素子D1〜D11の出力信号を、ストローブ信号DQSがLレベルからHレベルに立上がるタイミングで保持する。   In the next step S402, each register 35A holds a one-cycle pulse being transmitted through the corresponding delay circuit 34, triggered by the rising edge of the strobe signal DQS. More specifically, flip-flops FF1 to FF11 configuring each register 35A hold the output signals of delay elements D1 to D11 of corresponding delay line 50 at the timing when strobe signal DQS rises from L level to H level. .

ここで、第1〜第3の実施形態では、各遅延回路34に入力される1サイクルパルス自身の立上がりエッジまたは立下りエッジに基づいてトリガ信号cal_smpl_trgを生成するので、入力された1サイクルパルスの全体(すなわち、立上がりエッジから立下がりエッジまで)を確実にレジスタ35に取り込むことができた。   Here, in the first to third embodiments, the trigger signal cal_smpl_trg is generated based on the rising edge or the falling edge of the one-cycle pulse input to each delay circuit 34. The whole (that is, from the rising edge to the falling edge) could be taken into the register 35 without fail.

これに対して、第4の実施形態の場合には、ストローブ信号DQSをトリガ信号cal_smpl_trgとして用いているために、タイミングにずれが生じている場合には必ずしも最適な取り込みタイミングとはならない。したがって、タイミングにずれがあっても1サイクルパルス全体を取り込めるように、各遅延回路34を構成する遅延線50は、十分な長さ(すなわち、十分な個数の遅延素子D)を有する必要がある。もしくは、キャリブレーション回路33は、遅延回路34_Sによってストローブ信号DQSの遅延量を調整しながら再度ステップS401,402を繰り返す。これによって、対応する遅延回路34に入力される1サイクルパルスの全体がレジスタ35Aに保持できるようにする。   On the other hand, in the case of the fourth embodiment, the strobe signal DQS is used as the trigger signal cal_smpl_trg, so that if the timing is shifted, the optimum fetch timing is not necessarily obtained. Therefore, the delay lines 50 constituting each delay circuit 34 need to have a sufficient length (that is, a sufficient number of delay elements D) so that the entire one-cycle pulse can be captured even if the timing is shifted. . Alternatively, the calibration circuit 33 repeats steps S401 and S402 again while adjusting the delay amount of the strobe signal DQS by the delay circuit 34_S. Thus, the entire one-cycle pulse input to the corresponding delay circuit 34 can be held in the register 35A.

その次のステップS403において、キャリブレーション回路33は、各レジスタ35Aに保持されたデータに基づいて、ビットごとにスキューを計算する。具体的に、1サイクルパルスがLHL波形を有している場合には、キャリブレーション回路33は、ストローブ信号DQSがLレベルからHレベルに変化するタイミングと各ビット信号がLレベルからHレベルに変化するタイミングとの間隔を計算する。1サイクルパルスがHLH波形を有している場合には、キャリブレーション回路33は、ストローブ信号DQS信号LレベルからHレベルに変化するタイミングと各ビット信号がHレベルからLレベルに変化するタイミングとの間隔を計算する。   In the next step S403, the calibration circuit 33 calculates the skew for each bit based on the data held in each register 35A. Specifically, when the one-cycle pulse has the LHL waveform, the calibration circuit 33 determines when the strobe signal DQS changes from the L level to the H level and when each bit signal changes from the L level to the H level. Calculate the interval with the timing to do. When the one-cycle pulse has the HLH waveform, the calibration circuit 33 determines the timing at which the strobe signal DQS changes from L level to H level and the timing at which each bit signal changes from H level to L level. Calculate the interval.

さらに、ステップS403において、キャリブレーション回路33は、ビットごとに有効ウィンドウサイズ(すなわち、1サイクルパルスの立上がりから立下がりまでの間隔)を計算する。   Further, in step S403, the calibration circuit 33 calculates the effective window size (that is, the interval from the rise to the fall of one cycle pulse) for each bit.

その次のステップS404において、キャリブレーション回路33は、ビットごとに算出されたスキューに基づいて、各ビット信号の遅延量を設定する。さらに、キャリブレーション回路33は、算出された有効ウィンドウサイズの最小値の半分を、各ビット信号に対するストローブ信号DQSの遅延量に設定する。この場合、キャリブレーション回路33は、各ビット信号とストローブ信号DQSとの相対的な関係が上記の遅延量の設定値になるように、ストローブ信号DQS用の遅延回路34_Sのための遅延コードと、各ビット信号用の遅延回路34_0〜34_2との遅延コードとの少なくとも一方を設定する。   In the next step S404, the calibration circuit 33 sets the amount of delay of each bit signal based on the skew calculated for each bit. Further, the calibration circuit 33 sets a half of the minimum value of the calculated effective window size to a delay amount of the strobe signal DQS for each bit signal. In this case, the calibration circuit 33 includes: At least one of the delay codes of the delay circuits 34_0 to 34_2 for each bit signal is set.

[キャリブレーションの具体例]
図15は、第4の実施形態の半導体装置において、ビットごとの遅延回路に入力されている1サイクルパルスの波形を示す図である。図15の場合、各1サイクルパルスはLHL波形を有している。
[Specific example of calibration]
FIG. 15 is a diagram illustrating a waveform of a one-cycle pulse input to the bit-by-bit delay circuit in the semiconductor device according to the fourth embodiment. In the case of FIG. 15, each one-cycle pulse has an LHL waveform.

さらに、図15では、トリガ信号cal_smpl_trgがアサートされた時点において、フリップフロップFF4〜FF11に保持された遅延素子D4〜D11の出力信号の論理値が、各1サイクルパルスの波形に重ねて示されている。   Further, in FIG. 15, when the trigger signal cal_smpl_trg is asserted, the logic values of the output signals of the delay elements D4 to D11 held in the flip-flops FF4 to FF11 are shown superimposed on the waveform of each one-cycle pulse. I have.

たとえば、図15を参照して、レジスタ35A_0に保持されたビット信号DATA0の値について説明する。なお、ビット信号DATA0に対応する各フリップフロップFFの論理値は、図13にも示されている。   For example, the value of bit signal DATA0 held in register 35A_0 will be described with reference to FIG. The logical value of each flip-flop FF corresponding to the bit signal DATA0 is also shown in FIG.

トリガ信号cal_smpl_trg(すなわち、ストローブ信号DQS)がLレベルからHレベルに立上がった時点において、フリップフロップFF11に保持された遅延素子D11の出力信号はLレベルであり、まだHレベルに変化していない。フリップフロップFF5〜FF10にそれぞれ保持された遅延素子D5〜D10の出力信号はHレベルになっている。フリップフロップFF4に保持された遅延素子D4の出力信号はHレベルからLレベルに戻っている。したがって、ビット信号DATA0がLレベルからHレベルに立上がる部分は、フリップフロップFF10,FF11に保持されていることがわかる。   When the trigger signal cal_smpl_trg (that is, the strobe signal DQS) rises from the L level to the H level, the output signal of the delay element D11 held in the flip-flop FF11 is at the L level and has not yet changed to the H level. . The output signals of the delay elements D5 to D10 held in the flip-flops FF5 to FF10 are at the H level. The output signal of the delay element D4 held in the flip-flop FF4 returns from the H level to the L level. Therefore, it can be seen that the portion where the bit signal DATA0 rises from the L level to the H level is held in the flip-flops FF10 and FF11.

これに対して、ビット信号DATA2がLレベルからHレベルに変化する部分は、フリップフロップFF9,FF10に保持されている。したがって、ビット信号DATA2がLレベルからHレベルに変化するタイミングは、ビット信号DATA0がLレベルからHレベルに変化するタイミングよりも遅れる。また、ビット信号DATA1がLレベルからHレベルに変化する部分は、フリップフロップFF8,FF9に保持されている。ビット信号DATA1がLレベルからHレベルに変化するタイミングは、ビット信号DATA2がLレベルからHレベルに変化するタイミングよりもさらに遅れる。このように、各ビット信号がLレベルからHレベルに立上がるタイミングには、ずれ(すなわち、スキュー)が生じている。   On the other hand, a portion where the bit signal DATA2 changes from the L level to the H level is held in the flip-flops FF9 and FF10. Therefore, the timing when bit signal DATA2 changes from L level to H level is later than the timing when bit signal DATA0 changes from L level to H level. Further, a portion where the bit signal DATA1 changes from the L level to the H level is held in the flip-flops FF8 and FF9. The timing when the bit signal DATA1 changes from the L level to the H level is further delayed than the timing when the bit signal DATA2 changes from the L level to the H level. As described above, a shift (that is, a skew) occurs at the timing when each bit signal rises from the L level to the H level.

以下、各遅延回路34として図3に示す回路構成を用いた場合において、スキューの計算方法とビットデスキューのための遅延コードDCの設定例とについて説明する。   Hereinafter, a method of calculating skew and an example of setting a delay code DC for bit deskew in the case where the circuit configuration illustrated in FIG. 3 is used as each delay circuit 34 will be described.

ここで、ストローブ信号DQS用の遅延回路34_Sから出力される出力ビット信号DATA_outとして、遅延コードDCに従って遅延素子D7の出力信号が選択されていたとする。この場合、ストローブ信号DQSに同期した1サイクルパルスがLレベルからHレベルに立上がる部分は、フリップフロップFF7,FF8に保持されることになる。すなわち、フリップフロップFF7に保持される遅延素子D7の出力信号がHレベルになり、フリップフロップFF8に保持される遅延素子D8の出力信号がLレベルになる。   Here, it is assumed that the output signal of the delay element D7 has been selected according to the delay code DC as the output bit signal DATA_out output from the delay circuit 34_S for the strobe signal DQS. In this case, the portion where the one-cycle pulse synchronized with the strobe signal DQS rises from the L level to the H level is held in the flip-flops FF7 and FF8. That is, the output signal of the delay element D7 held in the flip-flop FF7 goes high, and the output signal of the delay element D8 held in the flip-flop FF8 goes low.

図15のビット信号DATA0の場合、フリップフロップFF11に保持される遅延素子D11の出力信号がLレベルであり、フリップフロップFF10に保持される遅延素子D10の出力信号がHレベルである。したがって、ビット信号DATA0の立上がりは、3個の遅延素子Dの遅延時間だけ上記のストローブ信号DQSの立上がりよりも進んでいる。よって、キャリブレーション回路33は、ビットデスキューのために、ビット信号DATA0に対応する遅延回路34_0の遅延コードDCを、現在の遅延量よりも3個の遅延素子Dの遅延時間だけ遅れた遅延量となるように設定する。これによって、ストローブ信号DQSがLレベルからHレベルに立上がるタイミングと、ビット信号DATA0がLレベルからHレベルに立上がるタイミングとを同期させることができる。   In the case of the bit signal DATA0 in FIG. 15, the output signal of the delay element D11 held in the flip-flop FF11 is at L level, and the output signal of the delay element D10 held in the flip-flop FF10 is at H level. Therefore, the rise of bit signal DATA0 is ahead of the rise of strobe signal DQS by the delay time of three delay elements D. Therefore, the calibration circuit 33 sets the delay code DC of the delay circuit 34_0 corresponding to the bit signal DATA0 to a delay amount delayed by three delay elements D from the current delay amount due to the bit deskew. Set to be. Thus, the timing when strobe signal DQS rises from L level to H level and the timing when bit signal DATA0 rises from L level to H level can be synchronized.

同様に、ビット信号DATA1の立上がり部分は、フリップフロップFF8,FF9の値に対応している。したがって、ビット信号DATA1の立上がりは、1個の遅延素子Dの遅延時間だけストローブ信号DQSの立上がりよりも進んでいる。したがって、キャリブレーション回路33は、ビットデスキューのために、ビット信号DATA1に対応する遅延回路34_1の遅延コードDCを、現在の遅延量よりも1個の遅延素子Dの遅延時間だけ遅れた遅延量となるように設定する。   Similarly, the rising portion of the bit signal DATA1 corresponds to the values of the flip-flops FF8 and FF9. Therefore, the rise of bit signal DATA1 is ahead of the rise of strobe signal DQS by the delay time of one delay element D. Therefore, the calibration circuit 33 sets the delay code DC of the delay circuit 34_1 corresponding to the bit signal DATA1 to a delay amount delayed by one delay element D from the current delay amount due to the bit deskew. Set to be.

同様に、ビット信号DATA2の立上がり部分は、フリップフロップFF9,FF10の値に対応している。したがって、ビット信号DATA2の立上がりは、2個の遅延素子Dの遅延時間だけストローブ信号DQSの立上がりよりも進んでいる。したがって、キャリブレーション回路33は、ビットデスキューのために、ビット信号DATA2に対応する遅延回路34_2の遅延コードDCを、現在の遅延量よりも2個の遅延素子Dの遅延時間だけ遅れた遅延量となるように設定する。   Similarly, rising portions of the bit signal DATA2 correspond to the values of the flip-flops FF9 and FF10. Therefore, the rise of bit signal DATA2 is ahead of the rise of strobe signal DQS by the delay time of two delay elements D. Therefore, the calibration circuit 33 sets the delay code DC of the delay circuit 34_2 corresponding to the bit signal DATA2 to a delay amount delayed by two delay elements D from the current delay amount due to the bit deskew. Set to be.

次に、図15の例において、ビットごとの有効ウィンドウサイズの計算と、ストローブ信号DQSの遅延量の設定について説明する。   Next, in the example of FIG. 15, the calculation of the effective window size for each bit and the setting of the delay amount of the strobe signal DQS will be described.

具体的に、図15のビット信号DATA0に対応する1サイクルパルスの場合、有効ウィンドウサイズは6個の遅延素子D5〜D10の遅延時間に相当する。図15のビット信号DATA1の場合、有効ウィンドウサイズは3個の遅延素子D6〜D8の遅延時間に相当する。図15のビット信号DATA2の場合、有効ウィンドウサイズは3個の遅延素子D7〜D9の遅延時間に相当する。したがって、有効ウィンドウサイズの最小値は3個の遅延素子の遅延時間に相当する。   Specifically, in the case of a one-cycle pulse corresponding to bit signal DATA0 in FIG. 15, the effective window size corresponds to the delay time of six delay elements D5 to D10. In the case of the bit signal DATA1 in FIG. 15, the effective window size corresponds to the delay time of the three delay elements D6 to D8. In the case of the bit signal DATA2 in FIG. 15, the effective window size corresponds to the delay time of the three delay elements D7 to D9. Therefore, the minimum value of the effective window size corresponds to the delay time of the three delay elements.

したがって、キャリブレーション回路33は、有効ウィドウサイズの最小値の半分である1〜2個の遅延素子Dの遅延時間だけ現在の遅延量よりも遅れた遅延量となるように、ストローブ信号DQSに対応する遅延回路34_Sの遅延コードDCを設定する。   Therefore, the calibration circuit 33 responds to the strobe signal DQS such that the delay amount is delayed from the current delay amount by the delay time of one or two delay elements D which is half the minimum value of the effective window size. The delay code DC of the delay circuit 34_S is set.

なお、ストローブ信号DQSの遅延量とデータ信号DATAの遅延量とは相対的なものである。したがって、ストローブ信号DQS用の遅延回路34_Sとデータ信号DATA用の遅延回路34とのうち、一方の遅延回路34の遅延量を増加させることと他方の遅延回路34の遅延量を減少させることとは等価であるので、どちらの遅延量を調整してもよいし、両方の遅延量を調整してもよい。   Note that the delay amount of the strobe signal DQS and the delay amount of the data signal DATA are relative. Therefore, of the delay circuit 34_S for the strobe signal DQS and the delay circuit 34 for the data signal DATA, increasing the delay amount of one delay circuit 34 and decreasing the delay amount of the other delay circuit 34 Since they are equivalent, either delay amount may be adjusted, or both delay amounts may be adjusted.

[第4の実施形態の効果]
以上のとおり、第4の実施形態によれば、ビットごとに設けられた遅延回路34に1サイクルパルスを入力し、ストローブ信号DQSをトリガとして入力された1サイクルパルスの値が、各遅延回路34に対応するレジスタ35Aに、遅延線50の位置に対応付けて保持される。これにより、各レジスタ35Aに保持された1サイクルパルスに基づいて、ビットごとのスキューと有効ウィンドウサイズを決定することができる。この結果、キャリブレーションに要する時間をさらに短縮することができる。
[Effect of Fourth Embodiment]
As described above, according to the fourth embodiment, a one-cycle pulse is input to the delay circuit 34 provided for each bit, and the value of the one-cycle pulse input using the strobe signal DQS as a trigger is determined by each delay circuit 34. Are held in the register 35A corresponding to the position of the delay line 50. Thereby, the skew and effective window size for each bit can be determined based on the one-cycle pulse held in each register 35A. As a result, the time required for calibration can be further reduced.

なお、第4の実施形態は、第2の実施形態で説明した参照電圧トレーニングに組合わせることもできる。   Note that the fourth embodiment can be combined with the reference voltage training described in the second embodiment.

<第5の実施形態>
第4の実施形態では、スキューと有効ウィンドウサイズの両方を計算するために、1サイクルパルスの全体(すなわち、立ち上がりエッジから立下がりエッジまで)を対応するレジスタ35に保持する必要があった。このため、各遅延回路34を構成する遅延線50は、十分な長さ(すなわち、十分な個数の遅延素子D)を有する必要があった。もしくは、遅延回路34_Sによってストローブ信号DQSの遅延量を適切に調整する必要があった。
<Fifth embodiment>
In the fourth embodiment, in order to calculate both the skew and the effective window size, it is necessary to hold the entire one-cycle pulse (that is, from the rising edge to the falling edge) in the corresponding register 35. Therefore, the delay lines 50 constituting each delay circuit 34 need to have a sufficient length (that is, a sufficient number of delay elements D). Alternatively, it is necessary to appropriately adjust the delay amount of the strobe signal DQS by the delay circuit 34_S.

第5の実施形態では、ストローブ信号DQSをトリガとしてビットごとに、LHL波形を有する1サイクルパルスの一部である立ち上がりエッジのみをレジスタ35に取り込む(HLH波形の場合には、立下がりエッジのみをレジスタ35に取り込む)。そして、この取り込んだ1サイクルパルスの立上がりエッジ(または立下がりエッジ)の部分を用いてストローブ信号DQSとのタイミングのずれ(すなわち、スキュー)のみを計算するようにする。有効ウィンドウサイズの計算については、第1〜第3の実施形態で説明した方法を用いる。これによって、第4の実施形態の場合の上記の制約を緩和することができる。以下、図面を参照して具体的に説明する。   In the fifth embodiment, only the rising edge which is a part of the one-cycle pulse having the LHL waveform is taken into the register 35 for each bit by using the strobe signal DQS as a trigger (in the case of the HLH waveform, only the falling edge is taken). Take it into the register 35). Then, using only the rising edge (or falling edge) of the captured one-cycle pulse, only the timing shift (ie, skew) with the strobe signal DQS is calculated. For the calculation of the effective window size, the method described in the first to third embodiments is used. Thereby, the above-described restriction in the case of the fourth embodiment can be relaxed. Hereinafter, a specific description will be given with reference to the drawings.

[受信制御回路の構成]
図16は、第5の実施形態の半導体装置において、受信制御回路で用いられる遅延線およびレジスタの構成を示すブロック図である。
[Configuration of reception control circuit]
FIG. 16 is a block diagram illustrating a configuration of a delay line and a register used in a reception control circuit in the semiconductor device according to the fifth embodiment.

第5の実施形態の半導体装置の受信制御回路は、図12に示す第4の実施形態の受信制御回路110と同様の構成を有している。ただし、図13を参照して説明したレジスタ35Aに代えて図16に示すレジスタ35Bが用いられる。   The reception control circuit of the semiconductor device of the fifth embodiment has the same configuration as the reception control circuit 110 of the fourth embodiment shown in FIG. However, a register 35B shown in FIG. 16 is used instead of the register 35A described with reference to FIG.

図16のレジスタ35Bでは、トリガ生成回路40Bの構成が、図3のレジスタ35のトリガ生成回路40の構成および図13のレジスタ35Aのトリガ生成回路40Aの構成と異なる。   In the register 35B of FIG. 16, the configuration of the trigger generation circuit 40B is different from the configuration of the trigger generation circuit 40 of the register 35 of FIG. 3 and the configuration of the trigger generation circuit 40A of the register 35A of FIG.

具体的に、トリガ生成回路40Bは、インバータ43と、マルチプレクサ42,44と、ANDゲート41とを含む。したがって、トリガ生成回路40Bは、マルチプレクサ44をさらに含む点で図3のトリガ生成回路40と異なる。   Specifically, the trigger generation circuit 40B includes an inverter 43, multiplexers 42 and 44, and an AND gate 41. Therefore, the trigger generation circuit 40B differs from the trigger generation circuit 40 of FIG. 3 in further including the multiplexer 44.

インバータ43は、遅延素子D8の出力信号の論理反転信号を出力する。
マルチプレクサ42は、エッジ選択信号RF_SELに応じて、遅延素子D8の出力信号およびインバータ43の出力信号(すなわち、遅延素子D8の出力信号に対する論理反転信号)の一方を出力する。たとえば、マルチプレクサ42は、エッジ選択信号RF_SELがHレベルのときマルチプレクサ42は遅延素子D8の出力信号を選択し、エッジ選択信号RF_SELがLレベルのときインバータ43の出力信号を選択する。
Inverter 43 outputs a logically inverted signal of the output signal of delay element D8.
The multiplexer 42 outputs one of the output signal of the delay element D8 and the output signal of the inverter 43 (ie, a logically inverted signal with respect to the output signal of the delay element D8) according to the edge selection signal RF_SEL. For example, multiplexer 42 selects the output signal of delay element D8 when edge selection signal RF_SEL is at H level, and selects the output signal of inverter 43 when edge selection signal RF_SEL is at L level.

マルチプレクサ44は、トリガ選択信号TRG_SELに応じて、ストローブ信号DQSおよびマルチプレクサ42の出力信号(すなわち、遅延素子D8の出力信号またはその論理反転信号)のうちの一方を出力する。たとえば、マルチプレクサ44は、トリガ選択信号TRG_SELがHレベルのときストローブ信号DQSを選択し、トリガ選択信号TRG_SELがLレベルのときマルチプレクサ42の出力信号を選択する。なお、本開示では、トリガ選択信号TRG_SELがLレベルの場合を第1のトリガモードと称し、トリガ選択信号TRG_SELがHレベルの場合を第2のトリガモードとも称する場合がある。   Multiplexer 44 outputs one of strobe signal DQS and an output signal of multiplexer 42 (that is, an output signal of delay element D8 or a logically inverted signal thereof) according to trigger selection signal TRG_SEL. For example, multiplexer 44 selects strobe signal DQS when trigger selection signal TRG_SEL is at H level, and selects the output signal of multiplexer 42 when trigger selection signal TRG_SEL is at L level. In the present disclosure, the case where the trigger selection signal TRG_SEL is at the L level is referred to as a first trigger mode, and the case where the trigger selection signal TRG_SEL is at the H level is also referred to as a second trigger mode.

ANDゲート41は、イネーブル信号CAL_ENとマルチプレクサ44の出力信号との論理積を、トリガ信号cal_smpl_trgとして各フリップフロップFFに出力する。したがって、イネーブル信号CAL_ENがネゲート(Lレベル)のとき、トリガ生成回路40Bから各フリップフロップFFに出力される信号はLベルに固定されるので、レジスタ35Bには対応するビット信号が格納されない。   The AND gate 41 outputs the logical product of the enable signal CAL_EN and the output signal of the multiplexer 44 to each flip-flop FF as a trigger signal cal_smpl_trg. Therefore, when the enable signal CAL_EN is negated (L level), the signal output from the trigger generation circuit 40B to each flip-flop FF is fixed at L level, and the corresponding bit signal is not stored in the register 35B.

一方、イネーブル信号CAL_ENがアサート(Hレベル)のとき、トリガ生成回路40Bは、マルチプレクサ44の出力信号(すなわち、ストローブ信号DQSまたは遅延素子D8の出力信号またはその論理反転信号)に基づいて、トリガ信号cal_smpl_trgを生成して各フリップフロップFFに出力する。この結果、トリガ信号cal_smpl_trgの立上がりエッジのタイミングでレジスタ35Bにデータ信号DATAが格納される。   On the other hand, when the enable signal CAL_EN is asserted (H level), the trigger generation circuit 40B outputs a trigger signal based on the output signal of the multiplexer 44 (ie, the strobe signal DQS or the output signal of the delay element D8 or its logically inverted signal). cal_smpl_trg is generated and output to each flip-flop FF. As a result, the data signal DATA is stored in the register 35B at the timing of the rising edge of the trigger signal cal_smpl_trg.

なお、図16の場合と異なるが、トリガ信号cal_smpl_trgの立下がりエッジのタイミングでデータ信号DATAが保持されるように各レジスタ35Bが構成されていてもよい。   Although different from the case of FIG. 16, each register 35B may be configured to hold the data signal DATA at the timing of the falling edge of the trigger signal cal_smpl_trg.

[キャリブレーションの手順]
次に、図12のインタフェース回路101において、レジスタ35Aに代えて図16のレジスタ35Bを用いた場合のキャリブレーションの手順について説明する。
[Calibration procedure]
Next, a description will be given of a calibration procedure in the case where the register 35A of FIG. 16 is used instead of the register 35A in the interface circuit 101 of FIG.

図17は、第5の実施形態において、インタフェース回路101のキャリブレーションの手順を示すフローチャートである。以下の手順は、インタフェース回路101の初期化時のキャリブレーションとして、もしくはその後に遅延量にずれが生じた場合における再キャリブレーションとして実行される。また、以下の説明では、図1のインタフェース回路101Aを送信側とし、インタフェース回路101Bを受信側とする。   FIG. 17 is a flowchart illustrating a procedure of calibration of the interface circuit 101 in the fifth embodiment. The following procedure is executed as calibration at the time of initialization of the interface circuit 101 or as re-calibration when a delay occurs in the amount of delay thereafter. In the following description, the interface circuit 101A in FIG. 1 is the transmitting side, and the interface circuit 101B is the receiving side.

図1および図12、図16、図17を参照して、まず、キャリブレーション期間の最初に、受信側のインタフェース回路101Bのキャリブレーション回路33は、イネーブル信号CAL_ENをアサート(たとえば、Hレベル)にする。   Referring to FIGS. 1, 12, 16, and 17, first, at the beginning of the calibration period, the calibration circuit 33 of the interface circuit 101 </ b> B on the receiving side asserts the enable signal CAL_EN (for example, at the H level). I do.

さらに、ステップS501に実行前に、キャリブレーション回路33は、トリガ選択信号TRG_SELをたとえばHレベルに設定することによって、トリガ信号cal_smpl_trgとしてストローブ信号DQSを選択する。   Further, before execution in step S501, the calibration circuit 33 selects the strobe signal DQS as the trigger signal cal_smpl_trg by setting the trigger selection signal TRG_SEL to, for example, an H level.

次に、図17のステップS501において、図1の送信側のインタフェース回路101Aは、受信側のインタフェース回路101Bに向けて、ストローブ信号DQS信号を出力するとともに、ビットごとに1サイクルパルスを送信する。なお、前述のように、1サイクルパルスは、LHL波形であってもよいし、HLH波形であってもよい。送信されたストローブ信号DQS信号は、遅延回路34_Sに入力され、送信された1サイクルパルス信号は、ビットごとに設けられた遅延回路34_0〜34_2に入力される。   Next, in step S501 in FIG. 17, the transmission-side interface circuit 101A in FIG. 1 outputs a strobe signal DQS signal and transmits one cycle pulse for each bit to the reception-side interface circuit 101B. As described above, the one-cycle pulse may have an LHL waveform or an HLH waveform. The transmitted strobe signal DQS signal is input to delay circuit 34_S, and the transmitted one-cycle pulse signal is input to delay circuits 34_0 to 34_2 provided for each bit.

次のステップS502において、各レジスタ35Bは、ストローブ信号DQSの立上がりエッジをトリガとして、対応する遅延回路34を伝送中の1サイクルパルスの値を保持する。具体的には、各レジスタ35Bを構成するフリップフロップFF1〜FF11は、対応する遅延線50の遅延素子D1〜D11の出力信号を、ストローブ信号DQSが立上がるタイミングで保持する。   In the next step S502, each register 35B holds the value of the one-cycle pulse being transmitted through the corresponding delay circuit 34, triggered by the rising edge of the strobe signal DQS. Specifically, flip-flops FF1 to FF11 forming each register 35B hold the output signals of delay elements D1 to D11 of corresponding delay line 50 at the timing when strobe signal DQS rises.

ここで、ビットデスキューに使用するために、各レジスタ35Bは、1サイクルパルスがLHL波形を有している場合には、その一部であるLレベルからHレベルへの立上がり部分を取り込む必要がある。もしくは、1サイクルパルスがHLH波形を有している場合には、レジスタ35Bは、1サイクルパルスの一部であるHレベルからLレベルへの立下がり部分を取り込む必要がある。第4の実施形態の場合には、1サイクルパルス全体(立上がりエッジから立下がりエッジまで)を取り込む必要があったが、第5の実施形態の場合にはその要件は緩和される。   Here, in order to use for the bit deskew, when one cycle pulse has the LHL waveform, each register 35B needs to take in a rising portion from L level to H level which is a part thereof. . Alternatively, when the one-cycle pulse has the HLH waveform, the register 35B needs to capture the falling part from the H level to the L level, which is a part of the one-cycle pulse. In the case of the fourth embodiment, it was necessary to capture the entire one-cycle pulse (from the rising edge to the falling edge), but in the case of the fifth embodiment, the requirement is relaxed.

ただし、ビットごとに1サイクルパルスの立上がり部分または立下がり部分がレジスタ35Bに取り込めていない場合には、キャリブレーション回路33は、遅延回路34_Sによってストローブ信号DQSの遅延量を調整しながら再度ステップS501,502を繰り返す。   However, when the rising portion or the falling portion of the one-cycle pulse for each bit is not captured in the register 35B, the calibration circuit 33 adjusts the delay amount of the strobe signal DQS by the delay circuit 34_S again and repeats the steps S501 and S501. Repeat 502.

その次のステップS503において、キャリブレーション回路33は、各レジスタ35に格納されたデータに基づいて、ビットごとにスキューを計算する。たとえば、1サイクルパルスがLHL波形を有している場合には、キャリブレーション回路33は、ストローブ信号DQS信号がLレベルからHレベルに変化するタイミングと各ビット信号がLレベルからHレベルに変化するタイミングとの間隔を計算する。1サイクルパルスがHLH波形を有している場合には、キャリブレーション回路33は、ストローブ信号DQS信号がHレベルからLレベルに変化するタイミングと各ビット信号がHレベルからLレベルに変化するタイミングとの間隔を計算する。   In the next step S503, the calibration circuit 33 calculates the skew for each bit based on the data stored in each register 35. For example, when the one-cycle pulse has the LHL waveform, the calibration circuit 33 changes the timing at which the strobe signal DQS changes from L level to H level and each bit signal changes from L level to H level. Calculate the interval with the timing. When the one-cycle pulse has the HLH waveform, the calibration circuit 33 determines the timing when the strobe signal DQS changes from H level to L level and the timing when each bit signal changes from H level to L level. Calculate the interval of

その次のステップS504において、キャリブレーション回路33は、ビットごとに算出されたスキューに基づいて、ビットデスキューのために各ビット信号の遅延量を設定する。ここで、キャリブレーション回路33は、各ビット信号とストローブ信号DQSとの相対的な関係が上記の遅延量の設定値になるように、ストローブ信号DQS用の遅延回路34_Sのための遅延コードと、各ビット信号用の遅延回路34_0〜34_2との遅延コードとの少なくとも一方を設定する。   In the next step S504, the calibration circuit 33 sets the delay amount of each bit signal for bit deskew based on the skew calculated for each bit. Here, the calibration circuit 33 includes a delay code for the delay circuit 34_S for the strobe signal DQS so that the relative relationship between each bit signal and the strobe signal DQS becomes the set value of the delay amount. At least one of the delay codes of the delay circuits 34_0 to 34_2 for each bit signal is set.

次のステップS101〜S104において、キャリブレーション回路33は、図8を参照して説明したデータトレーニングを実行する。   In the next steps S101 to S104, the calibration circuit 33 executes the data training described with reference to FIG.

ここで、ステップS101の実行前に、キャリブレーション回路33はトリガ選択信号TRG_SELをたとえばLレベルに設定することによって、トリガ信号cal_smpl_trgとして遅延素子D8の出力信号または論理反転信号を選択する。さらに、送信側のインタフェース回路101Aから受信側のインタフェース回路101Bに出力する1サイクルパルスの波形がLHL波形かHLH波形であるかに応じて、キャリブレーション回路33は、遅延素子D8の出力信号またはその論理反転信号がそれぞれ選択されるように、エッジ選択信号RF_SELの論理値を設定する。   Here, before the execution of step S101, the calibration circuit 33 sets the trigger selection signal TRG_SEL to, for example, L level, thereby selecting the output signal of the delay element D8 or the logically inverted signal as the trigger signal cal_smpl_trg. Further, depending on whether the waveform of the one-cycle pulse output from the interface circuit 101A on the transmission side to the interface circuit 101B on the reception side is an LHL waveform or an HLH waveform, the calibration circuit 33 outputs the output signal of the delay element D8 or its output signal. The logical value of the edge selection signal RF_SEL is set so that the logical inversion signal is selected.

ステップS101〜S104の具体的手順は図8の場合と同様であるので、同一または相当するステップには同一の参照符号を付して説明を繰り返さない。なお、ステップS101〜S103に示すビットごとの有効ウィンドウサイズの検出は、データトレーニングはビットデスキューとは独立に実行することができるので、ステップS501〜S504の前にステップS101〜S103を実行してもよい。   Since the specific procedure of steps S101 to S104 is the same as that of FIG. 8, the same or corresponding steps are denoted by the same reference characters and description thereof will not be repeated. Note that the detection of the effective window size for each bit shown in steps S101 to S103 can be performed independently of the bit deskew, so that even if steps S101 to S103 are executed before steps S501 to S504. Good.

[キャリブレーションの具体例]
以下、図15の場合と同じ波形および同じスキューを有する1サイクルパルスが、ビットごとに受信側のインタフェース回路101の遅延回路34に入力された場合について、具体的に説明する。
[Specific example of calibration]
Hereinafter, a case where a one-cycle pulse having the same waveform and the same skew as in the case of FIG. 15 is input for each bit to the delay circuit 34 of the interface circuit 101 on the receiving side will be specifically described.

(1.ビットデスキューの具体例)
図18は、第5の実施形態の半導体装置において、ストローブ信号をトリガとして、ビットごとにレジスタに取り込まれた1サイクルパルスの波形を示す図である。さらに、図18では、トリガ信号cal_smpl_trgがアサートされた時点において、フリップフロップFF1〜FF8に保持された遅延素子D1〜D8の出力信号の論理値が、各1サイクルパルスの波形に重ねて示されている。
(1. Specific example of bit deskew)
FIG. 18 is a diagram showing a waveform of a one-cycle pulse taken into a register for each bit by using a strobe signal as a trigger in the semiconductor device according to the fifth embodiment. Further, in FIG. 18, when the trigger signal cal_smpl_trg is asserted, the logic values of the output signals of the delay elements D1 to D8 held in the flip-flops FF1 to FF8 are shown superimposed on the waveform of each one-cycle pulse. I have.

図18の場合には、第4の実施形態で説明した図15の場合と異なり、1サイクルパルス全体ではなく、LレベルからHレベルへの立上がり部分がレジスタ35Bに保持されている。   In the case of FIG. 18, unlike the case of FIG. 15 described in the fourth embodiment, the rising portion from the L level to the H level, instead of the entire one-cycle pulse, is held in the register 35B.

ここで、図15の場合と同様に、各遅延回路34として図3に示す回路構成を用いた場合について説明する。ストローブ信号DQS用の遅延回路34_Sの遅延量として最小の遅延量、すなわち、遅延コードDCによって遅延素子D1の出力信号が選択されているとする。なお、図18の場合には、1サイクルパルス全体をレジスタ35Bに保持する必要がないので、遅延回路34_Sの遅延量を図15の場合と同じにする必要はない。   Here, the case where the circuit configuration shown in FIG. 3 is used as each delay circuit 34 will be described, as in the case of FIG. It is assumed that the minimum delay amount as the delay amount of the strobe signal DQS delay circuit 34_S, that is, the output signal of the delay element D1 is selected by the delay code DC. Note that in the case of FIG. 18, since it is not necessary to hold the entire one-cycle pulse in the register 35B, the delay amount of the delay circuit 34_S does not need to be the same as that of FIG.

上記のストローブ信号DQSの遅延量の設定の場合において、ストローブ信号DQSに同期した1サイクルパルスがLレベルからHレベルに立上がる部分は、フリップフロップFF1,FF2に保持されていることになる。すなわち、フリップフロップFF1に保持される遅延素子D1の出力信号がHレベルになり、フリップフロップFF2に保持される遅延素子D2の出力信号がLレベルになる。   In the case of setting the delay amount of the strobe signal DQS, a portion where the one cycle pulse synchronized with the strobe signal DQS rises from the L level to the H level is held in the flip-flops FF1 and FF2. That is, the output signal of the delay element D1 held in the flip-flop FF1 goes high, and the output signal of the delay element D2 held in the flip-flop FF2 goes low.

図18のビット信号DATA0の場合、フリップフロップFF5に保持される遅延素子D5の出力信号がLレベルであり、フリップフロップFF4に保持される遅延素子D4の出力信号がHレベルである。したがって、ビット信号DATA0の立上がりは、3個の遅延素子Dの遅延時間だけ上記のストローブ信号DQSの立上がりよりも進んでいる。よって、キャリブレーション回路33は、ビットデスキューのために、ビット信号DATA0に対応する遅延回路34_0の遅延コードDCを、現在の遅延量よりも3個の遅延素子Dの遅延時間だけ遅れた遅延量となるように設定する。これによって、ストローブ信号DQSがLレベルからHレベルに立上がるタイミングと、ビット信号DATA0がLレベルからHレベルに立上がるタイミングとを同期させることができる。   In the case of the bit signal DATA0 in FIG. 18, the output signal of the delay element D5 held in the flip-flop FF5 is at L level, and the output signal of the delay element D4 held in the flip-flop FF4 is at H level. Therefore, the rise of bit signal DATA0 is ahead of the rise of strobe signal DQS by the delay time of three delay elements D. Therefore, the calibration circuit 33 sets the delay code DC of the delay circuit 34_0 corresponding to the bit signal DATA0 to a delay amount delayed by three delay elements D from the current delay amount due to the bit deskew. Set to be. This makes it possible to synchronize the timing when strobe signal DQS rises from L level to H level and the timing when bit signal DATA0 rises from L level to H level.

同様に、ビット信号DATA1の立上がり部分は、フリップフロップFF2,FF3の値に対応している。したがって、ビット信号DATA1の立上がりは、1個の遅延素子Dの遅延時間だけストローブ信号DQSの立上がりよりも進んでいる。したがって、キャリブレーション回路33は、ビットデスキューのために、ビット信号DATA1に対応する遅延回路34_1の遅延コードDCを、現在の遅延量よりも1個の遅延素子Dの遅延時間だけ遅れた遅延量となるように設定する。   Similarly, the rising portion of the bit signal DATA1 corresponds to the values of the flip-flops FF2 and FF3. Therefore, the rise of bit signal DATA1 is ahead of the rise of strobe signal DQS by the delay time of one delay element D. Therefore, the calibration circuit 33 sets the delay code DC of the delay circuit 34_1 corresponding to the bit signal DATA1 to a delay amount delayed by one delay element D from the current delay amount due to the bit deskew. Set to be.

同様に、ビット信号DATA2の立上がり部分は、フリップフロップFF3,FF4の値に対応している。したがって、ビット信号DATA2の立上がりは、2個の遅延素子Dの遅延時間だけストローブ信号DQSの立上がりよりも進んでいる。したがって、キャリブレーション回路33は、ビットデスキューのために、ビット信号DATA2に対応する遅延回路34_2の遅延コードDCを、現在の遅延量よりも3個の遅延素子Dの遅延時間だけ遅れた遅延量となるように設定する。   Similarly, the rising portion of the bit signal DATA2 corresponds to the values of the flip-flops FF3 and FF4. Therefore, the rise of bit signal DATA2 is ahead of the rise of strobe signal DQS by the delay time of two delay elements D. Therefore, the calibration circuit 33 sets the delay code DC of the delay circuit 34_2 corresponding to the bit signal DATA2 to the delay amount delayed by three delay elements D from the current delay amount for the bit deskew. Set to be.

(2.データトレーニングの具体例)
図19は、第5の実施形態の半導体装置において、ビットごとの入力信号の立上がりエッジまたは立下がりエッジに基づいて生成されたトリガに応答して、各レジスタに取り込まれた1サイクルパルスの波形を示す図である。さらに、図19では、トリガ信号cal_smpl_trgがアサートされた時点において、フリップフロップFF4〜FF11に保持された遅延素子D4〜D11の出力信号の論理値が、各1サイクルパルスの波形に重ねて示されている。
(2. Specific example of data training)
FIG. 19 shows a waveform of a one-cycle pulse captured by each register in response to a trigger generated based on a rising edge or a falling edge of an input signal for each bit in the semiconductor device of the fifth embodiment. FIG. Further, in FIG. 19, when the trigger signal cal_smpl_trg is asserted, the logical values of the output signals of the delay elements D4 to D11 held in the flip-flops FF4 to FF11 are shown superimposed on the waveform of each one-cycle pulse. I have.

ここで、第1の実施形態の場合と同様に、図16のトリガ生成回路40Bは、遅延素子D8の出力信号に基づいてトリガ信号cal_smpl_trgを生成する。ただし、実際上は、トリガ生成回路40B自身の遅延のために、遅延素子D11の出力信号がLレベルからHレベルに変化する直前のタイミングでトリガがかかるものとする。   Here, as in the case of the first embodiment, the trigger generation circuit 40B of FIG. 16 generates a trigger signal cal_smpl_trg based on the output signal of the delay element D8. However, in practice, it is assumed that the trigger is activated at a timing immediately before the output signal of the delay element D11 changes from the L level to the H level due to the delay of the trigger generation circuit 40B itself.

上記のトリガのタイミングはどのビットについても同じであるので、図19に示すように、いずれのビット信号DATA0,DATA1,DATA2についても、その立上がり部分は、フリップフロップFF10,FF11に対応している。すなわち、フリップフロップFF11に保持された遅延素子D11の出力信号はLレベルであり、フリップフロップFF10に保持された遅延素子D10の出力信号はHレベルである。   Since the trigger timing is the same for all bits, as shown in FIG. 19, the rising portions of any of the bit signals DATA0, DATA1, and DATA2 correspond to the flip-flops FF10 and FF11. That is, the output signal of the delay element D11 held in the flip-flop FF11 is at L level, and the output signal of the delay element D10 held in the flip-flop FF10 is at H level.

一方、ビット信号DATA0,DATA1,DATA2の立下がり部分は、各ビット信号の有効ウィンドウサイズに応じて異なる。したがって、キャリブレーション回路33は、ビットごとに対応するレジスタ35Bに取り込まれた1サイクルパルスに基づいて、ビットごとの有効ウィンドウサイズの計算を行うことができ、さらに、ストローブ信号DQSの遅延量を設定することができる。   On the other hand, the falling portions of the bit signals DATA0, DATA1, and DATA2 differ according to the effective window size of each bit signal. Therefore, the calibration circuit 33 can calculate the effective window size for each bit based on the one-cycle pulse taken into the register 35B corresponding to each bit, and further sets the delay amount of the strobe signal DQS. can do.

具体的に、図19のビット信号DATA0に対応する1サイクルパルスの場合、有効ウィンドウサイズは6個の遅延素子D5〜D10の遅延時間に相当する。図15のビット信号DATA1の場合、有効ウィンドウサイズは3個の遅延素子D8〜D10の遅延時間に相当する。図15のビット信号DATA2の場合、有効ウィンドウサイズは3個の遅延素子D8〜D10の遅延時間に相当する。したがって、有効ウィンドウサイズの最小値は3個の遅延素子の遅延時間に相当する。   Specifically, in the case of a one-cycle pulse corresponding to bit signal DATA0 in FIG. 19, the effective window size corresponds to the delay time of six delay elements D5 to D10. In the case of the bit signal DATA1 in FIG. 15, the effective window size corresponds to the delay time of the three delay elements D8 to D10. In the case of the bit signal DATA2 in FIG. 15, the effective window size corresponds to the delay time of the three delay elements D8 to D10. Therefore, the minimum value of the effective window size corresponds to the delay time of the three delay elements.

したがって、キャリブレーション回路33は、有効ウィドウサイズの最小値の半分である1〜2個の遅延素子Dの遅延時間だけ現在の遅延量よりも遅れた遅延量となるように、ストローブ信号DQSに対応する遅延回路34_Sの遅延コードDCを設定する。   Therefore, the calibration circuit 33 responds to the strobe signal DQS so that the delay amount is delayed from the current delay amount by the delay time of one or two delay elements D which is half the minimum value of the effective window size. The delay code DC of the delay circuit 34_S is set.

[第5の実施形態の効果]
以上のとおり、第5の実施形態によれば、トリガ生成回路40Bは、トリガ信号として、ストローブ信号DQSと入力ビット信号自身とを切り替えて用いることができるように構成される。したがって、トリガ信号としてストローブ信号DQSを用いる場合には、ビットごとにレジスタ35Bに保持された1サイクルパルスの立上がりエッジまたは立下がりエッジを利用することによって、短時間でビットデスキューを実行することができる。さらに、上記の場合には第4の実施形態の場合と異なり、1サイクルパルス全体(立上がりエッジから立下がりエッジまで)を対応するレジスタ35Bに取り込む必要はないというメリットがある。
[Effects of Fifth Embodiment]
As described above, according to the fifth embodiment, the trigger generation circuit 40B is configured to be able to use the trigger signal by switching between the strobe signal DQS and the input bit signal itself. Therefore, when the strobe signal DQS is used as the trigger signal, the bit deskew can be executed in a short time by using the rising edge or the falling edge of the one-cycle pulse stored in the register 35B for each bit. . Further, in the above case, unlike the case of the fourth embodiment, there is an advantage that it is not necessary to capture the entire one-cycle pulse (from the rising edge to the falling edge) in the corresponding register 35B.

一方、トリガ信号として入力ビット信号自身を用いる場合には、第1の実施形態で説明したように、ビットごとに設けられた遅延回路に1サイクルパルスを1度だけ入力するだけで、ビットごとの有効ウィンドウサイズを決定することができる。したがって、データトレーニング(すなわち、ストローブ信号の遅延量の設定)に要する時間を極めて短縮することができる。   On the other hand, when the input bit signal itself is used as the trigger signal, as described in the first embodiment, only one cycle pulse is input once to the delay circuit provided for each bit, and the The effective window size can be determined. Therefore, the time required for data training (that is, setting of the amount of delay of the strobe signal) can be significantly reduced.

以上により、第5の実施形態によれば、インタフェース回路の初期化時のキャリブレーションに要する時間を短縮することができ、さらには、再キャリブレーション時の待ち時間を短縮することができる。   As described above, according to the fifth embodiment, the time required for calibration when initializing the interface circuit can be reduced, and the waiting time for re-calibration can be reduced.

なお、第5の実施形態は、第2の実施形態で説明した参照電圧トレーニングに組合わせることもできる。   Note that the fifth embodiment can be combined with the reference voltage training described in the second embodiment.

以上、本発明者によってなされた発明を実施の形態に基づき具体的に説明したが、本発明は上記実施の形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることはいうまでもない。   As described above, the invention made by the inventor has been specifically described based on the embodiment. However, the present invention is not limited to the above embodiment, and various modifications can be made without departing from the gist of the invention. Needless to say.

30,31 レシーバ、32 参照電圧生成器、33 キャリブレーション回路、34,34A 遅延回路、35,35A,35B レジスタ、36 サンプリング回路、40,40A,40B トリガ生成回路、50,50A 遅延線、60,61 ドライバ、100,100A,100B 半導体装置、101,101A,101B インタフェース回路、102,102A,102B 内部回路、110 受信制御回路、D,D1〜D11,DO,Di 遅延素子、DATA データ信号、DATA0,DATA1,DATA2 ビット信号、DQS ストローブ信号、FF,FF1〜FF11 フリップフロップ、cal_smpl_trg トリガ信号。   30, 31 receiver, 32 reference voltage generator, 33 calibration circuit, 34, 34A delay circuit, 35, 35A, 35B register, 36 sampling circuit, 40, 40A, 40B trigger generation circuit, 50, 50A delay line, 60, 61 driver, 100, 100A, 100B semiconductor device, 101, 101A, 101B interface circuit, 102, 102A, 102B internal circuit, 110 reception control circuit, D, D1 to D11, DO, Di delay element, DATA data signal, DATA0, DATA1, DATA2 bit signal, DQS strobe signal, FF, FF1 to FF11 flip-flop, cal_smpl_trg trigger signal.

Claims (14)

ストローブ信号とデータ信号とを受信するインタフェース回路を備え、
前記インタフェース回路は、
前記ストローブ信号が入力される第1の遅延線を含み、遅延量が可変の第1の遅延回路と、
前記データ信号が入力される第2の遅延線を含み、遅延量が可変の第2の遅延回路と、
前記第2の遅延線を伝送中の前記データ信号を前記第2の遅延線上の位置に対応付けて保持するレジスタと、
前記レジスタに保持された前記データ信号に基づいて前記第1の遅延回路の遅延量および前記第2の遅延回路の遅延量の少なくとも一方の設定値を算出するキャリブレーション回路とを備える、半導体装置。
An interface circuit for receiving a strobe signal and a data signal,
The interface circuit includes:
A first delay circuit including a first delay line to which the strobe signal is input, the delay amount being variable;
A second delay circuit including a second delay line to which the data signal is input, the second delay circuit having a variable delay amount;
A register for holding the data signal being transmitted through the second delay line in association with a position on the second delay line;
A semiconductor circuit comprising: a calibration circuit that calculates a set value of at least one of a delay amount of the first delay circuit and a delay amount of the second delay circuit based on the data signal held in the register.
前記インタフェース回路は、前記第2の遅延線を伝送中の前記データ信号の立上がりエッジまたは立下がりエッジに基づいてトリガを生成するトリガ生成回路をさらに備え、
前記レジスタは、前記トリガ生成回路によって生成されたトリガに応答して、前記データ信号を保持する、請求項1に記載の半導体装置。
The interface circuit further includes a trigger generation circuit that generates a trigger based on a rising edge or a falling edge of the data signal being transmitted through the second delay line,
The semiconductor device according to claim 1, wherein the register holds the data signal in response to a trigger generated by the trigger generation circuit.
前記キャリブレーション回路は、前記レジスタに保持された前記データ信号の立上がりエッジと立下がりエッジとの間の間隔に基づいて有効ウィンドウサイズを算出し、
前記キャリブレーション回路は、算出した前記有効ウィンドウサイズに基づいて、前記第1の遅延回路の遅延量および前記第2の遅延回路の遅延量の少なくとも一方の設定値を算出する、請求項2に記載の半導体装置。
The calibration circuit calculates an effective window size based on an interval between a rising edge and a falling edge of the data signal held in the register,
3. The calibration circuit according to claim 2, wherein the calibration circuit calculates a set value of at least one of a delay amount of the first delay circuit and a delay amount of the second delay circuit based on the calculated effective window size. Semiconductor device.
前記インタフェース回路は、第1のトリガモードと第2のトリガモードとを有するトリガ生成回路をさらに備え、
前記トリガ生成回路は、前記第1のトリガモードにおいて、前記第2の遅延線を伝送中の前記データ信号の立上がりエッジまたは立下がりエッジに基づいてトリガを生成し、
前記トリガ生成回路は、前記第2のトリガモードにおいて、前記第1の遅延回路によって遅延された前記ストローブ信号に基づいてトリガを生成し、
前記レジスタは、前記トリガ生成回路によって生成されたトリガに応答して、前記データ信号を保持する、請求項1に記載の半導体装置。
The interface circuit further includes a trigger generation circuit having a first trigger mode and a second trigger mode,
In the first trigger mode, the trigger generation circuit generates a trigger based on a rising edge or a falling edge of the data signal being transmitted through the second delay line,
The trigger generation circuit generates a trigger based on the strobe signal delayed by the first delay circuit in the second trigger mode,
The semiconductor device according to claim 1, wherein the register holds the data signal in response to a trigger generated by the trigger generation circuit.
前記キャリブレーション回路は、前記第1のトリガモードにおいて、前記レジスタに保持された前記データ信号の立上がりエッジと立下がりエッジとの間の間隔に基づいて有効ウィンドウサイズを算出し、
前記キャリブレーション回路は、前記第2のトリガモードにおいて、前記レジスタに保持された前記データ信号の立上がりエッジまたは立下がりエッジに基づいて、前記ストローブ信号と前記データ信号との間のタイミングのずれを算出し、
前記キャリブレーション回路は、算出した前記有効ウィンドウサイズおよび算出した前記タイミングのずれに基づいて、前記第1の遅延回路の遅延量および前記第2の遅延回路の遅延量のうち少なくとも一方の設定値を算出する、請求項4に記載の半導体装置。
The calibration circuit, in the first trigger mode, calculates an effective window size based on an interval between a rising edge and a falling edge of the data signal held in the register,
The calibration circuit calculates a timing difference between the strobe signal and the data signal based on a rising edge or a falling edge of the data signal held in the register in the second trigger mode. And
The calibration circuit sets at least one of a delay amount of the first delay circuit and a delay amount of the second delay circuit based on the calculated effective window size and the calculated timing shift. The semiconductor device according to claim 4, wherein the calculation is performed.
前記インタフェース回路は、前記第1の遅延回路によって遅延された前記ストローブ信号に基づいてトリガを生成するトリガ生成回路をさらに備え、
前記レジスタは、前記トリガ生成回路によって生成されたトリガに応答して、前記データ信号を保持する、請求項1に記載の半導体装置。
The interface circuit further includes a trigger generation circuit that generates a trigger based on the strobe signal delayed by the first delay circuit,
The semiconductor device according to claim 1, wherein the register holds the data signal in response to a trigger generated by the trigger generation circuit.
前記キャリブレーション回路は、前記レジスタに保持された前記データ信号の立上がりエッジと立下がりエッジとの間の間隔に基づいて有効ウィンドウサイズを算出し、
前記キャリブレーション回路は、前記レジスタに保持された前記データ信号の立上がりエッジまたは立下がりエッジに基づいて、前記ストローブ信号と前記データ信号との間のタイミングのずれを算出し、
前記キャリブレーション回路は、算出した前記有効ウィンドウサイズおよび算出した前記タイミングのずれに基づいて、前記第1の遅延回路の遅延量および前記第2の遅延回路の遅延量のうち少なくとも一方の設定値を算出する、請求項6に記載の半導体装置。
The calibration circuit calculates an effective window size based on an interval between a rising edge and a falling edge of the data signal held in the register,
The calibration circuit calculates a timing shift between the strobe signal and the data signal based on a rising edge or a falling edge of the data signal held in the register,
The calibration circuit sets at least one of a delay amount of the first delay circuit and a delay amount of the second delay circuit based on the calculated effective window size and the calculated timing shift. The semiconductor device according to claim 6, wherein the calculation is performed.
前記第1の遅延回路は、前記第1の遅延線の第1端と第2端との間の複数の出力点のうちの1つを、第1の設定値に従って選択する第1の選択回路を含み、
前記第1の遅延線の前記第1端から入力された前記ストローブ信号は、前記第1の選択回路によって選択された前記第1の遅延線の出力端から出力され、
前記第2の遅延回路は、前記第2の遅延線の第1端と第2端との間の複数の出力点のうちの1つを、第2の設定値に従って選択する第2の選択回路を含み、
前記第2の遅延線の前記第1端から入力された前記データ信号は、前記第2の選択回路によって選択された前記第2の遅延線の出力端から出力される、請求項3に記載の半導体装置。
The first delay circuit is configured to select one of a plurality of output points between a first end and a second end of the first delay line in accordance with a first set value. Including
The strobe signal input from the first end of the first delay line is output from an output end of the first delay line selected by the first selection circuit,
The second delay circuit selects one of a plurality of output points between a first end and a second end of the second delay line according to a second set value. Including
4. The data line according to claim 3, wherein the data signal input from the first end of the second delay line is output from an output end of the second delay line selected by the second selection circuit. Semiconductor device.
前記第1の設定値および前記第2の設定値の設定後に、前記キャリブレーション回路は、前記レジスタに保持された前記データ信号に基づいて有効ウィンドウサイズを常時算出し、前記算出された有効ウィンドウサイズが閾値を超えて変化した場合には、前記第1の設定値および前記第2の設定値の少なくとも一方を再設定する、請求項8に記載の半導体装置。   After setting the first set value and the second set value, the calibration circuit constantly calculates an effective window size based on the data signal held in the register, and the calculated effective window size 9. The semiconductor device according to claim 8, wherein, when the threshold value exceeds a threshold value, at least one of the first set value and the second set value is reset. 前記インタフェース回路は、
参照電圧を生成する参照電圧生成器と、
前記第2の遅延回路の前段に設けられ、受信した前記データ信号の値と前記参照電圧とを比較し、比較結果に基づいて前記データ信号の波形を整形するレシーバとをさらに備える、請求項1に記載の半導体装置。
The interface circuit includes:
A reference voltage generator for generating a reference voltage;
2. A receiver provided before the second delay circuit, for comparing a value of the received data signal with the reference voltage, and shaping a waveform of the data signal based on a result of the comparison. 3. The semiconductor device according to claim 1.
前記インタフェース回路は、
参照電圧を生成する参照電圧生成器と、
前記第2の遅延回路の前段に設けられ、受信した前記データ信号の値と前記参照電圧とを比較し、比較結果に基づいて前記データ信号の波形を整形するレシーバとをさらに備える、請求項2に記載の半導体装置。
The interface circuit includes:
A reference voltage generator for generating a reference voltage;
3. A receiver provided before the second delay circuit, the receiver comparing the value of the received data signal with the reference voltage, and shaping the waveform of the data signal based on the comparison result. 3. The semiconductor device according to claim 1.
前記インタフェース回路は、
参照電圧を生成する参照電圧生成器と、
前記第2の遅延回路の前段に設けられ、受信した前記データ信号の値と前記参照電圧とを比較し、比較結果に基づいて前記データ信号の波形を整形するレシーバとをさらに備える、請求項3に記載の半導体装置。
The interface circuit includes:
A reference voltage generator for generating a reference voltage;
4. A receiver provided before the second delay circuit, for comparing a value of the received data signal with the reference voltage, and shaping a waveform of the data signal based on a result of the comparison. 3. The semiconductor device according to claim 1.
前記キャリブレーション回路は、前記参照電圧を順次変化させた場合の各設定値に対して、前記レジスタに保持された前記データ信号に基づいて有効ウィンドウサイズを算出し、前記算出した有効ウィンドウサイズが最大となるように前記参照電圧を設定する、請求項12に記載の半導体装置。   The calibration circuit calculates an effective window size based on the data signal held in the register for each set value when the reference voltage is sequentially changed, and the calculated effective window size is the maximum. 13. The semiconductor device according to claim 12, wherein the reference voltage is set so that ストローブ信号が入力される第1の遅延線を含み、遅延量が可変の第1の遅延回路と、
データ信号が入力される第2の遅延線を含み、遅延量が可変の第2の遅延回路と、
前記第1の遅延回路によって遅延された前記ストローブ信号の立上がりエッジおよび立下がりエッジの少なくとも一方のタイミングで、前記第2の遅延回路によって遅延された前記データ信号をサンプリングするサンプリング回路と、
前記第2の遅延線を伝送中の前記データ信号の立上がりエッジまたは立下がりエッジに基づいてトリガを生成するトリガ生成回路と、
前記トリガ生成回路によって生成されたトリガに応答して、前記第2の遅延線を伝送中の前記データ信号を前記第2の遅延線上の位置に対応付けて保持するレジスタとを備える、半導体装置。
A first delay circuit including a first delay line to which a strobe signal is input, the delay amount being variable;
A second delay circuit including a second delay line to which a data signal is input and having a variable delay amount;
A sampling circuit that samples the data signal delayed by the second delay circuit at at least one of a rising edge and a falling edge of the strobe signal delayed by the first delay circuit;
A trigger generation circuit that generates a trigger based on a rising edge or a falling edge of the data signal being transmitted through the second delay line;
A semiconductor device comprising, in response to a trigger generated by the trigger generation circuit, a register for holding the data signal being transmitted through the second delay line in association with a position on the second delay line.
JP2018173335A 2018-09-18 2018-09-18 Semiconductor device Pending JP2020046800A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018173335A JP2020046800A (en) 2018-09-18 2018-09-18 Semiconductor device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018173335A JP2020046800A (en) 2018-09-18 2018-09-18 Semiconductor device

Publications (1)

Publication Number Publication Date
JP2020046800A true JP2020046800A (en) 2020-03-26

Family

ID=69899673

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018173335A Pending JP2020046800A (en) 2018-09-18 2018-09-18 Semiconductor device

Country Status (1)

Country Link
JP (1) JP2020046800A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11756605B2 (en) 2020-11-20 2023-09-12 Renesas Electronics Corporation Semiconductor device
JP7504006B2 (en) 2020-11-20 2024-06-21 ルネサスエレクトロニクス株式会社 Semiconductor Device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11756605B2 (en) 2020-11-20 2023-09-12 Renesas Electronics Corporation Semiconductor device
JP7504006B2 (en) 2020-11-20 2024-06-21 ルネサスエレクトロニクス株式会社 Semiconductor Device

Similar Documents

Publication Publication Date Title
US8644096B2 (en) Command paths, apparatuses, memories, and methods for providing internal commands to a data path
US8780655B1 (en) Method and apparatus for aligning a clock signal and a data strobe signal in a memory system
US10025345B2 (en) System on chip and integrated circuit for performing skew calibration using dual edge and mobile device including the same
US7869286B2 (en) Semiconductor memory device and method for operating the same
US7236035B2 (en) Semiconductor device adapted to minimize clock skew
US9225316B2 (en) Duty cycle correction circuit and operation method thereof
US8209560B2 (en) Transmission system where a first device generates information for controlling transmission and latch timing for a second device
US7068086B2 (en) Phase correction circuit
KR100907016B1 (en) Data input circuit of semiconductor memory apparatus and control method of the same
US10644707B2 (en) Delay circuit
JP2013109637A (en) Memory interface circuit and operation method thereof
CN111312307B (en) Memory control circuit and correction method
US8368383B2 (en) Method for testing a variable digital delay line and a device having variable digital delay line testing capabilities
US20040000940A1 (en) Circuit and method for outputting aligned strobe signal and parallel data signal
CN107395198B (en) Clock data recovery device and method
JP2020046800A (en) Semiconductor device
US10715308B2 (en) Transmitting circuit, semiconductor apparatus and semiconductor system configured to use the transmitting circuit
JP2016072770A (en) Receiving circuit
US10554211B2 (en) Data receiver circuit
US10468080B1 (en) Memory device performing write leveling operation
TWI650989B (en) Adaptive delayer and data and clock recovery circuit
US9094183B2 (en) Circuits for receiving data
US8344775B2 (en) Clock delay correcting device and semiconductor device having the same
US20180090197A1 (en) Semiconductor device
US7583544B2 (en) Data reading circuit