JP2012124716A - Data receiver, data transmitter, control method - Google Patents

Data receiver, data transmitter, control method Download PDF

Info

Publication number
JP2012124716A
JP2012124716A JP2010273907A JP2010273907A JP2012124716A JP 2012124716 A JP2012124716 A JP 2012124716A JP 2010273907 A JP2010273907 A JP 2010273907A JP 2010273907 A JP2010273907 A JP 2010273907A JP 2012124716 A JP2012124716 A JP 2012124716A
Authority
JP
Japan
Prior art keywords
data
reception
clock
receiving
control unit
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
JP2010273907A
Other languages
Japanese (ja)
Inventor
Koichi Morishita
浩一 森下
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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2010273907A priority Critical patent/JP2012124716A/en
Publication of JP2012124716A publication Critical patent/JP2012124716A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide a data receiver, a data transmitter, and a control method, capable of solving a problem in which there is a possibility that a data receiver fails to acquire data supplied by a data transmitter, when there is a delay of 1 cycle or more between data the data receiver receives from the data transmitter and a clock the data receiver outputs to the data transmitter.SOLUTION: The data receiver, the data transmitter, and the control method, when transmitting a command to the data transmitter, count a cycle number between a transmission end timing of the command and a reception start timing of data corresponding to the command from the transmitter.

Description

本発明は、データ受信装置とデータ送信装置との間のデータ転送のキャリブレーションに関する。   The present invention relates to calibration of data transfer between a data receiving device and a data transmitting device.

特許文献1に開示されているように、データを受信する装置(データ受信装置)からデータを供給する装置(データ送信装置)へ動作クロックを供給する技術がある。このような技術では、データ受信装置から供給されるクロックに同期してデータ送信装置がデータを出力するように設定しておき、データ受信装置がデータ送信装置の出力したデータを取り込むように構成することが一般的である。   As disclosed in Patent Document 1, there is a technique for supplying an operation clock from an apparatus for receiving data (data receiving apparatus) to an apparatus for supplying data (data transmitting apparatus). In such a technique, the data transmission device is set to output data in synchronization with the clock supplied from the data reception device, and the data reception device is configured to capture the data output from the data transmission device. It is common.

この方法を用いると、データ受信装置は、データ送信装置へのクロックの供給を一時的に停止する(クロックゲーティングに相当する)ことで、データ送信装置からデータ受信装置へのデータの供給を一時的に停止する事ができる。例えば、データ受信装置内の受信バッファの許容容量までデータが蓄積された場合、データ受信装置はクロックの供給を停止し、それに伴ってデータ送信装置によるデータの供給を停止できるので、バッファの容量が小さくても簡単な構成によってバッファのオーバーフローを抑制できる。   When this method is used, the data receiving device temporarily stops the supply of data from the data transmitting device to the data receiving device by temporarily stopping the supply of the clock to the data transmitting device (corresponding to clock gating). Can be stopped. For example, when the data is stored up to the allowable capacity of the reception buffer in the data receiving device, the data receiving device can stop supplying the clock, and accordingly, the data transmitting device can stop supplying data. Buffer overflow can be suppressed with a small but simple configuration.

特開昭59−173839JP 59-173839

データ受信装置からデータ送信装置へ動作クロックを供給する技術では、クロックの高周波数化に伴いデータ受信装置とデータ送信装置間の配線遅延などの影響が大きくなる。そして、データ受信装置がデータ送信装置から受信するデータと、データ受信装置がデータ送信装置へ出力するクロックとの間で1サイクル以上の遅延がある場合、データ受信装置がデータ送信装置から供給されるデータを取りこぼしてしまう可能性がある。これは、データ受信装置でデータ送信装置へのクロックを停止する制御系と、データ受信装置からデータ送信装置へクロックを供給しデータ送信装置がクロックに同期してデータを出力するデータ転送系との間でズレが生じているためである。   In the technique of supplying an operation clock from the data reception device to the data transmission device, the influence of a wiring delay between the data reception device and the data transmission device increases as the clock frequency increases. When there is a delay of one cycle or more between the data received by the data receiving device from the data transmitting device and the clock output from the data receiving device to the data transmitting device, the data receiving device is supplied from the data transmitting device. Data may be lost. This includes a control system that stops the clock to the data transmission device in the data reception device, and a data transfer system that supplies the clock from the data reception device to the data transmission device and outputs data in synchronization with the clock. This is because there is a gap between them.

上記課題を解決するために本発明に係るデータ受信装置は、データ送信装置と通信可能に接続されるデータ受信装置であって、前記データ送信装置にクロックを供給する供給手段と、前記データ送信装置が前記クロックと同期させて出力するデータを受信する受信手段と、前記データ送信装置にコマンドを送信する送信手段と、前記コマンドの送信終了タイミングと、前記送信装置からの前記コマンドに対応するデータの受信開始タイミングとの間のサイクル数をカウントする計数手段と、を有することを特徴とする。   In order to solve the above-mentioned problem, a data receiving apparatus according to the present invention is a data receiving apparatus connected to be communicable with a data transmitting apparatus, and a supply means for supplying a clock to the data transmitting apparatus; Receiving means for receiving data output in synchronization with the clock, transmitting means for transmitting a command to the data transmitting apparatus, transmission end timing of the command, and data corresponding to the command from the transmitting apparatus And counting means for counting the number of cycles between the reception start timing and the reception start timing.

また、上記課題を解決するために本発明に係るデータ送信装置は、データ受信装置と通信可能に接続されるデータ送信装置であって、所定のデータを保持している記憶手段と、前記データ受信装置からデータ受信に関するキャリブレーションコマンドを受信した場合、前記所定のデータを前記データ受信装置から供給されるクロックに同期して所定のサイクル数で前記データ受信装置へ出力する出力手段とを有することを特徴とする。   In order to solve the above problems, a data transmission device according to the present invention is a data transmission device connected to be communicable with a data reception device, the storage means holding predetermined data, and the data reception device Output means for outputting the predetermined data to the data receiving device in a predetermined number of cycles in synchronization with a clock supplied from the data receiving device when a calibration command related to data reception is received from the device. Features.

データ送信装置とデータ受信装置の間の配線遅延の影響が大きくなっても、データ受信装置側でのデータのとりこぼしを抑制できる。   Even if the influence of the wiring delay between the data transmission device and the data reception device becomes large, data loss on the data reception device side can be suppressed.

本発明の一実施形態におけるデータ受信装置の構成図である。It is a block diagram of the data receiver in one Embodiment of this invention. スキュー制御部の構成図とタイミングチャートである。It is the block diagram and timing chart of a skew control part. サイクル制御部の構成図とタイミングチャートである。It is a block diagram and a timing chart of a cycle control part. キャリブレーション処理のフローチャートと出力クロック制御部の構成図である。It is the flowchart of a calibration process, and the block diagram of an output clock control part. 遅延サイクル数を計測するタイミングチャートである。It is a timing chart which measures the number of delay cycles. 遅延サイクル数計数回路の構成図である。It is a block diagram of a delay cycle number counting circuit. 本発明の一実施形態におけるデータ送信装置の構成図である。It is a block diagram of the data transmitter in one Embodiment of this invention. データ送信装置とデータ受信装置を有するシステム構成の概略図である。It is the schematic of a system configuration | structure which has a data transmitter and a data receiver. コマンドやデータのフォーマットを示すタイミングチャートである。It is a timing chart which shows the format of a command or data. 正しいサイクル設定を用いた場合のタイミングチャートである。It is a timing chart at the time of using a correct cycle setting. 異なったサイクル設定を用いた場合のタイミングチャートである。It is a timing chart at the time of using a different cycle setting.

図面を参照して本発明の一実施形態を以下に説明する。   An embodiment of the present invention will be described below with reference to the drawings.

図8はデータを供給する装置として機能するデータ送信装置107(以降、外部デバイス107と称す)と、データ送信装置107からデータを受信する装置として機能するデータ受信装置(以降、ASIC100と称す)とが接続されている状態を示すブロック図である。外部デバイス107と通信を行う機能を有するLSIであるASIC100は、CPU101、DRAMコントローラ104、DMAコントローラ102、外部デバイスコントローラ103(以降、デバイス制御部103と略す)とCLOCKジェネレータ105を有する。(ASICはApplication Specific Integrated Circuitの略称で、DMAはDirect Memory Accessの略称。)   FIG. 8 shows a data transmission device 107 (hereinafter referred to as an external device 107) that functions as a device that supplies data, and a data reception device (hereinafter referred to as ASIC 100) that functions as a device that receives data from the data transmission device 107. It is a block diagram which shows the state where is connected. The ASIC 100, which is an LSI having a function of communicating with the external device 107, includes a CPU 101, a DRAM controller 104, a DMA controller 102, an external device controller 103 (hereinafter abbreviated as a device control unit 103), and a CLOCK generator 105. (ASIC is an abbreviation for Application Specific Integrated Circuit, and DMA is an abbreviation for Direct Memory Access.)

また、発振手段としてのCLOCKジェネレータ105はCPU101、DMAコントローラ102、デバイス制御部103及びDRAMコントローラ104の用いるクロック(cpu_clock113、dmac_clock114、host_clock115、dram_clock116)を生成して供給する。   Further, the CLOCK generator 105 as an oscillating means generates and supplies clocks (cpu_clock 113, dmac_clock 114, host_clock 115, drum_clock 116) used by the CPU 101, the DMA controller 102, the device control unit 103, and the DRAM controller 104.

CPU101はCPU I/F110を介して、デバイス制御部103とDMAコントローラ102とDRAMコントローラ104へレジスタアクセスを行う。DMAコントローラ102はCPU I/F110を介して、DRAMコントローラ104との間でデータ転送を行う。DRAMコントローラ104はDRAM I/F117を介してDRAM106との間でデータ転送を行う。デバイス制御部103はDMA I/F111を介して、DMAコントローラ102との間でデータ転送を行う。また、デバイス制御部103は外部デバイスI/F112を介して、外部デバイス107との間でデータ転送を行う。   The CPU 101 performs register access to the device control unit 103, the DMA controller 102, and the DRAM controller 104 via the CPU I / F 110. The DMA controller 102 performs data transfer with the DRAM controller 104 via the CPU I / F 110. The DRAM controller 104 performs data transfer with the DRAM 106 via the DRAM I / F 117. The device control unit 103 performs data transfer with the DMA controller 102 via the DMA I / F 111. Further, the device control unit 103 performs data transfer with the external device 107 via the external device I / F 112.

図1は本発明に係る一実施形態のデバイス制御部103の構成を示す。なお、デバイス制御部103と通信可能に接続されている外部デバイス107についての詳細は後述するので、図1では略記している。デバイス制御部103はCLOCKジェネレータ105からホストクロック115(図中、host_clock)を受け取る。ホストクロック115はデバイス制御部103内の各構成に接続されており、デバイス制御部103の各構成は、このホストクロック115に同期して動作する。   FIG. 1 shows a configuration of a device control unit 103 according to an embodiment of the present invention. The details of the external device 107 that is communicably connected to the device control unit 103 will be described later, and are therefore abbreviated in FIG. The device control unit 103 receives a host clock 115 (host_clock in the figure) from the CLOCK generator 105. The host clock 115 is connected to each component in the device control unit 103, and each component of the device control unit 103 operates in synchronization with the host clock 115.

CPU I/F制御部201は、CPU101からのデータやコマンド、レジスタアクセスを受付ける一方で、CPU101へコマンドやデータを送信する。DMA I/F制御部111は、外部デバイス107へ送信するデータをDMAコントローラ102から受付け、一方で外部デバイス107から受信するデータをDMAコントローラ102へ送信する。   The CPU I / F control unit 201 receives data, commands, and register access from the CPU 101, and transmits commands and data to the CPU 101. The DMA I / F control unit 111 receives data to be transmitted to the external device 107 from the DMA controller 102, while transmitting data to be received from the external device 107 to the DMA controller 102.

