JP2009037474A - Data transfer control device and electronic device - Google Patents

Data transfer control device and electronic device Download PDF

Info

Publication number
JP2009037474A
JP2009037474A JP2007202009A JP2007202009A JP2009037474A JP 2009037474 A JP2009037474 A JP 2009037474A JP 2007202009 A JP2007202009 A JP 2007202009A JP 2007202009 A JP2007202009 A JP 2007202009A JP 2009037474 A JP2009037474 A JP 2009037474A
Authority
JP
Japan
Prior art keywords
register
data transfer
task file
transfer control
sata
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
JP2007202009A
Other languages
Japanese (ja)
Inventor
Kuniaki Matsuda
邦昭 松田
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2007202009A priority Critical patent/JP2009037474A/en
Publication of JP2009037474A publication Critical patent/JP2009037474A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately achieve the detection of non-existence of a device after hardware reset, while achieving a bridge function of a parallel ATA (AT attachment) and a serial ATA. <P>SOLUTION: A data transfer control device includes a PATAI/F (parallel AT attachment interface) 10 connected to a PATA bus; an SATAI/F (serial AT attachment interface) 50 connected to an SATA bus; and a sequence controller 30 performing transfer sequence control. The PATAI/F 10 includes a task file register TFR 12. The sequence controller 30 sets the busy bit of a status register in the TFR 12, waits the passage of a device existence detection period TA on the side of the SATA bus, and then, sets a device non-existence code in the status register of the TFR 12 when the non-existence of the SATA device 4 is detected after the period TA elapses. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、データ転送制御装置及び電子機器に関する。   The present invention relates to a data transfer control device and an electronic device.

近年、ストレージデバイス等のシリアルインターフェースとして、シリアルATA(Serial AT Attachment)と呼ばれる規格が脚光を浴びている。このシリアルATAは、パラレルATA(IDE)との間のソフトウェアレベルでの互換性を備えた規格である。そして最初の規格であるシリアルATA Iのデータ転送速度は1.5Gbpsであったが、次の規格であるシリアルATA II Gen2ではデータ転送速度が3.0Gbpsに高速化している。このシリアルATAを用いれば、電子機器が内蔵する回路基板間の配線本数を減らすことができ、電子機器のコンパクト化を図れる。   In recent years, a standard called Serial ATA (Serial AT Attachment) has been spotlighted as a serial interface for storage devices and the like. This serial ATA is a standard having compatibility at the software level with parallel ATA (IDE). The data transfer rate of serial ATA I, which is the first standard, was 1.5 Gbps, but the data transfer rate has been increased to 3.0 Gbps in serial ATA II Gen2, which is the next standard. If this serial ATA is used, the number of wires between circuit boards built in the electronic device can be reduced, and the electronic device can be made compact.

ところが、電子機器のホスト(ホストデバイス、ホスト基板)は、パラレルATA(以下、適宜、PATAと呼ぶ)のインターフェース(以下、適宜、I/Fと呼ぶ)は備えているが、シリアルATA(以下、適宜、SATAと呼ぶ)のI/Fについては備えていないものが多い。このため、PATAI/Fのみを備えた既存のホストに対しては、SATAのデバイスを接続できないという問題がある。従って、PATAとSATAのブリッジ機能を有するデータ転送制御装置の提供が望まれる。   However, the host (host device, host substrate) of the electronic device has a parallel ATA (hereinafter referred to as PATA as appropriate) interface (hereinafter referred to as I / F as appropriate), but a serial ATA (hereinafter referred to as PATA). Many of them do not have an I / F (referred to as SATA as appropriate). For this reason, there is a problem that a SATA device cannot be connected to an existing host having only the PATA I / F. Therefore, it is desired to provide a data transfer control device having a PATA and SATA bridge function.

しかしながら、このようなブリッジ機能を有するデータ転送制御装置では、ハードリセット(ハードウェアリセット)後のデバイス存在検知において、以下のような問題点があることが判明した。   However, it has been found that the data transfer control device having such a bridge function has the following problems in detecting the presence of a device after a hard reset (hardware reset).

即ちPATAのシステムでは、ハードリセット後のデバイスの非存在検知については、PATAのタスクファイル・レジスタのステータスレジスタを用いて直ぐにホストに通知する。   In other words, in the PATA system, the non-existence detection of the device after the hard reset is immediately notified to the host using the status register of the PATA task file register.

一方、SATAでは、ハードリセット後、少なくとも10msのデバイス存在検知期間の間、デバイスの存在検知を行っている。従って、PATAとSATAのブリッジ機能を有するデータ転送制御装置において、PATAシステムのようにハードリセット後に直ちにデバイスの非存在検知をホストに知らせてしまうと、ホスト上で動作するドライバソフトウェアが、その時点でデバイスが存在していないと判断してしまう。従って、それ以降の10ms以内に、ブリッジ機能を有するデータ転送制御装置のSATAバス側において、SATAデバイスの存在が検知されたとしても、ホストのドライバソフトウェアがSATAデバイスの存在を認識できなくなるおそれがある。   On the other hand, in SATA, the presence of a device is detected for at least 10 ms after the hard reset. Therefore, in a data transfer control device having a PATA and SATA bridge function, if a device non-existence detection is notified to the host immediately after a hard reset as in the PATA system, the driver software running on the host It is determined that the device does not exist. Therefore, even if the presence of the SATA device is detected on the SATA bus side of the data transfer control device having the bridge function within 10 ms thereafter, the host driver software may not be able to recognize the presence of the SATA device. .

なお特許文献1、2には、SATAとPATAのブリッジICが開示されている。しかしながらこの特許文献1、2は、ブリッジICを使用した回路基板などに関する発明であり、ブリッジICの具体的な構成に関する発明ではない。   Patent Documents 1 and 2 disclose SATA and PATA bridge ICs. However, Patent Documents 1 and 2 are inventions related to a circuit board using a bridge IC, and are not related to a specific configuration of the bridge IC.

また特許文献3には、SATAブリッジを内蔵するHDDが開示されている。しかしながら、この特許文献3のSATAブリッジは、SATA側にホストが接続されPATA側にデバイスが接続されるブリッジであり、PATA側にホストが接続されSATA側にデバイスが接続されるブリッジに関する発明ではない。また特許文献3は、ファームウェアによるプロトコル制御に特徴がある発明であり、回路構成に特徴がある発明ではない。
特開2005−346123号公報 特開2006−121621号公報 特開2006−18428号公報
Patent Document 3 discloses an HDD incorporating a SATA bridge. However, the SATA bridge of Patent Document 3 is a bridge in which a host is connected to the SATA side and a device is connected to the PATA side, and is not an invention relating to a bridge in which a host is connected to the PATA side and a device is connected to the SATA side. . Patent Document 3 is an invention characterized by protocol control by firmware, and is not an invention characterized by a circuit configuration.
JP-A-2005-346123 JP 2006-121621 A JP 2006-18428 A

本発明は、以上のような課題に鑑みてなされたものであり、本発明に係る幾つかの態様によれば、パラレルATAとシリアルATAのバスブリッジ機能を実現しながらハードリセット後のデバイスの非存在検知についても適正に実現できる。   The present invention has been made in view of the problems as described above. According to some aspects of the present invention, the device after hard reset is implemented while realizing the bus bridge function of parallel ATA and serial ATA. Presence detection can also be realized properly.

本発明は、パラレルATAとシリアルATAのバスブリッジ機能を有するデータ転送制御装置であって、パラレルATAバスに接続され、ホストとの間のインターフェースを行うパラレルATAインターフェースと、シリアルATAバスに接続され、シリアルATAのデバイスとの間のインターフェースを行うシリアルATAインターフェースと、転送シーケンス制御を行うシーケンスコントローラを含み、前記パラレルATAインターフェースは、タスクファイル・レジスタを有し、前記シーケンスコントローラは、ハードリセット後、前記タスクファイル・レジスタのステータスレジスタのビジービットをセットして、前記シリアルATAバス側でのデバイス存在検知期間の経過をウェイトし、前記デバイス存在検知期間が経過した後に、前記シリアルATAの前記デバイスが非存在であることが検知された場合には、前記タスクファイル・レジスタの前記ステータスレジスタにデバイス非存在コードを設定するデータ転送制御装置に関係する。   The present invention is a data transfer control device having a parallel ATA and serial ATA bus bridge function, connected to a parallel ATA bus and connected to a host, and connected to a serial ATA bus. A serial ATA interface for interfacing with a serial ATA device; and a sequence controller for performing transfer sequence control. The parallel ATA interface has a task file register. After the hard reset, the sequence controller Set the busy bit of the status register of the task file register to wait for the elapse of the device presence detection period on the serial ATA bus side, and after the elapse of the device presence detection period Wherein the device serial ATA is when it is detected is absent is related to the data transfer control device for setting a device-presence code to the status register of the task file register.

本発明によれば、ハードリセット後に、タスクファイル・レジスタのステータスレジスタのビジービットがセットされて、ビジー状態であることがホストに知らさせる。そしてデバイス存在検知期間の経過後にシリアルATAのデバイスが非存在であることが検知されると、タスクファイル・レジスタのステータスレジスタにデバイス非存在コードが設定されて、デバイスが非存在であることがホストに知らされる。このようにすれば、パラレルATAとシリアルATAのブリッジ機能をデータ転送制御装置に持たせた場合に、シリアルATAバスでのデバイスの非存在検知についての誤動作の発生を防止できる。   According to the present invention, after a hard reset, the busy bit in the status register of the task file register is set to let the host know that it is busy. When it is detected that the serial ATA device does not exist after the device presence detection period has elapsed, a device non-existence code is set in the status register of the task file register, indicating that the device is non-existent. To be informed. In this way, when the data transfer control device is provided with a parallel ATA / serial ATA bridge function, it is possible to prevent a malfunction from occurring when detecting the absence of a device on the serial ATA bus.

また本発明では、前記シーケンスコントローラは、前記デバイス存在検知期間において、前記シリアルATAインターフェスから出力されるデバイス検知信号をモニタし、前記デバイス存在検知期間内に前記デバイス検知信号がアクティブにならなかった場合に、前記タスクファイル・レジスタの前記ステータスレジスタに前記デバイス非存在コードを設定してもよい。   In the present invention, the sequence controller monitors a device detection signal output from the serial ATA interface during the device presence detection period, and the device detection signal is not activated within the device presence detection period. In this case, the device non-existence code may be set in the status register of the task file register.

このようにすれば、デバイス検知信号を有効活用して、デバイス非存在コードの設定処理を実現できる。   In this way, device non-existence code setting processing can be realized by effectively utilizing the device detection signal.

また本発明では、前記シリアルATAインターフェースは、前記タスクファイル・レジスタとの間でレジスタ値が転送されるシャドウ・タスクファイル・レジスタを含み、前記シーケンスコントローラは、前記タスクファイル・レジスタと前記シャドウ・タスクファイル・レジスタとの間でレジスタ値の転送処理を行ってもよい。   In the present invention, the serial ATA interface includes a shadow task file register in which a register value is transferred to and from the task file register, and the sequence controller includes the task file register and the shadow task. A register value transfer process may be performed between the file register and the file register.

このようにすれば、ホストからデバイスへのコマンド、パラメータ等の転送や、デバイスからホストへのステータス等の転送を、簡素な処理、構成で実現できる。   In this way, the transfer of commands and parameters from the host to the device and the transfer of statuses from the device to the host can be realized with a simple process and configuration.

また本発明では、前記シーケンスコントローラは、前記タスクファイル・レジスタのステータスレジスタに前記デバイス非存在コードが設定された場合には、ホストによりATAコマンドが発行された場合にも、前記タスクファイル・レジスタから前記シャドウ・タスクファイル・レジスタへのレジスタ値の転送処理を非実行にしてもよい。   Also, in the present invention, the sequence controller is configured to read from the task file register even when an ATA command is issued by the host when the device absence code is set in the status register of the task file register. Transfer processing of the register value to the shadow task file register may not be executed.

このようにすれば、タスクファイル・レジスタにデバイス非存在コードが設定された後に予期せぬ誤動作が発生する事態を防止できる。   In this way, an unexpected malfunction can be prevented after the device non-existence code is set in the task file register.

また本発明では、初期化シーケンス管理機能を有しない前記シリアルATAの前記デバイスに代わって初期化シーケンス管理を代行する初期化シーケンス管理部を含み、前記初期化シーケンス管理部は、前記デバイス存在検知期間内に前記デバイスの存在が検知された場合に、初期化シーケンス処理を実行してもよい。   The present invention further includes an initialization sequence management unit that performs initialization sequence management on behalf of the device of the serial ATA that does not have an initialization sequence management function, and the initialization sequence management unit includes the device presence detection period. An initialization sequence process may be executed when the presence of the device is detected.

このようにすれば、シリアルATAデバイスが初期化シーケンス管理機能を有しない場合にも、この初期化シーケンス管理を代行して、スレーブ検知等の初期化シーケンス処理を実行できるようになる。   In this way, even when the serial ATA device does not have an initialization sequence management function, initialization sequence processing such as slave detection can be executed in place of this initialization sequence management.

また本発明では、前記初期化シーケンス管理部は、マスタ・スレーブ設定端子によりデータ転送制御装置がマスタ側に設定された場合には、ハードリセット後にスレーブ検知処理と自己診断処理を行い、前記マスタ・スレーブ設定端子によりデータ転送制御装置がスレーブ側に設定された場合には、ハードリセット後にスレーブ検知信号、自己診断信号の制御を行ってもよい。   According to the present invention, the initialization sequence management unit performs a slave detection process and a self-diagnosis process after a hard reset when the data transfer control device is set to the master side by a master / slave setting terminal. When the data transfer control device is set to the slave side by the slave setting terminal, the slave detection signal and the self-diagnosis signal may be controlled after the hard reset.

このようにシリアルATAのデバイスに代わって初期化シーケンス処理を代行すれば、マスタ、スレーブの区別の概念の無いシリアルATAのデバイスを、マスタ、スレーブの区別が可能なパラレルATAのデバイスのように扱うことが可能になると共に、パラレルATAに準拠した適正な初期化シーケンス処理を実現できる。   If the initialization sequence process is performed instead of the serial ATA device in this way, the serial ATA device without the concept of master / slave distinction is treated as a parallel ATA device that can distinguish master / slave. In addition, it is possible to realize proper initialization sequence processing conforming to parallel ATA.

また本発明では、前記シリアルATAインターフェースは、前記タスクファイル・レジスタとの間でレジスタ値が転送されるシャドウ・タスクファイル・レジスタを含み、前記シーケンスコントローラは、データ転送制御装置がマスタ側に設定されているときに、前記ホストがマスタへのATAコマンドを発行した場合には、前記タスクファイル・レジスタのレジスタ値をそのまま前記シャドウ・タスクファイル・レジスタに転送し、データ転送制御装置がスレーブ側に設定されているときに、前記ホストがスレーブへのATAコマンドを発行した場合には、前記タスクファイル・レジスタのデバイス/ヘッドレジスタのDEVビットをマスタ設定に書き換えて前記タスクファイル・レジスタのレジスタ値を前記シャドウ・タスクファイル・レジスタに転送してもよい。   In the present invention, the serial ATA interface includes a shadow task file register in which a register value is transferred to and from the task file register, and the sequence controller has a data transfer control device set on the master side. When the host issues an ATA command to the master, the task file register value is transferred to the shadow task file register as it is, and the data transfer control device is set to the slave side. When the host issues an ATA command to the slave, the DEV bit of the device / head register of the task file register is rewritten to the master setting and the register value of the task file register is changed to the value of the task file register. Shadow task file It may be transferred to the register.

このようにすれば、マスタ・スレーブ設定端子の状態に応じた適正な値に、デバイス/ヘッドレジスタのDEVビットが書き換えられるため、データ転送制御装置が例えばスレーブ側に設定された場合にも、ホストから、自身をマスタと認識しているシリアルATAデバイスに対して、コマンド、パラメータ等の適正な転送処理を実現できる。   In this way, since the DEV bit of the device / head register is rewritten to an appropriate value according to the state of the master / slave setting terminal, even when the data transfer control device is set to the slave side, for example, Therefore, it is possible to realize appropriate transfer processing of commands, parameters, etc., to the serial ATA device that recognizes itself as a master.

また本発明では、前記シーケンスコントローラは、データ転送制御装置がマスタ側に設定されているときに、前記ホストからのATAコマンドに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合には、前記シャドウ・タスクファイル・レジスタのレジスタ値を前記タスクファイル・レジスタにそのままに転送し、データ転送制御装置がスレーブ側に設定されているときに、前記ホストからのATAコマンドに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合には、前記シャドウ・タスクファイル・レジスタのデバイス/ヘッドレジスタのDEVビットをスレーブ設定に書き換えて前記シャドウ・タスクファイル・レジスタのレジスタ値を前記タスクファイル・レジスタに転送してもよい。   Also, in the present invention, when the serial ATA interface receives an FIS corresponding to an ATA command from the host when the data transfer control device is set on the master side, the sequence ATA interface receives the FIS from the device. The register value of the shadow task file register is transferred to the task file register as it is, and when the data transfer control device is set to the slave side, the FIS corresponding to the ATA command from the host is transferred to the serial number. When the ATA interface receives from the device, the DEV bit of the device / head register of the shadow task file register is rewritten to the slave setting, and the register value of the shadow task file register is changed to the task file record. It may be transferred to the register.

