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

Data transfer control device and electronic device Download PDF

Info

Publication number
JP2009037479A
JP2009037479A JP2007202055A JP2007202055A JP2009037479A JP 2009037479 A JP2009037479 A JP 2009037479A JP 2007202055 A JP2007202055 A JP 2007202055A JP 2007202055 A JP2007202055 A JP 2007202055A JP 2009037479 A JP2009037479 A JP 2009037479A
Authority
JP
Japan
Prior art keywords
data
register
host
data transfer
control device
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
JP2007202055A
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 JP2007202055A priority Critical patent/JP2009037479A/en
Publication of JP2009037479A publication Critical patent/JP2009037479A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)
  • Bus Control (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To appropriately keep even transfer compliance between a host and a serial ATA (AT attachment) device, while achieving a bridge function of a parallel ATA and a serial ATA. <P>SOLUTION: The data transfer control device includes a PATAI/F (parallel AT attachment interface) 10; an SATAI/F (serial AT attachment interface) 50; and a sequence controller 30. The PATAI/F 10 includes the task file register TFR 12. When the host 2 issues an identify device command, the SATAI/F 50 transmits a register FIS corresponding to the command to the device 5. When data FIS where identify device information being the return value of the identify device command is set is received, the sequence controller 30 rewrites the identify device information. <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.

ところで、ATAのホストは、デバイスの特性パラメータを知るために、アイデンティファイ・デバイス・コマンド(Identify Device Command)をデバイスに対して発行する。そしてデバイスからの各種情報を取得した後に、ホストとデバイスとの間のデータ転送速度やその他のやり取りについて決定して、データ転送を実行する。   Incidentally, the ATA host issues an identify device command to the device in order to know the device characteristic parameters. Then, after acquiring various information from the device, the data transfer speed and other exchanges between the host and the device are determined and data transfer is executed.

しかしながら、SATAデバイスはPATAデバイスに比べて高速に動作する。従って、ブリッジ機能を有するデータ転送制御装置にSATAデバイスをブリッジ接続した場合に、SATAデバイスが、ホストから発行されたアイデンティファイ・デバイス・コマンド(アイデンティファイ・パケット・デバイス・コマンド)に対して、データ転送制御装置のハードウェア能力以上の特性パラメータを返す可能性がある。そしてこの場合には、ホストとSATAデバイスとの間に、データ転送制御装置が介在することで、両者の転送の整合性が取れなくなるおそれがある。
特開2005−346123号公報 特開2006−121621号公報 特開2006−18428号公報
However, SATA devices operate faster than PATA devices. Therefore, when a SATA device is bridge-connected to a data transfer control device having a bridge function, the SATA device responds to an identified device command (identified packet device command) issued from the host. There is a possibility of returning a characteristic parameter exceeding the hardware capability of the data transfer control device. In this case, since the data transfer control device is interposed between the host and the SATA device, the transfer consistency between the two may not be achieved.
JP-A-2005-346123 JP 2006-121621 A JP 2006-18428 A

本発明は、以上のような課題に鑑みてなされたものであり、本発明に係る幾つかの態様によれば、パラレルATAとシリアルATAのバスブリッジ機能を実現しながらホストとシリアルATAデバイスとの間の転送の整合性についても適正に維持できる。   The present invention has been made in view of the above problems. According to some aspects of the present invention, a host and a serial ATA device can be connected to each other while realizing a bus bridge function of parallel ATA and serial ATA. It is also possible to properly maintain the consistency of transfer between.

本発明は、パラレルATAとシリアルATAのバスブリッジ機能を有するデータ転送制御装置であって、パラレルATAバスに接続され、ホストとの間のインターフェースを行うパラレルATAインターフェースと、シリアルATAバスに接続され、シリアルATAのデバイスとの間のインターフェースを行うシリアルATAインターフェースと、転送シーケンス制御を行うシーケンスコントローラを含み、前記パラレルATAインターフェースは、タスクファイル・レジスタを有し、前記シリアルATAインターフェースは、前記ホストによりアイデンティファイ・デバイス・コマンドが発行された場合に、前記アイデンティファイ・デバイス・コマンドに対応するレジスタFISを前記シリアルATAの前記デバイスに送信し、前記シーケンスコントローラは、前記アイデンティファイ・デバイス・コマンドの返値であるアイデンティファイ・デバイス情報が設定されたデータFISを、前記シリアル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. The serial ATA interface is identified by the host. When a proof device command is issued, a register FIS corresponding to the identify device command is transmitted to the device of the serial ATA, and the When the serial ATA interface receives the data FIS in which the identified device information, which is a return value of the identified device command, is received by the serial ATA interface, the instance controller rewrites the identified device information. The present invention relates to a data transfer control device that performs processing.

本発明によれば、ホストがアイデンティファイ・デバイス・コマンドを発行すると、アイデンティファイ・デバイス・コマンドに対応するレジスタFISがシリアルATAのデバイスに送信される。そしてアイデンティファイ・デバイス情報が設定されたデータFISをデバイスから受信すると、アイデンティファイ・デバイス情報の書き換え処理が行われる。そして書き換え後のアイデンティファイ・デバイス情報は、例えばタスクファイル・レジスタのデータレジスタに設定されて、ホストに知らされる。このようにすれば、パラレルATAとシリアルATAのバスブリッジ機能を実現しながらホストとシリアルATAデバイスとの間の転送の整合性についても適正化できる。   According to the present invention, when the host issues an identify device command, a register FIS corresponding to the identify device command is transmitted to the device of the serial ATA. When the data FIS in which the identified device information is set is received from the device, rewriting processing of the identified device information is performed. The rewritten identification device information is set in the data register of the task file register, for example, and is notified to the host. In this way, it is possible to optimize transfer consistency between the host and the serial ATA device while realizing a bus bridge function of parallel ATA and serial ATA.

また本発明では、前記ホスト、前記デバイス間で転送されるデータのバッファリングを行うデータバッファを含み、前記シーケンスコントローラは、前記データバッファに、前記アイデンティファイ・デバイス情報が書き込まれた後、書き込まれた前記アイデンティファイ・デバイス情報を読み出し、読み出された前記アイデンティファイ・デバイス情報の書き換え処理を行って、前記データバッファに書き戻してもよい。   The present invention further includes a data buffer for buffering data transferred between the host and the device, and the sequence controller writes the identifier device information after the identifier device information is written to the data buffer. The identified device information may be read out, the read-out identification device information may be rewritten, and written back to the data buffer.

このようにすれば、データバッファに書き込まれたアイデンティファイ・デバイス情報の中から、書き換えが必要な情報だけを抽出して書き換え処理を行うことが可能になる。   In this way, it is possible to perform rewrite processing by extracting only the information that needs to be rewritten from the identified device information written in the data buffer.

また本発明では、前記シーケンスコントローラは、前記デバイスからシリアルATA側でのPIOリード転送のPIOセットアップFISを受信した後、PIOリード転送のデータFISを受信した場合に、前記アイデンティファイ・デバイス情報として、1セクタ分のリードデータが前記データバッファに書き込まれるまでウェイトし、1セクタ分の前記リードデータが前記データバッファに書き込まれた後に、前記リードデータである前記アイデンティファイ・デバイス情報の書き換え処理を行い、その後に前記タスクファイル・レジスタのステータスレジスタのビジービットをクリアすると共にデータリクエストビットをセットしてもよい。   In the present invention, the sequence controller receives the PIO setup transfer FIS for PIO read transfer on the serial ATA side from the device and then receives the data FIS for PIO read transfer as the identified device information. Wait until the read data for one sector is written in the data buffer, and after the read data for one sector is written in the data buffer, the rewrite processing of the identified device information that is the read data After that, the busy bit of the status register of the task file register may be cleared and the data request bit may be set.

このようにすれば、1セクタ分のリードデータがデータバッファに書き込まれて、アイデンティファイ・デバイス情報の書き換え処理が完了しない限り、ホストからのデータリクエストが行われないようになり、適正な書き換え処理を実現できる。   In this way, the read request for one sector is written to the data buffer, and the data request from the host is not performed unless the rewrite processing of the identification device information is completed. Processing can be realized.

また本発明では、前記シーケンスコントローラは、前記タスクファイル・レジスタの前記ステータスレジスタのビットを設定した後に、前記パラレルATAインターフェースに対してパラレルATA側でのPIOリード転送の開始を指示してもよい。   In the present invention, the sequence controller may instruct the parallel ATA interface to start PIO read transfer on the parallel ATA side after setting the status register bit of the task file register.

このようにすれば、PIOリード転送の開始指示時には、確実に転送すべきデータが存在していることになり、転送開始が指示されたものの転送すべきデータが存在しないという事態を防止できる。   In this way, when the PIO read transfer start instruction is given, there is data to be transferred reliably, and it is possible to prevent a situation in which there is no data to be transferred although transfer start is instructed.

また本発明では、前記パラレルATAインターフェースは、前記リードデータがバッファリングされるパラレルATA用データバッファを有し、前記タスクファイル・レジスタの前記ステータスレジスタのビットが設定された場合に非アクティブになり、書き換え後の前記アイデンティファイ・デバイス情報であるリードデータが前記パラレルATA用データバッファに蓄積された場合にアクティブになるIORDY信号を生成してもよい。   According to the present invention, the parallel ATA interface has a parallel ATA data buffer in which the read data is buffered, and becomes inactive when a bit of the status register of the task file register is set, An IORDY signal that becomes active when read data that is the device information after rewriting is stored in the data buffer for parallel ATA may be generated.

このようにすれば、転送を開始したものの、転送すべきデータが存在せず、IORDY信号によりホストが無駄に待たされてしまい、IORDY信号のアサートタイミング違反が発生してしまう事態を防止できる。   By doing so, it is possible to prevent a situation in which there is no data to be transferred but there is no data to be transferred and the host is unnecessarily waited for by the IORDY signal, and an IORDY signal assert timing violation occurs.

また本発明では、前記シーケンスコントローラは、前記書き換え処理として、前記アイデンティファイ・デバイス情報のIORDYパラメータの書き替え処理を行ってもよい。   In the present invention, the sequence controller may perform an IORDY parameter rewrite process of the identified device information as the rewrite process.

このようにすれば、IORDY信号の適正な制御を実現できる。   In this way, proper control of the IORDY signal can be realized.

また本発明では、前記シーケンスコントローラは、前記書き換え処理として、前記アイデンティファイ・デバイス情報の転送能力パラメータを、データ転送制御装置の転送能力に応じたパラメータに書き替える処理を行ってもよい。   In the present invention, the sequence controller may perform a process of rewriting the transfer capability parameter of the identified device information to a parameter corresponding to the transfer capability of the data transfer control device as the rewrite process.

このようにすれば、データ転送制御装置の転送能力に応じた適正なデータ転送制御を実行できる。   In this way, appropriate data transfer control according to the transfer capability of the data transfer control device can be executed.

また本発明では、初期化シーケンス管理機能を有しない前記シリアル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 a master / slave setting terminal When the data transfer control device is set on the master side by the slave detection processing and self-diagnosis processing after hard reset, and when the data transfer control device is set on the slave side by the master / 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.

また本発明では、前記シーケンスコントローラは、前記書き換え処理として、スレーブ検知結果、自己診断結果を前記ホストに通知するための書き替え処理を行ってもよい。   In the present invention, the sequence controller may perform a rewrite process for notifying the host of a slave detection result and a self-diagnosis result as the rewrite process.

このようにすれば、初期化シーケンス管理を代行した場合にも、スレーブ検知結果や自己診断結果を適正にホストに通知できる。   In this way, the slave detection result and self-diagnosis result can be appropriately notified to the host even when the initialization sequence management is performed.

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

また本発明では、前記シーケンスコントローラは、前記書き換え処理として、前記アイデンティファイ・デバイス情報のチェックサムパラメータを無効設定に書き替える処理を行ってもよい。   In the present invention, the sequence controller may perform a process of rewriting the checksum parameter of the identified device information to an invalid setting as the rewriting process.

このようにすれば、アイデンティファイ・デバイス情報が書き換えられることで、誤ったチェックサム結果がホストに通知されるのを防止できる。   In this way, it is possible to prevent an incorrect checksum result from being notified to the host by rewriting the identified device information.

また本発明では、前記シリアルATAインターフェースは、前記パラレルATAバスを介して前記ホストがATAコマンドを発行した場合に、発行された前記ATAコマンドを含むレジスタFISを前記シリアルATAバスを介して前記デバイスに送信し、前記シーケンスコントローラは、前記レジスタFISに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合に、前記ホストから発行された前記ATAコマンドの転送シーケンス制御として、受信したFISの種類に応じた転送シーケンス制御を行うと共に、前記ホストから発行された前記ATAコマンドが前記アイデンティファイ・デバイス・コマンドであった場合には、前記アイデンティファイ・デバイス情報が設定されたデータFISを受信したときに、前記アイデンティファイ・デバイス・コマンドに対応する転送シーケンス制御を行ってもよい。   In the present invention, when the host issues an ATA command via the parallel ATA bus, the serial ATA interface sends a register FIS including the issued ATA command to the device via the serial ATA bus. When the serial ATA interface receives the FIS corresponding to the register FIS from the device, the sequence controller sets the received FIS type as the transfer sequence control of the ATA command issued from the host. In response to the transfer sequence control according to the command, if the ATA command issued from the host is the identified device command, the data FIS in which the identified device information is set is received. Occasionally, you may be subjected to transfer sequence control corresponding to the identify device command.

このようにすれば、データ転送制御装置は、ホストが発行したATAコマンドの詳細な内容をデコードすることなく、ATAコマンドを含むレジスタFISをそのままデバイスに送信できる。そしてレジスタFISに対してデバイスが返却して来たFISの種類によって、転送シーケンスが制御される。従って、ATAコマンドのデコーダ回路を節約でき、データ転送制御装置の小規模化を図れる。また、新規コマンドの追加が発生しても、これに容易に対応できるようになる。またアイデンティファイ・デバイス・コマンドに応じた適正な転送シーケンス制御を実現できるため、パラレルATAとシリアルATAのバスブリッジ機能を実現しながらホストとシリアルATAのデバイスとの間の転送の整合性についても適正に維持できる。   In this way, the data transfer control device can directly transmit the register FIS including the ATA command to the device without decoding the detailed contents of the ATA command issued by the host. The transfer sequence is controlled by the type of FIS returned by the device to the register FIS. Therefore, the decoder circuit for the ATA command can be saved, and the data transfer control device can be reduced in size. In addition, even if a new command is added, this can be easily handled. In addition, since proper transfer sequence control according to the identify device command can be realized, the consistency of transfer between the host and the serial ATA device is realized while realizing the bus bridge function of the parallel ATA and the serial ATA. It can be maintained properly.

また本発明は、上記のいずれかに記載のデータ転送制御装置と、前記データ転送制御装置に接続される前記ホストと、前記データ転送制御装置に接続される前記デバイスとを含む電子機器に関係する。   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(A)、図1(B)に本実施形態のデータ転送制御装置の構成例を示す。このデータ転送制御装置はPATA(Parallel AT Attachment)とSATA(Serial AT Attachment)のバスブリッジ機能を有する。
1. Configuration of Data Transfer Control Device FIGS. 1A and 1B show a configuration example of the data transfer control device of this embodiment. This data transfer control device has a PATA (Parallel AT Attachment) and SATA (Serial AT Attachment) bus bridge function.

なお本実施形態のデータ転送制御装置は図1(A)、図1(B)の構成に限定されず、その構成要素の一部(例えばデータバッファ)を省略したり、他の構成要素(例えば外部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 FIGS. 1A and 1B, and some of the components (for example, a data buffer) may be omitted or other components (for example, Various modifications such as addition of an external I / F circuit, a CPU, and a timer 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(A)、図1(B)の構成によれば、ホスト2がPATAI/Fしか備えていない場合にも、SATAI/Fを有するデバイス4をデータ転送制御装置を介してホスト2に接続できる。従って、ホスト2のファームウェア、ソフトウェアとして、既存のPATA(IDE)用のファームウェア、ソフトウェアを使用できる。これにより電子機器の開発期間の短縮化や低コスト化を図れる。またデバイス4として、市場供給量が多い大容量のHDDをホスト2に接続できるようになり、電子機器の内蔵HDDの大容量化を図れる。   1A and 1B, even when the host 2 has only the PATA I / F, the device 4 having the SATA I / F is connected to the host 2 through the data transfer control device. it can. 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(A)に示すように、SATAI/F50は、ホスト2によりアイデンティファイ・デバイス・コマンド(Identify Device Command)が発行された場合に、アイデンティファイ・デバイス・コマンドに対応するレジスタFISをSATAのデバイス4に送信する。   In the embodiment, as shown in FIG. 1A, the SATA I / F 50 corresponds to the identify device command when the host 2 issues an identify device command. Register FIS to be transmitted to the SATA device 4.

そして図1(B)に示すように、SATAI/F50は、アイデンティファイ・デバイス・コマンド(ATAPIにおけるアイデンティファイ・パケット・デバイス・コマンドを含む)の返値であるアイデンティファイ・デバイス情報が設定されたデータFISを、デバイス4から受信する。   As shown in FIG. 1 (B), the SATA I / F 50 includes the identification device information which is a return value of the identification device command (including the identification packet device command in ATAPI). The set data FIS is received from the device 4.

するとシーケンスコントローラ30は、受信したデータFISに設定されたアイデンティファイ・デバイス情報の書き換え処理を行う。この書き換え処理は、例えばシーケンスコントローラ30が有するパラメータ書き換え部36により行われる。   Then, the sequence controller 30 performs rewriting processing of the identified device information set in the received data FIS. This rewriting process is performed by, for example, the parameter rewriting unit 36 included in the sequence controller 30.

そしてシーケンスコントローラ30は、書き換え後のアイデンティファイ・デバイス情報を、TFR12のデータレジスタに設定する。これによりホスト2には、デバイス4の特性パラメータ等として、書き換え後のアイデンティファイ・デバイス情報が通知されるようになる。   Then, the sequence controller 30 sets the identified device information after rewriting in the data register of the TFR 12. As a result, the rewritten identified device information is notified to the host 2 as the characteristic parameter of the device 4.

例えば高速に動作するSATAのデバイス4は、ホスト2が発行したアイデンティファイ・デバイス・コマンドの返値として、データ転送制御装置(LSI)のハードウェア能力以上の特性パラメータを返す場合がある。このような場合にも、本実施形態によれば、シーケンスコントローラ30によりデバイス4の特性パラメータ等の書き換え処理が行われるため、ホスト2とデバイス4の間のデータ転送の整合性が取れなくなる事態を防止できる。   For example, the SATA device 4 that operates at high speed may return a characteristic parameter that exceeds the hardware capability of the data transfer control device (LSI) as a return value of the identify device command issued by the host 2. Even in such a case, according to the present embodiment, the sequence controller 30 rewrites the characteristic parameters of the device 4 and the like, so that the consistency of data transfer between the host 2 and the device 4 cannot be achieved. Can be prevented.

なお図1(A)、図1(B)では、シーケンスコントローラ30が、初期化シーケンス管理機能を有しないSATAのデバイス4に代わって初期化シーケンス管理を代行する初期化シーケンス管理部34を含む。そして初期化シーケンス管理部34は、ハードリセット(ハードウェアリセット)等の後に初期化シーケンス処理を実行する。   1A and 1B, 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. Then, the initialization sequence management unit 34 executes an initialization sequence process after a hardware reset (hardware reset) or the like.

例えば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(A)、図1(B)では初期化シーケンス管理部34が、初期化シーケンス管理機能を有しないSATAのデバイス4に代わって初期化シーケンス管理を代行して、初期化シーケンス処理を実行する。従って、ホスト2上で動作するドライバソフトウェアは、マスタ、スレーブの区別の概念の無いSATAのデバイス4を、マスタ、スレーブの区別が可能なPATAのデバイスのように扱うことが可能になり、利便性を向上できる。   In this regard, in FIGS. 1A and 1B, the initialization sequence management unit 34 performs initialization sequence management on behalf of the SATA device 4 that does not have the initialization sequence management function. Execute the process. 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.アイデンティファイ・デバイス情報の書き換え
次に本実施形態のアイデンティファイ・デバイス情報の書き換え手法について詳細に説明する。
5). Rewriting the Identified Device Information Next, the method for rewriting the identified device information according to the present embodiment will be described in detail.

5.1 構成
図9に本実施形態のアイデンティファイ・デバイス情報の書き換え手法を実現するデータ転送制御装置の具体的な構成例を示す。
5.1 Configuration FIG. 9 shows a specific configuration example of a data transfer control device that realizes the method of rewriting the identified device information according to the present embodiment.

図9においてホスト2がアイデンティファイ・デバイス・コマンドを発行して、TFR12のコマンドレジスタ(図7のATA Command)に書き込まれると、書き込まれたコマンドやそのパラメータなどのレジスタ値が、TFR12からシーケンスコントローラ30を介してSFR52に転送される。この場合にシーケンスコントローラ30は、ATAコマンドのうちアイデンティファイ・デバイス・コマンドについてはデコードして解析し、アイデンティファイ・デバイス・コマンドが発行されたことを記憶しておく。   9, when the host 2 issues an identify device command and is written to the command register of the TFR 12 (ATA Command in FIG. 7), the written command and its register values such as parameters are sequenced from the TFR 12. The data is transferred to the SFR 52 via the controller 30. In this case, the sequence controller 30 decodes and analyzes the identified device command of the ATA commands, and stores that the identified device command has been issued.

即ち後述するように本実施形態では、ホスト2がTFR12に対してコマンドパラメータを書き込んだ後にATAコマンドを発行すると、そのコマンドライトを検出して、書き込まれたATAコマンドをデコードすることなく、TFR12のレジスタ値をそのままSFR52に転送(コピー)する。そしてデバイス4から返ってくるFISの種類を判別して、その後の転送シーケンスを制御する手法を採用している。このような手法を採用することで、ATAのコマンドデコード回路を節約でき、処理の簡素化や回路の小規模化を図れる。   That is, as described later, in the present embodiment, when the host 2 issues an ATA command after writing a command parameter to the TFR 12, the command write is detected, and the written ATA command is not decoded. The register value is transferred (copied) to the SFR 52 as it is. A method of discriminating the type of FIS returned from the device 4 and controlling the subsequent transfer sequence is adopted. By adopting such a method, it is possible to save the ATA command decoding circuit, simplify the processing, and reduce the circuit scale.

しかしながら本実施形態では、アイデンティファイ・デバイス・コマンドについては、上記手法の例外として、発行されたコマンドをデコードして判別する。そしてアイデンティファイ・デバイス・コマンドが発行されたことを記憶しておき、その後の転送シーケンス制御を実行する。即ちホスト2から発行されたATAコマンドがアイデンティファイ・デバイス・コマンドであった場合には、アイデンティファイ・デバイス情報が設定されたデータFISを受信したときに、アイデンティファイ・デバイス・コマンドに対応する転送シーケンス制御を行う。このようにすれば、アイデンティファイ・デバイス・コマンド以外のコマンドについてはデコードしないことで、コマンドデコード回路の節約を図りながら、アイデンティファイ・デバイス情報の適正な書き換え処理を実現できる。   However, in the present embodiment, the issued device command is determined by decoding the issued command as an exception to the above method. Then, the fact that the identify device command has been issued is stored, and the subsequent transfer sequence control is executed. In other words, when the ATA command issued from the host 2 is an identified device command, when the data FIS in which the identified device information is set is received, the identified device command is changed to the identified device command. Perform the corresponding transfer sequence control. In this way, it is possible to realize proper rewriting processing of the identification device information while saving the command decoding circuit by not decoding commands other than the identification device command.

ホスト2によりアイデンティファイ・デバイス・コマンドが発行されて、TFR12からSFR52にレジスタ値が転送されると、SATAI/F50は、SFR52のレジスタ値に基づいて、アイデンティファイ・デバイス・コマンドに対応するレジスタFIS(図8(A)参照)を生成して、デバイス4に送信し、PIOリードのデータ転送を実行する。   When the identify device command is issued by the host 2 and the register value is transferred from the TFR 12 to the SFR 52, the SATA I / F 50 corresponds to the identify device command based on the register value of the SFR 52. A register FIS (see FIG. 8A) is generated and transmitted to the device 4, and data transfer of PIO read is executed.

すると、このレジスタFISを受信したデバイス4は、PIOセットアップFISの送信後に、アイデンティファイ・デバイス・コマンドの返値であるアイデンティファイ・デバイス情報が設定されたデータFISを送信する。即ちPIOセットアップFIS及びデータFISにより構成されるPIOリードのユニット転送が行われる。そしてSATAI/F50が、これらのPIOセットアップFIS、データFISを受信する。   Then, after transmitting the PIO setup FIS, the device 4 receiving this register FIS transmits the data FIS in which the identified device information, which is the return value of the identified device command, is set. That is, the unit transfer of the PIO read constituted by the PIO setup FIS and the data FIS is performed. The SATA I / F 50 receives these PIO setup FIS and data FIS.

この場合にPIOセットアップFISに設定されたステータス等のレジスタ値は、SFR52からシーケンスコントローラ30を介してTFR12に転送(コピー)される。   In this case, register values such as status set in the PIO setup FIS are transferred (copied) from the SFR 52 to the TFR 12 via the sequence controller 30.

一方、データFISに設定されたアイデンティファイ・デバイス情報は、SATAI/F50から出力されて、データバッファ70(FIFOメモリ70)に書き込まれる。   On the other hand, the identified device information set in the data FIS is output from the SATA I / F 50 and written in the data buffer 70 (FIFO memory 70).

そしてシーケンスコントローラ30は、アイデンティファイ・デバイス情報が設定されたデータFISを受信すると、アイデンティファイ・デバイス情報の書き換え処理を行う。そして書き換え後のアイデンティファイ・デバイス情報はTFR12のデータレジスタに設定される。   When the sequence controller 30 receives the data FIS in which the identified device information is set, the sequence controller 30 performs rewriting processing of the identified device information. The rewritten identification device information is set in the data register of the TFR 12.

具体的にはシーケンスコントローラ30は、データバッファ70に、アイデンティファイ・デバイス情報が書き込まれた後、書き込まれたアイデンティファイ・デバイス情報をデータバッファ70から読み出す。そして読み出されたアイデンティファイ・デバイス情報の書き換え処理を行って、データバッファ70に書き戻す。この場合の書き換え処理はシーケンスコントローラ30のパラメータ書き換え部36により行われる。   Specifically, the sequence controller 30 reads the written device information from the data buffer 70 after the written device information is written in the data buffer 70. Then, the read identification device information is rewritten and written back to the data buffer 70. The rewriting process in this case is performed by the parameter rewriting unit 36 of the sequence controller 30.

更に具体的にはシーケンスコントローラ30は、デバイス4からシリアルATA側でのPIOリード転送のPIOセットアップFISを受信した後、PIOリード転送のデータFISを受信した場合に、アイデンティファイ・デバイス情報として、1セクタ分(512バイト)のリードデータがデータバッファ70に書き込まれるまでウェイトする。そして1セクタ分のリードデータがデータバッファ70に書き込まれた後に、TFR12のステータスレジスタ(図7のStatus)のBUSYビットを0にクリアすると共にDRQ(データリクエスト)ビットを1にセットする。即ちステータスレジスタを58hに設定して、ホスト2に対してデータリクエスト状態であることを知らせる。   More specifically, when the sequence controller 30 receives the PIO setup transfer FIS for the PIO read transfer on the serial ATA side from the device 4 and then receives the data FIS for the PIO read transfer, as the identified device information, Wait until read data for one sector (512 bytes) is written to the data buffer 70. After the read data for one sector is written into the data buffer 70, the BUSY bit of the status register (Status in FIG. 7) of the TFR 12 is cleared to 0 and the DRQ (data request) bit is set to 1. In other words, the status register is set to 58h to notify the host 2 that the data request state is present.

そしてシーケンスコントローラ30は、このようにTFR12のステータスレジスタのビットを設定(58h)した後に、PATAI/F10に対してパラレルATA側でのPIOリード転送の開始を指示する。具体的にはPATAI/F10に出力する転送開始指示信号PATATranGoをアクティブ(アサート)にする。   The sequence controller 30 instructs the PATA I / F 10 to start PIO read transfer on the parallel ATA side after setting the bit of the status register of the TFR 12 (58h) in this way. Specifically, the transfer start instruction signal PATATranGo output to the PATA I / F 10 is made active (asserted).

例えばシーケンスコントローラ30は、データバッファ70に1セクタ分のリードデータが蓄積されたか否かを、データバッファ70からの信号FIFORemainに基づいて判断する。また1セクタ分のデータサイズについては、SATAI/F50からの信号FISCountに基づいて判断する。   For example, the sequence controller 30 determines whether or not read data for one sector is accumulated in the data buffer 70 based on the signal FIFOmain from the data buffer 70. The data size for one sector is determined based on the signal FISCount from the SATA I / F 50.

ここで信号FIFORemainは、データバッファ70(FIFOメモリ74)の蓄積データサイズ(残りデータサイズ)を示す信号であり、シーケンスコントローラ30は、この信号FIFORemainを用いて、データバッファ70に蓄積されたデータのサイズを判断する。また信号FISCountは、PIOリード転送のPIOセットアップFISの転送カウント値(図8(C)のTransfer Count)を示す信号(例えば16ビットの信号)であり、シーケンスコントローラ30は、この信号FISCountを用いて、データFISにより転送される1セクタ分のリードデータのサイズを判断する。   Here, the signal FIFOmain is a signal indicating the accumulated data size (remaining data size) of the data buffer 70 (FIFO memory 74), and the sequence controller 30 uses the signal FIFOmain to store the data accumulated in the data buffer 70. Determine the size. The signal FISCount is a signal (for example, a 16-bit signal) indicating a transfer count value (Transfer Count in FIG. 8C) of the PIO setup FIS for PIO read transfer. The sequence controller 30 uses this signal FISCount. The size of the read data for one sector transferred by the data FIS is determined.

そしてシーケンスコントローラ30は、データバッファ70に蓄積されたリードデータのサイズが、1セクタ分のデータサイズ(FISCount)に一致すると(超えると)、蓄積されたリードデータであるアイデンティファイ・デバイス情報をデータバッファ70から読み出す。   Then, when the size of the read data stored in the data buffer 70 matches (exceeds) the data size (FISCount) for one sector, the sequence controller 30 stores the identified device information as the stored read data. Read from the data buffer 70.

具体的にはシーケンスコントローラ30は、アイデンティファイ・デバイス情報のうち、書き換え処理が必要なパラメータを、信号ADDRによりアドレス指定して、信号DINとしてデータバッファ70から読み出す。そしてパラメータ書き換え部36が、読み出されたアイデンティファイ・デバイス情報のパラメータの書き換え処理を行う。そして書き換え後のパラメータを、信号ADDRによりアドレス指定して、信号DOUTとしてデータバッファ70に対して書き戻す。   Specifically, the sequence controller 30 addresses the parameter that needs to be rewritten in the identified device information by the signal ADDR, and reads it from the data buffer 70 as the signal DIN. Then, the parameter rewriting unit 36 rewrites the parameters of the read identified device information. Then, the rewritten parameter is addressed by the signal ADDR and written back to the data buffer 70 as the signal DOUT.

そしてシーケンスコントローラ30は、その後にTFR12のステータスレジスタのBUSYビットを0にクリアすると共にDRQビットを1にセットする。これによりホスト2に対してデータリクエスト状態であることが知らされる。   Subsequently, the sequence controller 30 clears the BUSY bit of the status register of the TFR 12 to 0 and sets the DRQ bit to 1. As a result, the host 2 is informed of the data request state.

次に、シーケンスコントローラ30は、PATAI/F10への転送開始指示信号PATATranGoをアクティブにして、PATAI/F10でのPIOリード転送を起動する。これによりデータバッファ70に蓄積された1セクタ分のリードデータ(書き換え後のアイデンティファイ・デバイス情報)が、PATAI/F10に設けられたPATA用データバッファ16に転送されて書き込まれる。そしてホスト2により、PATA用データバッファ16に書き込まれたリードデータ(書き換え後のアイデンティファイ・デバイス情報)が読み出されることになる。   Next, the sequence controller 30 activates the transfer start instruction signal PATATranGo to the PATA I / F 10 and starts PIO read transfer in the PATA I / F 10. As a result, the read data for one sector (identified device information after rewriting) stored in the data buffer 70 is transferred to and written in the PATA data buffer 16 provided in the PATA I / F 10. Then, the read data (identified device information after rewriting) written in the PATA data buffer 16 is read by the host 2.

本実施形態では、以上のような手法により、アイデンティファイ・デバイス情報の書き換え処理を実現している。このようにすれば、デバイス4からのデータFISに設定されたアイデンティファイ・デバイス情報の中から、書き換えが必要な情報だけを抽出して書き換え処理を行い、書き換え後のアイデンティファイ・デバイス情報をホスト2に転送することが可能になる。   In the present embodiment, the rewriting process of the identified device information is realized by the method as described above. In this way, only the information that needs to be rewritten is extracted from the identified device information set in the data FIS from the device 4, and the rewriting process is performed. Can be transferred to the host 2.

5.2 アイデンティファイ・デバイス情報
次に本実施形態の書き換え処理の対象となるアイデンティファイ・デバイス情報について詳細に説明する。
5.2 IDENTIFIED DEVICE INFORMATION Next, detailed description will be given of identified device information that is a target of the rewrite processing of the present embodiment.

図10にATAのアイデンティファイ・デバイス情報のフォーマットを抜粋して示す。アイデンティファイ・デバイス情報は、256ワード(512バイト)の情報であり、各ワードのビットに対してパラメータが設定されている。   FIG. 10 shows an excerpt of the format of ATA's identified device information. The identified device information is 256 words (512 bytes) of information, and parameters are set for the bits of each word.

例えば図10のE1に示すように、アイデンティファイ・デバイス情報のワード49のビット11、10には、IORDYパラメータが設定される。具体的には、ワード49のビット11を1にセットすると、IORDY信号をサポートする設定になり、ビット10を1にセットすると、IORYD信号を無効(ディスエーブル)にする設定になる。   For example, as indicated by E1 in FIG. 10, the IORDY parameter is set in bits 11 and 10 of the word 49 of the identified device information. Specifically, setting bit 11 of word 49 to 1 sets to support the IORDY signal, and setting bit 10 to 1 sets the IORDY signal to invalid (disabled).

即ちビット11を1にセットすると、ホストとデバイスの間で図3(A)、図3(B)に示すようなIORDY信号を使用したPIO転送を行うことが選択される。一方、ビット10を1にセットすると、IORDY信号を使用しないことが選択される。   That is, when bit 11 is set to 1, it is selected to perform PIO transfer using the IORDY signal as shown in FIGS. 3A and 3B between the host and the device. On the other hand, setting bit 10 to 1 selects not to use the IORDY signal.

そして本実施形態ではデータ転送制御装置は、図3(A)、図3(B)で説明したように、IORDY信号を使用したPIO転送を行うように設計されている。従って、シーケンスコントローラ30(パラメータ書き換え部36)は、アイデンティファイ・デバイス情報のIORDYパラメータを、IORDYをサポートする設定に書き替える。具体的には、デバイス4により、ワード49のビット11が0に設定されていたり、ビット10が1に設定されていた場合にも、ビット11、10を、各々、1、0に書き換える(1、0を上書きする)。なおデバイス4により、ワード49のビット11、10が、元々、1、0に設定されていた場合には、書き換え処理後のワード49のビット11、10も、各々、1、0のままになる。   In this embodiment, the data transfer control device is designed to perform PIO transfer using the IORDY signal as described with reference to FIGS. 3A and 3B. Therefore, the sequence controller 30 (parameter rewriting unit 36) rewrites the IORDY parameter of the identifier device information to a setting that supports IORDY. Specifically, even if bit 11 of word 49 is set to 0 or bit 10 is set to 1 by device 4, bits 11 and 10 are rewritten to 1 and 0, respectively (1 , 0 is overwritten). If the bits 11 and 10 of the word 49 are originally set to 1 and 0 by the device 4, the bits 11 and 10 of the word 49 after the rewriting process remain 1 and 0, respectively. .

また図10のE2に示すように、アイデンティファイ・デバイス情報のワード88のビット6〜0には、転送能力パラメータ(DMAの転送モード)が設定される。具体的にはビット6を1にセットすると、ウルトラDMAモード6以下(ウルトラDMAモード6〜0)をサポートする設定になる。同様に、ビット5、4、3、2、1、0を1にセットすると、各々、ウルトラDMAモード5以下、4以下、3以下、2以下、1以下、0をサポートする設定になる。   As indicated by E2 in FIG. 10, a transfer capability parameter (DMA transfer mode) is set in bits 6 to 0 of the word 88 of the identified device information. Specifically, when bit 6 is set to 1, it is set to support ultra DMA mode 6 or lower (ultra DMA modes 6 to 0). Similarly, when bits 5, 4, 3, 2, 1, 0 are set to 1, ultra DMA mode 5 or lower, 4 or lower, 3 or lower, 2 or lower, 1 or lower, or 0 is set.

SATAデバイス4は一般的に高速であるため、最高速のウルトラDMAモード6で動作するデバイスも存在する。ところがデータ転送制御装置の高速動作には限界があり、ブリッジ接続されるSATAデバイス4がウルトラDMAモード6で動作可能であっても、データ転送制御装置についてはウルトラDMAモード6では動作できない場合がある。   Since the SATA device 4 is generally high-speed, there are devices that operate in the fastest Ultra DMA mode 6. However, there is a limit to the high-speed operation of the data transfer control device, and even if the SATA device 4 that is bridge-connected can operate in the ultra DMA mode 6, the data transfer control device may not operate in the ultra DMA mode 6. .

そこで本実施形態では、アイデンティファイ・デバイス情報のワード88のビット6〜0等の転送能力パラメータを、データ転送制御装置の転送能力に応じたパラメータに書き替える。例えばSATAデバイス4がウルトラDMAモード6で動作可能である場合には、SATAデバイス4は、ワード88のビット6〜0を(1111111)に設定する。この時、データ転送制御装置が、ウルトラDMAモード5以下では動作可能であるが、ウルトラDMAモード6では動作できない場合には、シーケンスコントローラ30は、ワード88のビット6〜0を(0111111)に書き換える(上書きする)。このようにすれば、SATAデバイス4が、自身が高速なDMA転送に対応していることをホスト2に通知しようとした場合にも、これを書き換えて、データ転送制御装置の転送能力に応じた適正なデータ転送制御を実行できる。   Therefore, in this embodiment, the transfer capability parameters such as bits 6 to 0 of the word 88 of the identifier device information are rewritten to parameters according to the transfer capability of the data transfer control device. For example, when the SATA device 4 can operate in the ultra DMA mode 6, the SATA device 4 sets bits 6 to 0 of the word 88 to (1111111). At this time, if the data transfer control device can operate in the ultra DMA mode 5 or lower but cannot operate in the ultra DMA mode 6, the sequence controller 30 rewrites bits 6 to 0 of the word 88 to (0111111). (Overwrite). In this way, even when the SATA device 4 tries to notify the host 2 that it is compatible with high-speed DMA transfer, it can be rewritten to correspond to the transfer capability of the data transfer control device. Appropriate data transfer control can be executed.

また図10のE3に示すように、アイデンティファイ・デバイス情報のワード93には、後述するスレーブ検知(XDASP)や自己診断(XPDIAG)の結果が設定される。   Further, as shown at E3 in FIG. 10, the result of slave detection (XDASP) and self-diagnosis (XPDIAG) described later is set in the word 93 of the identified device information.

そこで本実施形態では、このようなスレーブ検知結果や自己診断結果をホスト2に通知するための書き替え処理(反映させるための書き換え処理)を行う。   Therefore, in this embodiment, a rewrite process (a rewrite process for reflecting) for notifying the host 2 of such slave detection results and self-diagnosis results is performed.

例えば図11(A)は、後述する手法によりデータ転送制御装置がマスタ側に設定された場合のワード93の設定例である。   For example, FIG. 11A shows a setting example of the word 93 when the data transfer control device is set on the master side by a method described later.

例えばワード93のビット5が1にセットされると、マスタ側であるデータ転送制御装置がスレーブの存在を検知したことが(XDASP=L)、ホスト2に通知される。一方、ビット5が0にクリアされると、スレーブの存在を検知しなかったことが(XDASP=H)、ホスト2に通知される。   For example, when bit 5 of word 93 is set to 1, the host 2 is notified that the data transfer control device on the master side has detected the presence of a slave (XDASP = L). On the other hand, when bit 5 is cleared to 0, the host 2 is notified that the presence of a slave has not been detected (XDASP = H).

またワード93のビット4が1にセットされると、マスタ側であるデータ転送制御装置がスレーブの自己診断のパスを検知したことが(XPDIAG=L)、ホスト2に通知される。一方、ビット4が0にクリアされると、スレーブの自己診断のフェイルを検知したことが(XPDIAG=H)、ホスト2に通知される。   When bit 4 of word 93 is set to 1, the host 2 is notified that the data transfer control device on the master side has detected a slave self-diagnosis path (XPDIAG = L). On the other hand, when bit 4 is cleared to 0, the host 2 is notified that a slave self-diagnosis failure has been detected (XPDIAG = H).

またワード93のビット3が1にセットされると、自身(マスタ)の自己診断がパスしたことが、ホスト2に通知される。一方、ビット3が0にクリアされると、自身(マスタ)の自己診断がフェイルしたことが、ホスト2に通知される。   When bit 3 of word 93 is set to 1, the host 2 is notified that self (master) self-diagnosis has passed. On the other hand, when bit 3 is cleared to 0, the host 2 is notified that the self-diagnosis of itself (master) has failed.

一方、図11(B)は、データ転送制御装置がスレーブ側に設定された場合のワード93の設定例である。   On the other hand, FIG. 11B shows a setting example of the word 93 when the data transfer control device is set to the slave side.

例えばワード93のビット11が1にセットされると、自身(スレーブ)の自己診断がパスしたことが、ホスト2に通知される。一方、ビット11が0にクリアされると、自身(スレーブ)の自己診断がフェイルしたことが、ホスト2に通知される。   For example, when bit 11 of word 93 is set to 1, the host 2 is notified that self (slave) self-diagnosis has passed. On the other hand, when the bit 11 is cleared to 0, the host 2 is notified that self (slave) self-diagnosis has failed.

以上のようにすれば、後述するように初期化シーケンス管理部34が、SATAデバイス4に代わって初期化シーケンス管理を代行した場合に、その初期化シーケンス処理の結果(スレーブ検知結果、自己診断結果)を、アイデンティファイ・デバイス情報に反映させて、ホスト2に通知することが可能になる。これにより、データ転送制御装置が初期化シーケンス管理を代行した場合にも、初期化シーケンス処理の結果をホストに対して適正に通知できる。   As described above, when the initialization sequence management unit 34 performs initialization sequence management on behalf of the SATA device 4 as described later, the result of the initialization sequence processing (slave detection result, self-diagnosis result) ) Can be reflected in the identification device information and notified to the host 2. Thus, even when the data transfer control device performs initialization sequence management, the result of the initialization sequence process can be properly notified to the host.

また図10のE4に示すように、アイデンティファイ・デバイス情報のワード255のビット15〜8には、チェックサムパラメータが設定される。本実施形態では、このチェックサムパラメータを無効設定に書き替える。具体的には、SATAデバイス4によりチェックサムが計算され、チェックサムの結果がワード255のビット15〜8に書き込まれた場合にも、このビット15〜8のチェックサムを(00000000)に書き換える(上書きする)。このようにチェックサムを(00000000)に設定すると、そのチェックサムは無効になり、チェックサムを計算しなかったことと同じ扱いになる。   Also, as indicated by E4 in FIG. 10, a checksum parameter is set in bits 15 to 8 of the word 255 of the identified device information. In this embodiment, this checksum parameter is rewritten to invalid setting. Specifically, when the checksum is calculated by the SATA device 4 and the result of the checksum is written into bits 15 to 8 of the word 255, the checksum of bits 15 to 8 is rewritten to (00000000) ( Overwrite). If the checksum is set to (00000000) in this way, the checksum becomes invalid and is treated as if the checksum was not calculated.

即ち本実施形態では、SATAデバイス4により設定されたアイデンティファイ・デバイス情報を、データ転送制御装置側で書き換えている。従って、SATAデバイス4側で計算したチェックサムは、書き換え後のアイデンティファイ・デバイス情報においては意味をなさないものであり、誤ったチェックサムになる。従って、このような誤ったチェックサムをホスト2に通知すると、誤動作等が生じるおそれがある。この場合に、書き換え後のアイデンティファイ・デバイス情報について、再度、チェックサムを計算し直す手法も考えられるが、これは処理負荷の増加や回路の大規模化を招く。   That is, in this embodiment, the identify device information set by the SATA device 4 is rewritten on the data transfer control device side. Therefore, the checksum calculated on the SATA device 4 side is meaningless in the rewritten identified device information and becomes an incorrect checksum. Therefore, if such an incorrect checksum is notified to the host 2, there is a risk of malfunction. In this case, a method of recalculating the checksum for the identified device information after rewriting is also conceivable, but this causes an increase in processing load and an increase in circuit scale.

そこで本実施形態では、チェックサムパラメータを無効設定に書き換えて、誤ったチェックサムの結果がホスト2に通知されるのを防止している。   Therefore, in this embodiment, the checksum parameter is rewritten to an invalid setting to prevent the host 2 from being notified of an incorrect checksum result.

なおアイデンティファイ・デバイス情報の書き換え処理は図10、図11に限定されない。例えばマスタ、スレーブの設定を常にジャンパによる設定にするなどの書き換え処理を行ってもよい。   Note that the rewrite processing of the identifier device information is not limited to FIGS. 10 and 11. For example, rewriting processing such as setting the master and slave to always be set by jumpers may be performed.

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

ホスト2がアイデンティファイ・デバイス・コマンドを発行すると、シーケンスコントローラ30はTFR12のステータスレジスタのBUSYビットを1にセットする(ステップS71、S72)。これによりホスト2に対してビジー状態であることが通知される。   When the host 2 issues an identify device command, the sequence controller 30 sets the BUSY bit of the status register of the TFR 12 to 1 (steps S71 and S72). As a result, the host 2 is notified that it is busy.

次に、SATAI/F50がレジスタFISをデバイス4に送信する(ステップS73)。そしてPIOセットアップFISをデバイス4から受信し、それに続いて、アイデンティファイ・デバイス情報がデータフィールドに設定されたデータFISをデバイス4から受信する(ステップS74、S75)。これによりSATAバス側での1ユニットのPIO転送が実行される。   Next, the SATA I / F 50 transmits the register FIS to the device 4 (step S73). Then, the PIO setup FIS is received from the device 4, and subsequently, the data FIS in which the identified device information is set in the data field is received from the device 4 (steps S74 and S75). As a result, one unit of PIO transfer on the SATA bus side is executed.

次に、シーケンスコントローラ30は、データバッファ70(緩衝用FIFO)の蓄積データサイズが1セクタ分の転送バイト数(512バイト)に一致したか否か(超えたか否か)を判断する(ステップS76)。即ち、図9の信号FIFORemain、信号FISCountに基づいて、データバッファ70に1セクタ分のリードデータが蓄積されたか否かを判断する。   Next, the sequence controller 30 determines whether or not the accumulated data size of the data buffer 70 (buffer FIFO) matches (exceeds) the number of transfer bytes (512 bytes) for one sector (step S76). ). That is, it is determined whether or not read data for one sector is stored in the data buffer 70 based on the signal FIFOMain and the signal FISCount in FIG.