デバイス制御部103は、コマンドパラレルシリアル変換部125、受信コマンドシリアルパラレル変換部126を介して外部デバイス107とコマンドをやりとりする。まず、CPU I/F制御部201はCPU I/F110を介してCPU101から受け取ったパラレル形式の送信コマンド223(s_cmd)を送信コマンドパラレルシリアル変換部125(以降、送信コマンドPS変換部)に送信する。送信コマンドPS変換部125は、受け取ったパラレル形式の送信コマンド223をシリアル形式の送信コマンド224(s_cmd_data)に変換して、外部デバイス107に送信する。   The device control unit 103 exchanges commands with the external device 107 via the command parallel / serial conversion unit 125 and the reception command serial / parallel conversion unit 126. First, the CPU I / F control unit 201 transmits a transmission command 223 (s_cmd) in parallel format received from the CPU 101 to the transmission command parallel / serial conversion unit 125 (hereinafter referred to as a transmission command PS conversion unit) via the CPU I / F 110. . The transmission command PS conversion unit 125 converts the received transmission command 223 in the parallel format into a transmission command 224 (s_cmd_data) in the serial format and transmits it to the external device 107.

外部デバイス107は受け取ったシリアル形式の送信コマンド224のデコードを行い、送信コマンドを検知する。さらに、外部デバイス107は送信コマンドの検知結果を示す検知情報をシリアル形式の受信コマンド226(r_cmd_data)として、デバイス制御部103に送信する。   The external device 107 decodes the received serial format transmission command 224 and detects the transmission command. Furthermore, the external device 107 transmits detection information indicating the detection result of the transmission command to the device control unit 103 as a serial reception command 226 (r_cmd_data).

受信コマンドSP変換部126は外部デバイス107の出力するシリアル形式の受信コマンド226を受信し、パラレル形式の受信コマンド225(r_cmd)に変換してCPU I/F制御部201、CPU I/F110を介してCPU101へ送信する。   The reception command SP conversion unit 126 receives the serial format reception command 226 output from the external device 107, converts it into a parallel format reception command 225 (r_cmd), and passes through the CPU I / F control unit 201 and the CPU I / F 110. To the CPU 101.

また、デバイス制御部103は、送信バッファ207、送信データパラレルシリアル変換部208、スキュー制御部211、受信データシリアルパラレル変換部210、受信バッファ209を介して外部デバイス107とデータをやりとりする。また、出力クロック244をデアサートして外部デバイス107から供給されるデータを停止させるために、出力クロック制御部213と出力クロックゲーティング部214を有している。出力クロック制御部213はデバイス制御部103の送信バッファ207/受信バッファ209の状態やシリアル通信状態(rcv_status239、snd_status240)からクロックゲーティング信号を出力する。出力クロックゲーティング214は、このクロックゲーティング信号を受けて、ホストクロック115(host_clk)をゲーティングするための、クロックゲーティングセルが実装されている。   The device control unit 103 exchanges data with the external device 107 via the transmission buffer 207, the transmission data parallel / serial conversion unit 208, the skew control unit 211, the reception data serial / parallel conversion unit 210, and the reception buffer 209. In addition, an output clock control unit 213 and an output clock gating unit 214 are provided to deassert the output clock 244 and stop data supplied from the external device 107. The output clock control unit 213 outputs a clock gating signal from the state of the transmission buffer 207 / reception buffer 209 of the device control unit 103 and the serial communication state (rcv_status 239, snd_status 240). The output clock gating 214 is mounted with a clock gating cell for receiving the clock gating signal and gating the host clock 115 (host_clk).

また、デバイス制御部103はスキュー調整(補正)とサイクル調整(補正)から成るキャリブレーション(詳細は後述)工程のための回路を有している。デバイス制御部103はスキュー調整(補正)をするために、スキュー制御部211とスキュー設定レジスタ212とを有する。ここで、スキュー調整(補正)とは、受信データシリアルパラレル変換部210(以降、受信データSP変換部)のデータ取り込みタイミング(ラッチタイミング)を(ホストクロック115に対して)1サイクル以内の遅延によって調整(補正)することを示す。   Further, the device control unit 103 has a circuit for a calibration (details will be described later) process including skew adjustment (correction) and cycle adjustment (correction). The device control unit 103 includes a skew control unit 211 and a skew setting register 212 in order to perform skew adjustment (correction). Here, the skew adjustment (correction) is a data acquisition timing (latch timing) of the reception data serial / parallel conversion unit 210 (hereinafter referred to as reception data SP conversion unit) (with respect to the host clock 115) by a delay within one cycle. Indicates adjustment (correction).

スキュー設定レジスタ212はCPU I/F制御部201からスキュー設定値227(skew_reg)を受け取り保持する。スキュー制御部211は、スキュー設定レジスタ212からスキュー選択値238(skew_sel)を受け取り、設定値に応じて外部デバイス107から受け取ったシリアル形式の受信データ236(d2h_data、以降、単に受信データ236と略する場合もある)を遅延させる。   The skew setting register 212 receives and holds the skew setting value 227 (skew_reg) from the CPU I / F control unit 201. The skew control unit 211 receives the skew selection value 238 (skew_sel) from the skew setting register 212, and receives the serial format received data 236 (d2h_data, hereinafter simply referred to as received data 236) from the external device 107 according to the set value. Delay).

デバイス制御部103はサイクル調整(補正)をするために、遅延サイクル数計数回路610およびサイクル制御部603を有する。ここで、サイクル調整(補正)とは、受信データSP変換部210の制御信号である受信イネーブル信号250(rcv_en)を(ホストクロック115に対して)サイクル単位で遅延させて受信データSP変換部210のデータ取り込み停止タイミング、データ取り込み再開タイミングを調整(補正)することを示す。   The device control unit 103 includes a delay cycle number counting circuit 610 and a cycle control unit 603 in order to perform cycle adjustment (correction). Here, the cycle adjustment (correction) refers to the reception data SP conversion unit 210 by delaying the reception enable signal 250 (rcv_en), which is a control signal of the reception data SP conversion unit 210, in units of cycles (relative to the host clock 115). This indicates that the data acquisition stop timing and the data acquisition restart timing are adjusted (corrected).

遅延サイクル数計数回路610はデバイス制御部103が外部デバイス107から受信する受信データ236がデバイス制御部103の出力する出力クロック244に対して何サイクル遅延しているかを計測する回路である。サイクル制御部603は遅延サイクル数計数回路610が計測したサイクル選択値249に対応するサイクル数だけ、出力クロックイネーブル信号243(dev_clk_en)を遅延させ、受信イネーブル信号250(rcv_en)を生成し、受信データSP変換部210へデータ取り込みタイミングを指示する。   The delay cycle number counting circuit 610 is a circuit that measures how many cycles the reception data 236 received by the device control unit 103 from the external device 107 is delayed with respect to the output clock 244 output by the device control unit 103. The cycle control unit 603 delays the output clock enable signal 243 (dev_clk_en) by the number of cycles corresponding to the cycle selection value 249 measured by the delay cycle number counting circuit 610, generates the reception enable signal 250 (rcv_en), and receives the received data The SP conversion unit 210 is instructed to take in data.