このようにすれば、マスタ・スレーブ設定端子の状態に応じた適正な値に、デバイス/ヘッドレジスタのDEVビットが書き換えられるため、データ転送制御装置が例えばスレーブ側に設定された場合にも、自身をマスタと認識しているシリアルATAデバイスから、ホストに対して、ステータス等の適正な転送処理を実現できる。   In this way, since the DEV bit of the device / head register is rewritten to an appropriate value according to the state of the master / slave setting terminal, even when the data transfer control device is set to the slave side, for example. From the serial ATA device that recognizes the device as a master, it is possible to implement appropriate transfer processing such as status to the host.

また本発明は、上記のいずれかに記載のデータ転送制御装置と、前記データ転送制御装置に接続される前記ホストと、前記データ転送制御装置に接続される前記デバイスとを含む電子機器に関係する。   According to another aspect of the invention, there is provided an electronic apparatus including the data transfer control device according to any one of the above, the host connected to the data transfer control device, and the device connected to the data transfer control device. .

以下、本発明の好適な実施の形態について詳細に説明する。なお以下に説明する本実施形態は特許請求の範囲に記載された本発明の内容を不当に限定するものではなく、本実施形態で説明される構成の全てが本発明の解決手段として必須であるとは限らない。   Hereinafter, preferred embodiments of the present invention will be described in detail. The present embodiment described below does not unduly limit the contents of the present invention described in the claims, and all the configurations described in the present embodiment are indispensable as means for solving the present invention. Not necessarily.

1.データ転送制御装置の構成
図1に本実施形態のデータ転送制御装置の構成例を示す。このデータ転送制御装置はPATA(Parallel AT Attachment)とSATA(Serial AT Attachment)のバスブリッジ機能を有する。
1. Configuration of Data Transfer Control Device FIG. 1 shows a configuration example of a data transfer control device according to this embodiment. This data transfer control device has a PATA (Parallel AT Attachment) and SATA (Serial AT Attachment) bus bridge function.

なお本実施形態のデータ転送制御装置は図1の構成に限定されず、その構成要素の一部(例えばデータバッファ)を省略したり、他の構成要素(例えば外部I/F回路、CPU、タイマ)を追加するなどの種々の変形実施が可能である。例えば本実施形態のデータ転送制御装置は、PATAとSATAのバスブリッジ機能以外にも、PATAとUSB、PATAとSD(Secure Digital)カードインターフェス、PATAとCE−ATAのバスブリッジ機能を実現できるようにしてもよい。   The data transfer control device according to the present embodiment is not limited to the configuration shown in FIG. 1, and some of the components (for example, a data buffer) may be omitted or other components (for example, an external I / F circuit, CPU, timer) Various modifications such as addition of) are possible. For example, in addition to the PATA and SATA bus bridge functions, the data transfer control device of the present embodiment can realize a PATA and USB, PATA and SD (Secure Digital) card interface, and a PATA and CE-ATA bus bridge function. It may be.

PATAI/F10(パラレルATAインターフェース)は、PATAバス(ATAバス、IDEバス)に接続され、ホスト2(ホストデバイス)との間のインターフェースを行う。具体的にはPATAI/F10は、ホスト2が有するホスト側のPATAI/FにPATAバスを介して接続される。そしてATAで規格化された後述する各種信号によりやり取りを行い、PATA(IDE)のデータ転送を実現する。またPATAI/F10は、データバッファ70を介したSATAI/F50との間のデータ転送制御も行う。このPATAI/F10は、PATAとSATAのブリッジ用に擬似的(仮想的)に設けられたタスクファイル・レジスタ12(以下、適宜、TFRと呼ぶ)を含むことができる。   The PATA I / F 10 (parallel ATA interface) is connected to the PATA bus (ATA bus, IDE bus) and performs an interface with the host 2 (host device). Specifically, the PATA I / F 10 is connected to the host side PATA I / F of the host 2 via the PATA bus. Then, exchange is performed by various signals, which will be described later, standardized by ATA, thereby realizing PATA (IDE) data transfer. The PATA I / F 10 also performs data transfer control with the SATA I / F 50 via the data buffer 70. The PATA I / F 10 can include a task file register 12 (hereinafter referred to as TFR as appropriate) provided in a pseudo (virtual) manner for bridging between PATA and SATA.

なおホスト2としては、例えばCPU、MPU、DSPなどのプロセッサや、専用制御ICや、これらのプロセッサ又は専用制御ICが実装されたホスト回路基板などが考えられる。またデバイス4としては、ハードディスクドライブ(HDD)、光ディスクドライブ(CD、DVD)、磁気ディスクドライブなどのSATAI/Fを備える各種デバイスが考えられる。   As the host 2, for example, a processor such as a CPU, MPU, or DSP, a dedicated control IC, or a host circuit board on which these processors or dedicated control ICs are mounted can be considered. As the device 4, various devices including a SATA I / F such as a hard disk drive (HDD), an optical disk drive (CD, DVD), and a magnetic disk drive are conceivable.

SATAI/F50(シリアルATAインターフェース)は、SATAバス(高速シリアルバス)に接続され、SATAのデバイス4との間のインターフェースを行う。具体的にはSATAI/F50は、デバイス4が有するデバイス側のSATAI/Fに接続され、小振幅の差動信号によりやり取りを行い、SATAのデータ転送を実現する。またSATAI/F50は、データバッファ70を介したPATAI/F10との間のデータ転送制御も行う。このSATAI/F50は、SATA規格のシャドウ・タスクファイル・レジスタ52(以下、適宜SFRと呼ぶ)を含むことができる。   The SATA I / F 50 (serial ATA interface) is connected to a SATA bus (high-speed serial bus) and interfaces with the SATA device 4. Specifically, the SATA I / F 50 is connected to the device-side SATA I / F of the device 4 and exchanges with a differential signal having a small amplitude to realize SATA data transfer. The SATA I / F 50 also performs data transfer control with the PATA I / F 10 via the data buffer 70. The SATA I / F 50 can include a SATA standard shadow task file register 52 (hereinafter referred to as SFR as appropriate).

シーケンスコントローラ30は転送のシーケンス制御を行う。具体的には、PATAとSATAのブリッジ機能を実現するために、PATAI/F10、SATAI/F50、データバッファ70の間のデータ転送のシーケンス制御を行ったり、レジスタ値の転送シーケンス制御を行う。   The sequence controller 30 performs transfer sequence control. Specifically, in order to realize a bridge function between PATA and SATA, sequence control of data transfer between the PATA I / F 10, the SATA I / F 50, and the data buffer 70 is performed, and transfer sequence control of register values is performed.

データバッファ70は、ホスト2(PATAI/F)、デバイス4(SATAI/F)の間で転送されるデータのバッファリングを行う。そしてPATA側とSATA側のクロック周波数の差を吸収するための緩衝用のバッファ(FIFO)として機能する。即ちPATA側のクロック周波数が例えば50MHz(或いは60MHz)で、SATA側のクロック周波数が例えば37.5MHzである場合に、データバッファ70を設けることでこのクロック周波数の差を吸収できる。このデータバッファ70は、例えば50MHz(第1の周波数)でデータが入出力されるPATAI/F10側の第1のポートと、例えば37.5MHz(第2の周波数)でデータが入出力されるSATAI/F50側の第2のポートとを有するデュアルポートのメモリ(RAM)などにより実現できる。   The data buffer 70 buffers data transferred between the host 2 (PATA I / F) and the device 4 (SATA I / F). And it functions as a buffer (FIFO) for buffering to absorb the difference in clock frequency between the PATA side and the SATA side. That is, when the clock frequency on the PATA side is, for example, 50 MHz (or 60 MHz) and the clock frequency on the SATA side is, for example, 37.5 MHz, this clock frequency difference can be absorbed by providing the data buffer 70. The data buffer 70 includes a first port on the PATA I / F 10 side where data is input / output at, for example, 50 MHz (first frequency), and a SATAI where data is input / output at, for example, 37.5 MHz (second frequency). This can be realized by a dual port memory (RAM) having a second port on the / F50 side.

図1の構成によれば、ホスト2がPATAI/Fしか備えていない場合にも、SATAI/Fを有するデバイス4をデータ転送制御装置を介してホスト2に接続できる。従って、ホスト2のファームウェア、ソフトウェアとして、既存のPATA(IDE)用のファームウェア、ソフトウェアを使用できる。これにより電子機器の開発期間の短縮化や低コスト化を図れる。またデバイス4として、市場供給量が多い大容量のHDDをホスト2に接続できるようになり、電子機器の内蔵HDDの大容量化を図れる。   According to the configuration of FIG. 1, even when the host 2 includes only the PATA I / F, the device 4 having the SATA I / F can be connected to the host 2 via the data transfer control device. Therefore, existing firmware and software for PATA (IDE) can be used as the firmware and software of the host 2. As a result, the development period of electronic devices can be shortened and costs can be reduced. Further, as the device 4, a large-capacity HDD having a large market supply amount can be connected to the host 2, and the capacity of the built-in HDD of the electronic device can be increased.

またホスト2が搭載される回路基板とデバイス4が搭載される回路基板の間を、シリアルバスであるSATAバスで接続できるため、回路基板間の配線本数を減らすことができ、電子機器のコンパクト化を図れる。   In addition, since the circuit board on which the host 2 is mounted and the circuit board on which the device 4 is mounted can be connected by a SATA bus that is a serial bus, the number of wirings between the circuit boards can be reduced and the electronic equipment can be made compact. Can be planned.

そして実施形態では図1に示すように、ハードリセット(ハードウェアリセット)後、シーケンスコントローラ30は、タスクファイル・レジスタTFR12のステータスレジスタのビジービットをセットして、ビジー状態であることをホスト2に知らせ、SATAバス側でのデバイス存在検知期間TA(例えば10ms)の経過をウェイトする。そしてデバイス存在検知期間TAが経過した後に、SATAのデバイス4が非存在であることが検知された場合には、TFR12のステータスレジスタにデバイス非存在コードである7Fhを設定する。   In the embodiment, as shown in FIG. 1, after the hard reset (hardware reset), the sequence controller 30 sets the busy bit of the status register of the task file register TFR 12 to indicate to the host 2 that it is busy. Notification, and wait for the elapse of the device presence detection period TA (for example, 10 ms) on the SATA bus side. If it is detected that the SATA device 4 does not exist after the device presence detection period TA has elapsed, 7Fh, which is a device non-existence code, is set in the status register of the TFR 12.

例えばPATA(IDE)のシステムにおいては、ハードリセット後のデバイスの非存在検知については、直ちにホスト側に知らせていた。   For example, in the PATA (IDE) system, the absence of a device after a hard reset is immediately notified to the host side.

一方、SATA規格においては、ハードリセット後、デバイス存在検知期間TAである10msの間、SATAのデバイスの存在検知を行うことが規定されている。従って、PATAシステムの場合と同様にハードリセット後に直ちにデバイスの非存在検知をホスト側に通知してしまうと、ホスト上で動作するドライバソフトウェアが、その時点でデバイスが存在していないと判断してしまう。従って、それ以降の10ms以内において、SATAバス側においてSATAのデバイスの存在が検知されたとしても、ドライバソフトウェアがSATAのデバイスの存在を認識できなくなってしまうおそれがある。   On the other hand, the SATA standard stipulates that the presence detection of a SATA device is performed for 10 ms which is a device presence detection period TA after a hard reset. Therefore, as in the case of the PATA system, if the absence of a device is notified to the host immediately after a hard reset, the driver software operating on the host determines that the device does not exist at that time. End up. Accordingly, even if the presence of the SATA device is detected on the SATA bus side within 10 ms thereafter, the driver software may not be able to recognize the presence of the SATA device.

この点、本実施形態では、ハードリセット後、直ぐにはTFR12のステータスレジスタにデバイス非存在コード7Fhを設定せずに、BUSYビットを1にセットして、ビジー状態であることをホスト2に知らせる。そしてデバイス存在検知期間TAである10ms以上が経過してもSATAのデバイス4が存在しない場合に、初めて、TFR12のステータスレジスタにデバイス非存在検知7Fhを設定して、デバイス4が存在しないことをホスト2に対して通知する。このようにすることで、PATAとSATAのブリッジ機能をデータ転送制御装置に持たせた場合に、デバイスの非存在検知についての誤動作が発生するのを防止できる。   In this regard, in the present embodiment, immediately after a hard reset, the BUSY bit is set to 1 without setting the device nonexistence code 7Fh in the status register of the TFR 12 to inform the host 2 that it is busy. When the SATA device 4 does not exist even after the device presence detection period TA of 10 ms or more elapses, the device non-existence detection 7Fh is set in the status register of the TFR 12 for the first time to indicate that the device 4 does not exist. 2 is notified. In this way, when the data transfer control device is provided with the PATA and SATA bridging functions, it is possible to prevent a malfunction in detecting the absence of a device.

また本実施形態では、シーケンスコントローラ30が、初期化シーケンス管理機能を有しないSATAのデバイス4に代わって初期化シーケンス管理を代行する初期化シーケンス管理部34を含む。そして初期化シーケンス管理部34は、デバイス存在検知期間TA内にデバイス4の存在が検知された場合に、初期化シーケンス処理を実行する。   In this embodiment, the sequence controller 30 includes an initialization sequence management unit 34 that performs initialization sequence management in place of the SATA device 4 that does not have the initialization sequence management function. The initialization sequence management unit 34 executes initialization sequence processing when the presence of the device 4 is detected within the device presence detection period TA.

例えばSATAのデバイス4にはマスタ、スレーブの区別の概念が無いため、SATAのデバイス4はスレーブ検知等の初期化シーケンス管理機能を有しない。従って、PATAとSATAのブリッジ機能を有するデータ転送制御装置のSATAバスにSATAのデバイス4を接続する場合に、初期化シーケンス管理を行う処理主体が無くなってしまう。   For example, since the SATA device 4 does not have a concept of distinguishing between master and slave, the SATA device 4 does not have an initialization sequence management function such as slave detection. Therefore, when the SATA device 4 is connected to the SATA bus of the data transfer control device having a PATA-SATA bridge function, there is no processing entity that performs initialization sequence management.

この点、図1では初期化シーケンス管理部34が、初期化シーケンス管理機能を有しないSATAのデバイス4に代わって初期化シーケンス管理を代行し、デバイス存在検知期間TA内にデバイス4の存在が検知された場合に、初期化シーケンス処理を実行する。従って、ホスト2上で動作するドライバソフトウェアは、マスタ、スレーブの区別の概念の無いSATAのデバイス4を、マスタ、スレーブの区別が可能なPATAのデバイスのように扱うことが可能になり、利便性を向上できる。   In this regard, in FIG. 1, the initialization sequence management unit 34 performs initialization sequence management on behalf of the SATA device 4 having no initialization sequence management function, and detects the presence of the device 4 within the device presence detection period TA. If so, initialization sequence processing is executed. Accordingly, the driver software operating on the host 2 can handle the SATA device 4 without the concept of master / slave distinction as if it were a PATA device capable of distinguishing between master and slave. Can be improved.

2.詳細な構成例
図2にデータ転送制御装置の詳細な構成例を示す。PATAI/F10はタスクファイル・レジスタTFR12、転送コントローラ14を含む。ここでTFR12は、PATAとSATAのバスブリッジ用に擬似的に設けられたレジスタである。このTFR12を設けることで、ホスト2は、SATAのデバイス4を、あたかもPATAのデバイスのように扱ってデータのリードやライトを行うことが可能になる。即ちホスト2は、既存のPATA用のファームウェアやソフトウェアを使用して、SATAのデバイス4を制御できるようになる。
2. Detailed Configuration Example FIG. 2 shows a detailed configuration example of the data transfer control device. The PATA I / F 10 includes a task file register TFR 12 and a transfer controller 14. Here, the TFR 12 is a register provided in a pseudo manner for a PATA and SATA bus bridge. By providing the TFR 12, the host 2 can read and write data by treating the SATA device 4 as if it were a PATA device. That is, the host 2 can control the SATA device 4 using existing PATA firmware and software.

転送コントローラ14は、PATA用の信号XCS〜XPDIAGを用いてPATA(IDE)のインターフェースを実現したり、データ転送用の制御信号を用いて、データバッファ70との間のデータ転送を制御する。   The transfer controller 14 implements a PATA (IDE) interface using the PATA signals XCS to XPDIAG, and controls data transfer with the data buffer 70 using a data transfer control signal.

データバッファ70は、メモリコントローラ72、FIFOメモリ(FIFORAM)74を含む。メモリコントローラ72は、FIFOメモリ74のデータの書き込み制御や読み出し制御を行う。またPATAI/F10やSATAI/F50との間で、例えばREQ信号やACK信号などの制御信号を用いたデータ転送制御を行う。   The data buffer 70 includes a memory controller 72 and a FIFO memory (FIFORAM) 74. The memory controller 72 performs data write control and data read control of the FIFO memory 74. Further, data transfer control is performed between the PATA I / F 10 and the SATA I / F 50 using a control signal such as a REQ signal or an ACK signal.

SATAI/F50は、シャドウ・タスクファイル・レジスタSFR52、トランスポートコントローラ110、リンクコントローラ150、物理層回路200を含む。   The SATA I / F 50 includes a shadow task file register SFR 52, a transport controller 110, a link controller 150, and a physical layer circuit 200.