そして、蓄積データサイズが1セクタ分の転送バイト数に一致すると、データバッファ70に書き込まれたアイデンティファイ・デバイス情報(リードデータ)の書き換え処理を行う(ステップS77)。具体的には図10、図11で説明したように、転送能力パラメータの書き換え、IORDYパラメータの書き換え、スレーブ検知結果(XDASP)、自己診断結果(XPDIAG)を反映させる書き換え、チェックサムパラメータの書き換えなどを行う。   When the accumulated data size matches the number of transfer bytes for one sector, the rewriting process of the identification device information (read data) written in the data buffer 70 is performed (step S77). Specifically, as described in FIG. 10 and FIG. 11, rewriting of transfer capability parameter, rewriting of IORDY parameter, rewriting to reflect slave detection result (XDASP), self-diagnosis result (XPDIAG), rewriting of checksum parameter, etc. I do.

次に、TFR12のステータスレジスタのBUSYビットを0にクリアすると共にDRQビットを1にセットする(ステップS78)。これによりデータリクエスト状態であることがホストに通知される。そして、その後にPATAI/F10に対してPIOリード転送の開始を指示する(ステップS79)。具体的には図9のPATATranGoをアクティブにする。これによりホスト2がデータリードを開始し(ステップS80)、ホスト2に対して、書き換え後のアイデンティファイ・デバイス情報が転送される。   Next, the BUSY bit of the status register of the TFR 12 is cleared to 0 and the DRQ bit is set to 1 (step S78). As a result, the host is notified of the data request state. Thereafter, the PATA I / F 10 is instructed to start PIO read transfer (step S79). Specifically, PATATranGo in FIG. 9 is activated. As a result, the host 2 starts data read (step S80), and the rewritten identified device information is transferred to the host 2.