次に、図7に本実施形態の外部デバイス107の構成を示す。本実施形態では外部デバイス107としてFlashメモリデバイスを用いている。なお、デバイス制御部103については図1に示したとおりであり、その詳細な構成は省略している。なお、キャリブレーションパターン領域335はレジスタ等のIO領域を有し、固定サイクルでデータをデバイス制御部103にデータ出力可能である。例えば、データ受信装置とデータ送信装置間で配線遅延が生じない場合デバイス制御部103がコマンドを出力してからキャリブレーションパターン領域335からデータを受信するまでに固定サイクルのアクセスタイム(レイテンシ)を要する。Flashメモリ領域334は予め定められた期間内でデータ出力可能である。(予め定められた期間については、規格などで定められている期間である。例えば、min=2 cycle, max=1秒のように期間が定められた場合、デバイス制御部103はコマンドを出力してからこの期間にデータが来るものとして待ち受ける。)   Next, FIG. 7 shows the configuration of the external device 107 of this embodiment. In the present embodiment, a flash memory device is used as the external device 107. The device control unit 103 is as shown in FIG. 1, and its detailed configuration is omitted. The calibration pattern area 335 has an IO area such as a register, and data can be output to the device control unit 103 in a fixed cycle. For example, when there is no wiring delay between the data receiving apparatus and the data transmitting apparatus, a fixed cycle access time (latency) is required from the output of the command by the device control unit 103 to the reception of data from the calibration pattern area 335. . The flash memory area 334 can output data within a predetermined period. (The predetermined period is a period defined by a standard or the like. For example, when the period is determined such as min = 2 cycle, max = 1 second, the device control unit 103 outputs a command. (Waiting for data to come during this period.)

外部デバイス107はデバイス制御部103から出力されたクロック信号245(dev_clk’)を受け取る。クロック信号245は外部デバイス107内の各構成に接続されており、外部デバイス107の各構成はこのクロック信号245に同期して動作する。   The external device 107 receives the clock signal 245 (dev_clk ′) output from the device control unit 103. The clock signal 245 is connected to each component in the external device 107, and each component of the external device 107 operates in synchronization with this clock signal 245.

外部デバイス107はデバイス制御部103より受信したシリアル形式のコマンド324(s_cmd_data’)を受信コマンドシリアルパラレル変換部325(以下、単に受信コマンドSP変換部325と称す)でパラレル化し、コマンド制御部301に送る。コマンド制御部301でこのパラレル化されたコマンドをデコードし、そのデコード結果をシリアル形式のコマンド326(r_cmd_data’)として、送信コマンドパラレルシリアル変換部327(以降、送信コマンドPS変換部327と称す)でシリアル化しデバイス制御部103に送信する。   The external device 107 parallelizes the serial-format command 324 (s_cmd_data ′) received from the device control unit 103 by a reception command serial / parallel conversion unit 325 (hereinafter simply referred to as a reception command SP conversion unit 325), and sends it to the command control unit 301. send. The command control unit 301 decodes the parallelized command, and uses the decoded result as a serial command 326 (r_cmd_data ′) by a transmission command parallel / serial conversion unit 327 (hereinafter referred to as a transmission command PS conversion unit 327). Serialized and transmitted to the device control unit 103.

コマンド制御部301はデバイス制御部103から送られたコマンドをデコードし解釈した命令がデータ転送命令を含む場合には、このデータ転送命令に基づいて送信データ制御部304もしくは受信データ制御部305にデータ転送を指示する。   If the command decoded and interpreted from the device control unit 103 includes a data transfer command, the command control unit 301 sends data to the transmission data control unit 304 or the reception data control unit 305 based on the data transfer command. Instruct transfer.

まず、コマンド制御部301が、デバイス制御部103から外部デバイス107へのデータ転送を示すコマンド(データライト)を受信した場合について説明する。デバイス制御部103からのシリアルデータ331(h2d_data’)は受信データシリアルパラレル変換部308(以降、受信データSP変換部308と称す)においてパラレル化される。そして、その後コマンド制御部301の指示に基づいて受信データ制御部305でパラレスデータに格納アドレス等の情報を付加した上でFlashメモリ領域334へ送る。   First, a case where the command control unit 301 receives a command (data write) indicating data transfer from the device control unit 103 to the external device 107 will be described. Serial data 331 (h2d_data ′) from the device control unit 103 is parallelized by a reception data serial / parallel conversion unit 308 (hereinafter referred to as a reception data SP conversion unit 308). Then, based on an instruction from the command control unit 301, the reception data control unit 305 adds information such as a storage address to the parallel data, and sends the data to the flash memory area 334.

次に、コマンド制御部301が、外部デバイス107からデバイス制御部103へのデータ転送(通常のFlashメモリリード)を要求するコマンド(データリード)を受信した場合について説明する。送信データ制御部304は不図示の経路でFlashメモリ領域334に対してアドレスを送り、データを取り出し送信データパラレスシリアル変換部310(以降、送信データPS変換部310と称す)でシリアル化した上で、受信データ237(d2h_data’)をデバイス制御部103へ転送する。この際に、送信データ選択部333はコマンド制御部301からの選択信号336(calib_sel)に基づいて、Flashメモリ領域334からのデータを送信データ制御部304に送るように動作する。   Next, a case where the command control unit 301 receives a command (data read) requesting data transfer (normal flash memory read) from the external device 107 to the device control unit 103 will be described. The transmission data control unit 304 sends an address to the flash memory area 334 through a path (not shown), extracts the data, and serializes it by the transmission data parallel serial conversion unit 310 (hereinafter referred to as the transmission data PS conversion unit 310). Then, the received data 237 (d2h_data ′) is transferred to the device control unit 103. At this time, the transmission data selection unit 333 operates to send the data from the flash memory area 334 to the transmission data control unit 304 based on the selection signal 336 (calib_sel) from the command control unit 301.

次に、コマンド制御部301が、外部デバイス107からデバイス制御部103へのキャリブレーションに関するデータ転送を指示するコマンドを受信した場合について説明する。まず、コマンド制御部301が選択信号336によって、送信データ選択部333がキャリブレーションパターン領域335からのデータを送信データ制御部304に送るように動作するように制御する。そして、送信データ制御部304はキャリブレーションパターン領域335からキャリブレーションパターンを読み出し、通常のデータと同様に送信データPS変換部310によってシリアル化し、デバイス制御部103へ転送する。   Next, a case where the command control unit 301 receives a command instructing data transfer related to calibration from the external device 107 to the device control unit 103 will be described. First, the command control unit 301 controls the transmission data selection unit 333 to operate so as to send data from the calibration pattern region 335 to the transmission data control unit 304 by the selection signal 336. Then, the transmission data control unit 304 reads the calibration pattern from the calibration pattern area 335, serializes it by the transmission data PS conversion unit 310 in the same way as normal data, and transfers it to the device control unit 103.

〔デバイス制御部103におけるキャリブレーション処理〕
デバイス制御部103から外部デバイス107へクロックを供給し、そのクロックに同期して外部デバイス107からデバイス制御部103へデータが転送されるパスは往復のパスとなる。
[Calibration process in device controller 103]
A path in which a clock is supplied from the device control unit 103 to the external device 107 and data is transferred from the external device 107 to the device control unit 103 in synchronization with the clock is a round-trip path.

そのため、クロック周波数が高くなると配線遅延などの影響が大きくなる。例えば、クロック1倍で配線遅延が1/2サイクル相当の遅延で無視できる程度だったとしても、クロックが2倍になれば配線遅延の実質的な時間は変わらないが、1サイクル相当の遅延が生じることになる。そして、外部デバイス107とデバイス制御部103との間を往復するパスにおいては時間制約がより厳しくなる。
このようにクロックの周波数が高くなった場合でも対応できる、デバイス制御部103によるキャリブレーションについて、図4のフローチャートを用いて説明する。
Therefore, when the clock frequency is increased, the influence of wiring delay and the like is increased. For example, even if the wiring delay is negligible with a delay equivalent to 1/2 cycle at a clock of 1, the actual time of the wiring delay does not change if the clock is doubled, but the delay equivalent to 1 cycle is Will occur. In the path that reciprocates between the external device 107 and the device control unit 103, the time constraint becomes more severe.
The calibration by the device control unit 103 that can cope with the case where the clock frequency becomes high will be described with reference to the flowchart of FIG.

図4のキャリブレーションフローは、1サイクル以内の遅延調整を意味するスキュー調整(補正)とサイクル単位の遅延調整を意味するサイクル調整(補正)から構成される。   The calibration flow in FIG. 4 includes skew adjustment (correction) that means delay adjustment within one cycle and cycle adjustment (correction) that means delay adjustment in units of cycles.

ここで、スキュー調整とはホストクロック115と受信データ236の位相のズレ(位相ズレ)を修正するように調整するものである。一方で、サイクル調整とはホストクロック115と受信データ236の周期単位のズレを修正するように調整するものである。以降の説明では周期ズレ(データ取り込みタイミングのズレやデータ取り込み再開タイミングのズレに相当する)を単に遅延サイクル数(又はサイクル遅延量)と呼称する。   Here, the skew adjustment is an adjustment to correct a phase shift between the host clock 115 and the reception data 236 (phase shift). On the other hand, the cycle adjustment is an adjustment that corrects the shift of the host clock 115 and the received data 236 in units of periods. In the following description, a period shift (corresponding to a shift in data capture timing or a shift in data capture restart timing) is simply referred to as a delay cycle number (or cycle delay amount).

まず、図4のステップS1202でデバイス制御部103はCPU101からキャリブレーション開始を指示されると、キャリブレーションパターンを出力させるための送信コマンドを外部デバイス107に送信する。外部デバイス107はデバイス制御部103からのコマンドに応じてキャリブレーションパターン領域335に保持している予め決められたキャリブレーションパターンをデバイス制御部103へ出力する。デバイス制御部103はキャリブレーションパターンを受信し、受信したキャリブレーションパターンはDMAコントローラ102、DRAMコントローラ104を経由して、DRAM106に書き込まれる。   First, in step S1202 of FIG. 4, when the device control unit 103 is instructed to start calibration by the CPU 101, the device control unit 103 transmits a transmission command for outputting a calibration pattern to the external device 107. The external device 107 outputs a predetermined calibration pattern held in the calibration pattern area 335 to the device control unit 103 in accordance with a command from the device control unit 103. The device control unit 103 receives the calibration pattern, and the received calibration pattern is written to the DRAM 106 via the DMA controller 102 and the DRAM controller 104.

一連のキャリブレーションパターンがDRAMに106に書き込まれた後に、CPU101はステップS1023において、予め期待値としてDRAM等に記憶しているキャリブレーションパターン(の一部)と、実際に受信されたキャリブレーションパターン(の一部)とを比較する(S1203)。両者が一致しているとCPU101が判定した場合には、スキュー設定が正しいと考えられるために、スキュー調整シーケンスを完了させる。一方、両者が一致しない場合には、スキュー設定が誤っていると考えられる。そこで、CPU101はステップS1204において、異なるスキュー設定値227をデバイス制御部103に設定し、再度スキュー調整シーケンス(S1202、S1203)を行う。以上の処理をキャリブレーションパターンが期待値と一致するまで繰り返す。   After the series of calibration patterns is written in the DRAM 106, the CPU 101, in step S1023, the calibration pattern (part of) stored in the DRAM or the like as an expected value in advance and the calibration pattern actually received. (Part of) is compared (S1203). If the CPU 101 determines that they match, the skew setting is considered correct, and the skew adjustment sequence is completed. On the other hand, if the two do not match, it is considered that the skew setting is incorrect. In step S1204, the CPU 101 sets a different skew setting value 227 in the device control unit 103, and performs a skew adjustment sequence (S1202 and S1203) again. The above processing is repeated until the calibration pattern matches the expected value.

スキュー調整シーケンスで正しいスキュー設定がなされ、キャリブレーションパターンが期待値と一致すると次はサイクル調整シーケンスに移る。ステップS1205で遅延サイクル数計数回路610から遅延サイクル情報249(cycle_sel)が出力される。(なお、サイクル制御部603では遅延サイクル情報249はそのままセレクタ702にサイクル選択値249として入力されるが同じ信号である。)   If the correct skew setting is made in the skew adjustment sequence and the calibration pattern matches the expected value, the process proceeds to the cycle adjustment sequence. In step S1205, the delay cycle number counting circuit 610 outputs delay cycle information 249 (cycle_sel). (Note that in the cycle control unit 603, the delay cycle information 249 is directly input to the selector 702 as the cycle selection value 249, but is the same signal.)

この遅延サイクル情報249が実際にデバイス制御部103と外部デバイス107間に生じている遅延サイクル数を意味する。S1206でこの遅延サイクル情報249をもとに、出力クロック制御213において出力クロックイネーブル信号243に対して適切な遅延サイクルの設定を行ってキャリブレーションが終了する。   This delay cycle information 249 means the number of delay cycles actually generated between the device control unit 103 and the external device 107. In S1206, based on this delay cycle information 249, the output clock control 213 sets an appropriate delay cycle for the output clock enable signal 243, and the calibration is completed.

〔外部デバイス107におけるキャリブレーション処理〕
外部デバイス107はデバイス制御部103からキャリブレーションを指示するコマンド(キャリブレーションパターンを転送するように指示する命令と同等)を受信すると、受信データ237としてデバイス制御部103へキャリブレーションパターンを送信する。
[Calibration process in external device 107]
When the external device 107 receives a command instructing calibration from the device control unit 103 (equivalent to a command instructing to transfer the calibration pattern), the external device 107 transmits the calibration pattern to the device control unit 103 as reception data 237.

通常、外部デバイス107がFlashメモリのような記憶媒体である場合、Flashメモリ領域334からの読み出しは固定サイクルではなくアクセスタイムは期間(最小許容時間又はサイクル〜最大許容時間又はサイクル)で規定されている。そして、外部デバイス107は規定された期間であれば任意のタイミングでスタートビット(およびエンドビット)付きのデータを出力できる。デバイス制御部103は規定された期間、スタートビットを待ち受けるように制御される。一方で、本実施形態のキャリブレーションパターン領域335は、外部デバイス107がキャリブレーションを指示するデバイス制御部103からのコマンドを受信してから予め決められた固定サイクルでキャリブレーションパターンを出力するようにする。   Normally, when the external device 107 is a storage medium such as a flash memory, reading from the flash memory area 334 is not a fixed cycle, and the access time is defined by a period (minimum allowable time or cycle to maximum allowable time or cycle). Yes. The external device 107 can output data with a start bit (and end bit) at an arbitrary timing within a specified period. The device control unit 103 is controlled to wait for a start bit for a specified period. On the other hand, the calibration pattern area 335 according to the present embodiment outputs a calibration pattern in a predetermined fixed cycle after the external device 107 receives a command from the device control unit 103 instructing calibration. To do.

そのため、仮にキャリブレーションコマンドを受けても外部デバイス107の状態により固定サイクルでキャリブレーションパターンを返答することができない場合のため、エラーレスポンスをコマンド326として返せるように構成しておくとよい。また、固定サイクルでキャリブレーションパターンを返答することができない場合は、キャリブレーションパターンを出力せずにエラー終了するようにしてもよい。   For this reason, even if a calibration command is received, a calibration pattern cannot be returned in a fixed cycle depending on the state of the external device 107, so that an error response may be returned as the command 326. If the calibration pattern cannot be returned in a fixed cycle, the calibration pattern may not be output and the error may be terminated.

また、デバイス制御部103で時間範囲に関する設定をレジスタ(不図示)などに保持してスタートビットを待ち受けてもよいし、外部デバイス107に時間範囲に関する設定を保持するレジスタを配置し、外部デバイス107からデバイス制御部103に通知してもよい。   Alternatively, the device control unit 103 may hold a setting related to the time range in a register (not shown) or the like and wait for a start bit. Alternatively, the external device 107 may be provided with a register holding the setting related to the time range. To the device control unit 103.

〔コマンド・データフォーマット〕
デバイス制御部103と外部デバイス107は、図9に示すフォーマットでシリアル形式のコマンド、又は、シリアル形式のデータを互いにやりとりする。なお、以下の説明ではデバイス制御部103内部又は外部デバイス107内部で用いられるパラレル形式のコマンド、パラレル形式のデータも同様のフォーマットであるとして説明する。
[Command data format]
The device control unit 103 and the external device 107 exchange serial commands or serial data with the format shown in FIG. In the following description, it is assumed that parallel commands and parallel data used in the device control unit 103 or the external device 107 have the same format.

まず、シリアル形式の送信コマンド224とシリアル形式の受信コマンド226の送受信時に扱う信号について、図9に基づいて説明する。送信コマンド224は1ビットのスタートビットとNビットの送信コマンドとMビットのCRC(巡回冗長検査信号)と1ビットのエンドビットを有している。なお、送信コマンド224と受信コマンド226とで、コマンド長やCRCの長さが異なっていてもよい。   First, signals handled during transmission / reception of the serial transmission command 224 and the serial reception command 226 will be described with reference to FIG. The transmission command 224 includes a 1-bit start bit, an N-bit transmission command, an M-bit CRC (cyclic redundancy check signal), and a 1-bit end bit. The transmission command 224 and the reception command 226 may have different command lengths and CRC lengths.

次に、デバイス制御部103および外部デバイス107において図9に示すフォーマットの信号を出力する構成で行う処理について説明する。   Next, processing performed by the device control unit 103 and the external device 107 in a configuration for outputting a signal having the format shown in FIG. 9 will be described.

送信コマンドPS変換部125、326は、パラレル形式の送信コマンドの受信を検知すると、まず、1ビットのスタートビットを出力し、続いてNビットのパラレル形式の送信コマンドをシリアル形式の送信コマンドに変換して出力する。送信コマンドPS変換部125、326は、シリアル形式の送信コマンドの送信と共にCRCの演算を行う。そして、シリアル形式の送信コマンドを出力した後に、演算により取得したMビットのCRCを出力し、最後に1ビットのエンドビットの送信を行い、コマンド送信を完了する。   When the transmission command PS conversion unit 125, 326 detects the reception of the parallel transmission command, it first outputs a 1-bit start bit, and then converts the N-bit parallel transmission command into a serial transmission command. And output. The transmission command PS converters 125 and 326 perform CRC calculation together with transmission of a serial transmission command. Then, after outputting the serial transmission command, the M-bit CRC obtained by the calculation is output, and finally the 1-bit end bit is transmitted to complete the command transmission.

受信コマンドSP変換部126、325は1ビットのスタートビットを検出し、コマンドの受信を開始する。続いて、Nビットのシリアル形式の受信コマンドを受信し、パラレル形式の受信コマンドに変換する。受信コマンドSP変換部126、325はシリアル形式の受信コマンドの受信と共にCRCの演算を行う。そして、シリアル形式の受信コマンドを受信した後に、演算によりしたCRCと送付されたMビットのCRCとの比較(巡回冗長検査)を行い、CRCエラーを検出する。最後に、1ビットのエンドビットの受信を行い、コマンド受信を完了する。   The received command SP converters 126 and 325 detect 1 start bit and start receiving the command. Subsequently, an N-bit serial format reception command is received and converted into a parallel format reception command. The reception command SP conversion units 126 and 325 perform CRC calculation together with reception of a serial reception command. Then, after receiving the reception command in the serial format, a comparison between the calculated CRC and the transmitted M-bit CRC (cyclic redundancy check) is performed to detect a CRC error. Finally, 1 end bit is received and command reception is completed.

送信データPS変換部208、310は、パラレル形式の送信データを受け取ると、シリアル形式の送信データに変換して送信する。受信データのフォーマットは図9に示すとおりである。ただし、受信データの長さやCRCの長さは、送信コマンドと異なっていても構わない。   When receiving transmission data in parallel format, transmission data PS converters 208 and 310 convert the transmission data to transmission data in serial format and transmit it. The format of the received data is as shown in FIG. However, the length of the received data and the length of the CRC may be different from the transmission command.

受信データSP変換部210、308は、1ビットのスタートビットを検出するとデータの受信を開始する。処理そのものは受信コマンドSP変換部126、325と同様でありコマンドの代わりにデータを扱うだけなので詳細は省略する。   The reception data SP converters 210 and 308 start receiving data when detecting one start bit. The processing itself is the same as that of the received command SP conversion units 126 and 325, and only the data is handled instead of the command, so the details are omitted.

〔デバイス制御部103におけるデータ受信処理〕
デバイス制御部103はデータ受信を開始する際に、まず前述したコマンド送受信処理によって、データの出力を指示する送信コマンドを外部デバイス107に送信する。これにより外部デバイス107からデータが送られる。
[Data Reception Processing in Device Control Unit 103]
When starting to receive data, the device control unit 103 first transmits a transmission command for instructing data output to the external device 107 by the above-described command transmission / reception process. As a result, data is sent from the external device 107.

デバイス制御部103による外部デバイス107からのデータの受信は以下のように行う。まず、外部デバイス107から送信されたシリアル形式の受信データ236(d2h_data)をスキュー制御部211が受信する。   Data reception from the external device 107 by the device control unit 103 is performed as follows. First, the skew control unit 211 receives serial format received data 236 (d2h_data) transmitted from the external device 107.

スキュー制御部211は、シリアル形式の受信データ236と、デバイス制御部103のクロック115(host_clk)との間のスキュー調整を行う。スキュー調整後の受信データ235は受信データSP変換部210に入力される。   The skew control unit 211 performs skew adjustment between the serial format received data 236 and the clock 115 (host_clk) of the device control unit 103. The reception data 235 after skew adjustment is input to the reception data SP conversion unit 210.

受信データSP変換部210は、出力クロック制御部213の出力する出力クロックイネーブル信号243を、後述するサイクル制御部603によって遅延させた受信イネーブル信号250を受け取り可能な構成になっている。そして、受信イネーブル信号250がアサートされていれば、受信データSP変換部210は入力されたスキュー調整後の受信データ235を受信し、パラレル形式の受信データ234(r_data_buf)へ変換する。   The reception data SP conversion unit 210 is configured to receive a reception enable signal 250 obtained by delaying the output clock enable signal 243 output from the output clock control unit 213 by a cycle control unit 603 described later. If the reception enable signal 250 is asserted, the reception data SP conversion unit 210 receives the received reception data 235 after skew adjustment and converts it into parallel reception data 234 (r_data_buf).

受信データSP変換部210は、不図示のK段(Kは2のk乗とする)のシフトレジスタ(直列入力並列出力型フリップフロップ)を有しておりシリアル形式で受信するデータをkbitのパラレル形式のデータとして送出する構成になっている。従って、受信データSP変換部210は受信イネーブル信号がアサートされ続けていれば、Kサイクルに1回、パラレル形式のデータを送出する。   The reception data SP conversion unit 210 has a shift register (serial input parallel output type flip-flop) of K stages (K is 2 to the power of k) (not shown) and receives data received in serial form in kbit parallel. It is configured to send as formatted data. Therefore, if the reception enable signal continues to be asserted, the reception data SP conversion unit 210 transmits parallel format data once every K cycles.

保持手段としての受信バッファ209は受信バッファフル信号241によって、自身が現在保持しているデータ以上のデータの保持を許容できないことを通知可能に構成されている。そこで、受信イネーブル信号250がアサートされ且つ受信バッファ209の受信バッファフル信号241(r_buff_full)がデアサートされていれば、受信データSP変換部210は受信バッファ209にパラレル形式の受信データ234を送信する。一方で、受信イネーブル信号250がアサートされていなければ、受信データSP変換部210はスキュー調整後の受信データ235の受信を停止する。   The reception buffer 209 as a holding unit is configured to be able to notify that it is not allowed to hold more data than the data currently held by the reception buffer full signal 241. Therefore, if the reception enable signal 250 is asserted and the reception buffer full signal 241 (r_buff_full) of the reception buffer 209 is deasserted, the reception data SP conversion unit 210 transmits the reception data 234 in parallel format to the reception buffer 209. On the other hand, if reception enable signal 250 is not asserted, reception data SP converter 210 stops receiving reception data 235 after skew adjustment.

受信データSP変換部210は外部デバイス107データの受信を開始すると、受信ステータス信号239(rcv_status)をアサートする。受信データSP変換部210は最終データを外部デバイス107から受信するまで受信ステータス信号239をアサートし続け、スキュー調整後の受信データ235のエンドビットを検出したらデアサートする。受信データSP変換部210が受信バッファ209にパラレル形式の受信データ234を送信すると、受信バッファ209は受信バッファエンプティ−信号233(r_buff_emp)をデアサートする。   The reception data SP conversion unit 210 asserts a reception status signal 239 (rcv_status) when reception of the external device 107 data is started. The reception data SP conversion unit 210 continues to assert the reception status signal 239 until the final data is received from the external device 107, and deasserts it when detecting the end bit of the reception data 235 after skew adjustment. When the reception data SP converter 210 transmits the reception data 234 in parallel format to the reception buffer 209, the reception buffer 209 deasserts the reception buffer empty signal 233 (r_buff_emp).

受信バッファ209は受信データSP変換部210からパラレル形式に変換された受信データ234(r_data_buff)を受信し保持する。ここで、受信バッファ209がフルになった場合、受信バッファ209は出力クロック制御部213及び受信データSP変換部210へ受信バッファフル信号241をアサートする。一方で、受信バッファ209がエンプティ−になった場合には、受信バッファ209はDMA I/F制御部206に受信バッファエンプティ−信号233をアサートする。   The reception buffer 209 receives and holds the reception data 234 (r_data_buff) converted into the parallel format from the reception data SP conversion unit 210. Here, when the reception buffer 209 becomes full, the reception buffer 209 asserts the reception buffer full signal 241 to the output clock control unit 213 and the reception data SP conversion unit 210. On the other hand, when the reception buffer 209 becomes empty, the reception buffer 209 asserts a reception buffer empty signal 233 to the DMA I / F control unit 206.

DMA I/F制御部206は受信バッファ209の受信バッファエンプティ−信号233のデアサートを受けて、受信バッファ209に外部デバイス107からの受信データが残っていることを検出する。そして、受信バッファ209が保持しているパラレル形式の受信データ232(r_data_dma)を受信バッファ209から受信し、DMA I/F111へ送信する。ただし、受信バッファ209がエンプティ−になった場合には、データの受信を停止させる。データの受信を停止させないと、受信バッファ209のバッファアンダーランが発生することがある。従って、受信バッファ209の受信バッファエンプティ−信号233がアサートされている場合には、DMA I/F制御部206はパラレル形式の受信データ232の受信を停止し、DMA I/F111へのデータの送信を停止する。   The DMA I / F control unit 206 receives the deassertion of the reception buffer empty signal 233 of the reception buffer 209 and detects that reception data from the external device 107 remains in the reception buffer 209. Then, the reception data 232 (r_data_dma) in parallel format held in the reception buffer 209 is received from the reception buffer 209 and transmitted to the DMA I / F 111. However, when the reception buffer 209 becomes empty, reception of data is stopped. If data reception is not stopped, a buffer underrun of the reception buffer 209 may occur. Accordingly, when the reception buffer empty signal 233 of the reception buffer 209 is asserted, the DMA I / F control unit 206 stops receiving the parallel format reception data 232 and transmits the data to the DMA I / F 111. To stop.

受信バッファ209の受信バッファエンプティ−信号233がデアサートされたら、DMA I/F制御部206はパラレル形式の受信データ232の受信を再開し、DMA I/F111への受信データの送信を再開する。   When the reception buffer empty signal 233 of the reception buffer 209 is deasserted, the DMA I / F control unit 206 resumes reception of the reception data 232 in the parallel format, and resumes transmission of the reception data to the DMA I / F 111.

一方で、受信バッファ209がフルになる場合には、受信バッファ209のバッファオーバーランが発生するので、データの受信を中断する。受信データSP変換部210がデータ受信中であり、且つ、受信バッファ209がフルの場合、受信データSP変換部210によるデータの受信を中断させるために、出力クロック制御部213は出力クロックイネーブル信号243をデアサート(中断処理)する。   On the other hand, when the reception buffer 209 becomes full, a buffer overrun of the reception buffer 209 occurs, so that data reception is interrupted. When the reception data SP conversion unit 210 is receiving data and the reception buffer 209 is full, the output clock control unit 213 outputs the output clock enable signal 243 to interrupt reception of data by the reception data SP conversion unit 210. Is deasserted (interrupt processing).

受信データSP変換部210が、データ受信中であることは、受信ステータス信号239のアサートによって検出される。受信データSP変換部210は最初の受信データを受信すると受信ステータス信号239をアサートし、最終データを受信するまでアサートし続け、最終データを受信するとデアサートする。そのため、受信データ待ちの状態(スタートビット検出待ちの状態)では、出力クロックイネーブル信号243はデアサートしない。   That the reception data SP conversion unit 210 is receiving data is detected by asserting the reception status signal 239. The reception data SP converter 210 asserts the reception status signal 239 when the first reception data is received, continues to assert until the final data is received, and deasserts when the final data is received. For this reason, the output clock enable signal 243 is not deasserted while waiting for received data (waiting for the start bit detection).

データ受信の中断中に受信バッファ209がフルでなくなった場合、受信データSP変換部210によるデータの受信を再開させるために、出力クロック制御部213は出力クロックイネーブル信号243をアサート(復帰処理)する。なお、サイクル制御部603は、受信データSP変換部210によるデータ受信の中断および復帰をサイクル単位で遅延させる動作を行っている。   When the reception buffer 209 is not full during the interruption of data reception, the output clock control unit 213 asserts (returns) the output clock enable signal 243 in order to resume data reception by the reception data SP conversion unit 210. . Note that the cycle control unit 603 performs an operation of delaying data reception interruption and recovery by the reception data SP conversion unit 210 in units of cycles.

〔外部デバイス107におけるデータ送信処理〕
外部デバイス107は出力クロック245(dev_clk’)の供給が止められると再開されるまで、受信データ237(d2h_data’)の送信を一時的に停止する。詳細には、送信の停止中は送信データPS変換部310とスキュー制御部211との間の信号線は停止開始時点の信号レベルを維持されたままになる。
[Data Transmission Processing in External Device 107]
When the supply of the output clock 245 (dev_clk ′) is stopped, the external device 107 temporarily stops transmission of the reception data 237 (d2h_data ′) until it is restarted. Specifically, when transmission is stopped, the signal line between the transmission data PS conversion unit 310 and the skew control unit 211 remains maintained at the signal level at the start of the stop.

〔スキュー補正に関する構成〕
次に、スキュー補正をするためのデバイス制御部103の構成の詳細を説明する。
[Configuration for skew correction]
Next, a detailed configuration of the device control unit 103 for performing skew correction will be described.

図2(a)はスキュー制御部211のブロック図である。スキュー制御部211にはCLOCKジェネレータ105(図8)からホストクロック115を受け取る。ホストクロック115は入出力が直列に接続されているN1個の遅延素子216(第1遅延手段)によって遅延させられる。各遅延素子216の出力は遅延選択部217に入力され、スキュー選択値238(skew_sel)の値に基づいて出力に用いる遅延素子216が選択される。   FIG. 2A is a block diagram of the skew control unit 211. The skew control unit 211 receives the host clock 115 from the CLOCK generator 105 (FIG. 8). The host clock 115 is delayed by N1 delay elements 216 (first delay means) whose inputs and outputs are connected in series. The output of each delay element 216 is input to the delay selection unit 217, and the delay element 216 used for output is selected based on the value of the skew selection value 238 (skew_sel).

選択された遅延付きクロック信号246(clk_with_skew)はフリップフロップ218へクロックとして入力される。一方、外部デバイス107から送信されるシリアル形式の受信データ236(d2h_data)はフリップフロップ218が受信し、フリップフロップ218によって遅延付きクロック信号246(clk_with_skew)に同期させられる。同期させたシリアル形式の受信データは、スキュー調整後のシリアル形式の受信データ235(d2h_data_1d)として、スキュー制御部211が受信データSP変換部210に出力する。   The selected delayed clock signal 246 (clk_with_skew) is input to the flip-flop 218 as a clock. On the other hand, the serial format received data 236 (d2h_data) transmitted from the external device 107 is received by the flip-flop 218, and is synchronized with the delayed clock signal 246 (clk_with_skew) by the flip-flop 218. The synchronized serial format received data is output to the received data SP conversion unit 210 by the skew control unit 211 as serial format received data 235 (d2h_data_1d) after skew adjustment.

なお、スキュー制御部211のN1個の遅延素子は、好ましくは(ホストクロック115の)1クロックをN1等分した遅延、もしくはそれより少し小さい遅延を生じさせる。   The N1 delay elements of the skew control unit 211 preferably cause a delay obtained by dividing one clock (of the host clock 115) into N1 equal parts or a little smaller than that.

図2(b)はスキュー設定値を0,1,2とした場合に、スキュー制御部211が扱う信号のタイミングチャートを示す。図2(b)の各信号を図1および図2(a)の符号と対応させると、上から順にhost_clk115、dh2_data236、clk_with_skew246(skew_sel238=0,1,2)、d2h_data_1d235(skew_sel238=0,1,2)となる。   FIG. 2B is a timing chart of signals handled by the skew control unit 211 when the skew setting values are 0, 1, and 2. When each signal in FIG. 2B is associated with the codes in FIG. 1 and FIG. 2).