トランスポートコントローラ110、リンクコントローラ150、物理層回路200は、各々、SATA規格のトランスポート層、リンク層、物理層の処理を行う回路である。   The transport controller 110, the link controller 150, and the physical layer circuit 200 are circuits that perform processing of the SATA standard transport layer, link layer, and physical layer, respectively.

シャドウ・タスクファイル・レジスタSFR52はSATAで規格化されているレジスタである。即ちSATAでは、従来のPATA(IDE)との間でソフトウェアレベルでの互換性が維持されており、タスクファイル・レジスタが2つ存在することが特徴になっている。即ちホスト(HBA)側のシャドウ・タスクファイル・レジスタとデバイス側の本来のタスクファイル・レジスタである。   The shadow task file register SFR52 is a register standardized by SATA. That is, SATA is characterized in that compatibility at the software level is maintained with conventional PATA (IDE), and there are two task file registers. That is, the shadow task file register on the host (HBA) side and the original task file register on the device side.

一方、PATAI/F10に設けられたTFR12はSATAで規格化されるレジスタではなく、PATAとSATAのブリッジ用に設けられた擬似的なレジスタである。ホスト2は、TFR12をPATAのタスクファイル・レジスタとして認識してアクセスし、レジスタ値を書き込んだり、レジスタ値を読み出す。すると本実施形態のデータ転送制御装置が、TFR12のレジスタ値をSFR52に転送したり、SFR52のレジスタ値をTFR12に転送するなどの処理を行う。   On the other hand, the TFR 12 provided in the PATA I / F 10 is not a register standardized by SATA, but a pseudo register provided for bridging the PATA and SATA. The host 2 recognizes and accesses the TFR 12 as a PATA task file register, writes the register value, and reads the register value. Then, the data transfer control device of this embodiment performs processing such as transferring the register value of the TFR 12 to the SFR 52 or transferring the register value of the SFR 52 to the TFR 12.

このようにすれば、ホスト2が、PATAのTFR12にレジスタ値を書き込むと、そのレジスタ値がSATAのSFR52に転送されて書き込まれ、SATAバスを介してFIS(Frame Information Structure)によりデバイス4に転送されるようになる。またデバイス4からのFISによりSFR52に書き込まれたレジスタ値が、TFR12に転送されてホスト2に読み出されるようになる。従ってホスト2は、SATAのデバイス4を、あたかもPATAのデバイスのように扱ってデータのリードやライトを行うことが可能になり、PATAとSATAのブリッジ機能を効率良く実現できる。   In this way, when the host 2 writes a register value to the PATA TFR 12, the register value is transferred to the SATA SFR 52 and written to the device 4 via the SATA bus to FIS (Frame Information Structure). Will come to be. Further, the register value written in the SFR 52 by the FIS from the device 4 is transferred to the TFR 12 and read out to the host 2. Therefore, the host 2 can read and write data by treating the SATA device 4 as if it were a PATA device, and can efficiently implement a PATA-SATA bridge function.

なおTFR12とSFR52の間のレジスタ値の転送は次のような手法により実現できる。即ちTFR12のレジスタ群のビット(全ビット)とSFR52のレジスタ群のビット(全ビット)を、シーケンスコントローラ30を介して信号線により接続しておく。そしてレジスタ値の転送を行う場合には、シーケンスコントローラ30が転送トリガ信号を生成し、この転送トリガ信号に基づいて、TFR12のレジスタ値をSFR52に転送したり、SFR52のレジスタ値をTFR12に転送すればよい。   Note that transfer of register values between the TFR 12 and the SFR 52 can be realized by the following method. That is, the bits (all bits) of the register group of TFR 12 and the bits (all bits) of the register group of SFR 52 are connected via the signal line via the sequence controller 30. When transferring the register value, the sequence controller 30 generates a transfer trigger signal, and based on this transfer trigger signal, the register value of the TFR 12 is transferred to the SFR 52 or the register value of the SFR 52 is transferred to the TFR 12. That's fine.

3.PATAI/F
次に、PATAI/F10のデータ転送処理について、図2の構成及び図3(A)〜図4(B)の信号波形を用いて説明する。
3. PATAI / F
Next, the data transfer process of the PATA I / F 10 will be described using the configuration in FIG. 2 and the signal waveforms in FIGS. 3 (A) to 4 (B).

XCS[1:0]は、PATAの各レジスタにアクセスするために使用するチップセレクト信号である。DA[2:0]は、データ又はデータポートにアクセスするためのアドレス信号である。DMARQ、XDMACKは、DMA転送に使用される信号である。データ転送の準備が整った時にデバイス側がDMARQをアクティブ(アサート)にし、これに応答して、ホスト側がXDMACKをアクティブにする。   XCS [1: 0] is a chip select signal used for accessing each register of PATA. DA [2: 0] is an address signal for accessing data or a data port. DMARQ and XDMACK are signals used for DMA transfer. When the device side is ready for data transfer, the device side activates (asserts) DMARQ, and in response, the host side activates XDMACK.

XDIOWは、レジスタ又はデータポートの書き込み時に使用するライト信号である。XDIORは、レジスタ又はデータポートの読み出し時に使用するリード信号である。IORDYは、デバイス側のデータ転送の準備が整っていない時のウェイト信号等に使用される。   XDIOW is a write signal used when writing to a register or a data port. XDIOR is a read signal used when reading a register or data port. IORDY is used as a wait signal when the device side is not ready for data transfer.

INTRQは、デバイス側が、ホスト側に対して割り込みを要求するために使用される信号である。このINTRQがアクティブになった後、ホスト側がデバイス側のTFR12のステータスレジスタの内容を読むと、所定時間後にデバイス側はINTRQを非アクティブ(ネゲート)にする。このINTRQを用いることで、デバイス側は、コマンド処理の終了をホスト側に通知できる。   INTRQ is a signal used by the device side to request an interrupt from the host side. After the INTRQ becomes active, when the host reads the contents of the status register of the TFR 12 on the device side, the device side deactivates INTRQ after a predetermined time. By using this INTRQ, the device side can notify the host side of the end of command processing.

図3(A)、図3(B)は、PIO(Programmed I/O)リード、PIOライトの信号波形例である。PATAのTFR12のステータスレジスタのリードは図3(A)のPIOリードにより行い、コマンドレジスタへのライトは図3(B)のPIOライトにより行う。例えばホスト2によるATAコマンドの発行は、PIOライトにより実現できる。   FIGS. 3A and 3B are signal waveform examples of PIO (Programmed I / O) read and PIO write. The PATA TFR 12 status register is read by the PIO read in FIG. 3A, and the command register is written by the PIO write in FIG. 3B. For example, the ATA command issued by the host 2 can be realized by PIO write.

図4(A)、図4(B)は、DMAリード、DMAライトの信号波形例である。データ転送の準備ができると、デバイス側(データ転送制御装置)が、DMARQをアクティブにする。そして、それを受けて、ホスト側が、XDMACKをアクティブにして、DMA転送を開始する。その後、XDIOR(リード時)又はXDIOW(ライト時)を使用して、データDD[15:0]のDMA転送を行う。   4A and 4B are signal waveform examples of DMA read and DMA write. When preparation for data transfer is completed, the device side (data transfer control device) activates DMARQ. In response to this, the host side activates XDMACK and starts DMA transfer. Thereafter, DMA transfer of data DD [15: 0] is performed using XDIOR (during reading) or XDIOW (during writing).

4.SATAI/F
次にSATAI/F50のデータ転送処理について説明する。図5はSATAの送信側のデータ転送処理の流れを示し、図6は受信側のデータ転送処理の流れを示している。
4). SATAI / F
Next, the data transfer process of the SATA I / F 50 will be described. FIG. 5 shows the flow of data transfer processing on the SATA transmission side, and FIG. 6 shows the flow of data transfer processing on the reception side.

図5に示すように送信側のトランスポートコントローラ(トランスポート層)では、シャドウ・タスクファイル・レジスタに書き込まれたコマンドやデータポートに入力されたデータによりFIS(Frame Information Structure)が生成される。ここでFISは、フレームのペイロード部であり、Dword(32ビット)単位で構成される。またフレームは、ホストとデバイスの間で交換される情報ユニットであり、SOF(Start Of Frame)プリミティブと、FISと、FISに対して計算されたCRC(Cyclic Redundancy Check)と、EOF(End Of Frame)プリミティブにより構成される。   As shown in FIG. 5, in the transport controller (transport layer) on the transmission side, FIS (Frame Information Structure) is generated based on the command written in the shadow task file register and the data input to the data port. Here, FIS is a payload portion of a frame, and is configured in units of Dword (32 bits). The frame is an information unit exchanged between the host and the device. The SOF (Start Of Frame) primitive, the FIS, the CRC (Cyclic Redundancy Check) calculated for the FIS, and the EOF (End Of Frame) are used. ) Consists of primitives.

送信側のリンクコントローラでは、FISに対するCRCが演算されてFISの最後尾に付加される。そしてFIS及びCRCとスクランブルデータとの排他的論理和(XOR)をとるスクランブル処理が行われる。このようにスクランブルされたFIS及びCRCに対して、8b/10bのエンコードが行われる。ここで8b/10bエンコードは、8ビットのデータを10ビットの伝送キャラクタに変換するデータ伝送符号化のアルゴリズムであり、符号列内の1と0の数を揃え、連続的な伝送を保証する。そして8b/10bエンコード後のFIS及びCRCに対してSOF、EOFなどのプリミティブが付加される。   In the link controller on the transmission side, the CRC for the FIS is calculated and added to the end of the FIS. Then, a scramble process is performed to obtain an exclusive OR (XOR) of the FIS and CRC and the scramble data. The 8b / 10b encoding is performed on the scrambled FIS and CRC. Here, 8b / 10b encoding is a data transmission encoding algorithm that converts 8-bit data into 10-bit transmission characters. The number of 1's and 0's in the code string is aligned to guarantee continuous transmission. Then, primitives such as SOF and EOF are added to the FIS and CRC after 8b / 10b encoding.

送信側の物理層回路では、リンクコントローラからのパラレルデータがシリアルデータに変換され、小振幅の差動信号としてSATAバスに送信される。   In the physical layer circuit on the transmission side, parallel data from the link controller is converted into serial data and transmitted to the SATA bus as a differential signal with a small amplitude.

図6に示すように受信側の物理層回路では、SATAバスを介して受信したシリアルデータがパラレルデータに変換される。   As shown in FIG. 6, in the physical layer circuit on the receiving side, serial data received via the SATA bus is converted into parallel data.

受信側のリンクコントローラでは、FIS及びCRCに付加されたプリミティブに対するデコードが行われる。またFIS及びCRCに対する8b/10bのデコードが行われる。即ち10ビットの伝送キャラクタが8ビットのデータに変換される。次に、スクランブルされたFIS及びCRCとスクランブルデータとの排他的論理和をとるデスクランブル処理が行われる。そしてFISの最後尾に付加されたCRCがチェックされる。   The link controller on the receiving side decodes the primitives added to the FIS and CRC. In addition, 8b / 10b decoding for FIS and CRC is performed. That is, a 10-bit transmission character is converted into 8-bit data. Next, a descrambling process is performed to obtain an exclusive OR of the scrambled FIS and CRC and the scrambled data. Then, the CRC added at the end of the FIS is checked.

受信側のトランスポートコントローラでは、FISのコマンドがシャドウ・タスクファイル・レジスタに書き込まれ、ステータスや割り込みが出力されると共に、データがデータポートを介して出力される。   In the transport controller on the receiving side, the FIS command is written to the shadow task file register, status and interrupt are output, and data is output via the data port.

なお図7にATAのタスクファイル・レジスタのフォーマット例を示す。タスクファイル・レジスタはコントロールブロックレジスタとコマンドブロックレジスタを有し、チップセレクト信号XCS0、XCS1が、Hレベル(ネゲート)、Lレベル(アサート)である場合にはコントロールブロックレジスタが選択され、Lレベル、Hレベルである場合にはコマンドブロックレジスタが選択される。またコマンドブロックレジスタには、ステータスレジスタ(Status)やATAコマンドレジスタ(ATA Command)が設けられる。   FIG. 7 shows a format example of the ATA task file register. The task file register has a control block register and a command block register. When the chip select signals XCS0 and XCS1 are H level (negate) and L level (assert), the control block register is selected, and the L level, When it is at the H level, the command block register is selected. The command block register is provided with a status register (Status) and an ATA command register (ATA Command).

また図8(A)〜図8(D)に、SATAI/F50により送受信されるFISのフォーマット例を示す。図8(A)はホストからデバイスへのレジスタFIS、図8(B)はデバイスからホストへのレジスタFIS、図8(C)はPIOセットアップFIS、図8(D)はDMAアクティベートFISのフォーマットである。   8A to 8D show examples of FIS formats transmitted and received by the SATA I / F 50. FIG. 8A is a register FIS from the host to the device, FIG. 8B is a register FIS from the device to the host, FIG. 8C is a PIO setup FIS, and FIG. 8D is a DMA activate FIS format. is there.

5.OOBシーケンス
次にSATAのOOB(Out Of Band)シーケンスについて説明する。SATAI/F50(OOB検出回路)はOOB信号の検出処理を行う。このOOB信号は、SATAのリセット/初期化、通信の確立や、スピード・ネゴシエーションをつかさどる信号である。
5). OOB Sequence Next, the SATA OOB (Out Of Band) sequence will be described. The SATA I / F 50 (OOB detection circuit) performs an OOB signal detection process. This OOB signal is a signal that controls reset / initialization of SATA, establishment of communication, and speed negotiation.

図9(A)に示すようにOOB信号には、COMRESET/COMINITとCOMWAKEがある。COMRESETとCOMINITとしては同じ信号が使用されるが、ホストが出力する信号がCOMRESETであり、デバイスが出力する信号がCOMINITである。COMRESET/COMINITとCOMWAKEとの違いは、図9(A)に示すようにバースト信号間のアイドル間隔である。なお各バースト信号は4つのALIGNプリミティブにより構成される。   As shown in FIG. 9A, the OOB signal includes COMRESET / COMINIT and COMWAKE. The same signal is used as COMRESET and COMINIT, but the signal output from the host is COMRESET, and the signal output from the device is COMINIT. The difference between COMRESET / COMINIT and COMWAKE is an idle interval between burst signals as shown in FIG. Each burst signal is composed of four ALIGN primitives.

図9(B)にSATAの初期化時の信号波形を示す。まずホストがCOMRESETを発行する(A1)。デバイスはCOMRESETを検出するとCOMINITを発行する(A2)。するとホストは伝送路を最適化してCOMWAKEを発行する(A3)。デバイスはホストからのCOMWAKEを検出すると伝送路を最適化してCOMWAKEを発行する(A4)。   FIG. 9B shows a signal waveform at the time of initialization of SATA. First, the host issues a COMRESET (A1). When the device detects COMRESET, it issues COMINIT (A2). Then, the host optimizes the transmission path and issues COMWAKE (A3). When the device detects COMWAKE from the host, the device optimizes the transmission path and issues COMWAKE (A4).

その後、デバイスはALIGNを連続送信する(A5)。この際にホストとのスピード・ネゴシエーションを行う。またホストはデバイスからのCOMWAKEを検出すると、D10.2のキャラクタを送信する(A6)。そしてデバイスからのALIGNによって受信用PLL(Phase-Locked Loop)をロックする。ロックが完了すると、同じ転送レートでALIGNをデバイスに送信する(A7)。   Thereafter, the device continuously transmits ALIGN (A5). At this time, speed negotiation with the host is performed. When the host detects COMWAKE from the device, the host transmits a character of D10.2 (A6). Then, the receiving PLL (Phase-Locked Loop) is locked by ALIGN from the device. When the lock is completed, ALIGN is transmitted to the device at the same transfer rate (A7).

デバイスは、ホストからのALIGNにより受信用PLLをロックし、SYNCプリミティブを送信する。ホストはデバイスからのSYNCプリミティブを検出すると、SYNCを送信する。これによりログインが完了し、通信が確立する。   The device locks the receiving PLL by ALIGN from the host and transmits a SYNC primitive. When the host detects a SYNC primitive from the device, it sends a SYNC. This completes login and establishes communication.

6.デバイス非存在通知
次に本実施形態のデバイス非存在通知手法について具体的に説明する。SATAでは、ハードリセット後のOOBシーケンス時に、図9(B)のA1に示すようにホストはCOMRESETを発行する。そしてホストは、デバイス存在検知期間である10ms以内にA2に示すようにデバイスからのCOMINITを検知した場合には、SATAバス上にデバイスが存在すると判断し、10ms以内にCOMINITを検知しなかった場合には、SATAバス上にデバイスが非存在であると判断する。
6). Device non-existence notification Next, the device non-existence notification method of this embodiment will be described in detail. In SATA, during the OOB sequence after a hard reset, the host issues a COMRESET as indicated by A1 in FIG. 9B. If the host detects COMINIT from the device within 10 ms, which is the device presence detection period, as shown in A2, the host determines that the device exists on the SATA bus, and does not detect COMINIT within 10 ms. Determines that there is no device on the SATA bus.

一方、PATAには、SATAのようなデバイス存在検知期間の概念は無く、デバイスが存在しない場合には、ハードリセット後に直ちにホストに対してデバイスの非存在が知らされる。   On the other hand, PATA has no concept of a device presence detection period like SATA, and when no device is present, the absence of the device is notified immediately to the host after a hard reset.