5.4 IORDY信号
PATA(IDE)では、図13に示すように、IORDY信号がLレベル(非アクティブ、ネゲート)になるウェイト期間tBが規定されている。即ちPIOリードでは、デバイス側がIORDY信号をLレベル(非アクティブ、ネゲート)にした後、Hレベル(アクティブ、アサート)にすることで、リードデータの準備が出来たことが(データがレディー状態であることが)、ホストに通知される。そしてホストは、IORDY信号がLレベルからHレベルに変化すると、XDIOR信号をLレベルからHレベルに変化させて、データDD[15:0]のリード動作を行う。
5.4 IORDY signal PATA (IDE) defines a wait period tB in which the IORDY signal is at L level (inactive, negated) as shown in FIG. That is, in PIO read, the device side sets the IORDY signal to L level (inactive, negated) and then to H level (active, asserted), so that read data is ready (data is ready). The host is notified). When the IORDY signal changes from the L level to the H level, the host changes the XDIOR signal from the L level to the H level, and performs the read operation of the data DD [15: 0].

従って、ウェイト期間tBが長くなってしまうと、ホストが不必要に長期間待たされることになる。このため、ウェイト期間tBについてはその長さが規格で決められており、ウェイト期間tBが所定期間よりも長くなると、IORDY信号のアサートタイミング違反になる。   Therefore, if the wait period tB becomes long, the host waits unnecessarily for a long time. For this reason, the length of the wait period tB is determined by the standard, and if the wait period tB is longer than the predetermined period, the IORDY signal assert timing is violated.