図2(b)のタイミングチャートでは、スキュー選択値238(skew_sel)が0と1の時には、 clk_with_skew246の立ち上がりでd2h_data236が不定である。従って、フリップフロップ218に取り込まれるデータd2h_data_1d235も不定になってしまい、正しいデータの受信が出来てない。一方、スキュー選択値238が2の時には、clk_with_skew246の立ち上がりでd2h_data236が正しいデータを出力している為、フリップフロップ218に取り込まれるデータd2h_data_1d235も正しいデータが取り込まれる。スキュー選択値238の調整は、上述したキャリブレーションのスキュー調整シーケンスによって行われる。   In the timing chart of FIG. 2B, when the skew selection value 238 (skew_sel) is 0 and 1, d2h_data 236 is indefinite at the rise of clk_with_skew 246. Therefore, the data d2h_data_1d235 taken into the flip-flop 218 is also undefined, and correct data cannot be received. On the other hand, when the skew selection value 238 is 2, since d2h_data 236 outputs correct data at the rise of clk_with_skew 246, correct data is also acquired in the data d2h_data_1d235 fetched into the flip-flop 218. The skew selection value 238 is adjusted by the calibration skew adjustment sequence described above.

〔遅延サイクル数計測に関する構成〕
次に、上述したサイクル遅延数を計測するデバイス制御部103の構成について説明する。
[Configuration for delay cycle count measurement]
Next, the configuration of the device control unit 103 that measures the number of cycle delays described above will be described.