従って、PATAとSATAのブリッジ機能を有するデータ転送制御装置において、このようなSATAのデバイス存在検知期間について何ら考慮しないと、ホストが、存在するはずのデバイスを非存在であると誤判定してしまう問題が生じる。   Therefore, in a data transfer control device having a PATA-SATA bridge function, if no consideration is given to such a SATA device presence detection period, the host erroneously determines that a device that should exist is non-existent. Problems arise.

本実施形態ではこのような問題を防止するために以下のようなデバイス非存在通知手法を採用している。   In the present embodiment, in order to prevent such a problem, the following device non-existence notification method is adopted.

例えば図10(A)に示すように、データ転送制御装置のハードリセット端子がアサートされて、ハードリセットが行われると、シーケンスコントローラ30はタスクファイル・レジスタTFR12のステータスレジスタ(図7のStatus)のBUSYビットを1にセットし(80hに設定し)、デバイス側がビジー状態であることをホスト2に知らせる。   For example, as shown in FIG. 10A, when the hard reset terminal of the data transfer control device is asserted and a hard reset is performed, the sequence controller 30 stores the status register (Status in FIG. 7) of the task file register TFR12. The BUSY bit is set to 1 (set to 80h) to inform the host 2 that the device side is busy.

次に図10(B)に示すようにシーケンスコントローラ30は、例えばタイマを起動して、デバイス存在検知期間TA(10ms)の経過をウェイトする。即ち図9(B)のA1に示すように、SATAI/F50によるCOMRESETの発行に対して、A2に示すように、デバイス存在検知期間TA内にデバイス4からのCOMINITがSATAI/F50において検出されるのをウェイトする。   Next, as shown in FIG. 10B, the sequence controller 30 activates a timer, for example, and waits for the elapse of the device presence detection period TA (10 ms). That is, as shown in A1 of FIG. 9B, in response to the issuance of COMRESET by the SATA I / F 50, as shown in A2, COMINIT from the device 4 is detected in the SATA I / F 50 within the device presence detection period TA. Wait for.

そして図10(C)に示すようにシーケンスコントローラ30は、デバイス存在検知期間TAが経過した後に、SATAのデバイス4がSATAバス上に非存在(非接続)であることが検知されると、TFR12のステータスレジスタに対してデバイス非存在コード(7Fh)を設定して、デバイス4が非存在であることをホスト2に知らせる。   When the sequence controller 30 detects that the SATA device 4 is not present (not connected) on the SATA bus after the device presence detection period TA has elapsed, as shown in FIG. 10C, the TFR 12 A device absence code (7Fh) is set in the status register to inform the host 2 that the device 4 is not present.

具体的にはSATAI/F50(OOB検出回路)は、発行したCOMRESETに対してデバイス4からCOMINITが出力されるのを検出する。そしてデバイス4からのCOMINITが検出されない場合には、デバイス検知信号DEVDETをLレベル(非アクティブ)のままにする。一方、COMINITが検出された場合には、デバイス検知信号DEVDETをHレベル(アクティブ)にする。   Specifically, the SATA I / F 50 (OOB detection circuit) detects that COMINIT is output from the device 4 in response to the issued COMRESET. If COMINIT from the device 4 is not detected, the device detection signal DEVDET is kept at L level (inactive). On the other hand, when COMINIT is detected, the device detection signal DEVDET is set to H level (active).

そして図10(C)に示すように、シーケンスコントローラ30は、デバイス存在検知期間TAが経過するまで、SATAI/F50から出力されるデバイス検知信号DEVDETをモニタする。そして期間TAにおいてデバイス検知信号DEVDETがアクティブ(アサート状態)にならずにLレベルのままであり、SATAバス側にデバイス4が非存在であると判断される場合には、TFR12のステータスレジスタにデバイス非存在コード(7Fh)を設定する。このようにすれば、SATAI/F50(OOB検出回路)からのデバイス検知信号DEVDETを有効活用して、デバイス非存在コードの設定処理を実現できる。   As shown in FIG. 10C, the sequence controller 30 monitors the device detection signal DEVDET output from the SATA I / F 50 until the device presence detection period TA elapses. If the device detection signal DEVDET does not become active (asserted) and remains at the L level in the period TA, and it is determined that the device 4 does not exist on the SATA bus side, the device is stored in the status register of the TFR 12. A non-existence code (7Fh) is set. In this way, the device detection signal DEVDET from the SATA I / F 50 (OOB detection circuit) can be effectively used to realize the device non-existence code setting process.

一方、図11(A)に示すように、期間TA内にSATAI/F50からのデバイス検知信号DEVDETがHレベル(アクティブ)になった場合には、SATAバス側にデバイス4が存在すると判断して、デバイス非存在コードの設定処理を行わない。そして図11(B)に示すように、初期化シーケンス管理部34が、スレーブ検知や自己診断のための初期化シーケンス処理を実行する。即ち初期化シーケンス管理機能を有しないSATAのデバイス4に代わって初期化シーケンス管理を代行する。そして図11(C)に示すように、初期化シーケンス処理が完了すると、TFR12のステータスレジスタのBUSYビットを0にクリアして(50hに設定して)、ビジー状態の解除をホスト2に知らせる。   On the other hand, as shown in FIG. 11A, when the device detection signal DEVDET from the SATA I / F 50 becomes H level (active) within the period TA, it is determined that the device 4 exists on the SATA bus side. , Device non-existence code setting processing is not performed. Then, as shown in FIG. 11B, the initialization sequence management unit 34 executes initialization sequence processing for slave detection and self-diagnosis. That is, the initialization sequence management is performed in place of the SATA device 4 that does not have the initialization sequence management function. Then, as shown in FIG. 11C, when the initialization sequence processing is completed, the BUSY bit of the status register of the TFR 12 is cleared to 0 (set to 50h) to notify the host 2 of the release of the busy state.

以上のように本実施形態によれば、SATA側のデバイス存在検知期間TAが経過するまでは、ホスト2に対してビジー状態であることが知らされる。そして期間TAの経過後にデバイス4が非存在であることが検知された場合に、初めて、デバイス非存在コードがホストに知らさせる。従って、PATAとSATAのブリッジ機能をデータ転送制御装置に持たせた場合に、デバイスの非存在検知についての誤動作が発生するのを効果的に防止できる。   As described above, according to the present embodiment, the host 2 is informed of the busy state until the SATA side device presence detection period TA elapses. Then, when it is detected that the device 4 is not present after the lapse of the period TA, the device non-existence code is notified to the host for the first time. Therefore, when the data transfer control device is provided with the PATA and SATA bridging function, it is possible to effectively prevent the malfunction of the device non-existence detection.

また本実施形態では、デバイス存在検知期間TA内にデバイス4の存在が検知されると、スレーブ検知や自己診断のための初期化シーケンスの代行処理が、デバイス4に代わって実行される。従って、マスタ、スレーブの区別の概念が無いSATAデバイス4を、マスタ、スレーブの区別が可能なPATAデバイスのように取り扱って、デバイス存在検知後の初期化シーケンスを実現できるようになる。   Further, in the present embodiment, when the presence of the device 4 is detected within the device presence detection period TA, a substitute process for an initialization sequence for slave detection and self-diagnosis is executed instead of the device 4. Accordingly, the SATA device 4 having no concept of master / slave distinction is handled like a PATA device capable of distinguishing between master and slave, and an initialization sequence after device presence detection can be realized.

7.レジスタ値の転送
前述のように本実施形態では、PATAI/F10に、擬似的なタスクファイル・レジスタであるTFR12を設けると共に、SATAI/F50に、シャドウ・タスクファイル・レジスタSFR52を設けている。そしてシーケンスコントローラ30は、TFR12とSFR52との間でレジスタ値の転送処理を行う。
7). As described above, in this embodiment, the PATA I / F 10 is provided with the TFR 12 which is a pseudo task file register, and the SATA I / F 50 is provided with the shadow task file register SFR 52. Then, the sequence controller 30 performs a register value transfer process between the TFR 12 and the SFR 52.

具体的には図12(A)に示すようにホスト2がATAコマンドを発行すると、そのコマンドやパラメータがレジスタ値としてTFR12からSFR52に転送される。するとSATAI/F50は、発行されたATAコマンドを含むレジスタFIS(図8(A)参照)をデバイス4に送信する。そして例えば発行されたATAコマンドがPIOリードである場合には、デバイス4がPIOセットアップFISとそれに続くデータFISを送信し、SATAI/F50が受信する。すると、そのステータスなどのパラメータがレジスタ値としてSFR52からTFR12に転送される。   Specifically, as shown in FIG. 12A, when the host 2 issues an ATA command, the command and parameters are transferred from the TFR 12 to the SFR 52 as register values. Then, the SATA I / F 50 transmits a register FIS (see FIG. 8A) including the issued ATA command to the device 4. For example, when the issued ATA command is PIO read, the device 4 transmits the PIO setup FIS and the subsequent data FIS, and the SATA I / F 50 receives it. Then, parameters such as the status are transferred from the SFR 52 to the TFR 12 as register values.

またATAコマンドがPIOライトである場合には、SATAI/F50はPIOセットアップFISをデバイス4から受信し、データFISをデバイス4に送信する。またATAコマンドがDMAリードである場合には、SATAI/F50はデバイス4からデータFISを受信する。一方、DMAライトである場合には、デバイス4からDMAアクティベートFISを受信して、デバイス4にデータFISを送信する。   When the ATA command is a PIO write, the SATA I / F 50 receives the PIO setup FIS from the device 4 and transmits the data FIS to the device 4. If the ATA command is DMA read, the SATA I / F 50 receives the data FIS from the device 4. On the other hand, in the case of the DMA write, the DMA activate FIS is received from the device 4 and the data FIS is transmitted to the device 4.

このとき、本実施形態では、シーケンスコントローラ30は、デバイス4に対して送信したレジスタFISに対応するFISをSATAI/F50がデバイス4から受信した場合に、ホスト2から発行されたATAコマンドの転送シーケンス制御として、受信したFISの種類に応じた転送シーケンス制御を行う。即ちホスト2から発行されたATAコマンドをデコードせずに、そのコマンドやパラメータをそのままデバイス4側に転送する。このために、TFR12のレジスタ値をSFR52にそのまま転送する。そしてシーケンスコントローラ30は、デバイス4から受信したFISに基づいて、その後の転送シーケンスを制御する。例えばデバイス4から受信したFISがPIOセットアップFISであり、PIOセットアップFISにより指定される転送方向がリード方向である場合には、PIOリードの転送シーケンス制御を行う。またPIOセットアップFISにより指定される転送方向がライト方向である場合には、PIOライトの転送シーケンス制御を行う。またデバイス4から受信したFISがデータFISである場合には、DMAリードの転送シーケンス制御を行い、デバイス4から受信したFISがDMAアクティベートFISである場合には、DMAライトの転送シーケンス制御を行う。   At this time, in the present embodiment, the sequence controller 30 transfers the ATA command issued from the host 2 when the SATA I / F 50 receives from the device 4 the FIS corresponding to the register FIS transmitted to the device 4. As control, transfer sequence control according to the type of received FIS is performed. That is, without decoding the ATA command issued from the host 2, the command and parameters are transferred to the device 4 side as they are. For this purpose, the register value of TFR 12 is transferred to SFR 52 as it is. The sequence controller 30 controls the subsequent transfer sequence based on the FIS received from the device 4. For example, when the FIS received from the device 4 is the PIO setup FIS and the transfer direction specified by the PIO setup FIS is the read direction, the PIO read transfer sequence is controlled. When the transfer direction designated by the PIO setup FIS is the write direction, the PIO write transfer sequence is controlled. When the FIS received from the device 4 is a data FIS, DMA read transfer sequence control is performed. When the FIS received from the device 4 is a DMA activate FIS, DMA write transfer sequence control is performed.

このようにすれば、データ転送制御装置は、ホスト2が発行したATAコマンドの詳細な内容をデコードすることなく、そのままデバイス4に送信できるため、ATAコマンドのデコーダ回路を節約でき、データ転送制御装置の小規模化を図れる。また、新規コマンドの追加が発生しても、これに容易に対応できるようになる。   In this way, the data transfer control device can transmit the ATA command issued by the host 2 to the device 4 as it is without decoding the detailed contents of the ATA command. Therefore, the data transfer control device can save the ATA command decoder circuit. Can be scaled down. In addition, even if a new command is added, this can be easily handled.

このような手法を実現するために図12(A)では、ホスト2がATAコマンドを発行した場合に、TFR12のレジスタ値をSFR52にそのまま転送している。   In order to realize such a method, in FIG. 12A, when the host 2 issues an ATA command, the register value of the TFR 12 is transferred to the SFR 52 as it is.

しかしながら、シーケンスコントローラ30が図10(C)のようにTFR12のステータスレジスタにデバイス非存在コード(7Fh)を設定した後に、ホスト2によるTFR12に対する何らかの書き込みにより、TFR12からSFR52にレジスタ値が転送されてしまうと、SATA側にはデバイス4が存在していないため、予期しない誤動作が生じるおそれがある。   However, after the sequence controller 30 sets the device nonexistence code (7Fh) in the status register of the TFR 12 as shown in FIG. 10C, the register value is transferred from the TFR 12 to the SFR 52 by some writing to the TFR 12 by the host 2. In this case, since the device 4 does not exist on the SATA side, an unexpected malfunction may occur.

そこで図12(B)では、TFR12のステータスレジスタにデバイス非存在コード(7Fh)が設定された場合には、ホスト2によりATAコマンドが発行された場合にも、TFR12からSFR52へのレジスタ値の転送処理を行わず、非実行にしている。   Therefore, in FIG. 12B, when the device non-existence code (7Fh) is set in the status register of TFR 12, even when the host 2 issues an ATA command, the register value is transferred from TFR 12 to SFR 52. No processing is performed and no execution is performed.

例えばPATAI/F10は、図12(A)のようにホスト2が発行したATAコマンドがTFR12に書き込まれた場合に、コマンドライト検出信号をアクティブにする。そしてシーケンスコントローラ30は、コマンドライト検出信号がアクティブになった場合に、TFR12からSFR52へのレジスタ値の転送を行う。   For example, the PATA I / F 10 activates the command write detection signal when an ATA command issued by the host 2 is written in the TFR 12 as shown in FIG. Then, the sequence controller 30 transfers the register value from the TFR 12 to the SFR 52 when the command write detection signal becomes active.

そして本実施形態では、図12(B)に示すように、TFR12にデバイス非存在コード(7Fh)が設定されている場合には、コマンドライト検出信号がアクティブになっても、TFR12からSFR52へのレジスタ値の転送を行わないようにする。   In this embodiment, as shown in FIG. 12B, when the device non-existence code (7Fh) is set in the TFR 12, even if the command write detection signal becomes active, the TFR 12 to the SFR 52 Do not transfer register values.

このようにすれば、TFR12にデバイス非存在コード(7Fh)が設定された後に予期せぬ誤動作が発生する事態を防止できる。   In this way, it is possible to prevent an unexpected malfunction from occurring after the device non-existence code (7Fh) is set in the TFR 12.

8.動作
次に本実施形態の詳細な動作について図13のフローチャートを用いて説明する。
8). Operation Next, the detailed operation of this embodiment will be described with reference to the flowchart of FIG.

シーケンスコントローラ30は、ハードリセット(XHRSET)を検知すると(ステップS1)、図10(A)で説明したようにTFR12のステータスレジスタのBUSYビットを1(80h)にセットし(ステップS2)、ホスト2に対してビジー状態であることを知らせる。そして図10(B)で説明したように、デバイス存在検知期間TA(10ms)のタイマのカウントを開始し(ステップS3)、期間TAが経過するのをウェイトする。このとき、図9(B)のA1に示すようにSATAI/F50がSATAデバイス4に対してCOMRESETを発行する(ステップS4)。   When detecting a hard reset (XHRSET) (step S1), the sequence controller 30 sets the BUSY bit of the status register of the TFR 12 to 1 (80h) as described in FIG. 10A (step S2), and the host 2 To tell you that you are busy. Then, as described with reference to FIG. 10B, the count of the timer for the device presence detection period TA (10 ms) is started (step S3), and the wait for the period TA to elapse is waited for. At this time, as indicated by A1 in FIG. 9B, the SATA I / F 50 issues a COMRESET to the SATA device 4 (step S4).

次に、シーケンスコントローラ30は、タイマでのカウント結果に基づいてデバイス存在検知期間TAが経過したか否かを判断する(ステップS5)。そして経過していない場合には、図9(B)のA2で説明してSATAデバイス4からのCOMINITが検知されたか否かを判断する(ステップ6)。具体的には、SATAI/F50からのデバイス検知信号DEVDETがHレベルになったか否かを判断する。そしてCOMINITが検知されていない場合にはステップS5に戻る。   Next, the sequence controller 30 determines whether or not the device presence detection period TA has elapsed based on the count result of the timer (step S5). If not, it is determined in step A2 in FIG. 9B whether the COMINIT from the SATA device 4 has been detected (step 6). Specifically, it is determined whether or not the device detection signal DEVDET from the SATA I / F 50 has become H level. If COMINIT is not detected, the process returns to step S5.