ところが、本実施形態のようなPATAとSATAのブリッジ機能を有するデータ転送制御装置では、SATA側のデータ転送が遅れると、図13の期間tBについての規格を遵守できなくなるおそれがある。そこで本実施形態では以下に説明するようなIORDY信号の生成手法を採用している。   However, in the data transfer control device having the PATA-SATA bridge function as in this embodiment, if the data transfer on the SATA side is delayed, there is a possibility that the standard for the period tB in FIG. 13 cannot be observed. Therefore, in the present embodiment, a method for generating an IORDY signal as described below is adopted.

例えば図9において、PATA用データバッファ16には、ライト時にはホスト2からのデータがバッファリングされて、PATA用データバッファ16のデータがデータバッファ70に格納される。またPATA用データバッファ16には、リード時にはデータバッファ70からのデータがバッファリングされて、PATA用データバッファ16のデータがホスト2に出力される。   For example, in FIG. 9, the data from the host 2 is buffered in the PATA data buffer 16 at the time of writing, and the data in the PATA data buffer 16 is stored in the data buffer 70. In the PATA data buffer 16, data from the data buffer 70 is buffered at the time of reading, and data in the PATA data buffer 16 is output to the host 2.

また図9のI/F信号生成回路18は、図2に示すPATA用の信号XCS〜XPDIAGを生成する。そしてこのI/F信号生成回路18は、IORDY信号生成回路19を含む。IORDY信号生成回路19は、PATA用の信号のうちIORDY信号を生成する。IORDY信号は、PIOリード転送時にホスト2へのデータレディ信号(ウェイト信号)として機能する。   Further, the I / F signal generation circuit 18 in FIG. 9 generates the PATA signals XCS to XPDIAG shown in FIG. The I / F signal generation circuit 18 includes an IORDY signal generation circuit 19. The IORDY signal generation circuit 19 generates an IORDY signal among the PATA signals. The IORDY signal functions as a data ready signal (wait signal) to the host 2 during PIO read transfer.