図6は遅延サイクル数計数回路610の概略構成を示す。図6に示すように遅延サイクル数計数回路610はカウンタ制御部613とカウンタ614と減算器615とを有する。入力される情報としてシリアル形式の送信コマンド224の送信終了タイミングを示す情報(エンドビット検出信号、s_cmd_ebit611)とシリアル形式の受信データ235の受信開始タイミングを示す情報(スタートビット検出信号、r_data_sbit612)がある。   FIG. 6 shows a schematic configuration of the delay cycle number counting circuit 610. As shown in FIG. 6, the delay cycle number counting circuit 610 includes a counter control unit 613, a counter 614, and a subtracter 615. As input information, there are information (end bit detection signal, s_cmd_ebit 611) indicating the transmission end timing of the serial format transmission command 224 and information (start bit detection signal, r_data_sbit 612) indicating the reception start timing of the serial format reception data 235. .

エンドビット検出信号611は送信コマンドPS変換部125が送信コマンド223のエンドビットを検出した際にアサートする信号である。スタートビット検出信号612は受信データSP変換部210が受信データ235のスタートビットを検出した際にアサートする信号である。   The end bit detection signal 611 is a signal that is asserted when the transmission command PS conversion unit 125 detects the end bit of the transmission command 223. The start bit detection signal 612 is a signal that is asserted when the reception data SP conversion unit 210 detects the start bit of the reception data 235.

これらからカウンタ制御613はカウンタ614に対してカウントアップ信号617(count_up)を出力する。具体的には、カウンタ制御部613は、エンドビット検出信号611がアサートされてからスタートビット検出信号612がアサートされるまで、カウンタ614にカウントアップをさせるように制御する。   Accordingly, the counter control 613 outputs a count-up signal 617 (count_up) to the counter 614. Specifically, the counter control unit 613 controls the counter 614 to count up after the end bit detection signal 611 is asserted until the start bit detection signal 612 is asserted.

つまり、カウンタ614はキャリブレーションを指示するコマンド送信コマンドPS変換部125を通過した時点を起点として、デバイス制御部103から外部デバイス107に伝達され、外部デバイス107が応答してキャリブレーションパターンを返したデータをデバイス制御部103が取り込むまでの計測サイクル数616(acc_count)をカウントする。計測サイクル数616は減算器615で、予め決められたキャリブレーションパターンの受信アクセスサイクル数(図5に示す例では受信アクセスサイクル数は9とする)で減算することによって遅延サイクル数を計算する。   That is, the counter 614 is transmitted from the device control unit 103 to the external device 107 starting from the time when it passes through the command transmission command PS conversion unit 125 that instructs calibration, and the external device 107 responds and returns the calibration pattern. The number of measurement cycles 616 (acc_count) until the device control unit 103 fetches data is counted. The subtracter 615 calculates the number of delay cycles by subtracting the number of measurement cycles 616 by the number of received access cycles of the predetermined calibration pattern (the number of received access cycles is 9 in the example shown in FIG. 5).

詳細には、計測サイクル数616が9であれば9−9でサイクル遅延が発生しておらず、計測サイクル数616が10であれば10−9で1サイクルのサイクル遅延が発生していることを意味する。   Specifically, if the number of measurement cycles 616 is 9, a cycle delay does not occur at 9-9, and if the number of measurement cycles 616 is 10, a cycle delay of 1 cycle occurs at 10-9. Means.

図5では3つの遅延サイクル数が異なる3つのケースについて、遅延サイクル数計測に関する信号(受信データ235、計測サイクル数616、カウントアップ信号617、サイクル選択値249)のタイミングチャートを示している。なお、出力クロック244と送信コマンド224は遅延サイクル数が異なっていても変わらないので其々1つだけ示している。   FIG. 5 shows a timing chart of signals (reception data 235, measurement cycle number 616, count-up signal 617, cycle selection value 249) related to delay cycle number measurement for three cases with three different delay cycle numbers. Note that only one output clock 244 and one transmission command 224 are shown because they do not change even if the number of delay cycles is different.

図5の”delay case 1”では、スキュー調整後の受信データ235と受信データSP変換部210の動作クロック(図1には明確に図示していないがホストクロック115に相当する)との間の遅延がホストクロック115の1サイクル以内で遅延が収まっている(つまり遅延サイクル数が0)。同様に、”delay case 2”は遅延サイクルが1サイクルの場合であり、”delay case 3”は遅延サイクルが2サイクルの場合である。   In “delay case 1” of FIG. 5, the received data 235 after skew adjustment and the operation clock of the received data SP conversion unit 210 (which is not clearly shown in FIG. 1 but corresponds to the host clock 115) The delay is within one cycle of the host clock 115 (that is, the number of delay cycles is 0). Similarly, “delay case 2” is a case where the delay cycle is one cycle, and “delay case 3” is a case where the delay cycle is two cycles.