期間TA内にCOMINITが検知されて、SATAデバイス40が存在することが検知されると、図11(B)で説明したようにXDASP/XPDIAGの初期化シーケンス処理を実行する(ステップS7)。そして初期化シーケンス処理が完了すると、図11(C)で説明したようにTFR12のステータスレジスタのBUSYビットを0にクリア(50h)する(ステップS8)。そしてATAコマンドの待ち受け状態に移行する(ステップS9)。   When COMINIT is detected within the period TA and the presence of the SATA device 40 is detected, the XDASP / XPDIAG initialization sequence processing is executed as described with reference to FIG. 11B (step S7). When the initialization sequence process is completed, the BUSY bit of the status register of the TFR 12 is cleared to 0 (50h) as described with reference to FIG. 11C (step S8). Then, the state shifts to an ATA command standby state (step S9).

一方、ステップS5において、SATAデバイス4からのCOMINITが検知されないまま期間TAが経過した場合には、図10(C)で説明したようにTFR12のステータスレジスタにデバイス非存在コード(7Fh)をセットし(ステップS10)、SATAデバイス4が非存在(非接続)であることをホスト2に知らせる。そしてATAコマンドの非実行状態に移行する(ステップS11)。   On the other hand, if the period TA has passed without detecting COMINIT from the SATA device 4 in step S5, the device nonexistence code (7Fh) is set in the status register of the TFR 12 as described with reference to FIG. (Step S10), the host 2 is notified that the SATA device 4 is not present (not connected). Then, the state shifts to the non-execution state of the ATA command (step S11).

9.初期化シーケンス
次に、ハードリセット後の初期化シーケンスについて具体的に説明する。
9. Initialization Sequence Next, the initialization sequence after a hard reset will be specifically described.

9.1 CSEL端子
PATAデバイスのシステムでは、PATAバスに対して最大で2台のデバイスを接続でき、これらの2台のデバイスのうちの一方がマスタになり、他方がスレーブになる。そして各デバイスは、自身がマスタなのかスレーブなのかを、ジャンパピンの設定又はケーブルセレクトの設定により判断する。またPATAバスに対して2台のデバイスを接続した場合にも、同じアドレスが2台のデバイスで共有して使用される。従って、ATAレジスタ(タスクファイル・レジスタ)に対してホストから書き込み動作があった場合には、マスタ及びスレーブの両方のデバイスが、PATAのデータDD[15:0](図2参照)のバスからそのデータを受け取り、各デバイスは、DEVビット等に基づいて、そのデータが自身に宛てたデータなのか否かを判断する。またATAレジスタに対するホストからの読み出し動作があった場合には、マスタ、スレーブの各デバイスは、その時点でのDEVビットの状態と自身のデバイス番号を比較し、一致した場合にのみ、アクセスされたATAレジスタの内容をデータDD[15:0]のバスに出力する。
9.1 CSEL Terminal In the PATA device system, a maximum of two devices can be connected to the PATA bus, and one of these two devices becomes the master and the other becomes the slave. Each device determines whether it is a master or a slave by setting a jumper pin or setting a cable select. Also, when two devices are connected to the PATA bus, the same address is shared between the two devices. Therefore, when there is a write operation from the host to the ATA register (task file register), both the master and slave devices are connected from the PATA data DD [15: 0] (see FIG. 2) bus. Receiving the data, each device determines whether the data is addressed to itself based on the DEV bit or the like. When there is a read operation from the host to the ATA register, the master and slave devices compare the DEV bit state at that time with their own device numbers, and are accessed only when they match. The contents of the ATA register are output to the bus of data DD [15: 0].

このようにPATAデバイスにおいては、マスタ、スレーブの区別の概念があり、例えばATAのマスタ側にHDD等のデバイスを接続し、スレーブ側にCD、DVD等の光ディスクドライブのデバイスを接続するなどのシステム構成が可能になる。   As described above, the PATA device has a concept of distinguishing between master and slave. For example, a system in which a device such as an HDD is connected to the master side of the ATA and a device of an optical disk drive such as a CD or DVD is connected to the slave side. Configuration is possible.

ところが、SATAデバイスにはマスタ、スレーブの区別の概念が無く、SATAデバイスはマスタとして取り扱われる。従って、データ転送制御装置にPATAとSATAのブリッジ機能を持たせた場合に、何ら工夫をしないと、例えばSATAデバイスをマスタとしてのみ取り扱うことができるマスタ専用のデータ転送制御装置になってしまう。従って、例えば光ディスクドライブなどのSATAデバイスを、スレーブとして、本実施形態のデータ転送制御装置を介してPATAバスにブリッジ接続するようなシステム構成等を実現できないという問題がある。   However, the SATA device has no concept of distinguishing between master and slave, and the SATA device is treated as a master. Therefore, when the data transfer control device is provided with a PATA and SATA bridge function, if the device is not devised, for example, it becomes a data transfer control device dedicated to the master that can handle the SATA device only as the master. Therefore, for example, there is a problem that a system configuration or the like in which a SATA device such as an optical disk drive is connected as a slave to the PATA bus via the data transfer control device of this embodiment cannot be realized.

そこで本実施形態では、マスタ・スレーブの設定端子(決定端子)であるCSEL端子をデータ転送制御装置に設けている。そしてデータ転送制御装置は、このCSEL端子の状態(電圧設定状態)により、自身がマスタ側なのかスレーブ側なのかを判断するようにしている。   Therefore, in this embodiment, a CSEL terminal which is a master / slave setting terminal (determination terminal) is provided in the data transfer control device. The data transfer control device determines whether it is the master side or the slave side based on the state (voltage setting state) of the CSEL terminal.

例えば図14(A)では、CSEL端子がLレベル(GNDレベル)に設定されており、この場合には本実施形態のデータ転送制御装置3は、自身がマスタ側に設定されたと判断する。そしてデータ転送制御装置3とそれに接続されるSATAデバイス4により、PATAのマスタ側が構成される。これにより、本実施形態のデータ転送制御装置3を含むPATAのマスタ側と、PATAのスレーブ側とが、PATAバスに接続されるシステム構成を実現できる。   For example, in FIG. 14A, the CSEL terminal is set to L level (GND level), and in this case, the data transfer control device 3 of this embodiment determines that it is set to the master side. The data transfer control device 3 and the SATA device 4 connected thereto constitute a PATA master side. Accordingly, a system configuration in which the PATA master side including the data transfer control device 3 of the present embodiment and the PATA slave side are connected to the PATA bus can be realized.

一方、図14(B)では、CSEL端子がHレベル(VDDレベル)に設定されており、この場合には本実施形態のデータ転送制御装置3は、自身がスレーブ側に設定されたと判断する。そしてデータ転送制御装置3とそれに接続されるSATAデバイス4により、PATAのスレーブ側が構成される。これにより、PATAのマスタ側と、本実施形態のデータ転送制御装置3を含むPATAのスレーブ側とが、PATAバスに接続されるシステム構成を実現できる。   On the other hand, in FIG. 14B, the CSEL terminal is set to H level (VDD level). In this case, the data transfer control device 3 of this embodiment determines that it is set to the slave side. The data transfer control device 3 and the SATA device 4 connected thereto constitute the PATA slave side. Thereby, a system configuration in which the PATA master side and the PATA slave side including the data transfer control device 3 of the present embodiment are connected to the PATA bus can be realized.

以上のように本実施形態では、PATAとSATAのブリッジ機能を有するデータ転送制御装置3に対して、マスタ・スレーブの設定端子であるCSEL端子を設けているため、例えば本来はマスタ、スレーブの区別の概念が無く、マスタとしてのみ取り扱われるSATAデバイス4を、データ転送制御装置3を介してPATAバスにブリッジ接続して、PATAのスレーブ側を構成することが可能になる。この結果、例えばSATAインターフェースを有する光ディスクドライブなどを、スレーブとして、PATAバスにブリッジ接続するシステム構成等を実現でき、利便性を大幅に向上できる。   As described above, in the present embodiment, since the CSEL terminal which is the master / slave setting terminal is provided for the data transfer control device 3 having the PATA and SATA bridge functions, for example, the master / slave is originally distinguished. The SATA device 4 that is handled only as a master and is bridged to the PATA bus via the data transfer control device 3 can be configured as the PATA slave side. As a result, for example, a system configuration in which an optical disk drive having a SATA interface or the like as a slave is bridge-connected to the PATA bus can be realized, and the convenience can be greatly improved.

9.2 初期化シーケンス管理の代行
前述のように、SATAデバイスにはマスタ、スレーブの区別の概念が無く、SATAデバイスはマスタとしてのみ取り扱われる。従って、SATAデバイスは、マスタ、スレーブを区別するための初期化シーケンス管理機能を有しない。従って、このようなSATAデバイスを、PATAとSATAのブリッジ機能を有するデータ転送制御装置を介してPATAバスにブリッジ接続した場合に、初期化シーケンスの処理を行う処理主体が存在しなくなってしまうという問題がある。
9.2 Proxy for Initialization Sequence Management As described above, the SATA device has no concept of master / slave distinction, and the SATA device is handled only as a master. Therefore, the SATA device does not have an initialization sequence management function for distinguishing between a master and a slave. Accordingly, when such a SATA device is bridge-connected to the PATA bus via a data transfer control device having a PATA-SATA bridge function, there is no problem that there is no processing entity that performs the initialization sequence process. There is.

そこで本実施形態では、図1の初期化シーケンス管理部34が、PATAにおける初期化シーケンス管理機能を有しないSATAデバイス4に代わって初期化シーケンス管理を代行する。そして図11(B)に示すように初期化シーケンス管理部34は、デバイス存在検知期間TA内にSATAデバイス4の存在が検知された場合に、初期化シーケンス処理を実行する。   Therefore, in this embodiment, the initialization sequence management unit 34 in FIG. 1 performs initialization sequence management in place of the SATA device 4 that does not have the initialization sequence management function in PATA. Then, as shown in FIG. 11B, the initialization sequence management unit 34 executes initialization sequence processing when the presence of the SATA device 4 is detected within the device presence detection period TA.

具体的には初期化シーケンス管理部34は、図14(A)のようにCSEL端子(マスタ・スレーブ設定端子)によりデータ転送制御装置3がマスタ側に設定された場合には、ハードリセット後にスレーブ検知処理と自己診断処理を行う。一方、図14(B)のようにCSEL端子によりデータ転送制御装置3がスレーブ側に設定された場合には、ハードリセット後にスレーブ検知信号の制御と自己診断信号の制御を行う。   Specifically, when the data transfer control device 3 is set to the master side by the CSEL terminal (master / slave setting terminal) as shown in FIG. Perform detection processing and self-diagnosis processing. On the other hand, when the data transfer control device 3 is set to the slave side by the CSEL terminal as shown in FIG. 14B, the slave detection signal and the self-diagnosis signal are controlled after the hard reset.

このようにすれば、SATAデバイス4が初期化シーケンス管理機能を有しない場合にも、データ転送制御装置3が、この初期化シーケンス管理を代行して、スレーブ検知等のPATAにおける初期化シーケンス処理を実行できる。従って、マスタとしてのみ取り扱われるSATAデバイス4を、例えばデータ転送制御装置3を介してPATAバスにブリッジ接続して、PATAのスレーブ側を構成した場合に、PATA規格に準拠した適正な初期化シーケンス処理を実行できるようになる。   In this way, even when the SATA device 4 does not have the initialization sequence management function, the data transfer control device 3 performs the initialization sequence management in PATA such as slave detection in place of this initialization sequence management. Can be executed. Therefore, when the SATA device 4 that is handled only as a master is bridge-connected to the PATA bus via, for example, the data transfer control device 3 and the PATA slave side is configured, an appropriate initialization sequence process based on the PATA standard is performed. Can be executed.

次に初期化シーケンス処理の詳細について図15、図16を用いて説明する。図15はホスト側の動作を説明するためのフローチャートであり、図16はデバイス側の動作を説明するためのフローチャートである。   Next, details of the initialization sequence process will be described with reference to FIGS. FIG. 15 is a flowchart for explaining the operation on the host side, and FIG. 16 is a flowchart for explaining the operation on the device side.

図15に示すようにホスト側は、ハードリセット信号をアクティブ(アサート状態)にした後、非アクティブ(ネゲート状態)にする(ステップS21、S22)。そしてステータスレジスタのBUSYビットが1から0にクリアされるのをウェイトし、0にクリアされるとホストアイドル状態に移行する(ステップS23、S24)。   As shown in FIG. 15, the host side makes the hard reset signal active (asserted) and then inactive (negated) (steps S21 and S22). Then, it waits for the BUSY bit of the status register to be cleared from 1 to 0, and when it is cleared to 0, it shifts to the host idle state (steps S23 and S24).

一方、図16に示すようにデバイス側は、ハードリセットが行われると、リリースバスステートに移行し、CSEL(CSEL端子、CSEL信号)がLレベルか否かを判断する(ステップS31、S32、S33)。即ち自身がマスタ側に設定されているか、スレーブ側に設定されているかを判断する。   On the other hand, as shown in FIG. 16, when a hard reset is performed, the device side shifts to a release bus state and determines whether or not CSEL (CSEL terminal, CSEL signal) is at L level (steps S31, S32, S33). ). That is, it is determined whether it is set on the master side or the slave side.

そしてCSELがLレベルに設定され、自身がマスタ側に設定されていると判断した場合には、XDASPウェイトステートに移行した後、サンプルXDASPステートに移行する(ステップS34、S35)。このサンプルXDASPステートでは、自身の初期化及び自己診断処理を行うと共に、スレーブ側からのスレーブ検知信号XDASPをサンプルしてモニタする。   If it is determined that CSEL is set to the L level and that the CSEL is set to the master side, the process shifts to the XDASP wait state and then shifts to the sample XDASP state (steps S34 and S35). In this sample XDASP state, it performs initialization and self-diagnosis processing of itself, and samples and monitors the slave detection signal XDASP from the slave side.

そして信号XDASPがLレベル(アクティブ)であると判断した場合には、スレーブの存在が検知されたと判断して、サンプルXPDIAGステートに移行する(ステップS36、S37)。このサンプルXPDIAGステートでは、スレーブ側からの自己診断信号XPDIAG(スレーブの自己診断結果の通知信号)をサンプルしてモニタする。   If it is determined that the signal XDASP is at the L level (active), it is determined that the presence of the slave is detected, and the state shifts to the sample XPDIAG state (steps S36 and S37). In the sample XPDIAG state, a self-diagnosis signal XPDIAG (slave self-diagnosis result notification signal) from the slave is sampled and monitored.

そして信号XPDIAGがLレベル(アクティブ)であると判断した場合には、スレーブ側の自己診断がパスしたと判断し、タスクファイル・レジスタのエラーレジスタのビット7を0に設定する(ステップS38、S39)。一方、信号XPDIAGがHレベル(非アクティブ)であると判断した場合には、スレーブ側の自己診断がフェイルしたと判断し、エラーレジスタのビット7を1に設定する(ステップS40)。なおステップS36で、信号XDASPがHレベルであると判断された場合には、スレーブが非存在であると判断すると共に、エラーレジスタのビット7を0に設定する(ステップS41)。そしてセットステータスステートに移行し(ステップS42)、自己診断処理を完了すると共に、タスクファイル・レジスタのステータスレジスタのBUSYビットを0にクリアする。そしてデバイスアイドル状態に移行する(ステップS43)。   If it is determined that the signal XPDIAG is at L level (active), it is determined that the self-diagnosis on the slave side has passed, and bit 7 of the error register of the task file register is set to 0 (steps S38 and S39). ). On the other hand, if it is determined that the signal XPDIAG is at the H level (inactive), it is determined that the self-diagnosis on the slave side has failed, and bit 7 of the error register is set to 1 (step S40). If it is determined in step S36 that the signal XDASP is at the H level, it is determined that there is no slave and bit 7 of the error register is set to 0 (step S41). Then, the process proceeds to the set status state (step S42), the self-diagnosis process is completed, and the BUSY bit of the status register of the task file register is cleared to 0. And it transfers to a device idle state (step S43).

一方、ステップS33でCSELがHレベルに設定され、自身がスレーブ側に設定されていると判断した場合には、セットXDASPステートに移行する(ステップS44)。このセットXDASPステートでは、スレーブ検知信号XDASPをLレベル(アクティブ)にすると共に、自身の初期化及び自己診断処理を行う。このようにスレーブ側がスレーブ検知信号XDASPをLレベルにすることで、ステップS36に示すようにマスタ側はスレーブの存在を検知できる。   On the other hand, if it is determined in step S33 that CSEL is set to the H level and the slave is set on the slave side, the process proceeds to the set XDASP state (step S44). In this set XDASP state, the slave detection signal XDASP is set to L level (active), and its own initialization and self-diagnosis processing are performed. As described above, when the slave side sets the slave detection signal XDASP to the L level, the master side can detect the presence of the slave as shown in step S36.

次に、セットステータスステートに移行する(ステップS45)。そして自己診断信号XPDIAGをLレベル(アクティブ)又はHレベル(非アクティブ)にすると共に、タスクファイル・レジスタのステータスレジスタのBUSYビットを0にクリアし、デバイスアイドル状態に移行する(ステップS46)。このようにスレーブ側が信号XPDIAGをLレベルにすることで、ステップS39に示すようにマスタ側はスレーブ側の自己診断がパスしたと判断できる。またスレーブ側が信号XPDIAGをHレベルにすることで、ステップS40に示すようにマスタ側はスレーブ側の自己診断がフェイルしたと判断できる。   Next, the process proceeds to the set status state (step S45). Then, the self-diagnosis signal XPDIAG is set to L level (active) or H level (inactive), the BUSY bit of the status register of the task file register is cleared to 0, and the device idle state is entered (step S46). Thus, by setting the signal XPDIAG to the L level on the slave side, the master side can determine that the self-diagnosis on the slave side has passed as shown in step S39. Further, by setting the signal XPDIAG to the H level on the slave side, the master side can determine that the self-diagnosis on the slave side has failed as shown in step S40.