このIORDY信号生成回路19には、図14(A)に示すように、例えばPATAI/F10のTFR12のセットタイミング信号と、PATA用データバッファ16のempty信号が入力される。   As shown in FIG. 14A, for example, a set timing signal of the TFR 12 of the PATA I / F 10 and an empty signal of the PATA data buffer 16 are input to the IORDY signal generation circuit 19.

ここでセットタイミング信号は、例えばSFR52に設定されたレジスタ値がTFR12に転送されて書き込まれるタイミングでアクティブになる。具体的には、図12のステップS78に示すように、TFR12のステータスレジスタのビットが設定(BUSY=0、DRQ=1)されたタイミングで、アクティブになる。一方、PATA用データバッファ16のempty信号は、PATA用データバッファ16にデータが格納されていない場合にアクティブになる。   Here, the set timing signal becomes active, for example, at the timing when the register value set in the SFR 52 is transferred to the TFR 12 and written. Specifically, as shown in step S78 of FIG. 12, the signal becomes active at the timing when the bit of the status register of TFR 12 is set (BUSY = 0, DRQ = 1). On the other hand, the empty signal of the PATA data buffer 16 becomes active when no data is stored in the PATA data buffer 16.

このようなセットタイミング信号、empty信号が入力されることで、IORDY信号生成回路19は、図14(B)に示すようなタイミングのIORDY信号を生成する。具体的には、TFR12のステータスレジスタのビットが設定(BUSY=0、DRQ=1)された場合(タイミングTG1)に非アクティブ(Lレベル)になり、書き換え後のアイデンティファイ・デバイス情報であるリードデータがPATA用データバッファ16に蓄積された場合(タイミングTG2)にアクティブ(Hレベル)になるIORDY信号を生成する。   When such a set timing signal and empty signal are input, the IORDY signal generation circuit 19 generates an IORDY signal having a timing as shown in FIG. Specifically, when the bit of the status register of TFR12 is set (BUSY = 0, DRQ = 1) (timing TG1), it becomes inactive (L level), and is the identified device information after rewriting. When the read data is accumulated in the PATA data buffer 16 (timing TG2), an IORDY signal that becomes active (H level) is generated.

即ち、図14(A)のセットタイミング信号がアクティブになると、図14(B)のタイミングTG1でIORDY信号が非アクティブ(Lレベル)になる。また図14(A)のempty信号が非アクティブになり、PATA用データバッファ16にデータが蓄積されると、図14(B)のタイミングTG2でIORDY信号がアクティブ(Hレベル)になる。そしてIORDY信号がアクティブになると、ホスト2は、XDIOR信号をHレベルにして、データDD[15:0]をPATA用データバッファ16から読み出すことになる。   That is, when the set timing signal in FIG. 14A becomes active, the IORDY signal becomes inactive (L level) at the timing TG1 in FIG. 14B. When the empty signal in FIG. 14A becomes inactive and data is accumulated in the PATA data buffer 16, the IORDY signal becomes active (H level) at timing TG2 in FIG. 14B. When the IORDY signal becomes active, the host 2 sets the XDIOR signal to the H level and reads the data DD [15: 0] from the PATA data buffer 16.

このようにすれば、例えば図12のステップS78でTFR12のステータスレジスタにビットが設定されると、図14(B)のタイミングTG1でIORDY信号が非アクティブになる。また図12のステップS79でPIOリード転送の開始が指示されると、図14(B)のタイミングTG2でIORDY信号がアクティブになる。従って、データ転送制御装置を介してSATAデバイス4をブリッジ接続した場合にも、ウェイト期間tBを最小限の長さに抑えることができ、IORDY信号のアサートタイミング違反の発生を効果的に防止できる。   In this way, for example, when a bit is set in the status register of the TFR 12 in step S78 in FIG. 12, the IORDY signal becomes inactive at the timing TG1 in FIG. 14B. When the start of PIO read transfer is instructed in step S79 in FIG. 12, the IORDY signal becomes active at timing TG2 in FIG. Therefore, even when the SATA device 4 is bridge-connected via the data transfer control device, the wait period tB can be suppressed to a minimum length, and the occurrence of an IORDY signal assert timing violation can be effectively prevented.

6.初期化シーケンス
次に、本実施形態の初期化シーケンス処理手法について具体的に説明する。
6). Initialization Sequence Next, the initialization sequence processing method of the present embodiment will be specifically described.

6.1 CSEL端子
PATAデバイスのシステムでは、PATAバスに対して最大で2台のデバイスを接続でき、これらの2台のデバイスのうちの一方がマスタになり、他方がスレーブになる。そして各デバイスは、自身がマスタなのかスレーブなのかを、ジャンパピンの設定又はケーブルセレクトの設定により判断する。またPATAバスに対して2台のデバイスを接続した場合にも、同じアドレスが2台のデバイスで共有して使用される。従って、ATAレジスタ(タスクファイル・レジスタ)に対してホストから書き込み動作があった場合には、マスタ及びスレーブの両方のデバイスが、PATAのデータDD[15:0](図2参照)のバスからそのデータを受け取り、各デバイスは、DEVビット等に基づいて、そのデータが自身に宛てたデータなのか否かを判断する。またATAレジスタに対するホストからの読み出し動作があった場合には、マスタ、スレーブの各デバイスは、その時点でのDEVビットの状態と自身のデバイス番号を比較し、一致した場合にのみ、アクセスされたATAレジスタの内容をデータDD[15:0]のバスに出力する。
6.1 CSEL Terminal In a PATA device system, up to two devices can be connected to the PATA bus, and one of these two devices becomes a master and the other becomes a 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.

例えば図15(A)では、CSEL端子がLレベル(GNDレベル)に設定されており、この場合には本実施形態のデータ転送制御装置3は、自身がマスタ側に設定されたと判断する。そしてデータ転送制御装置3とそれに接続されるSATAデバイス4により、PATAのマスタ側が構成される。これにより、本実施形態のデータ転送制御装置3を含むPATAのマスタ側と、PATAのスレーブ側とが、PATAバスに接続されるシステム構成を実現できる。   For example, in FIG. 15A, 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.

一方、図15(B)では、CSEL端子がHレベル(VDDレベル)に設定されており、この場合には本実施形態のデータ転送制御装置3は、自身がスレーブ側に設定されたと判断する。そしてデータ転送制御装置3とそれに接続されるSATAデバイス4により、PATAのスレーブ側が構成される。これにより、PATAのマスタ側と、本実施形態のデータ転送制御装置3を含むPATAのスレーブ側とが、PATAバスに接続されるシステム構成を実現できる。   On the other hand, in FIG. 15B, 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.

6.2 初期化シーケンス管理の代行
前述のように、SATAデバイスにはマスタ、スレーブの区別の概念が無く、SATAデバイスはマスタとしてのみ取り扱われる。従って、SATAデバイスは、マスタ、スレーブを区別するための初期化シーケンス管理機能を有しない。従って、このようなSATAデバイスを、PATAとSATAのブリッジ機能を有するデータ転送制御装置を介してPATAバスにブリッジ接続した場合に、初期化シーケンスの処理を行う処理主体が存在しなくなってしまうという問題がある。
6.2 Proxy for Initialization Sequence Management As described above, there is no concept of master / slave differentiation in SATA devices, and SATA devices are handled only as masters. 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(A)、図1(B)の初期化シーケンス管理部34が、PATAにおける初期化シーケンス管理機能を有しないSATAデバイス4に代わって初期化シーケンス管理を代行する。例えば初期化シーケンス管理部34は、ハードリセット後、デバイス存在検知期間(10ms)内にSATAデバイス4の存在が検知された場合に、初期化シーケンス処理を実行する。具体的にはハードリセット後に、ホスト側であるSATAI/F50はOOBシーケンスにおけるCOMRESETを発行し、SATAデバイス4からのCOMINITを検出する。そして初期化シーケンス管理部34は、デバイス存在検知期間(10ms)内にSATAデバイス4からのCOMINITが検知された場合には、SATAデバイス4が存在すると判断して、本実施形態の初期化シーケンス処理を実行する。   Therefore, in the present embodiment, the initialization sequence management unit 34 in FIGS. 1A and 1B performs initialization sequence management in place of the SATA device 4 that does not have an initialization sequence management function in PATA. For example, the initialization sequence management unit 34 executes the initialization sequence process when the presence of the SATA device 4 is detected within the device presence detection period (10 ms) after the hard reset. Specifically, after the hard reset, the SATA I / F 50 on the host side issues COMRESET in the OOB sequence and detects COMINIT from the SATA device 4. Then, when the COMINIT from the SATA device 4 is detected within the device presence detection period (10 ms), the initialization sequence management unit 34 determines that the SATA device 4 exists, and performs the initialization sequence processing according to the present embodiment. Execute.

更に具体的には初期化シーケンス管理部34は、図15(A)のようにCSEL端子(マスタ・スレーブ設定端子)によりデータ転送制御装置3がマスタ側に設定された場合には、ハードリセット後にスレーブ検知処理と自己診断処理を行う。一方、図15(B)のようにCSEL端子によりデータ転送制御装置3がスレーブ側に設定された場合には、ハードリセット後にスレーブ検知信号の制御と自己診断信号の制御を行う。   More specifically, the initialization sequence management unit 34, after the hard reset, 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. Performs slave 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. 15B, 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.

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

図16に示すようにホスト側は、ハードリセット信号をアクティブ(アサート状態)にした後、非アクティブ(ネゲート状態)にする(ステップS21、S22)。そしてステータスレジスタのBUSYビットが1から0にクリアされるのをウェイトし、0にクリアされるとホストアイドル状態に移行する(ステップS23、S24)。   As shown in FIG. 16, 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).

一方、図17に示すようにデバイス側は、ハードリセットが行われると、リリースバスステートに移行し、CSEL(CSEL端子、CSEL信号)がLレベルか否かを判断する(ステップS31、S32、S33)。即ち自身がマスタ側に設定されているか、スレーブ側に設定されているかを判断する。   On the other hand, as shown in FIG. 17, 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ウェイトステートに移行した後、サンプルXDSAPステートに移行する(ステップS34、S35)。このサンプルXDSAPステートでは、自身の初期化及び自己診断処理を行うと共に、スレーブ側からのスレーブ検知信号XDASPをサンプルしてモニタする。   If it is determined that the 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 XDSAP state (steps S34 and S35). In this sample XDSAP 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レベルに設定され、自身がマスタ側に設定されたと判断した場合には、図17のステップ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レベルに設定され、自身がスレーブ側に設定されたと判断した場合には、図17のステップS44〜S46に示すように、スレーブ検知信号XDASP、自己診断信号XPDIAGの制御を行う。即ち、スレーブ検知信号XDASPをLレベルにして、スレーブの存在をマスタ側に通知する。また自己診断信号XPDIAGをLレベルにしたり、Hレベルにして、スレーブ側の自己診断結果をホスト側に通知する。   When 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.

6.3 DEVビットの設定
前述したようにPATAでは、データDD[15:0]やアドレスDA[2:0]のバスは、マスタとスレーブで共用される。従って、マスタ及びスレーブの両方が、データDD[15:0]のバスからのコマンド、パラメータをタスクファイル・レジスタを介して受け取ることになる。そして、マスタへ宛てたものであるか、スレーブへ宛てたものであるかは、デバイス/ヘッドレジスタのDEVビットにより判断する。具体的にはDEVビットが0である場合にはマスタに宛てたものであると判断し、DEVビットが1である場合にはスレーブに宛てたものであると判断する。
6.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.

ところが、図15(B)に示すように、CSEL端子をHレベルにしてスレーブ設定にした場合には、ホスト2はSATAデバイス4をスレーブと見なしている。従って、SATAデバイス4に対してコマンドやパラメータを送る場合には、DEVビットをスレーブ設定である1に設定する。従って、自身がマスタであると認識しているSATAデバイス4は、これらのコマンドやパラメータを受け取れなくなってしまう。そこで本実施形態では、以下のようなDEVビット設定手法を採用している。   However, as shown in FIG. 15B, 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.

例えば図18(A)では、CSEL端子(CSEL信号)がLレベルに設定され、データ転送制御装置がマスタ側に設定されている。そしてホスト2がマスタへのATAコマンドを発行している。この場合には、シーケンスコントローラ30は、TFR12のレジスタ値(コマンド、パラメータ)をそのままSFR52に転送する。するとSATAI/F50は、SFR52のレジスタ値に基づいて、レジスタFIS(Host to Device)等を生成して、SATAデバイス4に送信する。   For example, in FIG. 18A, 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.