計測サイクル数616は、キャリブレーションを指示する送信コマンド224のエンドビットを起点として外部デバイス107からのキャリブレーションパターンである受信データ235のスタートビットを受信するまで、カウントアップしている。従って、キャリブレーションパターンのスタートビットを受信した後に、減算器615が出力するサイクル選択値249はサイクル遅延に対応する値となる。なお、このサイクル選択値249はスキュー調整シーケンスを終えた場合にのみ有効な情報として使用される。   The number of measurement cycles 616 is counted up until the start bit of the reception data 235 which is a calibration pattern from the external device 107 is received from the end bit of the transmission command 224 instructing calibration. Therefore, after receiving the start bit of the calibration pattern, the cycle selection value 249 output from the subtractor 615 is a value corresponding to the cycle delay. The cycle selection value 249 is used as valid information only when the skew adjustment sequence is completed.

〔サイクル補正に関する構成〕
次に、上述の構成によって決定されたサイクル選択値249に基づいてサイクル遅延を補正するためのデバイス制御部103の構成の詳細を説明する。
[Configuration for cycle correction]
Next, details of the configuration of the device control unit 103 for correcting the cycle delay based on the cycle selection value 249 determined by the above configuration will be described.

図3(a)はサイクル制御部603の概略構成を示す。サイクル制御部603は入出力が直列に接続されているN2個のフリップフロップ701(第2遅延手段)を有し、フリップフロップ701は出力クロックイネーブル信号243に1クロックの遅延を生じさせるように配置されている。サイクル制御部603のセレクタ702は、入力された出力クロックイネーブル信号243をサイクル選択値249の示すサイクル数だけフリップフロップ701によって遅延させるように構成されている。また、サイクル制御部603により遅延させた出力クロックイネーブル信号243は、受信イネーブル信号250として、受信データSP変換部210に入力される。   FIG. 3A shows a schematic configuration of the cycle control unit 603. The cycle control unit 603 has N2 flip-flops 701 (second delay means) whose inputs and outputs are connected in series, and the flip-flop 701 is arranged so as to cause a delay of one clock in the output clock enable signal 243. Has been. The selector 702 of the cycle control unit 603 is configured to delay the input output clock enable signal 243 by the flip-flop 701 by the number of cycles indicated by the cycle selection value 249. The output clock enable signal 243 delayed by the cycle control unit 603 is input to the reception data SP conversion unit 210 as the reception enable signal 250.

図3(b)はサイクル制御部603が扱う各種信号の波形を示す。図3(b)の各信号を図1の符号と対応させて説明すると、上から順にhost_clk115、dev_clk_en243、rce_en250となる。サイクル制御部603は、入力される出力クロックイネーブル信号243をサイクル選択値249(cycle_sel=0,1,2,3)の値に応じて遅延させ、受信イネーブル信号250として出力する。サイクル選択値249の示す値を2とすると、サイクル制御部603はセレクタ702によって2つのフリップフロップ701を通過した出力を選択することで、出力クロックイネーブル信号243を2サイクル遅延させて、受信イネーブル信号250として出力する。図3の構成ではN2個のフリップフロップ701があるので、1サイクルの整数倍(最大でN2サイクル)だけ出力クロックイネーブル信号243を遅延させることができる。   FIG. 3B shows waveforms of various signals handled by the cycle control unit 603. When the respective signals in FIG. 3B are described in correspondence with the reference numerals in FIG. 1, they are host_clk 115, dev_clk_en 243, and rc_en 250 in order from the top. The cycle control unit 603 delays the input output clock enable signal 243 according to the value of the cycle selection value 249 (cycle_sel = 0, 1, 2, 3), and outputs it as a reception enable signal 250. When the value indicated by the cycle selection value 249 is 2, the cycle control unit 603 uses the selector 702 to select the output that has passed through the two flip-flops 701, thereby delaying the output clock enable signal 243 by two cycles and receiving the reception enable signal. It outputs as 250. Since there are N2 flip-flops 701 in the configuration of FIG. 3, the output clock enable signal 243 can be delayed by an integral multiple of one cycle (up to N2 cycles).

受信データSP変換部210は、受信イネーブル信号250がデアサートされたらデータ取り込みを停止し、受信イネーブル信号250が再びアサートされたらデータ取り込みを再開する。   The reception data SP conversion unit 210 stops data capture when the reception enable signal 250 is deasserted, and resumes data capture when the reception enable signal 250 is reasserted.

出力クロック制御部213では、受信バッファフル信号241と受信ステータス信号239からクロック制御をおこなう。具体的にはデータを受信している最中にバッファフル信号241がアサートされると出力クロック244を止めるために出力クロックイネーブル信号243を制御する。   The output clock control unit 213 performs clock control from the reception buffer full signal 241 and the reception status signal 239. Specifically, when the buffer full signal 241 is asserted while data is being received, the output clock enable signal 243 is controlled to stop the output clock 244.

〔サイクル調整処理〕
図10は、図1の構成で正しいサイクル設定を用いて動作させた場合のデータ受信中にデバイス制御部103と外部デバイス107の扱う信号のタイミングチャートを示す。この図に示す例では遅延サイクルが1サイクルで、正しいサイクル選択値249が設定されている時の波形を示している。なお本実施形態では、受信データ236に発生する遅延が1サイクルである場合、キャリブレーションシーケンスが正常に終了した場合のサイクル選択値249の示す設定は1になる。サイクル選択値249の示す設定が1である為、受信イネーブル信号250は、出力クロックイネーブル信号243に対して、サイクル制御部603によって1サイクルだけ遅延させられる。
[Cycle adjustment processing]
FIG. 10 shows a timing chart of signals handled by the device control unit 103 and the external device 107 during data reception when operating with the correct cycle setting in the configuration of FIG. The example shown in this figure shows a waveform when the delay cycle is one cycle and the correct cycle selection value 249 is set. In the present embodiment, when the delay generated in the reception data 236 is one cycle, the setting indicated by the cycle selection value 249 when the calibration sequence is normally completed is 1. Since the setting indicated by the cycle selection value 249 is 1, the reception enable signal 250 is delayed by one cycle by the cycle control unit 603 with respect to the output clock enable signal 243.

図10の例では、シリアル形式の受信データ236について“D0”の受信を開始した時点で、出力クロックイネーブル信号243をデアサートして、出力クロック244をゲーティングしている。出力クロック244をゲーティングしているが、外部デバイス107からシリアル形式の受信データ237について“D1”と“D2”が送信される。出力クロックイネーブル信号243のデアサート開始から1サイクル後に、受信イネーブル信号250もデアサートされる。受信データSP変換部210は、受信イネーブル信号250のデアサートを受けて、すぐにシリアル形式の受信データの受信を停止する。   In the example of FIG. 10, when reception of “D0” is started for the reception data 236 in the serial format, the output clock enable signal 243 is deasserted and the output clock 244 is gated. Although the output clock 244 is gated, “D 1” and “D 2” are transmitted from the external device 107 for the received data 237 in the serial format. One cycle after the start of deassertion of the output clock enable signal 243, the reception enable signal 250 is also deasserted. The reception data SP conversion unit 210 receives the deassertion of the reception enable signal 250, and immediately stops receiving the serial format reception data.

そのため、スキュー調整後の受信データ235の“D1”を受信したまま、データの受信を停止する。パラレル形式の受信データ234の1ビット目データを見ると“D1”が受信できており、受信データSP変換部210のデータ取り込み停止タイミングを調節できていることが分かる。   Therefore, reception of data is stopped while receiving “D1” of the reception data 235 after skew adjustment. Looking at the first bit data of the reception data 234 in the parallel format, it can be seen that “D1” has been received, and the data acquisition stop timing of the reception data SP converter 210 can be adjusted.

また、出力クロックイネーブル信号243はデアサートされた1サイクル後に再びアサートされ、これを受けて出力クロック244のゲーティングが解除されている。ここで、出力クロック244のゲーティングが解除されていても、前述の受信データ236に1サイクル以上の遅延があるため、外部デバイス107からシリアル形式の受信データ236の“D2”が送信され続ける。   Further, the output clock enable signal 243 is asserted again one cycle after being deasserted, and the gating of the output clock 244 is released in response to the assertion. Here, even if the gating of the output clock 244 is cancelled, since the received data 236 has a delay of one cycle or more, “D2” of the serial format received data 236 is continuously transmitted from the external device 107.

サイクル選択値249の示す遅延量(1サイクル)によって、出力クロックイネーブル信号243のアサートの1サイクル後に、受信イネーブル信号250もアサートされる。受信データSP変換部210は、受信イネーブル信号250のアサートを受けて、すぐにシリアル形式の受信データの受信を再開する。そのため、シリアル形式の受信データ236の“D2”を正しく受信できる。パラレル形式の受信データ234の1ビット目を見ると“D2”が正しく受信出来ており受信データSP変換部210のデータ取り込み再開タイミングを調節できていることが分かる。   The reception enable signal 250 is also asserted one cycle after the assertion of the output clock enable signal 243 by the delay amount (one cycle) indicated by the cycle selection value 249. The reception data SP converter 210 immediately receives the serial reception data in response to the assertion of the reception enable signal 250. Therefore, “D2” of the received data 236 in the serial format can be correctly received. Looking at the first bit of the reception data 234 in the parallel format, it can be seen that “D2” has been correctly received, and that the data acquisition restart timing of the reception data SP converter 210 can be adjusted.

〔サイクル調整をしていない状態で生じるデータの取りこぼしについて〕
サイクル遅延が生じている場合に、サイクル調整をせずデータが取りこぼされてしまっている状態のタイミングチャートを図11に示す。図11のタイミングチャートは、受信データ236が出力クロック244に対して1サイクル遅延している場合に、サイクル調整をせずにデバイス制御部103が外部デバイス107からデータを受信させた状態の各種信号の波形を示している。各信号は図10と同様であるためその説明を省略する。図10と比較すると図11ではrcv_en250を図示していないが、サイクル調整を行わない状態では、rcv_en250はdev_clk_en243とほぼ同一である。
[About data loss that occurs when the cycle is not adjusted]
FIG. 11 shows a timing chart in a state where data is lost without adjusting the cycle when a cycle delay occurs. The timing chart of FIG. 11 shows various signals in a state in which the device control unit 103 receives data from the external device 107 without adjusting the cycle when the reception data 236 is delayed by one cycle with respect to the output clock 244. The waveform is shown. Each signal is the same as in FIG. Compared to FIG. 10, rcv_en 250 is not illustrated in FIG. 11, but rcv_en 250 is substantially the same as dev_clk_en 243 in a state where cycle adjustment is not performed.

遅延されていないdev_clk_enをrcv_en250として使用することで、受信データSP変換部210はシリアル形式の受信データ“D2”を2回受信してしまう。さらに、パラレル形式の受信データ234を見るとD2を2回受信してしまう。   By using dev_clk_en that is not delayed as rcv_en250, the reception data SP conversion unit 210 receives the serial reception data “D2” twice. Further, when the parallel received data 234 is viewed, D2 is received twice.

以上、本実施形態では、データ受信装置とデータ送信装置との間に1サイクル以上の遅延が生じても遅延サイクル数を簡易な構成で取得できる。従って、受信データ236に1サイクル以上の遅延があっても正しく検出又は補正ができる。   As described above, in the present embodiment, the number of delay cycles can be acquired with a simple configuration even when a delay of one cycle or more occurs between the data receiving apparatus and the data transmitting apparatus. Therefore, even if the received data 236 has a delay of one cycle or more, it can be correctly detected or corrected.