そして本実施形態では、初期化シーケンス管理部34は、CSEL端子がLレベルに設定され、自身がマスタ側に設定されたと判断した場合には、図16のステップS34〜S43に示すように、スレーブ検知処理と自己診断処理を行う。即ち、信号XDASPに基づいてスレーブが検知されたか否かを判断すると共に、マスタ側の自己診断処理や信号XPDIAGに基づくスレーブ側の自己診断結果の確認処理を行う。   In this embodiment, when the initialization sequence management unit 34 determines that the CSEL terminal is set to the L level and itself is set to the master side, as illustrated in steps S34 to S43 in FIG. Perform detection processing and self-diagnosis processing. That is, it is determined whether or not a slave is detected based on the signal XDASP, and self-diagnosis processing on the master side and confirmation processing on the slave side self-diagnosis result based on the signal XPDIAG are performed.

また初期化シーケンス管理部34は、CSEL端子がHレベルに設定され、自身がスレーブ側に設定されたと判断した場合には、図16のステップS44〜S46に示すように、スレーブ検知信号XDASP、自己診断信号XPDIAGの制御を行う。即ち、スレーブ検知信号XDASPをLレベルにして、スレーブの存在をマスタ側に通知する。また自己診断信号XPDIAGをLレベルにしたり、Hレベルにして、スレーブ側の自己診断結果をホスト側に通知する。   If the initialization sequence management unit 34 determines that the CSEL terminal is set to the H level and is set to the slave side, the initialization sequence management unit 34, as shown in steps S44 to S46 in FIG. The diagnostic signal XPDIAG is controlled. That is, the slave detection signal XDASP is set to the L level to notify the master of the existence of the slave. Further, the self-diagnosis signal XPDIAG is set to L level or H level, and the self-diagnosis result on the slave side is notified to the host side.

以上のような初期化シーケンス処理を初期化シーケンス管理部34に代行させることで、マスタとしてのみ取り扱われるSATAデバイスに、マスタ、スレーブの区別の概念を導入できると共に、PATAの規格にしたがった適正な初期化シーケンス処理を実現できる。   By substituting the initialization sequence processing as described above to the initialization sequence management unit 34, the concept of master / slave distinction can be introduced into a SATA device handled only as a master and an appropriate one according to the PATA standard can be introduced. An initialization sequence process can be realized.

9.3 DEVビットの設定
前述したようにPATAでは、データDD[15:0]やアドレスDA[2:0]のバスは、マスタとスレーブで共用される。従って、マスタ及びスレーブの両方が、データDD[15:0]のバスからのコマンド、パラメータをタスクファイル・レジスタを介して受け取ることになる。そして、マスタへ宛てたものであるか、スレーブへ宛てたものであるかは、デバイス/ヘッドレジスタのDEVビットにより判断する。具体的にはDEVビットが0である場合にはマスタに宛てたものであると判断し、DEVビットが1である場合にはスレーブに宛てたものであると判断する。
9.3 Setting of DEV Bit As described above, in PATA, the bus of data DD [15: 0] and address DA [2: 0] is shared by the master and the slave. Therefore, both the master and the slave receive commands and parameters from the bus of the data DD [15: 0] via the task file register. Then, it is determined by the DEV bit of the device / head register whether the address is for the master or the slave. Specifically, when the DEV bit is 0, it is determined that the address is for the master, and when the DEV bit is 1, it is determined that the address is for the slave.

一方、SATAデバイスは、常にマスタとして取り扱われる。従ってSATAデバイスは、DEVビットが0に設定されたコマンド、パラメータだけを、自身に宛てたものとして受け取ることになる。   On the other hand, the SATA device is always handled as a master. Therefore, the SATA device receives only commands and parameters with the DEV bit set to 0 as being addressed to itself.

ところが、図14(B)に示すように、CSEL端子をHレベルにしてスレーブ設定にした場合には、ホスト2はSATAデバイス4をスレーブと見なしている。従って、SATAデバイス4に対してコマンドやパラメータを送る場合には、DEVビットをスレーブ設定である1に設定する。従って、自身がマスタであると認識しているSATAデバイス4は、これらのコマンドやパラメータを受け取れなくなってしまう。そこで本実施形態では、以下のようなDEVビット設定手法を採用している。   However, as shown in FIG. 14B, when the CSEL terminal is set to the H level and the slave is set, the host 2 regards the SATA device 4 as a slave. Therefore, when a command or parameter is sent to the SATA device 4, the DEV bit is set to 1 which is a slave setting. Therefore, the SATA device 4 that is recognized as the master cannot receive these commands and parameters. Therefore, in the present embodiment, the following DEV bit setting method is adopted.

例えば図17(A)では、CSEL端子(CSEL信号)がLレベルに設定され、データ転送制御装置がマスタ側に設定されている。そしてホスト2がマスタへのATAコマンドを発行している。この場合には、シーケンスコントローラ30は、TFR12のレジスタ値(コマンド、パラメータ)をそのままSFR52に転送する。するとSATAI/F50は、SFR52のレジスタ値に基づいて、レジスタFIS(Host to Device)等を生成して、SATAデバイス4に送信する。   For example, in FIG. 17A, the CSEL terminal (CSEL signal) is set to L level, and the data transfer control device is set to the master side. The host 2 issues an ATA command to the master. In this case, the sequence controller 30 transfers the register value (command, parameter) of the TFR 12 to the SFR 52 as it is. Then, the SATA I / F 50 generates a register FIS (Host to Device) or the like based on the register value of the SFR 52 and transmits it to the SATA device 4.

このとき、TFR12のデバイス/ヘッドレジスタのDEVビット=0(マスタ設定)も、TFR12からSFR52にそのまま転送されて、SATAデバイス4に送信される。そしてSATAデバイス4は、自身をマスタとして認識しているため、ホスト2からのコマンドやパラメータを、問題なく受け取ることができる。   At this time, the DEV bit = 0 (master setting) of the device / head register of the TFR 12 is also transferred as it is from the TFR 12 to the SFR 52 and transmitted to the SATA device 4. Since the SATA device 4 recognizes itself as a master, it can receive commands and parameters from the host 2 without any problem.

また図17(B)では、データ転送制御装置がマスタ側に設定されているときに、ホスト2からのATAコマンドに対応するFIS(例えばレジスタFIS、PIOセットアップFIS、DMAアクティベートFIS等)を、SATAI/F50がSATAデバイス4から受信している。この場合には、シーケンスコントローラ30は、SFR52のレジスタ値をTFR12にそのまま転送する。そしてホスト2は、SATAデバイス4からのステータス等を受け取る。   In FIG. 17B, when the data transfer control device is set to the master side, the FIS (for example, register FIS, PIO setup FIS, DMA activate FIS, etc.) corresponding to the ATA command from the host 2 is changed to SATAI. / F50 is received from the SATA device 4. In this case, the sequence controller 30 transfers the register value of the SFR 52 to the TFR 12 as it is. Then, the host 2 receives the status and the like from the SATA device 4.

このとき、SFR52のデバイス/ヘッドレジスタのDEVビット=0(マスタ設定)も、SFR52からTFR12にそのまま転送される。従って、PATAI/F10は、マスタ側であるSATAデバイス4からのステータス等を、PATAのDD[15:0]のバスに適正に出力できるようになる。   At this time, the DEV bit = 0 (master setting) of the device / head register of the SFR 52 is also transferred from the SFR 52 to the TFR 12 as it is. Therefore, the PATA I / F 10 can appropriately output the status from the SATA device 4 on the master side to the PATA DD [15: 0] bus.

一方、図18(A)では、CSEL端子がHレベルに設定され、データ転送制御装置がスレーブ側に設定されている。そしてホスト2がスレーブへのATAコマンドを発行している。この場合には、シーケンスコントローラ30は、デバイス/ヘッドレジスタのDEVビットを1(スレーブ設定)から0(マスタ設定)に書き換えて、TFR12のレジスタ値をSFR52に転送する。するとSATAI/F50は、SFR52のレジスタ値に基づいて、レジスタFIS(H to D)等を生成して、SATAデバイス4に送信する。   On the other hand, in FIG. 18A, the CSEL terminal is set to the H level, and the data transfer control device is set to the slave side. The host 2 issues an ATA command to the slave. In this case, the sequence controller 30 rewrites the DEV bit of the device / head register from 1 (slave setting) to 0 (master setting), and transfers the register value of the TFR 12 to the SFR 52. Then, the SATA I / F 50 generates a register FIS (H to D) or the like based on the register value of the SFR 52 and transmits it to the SATA device 4.

このとき、SATAデバイス4は、自身をマスタとして認識しているが、本実施形態ではDEVビットを1(スレーブ設定)から0(マスタ設定)に書き換えているため、ホスト2からのコマンドやパラメータを問題なく受け取ることができる。   At this time, the SATA device 4 recognizes itself as a master, but in this embodiment, since the DEV bit is rewritten from 1 (slave setting) to 0 (master setting), the command or parameter from the host 2 is not changed. We can receive without problem.

また図18(B)では、データ転送制御装置がスレーブ側に設定されているときに、ホスト2からのATAコマンドに対応するFISを、SATAI/F50がSATAデバイス4から受信している。この場合には、シーケンスコントローラ30は、SFR52のデバイス/ヘッドレジスタのDEVビットを0(マスタ設定)から1(スレーブ設定)に書き換えて、SFR52のレジスタ値をTFR12に転送する。そしてホスト2は、SATAデバイス4からのステータス等を受け取る。   In FIG. 18B, when the data transfer control device is set to the slave side, the SATA I / F 50 receives the FIS corresponding to the ATA command from the host 2 from the SATA device 4. In this case, the sequence controller 30 rewrites the DEV bit of the device / head register of the SFR 52 from 0 (master setting) to 1 (slave setting), and transfers the register value of the SFR 52 to the TFR 12. Then, the host 2 receives the status and the like from the SATA device 4.

このとき、ホスト2は、SATAデバイス4をスレーブとして認識しているが、本実施形態ではDEVビットを0(マスタ設定)から1(スレーブ設定)に書き換えているため、SATAデバイス4からのステータス等を問題なく受け取ることができる。   At this time, the host 2 recognizes the SATA device 4 as a slave, but in this embodiment, since the DEV bit is rewritten from 0 (master setting) to 1 (slave setting), the status from the SATA device 4 and the like. Can be received without any problems.

以上のように本実施形態では、CSEL端子の状態に応じた適正な値に、デバイス/ヘッドレジスタのDEVビットを書き換えている。従って、CSEL端子によりデータ転送制御装置をスレーブ側に設定した場合にも、ホスト2と、自身をマスタと認識しているSATAデバイス4との間で、コマンド、パラメータやステータスの適正な転送処理を実現できる。   As described above, in this embodiment, the DEV bit of the device / head register is rewritten to an appropriate value according to the state of the CSEL terminal. Therefore, even when the data transfer control device is set to the slave side by the CSEL terminal, appropriate transfer processing of commands, parameters, and status is performed between the host 2 and the SATA device 4 that recognizes itself as the master. realizable.

次に本実施形態のDEVビットの設定手法について図19、図20のフローチャートを用いて更に詳細に説明する。   Next, the DEV bit setting method of this embodiment will be described in more detail with reference to the flowcharts of FIGS.

図19では、ホスト2がマスタへのATAコマンドを発行している(ステップS51)。そしてCSEL端子がLレベルか否かを判断し(ステップS52)、Lレベルである場合には、図17(A)で説明したようにTFR12のレジスタ値をそのままSFR52に転送する(ステップS53)。そしてSATAデバイス4へのコマンドの転送及び実行が行われる(ステップS54)。   In FIG. 19, the host 2 issues an ATA command to the master (step S51). Then, it is determined whether or not the CSEL terminal is at the L level (step S52). If the CSEL terminal is at the L level, the register value of the TFR 12 is directly transferred to the SFR 52 as described with reference to FIG. 17A (step S53). Then, the command is transferred and executed to the SATA device 4 (step S54).

次に、SATAデバイス4からステータス返送のためのFIS(レジスタFIS等)を受信すると(ステップS55)、図17(B)で説明したようにSFR52のレジスタ値をそのままTFR12に転送する(ステップS56)。   Next, when an FIS (register FIS or the like) for status return is received from the SATA device 4 (step S55), the register value of the SFR 52 is directly transferred to the TFR 12 as described with reference to FIG. 17B (step S56). .

一方、ステップS52でCSEL端子がHレベルであると判断された場合には、ホスト2により発行されたATAコマンドは非実行になる(ステップS57)。即ち、ホスト2が発行したATAコマンドはマスタへ宛てたものであり、CSEL端子はスレーブ側に設定されているため、スレーブ側であるデータ転送制御装置は、このATAコマンドの実行処理を行わない。   On the other hand, if it is determined in step S52 that the CSEL terminal is at the H level, the ATA command issued by the host 2 is not executed (step S57). That is, since the ATA command issued by the host 2 is addressed to the master and the CSEL terminal is set on the slave side, the data transfer control device on the slave side does not execute this ATA command execution process.

図20では、ホスト2がスレーブへのATAコマンドを発行している(ステップS61)。そしてCSEL端子がLレベルか否かを判断し(ステップS62)、LレベルではなくHレベルである場合には、図18(A)で説明したようにTFR12のデバイス/ヘッドレジスタのDEVビットを0(マスタ設定)に書き換えて、TFR12のレジスタ値をSFR52に転送する(ステップS63)。そしてSATAデバイス4へのコマンドの転送及び実行が行われる(ステップS64)。   In FIG. 20, the host 2 issues an ATA command to the slave (step S61). Then, it is determined whether or not the CSEL terminal is at the L level (step S62). If the CSEL terminal is at the H level instead of the L level, the DEV bit of the device / head register of the TFR 12 is set to 0 as described with reference to FIG. Rewriting to (master setting), the register value of TFR12 is transferred to SFR52 (step S63). Then, the command is transferred and executed to the SATA device 4 (step S64).

次に、SATAデバイス4からステータス返送のためのFIS(レジスタFIS等)を受信すると(ステップS65)、図18(B)で説明したようにSFR52のデバイス/ヘッドレジスタのDEVビットを1(スレーブ設定)に書き換えて、SFR52のレジスタ値をTFR12に転送する(ステップS66)。   Next, when an FIS (register FIS or the like) for status return is received from the SATA device 4 (step S65), as described in FIG. 18B, the DEV bit of the device / head register of the SFR 52 is set to 1 (slave setting). ) And the register value of the SFR 52 is transferred to the TFR 12 (step S66).

一方、ステップS62でCSEL端子がLレベルであると判断された場合には、ホスト2により発行されたATAコマンドは非実行になる(ステップS67)。即ち、ホスト2が発行したATAコマンドはスレーブへ宛てたものであり、CSEL端子はマスタ側に設定されているため、マスタ側であるデータ転送制御装置は、このATAコマンドの実行処理を行わない。   On the other hand, if it is determined in step S62 that the CSEL terminal is at the L level, the ATA command issued by the host 2 is not executed (step S67). That is, since the ATA command issued by the host 2 is addressed to the slave and the CSEL terminal is set on the master side, the data transfer control device on the master side does not execute this ATA command execution process.

10.SATAI/Fの構成
図21にSATAI/F50の構成例を示す。なおSATAI/F50の構成は図21に限定されず、その構成要素の一部を削除したり、他の構成要素を追加するなどの種々の変形実施が可能である。例えば物理層回路200を設けない構成としてもよい。
10. SATA I / F Configuration FIG. 21 shows a configuration example of the SATA I / F 50. Note that the configuration of the SATA I / F 50 is not limited to that shown in FIG. 21, and various modifications such as deleting some of the components or adding other components are possible. For example, the physical layer circuit 200 may be omitted.

SATAでは、データは32ビット(4バイト)単位で処理される。この32ビットのデータが、リンクコントローラ150により8b/10bでエンコードされて40ビットのデータになり、物理層回路200に送られる。物理層回路200は、この40ビットのデータをシリアル化してSATAのケーブルに送信する。受信も逆の手順で、シリアルデータが物理層回路200で40ビットのデータに変換され、リンクコントローラ150で32ビットのデータに変換され、トランスポートコントローラ110に送られる。   In SATA, data is processed in units of 32 bits (4 bytes). The 32-bit data is encoded at 8b / 10b by the link controller 150 to become 40-bit data, which is sent to the physical layer circuit 200. The physical layer circuit 200 serializes the 40-bit data and transmits it to the SATA cable. In the reverse order of reception, the serial data is converted into 40-bit data by the physical layer circuit 200, converted into 32-bit data by the link controller 150, and sent to the transport controller 110.

トランスポートコントローラ110はトランスポート層の制御を行うものである。具体的にはトランスポートコントローラ110は、上位層(アプリケーション層)からFISの送信要求が来た時に、以下の処理を行う。   The transport controller 110 controls the transport layer. Specifically, the transport controller 110 performs the following processing when an FIS transmission request is received from an upper layer (application layer).