また図18(B)では、データ転送制御装置がマスタ側に設定されているときに、ホスト2からのATAコマンドに対応するFIS(例えばレジスタFIS、PIOセットアップFIS、DMAアクティベートFIS等)を、SATAI/F50がSATAデバイス4から受信している。この場合には、シーケンスコントローラ30は、SFR52のレジスタ値をTFR12にそのまま転送する。そしてホスト2は、SATAデバイス4からのステータス等を受け取る。   In FIG. 18B, when the data transfer control device is set on 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.

一方、図19(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. 19A, the CSEL terminal is set to 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.

また図19(B)では、データ転送制御装置がスレーブ側に設定されているときに、ホスト2からのATAコマンドに対応するFISを、SATAI/F50がSATAデバイス4から受信している。この場合には、シーケンスコントローラ30は、SFR52のデバイス/ヘッドレジスタのDEVビットを0(マスタ設定)から1(スレーブ設定)に書き換えて、SFR52のレジスタ値をTFR12に転送する。そしてホスト2は、SATAデバイス4からのステータス等を受け取る。   In FIG. 19B, 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ビットの設定手法について図20、図21のフローチャートを用いて更に詳細に説明する。   Next, the DEV bit setting method of the present embodiment will be described in more detail with reference to the flowcharts of FIGS.

図20では、ホスト2がマスタへのATAコマンドを発行している(ステップS51)。そしてCSEL端子がLレベルか否かを判断し(ステップS52)、Lレベルである場合には、図18(A)で説明したようにTFR12のレジスタ値をそのままSFR52に転送する(ステップS53)。そしてSATAデバイス4へのコマンドの転送及び実行が行われる(ステップS54)。   In FIG. 20, 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. 18A (step S53). Then, the command is transferred and executed to the SATA device 4 (step S54).

次に、SATAデバイス4からステータス返送のためのFIS(レジスタFIS等)を受信すると(ステップS55)、図18(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. 18B (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.

図21では、ホスト2がスレーブへのATAコマンドを発行している(ステップS61)。そしてCSEL端子がLレベルか否かを判断し(ステップS62)、LレベルではなくHレベルである場合には、図19(A)で説明したようにTFR12のデバイス/ヘッドレジスタのDEVビットを0(マスタ設定)に書き換えて、TFR12のレジスタ値をSFR52に転送する(ステップS63)。そしてSATAデバイス4へのコマンドの転送及び実行が行われる(ステップS64)。   In FIG. 21, 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)、図19(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), the DEV bit of the device / head register of the SFR 52 is set to 1 (slave setting) as described with reference to FIG. ) 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.

7.受信FISの種類による転送シーケンス制御
本実施形態のようにブリッジ機能を有するデータ転送制御装置では、ホスト2が発行したATAコマンドに応じた転送シーケンス制御を行う必要がある。そして転送シーケンス制御の内容をデータ転送制御装置が知るためには、ATAコマンドをデコードする必要があり、そのために、コマンドデコーダやパラメータテーブルが必要になる。即ちホスト2が発行したコマンドをデコードし、転送方向(リード、ライト)や転送種別(PIO(Programmed I/O)、DMA)を判別し、内部転送シーケンスを決定する。
7). Transfer sequence control according to the type of reception FIS In a data transfer control device having a bridge function as in this embodiment, it is necessary to perform transfer sequence control according to an ATA command issued by the host 2. In order for the data transfer control device to know the contents of the transfer sequence control, it is necessary to decode the ATA command. For this purpose, a command decoder and a parameter table are required. That is, the command issued by the host 2 is decoded, the transfer direction (read, write) and transfer type (PIO (Programmed I / O), DMA) are determined, and the internal transfer sequence is determined.

しかしながら、このようなコマンドデコーダを設けると、データ転送制御装置のロジック回路の大規模化やメモリ容量の増加に繋がる。またATAコマンドのデコードを行うためには、デコードのためのコマンドテーブルを持たなければならないが、データ転送制御装置の開発終了後に、規格において新規コマンドの追加が発生した場合には、データ転送制御装置の回路修正を行わない限り、新規コマンドをサポートできなくなる。例えばATAPIでは、ブルーレイディスクなどの新しい規格の光ディスクドライブが追加されると、パラメータテーブルの変更が必要になる。従って、開発が終了している既存のデータ転送制御装置を使用できず、パラメータテーブル(テーブルメモリ)を変更するための回路修正が必要になり、余分な開発期間や開発コストがかかってしまう。更にベンダーにユニークな特殊コマンドに対しても、対応することが難しい。   However, providing such a command decoder leads to an increase in the scale of the logic circuit of the data transfer control device and an increase in memory capacity. In addition, in order to decode an ATA command, it must have a command table for decoding. If a new command is added in the standard after development of the data transfer control device is completed, the data transfer control device Unless the circuit is corrected, new commands cannot be supported. For example, in ATAPI, when a new standard optical disc drive such as a Blu-ray disc is added, the parameter table must be changed. Therefore, it is not possible to use an existing data transfer control device for which development has been completed, and it is necessary to modify a circuit for changing the parameter table (table memory), resulting in an extra development period and development cost. Furthermore, it is difficult to deal with special commands unique to vendors.

この場合にデータ転送制御装置にCPU(処理部)を内蔵させ、パラメータテーブルの変更をファームウェア等の書き換えにより実現すれば、新規コマンドが増えたり、コマンドの内容が変更された場合にも、これに対応できる。   In this case, if the CPU (processing unit) is built in the data transfer control device and the parameter table is changed by rewriting the firmware or the like, even if new commands increase or the contents of the commands are changed, Yes.

しかしながら、データ転送制御装置にCPUを内蔵させると、CPU上で動作するファームウェアの開発や、CPUの動作確認のためのデバッグツールの開発などが必要になってしまい、開発期間の長期化や高コスト化を招く。   However, if the CPU is built in the data transfer control device, it will be necessary to develop firmware that runs on the CPU, and to develop a debugging tool for checking the operation of the CPU. Invite

このような問題を解決するための図22(A)〜図23(C)に示す手法では、ホストが発行したコマンドをデコードすることなくデバイスに転送し、デバイスから返送されてきたFISの情報に基づいて、発行されたコマンドについての転送シーケンスを制御する。即ちATAコマンドのデコードを、データ転送制御装置が行うのではなく、SATAデバイスに行わせる。そしてデータ転送制御装置は、ATAコマンドをデコードせずに(一部をデコードしてもよい)、SATAデバイスにそのまま転送し、SATAデバイスの反応を観察することで、自身の転送シーケンスを決定して実行する。   In the method shown in FIGS. 22A to 23C for solving such a problem, the command issued by the host is transferred to the device without decoding, and the FIS information returned from the device is used. Based on this, the transfer sequence for the issued command is controlled. That is, the ATA command is not decoded by the data transfer control device, but is made to be performed by the SATA device. Then, the data transfer control device transfers the ATA command to the SATA device without decoding the ATA command (or may decode a part thereof), and determines its own transfer sequence by observing the reaction of the SATA device. Execute.

具体的には図22(A)に示すようにホスト2がPATAバスを介してATAコマンド(転送コマンド)を発行すると、PATAI/F10がこのコマンドを受ける。そしてSATAI/F50は、発行されたATAコマンドを含むレジスタFIS(Host to Device)を作成して、SATAバスを介してデバイス4に送信する。   Specifically, as shown in FIG. 22A, when the host 2 issues an ATA command (transfer command) via the PATA bus, the PATA I / F 10 receives this command. Then, the SATA I / F 50 creates a register FIS (Host to Device) including the issued ATA command and transmits it to the device 4 via the SATA bus.

デバイス4側のSATAI/F(図示せず)は、レジスタFISを受信すると、デコード処理を行い、レジスタFIS(ATAコマンド)に対応するFISを送信し、このFISをSATAI/F50が受信する。   When the SATA I / F (not shown) on the device 4 side receives the register FIS, the SATA I / F performs decoding processing, transmits the FIS corresponding to the register FIS (ATA command), and the SATA I / F 50 receives this FIS.

シーケンスコントローラ30(転送シーケンサ、ブリッジシーケンサ)は、レジスタFISに対応するFISをSATAI/F50がデバイス4から受信すると、ホスト2から発行されたATAコマンドの転送シーケンス制御として、受信したFISの種類に応じた転送シーケンス制御を行う。   When the SATA I / F 50 receives the FIS corresponding to the register FIS from the device 4, the sequence controller 30 (transfer sequencer, bridge sequencer) responds to the type of received FIS as the transfer sequence control of the ATA command issued from the host 2. Perform transfer sequence control.

より具体的には図22(B)ではホスト2はPIOリードのATAコマンドを発行している。この場合にはデバイス4は、転送方向がリード方向であるPIOセットアップFISを送信する。即ちPIOのデータ転送の直前にデバイス4がホスト2に転送するFISであるPIOセットアップFISを、デバイス4が送信し、SATAI/F50が受信する。このPIOセットアップFISは、データ転送の初期ステータス(Status)及びステータス終了値(E_Status)を有する。   More specifically, in FIG. 22B, the host 2 issues a PIO read ATA command. In this case, the device 4 transmits a PIO setup FIS whose transfer direction is the read direction. That is, the device 4 transmits the PIO setup FIS, which is the FIS that the device 4 transfers to the host 2 immediately before the PIO data transfer, and the SATA I / F 50 receives it. This PIO setup FIS has an initial status (Status) and a status end value (E_Status) of data transfer.

このように受信FISがPIOセットアップFISであり、PIOセットアップFISにより指定される転送方向がリード方向である場合には、シーケンスコントローラ30は、PIOリードの転送シーケンス制御を行う。即ちシーケンスコントローラ30は、PIOリードの転送シーケンスのための制御信号(転送方向設定信号、転送開始信号、転送停止信号等)をSATAI/F50、データバッファ70、PATAI/F10に出力する。これにより、デバイス4から読み出されたデータが、SATAI/F50、データバッファ70、PATAI/F10を介してホスト2に転送される。   As described above, when the reception FIS is the PIO setup FIS and the transfer direction designated by the PIO setup FIS is the read direction, the sequence controller 30 performs the transfer sequence control of the PIO read. That is, the sequence controller 30 outputs control signals (transfer direction setting signal, transfer start signal, transfer stop signal, etc.) for the transfer sequence of the PIO read to the SATA I / F 50, the data buffer 70, and the PATA I / F 10. Thereby, the data read from the device 4 is transferred to the host 2 via the SATA I / F 50, the data buffer 70, and the PATA I / F 10.

図22(C)では、ホスト2はPIOライトのATAコマンドを発行している。この場合にはデバイス4は、転送方向がライト方向であるPIOセットアップFISを送信し、SATAI/F50が受信する。   In FIG. 22C, the host 2 issues an ATA command for PIO write. In this case, the device 4 transmits the PIO setup FIS whose transfer direction is the write direction, and the SATA I / F 50 receives it.

このように受信FISがPIOセットアップFISであり、PIOセットアップFISにより指定される転送方向がライト方向である場合には、シーケンスコントローラ30は、PIOライトの転送シーケンス制御を行う。即ちシーケンスコントローラ30は、PIOライトの転送シーケンスのための制御信号をPATAI/F10、データバッファ70、SATAI/F50に出力する。これにより、ホスト2からのデータが、PATAI/F10、データバッファ70、SATAI/F50を介してデバイス4に転送される。   As described above, when the reception FIS is the PIO setup FIS and the transfer direction designated by the PIO setup FIS is the write direction, the sequence controller 30 performs the transfer sequence control of the PIO write. That is, the sequence controller 30 outputs a control signal for the PIO write transfer sequence to the PATA I / F 10, the data buffer 70, and the SATA I / F 50. As a result, data from the host 2 is transferred to the device 4 via the PATA I / F 10, the data buffer 70, and the SATA I / F 50.

図23(A)では、ホスト2はDMAリードのATAコマンドを発行している。この場合にはデバイス4はデータFISを送信する。即ちデバイス4はデータ転送のためのFISであるデータFISを送信し、SATAI/F50が受信する。   In FIG. 23A, the host 2 issues an ATA command for DMA read. In this case, the device 4 transmits data FIS. That is, the device 4 transmits a data FIS, which is an FIS for data transfer, and the SATA I / F 50 receives it.

このように受信FISがデータFISである場合には、シーケンスコントローラ30は、DMAリードの転送シーケンス制御を行う。これにより、デバイス4から読み出されたデータが、SATAI/F50、データバッファ70、PATAI/F10を介してホスト2にDMA転送される。   Thus, when the reception FIS is the data FIS, the sequence controller 30 performs a DMA read transfer sequence control. Thereby, the data read from the device 4 is DMA-transferred to the host 2 via the SATA I / F 50, the data buffer 70, and the PATA I / F 10.