また、本実施形態によると、デバイス制御部103と外部デバイス107との間で生ずる遅延の量だけ、受信データSP変換部210のデータ取り込み停止タイミング、データ取り込み再開タイミングを遅延できる。これにより、データの取りこぼしが発生することを抑制する。   Further, according to the present embodiment, the data acquisition stop timing and the data acquisition restart timing of the received data SP conversion unit 210 can be delayed by the amount of delay that occurs between the device control unit 103 and the external device 107. As a result, occurrence of data loss is suppressed.

また、上述の実施形態ではスキュー制御部211とサイクル制御部603を別々に構成しているが、スキュー調整とサイクル調整を単一の構成として組み合わせてもよいし、受信データSP変換部210に組み合わせてもよい。さらに、スキュー調整とサイクル調整では実際にはズレを補正したクロックを入力することで調整しているが、データを供給する系にスキュー調整やサイクル調整用の遅延構成(遅延素子、フリップフロップ)を直接配置し、セレクタ等で遅延量を選択してもよい。   In the above-described embodiment, the skew control unit 211 and the cycle control unit 603 are separately configured. However, the skew adjustment and the cycle adjustment may be combined as a single configuration or combined with the reception data SP conversion unit 210. May be. In addition, skew adjustment and cycle adjustment are actually performed by inputting a clock with corrected deviation, but a delay configuration (delay element, flip-flop) for skew adjustment and cycle adjustment is provided in the data supply system. The delay amount may be selected directly by a selector or the like.

上述の実施形態では詳細は述べていないが、前述の外部デバイス107とデバイス制御部103間の配線遅延について、外部デバイス107が外部デバイス107IF112に着脱できる構成である場合に遅延量のバラツキが大きくなると考えられる。実際には配線の長さや材質、温度上昇以外にも、接触不良など種々の要因による遅延を含むことが考えられる。   Although details are not described in the above-described embodiment, regarding the above-described wiring delay between the external device 107 and the device control unit 103, when the variation in the delay amount increases when the external device 107 can be attached to and detached from the external device 107IF112. Conceivable. Actually, in addition to the length, material, and temperature rise of the wiring, it is considered that a delay due to various factors such as poor contact is included.

また、上述の実施形態では受信データ236のデータ部分(図9のD0、D1…)について比較しているが、算出手段としての受信データSP変換部210の算出したCRC部分(図9のCRC0、CRC1…)を比較に用いるようにしてもよい。その場合は、予め記憶しているキャリブレーションパターンについて、スキュー設定とサイクル設定が正常な場合に受け取るCRCを予め演算して記憶しておく必要がある。   In the above-described embodiment, the data portion (D0, D1,... In FIG. 9) of the reception data 236 is compared. However, the CRC portion (CRC0, FIG. 9) calculated by the reception data SP conversion unit 210 as a calculation unit is compared. CRC1 ...) may be used for comparison. In that case, it is necessary to previously calculate and store the CRC received when the skew setting and the cycle setting are normal for the calibration pattern stored in advance.

なお、図1ではデバイス制御部103と外部デバイス107の間では1bit幅のバスを用いて通信している様に説明しているが、4bit幅のバスや8bit幅のバス等でもよく、本発明はバス幅には限定されず適用できる。しかし、例えば4bit幅(8bit)のバスを用いる場合などは、スキュー制御部211にフリップフロップ218と遅延選択部217を4つ配置し1bit幅ずつスキュー調整をできるようにしておいてもよい。この場合、受信データSP変換部210では4bitを合流させればよく、受信データSP変換部210もしくは受信バッファ209などに4bitのデータの並び順を変えて、外部デバイス107が出力しようとした外部デバイス107データと一致させる構成を設ければよい。   In FIG. 1, the device control unit 103 and the external device 107 are described as communicating using a 1-bit width bus. However, a 4-bit width bus, an 8-bit width bus, or the like may be used. Can be applied without being limited to the bus width. However, for example, when a 4-bit (8-bit) bus is used, four flip-flops 218 and four delay selection units 217 may be arranged in the skew control unit 211 so that skew adjustment can be performed for each 1-bit width. In this case, the reception data SP conversion unit 210 only needs to join 4 bits, and the external device 107 that the external device 107 is to output by changing the order of the 4 bit data to the reception data SP conversion unit 210 or the reception buffer 209 or the like. A configuration for matching with the 107 data may be provided.

また、上述の実施形態ではホストクロック115の動作周波数が単一の例しか説明していないが、外部デバイス107を識別して動作周波数を切り替えるようにしてもよい。例えば、CLOCKジェネレータ105からデバイス制御部103の間に、ホストクロックを分周させる分周回路や逓倍回路等を設けてデバイス制御部103に入力するホストクロックの周波数を替えてもよい。この場合CLOCKジェネレータ105に加えて分周回路や逓倍回路も発振手段の一部とする。   In the above-described embodiment, only an example in which the operating frequency of the host clock 115 is single is described. However, the operating frequency may be switched by identifying the external device 107. For example, a frequency dividing circuit, a multiplying circuit, or the like that divides the host clock may be provided between the CLOCK generator 105 and the device control unit 103 to change the frequency of the host clock input to the device control unit 103. In this case, in addition to the CLOCK generator 105, a frequency division circuit and a frequency multiplication circuit are part of the oscillation means.

この時、前述のキャリブレーションが不調な場合に外部デバイス107に入力されるホストクロック115をより低い周波数に減少させて外部デバイス107との通信を安定させればよい。キャリブレーションが不調な場合とは、例えば前述のキャリブレーションが単位時間辺りに所定回数以上発生してしまう場合やキャリブレーションに要する時間が所定時間以上(例えば、総当りに要する回数以上になる場合)を要してしまう場合などが挙げられる。また、外部デバイス107IF112の物理的なコネクタ形状を規格に定められた特定種類の外部デバイス107と嵌合するように設計する場合、分周回路や逓倍回路で切り替える周波数として特定種の規格で定められている周波数を用いても良い。これにより、同系統の外部デバイス107であってバージョンによって動作周波数が異なる場合において、デバイス制御部103の後方互換性を維持できる。   At this time, when the calibration is not successful, the host clock 115 input to the external device 107 may be decreased to a lower frequency to stabilize the communication with the external device 107. The case where the calibration is unsatisfactory means that, for example, the above-mentioned calibration occurs a predetermined number of times per unit time or the time required for the calibration is a predetermined time or more (for example, the number of times required for the brute force) May be required. Further, when the physical connector shape of the external device 107IF112 is designed to be fitted to a specific type of external device 107 defined in the standard, the frequency to be switched by the frequency divider or the multiplier circuit is determined by the specific type of standard. May be used. Accordingly, backward compatibility of the device control unit 103 can be maintained when the external device 107 is of the same system and the operating frequency differs depending on the version.

一方で、通信速度に重点を置く場合は、キャリブレーションが好調であれば逓倍回路によってホストクロックを増幅させるようにしてもよい。キャリブレーションが好調な場合とは、単位時間辺りに発生するキャリブレーションが所定回数を下回る場合や、キャリブレーションに要する時間が所定回数を下回る場合などである。こうすることで、同系統の外部デバイス107であってバージョンによって動作周波数が異なる場合であっても、デバイス制御部103の前方互換性を維持できる。   On the other hand, when emphasizing the communication speed, the host clock may be amplified by a multiplier circuit if the calibration is good. The case where the calibration is favorable is when the calibration generated per unit time is less than the predetermined number of times, or when the time required for calibration is less than the predetermined number of times. By doing so, the forward compatibility of the device control unit 103 can be maintained even when the external device 107 of the same system has a different operating frequency depending on the version.

また、上述の実施形態における送信バッファ207や受信バッファ209はFIFO構造にしてもよい。その場合、バッファフル信号やバッファエンプティ信号はFIFOの空き容量を示す情報(残量情報)に基づいて作成したり、残量情報をそのまま代用したりしてもよい。この場合、受信バッファ209のFIFOが格納できるデータのサイズがキャリブレーションパターンのデータのサイズ以上である場合は、キャリブレーションパターンを一旦FIFOに書き込んだ後に、CPU101が比較にそのまま用いるようにしてもよい。しかし、受信バッファのFIFOが格納できるデータサイズがキャリブレーションパターンより小さい場合は、キャリブレーションパターンのFIFO容量以下のデータサイズずつ逐次的(所定サイクル毎)に比較することが好ましい。又は、キャリブレーション中に受信バッファ209のFIFOに取り込まずに逐次的に比較する構成に分岐させるようにしてもよい。(比較手段としてCPU101とは別構成を有し、期待値も同じデータサイズずつ読み出すレジスタと構成する、所定サイクル分のデータの比較器を構成すればよい。)また、上述の実施形態ではデバイス制御部103と外部デバイス107間の通信に1bitバスを用いている構成を用いて説明したが、4bitバスや8biバスなどの複数bitバスであっても本発明は適用できる。   Further, the transmission buffer 207 and the reception buffer 209 in the above-described embodiment may have a FIFO structure. In this case, the buffer full signal and the buffer empty signal may be created based on information (remaining amount information) indicating the FIFO free space, or the remaining amount information may be used as it is. In this case, when the size of data that can be stored in the FIFO of the reception buffer 209 is equal to or larger than the size of the data of the calibration pattern, the CPU 101 may write the calibration pattern once in the FIFO and use it as it is for comparison. . However, when the data size that can be stored in the FIFO of the reception buffer is smaller than the calibration pattern, it is preferable to compare sequentially (every predetermined cycle) by the data size equal to or smaller than the FIFO capacity of the calibration pattern. Alternatively, it is possible to branch to a configuration in which comparison is performed sequentially without being taken into the FIFO of the reception buffer 209 during calibration. (As a comparison means, a comparator having a configuration different from the CPU 101 and configured to be a register for reading out expected values of the same data size may be configured.) In the above-described embodiment, device control is performed. The configuration using a 1-bit bus for communication between the unit 103 and the external device 107 has been described. However, the present invention can be applied to a multi-bit bus such as a 4-bit bus or an 8-bi bus.

また、上述の実施形態における出力クロックイネーブル信号243などの制御信号は、イネーブル信号をデアサートするタイミングにディスエーブル信号をアサートするように構成しても構わない。   Further, the control signal such as the output clock enable signal 243 in the above-described embodiment may be configured to assert the disable signal at the timing when the enable signal is deasserted.

上述の実施形態では外部デバイスがフラッシュメモリを例として挙げているが、フラッシュメモリ以外の記憶装置であっても本発明を適用することができる。また、外部デバイス107が記憶装置以外に無線LAN機能やブルートゥース機能を内蔵するような外部デバイスでも本発明を適用することができる。ASIC100がプリンタやデジタルカメラ等の情報処理装置に設けられた場合、外部デバイス107はプリンタやデジタルカメラ等に設けられたスロットに接続して用いられる。この時、スロットに挿して情報処理装置のIO機能を拡張させるような外部デバイス107に対しても本発明を適用することができる。より一般的には、外部デバイスにクロックを供給しクロックに同期してデータを出力させるデバイスに適用することができる。   In the above-described embodiment, the external device is exemplified as the flash memory, but the present invention can be applied to a storage device other than the flash memory. The present invention can also be applied to an external device in which the external device 107 has a wireless LAN function or a Bluetooth function in addition to the storage device. When the ASIC 100 is provided in an information processing apparatus such as a printer or digital camera, the external device 107 is used by being connected to a slot provided in the printer or digital camera. At this time, the present invention can also be applied to the external device 107 that is inserted into the slot and expands the IO function of the information processing apparatus. More generally, the present invention can be applied to a device that supplies a clock to an external device and outputs data in synchronization with the clock.

Claims (15)