まずトランスポートコントローラ110は、FISタイプの要件に基づいてFISの内容を収集する。また送信する情報をFISのタイプ毎に定義フォーマットに配置する。次にリンクコントローラ150に対して送信要求を通知する。これによりリンクコントローラ150はX_RDYの送信処理を行う。そして相手ノードからのR_RDYを受信し、リンクコントローラ150から受信のアクノリッジが来ると、トランスポートコントローラ110はFISをリンクコントローラ150に転送する。そして送信FIFO120のフロー管理を行い、必要なフロー制御をリンクコントローラ150に通知する。その後、リンクコントローラ150から送信結果を受信すると、必要に応じて上位層に送信結果を通知する。   First, the transport controller 110 collects the contents of the FIS based on the requirements of the FIS type. Information to be transmitted is arranged in a definition format for each type of FIS. Next, a transmission request is notified to the link controller 150. As a result, the link controller 150 performs X_RDY transmission processing. When the R_RDY from the partner node is received and an acknowledgment from the link controller 150 is received, the transport controller 110 transfers the FIS to the link controller 150. Then, flow management of the transmission FIFO 120 is performed, and necessary flow control is notified to the link controller 150. Thereafter, when a transmission result is received from the link controller 150, the transmission result is notified to an upper layer as necessary.

トランスポートコントローラ110は、リンクコントローラ150からFISを受信した時には、以下の処理を行う。   When the transport controller 110 receives the FIS from the link controller 150, the transport controller 110 performs the following processing.

トランスポートコントローラ110は、リンクコントローラ150からFISを受信すると、受信したFISのタイプを判別する。そしてFISのタイプに応じた適切なレジスタやFIFOにデータを転送する。そして受信FIFO122のフロー管理を行い、必要なフロー制御をリンクコントローラ150に通知する。その後、リンクコントローラ150及び上位層(アプリケーション層)に受信結果を通知する。   When the transport controller 110 receives the FIS from the link controller 150, the transport controller 110 determines the type of the received FIS. Then, the data is transferred to an appropriate register or FIFO according to the type of FIS. Then, flow management of the reception FIFO 122 is performed, and necessary flow control is notified to the link controller 150. Thereafter, the reception result is notified to the link controller 150 and the upper layer (application layer).

リンクコントローラ150はリンク層の制御を行うものである。具体的にはリンクコントローラ150は、送信時には以下の処理を行う。   The link controller 150 controls the link layer. Specifically, the link controller 150 performs the following processing at the time of transmission.

まずリンクコントローラ150はトランスポートコントローラ110からのデータ(FIS)を受け取る。そしてFISのCRCを生成し、FISの最後尾に付加する。次にデータのスクランブルを行い、その後、8b/10bのエンコードを行う。そしてSATA通信のプロトコルにしたがったプリミティブ、FISの送信を行う。そして送信結果をトランスポートコントローラ110に通知する。   First, the link controller 150 receives data (FIS) from the transport controller 110. A FIS CRC is generated and added to the end of the FIS. Next, the data is scrambled, and then 8b / 10b encoding is performed. Then, the primitive and FIS are transmitted according to the SATA communication protocol. The transmission result is notified to the transport controller 110.

リンクコントローラ150は受信時には以下の処理を行う。即ちリンクコントローラ150は物理層回路200から、8b/10bエンコードキャラクタを受信する。そして8b/10bエンコードキャラクタをデコードし、デコードしたプリミティブを処理部等に通知する。次にデコードしたFISのデスクランブル処理を行い、CRCをチェックする。そしてトランスポートコントローラ110にデータを渡す。またデコード結果やCRCのチェック結果をトランスポートコントローラ110に通知する。   The link controller 150 performs the following processing upon reception. That is, the link controller 150 receives the 8b / 10b encoded character from the physical layer circuit 200. Then, the 8b / 10b encoded character is decoded, and the decoded primitive is notified to the processing unit or the like. Next, the decoded FIS is descrambled and the CRC is checked. Then, the data is passed to the transport controller 110. In addition, the transport controller 110 is notified of the decoding result and the CRC check result.

物理層回路200は物理層を実現するアナログフロントエンド回路である。この物理層回路200は、シリアルデータ(シリアルストリーム)の送受信や、シリアルデータからパラレルデータへの変換や、パラレルデータからシリアルデータへの変換を行う。また8b/10bのK28.5キャラクタの検出や、OOB(Out Of Band)信号の検出と送信を行う。またデバイスステータス(デバイスの有無、転送状態、パワー状態)の提供や、通信制御用のインターフェース(転送レート制御、ループバック)の提供を行う。またオプションでパワーマネージメントも行う。   The physical layer circuit 200 is an analog front-end circuit that realizes a physical layer. The physical layer circuit 200 performs transmission / reception of serial data (serial stream), conversion from serial data to parallel data, and conversion from parallel data to serial data. It also detects 8b / 10b K28.5 characters and detects and transmits OOB (Out Of Band) signals. It also provides device status (device presence / absence, transfer status, power status) and communication control interface (transfer rate control, loopback). Optional power management.

物理層回路(PHY)200はトランスミッタ(ドライバ)210、レシーバ220、OOB検出回路230などを含む。   The physical layer circuit (PHY) 200 includes a transmitter (driver) 210, a receiver 220, an OOB detection circuit 230, and the like.

トランスミッタ210は、差動信号線(差動信号線ペア)TX+/−を介してシリアルデータ(パケット)の送信を行い、レシーバ220は、差動信号線(差動信号線ペア)RX+/−を介してシリアルデータ(パケット)の受信を行う。TX+/−、RX+/−のSATAバス(広義にはシリアルバス)では、振幅電圧+/−250mVのNRZ差動信号によるシリアルストリーム転送が行われる。   The transmitter 210 transmits serial data (packets) via a differential signal line (differential signal line pair) TX +/−, and the receiver 220 transmits a differential signal line (differential signal line pair) RX +/−. Serial data (packet) is received through the network. On the TX +/− and RX +/− SATA buses (serial bus in a broad sense), serial stream transfer is performed using an NRZ differential signal having an amplitude voltage of +/− 250 mV.

OOB検出回路230はOOB信号の検出処理を行う。このOOB信号は、SATAインターフェースのリセット/初期化、通信の確立や、スピード・ネゴシエーションをつかさどる信号である。   The OOB detection circuit 230 performs an OOB signal detection process. This OOB signal is a signal that controls reset / initialization of the SATA interface, establishment of communication, and speed negotiation.

リンクコントローラ150は、リンクステート制御回路160、フレーム生成回路190、フレームデコード回路192を含む。   The link controller 150 includes a link state control circuit 160, a frame generation circuit 190, and a frame decoding circuit 192.

リンクステート制御回路160は、リンクコントローラ150のステート制御を行う。例えばリセットステート、アイドルステート、送信ステート、受信ステート等のステート間の遷移処理等を行う。   The link state control circuit 160 performs state control of the link controller 150. For example, transition processing between states such as a reset state, an idle state, a transmission state, and a reception state is performed.

フレーム生成回路190は、トランスポートコントローラ110からの送信データ(FIS)や、リンクステート制御回路160からの送信制御信号などに基づいてフレームの生成処理を行う。具体的には、トランスポートコントローラ110からのFISのCRCを演算したり、スクランブル処理を行ったり、8b/10bエンコード処理を行ったり、プリミティブを生成して付加する処理などを行う。   The frame generation circuit 190 performs frame generation processing based on transmission data (FIS) from the transport controller 110, a transmission control signal from the link state control circuit 160, and the like. Specifically, the FIS CRC from the transport controller 110 is calculated, the scramble process is performed, the 8b / 10b encode process is performed, the primitive is generated and added, and the like.

フレームデコード回路192は、受信したフレームの解析(分解)処理を行い、受信解析信号(パワーダウンリクエスト信号等)をリンクステート制御回路160に出力する。具体的には、FISに付加されたプリミティブを解析したり、8b/10bのデコード処理を行ったり、デスクランブル処理を行ったり、CRCを演算してチェックする処理などを行う。   The frame decoding circuit 192 performs an analysis (decomposition) process on the received frame and outputs a reception analysis signal (such as a power-down request signal) to the link state control circuit 160. Specifically, a primitive added to the FIS is analyzed, an 8b / 10b decoding process is performed, a descrambling process is performed, and a CRC is calculated and checked.

トランスポートコントローラ110は、割りこみコントローラ118、DMA制御回路119、送信FIFO120、受信FIFO122、FIS生成回路130、FISデコード回路132、トランスポートステート制御回路140を含む。   The transport controller 110 includes an interrupt controller 118, a DMA control circuit 119, a transmission FIFO 120, a reception FIFO 122, a FIS generation circuit 130, a FIS decoding circuit 132, and a transport state control circuit 140.

割り込みコントローラ118は、デバイス4からの受信FIS情報などを知らせるための割り込み信号を生成する。DMA制御回路119は、FISに含まれる送信データや受信データ(コンテンツ・データ)のDMA転送を制御する。送信FIFO120は、DMA制御回路119からの送信データのバッファとなるFIFOである。受信FIFO122は、リンクコントローラ150からの受信データのバッファとなるFIFOである。FIS生成回路130はFISの生成を行う回路であり、FISデコード回路132はFISの解析を行う回路である。トランスポートステート制御回路140は、トランスポートコントローラ110のステート制御を行う。   The interrupt controller 118 generates an interrupt signal for informing reception FIS information and the like from the device 4. The DMA control circuit 119 controls DMA transfer of transmission data and reception data (content data) included in the FIS. The transmission FIFO 120 is a FIFO serving as a buffer for transmission data from the DMA control circuit 119. The reception FIFO 122 is a FIFO serving as a buffer for data received from the link controller 150. The FIS generation circuit 130 is a circuit that generates an FIS, and the FIS decode circuit 132 is a circuit that analyzes the FIS. The transport state control circuit 140 performs state control of the transport controller 110.

11.シーケンスコントローラ
図22にシーケンスコントローラ30の構成例を示す。シーケンスコントローラ30はレジスタ更新部32、初期化シーケンス管理部34、パラメータ書き換え部36、DMAモード設定記憶部38、転送制御部40を含む。なおシーケンスコントローラ30の構成は図22に限定されず、その構成要素の一部を削除したり、他の構成要素を追加するなどの種々の変形実施が可能である。
11. Sequence Controller FIG. 22 shows a configuration example of the sequence controller 30. The sequence controller 30 includes a register update unit 32, an initialization sequence management unit 34, a parameter rewrite unit 36, a DMA mode setting storage unit 38, and a transfer control unit 40. Note that the configuration of the sequence controller 30 is not limited to that shown in FIG. 22, and various modifications such as deleting some of the components or adding other components are possible.

レジスタ更新部32はTFR12(タスクファイル・レジスタ)、SFR52(シャドウ・タスクファイル・レジスタ)のレジスタ値の更新処理を行う。具体的にはTFR12のレジスタ値をSFR52に転送してSFR52のレジスタ値を更新したり、SFR52のレジスタ値をTFR12に転送してTFR12のレジスタ値を更新する。   The register update unit 32 updates the register values of the TFR 12 (task file register) and SFR 52 (shadow task file register). Specifically, the register value of TFR 12 is transferred to SFR 52 to update the register value of SFR 52, or the register value of SFR 52 is transferred to TFR 12 to update the register value of TFR 12.

例えばTFR12にホスト2によりATAコマンドが書き込まれると、PATAI/F10はコマンドライト検出信号をアクティブにする。そしてコマンドライト検出信号がアクティブになると、レジスタ更新部32はTFR12のレジスタ値をSFR52に転送する処理を行う。   For example, when an ATA command is written to the TFR 12 by the host 2, the PATA I / F 10 activates the command write detection signal. When the command write detection signal becomes active, the register updating unit 32 performs a process of transferring the register value of the TFR 12 to the SFR 52.

またSATAI/F50は、デバイス4から受信したFISをデコードし、デコード結果に基づいて、FISの種類を知らせるための割り込み信号(広義には受信FIS情報)を生成して出力する。レジスタ更新部32は、この割り込み信号に基づいて受信FISの種類を判別して、SFR52からTFR12へのレジスタ値の転送処理などを行って、レジスタ値の更新処理を行う。   The SATA I / F 50 decodes the FIS received from the device 4 and generates and outputs an interrupt signal (reception FIS information in a broad sense) for notifying the type of FIS based on the decoding result. The register updating unit 32 determines the type of reception FIS based on the interrupt signal, performs a register value transfer process from the SFR 52 to the TFR 12, and performs a register value update process.

初期化シーケンス管理部34は、HRST(ハードリセット)、SRST(ソフトリセット)に伴う初期化シーケンスを管理する。具体的には、マスター、スレーブなどの設定をモニタして、PATAの初期化シーケンスを管理する。   The initialization sequence management unit 34 manages an initialization sequence associated with HRST (hard reset) and SRST (soft reset). Specifically, the PATA initialization sequence is managed by monitoring settings such as master and slave.

パラメータ書き換え部36は、ホスト2がデバイス4に対してアイデンティファイ・デバイス・コマンドを発行し、デバイス4からデバイス情報のパラメータを受信した場合に、パラメータの書き換え処理を行う。即ち転送速度などのパラメータを自身が対応可能なパラメータに書き換える。   The parameter rewriting unit 36 performs parameter rewriting processing when the host 2 issues an identify device command to the device 4 and receives device information parameters from the device 4. That is, parameters such as transfer speed are rewritten to parameters that can be handled by the user.

DMAモード設定記憶部38は、ホスト2がセットフューチャー・コマンドを発行した場合に、セットフューチャー・コマンドを解析して、DMA転送のモード設定を記憶する。   When the host 2 issues a set future command, the DMA mode setting storage unit 38 analyzes the set future command and stores the mode setting for DMA transfer.

転送制御部40はデータ転送制御装置の転送シーケンスを制御するものであり、モニタ部42、制御信号生成部44を含む。モニタ部42は、PATAI/F10からのコマンドライト検出信号や、SATAI/F50からの割り込み信号(受信FIS情報)などの信号をモニタする。そして制御信号生成部44は、モニタ結果に基づいて、転送方向設定信号、転送開始信号、転送停止信号などの制御信号を生成し、PATI/F10、データバッファ70、SATAI/F50に出力して、転送シーケンス制御を実行する。なおデータバッファ70に対しては転送開始信号、転送停止信号は出力せず、転送方向設定信号を出力する。   The transfer control unit 40 controls a transfer sequence of the data transfer control device, and includes a monitor unit 42 and a control signal generation unit 44. The monitor unit 42 monitors signals such as a command write detection signal from the PATA I / F 10 and an interrupt signal (received FIS information) from the SATA I / F 50. The control signal generation unit 44 generates control signals such as a transfer direction setting signal, a transfer start signal, and a transfer stop signal based on the monitor result, and outputs the control signals to the PATI / F 10, the data buffer 70, and the SATA I / F 50. Transfer sequence control is executed. A transfer start setting signal and a transfer stop signal are not output to the data buffer 70, but a transfer direction setting signal is output.

12.電子機器
図23に本実施形態の電子機器の構成例を示す。この電子機器は、本実施形態で説明したデータ転送制御装置310とホスト302とデバイス304を含む。ホスト302とデータ転送制御装置310はPATAバスを介して接続され、データ転送制御装置310とデバイス304はSATAバスを介して接続される。なお本実施形態の電子機器の構成は図23に限定されず、その構成要素の一部を省略したり、他の構成要素を付加する変形実施が可能である。
12 Electronic Device FIG. 23 shows a configuration example of the electronic device of this embodiment. This electronic apparatus includes the data transfer control device 310, the host 302, and the device 304 described in the present embodiment. The host 302 and the data transfer control device 310 are connected via a PATA bus, and the data transfer control device 310 and the device 304 are connected via a SATA bus. Note that the configuration of the electronic device of the present embodiment is not limited to that shown in FIG. 23, and some modifications can be made by omitting some of the components or adding other components.

同図においてデバイス304は、HDD(ハードディスクドライブ)等のストレージデバイスや、光ディスクドライブ(CD、DVD)等である。   In the figure, a device 304 is a storage device such as an HDD (hard disk drive), an optical disk drive (CD, DVD), or the like.

ホスト302は、処理部330(CPU)、ROM340、RAM350、表示部360、操作部370を含むことができる。処理部330(CPU)はデータ転送制御装置310や電子機器の全体制御を行う。なおデータ転送制御装置310を制御する処理部と、電子機器を制御する処理部とを別々に設けてもよい。ROM340は制御プログラムや各種データを記憶する。RAM350は処理部330やデータ転送制御装置310のワーク領域やデータ格納領域として機能する。表示部360は種々の情報をユーザに表示する。操作部370はユーザが電子機器を操作するためのものである。   The host 302 can include a processing unit 330 (CPU), a ROM 340, a RAM 350, a display unit 360, and an operation unit 370. The processing unit 330 (CPU) performs overall control of the data transfer control device 310 and the electronic device. A processing unit that controls the data transfer control device 310 and a processing unit that controls the electronic device may be provided separately. The ROM 340 stores control programs and various data. The RAM 350 functions as a work area and a data storage area for the processing unit 330 and the data transfer control device 310. The display unit 360 displays various information to the user. The operation unit 370 is for the user to operate the electronic device.