図23(B)では、ホスト2はDMAライトのATAコマンドを発行している。この場合にはデバイス4はDMAアクティベートFISを送信する。即ちDMAの実行準備が出来ていることをホスト2に知らせるためのDMAアクティベートFISを、デバイス4が送信し、SATAI/F50が受信する。   In FIG. 23B, the host 2 issues a DMA write ATA command. In this case, the device 4 transmits a DMA activate FIS. That is, the device 4 transmits the DMA activate FIS for informing the host 2 that the DMA is ready for execution, and the SATA I / F 50 receives it.

このように受信FISがDMAアクティベートFISである場合には、シーケンスコントローラ30は、DMAライトの転送シーケンス制御を行う。これにより、ホスト2からのデータが、PATAI/F10、データバッファ70、SATAI/F50を介してデバイス4にDMA転送される。   As described above, when the reception FIS is the DMA activate FIS, the sequence controller 30 performs the DMA write transfer sequence control. As a result, the data from the host 2 is DMA-transferred to the device 4 via the PATA I / F 10, the data buffer 70, and the SATA I / F 50.

図23(C)では、ホスト2はノーデータコマンドのATAコマンドを発行している。この場合にはデバイス4はレジスタFIS(Device to Host)を送信し、SATAI/F50が受信する。このように、ATAコマンドに対応する受信FISが、デバイス4からホスト2へのレジスタFISである場合には、シーケンスコントローラ30は、ホスト2から発行されたATAコマンドはノーデータコマンドであると判断する。そしてレジスタFISのレジスタ値を、SATAI/F50のシャドウ・タスクファイル・レジスタからPATAI/F10のタスクファイル・レジスタに反映させる。   In FIG. 23C, the host 2 issues an ATA command of no data command. In this case, the device 4 transmits a register FIS (Device to Host), and the SATA I / F 50 receives it. Thus, when the reception FIS corresponding to the ATA command is the register FIS from the device 4 to the host 2, the sequence controller 30 determines that the ATA command issued from the host 2 is a no-data command. . Then, the register value of the register FIS is reflected from the shadow task file register of the SATA I / F 50 to the task file register of the PATA I / F 10.

以上のように、図22(A)〜図23(C)の手法によれば、ホスト2が発行したATAコマンドをデコードしなくても、デバイス4からの受信FIS情報に基づいて、発行されたATAコマンドの種別を判断して、そのATAコマンドに対応する転送シーケンス制御を実現できる。従って、コマンドデコーダの回路を節約でき、データ転送制御装置の小規模化を図れる。また、規格において新規コマンドの追加が発生しても、データ転送制御装置の回路修正を行うことなく、これに対応できる。またデータ転送制御装置にCPUを内蔵させなくても済むため、CPU上で動作するファームウェアの開発やデバッグツールの開発が不要になり、開発期間を短縮化でき、開発コストを低減できる。なおデータ転送制御装置にATAコマンドの一部をデコードする回路を設けたり、CPU(処理部)を内蔵させる変形実施も可能である。   As described above, according to the method shown in FIGS. 22A to 23C, the ATA command issued by the host 2 is issued based on the received FIS information from the device 4 without decoding. The transfer sequence control corresponding to the ATA command can be realized by determining the type of the ATA command. Therefore, the circuit of the command decoder can be saved and the data transfer control device can be reduced in size. Further, even if a new command is added in the standard, it can be dealt with without modifying the circuit of the data transfer control device. Further, since it is not necessary to incorporate a CPU in the data transfer control device, development of firmware that operates on the CPU and development of a debug tool become unnecessary, and the development period can be shortened and development cost can be reduced. The data transfer control device may be provided with a circuit for decoding a part of the ATA command or may be modified by incorporating a CPU (processing unit).

以上のような図22(A)〜図23(C)の手法を採用すれば、コマンドデコード回路を節約できるが、ホスト2がアイデンティファイ・デバイス・コマンドを発行した場合には、図9〜図14(B)で説明したように、通常のPIO転送とは異なる転送シーケンス制御が必要になる。例えば図9で説明したように、アイデンティファイ・デバイス情報であるリードデータを、データバッファ70から読み出して書き換え処理を行って書き戻す転送シーケンス制御や、図13〜図14(B)で説明したようなIORDY信号に関する特別な転送シーケンス制御が必要になる。   If the method of FIGS. 22A to 23C as described above is adopted, the command decoding circuit can be saved. However, when the host 2 issues an identify device command, FIGS. As described with reference to FIG. 14B, transfer sequence control different from normal PIO transfer is required. For example, as described with reference to FIG. 9, the read sequence that is the identification device information is read from the data buffer 70, rewritten and rewritten, and the transfer sequence control described with reference to FIGS. 13 to 14B. Such special transfer sequence control for the IORDY signal is required.

そこで本実施形態では、図22(A)〜図23(C)に示すような、受信FISの種類に応じた転送シーケンス制御を行う他に、ホスト2から発行されたATAコマンドが前記アイデンティファイ・デバイス・コマンドであった場合には、アイデンティファイ・デバイス情報が設定されたデータFISを受信したときに、図9〜図14(B)で説明したようなアイデンティファイ・デバイス・コマンドに対応する転送シーケンス制御を行う。このようにすれば、PATAとSATAのバスブリッジ機能を実現しながらホストとSATAデバイスとの間の転送の整合性についても適正に維持できるようになる。   Therefore, in this embodiment, in addition to performing transfer sequence control according to the type of reception FIS as shown in FIGS. 22A to 23C, an ATA command issued from the host 2 is used for the identity verification. In the case of a device command, when the data FIS in which the identifier device information is set is received, the identifier device command as described with reference to FIGS. Perform the corresponding transfer sequence control. In this way, it is possible to properly maintain transfer consistency between the host and the SATA device while realizing a PATA and SATA bus bridge function.

なお図24にPIOリードの転送シーケンス図を示す。ホスト2によりPIOリードのコマンドが発行されると、図24のA1に示すようにTFR12のステータスレジスタがD0hに設定される。即ちPATAI/F10によりBUSYビットが1にセットされ、デバイス4がビジー状態であることがホスト2に知らされる。そしてシーケンスコントローラ30によりTFR12のレジスタ値がSFR52に転送(コピー)される。するとA2に示すように、SATAI/F50は、SFR52のレジスタ値に基づいてPIOリードコマンドを含むレジスタFIS(Host to Device)を作成し、SATAバスを介してデバイス4に送信する。   FIG. 24 is a PIO read transfer sequence diagram. When the PIO read command is issued by the host 2, the status register of the TFR 12 is set to D0h as indicated by A1 in FIG. In other words, the BUSY bit is set to 1 by the PATA I / F 10, and the host 2 is informed that the device 4 is busy. Then, the register value of TFR 12 is transferred (copied) to SFR 52 by sequence controller 30. Then, as indicated by A2, the SATA I / F 50 creates a register FIS (Host to Device) including a PIO read command based on the register value of the SFR 52, and transmits it to the device 4 via the SATA bus.

このレジスタFISを受信したデバイス4は、A3に示すようにPIOセットアップFISを送信する。この場合に図8(C)のPIOセットアップFISのステータス(Status)には58hが設定され、エンドステータス(E_Status)にはD0hが設定される。ここでD0hではBUSYビットが1にセットされ、58hではDRQビットが1にセットされる。また50hではBUSYビット及びDRQビットが共に0にクリア(解除)される。またエンドステータスは例えばSATAI/F50の一時保存レジスタに保存される。   The device 4 that has received this register FIS transmits a PIO setup FIS as shown at A3. In this case, 58h is set in the status (Status) of the PIO setup FIS in FIG. 8C, and D0h is set in the end status (E_Status). Here, the BUSY bit is set to 1 at D0h, and the DRQ bit is set to 1 at 58h. At 50h, both the BUSY bit and the DRQ bit are cleared (released) to 0. The end status is stored in, for example, a temporary storage register of the SATA I / F 50.

シーケンスコントローラ30は、デバイス4からPIOセットアップFISを受信し、その方向パラメータD(図8(C)参照)がデバイスからホストへの方向である場合には、ホスト2が発行したコマンドはPIOリードであると判断する。そしてSFR52からTFR12にレジスタ値を転送し、A4に示すようにTFR12のステータスレジスタを58hに設定して、DRQビットを1にセットする。これによりホスト2に対する割り込みINTRQが発生する。なおINTRQの代わりにホスト2によるポーリングを採用してもよい。   When the sequence controller 30 receives the PIO setup FIS from the device 4 and the direction parameter D (see FIG. 8C) is the direction from the device to the host, the command issued by the host 2 is a PIO read. Judge that there is. Then, the register value is transferred from the SFR 52 to the TFR 12, the status register of the TFR 12 is set to 58h as indicated by A4, and the DRQ bit is set to 1. As a result, an interrupt INTRQ for the host 2 is generated. Note that polling by the host 2 may be employed instead of INTRQ.

そしてデバイス4からデータFISを受信し、ホスト2がデータをリードすると、A5に示すように、PIOセットアップFISのエンドステータスであるD0hがTFR12のステータスレジスタに設定され、BUSYビットが1にセットされる。即ちSATAI/F50の一時保存レジスタに保存されたエンドステータス(D0h)が、TFR12のステータスレジスタに転送されて書き込まれる。これにより、デバイス4がビジー状態であることがホスト2に知らされる。   When the data FIS is received from the device 4 and the host 2 reads the data, as shown in A5, the end status D0h of the PIO setup FIS is set in the status register of the TFR 12, and the BUSY bit is set to 1. . That is, the end status (D0h) stored in the temporary storage register of the SATA I / F 50 is transferred and written to the status register of the TFR 12. This informs the host 2 that the device 4 is busy.

以上のようにして各セクタのPIOリードが繰り返される。そしてA6に示すように最後のセクタのPIOセットアップFISではエンドステータスが50h又は51hになっている。従ってA7に示すようにこのエンドステータス50h又は51hがTFR12のステータスレジスタに設定され、DRQビットがクリアされる。これにより、全てのデータ転送が完了したことがホスト2に知らされる。   As described above, the PIO read of each sector is repeated. As shown in A6, the end status is 50h or 51h in the PIO setup FIS of the last sector. Therefore, as shown at A7, the end status 50h or 51h is set in the status register of the TFR 12, and the DRQ bit is cleared. As a result, the host 2 is informed that all data transfer has been completed.

8.SATAI/Fの構成
図25にSATAI/F50の構成例を示す。なおSATAI/F50の構成は図25に限定されず、その構成要素の一部を削除したり、他の構成要素を追加するなどの種々の変形実施が可能である。例えば物理層回路200を設けない構成としてもよい。
8). SATA I / F Configuration FIG. 25 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. 25, 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.

9.シーケンスコントローラ
図26にシーケンスコントローラ30の構成例を示す。シーケンスコントローラ30はレジスタ更新部32、初期化シーケンス管理部34、パラメータ書き換え部36、DMAモード設定記憶部38、転送制御部40を含む。なおシーケンスコントローラ30の構成は図26に限定されず、その構成要素の一部を削除したり、他の構成要素を追加するなどの種々の変形実施が可能である。
9. Sequence Controller FIG. 26 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. The configuration of the sequence controller 30 is not limited to that shown in FIG. 26, and various modifications may be made such as deleting some of the components or adding other components.

レジスタ更新部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.

10.電子機器
図27に本実施形態の電子機器の構成例を示す。この電子機器は、本実施形態で説明したデータ転送制御装置310とホスト302とデバイス304を含む。ホスト302とデータ転送制御装置310はPATAバスを介して接続され、データ転送制御装置310とデバイス304はSATAバスを介して接続される。なお本実施形態の電子機器の構成は図27に限定されず、その構成要素の一部を省略したり、他の構成要素を付加する変形実施が可能である。
10. Electronic Device FIG. 27 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. 27, 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(A)、図1(B)は本実施形態のデータ転送制御装置の構成例。1A and 1B are configuration examples of the data transfer control device of this 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. 本実施形態のアイデンティファイ・デバイス情報の書き換え手法を実現するデータ転送制御装置の具体的な構成例。6 is a specific configuration example of a data transfer control device that realizes the method of rewriting the identified device information according to the present embodiment. アイデンティファイ・デバイス情報の説明図。Explanatory drawing of identified device information. 図11(A)、図11(B)はアイデンティファイ・デバイス情報の説明図。FIG. 11A and FIG. 11B are explanatory diagrams of identified device information. 本実施形態の詳細な動作を説明するためのフローチャート。The flowchart for demonstrating the detailed operation | movement of this embodiment. IORDY信号によるウェイト期間の説明図。Explanatory drawing of the wait period by an IORDY signal. 図14(A)、図14(B)はIORDY信号生成回路の説明図。14A and 14B are explanatory diagrams of an IORDY signal generation circuit. 図15(A)、図15(B)はCSEL端子の設定手法の説明図。FIG. 15A and FIG. 15B 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. 図18(A)、図18(B)は本実施形態のDEVビットの設定手法の説明図。18A and 18B are explanatory diagrams of the DEV bit setting method of this embodiment. 図19(A)、図19(B)は本実施形態のDEVビットの設定手法の説明図。19A and 19B are explanatory diagrams of a DEV bit setting method according to 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. 図22(A)〜図22(C)は本実施形態のシーケンス制御手法の説明図。FIG. 22A to FIG. 22C are explanatory diagrams of the sequence control method of the present embodiment. 図23(A)〜図23(C)は本実施形態のシーケンス制御手法の説明図。FIG. 23A to FIG. 23C are explanatory diagrams of the sequence control method of the present embodiment. PIOリードの転送シーケンス図。The transfer sequence diagram of PIO read. 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 (14)