データ送信装置と通信可能に接続されるデータ受信装置であって、
前記データ送信装置にクロックを供給する供給手段と、
前記データ送信装置が前記クロックと同期させて出力するデータを受信する受信手段と、
前記データ送信装置にコマンドを送信する送信手段と、
前記コマンドの送信終了タイミングと、前記送信装置からの前記コマンドに対応するデータの受信開始タイミングとの間のサイクル数をカウントする計数手段と、
を有することを特徴とするデータ受信装置。
A data receiving device that is communicably connected to a data transmitting device,
Supply means for supplying a clock to the data transmission device;
Receiving means for receiving data output by the data transmitting device in synchronization with the clock;
Transmitting means for transmitting a command to the data transmitting device;
Counting means for counting the number of cycles between the transmission end timing of the command and the reception start timing of data corresponding to the command from the transmission device;
A data receiving apparatus comprising:
前記供給手段による前記クロックの供給の停止に応じて前記受信手段によるデータの受信を中断させる制御手段を更に有することを特徴とする請求項1に記載のデータ受信装置。   The data receiving apparatus according to claim 1, further comprising a control unit that interrupts reception of data by the receiving unit in response to a stop of the supply of the clock by the supplying unit. 前記制御手段は前記供給手段による前記クロックの供給の再開に応じて前記受信手段によるデータの受信を再開させることを特徴とする請求項2に記載のデータ受信装置。   The data receiving apparatus according to claim 2, wherein the control unit restarts reception of data by the receiving unit in response to restart of supply of the clock by the supplying unit. 前記計数手段により計数されたサイクル数に基づいて、前記制御手段による前記受信手段の制御のタイミングを遅延させる遅延手段を更に有することを特徴とする請求項2又は3に記載のデータ受信装置。   4. The data receiving apparatus according to claim 2, further comprising a delay unit that delays a control timing of the receiving unit by the control unit based on the number of cycles counted by the counting unit. 前記計数手段により計数されたサイクルずれ量を計算する計算手段を更に有し、
前記遅延手段は計算手段で計算されたサイクルずれ量に基づいて前記制御手段による前記受信手段の制御を遅延させることを特徴とする請求項4に記載のデータ受信装置。
A calculation means for calculating the cycle deviation amount counted by the counting means;
5. The data receiving apparatus according to claim 4, wherein the delay unit delays control of the receiving unit by the control unit based on a cycle shift amount calculated by the calculating unit.
前記受信手段の受信するデータの位相ズレを補正するスキュー調整手段を更に有することを特徴とする請求項5に記載のデータ受信装置。   6. The data receiving apparatus according to claim 5, further comprising skew adjusting means for correcting a phase shift of data received by the receiving means. 前記クロックを供給する供給手段を有し、
前記スキュー調整手段は、前記受信手段の受信するデータを前記供給手段から出力されるクロックの1サイクルより小さい量だけ遅延させて位相ズレを補正し、前記遅延手段は、前記制御手段による前記受信手段の制御を前記供給手段から出力されるクロックの1サイクルの整数倍だけ遅延させることで、前記受信手段における周期単位のデータ取り込みタイミングのズレを補正することを有することを特徴とする請求項6に記載のデータ受信装置。
Supply means for supplying the clock;
The skew adjusting means corrects a phase shift by delaying data received by the receiving means by an amount smaller than one cycle of a clock output from the supplying means, and the delay means is the receiving means by the control means. 7. The shift of the data fetching timing in units of periods in the receiving means is corrected by delaying the control of the above by an integral multiple of one cycle of the clock output from the supplying means. The data receiving device described.
データ受信装置と通信可能に接続されるデータ送信装置であって、
所定のデータを保持している記憶手段と、
前記データ受信装置からデータ受信に関するキャリブレーションコマンドを受信した場合、前記記憶手段の保持している所定のデータを、前記データ受信装置から供給されるクロックに同期して所定のサイクル数で前記データ受信装置へ出力する出力手段とを有することを特徴とするデータ送信装置。
A data transmission device connected to be communicable with a data reception device,
Storage means for holding predetermined data;
When a calibration command related to data reception is received from the data receiving device, the predetermined data held in the storage means is received at a predetermined number of cycles in synchronization with a clock supplied from the data receiving device. And a data transmission device comprising: output means for outputting to the device.
前記出力手段によるデータ出力が前記所定のサイクル数でできない場合、前記データ受信装置にエラーを返す通知手段を更に有することを特徴とする請求項8に記載のデータ送信装置。   9. The data transmission apparatus according to claim 8, further comprising notification means for returning an error to the data reception apparatus when data output by the output means cannot be performed in the predetermined number of cycles. 前記出力手段によるデータ出力が前記所定のサイクル数でできない場合は、前記記憶手段からデータを出力しないことを特徴とする請求項8に記載のデータ送信装置。   9. The data transmission apparatus according to claim 8, wherein when the data output by the output means cannot be performed with the predetermined number of cycles, data is not output from the storage means. 前記所定のサイクル数を示す情報を前記データ受信装置へ送信ことを特徴とする請求項8乃至10のいずれか1項に記載のデータ送信装置。   11. The data transmission apparatus according to claim 8, wherein information indicating the predetermined number of cycles is transmitted to the data reception apparatus. データ送信装置と通信可能に接続されるデータ受信装置であって、
前記データ送信装置にクロックを供給する供給手段と、
前記データ送信装置が前記クロックと同期させて出力するデータを受信する受信手段と、
前記データ送信装置と前記データ受信装置との間で生じる遅延に応じて、前記受信手段による前記データの受信の中断および復帰を遅延させる遅延手段とを有することを特徴とするデータ受信装置。
A data receiving device that is communicably connected to a data transmitting device,
Supply means for supplying a clock to the data transmission device;
Receiving means for receiving data output by the data transmitting device in synchronization with the clock;
A data receiving apparatus comprising delay means for delaying interruption and return of reception of the data by the receiving means in accordance with a delay caused between the data transmitting apparatus and the data receiving apparatus.
データ送信装置と通信可能に接続されるデータ受信装置の制御方法であって、
前記データ送信装置にクロックを供給する供給工程と、
前記データ送信装置が前記クロックと同期させて出力するデータを受信する受信工程と、
前記データ送信装置にコマンドを送信する送信工程と、
前記コマンドの送信終了タイミングと、前記送信装置からの前記コマンドに対応するデータの受信開始タイミングとの間のサイクル数をカウントする計数工程と、
を有することを特徴とする制御方法。
A method of controlling a data receiving device connected to be communicable with a data transmitting device,
A supplying step of supplying a clock to the data transmitting device;
A reception step of receiving data output by the data transmission device in synchronization with the clock;
A transmission step of transmitting a command to the data transmission device;
A counting step of counting the number of cycles between the transmission end timing of the command and the reception start timing of data corresponding to the command from the transmission device;
A control method characterized by comprising:
データ受信装置と通信可能に接続されるデータ送信装置の制御方法であって、
前記データ受信装置からデータ受信に関するキャリブレーションコマンドを受信した場合、所定のデータを保持している記憶手段のデータを前記データ受信装置から供給されるクロックに同期して所定のサイクル数で前記データ受信装置へ出力することを特徴とするデータ送信装置。
A method for controlling a data transmission device connected to be communicable with a data reception device, comprising:
When a calibration command related to data reception is received from the data receiving device, the data in the storage means holding the predetermined data is received at a predetermined number of cycles in synchronization with the clock supplied from the data receiving device. A data transmission device characterized by outputting to a device.
データ送信装置と通信可能に接続されるデータ受信装置の制御方法であって、
前記データ送信装置にクロックを供給する供給工程と、
前記データ送信装置が前記クロックと同期させて出力するデータを受信する受信工程と、
前記データ送信装置と前記データ受信装置との間で生じる遅延に応じて、前記受信工程における前記データの受信の中断および復帰を遅延させる遅延工程とを有することを特徴とする制御方法。
A method of controlling a data receiving device connected to be communicable with a data transmitting device,
A supplying step of supplying a clock to the data transmitting device;
A reception step of receiving data output by the data transmission device in synchronization with the clock;
A control method comprising: a delay step of delaying interruption and return of reception of the data in the reception step in accordance with a delay occurring between the data transmission device and the data reception device.
JP2010273907A 2010-12-08 2010-12-08 Data receiver, data transmitter, control method Pending JP2012124716A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010273907A JP2012124716A (en) 2010-12-08 2010-12-08 Data receiver, data transmitter, control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010273907A JP2012124716A (en) 2010-12-08 2010-12-08 Data receiver, data transmitter, control method

Publications (1)

Publication Number Publication Date
JP2012124716A true JP2012124716A (en) 2012-06-28

Family

ID=46505711

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010273907A Pending JP2012124716A (en) 2010-12-08 2010-12-08 Data receiver, data transmitter, control method

Country Status (1)

Country Link
JP (1) JP2012124716A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016019095A (en) * 2014-07-07 2016-02-01 ソニー株式会社 Receiver, transmitter, and communication system
DE102017208116A1 (en) 2016-09-14 2018-03-15 Mitsubishi Electric Corporation Data transmission / reception apparatus and data transmission / reception method
US10135380B2 (en) 2016-04-22 2018-11-20 Mitsubishi Electric Corporation AC rotary machine control apparatus

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016019095A (en) * 2014-07-07 2016-02-01 ソニー株式会社 Receiver, transmitter, and communication system
US10516522B2 (en) 2014-07-07 2019-12-24 Sony Corporation Receiver, transmitter, and communication system
US11296859B2 (en) 2014-07-07 2022-04-05 Sony Group Corporation Receiver, transmitter, and communication system
US10135380B2 (en) 2016-04-22 2018-11-20 Mitsubishi Electric Corporation AC rotary machine control apparatus
DE102017208116A1 (en) 2016-09-14 2018-03-15 Mitsubishi Electric Corporation Data transmission / reception apparatus and data transmission / reception method
US10462268B2 (en) 2016-09-14 2019-10-29 Mitsubishi Electric Corporation Data transmitting/receiving apparatus and data transmitting/receiving method

Similar Documents

Publication Publication Date Title
JP4998699B2 (en) Semiconductor device and communication control method
US8788780B2 (en) Signal restoration circuit, latency adjustment circuit, memory controller, processor, computer, signal restoration method, and latency adjustment method
JP5501378B2 (en) Information processing apparatus or information processing method
TWI781553B (en) Security device and method for data security
WO2014114146A1 (en) Self-correcting system for clock-generating circuit and correcting method thereof
JP2012124716A (en) Data receiver, data transmitter, control method
US11544209B2 (en) Semiconductor storage device, memory system, and method
JP5377275B2 (en) Information processing apparatus or information processing method
KR102530073B1 (en) Baseband Integrated Circuit for communicating with RF Integrated Circuit using digital interface And Apparatus including the same
US10057524B2 (en) Image capturing apparatus
JP5448795B2 (en) Information processing apparatus or information processing method
JP5717897B2 (en) Information processing apparatus or information processing method
US20090232266A1 (en) Signal processing device
US9806735B2 (en) High speed data transfer for analog-to-digital converters
US11018677B1 (en) Transmission enable signal generation circuit and integrated circuit
JP6595868B2 (en) Information processing system, device, and interface control method
JP6188246B2 (en) Memory system
US11960434B2 (en) Communication device, communication system, and communication method for transmitting data blocks including signal groups conforming to a serial peripheral interface
US20030002589A1 (en) Serial communication circuit and serial transmitting and receiving system
US20210297231A1 (en) Data transmission device
JP2010212771A (en) Semiconductor device, method for serializer/deserializer evaluation, and program
KR20060080380A (en) Intellectual property module for system on chip
JP2022134510A (en) Communication device, method for controlling communication device, program, and storage medium
CN112602031A (en) Accurate timing between systems
JP2005094597A (en) Delay control device