本実施形態の電子機器によれば、ホスト302がSATAI/Fを有していない場合にも、データ転送制御装置310を介してSATAのデバイス304をホスト302に接続して、あたかもPATAのデバイスのように扱うことが可能になる。   According to the electronic apparatus of the present embodiment, even when the host 302 does not have a SATA I / F, the SATA device 304 is connected to the host 302 via the data transfer control device 310, as if the PATA device Can be handled as follows.

なお、本実施形態を適用できる電子機器としては、カーナビゲーションシステム、車載用オーディオ機器、HDDレコーダ、ビデオカメラ、携帯型音楽プレーヤ、携帯型映像プレーヤ、ゲーム装置、又は携帯型ゲーム装置等の種々のものが考えられる。   Note that various electronic devices such as a car navigation system, an in-vehicle audio device, an HDD recorder, a video camera, a portable music player, a portable video player, a game device, or a portable game device can be applied to the electronic device. Things can be considered.

なお、上記のように本実施形態について詳細に説明したが、本発明の新規事項および効果から実体的に逸脱しない多くの変形が可能であることは当業者には容易に理解できるであろう。従って、このような変形例はすべて本発明の範囲に含まれるものとする。例えば、明細書又は図面において、少なくとも一度、より広義または同義な異なる用語と共に記載された用語は、明細書又は図面のいかなる箇所においても、その異なる用語に置き換えることができる。またデータ転送制御装置、電子機器の構成、動作も本実施形態で説明したものに限定に限定されず、種々の変形実施が可能である。また本実施形態では、SATAへの本発明の適用例について説明したが、本発明は、SATAと同様の思想に基づく規格や、SATA(SATA I、SATA II、SAS)を発展させた規格等にも適用できる。   Although the present embodiment has been described in detail as described above, it will be easily understood by those skilled in the art that many modifications can be made without departing from the novel matters and effects of the present invention. Accordingly, all such modifications are intended to be included in the scope of the present invention. For example, a term described at least once together with a different term having a broader meaning or the same meaning in the specification or the drawings can be replaced with the different term in any part of the specification or the drawings. Further, the configuration and operation of the data transfer control device and the electronic device are not limited to those described in the present embodiment, and various modifications can be made. In this embodiment, the application example of the present invention to SATA has been described. However, the present invention is based on a standard based on the same idea as SATA, a standard developed from SATA (SATA I, SATA II, SAS), or the like. Is also applicable.

本実施形態のデータ転送制御装置の構成例。1 is a configuration example of a data transfer control device according to the present embodiment. 本実施形態のデータ転送制御装置の詳細な構成例。2 is a detailed configuration example of a data transfer control device according to the present embodiment. 図3(A)、図3(B)はPIOリード、PIOライトの信号波形例。3A and 3B show examples of signal waveforms of PIO read and PIO write. 図4(A)、図4(B)はDMAリード、DMAライトの信号波形例。4A and 4B show signal waveform examples of DMA read and DMA write. SATAの送信側のデータ処理の説明図。Explanatory drawing of the data processing of the transmission side of SATA. SATAの受信側のデータ処理の説明図。Explanatory drawing of the data processing by the side of SATA reception. タスクファイル・レジスタのフォーマット例。Example of task file register format. 図8(A)〜図8(D)はFISのフォーマット例。8A to 8D are examples of FIS formats. 図9(A)、図9(B)はOOBシーケンスの説明図。9A and 9B are explanatory diagrams of the OOB sequence. 図10(A)〜図10(C)は本実施形態のデバイス非存在通知手法の説明図。FIG. 10A to FIG. 10C are explanatory diagrams of a device non-existence notification method according to this embodiment. 図11(A)〜図11(C)は本実施形態のデバイス非存在通知手法の説明図。FIG. 11A to FIG. 11C are explanatory diagrams of a device non-existence notification method according to this embodiment. 図12(A)、図12(B)は本実施形態のレジスタ値転送手法の説明図。12A and 12B are explanatory diagrams of a register value transfer method according to this embodiment. 本実施形態の動作を説明するためのフローチャート。The flowchart for demonstrating the operation | movement of this embodiment. 図14(A)、図14(B)はCSEL端子の設定手法の説明図。FIGS. 14A and 14B are explanatory diagrams of a CSEL terminal setting method. 初期化シーケンス処理を説明するためのフローチャート。The flowchart for demonstrating the initialization sequence process. 初期化シーケンス処理を説明するためのフローチャート。The flowchart for demonstrating the initialization sequence process. 図17(A)、図17(B)は本実施形態のDEVビットの設定手法の説明図。FIGS. 17A and 17B are explanatory diagrams of a DEV bit setting method according to this embodiment. 図18(A)、図18(B)は本実施形態のDEVビットの設定手法の説明図。18A and 18B are explanatory diagrams of the DEV bit setting method of this embodiment. 本実施形態のDEVビットの設定手法を説明するためのフローチャート。The flowchart for demonstrating the setting method of the DEV bit of this embodiment. 本実施形態のDEVビットの設定手法を説明するためのフローチャート。The flowchart for demonstrating the setting method of the DEV bit of this embodiment. SATAI/Fの構成例。The structural example of SATAI / F. シーケンスコントローラの構成例。The structural example of a sequence controller. 電子機器の構成例。Configuration example of an electronic device.

符号の説明Explanation of symbols

2 ホスト、4 デバイス、10 PATAI/F、
12 タスクファイル・レジスタ(TFR)、14 転送コントローラ、
30 シーケンスコントローラ、32 レジスタ更新部、
34 初期化シーケンス管理部、36 パラメータ書き換え部、
38 DMA転送設定記憶部、40 転送制御部、
42 モニタ部、44 制御信号生成部、50 SATAI/F、
52 シャドウ・タスクファイル・レジスタ(SFR)、70 データバッファ、
72 メモリコントローラ、74 FIFOメモリ、
110 トランスポートコントローラ、118 割りこみコントローラ、
120 送信FIFO、122 受信FIFO、130 FIS生成回路、
132 FISデコード回路、150 リンクコントローラ、
160 リンクステート制御回路、190 フレーム生成回路、
192 フレームデコード回路、200 物理層回路、210 トランスミッタ、
220 レシーバ、230 OOB検出回路
2 hosts, 4 devices, 10 PATA I / F,
12 Task file register (TFR), 14 Transfer controller,
30 sequence controller, 32 register update unit,
34 initialization sequence management unit, 36 parameter rewriting unit,
38 DMA transfer setting storage unit, 40 transfer control unit,
42 monitor unit, 44 control signal generation unit, 50 SATA I / F,
52 shadow task file register (SFR), 70 data buffer,
72 memory controller, 74 FIFO memory,
110 Transport controller, 118 Interrupt controller,
120 transmission FIFO, 122 reception FIFO, 130 FIS generation circuit,
132 FIS decoding circuit, 150 link controller,
160 link state control circuit, 190 frame generation circuit,
192 frame decoding circuit, 200 physical layer circuit, 210 transmitter,
220 receiver, 230 OOB detection circuit

Claims (9)

パラレルATAとシリアルATAのバスブリッジ機能を有するデータ転送制御装置であって、
パラレルATAバスに接続され、ホストとの間のインターフェースを行うパラレルATAインターフェースと、
シリアルATAバスに接続され、シリアルATAのデバイスとの間のインターフェースを行うシリアルATAインターフェースと、
転送シーケンス制御を行うシーケンスコントローラを含み、
前記パラレルATAインターフェースは、タスクファイル・レジスタを有し、
前記シーケンスコントローラは、
ハードリセット後、前記タスクファイル・レジスタのステータスレジスタのビジービットをセットして、前記シリアルATAバス側でのデバイス存在検知期間の経過をウェイトし、前記デバイス存在検知期間が経過した後に、前記シリアルATAの前記デバイスが非存在であることが検知された場合には、前記タスクファイル・レジスタの前記ステータスレジスタにデバイス非存在コードを設定することを特徴とするデータ転送制御装置。
A data transfer control device having a parallel ATA and serial ATA bus bridge function,
A parallel ATA interface connected to the parallel ATA bus for interfacing with the host;
A serial ATA interface connected to the serial ATA bus for interfacing with serial ATA devices;
Includes a sequence controller that performs transfer sequence control,
The parallel ATA interface has a task file register,
The sequence controller is
After the hard reset, the busy bit of the status register of the task file register is set, the elapse of the device presence detection period on the serial ATA bus side is waited, and after the device presence detection period elapses, the serial ATA When it is detected that the device is non-existent, a device non-existence code is set in the status register of the task file register.
請求項1において、
前記シーケンスコントローラは、
前記デバイス存在検知期間において、前記シリアルATAインターフェスから出力されるデバイス検知信号をモニタし、前記デバイス存在検知期間内に前記デバイス検知信号がアクティブにならなかった場合に、前記タスクファイル・レジスタの前記ステータスレジスタに前記デバイス非存在コードを設定することを特徴とするデータ転送制御装置。
In claim 1,
The sequence controller is
In the device presence detection period, a device detection signal output from the serial ATA interface is monitored, and when the device detection signal is not activated within the device presence detection period, the task file register A data transfer control device, wherein the device non-existence code is set in a status register.
請求項1又は2において、
前記シリアルATAインターフェースは、
前記タスクファイル・レジスタとの間でレジスタ値が転送されるシャドウ・タスクファイル・レジスタを含み、
前記シーケンスコントローラは、
前記タスクファイル・レジスタと前記シャドウ・タスクファイル・レジスタとの間でレジスタ値の転送処理を行うことを特徴とするデータ転送制御装置。
In claim 1 or 2,
The serial ATA interface is
A shadow task file register in which register values are transferred to and from the task file register;
The sequence controller is
A data transfer control device that performs transfer processing of a register value between the task file register and the shadow task file register.
請求項3において、
前記シーケンスコントローラは、
前記タスクファイル・レジスタのステータスレジスタに前記デバイス非存在コードが設定された場合には、ホストによりATAコマンドが発行された場合にも、前記タスクファイル・レジスタから前記シャドウ・タスクファイル・レジスタへのレジスタ値の転送処理を非実行にすることを特徴とするデータ転送制御装置。
In claim 3,
The sequence controller is
When the device nonexistence code is set in the status register of the task file register, the register from the task file register to the shadow task file register even when an ATA command is issued by the host A data transfer control device characterized in that a value transfer process is not executed.
請求項1乃至4のいずれかにおいて、
初期化シーケンス管理機能を有しない前記シリアルATAの前記デバイスに代わって初期化シーケンス管理を代行する初期化シーケンス管理部を含み、
前記初期化シーケンス管理部は、
前記デバイス存在検知期間内に前記デバイスの存在が検知された場合に、初期化シーケンス処理を実行することを特徴とするデータ転送制御装置。
In any one of Claims 1 thru | or 4,
An initialization sequence management unit that performs initialization sequence management on behalf of the device of the serial ATA that does not have an initialization sequence management function;
The initialization sequence management unit
A data transfer control device that performs initialization sequence processing when the presence of the device is detected within the device presence detection period.
請求項5において、
前記初期化シーケンス管理部は、
マスタ・スレーブ設定端子によりデータ転送制御装置がマスタ側に設定された場合には、ハードリセット後にスレーブ検知処理と自己診断処理を行い、前記マスタ・スレーブ設定端子によりデータ転送制御装置がスレーブ側に設定された場合には、ハードリセット後にスレーブ検知信号、自己診断信号の制御を行うことを特徴とするデータ転送制御装置。
In claim 5,
The initialization sequence management unit
When the data transfer control device is set on the master side using the master / slave setting terminal, slave detection processing and self-diagnosis processing are performed after a hard reset, and the data transfer control device is set on the slave side using the master / slave setting terminal. If so, a data transfer control device that controls the slave detection signal and the self-diagnosis signal after a hard reset.
請求項6において、
前記シリアルATAインターフェースは、
前記タスクファイル・レジスタとの間でレジスタ値が転送されるシャドウ・タスクファイル・レジスタを含み、
前記シーケンスコントローラは、
データ転送制御装置がマスタ側に設定されているときに、前記ホストがマスタへのATAコマンドを発行した場合には、前記タスクファイル・レジスタのレジスタ値をそのまま前記シャドウ・タスクファイル・レジスタに転送し、
データ転送制御装置がスレーブ側に設定されているときに、前記ホストがスレーブへのATAコマンドを発行した場合には、前記タスクファイル・レジスタのデバイス/ヘッドレジスタのDEVビットをマスタ設定に書き換えて前記タスクファイル・レジスタのレジスタ値を前記シャドウ・タスクファイル・レジスタに転送することを特徴とするデータ転送制御装置。
In claim 6,
The serial ATA interface is
A shadow task file register in which register values are transferred to and from the task file register;
The sequence controller is
If the host issues an ATA command to the master when the data transfer control device is set to the master side, the register value of the task file register is transferred to the shadow task file register as it is. ,
When the host issues an ATA command to the slave when the data transfer control device is set to the slave side, the DEV bit of the device / head register of the task file register is rewritten to the master setting and the A data transfer control device for transferring a register value of a task file register to the shadow task file register.
請求項7において、
前記シーケンスコントローラは、
データ転送制御装置がマスタ側に設定されているときに、前記ホストからのATAコマンドに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合には、前記シャドウ・タスクファイル・レジスタのレジスタ値を前記タスクファイル・レジスタにそのままに転送し、
データ転送制御装置がスレーブ側に設定されているときに、前記ホストからのATAコマンドに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合には、前記シャドウ・タスクファイル・レジスタのデバイス/ヘッドレジスタのDEVビットをスレーブ設定に書き換えて前記シャドウ・タスクファイル・レジスタのレジスタ値を前記タスクファイル・レジスタに転送することを特徴とするデータ転送制御装置。
In claim 7,
The sequence controller is
When the data transfer control device is set to the master side and the FIS corresponding to the ATA command from the host is received from the device by the serial ATA interface, the register value of the shadow task file register Is transferred to the task file register as it is,
If the serial ATA interface receives an FIS corresponding to an ATA command from the host from the device when the data transfer control device is set to the slave side, the device / A data transfer control device comprising: rewriting a DEV bit of a head register to a slave setting and transferring a register value of the shadow task file register to the task file register.
請求項1乃至8のいずれかに記載のデータ転送制御装置と、
前記データ転送制御装置に接続される前記ホストと、
前記データ転送制御装置に接続される前記デバイスと、
を含むことを特徴とする電子機器。
A data transfer control device according to any one of claims 1 to 8,
The host connected to the data transfer control device;
The device connected to the data transfer control device;
An electronic device comprising:
JP2007202009A 2007-08-02 2007-08-02 Data transfer control device and electronic device Pending JP2009037474A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007202009A JP2009037474A (en) 2007-08-02 2007-08-02 Data transfer control device and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007202009A JP2009037474A (en) 2007-08-02 2007-08-02 Data transfer control device and electronic device

Publications (1)

Publication Number Publication Date
JP2009037474A true JP2009037474A (en) 2009-02-19

Family

ID=40439308

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007202009A Pending JP2009037474A (en) 2007-08-02 2007-08-02 Data transfer control device and electronic device

Country Status (1)

Country Link
JP (1) JP2009037474A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011191955A (en) * 2010-03-12 2011-09-29 Toshiba Corp Communication apparatus and communication method
JP2012063913A (en) * 2010-09-15 2012-03-29 Ricoh Co Ltd Serial communication system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011191955A (en) * 2010-03-12 2011-09-29 Toshiba Corp Communication apparatus and communication method
US8443113B2 (en) 2010-03-12 2013-05-14 Kabushiki Kaisha Toshiba Communication apparatus
JP2012063913A (en) * 2010-09-15 2012-03-29 Ricoh Co Ltd Serial communication system

Similar Documents

Publication Publication Date Title
JP6243469B2 (en) Provision of low power physical unit to load / store communication protocol
US7739419B2 (en) Data transfer control device and electronic instrument
US8478916B2 (en) SATA mass storage device emulation on a PCIe interface
JP5252292B2 (en) Interface device and electronic device
JP3636157B2 (en) Data transfer control device, electronic device, and data transfer control method
US20110320706A1 (en) Storage apparatus and method for controlling the same
JP3870717B2 (en) Data transfer control device and electronic device
JP2012515400A (en) System, apparatus and method for fast startup of USB devices
JP2004070571A (en) Data transfer control system, electronic equipment, program and data transfer control method
JP2019047146A (en) Electronic equipment and power management method
JP4434218B2 (en) Data transfer control device and electronic device
JP3636158B2 (en) Data transfer control device and electronic device
JP3599048B2 (en) Data transfer control system, electronic device, program, and data transfer control method
JP2008242701A (en) Data transfer controller and electronic device
WO2013114398A2 (en) Fpga system for usb bridge implementation
US7428600B2 (en) Data transfer control device, electronic equipment, and data transfer control method
JP2009037474A (en) Data transfer control device and electronic device
JP2007233998A (en) Data transfer control device and electronic apparatus
JP2009048444A (en) Control method of usb device, controller and electronic equipment
JP3714420B2 (en) DATA TRANSFER CONTROL DEVICE, ELECTRONIC DEVICE, PROGRAM, AND ELECTRONIC DEVICE MANUFACTURING METHOD
JP2009037479A (en) Data transfer control device and electronic device
JP2008204048A (en) Data transfer control device and electronic device
JP2008204050A (en) Data transfer control device and electronic device
JP2009032011A (en) Data transfer control device and electronic device
Anderson et al. USB 3.0 Technology