パラレルATAとシリアルATAのバスブリッジ機能を有するデータ転送制御装置であって、
パラレルATAバスに接続され、ホストとの間のインターフェースを行うパラレルATAインターフェースと、
シリアルATAバスに接続され、シリアルATAのデバイスとの間のインターフェースを行うシリアルATAインターフェースと、
転送シーケンス制御を行うシーケンスコントローラを含み、
前記パラレルATAインターフェースは、タスクファイル・レジスタを有し、
前記シリアルATAインターフェースは、
前記ホストによりアイデンティファイ・デバイス・コマンドが発行された場合に、前記アイデンティファイ・デバイス・コマンドに対応するレジスタFISを前記シリアルATAの前記デバイスに送信し、
前記シーケンスコントローラは、
前記アイデンティファイ・デバイス・コマンドの返値であるアイデンティファイ・デバイス情報が設定されたデータFISを、前記シリアル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 serial ATA interface is
When an identified device command is issued by the host, a register FIS corresponding to the identified device command is transmitted to the device of the serial ATA.
The sequence controller is
When the serial ATA interface receives data FIS in which the identified device information, which is a return value of the identified device command, is set, the rewrite processing of the identified device information is performed. A data transfer control device.
請求項1において、
前記ホスト、前記デバイス間で転送されるデータのバッファリングを行うデータバッファを含み、
前記シーケンスコントローラは、
前記データバッファに、前記アイデンティファイ・デバイス情報が書き込まれた後、書き込まれた前記アイデンティファイ・デバイス情報を読み出し、読み出された前記アイデンティファイ・デバイス情報の書き換え処理を行って、前記データバッファに書き戻すことを特徴とするデータ転送制御装置。
In claim 1,
A data buffer for buffering data transferred between the host and the device;
The sequence controller is
After the identified device information is written to the data buffer, the written device information is read, and the read device information is rewritten, A data transfer control device characterized by writing back to a data buffer.
請求項2において、
前記シーケンスコントローラは、
前記デバイスからシリアルATA側でのPIOリード転送のPIOセットアップFISを受信した後、PIOリード転送のデータFISを受信した場合に、前記アイデンティファイ・デバイス情報として、1セクタ分のリードデータが前記データバッファに書き込まれるまでウェイトし、1セクタ分の前記リードデータが前記データバッファに書き込まれた後に、前記リードデータである前記アイデンティファイ・デバイス情報の書き換え処理を行い、その後に前記タスクファイル・レジスタのステータスレジスタのビジービットをクリアすると共にデータリクエストビットをセットすることを特徴とするデータ転送制御装置。
In claim 2,
The sequence controller is
When the PIO read transfer data FIS is received after receiving the PIO setup transfer FIS for the PIO read transfer on the serial ATA side from the device, the read data for one sector is the data as the identified device information. Wait until it is written to the buffer, and after the read data for one sector is written to the data buffer, rewrite processing of the identified device information as the read data is performed, and then the task file register A data transfer control device characterized by clearing a busy bit of the status register and setting a data request bit.
請求項3において、
前記シーケンスコントローラは、
前記タスクファイル・レジスタの前記ステータスレジスタのビットを設定した後に、前記パラレルATAインターフェースに対してパラレルATA側でのPIOリード転送の開始を指示することを特徴とするデータ転送制御装置。
In claim 3,
The sequence controller is
A data transfer control device, wherein after setting a bit of the status register of the task file register, the parallel ATA interface is instructed to start PIO read transfer on the parallel ATA side.
請求項3又は4において、
前記パラレルATAインターフェースは、
前記リードデータがバッファリングされるパラレルATA用データバッファを有し、前記タスクファイル・レジスタの前記ステータスレジスタのビットが設定された場合に非アクティブになり、書き換え後の前記アイデンティファイ・デバイス情報であるリードデータが前記パラレルATA用データバッファに蓄積された場合にアクティブになるIORDY信号を生成することを特徴とするデータ転送制御装置。
In claim 3 or 4,
The parallel ATA interface is
It has a parallel ATA data buffer in which the read data is buffered, and becomes inactive when a bit of the status register of the task file register is set. A data transfer control device for generating an IORDY signal that becomes active when certain read data is accumulated in the parallel ATA data buffer.
請求項1乃至5のいずれかにおいて、
前記シーケンスコントローラは、
前記書き換え処理として、前記アイデンティファイ・デバイス情報のIORDYパラメータの書き替え処理を行うこと特徴とするデータ転送制御装置。
In any one of Claims 1 thru | or 5,
The sequence controller is
A data transfer control device, wherein as the rewriting process, a rewriting process of an IORDY parameter of the identified device information is performed.
請求項1乃至6のいずれかにおいて、
前記シーケンスコントローラは、
前記書き換え処理として、前記アイデンティファイ・デバイス情報の転送能力パラメータを、データ転送制御装置の転送能力に応じたパラメータに書き替える処理を行うこと特徴とするデータ転送制御装置。
In any one of Claims 1 thru | or 6.
The sequence controller is
A data transfer control device, wherein as the rewriting processing, a processing is performed to rewrite the transfer capability parameter of the identified device information to a parameter corresponding to the transfer capability of the data transfer control device.
請求項1乃至7のいずれかにおいて、
初期化シーケンス管理機能を有しない前記シリアルATAの前記デバイスに代わって初期化シーケンス管理を代行する初期化シーケンス管理部を含み、
前記初期化シーケンス管理部は、
マスタ・スレーブ設定端子によりデータ転送制御装置がマスタ側に設定された場合には、ハードリセット後にスレーブ検知処理と自己診断処理を行い、前記マスタ・スレーブ設定端子によりデータ転送制御装置がスレーブ側に設定された場合には、ハードリセット後にスレーブ検知信号、自己診断信号の制御を行うことを特徴とするデータ転送制御装置。
In any one of Claims 1 thru | or 7,
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
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.
請求項8において、
前記シーケンスコントローラは、
前記書き換え処理として、スレーブ検知結果、自己診断結果を前記ホストに通知するための書き替え処理を行うこと特徴とするデータ転送制御装置。
In claim 8,
The sequence controller is
A data transfer control device characterized by performing a rewrite process for notifying the host of a slave detection result and a self-diagnosis result as the rewrite process.
請求項8又は9において、
前記パラレルATAインターフェースは、タスクファイル・レジスタを有し、
前記シリアルATAインターフェースは、
前記タスクファイル・レジスタとの間でレジスタ値が転送されるシャドウ・タスクファイル・レジスタを含み、
前記シーケンスコントローラは、
データ転送制御装置がマスタ側に設定されているときに、前記ホストがマスタへのATAコマンドを発行した場合には、前記タスクファイル・レジスタのレジスタ値をそのまま前記シャドウ・タスクファイル・レジスタに転送し、
データ転送制御装置がスレーブ側に設定されているときに、前記ホストがスレーブへのATAコマンドを発行した場合には、前記タスクファイル・レジスタのデバイス/ヘッドレジスタのDEVビットをマスタ設定に書き換えて前記タスクファイル・レジスタのレジスタ値を前記シャドウ・タスクファイル・レジスタに転送することを特徴とするデータ転送制御装置。
In claim 8 or 9,
The parallel ATA interface has a task file register,
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.
請求項10において、
前記シーケンスコントローラは、
データ転送制御装置がマスタ側に設定されているときに、前記ホストからのATAコマンドに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合には、前記シャドウ・タスクファイル・レジスタのレジスタ値を前記タスクファイル・レジスタにそのままに転送し、
データ転送制御装置がスレーブ側に設定されているときに、前記ホストからのATAコマンドに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合には、前記シャドウ・タスクファイル・レジスタのデバイス/ヘッドレジスタのDEVビットをスレーブ設定に書き換えて前記シャドウ・タスクファイル・レジスタのレジスタ値を前記タスクファイル・レジスタに転送することを特徴とするデータ転送制御装置。
In claim 10,
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乃至11のいずれかにおいて、
前記シーケンスコントローラは、
前記書き換え処理として、前記アイデンティファイ・デバイス情報のチェックサムパラメータを無効設定に書き替える処理を行うこと特徴とするデータ転送制御装置。
In any one of Claims 1 thru | or 11,
The sequence controller is
The data transfer control device according to claim 1, wherein the rewriting process is a process of rewriting a checksum parameter of the identified device information to an invalid setting.
請求項1乃至12のいずれかにおいて、
前記シリアルATAインターフェースは、
前記パラレルATAバスを介して前記ホストがATAコマンドを発行した場合に、発行された前記ATAコマンドを含むレジスタFISを前記シリアルATAバスを介して前記デバイスに送信し、
前記シーケンスコントローラは、
前記レジスタFISに対応するFISを前記シリアルATAインターフェースが前記デバイスから受信した場合に、前記ホストから発行された前記ATAコマンドの転送シーケンス制御として、受信したFISの種類に応じた転送シーケンス制御を行うと共に、
前記ホストから発行された前記ATAコマンドが前記アイデンティファイ・デバイス・コマンドであった場合には、前記アイデンティファイ・デバイス情報が設定されたデータFISを受信したときに、前記アイデンティファイ・デバイス・コマンドに対応する転送シーケンス制御を行うことを特徴とするデータ転送制御装置。
In any one of Claims 1 to 12,
The serial ATA interface is
When the host issues an ATA command via the parallel ATA bus, a register FIS including the issued ATA command is transmitted to the device via the serial ATA bus;
The sequence controller is
When the FIS corresponding to the register FIS is received from the device by the serial ATA interface, as the transfer sequence control of the ATA command issued from the host, transfer sequence control corresponding to the type of received FIS is performed. ,
When the ATA command issued from the host is the identified device command, when the data FIS in which the identified device information is set is received, the identified device A data transfer control device that performs transfer sequence control corresponding to a command.
請求項1乃至13のいずれかに記載のデータ転送制御装置と、
前記データ転送制御装置に接続される前記ホストと、
前記データ転送制御装置に接続される前記デバイスと、
を含むことを特徴とする電子機器。
A data transfer control device according to any one of claims 1 to 13,
The host connected to the data transfer control device;
The device connected to the data transfer control device;
An electronic device comprising:
JP2007202055A 2007-08-02 2007-08-02 Data transfer control device and electronic device Pending JP2009037479A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007202055A JP2009037479A (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
JP2007202055A JP2009037479A (en) 2007-08-02 2007-08-02 Data transfer control device and electronic device

Publications (1)

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

Family

ID=40439313

Family Applications (1)

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

Country Status (1)

Country Link
JP (1) JP2009037479A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868159A (en) * 2020-06-30 2021-12-31 中车株洲电力机车研究所有限公司 IO module, in-module master control device and in-module interface device identification method
CN114721984A (en) * 2022-03-30 2022-07-08 湖南长城银河科技有限公司 SATA interface data transmission method and system for low-delay application

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113868159A (en) * 2020-06-30 2021-12-31 中车株洲电力机车研究所有限公司 IO module, in-module master control device and in-module interface device identification method
CN114721984A (en) * 2022-03-30 2022-07-08 湖南长城银河科技有限公司 SATA interface data transmission method and system for low-delay application
CN114721984B (en) * 2022-03-30 2024-03-26 湖南长城银河科技有限公司 SATA interface data transmission method and system for low-delay application

Similar Documents

Publication Publication Date Title
US7739419B2 (en) Data transfer control device and electronic instrument
TWI452469B (en) Pcie mass storage device, system having the same, and method for operating the same
US7069350B2 (en) Data transfer control system, electronic instrument, and data transfer control method
KR101035225B1 (en) Controller apparatus and method for improved data transfer
US7225288B2 (en) Extended host controller test mode support for use with full-speed USB devices
JP2008090375A (en) Interrupt control system and storage control system using the same
JP4434218B2 (en) Data transfer control device and electronic device
US6148384A (en) Decoupled serial memory access with passkey protected memory areas
US10896119B1 (en) Common input/output interface for application and debug circuitry
JP3636160B2 (en) Data transfer control device, electronic device, and data transfer control method
JP2008242701A (en) Data transfer controller and electronic device
JP4404023B2 (en) Data transfer control device and electronic device
JP2009037479A (en) Data transfer control device and electronic device
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
JP2009037474A (en) Data transfer control device and electronic device
JP2005520248A (en) USB host controller
KR101109600B1 (en) Method for transmitting data using direct memory access control and apparatus therefor
JP2008204048A (en) Data transfer control device and electronic device
JP2008293154A (en) Data transfer control device and electronic device
JP2008204049A (en) Data transfer control device and electronic device
JP2009037475A (en) Data transfer control device and electronic device
JP2009032011A (en) Data transfer control device and electronic device
JP2008204050A (en) Data transfer control device and electronic device
JP2009026165A (en) Controller, electronic apparatus, and method for controlling electronic apparatus