[go: up one dir, main page]

JP3941096B2 - Data transfer method in bus interface and bus interface - Google Patents

Data transfer method in bus interface and bus interface Download PDF

Info

Publication number
JP3941096B2
JP3941096B2 JP2001361049A JP2001361049A JP3941096B2 JP 3941096 B2 JP3941096 B2 JP 3941096B2 JP 2001361049 A JP2001361049 A JP 2001361049A JP 2001361049 A JP2001361049 A JP 2001361049A JP 3941096 B2 JP3941096 B2 JP 3941096B2
Authority
JP
Japan
Prior art keywords
data
bus
transfer
command
output
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.)
Expired - Fee Related
Application number
JP2001361049A
Other languages
Japanese (ja)
Other versions
JP2003162499A (en
Inventor
誠 豊島
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP2001361049A priority Critical patent/JP3941096B2/en
Publication of JP2003162499A publication Critical patent/JP2003162499A/en
Application granted granted Critical
Publication of JP3941096B2 publication Critical patent/JP3941096B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Transfer Systems (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、映像信号、音声信号、圧縮信号またはデータ信号など、種々のデータの転送を行うためのバス・インタフェースおよびバス・インタフェースにおけるデータ転送方法に関する。
【0002】
【従来の技術】
例えばコンピュータにおいては、CPU(Central Processing Unit)と入出力制御装置などの各デバイス同士をバスと呼ばれる共通の伝送路で接続し、そのバスを介して、各デバイス間でデータの伝送が行われる。バスの代表的なものとしては、PCI(Peripheral Component Interconnect)規格のバス(PCIバス)が知られている。PCIでのデータ転送は、マスタとターゲットとの間で行われる。一般には、CPUがマスタとなり、ターゲットとなるデバイスのアドレスを指定してデータの転送を行う。また、PCIバス上では、基本的にCPU経由でデータの転送を行っている。
【0003】
【発明が解決しようとする課題】
しかしながら、PCIでは、バス全体として単一のクロック信号に基づいてデータ転送を行っているため、各デバイス間でのクロック信号の遅延差が生じやすくなる。このクロック信号の遅延差は、特に、物理的な延長を行った場合、および高クロックで高速なデータ転送を行う場合などに問題となってくる。このため、PCIでは、バスの物理的延長を行うこと、ならびに高速なデータ転送を安定して行うことなどに困難性がある。
【0004】
本発明はかかる問題点に鑑みてなされたもので、その目的は、データ転送の高速化と安定化を図ると共に、バスの物理的な延長を容易に行うことができるバス・インタフェースにおけるデータ転送方法およびバス・インタフェースを提供することにある。
【0005】
【課題を解決するための手段】
本発明によるバス・インタフェースにおけるデータ転送方法は、転送データの送受信を行う複数の転送用デバイスと、複数の転送用デバイスの制御を行う制御用デバイスと、制御用デバイスおよび各転送用デバイス同士を複数の信号線によって相互接続するバスとを備え、制御用デバイスからの制御コマンドに従って、制御コマンドで指示された複数の転送用デバイス間でバスを介して転送データの送受信を行うようになされたバス・インタフェースにおけるデータ転送方法であって、制御用デバイスと複数の転送用デバイスとにおいて、制御コマンドの出力と転送データの送受信とを異なるクロック信号に基づいて行うようにしたものである。
より具体的には、制御用デバイスから、バス全体の基準となる基準クロック信号をバス上に出力すると共に、その基準クロック信号に同期して、制御コマンドをバス上に出力し、各転送用デバイスにおいて、基準クロック信号に基づいてデータ転送用の他のクロック信号を生成し、その生成されたデータ転送用の他のクロック信号に同期して、複数の転送用デバイス間で転送データの送受信を行うようにしたものである。
【0006】
本発明によるバス・インタフェースは、転送データの送受信を行う複数の転送用デバイスと、複数の転送用デバイスの制御を行う制御用デバイスと、制御用デバイスおよび各転送用デバイス同士を複数の信号線によって相互接続するバスとを備え、制御用デバイスからの制御コマンドに従って、制御コマンドで指示された複数の転送用デバイス間でバスを介して転送データの送受信を行うようにし、制御用デバイスと複数の転送用デバイスとにおいて、制御コマンドの出力と転送データの送受信とを異なるクロック信号に基づいて行うように構成したものである。
より具体的には、制御用デバイスが、バス全体の基準となる基準クロック信号をバス上に出力すると共に、その基準クロック信号に同期して、制御コマンドをバス上に出力し、各転送用デバイスが、基準クロック信号に基づいてデータ転送用の他のクロック信号を生成し、その生成されたデータ転送用の他のクロック信号に同期して、複数の転送用デバイス間で転送データの送受信を行うように構成されているものである。
【0007】
本発明によるバス・インタフェースにおけるデータ転送方法およびバス・インタフェースでは、制御用デバイスと複数の転送用デバイスとにおいて、制御コマンドの出力と転送データの送受信とが異なるクロック信号に基づいて行われる。
【0008】
異なるクロック信号は、以下のように出力される。制御用デバイスからは、バス全体の基準となる基準クロック信号が出力される。この基準クロック信号に同期して、制御コマンドがバス上に出力される。また、各転送用デバイスにおいて、基準クロック信号に基づいてデータ転送用の他のクロック信号が生成される。この他のクロック信号に同期して、複数の転送用デバイス間で転送データの送受信が行われる。
【0009】
【発明の実施の形態】
以下、本発明の実施の形態について図面を参照して詳細に説明する。
【0010】
本実施の形態に係るバス・インタフェースは、特に、画像データや通信データなどの大容量で高速性が要求されるデータを転送するのに適した汎用性のあるインタフェースである。このインタフェースの呼称は、仮に“SMASH Bus”とする(SMASHは、Sundry Material Associated Shower & Harvesterの略称)。
【0011】
<基本構造>
図1は、本インタフェースの標準の構成例(標準バスモード)を示している。本インタフェースは、バス30に、複数のインタフェース・デバイスを相互接続した構成となっている。各インタフェース・デバイスは、LSI(Large Scale Integration)などにより構成されるものである。各インタフェース・デバイスは、初期化時に、バス・マスタ(Bus Master)10またはアプリケーション(Application)20(20-1,20-2,…20-N;(N=1以上の整数))として設定される。バス・マスタ10は、バス全体を制御するものである。複数のインタフェース・デバイスのうち、1つのデバイスのみがこのバス・マスタ10として設定される。アプリケーション20は、データの転送を目的としたものであり、複数のインタフェース・デバイスのうち、バス・マスタ10以外の複数のデバイスが、アプリケーション20として設定される。アプリケーション20には、図示しないデータ転送装置またはデータ記録装置などが接続され、それらの装置との間でデータの入出力がなされるようになっている。
【0012】
バス・マスタ10およびアプリケーション20は、図示しない外部CPUとの通信を行うための入出力インタフェースを有している。バス・マスタ10およびアプリケーション20となるデバイスのそれぞれには、バス・インタフェースの初期化時に、各デバイス同士を識別するための固有のMID(Main ID)が設定されるようになっている。アプリケーション20には、図5を用いて後述するように、複数の論理入出力チャンネルの設定が可能となっている。各論理入出力チャンネルには、その構成に応じて、固有のSID(Sub ID)が設定されるようになっている。
【0013】
図2は、図1に示した標準バスモードを拡張した構成(拡張バスモード)を示している。この構成は、標準バスモードのバス構成に、拡張バス40を追加したものである。この拡張バスモードでは、バス・インタフェースの効率を上げるために、次のデータ転送の順番(優先度)を決めるためのステータス情報をステータスデータSDATAとして拡張バス40(の拡張ステータスデータ・バス41)で転送するようになっている。
【0014】
ここで、本実施の形態において、バス・マスタ10が、本発明における「制御用デバイス」の一具体例に対応する。また、アプリケーション20が、本発明における「転送用デバイス」の一具体例に対応する。
【0015】
図3は、本インタフェースの信号線の一覧を示している。図3において、「方向」のM(Master)の欄の“in”は、その信号線上の信号がバス・マスタ10側に入力されることを示す。また、「方向」のM(Master)の欄の“out”は、その信号線上の信号がバス・マスタ10側から出力されるものであることを示す。“in/out”は、信号の入出力が双方向であることを示す。同様に、「方向」のA(Application)の欄の“in”は、その信号線上の信号がアプリケーション20側に入力されることを示し、“out”は、その信号線上の信号がアプリケーション20側から出力されるものであることを示す。例えば、基準クロック信号CLKは、バス・マスタ10側から出力(out)され、アプリケーション20側に入力(in)される。
【0016】
標準バスモードでのバス30には、図1および図3に示したように、7種類の信号線が設けられている。すなわち、後述する制御コマンドCMDおよびデータ(DATA)の共通の信号線であるコマンド/データ・バス31と、各制御用の信号CLK,REF,FRAMEのための3つの信号線と、各割り込み信号TINT,RINT,BERR用の3つの信号線との7種類の信号線が設けられている。コマンド/データ・バス31は、標準として、32ビット幅のデータバスである。なお、コマンド/データ・バス31を、16ビット幅のバスとして設定することもできる。
【0017】
この標準バスモードでの各信号線に入出力される信号について簡単に説明すると、まず、基準クロック信号CLKは、バス30の基準となるクロックであり、バス・マスタ10からアプリケーション20へと出力されるものである。データ転送用クロック信号REFは、データ転送のためのクロックであり、このクロックに同期してコマンド/データ・バス31上にデータが出力される。これらのクロック信号CLK,REFのクロック周期は、基本的に同じである。フレーム信号FRAMEは、コマンド/データ・バス31上のデータの有効出力時間を示すものであり、コマンド/データ・バス31がデータ転送に使用されているか否かを確認するための信号として用いられる。3種類の割り込み信号TINT,RINT,BERRは、緊急時にバス制御を変更したい場合などに用いられるものであり、アプリケーション20からバス・マスタ10へと出力される。このうち、送信側割り込み信号TINTは、送信側のアプリケーション20から出力される割り込み信号である。受信側割り込み信号RINTは、受信側のアプリケーション20から出力される割り込み信号である。バス・エラー割り込み信号BERRは、データ転送のエラーを知らせるための割り込み信号であり、受信側のアプリケーション20から出力される。
【0018】
一方、拡張バスモードの拡張バス40には、図2および図3に示したように、データ転送の優先度に関連する制御コマンドおよびステータスデータSDATAの共通の信号線である拡張ステータスデータ・バス41と、拡張バス40における各制御用の信号SREF,SFRAME,SCMDのための3つの信号線との4種類の信号線が設けられている。
【0019】
この拡張バスモードでの各信号線に入出力される信号について簡単に説明すると、ステータス転送クロック信号SREFは、拡張バス40におけるデータ転送のためのクロックであり、このクロックに同期して拡張ステータスデータ・バス41上にデータが出力される。ステータス・フレーム信号SFRAMEは、拡張ステータスデータ・バス41上のデータの有効出力時間を示すものである。ステータス・コマンドSCMDは、拡張ステータスデータ・バス41上の信号が、ステータスデータSDATAであるか、コマンド信号CMDであるかの判別に用いられる。
<内部構造>
【0020】
バス・マスタ10となるデバイスは、図4(A)に示したように、IC(Integrated Circuit)化された制御回路部11を備えている。制御回路部11は、ステータスセンスデータ・メモリ(Status Sense Data Memory)81、プライオリティセレクト・レジスタ(Priority Select Register)82およびログ・メモリ(Log Memory)83を有している。制御回路部11はまた、タイムスタンプ・ジェネレータ(Time Stamp Generator)84を有している。
【0021】
ステータスセンスデータ・メモリ81は、すべての転送元(送信側)となるアプリケーション20のMID,SIDの情報を格納するメモリである。MID,SIDの情報は、例えば外部CPUによって初期化設定時に書き込まれる。プライオリティセレクト・レジスタ82は、後述するデータ転送の優先順位の情報を保持するメモリである。ログ・メモリ83は、各種エラー情報を記録するためのメモリである。エラー情報は、後述するStatus SenseコマンドおよびActive ID Setコマンドなどに対するステータス応答がなかった場合や、後述するCRCエラーが検出された場合などに記録される。タイムスタンプ・ジェネレータ84は、例えば32bitのカウンタである。
【0022】
アプリケーション20となるデバイスは、図4(B)に示したように、IC化された制御回路部21と、転送データが入出力される入出力ポート22とを備えている。制御回路部21は、バッファ・メモリ(Buffer Memory)91およびPIDメモリ(PID Memory)92を有している。制御回路部21はまた、タイムスタンプ・ジェネレータ(Time Stamp Generator)93と、レシーブドPIDメモリ(Recieved PID Memory)94とを有している。
【0023】
バッファ・メモリ91は、送受信するパケットデータを一時的に格納するためのメモリである。PIDメモリ92は、バッファ・メモリ91に格納されているパケットデータの情報を格納するためのメモリであり、例えば、パケットデータのサイズやTime Stamp値などの情報を格納する。レシーブドPIDメモリ94は、受信すべき送信側のアプリケーション20のMID,SIDの情報を格納するためのメモリである。受信すべきMID,SIDの情報は、例えば初期化設定時に書き込まれる。タイムスタンプ・ジェネレータ93は、バス・マスタ10のタイムスタンプ・ジェネレータ84と同様、例えば32bitのカウンタである。タイムスタンプ・ジェネレータ93で生成されるTime Stamp値(TM)は、バス転送に要する時間を算出し、各データ間の相対時間差を演算する場合に用いられる。TMは、リアルタイム性が要求される転送データ、例えばMPEG(Moving Picture Experts Group)規格のデータ、特にMPEG2−TS(Transport Stream)規格のデータを転送するときなどに利用される。
【0024】
アプリケーション20となる1つのデバイスには、入出力ポート22として、物理入出力ポートが4つ(ポート1〜4)設けられている。また、これら4つの物理入出力ポートの組み合わせにより、バス幅の異なる複数パターンの論理入出力チャンネルの設定が可能となっている。また、各ポートには、論理入出力チャンネルの構成に応じて、その識別子となるSIDが設定される。
【0025】
すなわち、図5(A)〜(D)に示したように例えば4種類の論理入出力チャンネルの設定が可能である。まず、各物理入出力ポートごとに設定された8ビットバス幅の4つの論理入出力チャンネルの構成(図5(A))。次に、2つの物理入出力ポートによって構成された1つの16ビットバス幅の論理入出力チャンネルと、他の2つの物理入出力ポートのそれぞれによって構成された2つの8ビットバス幅の論理入出力チャンネルとの構成(図5(B))。また、それぞれが2つの物理入出力ポートによって構成された2つの16ビットバス幅の論理入出力チャンネルの構成(図5(C))。また、4つの物理入出力ポートによって構成された1つの32ビットバス幅の論理入出力チャンネルの構成(図5(D))。それぞれの構成において、SIDは、図示したように各論理入出力チャンネルに対応して設定される。
【0026】
図20および図21は、それぞれアプリケーション20およびバス・マスタ10におけるクロック関連の処理回路を示している。これらの図では、最終段または初段の回路のみを簡略化して示す。
【0027】
図20(A)に示したように、アプリケーション20の送信側(Transmission)の処理回路20Tは、F/F回路(フリップフロップ回路)51,52,53,54を有している。F/F回路51,52,53,54は、それぞれ、FRAME,DATA,TINT,BERRの各信号の処理回路として設けられている。F/F回路51,52,53,54のクロック端子には、基準クロック信号CLKが入力される。送信側の処理回路20Tは、また、データ転送用クロック信号REFを遅延させるためのディレイ回路を有している。
【0028】
図20(B)に示したように、アプリケーション20の受信側(Reception)の処理回路20Rは、F/F回路55,56,57,58を有している。F/F回路55,56は、それぞれFRAME,DATAの各信号の処理回路として設けられている。F/F回路55,56のクロック端子には、データ転送用クロック信号REFが入力される。F/F回路57,58は、それぞれRINT,BERRの各信号の処理回路として設けられている。F/F回路57,58のクロック端子には、基準クロック信号CLKが入力される。
【0029】
図21に示したように、バス・マスタ10は、F/F回路61〜67を有している。F/F回路61,62は、それぞれ、FRAME,DATAの各信号の最終段の処理回路として設けられている。F/F回路63,64は、それぞれ、FRAME,DATAの各信号の入力段の処理回路として設けられている。F/F回路65,66,67は、それぞれTINT,RINT,BERRの各信号の処理回路として設けられている。
【0030】
<ドライブ特性>
従来、PCIなどの一般的なバスにおけるドライバとして、C−MOS(Complementary Metal-Oxide Semiconductor)やLVTTL(Low Voltage TTL)などの特性が使用されているが、これらは、本インタフェースのように高い動作周波数(100MHZ以上)のバス構成を考えた場合、ドライブ駆動能力や対ノイズ特性の点で不適切である。本インタフェースにおいては、100MHZを超えるような動作周波数を実現するために、バスドライバとしてLVDS(Low Voltage Differential Signaling)またはBLVDS(Bus LVDS)を採用している。
【0031】
図6に、LVDS,BLVDSおよびC−MOSの主要な特性を比較して示す。図6に示したように、LVDS,BLVDSは、C−MOSに比べて低電力、低ノイズであることなどの利点がある。例えばBLVDSをドライバとして使用することにより、1チャンネル当たり最低でも200Mbpsの転送速度が保持できる。また、接続できるドライバ数も20個以上になる。
【0032】
図7(B)は、BLVDSを用いたバスの構成例を示している。この例では、バス113に一対のドライバ111とレシーバ112とが複数接続された構成となっている。バス113の両端は抵抗RTにより終端されている。ドライバ111は、図7(A)に示したように、入力信号DIN,DEに応じて信号DO+,DO−を出力する。レシーバ112は、差動入力回路となっている。レシーバ112は、信号RI+,RI−,REの入力に応じて信号ROUTを出力する。ドライバ111およびレシーバ112の出力は、共にトライステート(3ステート)となっている。図7(B)に示した構成により、マルチポイント間での双方向のデータ通信が可能となる。
【0033】
<主な仕様>
図8(A),(B)に、本インタフェースの特性および機能を、PCIバスと比較して示す。
【0034】
図8(A)に示したように、PCIにおいては信号の制御線が標準で17本あるのに対し、本インタフェースでは、3本のみであり、制御の簡易化が図られている。これは、制御コマンドとデータとを共にコマンド/データ・バス31上に出力するようにしたことによる。また、動作周波数(バスクロック)は100MHz以上であり、PCIに比べて高い周波数となっている。転送レートに関しては、3Gbps以上の転送速度を有している。従って、本インタフェースは、PCIで標準的に用いられているバス幅32ビット、クロック周波数33MHZの3倍以上の転送レートを有している。このスペックには余力があるため、より高速なデータ転送が可能である。データの転送方式は、PCIではバースト転送(複数バイトのデータのブロックを連続して一気に転送する方法)となっているが、本インタフェースでは、パケット方式となっている。
【0035】
本インタフェースは、主として画像ならびに通信データなどの転送を最適に行うことができるように、図8(B)に示した機能を有している。以下、各機能の概略を説明する。
【0036】
・複数の受信(Multi Cast)
本インタフェースでは、ある時間において、コマンド/データ・バス31上に存在するデータは、1つの送信側のアプリケーション20からのデータのみとなっている。しかし、その出力データは、複数の受信側のアプリケーション20で受けることができる。そのため、受信側のアプリケーション20は、必要なデータだけを受け取り、不必要なデータに関しては無視する機能を持っている。受信側のアプリケーション20は、送られてきたパケットデータに含まれる送信側のアプリケーション20のMID,SIDの情報に応じて、必要であればデータを受信する。なお、PCIでは、データの送受信がデバイス間で1対1となっており、複数の受信には対応していない。
【0037】
・多重化(Multiplex)
本インタフェースでは、複数の送信側のアプリケーション20から出力されたデータを、バス上で時分割的に多重化して転送することができる。受信側のアプリケーション20は、複数の別々の送信側のデータに対して、指定したデータのみを選択的に受信することができる。
【0038】
・複数のデータ幅(Multi Width)
本インタフェースでは、データ幅は決まっておらず、可変となっている。従って、コマンド/データ・バス31が例えば32ビット幅の場合、データ幅を8ビットにすれば、同時に4つのデータが転送できることになる。同様に、データ幅を16ビットにすれば2つのデータが転送できる。なお、PCIでは、例えばバス幅が32ビットで、16ビット幅のデータが複数ある場合、複数のデータを同時にまとめて転送することはできない。この場合、16ビットのデータに「null」のデータを加えて形式上32ビットのデータにし、複数回データ転送を行う必要がある。
【0039】
・転送の優先指定(Data Priority)
複数のアプリケーション20で送りたいデータがある場合、各データに優先度を付けることができる。これにより、あまり遅れては困るようなデータに対して高い優先度を与えておけば、そのデータを優先して転送することができる。優先度の情報は、各アプリケーション20において生成され、それがステータスデータとしてバス・マスタ10に送られる。優先度の情報は、図27を用いて後述するように、バッファメモリ91(図4(B))内におけるデータの格納状況などに基づいて生成される。
【0040】
・MPEG2−TS対応
本インタフェースは、MPEG規格、特にMPEG2−TSのデータ転送にも対応している。MPEG2−TSのデータ転送には、リアルタイム性が要求され、データ転送の時刻管理を行う必要がある。この時刻管理のために、Time Stampの機能が設けられている。
【0041】
・伝送エラー対策
例えば、バス・マスタ10からの各種制御コマンド(後述するStatus SenseコマンドおよびActive ID Setコマンドなど)に対する応答がない場合、ならびにデータ転送時にCRCエラーが生じた場合などには、再度コマンドまたはデータの伝送を試みる処理(リトライ)を行う機能がある。また、リトライした状況をログ・メモリ83に記録する機能がある。なお、PCIでは、伝送エラーの検出とその通知をする機能はあるものの、リトライを行う機能はない。
【0042】
<パケット構成>
本インタフェースでは、転送時のデータ構成としてパケット形式を採用しており、転送速度が許容されれば任意のデータ長を転送可能となっている。図9(A),(B)は、そのパケット構成を示している。パケット構成は、コマンド転送の場合(図9(A))とデータ転送の場合(図9(B))とで異なっている。
【0043】
コマンド転送の場合は、全体として32ビットまたは64ビット構成のパケットとなる。構成要素としては、制御コマンドが入るCMDフィールドと、制御コマンドに付随するパラメータが入るPR1,PR2フィールドとがある。PR2は、64ビット構成の場合に設けられるものであり、32ビット構成の場合は設けられない。
【0044】
・CMD
制御コマンドは8ビットで定義される。ただし、使用できるアドレス範囲はh00〜hBF(0〜1111)までとなっている。hC0〜hFFまでは、データ転送のパケットに使用される。上位6ビットでコマンドの種類を表し、下位2ビットは、コマンドを実行するデバイスの範囲を示している。下位2ビットの意味は以下のとおりである。
b00:すべてのデバイスとポートに対して実行する。
b01:PR1の中にあるMIDで指定されたデバイスのみに実行する。
b02:PR1の中にあるMIDで指定されたデバイスのSIDで指定されたポートに対して実行する。
b03:未定義
・PR1,PR2
コマンドに付随するパラメータ。PR1は24ビット、PR2は32ビットで構成されている。PR1の基本構成は、上位7ビットがMIDを、5ビットがSIDを、下位12ビットが実質的なパラメータを示している。ただし、PR1,PR2は、コマンドの種類によって内容が変わる。
【0045】
データ転送の場合のパケット構成は、大まかに分類して、パケットの種類を示すheader部分と、データが格納されるpayload部分と、パケットが正常に転送されたか否かを確認するためのCRC部分とに分かれている。
【0046】
header部分は、以下で説明するように、64ビット構成の場合には、TMフィールドが追加される。
【0047】
・header
CD:Commmand/Data(2bit)……パケットがコマンド転送かデータ転送かを判断するためのコード。データ転送の場合は、b11が割り当てられている。
MD:Header Mode(2bit)……パケットのヘッダフォーマットのモードを決めるコード。以下の4つのコードがある。
0:LN+MID+SID(32bit)……最小ヘッダフォーマット。転送に必要な最低限のパラメータが設定される。
1:LN+MID+SID+TM(64bit)……最小ヘッダフォーマットにTMが追加された追加ヘッダフォーマット。MPEG2−TSのデータなど、入力と出力の同期を取りたいときなどに使用する。
2,3:未定義
LN:Length of Payload(13bit)……payload部分の長さを設定する。単位はバイト単位で0〜81111の値まで設定できる。
MID:Main ID(7bit)……このデータを出力したバス上に接続されているデバイスのMain IDを設定する。これにより、どのデバイスからのデータであるかを判断する。
SID:Sub ID(5bit)……このデータを出力したバス上に接続されているデバイスのSub IDを設定する。Main IDと合わせることにより、どのデバイスのどのポートからのデータであるかを判断する。
TM:Time Stamp(32bit)……基本的には、MPEG2−TSのデータを転送するときに使用される。Time Stampは、システムにおいて同時刻で同じ値を示すもので、データが、バス30に接続されているデバイスに入力された時間を設定する。MPEG2−TSに用いられる場合は、MPEG2−TSのPCR(program clock reference)のbaseの下位23ビットとextensionの9ビットを設定する。
【0048】
・payload
転送するデータを格納するための領域。データの長さはヘッダのLNで指定される。8ビットを基本単位としているが、例えば図10および図11に示したようにデータの構成は任意に設定できる。最後のデータがバス幅に対して足りない長さである場合には、空いている部分に‘0’を入れて転送する。
【0049】
・CRC
正常にデータ転送が行われたか否かを確認するためのデータである。CRCにより、伝送上のビット・エラーを検出できる。データの生成方法は、8ビット単位で行う。コマンド/データ・バス31として32ビット幅のバスを使用している場合は、4つのCRCのデータが生成され、それぞれ独立している。そのため、CRCの長さはバス幅で決まり、8ビット単位での拡張ができるような構成になっている。
【0050】
CRCの計算方法は、以下のように、式(1)で表される生成多項式G(X)を用いて、[数1]で示したように行う。payloadで‘0’が入った場合は、それも含めて計算を行う。
【0051】
G(X)=X8+X6+X5+X3+1 ……(1)
【0052】
【数1】

Figure 0003941096
【0053】
図12は、CRCの計算を行うための基本回路を示している。この基本回路は、マトリクス演算回路71とシフトレジスタ72とを備えて構成されている。シフトレジスタ72の初期状態は、hFFである。マトリクス演算回路71から出力されたデータTは、シフトレジスタ72を介してOD(current data)として出力される。ODは、マトリクス演算回路71にも出力される。マトリクス演算回路71では、ID(input data)とODとに対して[数1]で示したような所定のマトリクス演算を施す。
【0054】
ところで、本インタフェースにおいて、コマンド/データ・バス31のバス幅は、標準で32ビットであるが、16ビット幅に設定することも可能である。データ転送の場合のパケット構成は、コマンド/データ・バス31のバス幅とpayloadに格納されるデータの長さとに応じた構造となる。
【0055】
図10(A)〜図10(D)は、バス幅を32ビットに設定してデータ転送を行う場合のパケット構造の例である。このうち、図10(A)は、payloadに8ビット幅のデータを16バイト格納して転送する場合のデータの並びを示している。D1〜D16が、payloadに格納されるデータである。C1〜C4は、CRCのデータを示す。図10(B)は、payloadに8つの16ビットデータ(D1〜D8)を格納して転送する場合のデータの並びを示している。図10(C)は、payloadに5つの24ビットデータ(D1〜D5)を格納して転送する場合のデータの並びを示している。この場合、最後のデータD5がバス幅に対して足りない長さとなるので、空き部分に‘0’が入る。図10(D)は、payloadに4つの32ビットデータ(D1〜D4)を格納して転送する場合のデータの並びを示している。
【0056】
図11(A)〜図11(D)は、バス幅を16ビットに設定してデータ転送を行う場合のパケット構造の例である。このうち、図11(A)は、payloadに16個の8ビットデータ(D1〜D16)を格納して転送する場合のデータの並びを示している。図11(B)は、payloadに8つの16ビットデータ(D1〜D8)を格納して転送する場合のデータの並びを示している。図11(C)は、payloadに5つの24ビットデータ(D1〜D5)を格納して転送する場合のデータの並びを示している。この場合にも、図10(C)の場合と同様、最後のデータD5の後に‘0’が入る。図11(D)は、payloadに4つの32ビットデータ(D1〜D4)を格納して転送する場合のデータの並びを示している。
【0057】
図10(A)〜図10(D)および図11(A)〜図11(D)に示したパケット構造では、1つのパケット内に複数のデータが格納された構造となっているが、これら複数のデータは、同一種類のデータを分割したものであっても良いし、それぞれが異なる種類のデータであっても良い。このように、データ幅の設定を可変にし、1つのパケット内に同一または複数種類のデータを含めることで、同一または複数種類のデータを、複数個同時にバス上に出力することが可能になる。
【0058】
また、図10(A)〜図10(D)および図11(A)〜図11(D)に示したパケット構造は、すべてバッファ・メモリ91を利用して構築しても良いし、論理入出力チャンネルの設定に対応付けて構築するようにしても良い。例えば、図5(A)に示したように論理入出力チャンネルの設定がなされていれば、図10(A)に示したパケット構造を簡単に実現できる。また例えば、図5(C)に示したように論理入出力チャンネルの設定がなされていれば、図10(B)に示したパケット構造を簡単に実現できる。このように、論理入出力チャンネルの設定に応じて1つのパケット内に同一または複数種類のデータを含めることができる。
【0059】
<コマンドの概要>
本インタフェースの制御は、バス・マスタ10となるデバイスが制御コマンドを送り、各アプリケーション20がそれを受け取り解釈・実行することで行われる。基本的な制御コマンドは、図13に示したとおりである。図13には、基本的な制御コマンドのみを示しているが、空いているコマンドのコードには他のものを定義することができる。
【0060】
図13に示したコマンドを大まかにグループ分けすると、初期化の場合に使用するコマンドとデータ転送のときに使用されていくコマンドとに分かれる。Initialize&Bus Control,PCR Control,Priority,Interruptのコマンドグループは、初期化の場合に使用する。また、Data Control,Statusは、データ転送のときに頻繁に使用する。
【0061】
次に、以上のように構成されたバス・インタフェースの動作を説明する。
【0062】
<バス全体の基本動作>
まず、図1の標準バスモードの接続例での基本的な動作について説明する。バス・マスタ10からは、本インタフェース全体の基準となる基準クロック信号CLKがそれ用の信号線に出力されると共に、その基準クロック信号CLKに同期したバス制御コマンドがコマンド/データ・バス31上に出力される。アプリケーション20側は、入力された基準クロック信号CLKを基に、バス・マスタ10から出力された制御コマンドを取り込み、そのコマンドに応じた処理を行う。制御コマンドの中には、アプリケーション20側からコマンド/データ・バス31上にデータを出力することを要求するものがある。その場合は、データ転送用クロック信号REFに同期して、アプリケーション20からコマンド/データ・バス31上にデータが出力される。
【0063】
バス・マスタ10は、常時バス30の占有状態などを監視しており、コマンド/データ・バス31上でのデータ転送が終了しているか否かを確認して、制御コマンドの出力タイミングを見計らっている。この確認は、フレーム信号FRAMEを確認することにより行う。また、緊急時にバス制御を変更したい場合などには、アプリケーション20側から割り込み信号TINT,RINT,BERRが出力される。この場合、バス・マスタ10は、割り込み信号TINT,RINT,BERRに応じたバス制御を行う。
【0064】
図2の拡張バスモードでは、さらに、バス30の効率を上げるために、次のデータ転送の順番を決めるためのステータスデータSDATAが拡張ステータスデータ・バス41上に出力される。この場合、バス・マスタ10は、送信側のアプリケーション20のステータスを読み込むためのコマンドを自動的に送出する。送信側のアプリケーション20は、バス・マスタ10からのコマンドに応答して、ステータスを拡張ステータスデータ・バス41上に送出する。バス・マスタ10は、拡張ステータスデータ・バス41を介して読み込んだ送信側のアプリケーション20のステータスから、優先度の情報を調べる。バス・マスタ10は、最も優先度の高い送信側のアプリケーション20からデータ転送を開始させるために、そのMID,SIDを指定したActive ID Setコマンドをバス上に送出する。指定された送信側のアプリケーション20は、Active ID Setコマンドに応答して、データをコマンド/データ・バス31上に出力し始める。
【0065】
ここで、本インタフェースの基本的な動作のアルゴリズムをまとめると、次のようになる。
【0066】
動作1:各デバイスのリセット直後は、すべての信号出力は停止している。
動作2:バス・マスタ10がコマンド信号CMDを出力する。
動作3:対応したアプリケーション20がデータを出力する。もし、データがない場合は動作4に進む。
動作4:データの出力が終わったときには、動作2に戻る。
【0067】
この基本動作は、3種類の割り込み信号TINT,RINT,BERRがアクティブになるか、バス・マスタ10を強制的にとめる以外に変わらない。
【0068】
<タイミングチャート>
次に、図14〜図18のタイミングチャートを参照して、バス・マスタ10からのコマンド信号CMDとそれに対するデータ(DATA,SDATA)の出力タイミングについて説明する。本インタフェースでは、データ転送に関し、バスを高速に使用するタイプ1(図14、図15)と安全性を考えたタイプ2(図16、図17)との2種類の転送方式がある。また、拡張バスモードにしたときのステータス転送に関しては、1種類(図18)のみとなる。
【0069】
図14の例は、コマンド信号CMDに対して出力データが存在する場合である。最初のコマンド信号CMD1(図14(D))がコマンド/データ・バス31を介してバス・マスタ10から送られてきた場合、それに対するデータDATA1(図14(D))は1クロックでアプリケーション20から送られる。DATA1は、例えば、標準的なバス幅である32ビット幅なら32ビット以下のデータ長ということになる。この最初のコマンド信号CMD1からDATA1までは、コマンド/データ・バス31に出力するデバイスがバス・マスタ10からアプリケーション20に切り替わるため、すなわち、コマンド信号CMD1はバス・マスタ10から出力され、DATA1はアプリケーション20から出力されるため、バスの切り替えの時間のために基準クロック信号CLK(図14(A))で最低1クロックの間隔を空ける必要がある。同様に、最初のDATA1から次のコマンド信号CMD2までも最低1クロックの間隔を空ける必要がある。
【0070】
コマンド信号CMD1およびDATA1に対応して、データ転送用クロック信号REF(図14(B))は、一度ロー(L)レベルになってからハイ(H)レベルになる。また、データフレーム信号FRAME(図14(C))は、コマンド信号CMD1およびDATA1が出力されている期間ではローレベルになる。データ転送用クロック信号REFならびにデータフレーム信号FRAMEは、信号を出力したデバイスから出力される。すなわち、バス・マスタ10は、コマンド信号CMD1と共に、信号REF,FRAMEを出力する。また、アプリケーション20は、DATA1と共に、信号REF,FRAMEを出力する。従って、各信号REF,FRAME,DATAを、同時刻に出力しているデバイス(アプリケーション20)は一つであるということになる。
【0071】
図14において、2番目のコマンド信号CMD2は、データ転送を1クロックでは送ることができなかったときの場合を示している。コマンド信号CMD2とそれに対する最初のデータDATA2との間には、バスの切り替わり時間のため1クロック以上の間隔を空ける必要がある。ただし、この場合には、各データDATA2〜DATA7の間には出力デバイスの切り替えはないため、アプリケーション20は連続してDATAの出力が可能となる。データ転送用クロック信号REFならびにデータフレーム信号FRAMEに関しては、DATAの転送数が変化しても動作は変わらず、1クロック単位でDATAに対して同じ動作を行う。
【0072】
図15の例は、コマンド信号CMDを連続して送る場合である。コマンド信号CMDはバス・マスタ10しか出力しないため、連続して送ることができる。データ転送用クロック信号REFならびにデータフレーム信号FRAMEに関しては、図14の例と同様に動作する。すなわち、この例では、コマンド信号CMDが出力されている期間アクティブ(ローレベル)となるデータフレーム信号FRAMEがバス・マスタ10から出力される。
【0073】
図16および図17は、図14および図15のタイプ1に比べて若干データ転送のスピードは落ちるが、バスの転送を確実にするための転送方式である。図16は、図14の例と同様、コマンド信号CMDに対してDATAが存在する場合であり、図17は、図15の例と同様、コマンド信号CMDを連続して送る場合である。この方式では、図14および図15のタイプ1に比べて、コマンド信号CMDならびにDATAの転送の最後の部分に、1クロック分のデータフレーム信号FRAMEがハイレベルになるサイクルがある。このモードでは、データフレーム信号FRAMEがハイレベルで基準クロック信号CLKが供給されるときは、バス・インタフェースの初期化を行うようになっている。これにより、ノイズなどでバスの転送が一時的に乱れても、このパケットのみデータの転送の誤りが止まって、次の正常な処理を早急に行うことが可能となる。
【0074】
図18は、拡張バスモード(図2)でのステータス転送時のタイミングを示している。拡張バスモードでは、できるだけ高速な転送を心がけるために標準バスのタイプ2(図16、図17)のものはない。拡張バスモードでは、ステータスデータSDATAを非常に高速に転送するため、一度間違って転送されても再度読み込むことにより正確なステータスを読むことが可能となる。
【0075】
拡張バスモードにおいて、バス・マスタ10からのコマンド信号CMDとそれに応答するステータスデータSDATA(図18(E))は、基準クロック信号CLK(図18(A))の1クロック単位で送られる。コマンド信号CMDからステータスデータSDATAまでの時間は、最低1クロック以上必要となる。ステータス転送クロック信号SREF(図18(B))およびステータス・フレーム信号SFRAME(図18(C))は、DATA転送時におけるデータ転送用クロック信号REFおよびデータフレーム信号FRAME(図14(B),(C))の場合と同様、コマンド信号CMDおよびステータスデータSDATAが出力されている期間ではローレベルになる。
【0076】
ステータス・コマンドSCMD(図18(D))は、拡張ステータスデータ・バス41上にコマンド信号CMDが出力されている場合にはハイレベルとなり、ステータスデータSDATAが出力されている場合にはローレベルとなる。なお、他の信号の出力タイミングについては、図14および図15に示した標準バスモードと同様である。
【0077】
<クロック関連の動作>
次に、クロック関連の処理について説明する。本インタフェースは、全体としては基準クロック信号CLKを基に動作している。このとき、データの転送が低速である場合には、基準クロック信号CLKとコマンド/データ・バス31上に出力されるデータとの遅延の差は無視できる状態であるとみなされる。しかしながら、高速な転送である場合には、この遅延差は無視できなくなり、検討が必要になってくる。
【0078】
まず、制御コマンドCMDに関してであるが、これはバス・マスタ10から出力される。また、基準クロック信号CLKも同じバス・マスタ10から出力されるため、基準クロック信号CLKの信号線とコマンド/データ・バス31とを平行に配線していけば、各アプリケーション20に対しては基準クロック信号CLKとコマンドとが伝わっていく遅延量は、ほぼ等しくなってくる。このため、制御コマンドCMDに関しては、基準クロック信号CLKを基準にしてアプリケーション20に取り込んでも問題が生じないことになる。
【0079】
一方、アプリケーション20から出力されるデータに関しては、どのアプリケーション20がデータを出力するかによって、バス・マスタ10ならびに他のアプリケーション20における、基準クロック信号CLKとデータとの遅延量が違ってきてしまう。これは、基準クロック信号CLKがバス・マスタ10から出力されるのに対して、コマンド/データ・バス31上のデータが任意のアプリケーション20から出力されてしまうためである。このため、バスの物理的長さによっては基準クロック信号CLKの1周期以上のデータ遅延が生じてしまう場合も考えられる。本インタフェースでは、これを解決するために、任意のアプリケーション20から出力されるデータに同期したデータ転送用のクロック信号REFを作っている。これにより、コマンド/データ・バス31上のデータに関してはデータ転送用クロック信号REFを基準に取り込めば遅延に関する問題はなくなる。
【0080】
以上のコマンド/データ・バス31上に出力される制御コマンドCMDおよびデータと、それを取り込むための基準となるクロック信号CLK,REFとの関係を、図19にまとめて示す。
【0081】
次に、図20および図21を参照して、各クロック信号の作用について説明する。
【0082】
図20(A)に示したように、アプリケーション20の送信側(Transmission)の回路20Tにおいては、入力された基準クロック信号CLKを、DATAならびにフレーム信号FRAMEの最終段のF/F回路51,52のクロック信号とする。データ転送用クロック信号REFは、基準クロック信号CLKにディレイ回路を通して作られる。このディレイ回路は、DATAとFRAMEの出力端子までの遅延量とREFの遅延量とを合わせるためのものである。
【0083】
図20(B)に示したように、アプリケーション20の受信側(Reception)の回路20Rにおいては、入力されたデータ転送用クロック信号REFを、初段のF/F回路55,56のクロック信号とする。F/F回路によりセットアップ時間のホールド時間を満足させる若干の調整が必要になってくるが、この時間は固定量であるため一定のディレイ回路で調整が可能である。
【0084】
図21に示したように、バス・マスタ10においては、内部で発生した基準クロック信号CLKを、DATAとフレーム信号FRAMEの最終段のF/F回路61,62のクロック信号とする。また、バス・マスタ10のデバイスをアプリケーション20として使用する場合は、Receptionの回路が追加される。
【0085】
割り込み信号TINT,RINT,BERRに関しては、基準クロック信号CLKと同期を取らなくても良いため、図20(A),(B)に示したように、アプリケーション20では単純に、入力された基準クロック信号CLKを、最終段のF/F回路53,54,57,58のクロック信号として出力する。バス・マスタ10においては、図21に示したように、内部で発生した基準クロック信号CLKを、初段のF/F回路65,66,67のクロック信号として入力信号をラッチする。
【0086】
<各機能によるデータ転送の例>
次に、図22〜図24を参照して、図8(B)に示したMulti Width(複数のデータ幅)、Multi Cast(複数の受信)、Multiplex(多重化)の各機能を用いたデータ転送の例について説明する。ここでは、バス30に、1つのバス・マスタ10と、4つのアプリケーション20-1,20-2,20-3,20-4とが接続された構成の場合を例に説明する。バス・マスタ10となるデバイスのMID(Main ID)は0とする。アプリケーション20-1,20-2,20-3,20-4となるデバイスのMIDはそれぞれ、MID1,MID2,MID3,MID4とする。各アプリケーション20-1,20-2,20-3,20-4は、複数の入出力ポートを有している。各アプリケーション20-1,20-2,20-3,20-4の入出力ポートには、その論理入出力チャンネルの設定(図5参照)に応じてSIDが付されている。バス30に接続しているデバイスの指定はMIDによって行うことができる。また、ポートの指定はSIDによって行うことができる。
【0087】
図22は、Multi Widthの機能を用いたデータ転送の例である。この例では、MID1のアプリケーション20-1のSID0のポートから出力されたデータD1が、MID3のアプリケーション20-3のSID0のポートへと転送される。また、アプリケーション20-1のSID1のポートから出力されたデータD2が、MID4のアプリケーション20-4のSID0のポートへと転送される。また、MID2のアプリケーション20-2のSID0のポートから出力されたデータD3が、MID3のアプリケーション20-3のSID2のポートへと転送される。また、アプリケーション20-2のSID2のポートから出力されたデータD4が、MID4のアプリケーション20-4のSID3のポートへと転送される。また、MID4のアプリケーション20-4のSID2のポートから出力されたデータD5が、MID1のアプリケーション20-1のSID3のポートへと転送される。
【0088】
図22の例において、アプリケーション20-1からは、2つのデータD1,D2が出力されているが、バス30のコマンド/データ・バス31が32ビット幅であれば、データD1,D2のデータ幅をそれぞれ例えば16ビットにすることにより、これらの2つのデータD1,D2を1つのパケットデータとして同時にバス上に出力することができる。これにより、バス幅を有効利用することができる。アプリケーション20-2から出力されるデータD3,D4についても同様である。
【0089】
図23は、Multi Castの機能を用いたデータ転送の例である。この例では、MID1のアプリケーション20-1のSID1のポートから出力されたデータD11が、MID3のアプリケーション20-3のSID1のポートとMID4のアプリケーション20-4のSID3のポートとに転送される。また、MID2のアプリケーション20-2のSID0のポートから出力されたデータD12が、MID3のアプリケーション20-3のSID2のポートとMID4のアプリケーション20-4のSID0のポートとに転送される。また、アプリケーション20-2のSID2のポートから出力されたデータD13が、MID3のアプリケーション20-3のSID0のポートとMID4のアプリケーション20-4のSID2のポートとに転送される。
【0090】
このように、Multi Castの機能により、1つのデバイスから出力されたデータを、複数のデバイスで受信することができる。この場合、送信側のデバイスは、転送データに自身のIDの情報を付加したパケットデータを送信する。受信側のデバイスは、送られてきたパケットデータに含まれる送信側のデバイスのMID,SIDの情報に応じて、必要であればデータを受信する。不必要であればそのデータに関しては無視する。
【0091】
図24は、Multiplexの機能を用いたデータ転送の例である。この例では、MID3のアプリケーション20-3のSID2のポートに、MID1のアプリケーション20-1のSID0のポートから出力されたデータD11と、アプリケーション20-1のSID1のポートから出力されたデータD12と、MID2のアプリケーション20-2のSID2のポートから出力されたデータD22とがバス上多重化されて転送される。また、MID4のアプリケーション20-4のSID0のポートに、MID1のアプリケーション20-1のSID2のポートから出力されたデータD13と、MID2のアプリケーション20-2のSID0のポートから出力されたデータD21とがバス上で多重化されて転送される。また、MID4のアプリケーション20-4のSID3のポートに、MID1のアプリケーション20-1のSID0のポートから出力されたデータD11と、アプリケーション20-1のSID1のポートから出力されたデータD12と、MID2のアプリケーション20-2のSID2のポートから出力されたデータD22と、アプリケーション20-2のSID3のポートから出力されたデータD23とが多重化されて転送される。
【0092】
このように、Multiplexの機能により、複数のデータを、バス上で時分割的に多重化し、1または複数のデバイスで受信することができる。受信側のデバイスは、多重化されたデータの各パケットデータに含まれる送信側のデバイスのMID,SIDの情報を見て、必要であればデータを受信する。不必要であればそのデータに関しては無視する。複数のデータは、バス・マスタ10の制御により、優先度を示すステータス情報に基づいて、時分割的に各送信側のデバイスから出力される。このとき、各送信側のデバイスは、転送するデータと共に、そのデータを出力していることを示すフレーム信号FRAMEを同時に出力する。バス・マスタ10は、フレーム信号FRAMEに基づいて、バス30の占有状態を監視すると共に、バスの占有状態に応じて制御コマンドを出力し、バス上で転送データが時分割的に多重化されるよう、各送信側のデバイスの制御を行う。
【0093】
<バス初期化の手順>
次に、図25の流れ図に従って、本インタフェースの初期化動作について説明する。この初期化動作は原則として電源投入直後1回のみ実施される。
【0094】
本インタフェースに電源が投入されると、まず、パワーオンリセット(ID取得)の処理が行われる(ステップS1)。電源投入後、各インタフェース・デバイスにはリセット信号が入り、各デバイスは初期状態になる。このとき、各デバイスのID(MID)が設定される。
【0095】
次に、マスタ取得処理が行われる(ステップS2)。すなわち、外部CPUによって、バス30に接続されているデバイスの一つが、バス・マスタ10として設定される。次に、バスの転送方式の設定処理が行われる(ステップS3)。バス・インタフェースの初期化のためにバス・マスタ10からResetコマンドが送られる場合がある。また、その次に、Transfer Protocol Setコマンドを送り、データ転送方式の決定を行う場合がある。
【0096】
さらに、MPEG2−TS使用時には、システムPCRの設定が行われる(ステップS4)。システム全体のPCRを合わせるために、PCR,Time StampならびにTime Stamp Offsetを設定する。
【0097】
<データ転送の手順>
図26は、データ転送の基本的な手順の一例を示している。最初に、バス・マスタ10は、送信側のデータの存在を調べるために、すべての送信側のアプリケーション20のステータスを読み込み、そのステータスを調べる処理を行う。この処理を行うため、バス・マスタ10は、まず、送信側のアプリケーション20のステータスを読み込むためのコマンド(Status Senseコマンド)を自動的にバス上に送出する(ステップS11)。送信側のアプリケーション20は、このバス・マスタ10からのコマンドに応答して、ステータスをバス30(のコマンド/データ・バス31または拡張ステータスデータ・バス41)に送る。このステータスには、データの優先度を示す情報が入っている。
【0098】
バス・マスタ10は、送信側のアプリケーション20から読み込んだステータスに含まれる優先度の情報を調べる(ステップS12)。そして、バス・マスタ10は、最も優先度の高い送信側のアプリケーション20からデータ転送を開始させるために、そのMID,SIDを指定したActive ID Setコマンドをバス上に送出する。指定されたMID,SIDを持った送信側のアプリケーション20は、データをコマンド/データ・バス31に出力し始める(ステップS13)。
【0099】
受信側のアプリケーション20は、送信側のアプリケーション20から出力されたデータを内部に取り込む。このとき、受信側のアプリケーション20は、パケット最後部のCRCデータをチェックすることにより、データを正常に受信できたか否かをチェックする(ステップS14)。CRCデータが正常な場合(ステップS14;Y)、1回目のデータ転送の処理は終了するが、送信側のアプリケーション20は、次のデータ転送に備え、Active ID Setコマンドを待つ。また、バス・マスタ10は、次のデータ転送を行うために、送信側のステータスを調べる処理を行う。
【0100】
一方、エラーを検出した場合(ステップS14;N)は、受信側のアプリケーション20は、エラー割り込み信号BERRをアクティブにしてバス・マスタ10にその旨を通知する。バス・マスタ10は、エラー割り込み信号BERRを検出すると、前もって設定されているエラー復帰動作を開始する(ステップS15)。このとき、場合によって再度データの読み込みが行われる。また、バス・マスタ10は、送信側割り込み信号TINTを検出した場合、送信側のアプリケーション20のステータスを読み出し、ステップS12の処理に進む。
【0101】
以上のように、基本的には、バス・マスタ10が送信側のアプリケーション20のステータスを読み込んで優先度を調べ、データの転送を行わせる、という処理を繰り返す。これにより、順次データの転送が行われる。しかしながら、より高速なデータ転送を行う場合は、ステータスを読み込む時間が惜しまれる場合がある。その場合は、ステータスの情報を読み込んだものに対して、最優先のものだけではなく、2番目のもの、あるいは3番目のものについても調べておき、それらを順番に転送することによりステータスの読み込みの回数を減らすことができる。この場合、転送に問題が生じるエラーが発生したときには、TINT,RINTならびにBERRの割り込み信号により制御することになる。
【0102】
<優先度に関するステータスデータ>
転送データの優先度を決定するのは、各データのステータスを基に行う。ステータスは、例えば、以下のようなDevice Status,TINT,Buffer Over,Priority StatusおよびData Existを含んで構成されている。
【0103】
・Device Status ……デバイスの有無を確認する。
・TINT ……転送側の割り込みが発生したかどうかの状態を示す。
・Buffer Over(BO) ……バッファにデータが入りきれなくなったかどうかの状態を示す。
・Buffer Full(BF) ……バッファが満杯かどうかの状態を示す。
・Priority Status ……データの優先度を示す。
・Data Exist(DE) ……データがバッファにあるかどうかの状態を示す。
【0104】
Device Statusは、送られてきたステータスの有効性を示す。優先度としては、TINTが最も優先度が高く、次にBuffer Over、Buffer Fullの順となっている。Data Existでデータがあった場合、Priority Statusの優先度を比較して、優先度の高いものを先に転送する。
【0105】
図27は、送信側のアプリケーション20において行われる、上述の優先度を示すステータスの生成方法の例を示している。Data Existは、OR回路101にバッファ・メモリ91(図4(B))内のパケット数を示すビットデータを入力することにより生成される。Data Existは、例えば1ビットのデータであり、フラグの状態は、データが存在すれば‘1’、データが存在しなければ‘0’となる。
【0106】
Priorityは、図示しない外部CPUまたはバス制御コマンドによって前もって設定された例えば8ビットのPriorityとバッファ・メモリ91内に格納されたパケット数とを、乗算回路102によって乗算し、その結果得られた例えば下位8ビットのデータとする。
【0107】
Buffer Fullは、前もって設定されたValue of Buffer Fullの値とバッファ・メモリ91内に格納されたパケット数とを、比較回路CMP2によって比較することにより得られる。Buffer Fullは、例えば1ビットのデータであり、フラグの状態は、バッファが満杯とみなされれば‘1’、満杯でなければ‘0’となる。Buffer Overも、Buffer Fullと同様、例えば1ビットのデータであり、前もって設定されたValue of Buffer Overの値とバッファ・メモリ91内に格納されたパケット数とを、比較回路CMP1によって比較することにより得られる。
【0108】
TINTは、前もって設定されたTINT条件(割り込み条件)に基づいて生成される。TINTは、例えば1ビットのデータであり、フラグの状態は、割り込みがあれば‘1’、割り込みがなければ‘0’となる。
【0109】
図27に示したステータス110のような構成にすることで、バス・マスタ10において、各送信側のアプリケーション20から得た複数のステータスデータの比較を行う場合、TINT,Buffer Over,Priority StatusおよびData Existのすべてのビットをまとめて比較すれば良いことになる。これにより、バス・マスタ10における比較用の回路の構成が非常に簡単になる。なお、あるステータスのすべてのビット値が‘0’である場合は、データがないと判断できる。
【0110】
<個々の動作>
次に、バス・マスタ10およびアプリケーション20の個々の動作についてより具体的に説明する。
【0111】
[バス・マスタの動作]
<Status Senseコマンドの送出>
図28は、バス・マスタ10によるStatus Senseコマンドの送出動作を示している。バス・マスタ10は、送信側(データの転送元)のすべてのアプリケーション20に対するStatus Senseコマンドを、コマンド/データ・バス31上に送出する(ステップS21)。拡張バスモードの場合には、拡張ステータスデータ・バス41上に送出する。送信側のアプリケーション20のMID,SIDの情報は、初期化設定時にバス・マスタ10内の所定のメモリ(ステータスセンスデータ・メモリ81)に格納されている。
【0112】
バス・マスタ10は、送信側のアプリケーション20からステータスの応答が得られれば(ステップS22;Y)、この処理を終了する。一方、ステータスの応答が得られなかった場合(ステップS22;N)には、バス・マスタ10は、あらかじめ設定された回数だけ、Status Senseコマンドの送出処理を繰り返す処理を行う。すなわち、設定された回数内であれば(ステップS23;N)、ステップS21の処理に戻る。設定された回数を超えていれば(ステップS23;Y)、ステータスの読み込みに失敗したとみなし(ステップS24)、その旨をエラー情報としてログ・メモリ83(図4(A))に記録する(ステップS25)。
【0113】
Status Senseコマンドの送出によりステータスが得られたら、次に、送信側のアプリケーション20に対してデータ転送を開始させるために、送信側のアプリケーション20に対してActive ID Setコマンドを送出する。このActive ID Setコマンドの送出先を決定する処理には複数の方法がある。1つ目の方法としては、得られたステータスに基づいて優先順位を作成し、それをプライオリティセレクト・レジスタ82に格納する。このプライオリティセレクト・レジスタ82に格納された優先順位に基づいて、Active ID Setコマンドを送出する。他の方法として、優先順位によらないでする方法もある。この場合、ステータスセンスデータ・メモリ81に格納されている順にStatus Senseコマンドを送出し、応答してきたステータス情報のDEフラグが1であれば、Active ID Setコマンドを送出する。さらに他の方法として、ステータスセンスデータ・メモリ81に書き込まれている順にActive ID Setコマンドを送出する方法もある。この場合、Status Senseコマンドの送出は行わない。
【0114】
<優先順位シーケンス>
ここでは、優先順位に基づいて、Active ID Setコマンドを送出してデータ転送を開始させる方法について説明する。図29に示したように、バス・マスタ10は、常時、送信側割り込み信号TINTの監視を行っている。送信側割り込み信号TINTの検出がなされた場合(ステップS31;Y)には、後述するステップS41以降の処理を行う。送信側割り込み信号TINTの検出がなされていない場合(ステップS31;N)には、ステータスセンスデータ・メモリ81から送信側のアプリケーション20のMID,SIDの情報を1つ得て(ステップS32)、そのMID,SIDのアプリケーション20に対してStatus Senseコマンドを送出する(ステップS33)。指定されたMID,SIDを持つアプリケーション20は、Status Senseコマンドに応答して、ステータスデータを送出する。
【0115】
応答してきたステータスデータのDE(Data Exist)フラグ(図27参照)が0であった場合(ステップS34;N)、バス・マスタ10は、ステータスセンスデータ・メモリ81の次のアドレスに格納されているMID,SIDの情報を得て、再びStatus Senseコマンドを送出する。より詳しくは、ステータスセンスデータ・メモリ81のアドレスを示すポインタを+1にし(ステップS38)、次に、そのポインタの示すアドレスが最後のアドレスを超えているか否かの判断を行う(ステップS39)。そのポインタの示すアドレスが最後のアドレスを超えておらず、有効なアドレス範囲内であれば(ステップS39;N)、ステップS32に戻り、ステータスセンスデータ・メモリ81から、そのポインタの指し示すアドレスに格納されたMID,SIDの情報を得て、再びStatus Senseコマンドを送出する。最後のアドレスを超えていれば(ステップS39;Y)、ステップS31へ戻る。
【0116】
一方、応答してきたステータスデータのDEフラグが1であった場合(ステップS34;Y)は、転送すべきデータが存在しているということなので、バス・マスタ10は、ステータスに含まれる優先度の情報に応じて、プライオリティセレクト・レジスタ82の内容を更新する。この場合、バス・マスタ10は、まず、プライオリティセレクト・レジスタ82に格納されている他のMID,SIDと優先順位を比較する(ステップS35)。プライオリティセレクト・レジスタ82は、優先度の高い4つの転送元の情報を格納しているので、優先順位の比較結果が4位以内であれば(ステップS36;Y)、プライオリティセレクト・レジスタ82の順位(Order)をあらたなものに変更し(ステップS37)、ステップS38の処理へ進む。優先順位の比較結果が4位以内でなければ(ステップS36;N)、プライオリティセレクト・レジスタ82の順位を変更することなく、ステップS38の処理へ進む。
【0117】
以上のようにして、バス・マスタ10は、ステータスセンスデータ・メモリ81のメモリアドレスの最後に格納されているMID,SIDになるまでStatus Senseコマンドを送出し、送信側の各アプリケーション20のステータスを調べる。
【0118】
一方、送信側割り込み信号TINTが検出された場合(ステップS31;Y)、バス・マスタ10は、TINT処理要求(TINT条件)のコマンドがオンであるか否かを調べる(ステップS41)。TINT処理要求のコマンドがオンである場合(ステップS41;Y)には、ステップS32へ進む。TINT処理要求のコマンドがオフであれば(ステップS41;N)、どのアプリケーション20からの割り込み要求であるのかを調べるための処理を行う。すなわち、まず、ステータスセンスデータ・メモリ81のアドレスを示すポインタを0にし(ステップS42)、ステータスセンスデータ・メモリ81に格納されたMID,SIDの情報を得て(ステップS43)、Status Senseコマンドを送出する(ステップS44)。
【0119】
応答してきたステータスデータの中のTINTフラグが0であれば(ステップS45;N)、バス・マスタ10は、次のアドレスに格納されているMID,SIDのステータスを調べるために、ステータスセンスデータ・メモリ81のアドレスを示すポインタを+1にし(ステップS46)、ステップS43に戻る。一方、応答してきたステータスデータの中のTINTフラグが1であれば(ステップS45;Y)、バス・マスタ10は、そのMID,SIDに関して、TINT処理要求のコマンドをオンにして(ステップS47)、ステップS31に戻る。
【0120】
図30は、図29の処理によって決定され、プライオリティセレクト・レジスタ82に格納された優先度の情報に基づいて、送信側のアプリケーション20に対してデータ転送を行わせる手順を示している。バス・マスタ10は、プライオリティセレクト・レジスタ82の中に、まだデータ転送を開始させていないものがあるか否かを調べる(ステップS51)。未送出のデータがなければ(ステップS51;N)、この判断を繰り返す。未送出のデータがあれば(ステップS51;Y)、プライオリティセレクト・レジスタ82に格納されているもののうち、最も優先度の高いMID,SIDの情報を得て(ステップS52)、その得られたMID,SIDのアプリケーション20に対してActive ID Setコマンドを送出する(ステップS53)。
【0121】
Active ID Setコマンドを送出後、所定の時間内に、指定されたMID,SIDのアプリケーション20からデータが転送開始されなければ(ステップS54;N)、バス・マスタ10は、あらかじめ設定された回数を超えるまで、Active ID Setコマンドを再送出する処理(リトライ)を繰り返す(ステップS56;N)。データの転送が開始された場合(ステップS54;Y)であっても、データの受信側からエラー割り込み信号BERRの出力があれば(ステップS55;Y)、バス・マスタ10は、リトライを行う。リトライの回数が設定回数を超えた場合(ステップS56;Y)には、ステップS51に戻る。エラー割り込み信号BERRの出力がなければ(ステップS55;N)、ステップS51に戻る。以上の処理を繰り返すことにより、プライオリティセレクト・レジスタ82に格納されたもののうち、優先度の高いMID,SIDを持つアプリケーション20から順にデータ転送が行われる。
【0122】
<エラー処理>
次に、伝送エラー対策としてバス・マスタ10が行うエラー処理について説明する。ここでは伝送エラーとして、Status Senseコマンドに対する無応答およびActive ID Setコマンドに対する無応答、ならびにバス・エラー割り込み信号BERRが検出された場合のエラー処理について説明する。
【0123】
(1)Status Senseコマンドに対する無応答の場合のエラー処理
バス・マスタ10は、Status Senseコマンドを送出しても、アプリケーション20からそれに対するステータス応答がなかった場合、設定された回数までStatus Senseコマンドの送出処理に関してリトライを行う。そして、設定されたリトライ回数に達した場合は、以後そのMID,SIDにはStatus Senseコマンドを送出しない。ただし、その後もStatus Senseコマンドを送出できるモードに設定することも可能である。また、リトライした状況はログ・メモリ83に記憶しておく。ログ・メモリ83の内容は、外部CPUから読み出すことが可能である。
【0124】
(2)Active ID Setコマンドに対する無応答の場合のエラー処理
バス・マスタ10は、Active ID Setコマンドを送出してもアプリケーション20からそれに対する応答がなかった場合、設定された回数までActive ID Setコマンドの送出処理に関してリトライを行う。そして、設定されたリトライ回数に達した場合は、以後そのMID,SIDにはStatus SenseコマンドおよびActive ID Setコマンドを送出しない。ただし、その後もそれらのコマンドを送出できるモードに設定することも可能である。また、リトライした状況はログ・メモリ83に記憶しておく。ログ・メモリ83の内容は、外部CPUから読み出すことが可能である。
【0125】
(3)バス・エラー割り込み信号BERRが検出された場合のエラー処理
例えば、送信側のアプリケーション20にActive ID Setコマンドを送出した後、受信側のアプリケーション20でCRCエラーが検出され、受信側のアプリケーション20からバス・エラー割り込み信号BERRが送出されたとする。この場合、バス・マスタ10は、設定された回数までActive ID Setコマンドの送出処理に関してリトライを行い、送信側のアプリケーション20に再度、データ転送を行わせる。設定されたリトライ回数に達した場合は、以後そのMID,SIDにはStatus SenseコマンドおよびActive ID Setコマンドを送出しない。ただし、その後もそれらのコマンドを送出できるモードに設定することも可能である。また、リトライした状況はログ・メモリ83に記憶しておく。ログ・メモリ83の内容は、外部CPUから読み出すことが可能である。
【0126】
[アプリケーションの動作]
<コマンド処理>
アプリケーション20は、バス・マスタ10からのコマンドを検出し、その処理を実行する。Active ID Setコマンドの場合は、コマンド/データ・バス31上にデータの送信を開始する。Status Senseコマンドを受け付けた場合は、要求に応じたステータスデータをコマンド/データ・バス31上に出力する。なお、拡張ステータスデータ・バス41でStatus Senseコマンドを受け付けた場合は拡張ステータスデータ・バス41へステータスデータを出力する。その他のコマンドを受け付けた場合は、即座に実行する。デバイス内に設定のないSIDを指定したコマンドなど無効なコマンドを受け取った場合は、そのコマンドを無視する。
【0127】
<受信パケット制御>
レシーブドPIDメモリ94(図4(B))に、受信すべき送信側のアプリケーション20のMID,SIDの情報をあらかじめ格納する。受信すべきMID,SIDの情報は、例えば初期化設定時にバス・マスタ10からコマンドに従って書き込まれる。コマンド/データ・バス31上のパケットデータの受信は、このレシーブドPIDメモリ94に格納されたMID,SIDの情報とそのパケットデータに含まれるMID,SIDとを比較して一致した場合に実行する。
【0128】
パケットデータの受信中はパケットデータに付加されているCRCデータに基づいてCRC演算を実施する。データ受信終了直後、CRCエラーがなければ正常にデータを受信したものとする。CRCエラーが生じた場合は、バス・エラー割り込み信号BERRをアクティブにし、そのときのデータは受信しなかったものとする。また、正しくパケットデータを受信した場合、受信パケットデータの存在を示すため、PIDメモリ92にそのパケットデータの情報を記録する。PIDメモリ92に記録する情報としては、データサイズやTime Stamp値などである。
【0129】
[タイムスタンプ・ジェネレータを利用した転送時間の計測]
本インタフェースは、タイムスタンプ・ジェネレータ93(図4(B))を利用することにより、転送データの送受信を行うのに要した時間を計測する機能を有している。次に、この転送時間の計測の機能について説明する。タイムスタンプ・ジェネレータ93のリセットは、バス・マスタ10からのリセット信号で行われる。バス・インタフェース全体として、Time Stampの値は同時刻で同じ値となる。すなわち、バス・マスタ10のタイムスタンプ・ジェネレータ84と各アプリケーション20のタイムスタンプ・ジェネレータ93は、互いに同期して動作し、それぞれ、同時刻において同一のタイムカウント値を出力する。
【0130】
以下、図31を参照して、転送時間の計測の方法を具体的に説明する。ここでは、MPEG2−TS規格のパケットデータを転送する場合を例に説明する。送信側のアプリケーション20Tは、外部からのパケットデータの入力が開始された時点におけるタイムスタンプ・ジェネレータ93のTime Stampの値を、PIDメモリ92に保存する。この値をTMinとする。この時、入力されたパケットデータのpayloadにはMPEG規格での時刻管理情報であるPCRが入っている。このPCRの値をPCRinとする。送信側のアプリケーション20Tは、これらTMinとPCRinとの値が含まれるパケットデータをコマンド/データ・バス31上に出力する。
【0131】
受信側のアプリケーション20Rは、受信したパケットデータを外部に出力するとき、その時点での自身のタイムスタンプ・ジェネレータ93の値(TMgen)とパケットデータに付加されてきたTime Stampの値TMinとを比較し、その差(TMdiff=TMgen−TMin)を求める。この求められた値TMdiffが、本インタフェースにおいてデータの送受信に要した時間、すなわち、データが送信側のアプリケーション20Tに入力されてから、受信側のアプリケーション20Rに転送され、出力されるまでの時間ということになる。
【0132】
受信側のアプリケーション20Rはまた、パケットデータに含まれる時刻管理情報であるPCR値PCRinの補正を行う。すなわち、前述の計測時間TMdiffを、PCR値PCRinに加算した値PCRoutを求める。
PCRout=PCRin+TMdiff
【0133】
最後に、バス全体のディレイ量を調整するために、あらかじめ設定されたTime Stamp Offset値(TMoffset)を、値PCRoutに加算する。これにより求められた値PCRrealが、実際に出力されるPCRの値となる。
PCRreal=PCRout+TMoffset
【0134】
以上説明したように、本実施の形態に係るバス・インタフェースおよびそのデータ転送方法によれば、コマンド/データ・バス31(および拡張ステータスデータ・バス41)上での制御コマンドの出力と転送データの送受信とをパケット形式で行うようにしたので、例えばPCIでのバースト転送と比較して、データの効率的な転送を行うことができる。
【0135】
また、制御コマンドと転送データとを、共にコマンド/データ・バス31上で転送するようにしたので、例えばPCIと比較して制御線の数を減らしたバス構成にすることができる。これにより、各デバイスの回路構成も含めてバス全体の構成をコンパクト化することが可能となると共に、バス制御の簡単化を図ることができる。
【0136】
また、バス・マスタ10による制御コマンドの出力と、各アプリケーション20における転送データの送受信とを別々のクロック信号CLK,REFに基づいて行うようにしたので、PCIのように単一のクロック信号のみに基づいて転送データの送受信を行う場合に比べて、データ転送の高速化と安定化を図ることができる。また、バスの物理的な延長も容易になる。
【0137】
また、1つのアプリケーション20から送信された転送データを、複数の受信側のアプリケーション20で受信する機能(Multi Cast機能)を有しているので、受信側のアプリケーション20が複数ある場合であっても適切なデータ転送が可能となる。さらに、複数の送信側のアプリケーション20から出力されたデータを、バス上で時分割的に多重化して転送する機能(Multiplex)を有しているので、特に、送信側のアプリケーション20が複数ある場合であっても適切なデータ転送が可能となる。
【0138】
また、制御コマンドの出力処理または転送データの送受信処理にエラーが生じた場合に、伝送エラー対策として、それらの処理の再試行(リトライ)を行うようにしたので、データ転送のエラーに適切に対処することができる。
【0139】
また、送信側のアプリケーション20から得たステータスデータに含まれる各転送データの優先度の情報に基づいて、バス・マスタ10が、各転送データの転送の順番を決定し、その順番に従ってデータ転送が行われるよう、送信側のアプリケーション20を制御するようにしたので、複数の転送データが存在する場合であっても、その優先度を考慮した適切なデータ転送を行うことができる。さらに、拡張バスモードでは、優先度を示す情報が含まれるステータスデータの送受信を、専用の拡張ステータスデータ・バス41によって行うようにしたので、優先度の情報を効率的に転送することができ、転送データの送受信をより効率的に行うことができる。
【0140】
また、タイムスタンプ・ジェネレータ93(図4(B))を利用することにより、転送データの送受信を行うのに要した時間を計測する機能を有しているので、リアルタイム性が要求されるデータ転送にも容易に対応できる。特に、その計測した時間に基づいて、MPEG2−TS規格のデータに含まれる時刻管理情報PCRの補正を行う機能をも有しているので、MPEG2−TS規格のデータに関して適切にデータ転送を行うことができる。
【0141】
また、データ幅の設定を可変にし、1つのパケット内に同一または複数種類のデータを複数含めることで、同一または複数種類のデータを、複数個同時にバス上に出力する機能(Multi Width)を有しているので、バス幅を有効利用して、データを効率的に転送することができる。例えば、個々の転送データの幅がバス幅より小さい場合などには、複数のデータを同時にバス上に出力することが可能になるので、PCIに比べて効率的なデータ転送を行うことができる。
【0142】
以上のことにより、映像信号、音声信号、圧縮信号、データ信号など、さまざまなデータを効率良く高速に転送することができ、また、転送時のエラーにも適切に対処できるなど、優れた機能を持つ汎用バスインタフェースを実現できる。
【0143】
【発明の効果】
以上説明したように、請求項1ないし3のいずれか1項に記載のバス・インタフェースにおけるデータ転送方法または請求項4記載のバス・インタフェースによれば、制御用デバイスと複数の転送用デバイスとにおいて、制御コマンドの出力と転送データの送受信とを異なるクロック信号に基づいて行うようにしたので、単一のクロック信号に基づいて転送データの送受信を行う場合に比べて、データ転送の高速化と安定化を図ることができると共に、バスの物理的な延長が容易になる。
【図面の簡単な説明】
【図1】本発明の一実施の形態に係るバス・インタフェースの標準的な構成例を示すブロック図である。
【図2】本発明の一実施の形態に係るバス・インタフェースの拡張された構成例を示すブロック図である。
【図3】本発明の一実施の形態に係るバス・インタフェースにおける信号線の一覧を示す説明図である。
【図4】本発明の一実施の形態に係るバス・インタフェースにおけるバス・マスタおよびアプリケーションの内部構成を示すブロック図である。
【図5】アプリケーションにおける論理入出力チャンネルの設定について示す説明図である。
【図6】各種バスドライバの特性を比較して示す説明図である。
【図7】BLVDSを用いたバスドライバの構成例を示す回路図である。
【図8】本発明の一実施の形態に係るバス・インタフェースの特性および機能を、PCIと比較して示す説明図である。
【図9】本発明の一実施の形態に係るバス・インタフェースにおいて転送されるコマンドおよびデータのパケット構造を示す説明図である。
【図10】データバスを32ビット幅に設定した場合の転送データのパケット構成の例を示す説明図である。
【図11】データバスを16ビット幅に設定した場合の転送データのパケット構成の例を示す説明図である。
【図12】CRCの計算を行うための基本回路を示す回路図である。
【図13】本発明の一実施の形態に係るバス・インタフェースにおいて使用される制御コマンドの概要を示した説明図である。
【図14】バスを高速に使用する場合において、コマンドに対してデータが存在するときの各信号の出力タイミングを示すタイミングチャートである。
【図15】バスを高速に使用する場合において、コマンドのみを連続して送る場合の各信号の出力タイミングを示すタイミングチャートである。
【図16】データ転送の安全性を重視した場合において、コマンドに対してデータが存在するときの各信号の出力タイミングを示すタイミングチャートである。
【図17】データ転送の安全性を重視した場合において、コマンドのみを連続して送る場合の各信号の出力タイミングを示すタイミングチャートである。
【図18】拡張バスモードでの各信号の出力タイミングを示すタイミングチャートである。
【図19】コマンド/データ・バス上に出力されるコマンドおよびデータと、それを取り込むための基準となるクロック信号との関係を示す説明図である。
【図20】アプリケーションの送信側および受信側のクロック関連の処理回路の構成例を示す回路図である。
【図21】バス・マスタにおけるクロック関連の処理回路の構成例を示す回路図である。
【図22】 Multi Widthの機能について説明するためのブロック図である。
【図23】 Multi Castの機能について説明するためのブロック図である。
【図24】 Multiplexの機能について説明するためのブロック図である。
【図25】本発明の一実施の形態に係るバス・インタフェースにおける初期化の手順を示す流れ図である。
【図26】本発明の一実施の形態に係るバス・インタフェースにおけるデータ転送の基本的な手順を示す流れ図である。
【図27】優先度を表すステータスの生成方法の例を示すブロック図である。
【図28】 Status Senseコマンドの送出するときのバス・マスタの動作を示す流れ図である。
【図29】データ転送の優先順位を決定するためのバス・マスタの動作を示す流れ図である。
【図30】図29の処理によって決定された優先順位に基づいて各アプリケーションにデータ転送を行わせるためのバス・マスタの動作を示す流れ図である。
【図31】タイムスタンプ・ジェネレータを用いた転送時間の計測の機能について説明するためのブロック図である。
【符号の説明】
10…バス・マスタ、11,21…制御回路部、20(20-1,…20-N)…アプリケーション、22…入出力ポート、30…バス、31…コマンド/データ・バス、40…拡張バス、41…拡張ステータスデータ・バス、81…ステータスセンスデータ・メモリ、82…プライオリティセレクト・レジスタ、83…ログ・メモリ、84,93…タイムスタンプ・ジェネレータ、91…バッファ・メモリ、92…PIDメモリ、94…レシーブドPIDメモリ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a bus interface for transferring various data such as a video signal, an audio signal, a compressed signal, or a data signal, and a data transfer method in the bus interface.
[0002]
[Prior art]
For example, in a computer, devices such as a CPU (Central Processing Unit) and an input / output control device are connected to each other via a common transmission path called a bus, and data is transmitted between the devices via the bus. As a typical bus, a PCI (Peripheral Component Interconnect) standard bus (PCI bus) is known. Data transfer by PCI is performed between the master and the target. In general, a CPU serves as a master and designates an address of a target device to transfer data. On the PCI bus, data is basically transferred via the CPU.
[0003]
[Problems to be solved by the invention]
However, in PCI, data transfer is performed based on a single clock signal for the entire bus, so that a delay difference in the clock signal between devices tends to occur. This delay difference of the clock signal becomes a problem particularly when physical extension is performed and when high-speed data transfer is performed with a high clock. For this reason, in PCI, there are difficulties in performing physical extension of the bus and stably performing high-speed data transfer.
[0004]
SUMMARY OF THE INVENTION The present invention has been made in view of such problems, and an object of the present invention is to provide a data transfer method in a bus interface that can increase the speed and stability of data transfer and can easily perform physical extension of the bus. And providing a bus interface.
[0005]
[Means for Solving the Problems]
  A data transfer method in a bus interface according to the present invention includes a plurality of transfer devices that transmit and receive transfer data, a control device that controls a plurality of transfer devices, a control device, and a plurality of transfer devices. A bus interconnected by a plurality of signal lines, and in accordance with a control command from the control device, a bus that transmits and receives transfer data between the plurality of transfer devices designated by the control command via the bus In the interface data transfer method, the control device and the plurality of transfer devices perform control command output and transfer data transmission / reception based on different clock signals.
More specifically, a reference clock signal serving as a reference for the entire bus is output from the control device to the bus, and a control command is output to the bus in synchronization with the reference clock signal. , Generates another clock signal for data transfer based on the reference clock signal, and transmits / receives transfer data between the plurality of transfer devices in synchronization with the generated other clock signal for data transfer It is what I did.
[0006]
  The bus interface according to the present invention includes a plurality of transfer devices that transmit and receive transfer data, a control device that controls a plurality of transfer devices, and a control device and each transfer device connected to each other by a plurality of signal lines. Interconnected buses, and in accordance with control commands from the control device, transfer data is transmitted and received between the multiple transfer devices specified by the control command via the bus. The control device outputs the control command and transmits / receives the transfer data based on different clock signals.
More specifically, the control device outputs a reference clock signal serving as a reference for the entire bus to the bus, and outputs a control command to the bus in synchronization with the reference clock signal. Generates another clock signal for data transfer based on the reference clock signal, and transmits / receives transfer data between a plurality of transfer devices in synchronization with the generated other clock signal for data transfer It is comprised as follows.
[0007]
In the data transfer method and bus interface in the bus interface according to the present invention, control command output and transfer data transmission / reception are performed based on different clock signals in the control device and the plurality of transfer devices.
[0008]
  Different clock signals,The output is as follows. The control device outputs a reference clock signal that serves as a reference for the entire bus. In synchronization with this reference clock signal, a control command is output on the bus. In each transfer device, GroupAnother clock signal for data transfer is generated based on the quasi-clock signal. In synchronization with the other clock signals, transfer data is transmitted and received between a plurality of transfer devices.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
[0010]
The bus interface according to the present embodiment is a versatile interface particularly suitable for transferring large-capacity and high-speed data such as image data and communication data. The name of this interface is assumed to be “SMASH Bus” (SMASH is an abbreviation for Sundry Material Associated Shower & Harvester).
[0011]
<Basic structure>
FIG. 1 shows a standard configuration example (standard bus mode) of this interface. This interface has a configuration in which a plurality of interface devices are interconnected to the bus 30. Each interface device is configured by an LSI (Large Scale Integration) or the like. Each interface device is set as a bus master 10 or an application 20 (20-1, 20-2,... 20-N; (N is an integer of 1 or more)) at the time of initialization. The The bus master 10 controls the entire bus. Of the plurality of interface devices, only one device is set as the bus master 10. The application 20 is intended for data transfer, and a plurality of devices other than the bus master 10 among the plurality of interface devices are set as the application 20. The application 20 is connected to a data transfer device or a data recording device (not shown) so that data can be input / output to / from these devices.
[0012]
The bus master 10 and the application 20 have an input / output interface for communicating with an external CPU (not shown). Each of the devices serving as the bus master 10 and the application 20 is set with a unique MID (Main ID) for identifying each device when the bus interface is initialized. As will be described later with reference to FIG. 5, a plurality of logical input / output channels can be set in the application 20. Each logical input / output channel is set with a unique SID (Sub ID) according to its configuration.
[0013]
FIG. 2 shows a configuration (extended bus mode) obtained by extending the standard bus mode shown in FIG. This configuration is obtained by adding an expansion bus 40 to the bus configuration in the standard bus mode. In this extended bus mode, in order to increase the efficiency of the bus interface, status information for determining the order (priority) of the next data transfer is set as status data SDATA in the extended bus 40 (the extended status data bus 41). It is supposed to transfer.
[0014]
Here, in the present embodiment, the bus master 10 corresponds to a specific example of “control device” in the present invention. The application 20 corresponds to a specific example of “transfer device” in the present invention.
[0015]
FIG. 3 shows a list of signal lines of this interface. In FIG. 3, “in” in the M (Master) column of “Direction” indicates that a signal on the signal line is input to the bus master 10 side. Further, “out” in the M (Master) column of “direction” indicates that a signal on the signal line is output from the bus master 10 side. “In / out” indicates that signal input / output is bidirectional. Similarly, “in” in the A (Application) column of “direction” indicates that the signal on the signal line is input to the application 20 side, and “out” indicates that the signal on the signal line is on the application 20 side. Indicates that it is output from. For example, the reference clock signal CLK is output (out) from the bus master 10 side and input (in) to the application 20 side.
[0016]
As shown in FIGS. 1 and 3, the bus 30 in the standard bus mode is provided with seven types of signal lines. That is, a command / data bus 31 which is a common signal line for a control command CMD and data (DATA), which will be described later, three signal lines for each control signal CLK, REF, and FRAME, and each interrupt signal TINT , RINT, BERR and three types of signal lines are provided. The command / data bus 31 is a 32-bit data bus as a standard. The command / data bus 31 can be set as a 16-bit bus.
[0017]
The signals input / output to / from each signal line in the standard bus mode will be briefly described. First, the reference clock signal CLK is a clock serving as a reference of the bus 30 and is output from the bus master 10 to the application 20. Is. The data transfer clock signal REF is a clock for data transfer, and data is output onto the command / data bus 31 in synchronization with this clock. The clock cycles of these clock signals CLK and REF are basically the same. The frame signal FRAME indicates the valid output time of data on the command / data bus 31, and is used as a signal for confirming whether or not the command / data bus 31 is used for data transfer. The three types of interrupt signals TINT, RINT, and BERR are used when it is desired to change the bus control in an emergency, and are output from the application 20 to the bus master 10. Among these, the transmission side interrupt signal TINT is an interrupt signal output from the application 20 on the transmission side. The reception-side interrupt signal RINT is an interrupt signal output from the reception-side application 20. The bus error interrupt signal BERR is an interrupt signal for informing a data transfer error, and is output from the receiving-side application 20.
[0018]
On the other hand, as shown in FIGS. 2 and 3, the extended bus 40 in the extended bus mode has an extended status data bus 41 which is a common signal line for the control command and status data SDATA related to the priority of data transfer. There are four types of signal lines including three signal lines for the control signals SREF, SFRAME, and SCMD in the expansion bus 40.
[0019]
The signals input / output to / from each signal line in the expansion bus mode will be briefly described. The status transfer clock signal SREF is a clock for data transfer in the expansion bus 40, and the expansion status data is synchronized with this clock. Data is output on the bus 41. The status frame signal SFRAME indicates the effective output time of data on the extended status data bus 41. The status command SCMD is used to determine whether the signal on the extended status data bus 41 is the status data SDATA or the command signal CMD.
<Internal structure>
[0020]
As shown in FIG. 4A, the device serving as the bus master 10 includes a control circuit unit 11 formed as an IC (Integrated Circuit). The control circuit unit 11 includes a status sense data memory 81, a priority select register 82, and a log memory 83. The control circuit unit 11 also has a time stamp generator 84.
[0021]
The status sense data memory 81 is a memory for storing information on MID and SID of the application 20 serving as all transfer sources (transmission side). MID and SID information is written, for example, by an external CPU when initialization is set. The priority select register 82 is a memory that holds data transfer priority information to be described later. The log memory 83 is a memory for recording various error information. The error information is recorded when there is no status response to a Status Sense command and an Active ID Set command to be described later, or when a CRC error to be described later is detected. The time stamp generator 84 is, for example, a 32-bit counter.
[0022]
As shown in FIG. 4B, the device serving as the application 20 includes a control circuit unit 21 formed as an IC and an input / output port 22 through which transfer data is input / output. The control circuit unit 21 includes a buffer memory 91 and a PID memory 92. The control circuit unit 21 also includes a time stamp generator 93 and a received PID memory 94.
[0023]
The buffer memory 91 is a memory for temporarily storing packet data to be transmitted / received. The PID memory 92 is a memory for storing packet data information stored in the buffer memory 91, and stores information such as the size of packet data and a time stamp value, for example. The received PID memory 94 is a memory for storing MID and SID information of the transmission-side application 20 to be received. Information on MID and SID to be received is written, for example, at the initialization setting. Similar to the time stamp generator 84 of the bus master 10, the time stamp generator 93 is a 32-bit counter, for example. The time stamp value (TM) generated by the time stamp generator 93 is used when calculating the time required for bus transfer and calculating the relative time difference between the data. The TM is used when transferring transfer data that requires real-time properties, for example, MPEG (Moving Picture Experts Group) standard data, particularly MPEG2-TS (Transport Stream) standard data.
[0024]
One device serving as the application 20 is provided with four physical input / output ports (ports 1 to 4) as input / output ports 22. Further, by combining these four physical input / output ports, it is possible to set a plurality of patterns of logical input / output channels having different bus widths. Each port is set with an SID serving as an identifier according to the configuration of the logical input / output channel.
[0025]
That is, as shown in FIGS. 5A to 5D, for example, four types of logical input / output channels can be set. First, a configuration of four logical input / output channels having an 8-bit bus width set for each physical input / output port (FIG. 5A). Next, one 16-bit bus width logical input / output channel constituted by two physical input / output ports and two 8-bit bus width logical inputs / outputs constituted by the other two physical input / output ports, respectively. Configuration with channel (FIG. 5B). Also, the configuration of two 16-bit bus width logical input / output channels each composed of two physical input / output ports (FIG. 5C). Also, a configuration of one logical input / output channel having a 32-bit bus width configured by four physical input / output ports (FIG. 5D). In each configuration, the SID is set corresponding to each logical input / output channel as shown.
[0026]
20 and 21 show clock-related processing circuits in the application 20 and the bus master 10, respectively. In these drawings, only the circuit of the last stage or the first stage is shown in a simplified manner.
[0027]
As shown in FIG. 20A, the processing circuit 20T on the transmission side of the application 20 has F / F circuits (flip-flop circuits) 51, 52, 53, and 54. The F / F circuits 51, 52, 53, and 54 are provided as processing circuits for FRAME, DATA, TINT, and BERR signals, respectively. The reference clock signal CLK is input to the clock terminals of the F / F circuits 51, 52, 53, and 54. The processing circuit 20T on the transmission side also has a delay circuit for delaying the data transfer clock signal REF.
[0028]
As illustrated in FIG. 20B, the processing circuit 20R on the reception side (Reception) of the application 20 includes F / F circuits 55, 56, 57, and 58. The F / F circuits 55 and 56 are provided as processing circuits for FRAME and DATA signals, respectively. A data transfer clock signal REF is input to clock terminals of the F / F circuits 55 and 56. The F / F circuits 57 and 58 are provided as processing circuits for RINT and BERR signals, respectively. A reference clock signal CLK is input to clock terminals of the F / F circuits 57 and 58.
[0029]
As shown in FIG. 21, the bus master 10 includes F / F circuits 61 to 67. The F / F circuits 61 and 62 are provided as final stage processing circuits for the FRAME and DATA signals, respectively. The F / F circuits 63 and 64 are provided as processing circuits for the input stages of FRAME and DATA signals, respectively. The F / F circuits 65, 66, and 67 are provided as processing circuits for TINT, RINT, and BERR signals, respectively.
[0030]
<Drive characteristics>
Conventionally, characteristics such as C-MOS (Complementary Metal-Oxide Semiconductor) and LVTTL (Low Voltage TTL) have been used as drivers in general buses such as PCI, but these operate as high as this interface. Frequency (100MHZThe above bus configuration is inappropriate in terms of drive drive capability and noise characteristics. In this interface, 100MHZLVDS (Low Voltage Differential Signaling) or BLVDS (Bus LVDS) is employed as a bus driver.
[0031]
FIG. 6 shows a comparison of main characteristics of LVDS, BLVDS, and C-MOS. As shown in FIG. 6, LVDS and BLVDS have advantages such as lower power and lower noise than C-MOS. For example, by using BLVDS as a driver, a transfer rate of at least 200 Mbps per channel can be maintained. Also, the number of drivers that can be connected is 20 or more.
[0032]
FIG. 7B shows a configuration example of a bus using BLVDS. In this example, a plurality of pairs of drivers 111 and receivers 112 are connected to the bus 113. Both ends of the bus 113 are resistors RTTerminated by The driver 111 receives the input signal D as shown in FIG.IN, DE to output signals DO + and DO−. The receiver 112 is a differential input circuit. The receiver 112 receives the signal R in response to the inputs of the signals RI +, RI−, and RE.OUTIs output. The outputs of the driver 111 and the receiver 112 are both tristate (three states). The configuration shown in FIG. 7B enables bidirectional data communication between multipoints.
[0033]
<Main specifications>
8A and 8B show the characteristics and functions of this interface in comparison with the PCI bus.
[0034]
As shown in FIG. 8A, in contrast to the standard 17 signal control lines in the PCI, this interface has only 3 control lines, thereby simplifying the control. This is because both the control command and data are output on the command / data bus 31. The operating frequency (bus clock) is 100 MHz or higher, which is higher than that of PCI. Regarding the transfer rate, it has a transfer rate of 3 Gbps or more. Therefore, this interface has a bus width of 32 bits and a clock frequency of 33 MH, which are used as standard in PCI.ZThe transfer rate is more than three times the transfer rate. This spec has room for faster data transfer. The data transfer method is burst transfer (a method of transferring a block of data of a plurality of bytes continuously at a stroke) in PCI, but this interface is a packet method.
[0035]
This interface has the function shown in FIG. 8B so that mainly image and communication data can be transferred optimally. Hereinafter, an outline of each function will be described.
[0036]
・ Multiple reception
In this interface, the data existing on the command / data bus 31 at a certain time is only data from one application 20 on the transmission side. However, the output data can be received by a plurality of receiving-side applications 20. Therefore, the receiving-side application 20 has a function of receiving only necessary data and ignoring unnecessary data. The receiving-side application 20 receives data, if necessary, according to the MID and SID information of the transmitting-side application 20 included in the transmitted packet data. In PCI, data transmission / reception is one-to-one between devices, and a plurality of receptions are not supported.
[0037]
・ Multiplex
In this interface, data output from a plurality of transmission-side applications 20 can be multiplexed and transferred on a bus in a time division manner. The receiving-side application 20 can selectively receive only specified data with respect to a plurality of separate transmitting-side data.
[0038]
・ Multi data width (Multi Width)
In this interface, the data width is not fixed and is variable. Therefore, when the command / data bus 31 is, for example, 32 bits wide, if the data width is 8 bits, four data can be transferred simultaneously. Similarly, if the data width is 16 bits, two data can be transferred. In PCI, for example, when the bus width is 32 bits and there are a plurality of 16-bit data, a plurality of data cannot be transferred simultaneously. In this case, it is necessary to add “null” data to 16-bit data to form 32-bit data in the form, and perform data transfer a plurality of times.
[0039]
-Transfer priority specification (Data Priority)
When there is data to be sent by a plurality of applications 20, priority can be given to each data. As a result, if a high priority is given to data that would not be too late, the data can be preferentially transferred. The priority information is generated in each application 20 and sent to the bus master 10 as status data. As will be described later with reference to FIG. 27, the priority information is generated based on the storage status of data in the buffer memory 91 (FIG. 4B).
[0040]
・ MPEG2-TS compatible
This interface also supports MPEG standard, especially MPEG2-TS data transfer. The data transfer of MPEG2-TS is required to be real time, and it is necessary to manage the time of data transfer. For this time management, a Time Stamp function is provided.
[0041]
・ Measures against transmission errors
For example, when there is no response to various control commands (such as a Status Sense command and an Active ID Set command described later) from the bus master 10, and when a CRC error occurs during data transfer, the command or data is transmitted again. There is a function to perform processing (retry) to try. In addition, there is a function of recording the retry status in the log memory 83. Note that PCI has a function of detecting and notifying a transmission error, but has no function of retrying.
[0042]
<Packet configuration>
In this interface, a packet format is adopted as a data structure at the time of transfer, and an arbitrary data length can be transferred if the transfer rate is allowed. FIGS. 9A and 9B show the packet configuration. The packet configuration differs between command transfer (FIG. 9A) and data transfer (FIG. 9B).
[0043]
In the case of command transfer, the packet as a whole is 32 bits or 64 bits. The constituent elements include a CMD field in which a control command is entered, and PR1 and PR2 fields in which parameters associated with the control command are entered. PR2 is provided for a 64-bit configuration, and is not provided for a 32-bit configuration.
[0044]
・ CMD
The control command is defined by 8 bits. However, the usable address range is h00 to hBF (0 to 1111). hC0 to hFF are used for data transfer packets. The upper 6 bits indicate the type of command, and the lower 2 bits indicate the range of devices that execute the command. The meaning of the lower 2 bits is as follows.
b00: Execute for all devices and ports.
b01: Execute only for the device specified by MID in PR1.
b02: Executed for the port specified by the SID of the device specified by the MID in PR1.
b03: Undefined
・ PR1, PR2
Parameters associated with the command. PR1 is composed of 24 bits and PR2 is composed of 32 bits. In the basic configuration of PR1, the upper 7 bits indicate MID, the 5 bits indicate SID, and the lower 12 bits indicate substantial parameters. However, the contents of PR1 and PR2 vary depending on the type of command.
[0045]
The packet structure in the case of data transfer is roughly classified into a header part indicating the type of packet, a payload part for storing data, and a CRC part for confirming whether or not the packet has been normally transferred. It is divided into.
[0046]
As will be described below, a TM field is added to the header portion in the case of a 64-bit configuration.
[0047]
・ Header
CD: Command / Data (2 bits): A code for determining whether a packet is command transfer or data transfer. In the case of data transfer, b11 is assigned.
MD: Header Mode (2 bits): A code that determines the mode of the header format of the packet. There are the following four codes.
0: LN + MID + SID (32 bits)... Minimum header format. The minimum parameters required for transfer are set.
1: LN + MID + SID + TM (64 bits)... Additional header format in which TM is added to the minimum header format. Use this when you want to synchronize input and output, such as MPEG2-TS data.
2, 3: Undefined
LN: Length of Payload (13 bits): Sets the length of the payload portion. The unit can be set from 0 to 81111 in bytes.
MID: Main ID (7 bits)... Sets the Main ID of the device connected to the bus that has output this data. As a result, it is determined from which device the data comes.
SID: Sub ID (5 bits): Sets the Sub ID of the device connected to the bus that has output this data. By combining with the Main ID, it is determined from which port of which device.
TM: Time Stamp (32 bits)... Basically used when transferring MPEG2-TS data. The time stamp indicates the same value at the same time in the system, and sets the time when data is input to the device connected to the bus 30. When used for MPEG2-TS, the lower 23 bits of base of PCR (program clock reference) of MPEG2-TS and 9 bits of extension are set.
[0048]
・ Payload
An area for storing data to be transferred. The length of the data is specified by LN of the header. Although the basic unit is 8 bits, the data configuration can be arbitrarily set as shown in FIGS. 10 and 11, for example. If the last data is not long enough for the bus width, ‘0’ is inserted in the vacant part and transferred.
[0049]
CRC
This is data for confirming whether or not data transfer has been performed normally. CRC can detect bit errors in transmission. The data generation method is performed in units of 8 bits. When a 32-bit bus is used as the command / data bus 31, four CRC data are generated and are independent of each other. For this reason, the CRC length is determined by the bus width, and can be expanded in units of 8 bits.
[0050]
The CRC calculation method is performed as shown in [Equation 1] using the generator polynomial G (X) represented by the equation (1) as follows. If “0” is entered in payload, the calculation is performed including that.
[0051]
G (X) = X8+ X6+ XFive+ XThree+1 (1)
[0052]
[Expression 1]
Figure 0003941096
[0053]
FIG. 12 shows a basic circuit for calculating the CRC. This basic circuit includes a matrix operation circuit 71 and a shift register 72. The initial state of the shift register 72 is hFF. Data T output from the matrix operation circuit 71 is output as OD (current data) via the shift register 72. The OD is also output to the matrix operation circuit 71. The matrix calculation circuit 71 performs a predetermined matrix calculation as shown in [Equation 1] on ID (input data) and OD.
[0054]
By the way, in this interface, the bus width of the command / data bus 31 is 32 bits as a standard, but can be set to 16 bits. The packet configuration in the case of data transfer has a structure corresponding to the bus width of the command / data bus 31 and the length of data stored in the payload.
[0055]
FIGS. 10A to 10D are examples of packet structures when data transfer is performed with the bus width set to 32 bits. Among these, FIG. 10A shows the arrangement of data when 16 bytes of 8-bit data is stored and transferred in the payload. D1 to D16 are data stored in the payload. C1 to C4 indicate CRC data. FIG. 10B shows an arrangement of data when eight 16-bit data (D1 to D8) are stored and transferred in the payload. FIG. 10C shows an arrangement of data when five 24-bit data (D1 to D5) are stored and transferred in the payload. In this case, since the last data D5 has an insufficient length with respect to the bus width, “0” is entered in the empty portion. FIG. 10D shows an arrangement of data when four 32-bit data (D1 to D4) are stored and transferred in the payload.
[0056]
FIGS. 11A to 11D are examples of packet structures when data transfer is performed with the bus width set to 16 bits. Among these, FIG. 11A shows an arrangement of data when 16 pieces of 8-bit data (D1 to D16) are stored and transferred in the payload. FIG. 11B shows an arrangement of data when eight 16-bit data (D1 to D8) are stored and transferred in the payload. FIG. 11C shows an arrangement of data when five 24-bit data (D1 to D5) are stored and transferred in the payload. In this case, as in the case of FIG. 10C, “0” is inserted after the last data D5. FIG. 11D shows an arrangement of data when four 32-bit data (D1 to D4) are stored and transferred in the payload.
[0057]
In the packet structures shown in FIGS. 10A to 10D and 11A to 11D, a plurality of data is stored in one packet. The plurality of data may be obtained by dividing the same type of data, or may be different types of data. In this way, by setting the data width to be variable and including the same or multiple types of data in one packet, it is possible to simultaneously output a plurality of the same or multiple types of data onto the bus.
[0058]
The packet structures shown in FIGS. 10A to 10D and FIGS. 11A to 11D may all be constructed using the buffer memory 91, or may be logically input. It may be constructed in association with the setting of the output channel. For example, if the logical input / output channel is set as shown in FIG. 5A, the packet structure shown in FIG. 10A can be easily realized. Further, for example, if the logical input / output channel is set as shown in FIG. 5C, the packet structure shown in FIG. 10B can be easily realized. Thus, the same or plural types of data can be included in one packet according to the setting of the logical input / output channel.
[0059]
<Summary of command>
Control of this interface is performed by a device serving as the bus master 10 sending a control command, and each application 20 receiving, interpreting and executing it. Basic control commands are as shown in FIG. FIG. 13 shows only basic control commands, but other codes can be defined for the free command codes.
[0060]
When the commands shown in FIG. 13 are roughly grouped, they are divided into commands used for initialization and commands used for data transfer. The Initialize & Bus Control, PCR Control, Priority, and Interrupt command groups are used for initialization. Data Control and Status are frequently used during data transfer.
[0061]
Next, the operation of the bus interface configured as described above will be described.
[0062]
<Basic operation of the entire bus>
First, the basic operation in the standard bus mode connection example of FIG. 1 will be described. The bus master 10 outputs a reference clock signal CLK serving as a reference for the entire interface to a signal line for the reference, and a bus control command synchronized with the reference clock signal CLK is input to the command / data bus 31. Is output. The application 20 side takes in a control command output from the bus master 10 based on the input reference clock signal CLK, and performs processing according to the command. Some control commands require the application 20 to output data on the command / data bus 31. In this case, data is output from the application 20 onto the command / data bus 31 in synchronization with the data transfer clock signal REF.
[0063]
The bus master 10 constantly monitors the occupied state of the bus 30, etc., confirms whether or not the data transfer on the command / data bus 31 has been completed, and estimates the output timing of the control command. Yes. This confirmation is performed by confirming the frame signal FRAME. Further, when it is desired to change the bus control in an emergency, interrupt signals TINT, RINT, and BERR are output from the application 20 side. In this case, the bus master 10 performs bus control according to the interrupt signals TINT, RINT, and BERR.
[0064]
In the extended bus mode of FIG. 2, status data SDATA for determining the order of the next data transfer is further output on the extended status data bus 41 in order to increase the efficiency of the bus 30. In this case, the bus master 10 automatically sends a command for reading the status of the application 20 on the transmission side. In response to the command from the bus master 10, the transmission-side application 20 sends a status onto the extended status data bus 41. The bus master 10 checks priority information from the status of the application 20 on the transmission side read via the extended status data bus 41. In order to start data transfer from the application 20 on the transmission side with the highest priority, the bus master 10 sends an Active ID Set command specifying the MID and SID on the bus. The designated transmission-side application 20 starts outputting data on the command / data bus 31 in response to the Active ID Set command.
[0065]
Here, the basic operation algorithm of this interface is summarized as follows.
[0066]
Operation 1: Immediately after resetting each device, all signal outputs are stopped.
Operation 2: The bus master 10 outputs a command signal CMD.
Operation 3: The corresponding application 20 outputs data. If there is no data, go to operation 4.
Operation 4: When the output of data is completed, the operation returns to Operation 2.
[0067]
This basic operation is the same except that the three types of interrupt signals TINT, RINT, and BERR become active or the bus master 10 is forcibly stopped.
[0068]
<Timing chart>
Next, the output timing of the command signal CMD from the bus master 10 and the data (DATA, SDATA) corresponding thereto will be described with reference to the timing charts of FIGS. In this interface, there are two types of data transfer methods, Type 1 (FIGS. 14 and 15) using the bus at high speed and Type 2 (FIGS. 16 and 17) considering safety. Further, there is only one type of status transfer (FIG. 18) regarding status transfer when the expansion bus mode is set.
[0069]
The example of FIG. 14 is a case where output data exists for the command signal CMD. When the first command signal CMD1 (FIG. 14 (D)) is sent from the bus master 10 via the command / data bus 31, the data DATA1 (FIG. 14 (D)) corresponding to the first command signal CMD1 (FIG. 14 (D)) is applied to the application 20 in one clock. Sent from. For example, DATA1 has a data length of 32 bits or less if the standard bus width is 32 bits. From the first command signal CMD1 to DATA1, the device output to the command / data bus 31 is switched from the bus master 10 to the application 20, that is, the command signal CMD1 is output from the bus master 10, and DATA1 is the application. Therefore, the reference clock signal CLK (FIG. 14A) needs to be at least one clock interval for the bus switching time. Similarly, it is necessary to provide an interval of at least one clock from the first DATA1 to the next command signal CMD2.
[0070]
Corresponding to the command signals CMD1 and DATA1, the data transfer clock signal REF (FIG. 14B) once becomes a low (L) level and then becomes a high (H) level. Further, the data frame signal FRAME (FIG. 14C) is at a low level during the period in which the command signals CMD1 and DATA1 are output. The data transfer clock signal REF and the data frame signal FRAME are output from the device that output the signals. That is, the bus master 10 outputs signals REF and FRAME together with the command signal CMD1. The application 20 outputs signals REF and FRAME together with DATA1. Therefore, one device (application 20) outputs each signal REF, FRAME, and DATA at the same time.
[0071]
In FIG. 14, the second command signal CMD2 shows a case where data transfer could not be sent in one clock. It is necessary to leave an interval of 1 clock or more between the command signal CMD2 and the first data DATA2 corresponding thereto for bus switching time. However, in this case, since there is no output device switching between the data DATA2 to DATA7, the application 20 can continuously output DATA. Regarding the data transfer clock signal REF and the data frame signal FRAME, the operation does not change even if the number of transfer of DATA changes, and the same operation is performed on DATA in units of one clock.
[0072]
The example of FIG. 15 is a case where the command signal CMD is continuously sent. Since only the bus master 10 outputs the command signal CMD, it can be sent continuously. The data transfer clock signal REF and the data frame signal FRAME operate in the same manner as in the example of FIG. In other words, in this example, the data frame signal FRAME that is active (low level) while the command signal CMD is output is output from the bus master 10.
[0073]
FIGS. 16 and 17 are transfer systems for ensuring bus transfer, although the data transfer speed is slightly lower than that of type 1 of FIGS. 14 and 15. 16 shows a case where DATA exists for the command signal CMD as in the example of FIG. 14, and FIG. 17 shows a case where the command signal CMD is sent continuously, as in the example of FIG. In this system, as compared with Type 1 in FIGS. 14 and 15, there is a cycle in which the data frame signal FRAME for one clock is at a high level at the last part of the transfer of the command signal CMD and DATA. In this mode, when the data frame signal FRAME is at a high level and the reference clock signal CLK is supplied, the bus interface is initialized. As a result, even if the bus transfer is temporarily disturbed due to noise or the like, an error in the data transfer of only this packet stops, and the next normal processing can be performed immediately.
[0074]
FIG. 18 shows the timing at the time of status transfer in the extended bus mode (FIG. 2). In the extended bus mode, there is no standard bus type 2 (FIGS. 16 and 17) in order to keep the transfer as fast as possible. In the extended bus mode, since the status data SDATA is transferred at a very high speed, it is possible to read the correct status by reading it again even if it is erroneously transferred once.
[0075]
In the extended bus mode, the command signal CMD from the bus master 10 and the status data SDATA (FIG. 18E) corresponding thereto are sent in units of one clock of the reference clock signal CLK (FIG. 18A). The time from the command signal CMD to the status data SDATA requires at least one clock. The status transfer clock signal SREF (FIG. 18B) and the status frame signal SFRAME (FIG. 18C) are the data transfer clock signal REF and the data frame signal FRAME (FIG. 14B, FIG. As in the case of C)), the level is low during the period when the command signal CMD and the status data SDATA are output.
[0076]
The status command SCMD (FIG. 18D) is at a high level when the command signal CMD is output on the extended status data bus 41, and is at a low level when the status data SDATA is output. Become. The output timing of other signals is the same as in the standard bus mode shown in FIGS.
[0077]
<Clock related operations>
Next, clock-related processing will be described. This interface operates as a whole based on the reference clock signal CLK. At this time, if the data transfer is slow, the difference in delay between the reference clock signal CLK and the data output on the command / data bus 31 is considered to be negligible. However, in the case of high-speed transfer, this delay difference cannot be ignored and needs to be studied.
[0078]
First, regarding the control command CMD, this is output from the bus master 10. Since the reference clock signal CLK is also output from the same bus master 10, if the signal line of the reference clock signal CLK and the command / data bus 31 are wired in parallel, the reference for each application 20 is provided. The delay amount through which the clock signal CLK and the command are transmitted becomes substantially equal. For this reason, regarding the control command CMD, no problem occurs even if the control command CMD is taken into the application 20 with reference to the reference clock signal CLK.
[0079]
On the other hand, regarding the data output from the application 20, the delay amount between the reference clock signal CLK and the data in the bus master 10 and the other applications 20 differs depending on which application 20 outputs the data. This is because the data on the command / data bus 31 is output from an arbitrary application 20 while the reference clock signal CLK is output from the bus master 10. For this reason, depending on the physical length of the bus, a data delay of one cycle or more of the reference clock signal CLK may occur. In this interface, in order to solve this problem, a clock signal REF for data transfer synchronized with data output from an arbitrary application 20 is generated. As a result, with respect to the data on the command / data bus 31, if the data transfer clock signal REF is taken in as a reference, there will be no delay problem.
[0080]
FIG. 19 shows the relationship between the control command CMD and data output on the command / data bus 31 and the clock signals CLK and REF serving as a reference for fetching them.
[0081]
Next, the operation of each clock signal will be described with reference to FIGS.
[0082]
As shown in FIG. 20A, in the transmission-side (Transmission) circuit 20T of the application 20, the input reference clock signal CLK is used as the final stage F / F circuits 51 and 52 of the DATA and frame signal FRAME. Clock signal. The data transfer clock signal REF is generated through a delay circuit with respect to the reference clock signal CLK. This delay circuit is for matching the delay amount to the output terminals of DATA and FRAME with the delay amount of REF.
[0083]
As shown in FIG. 20B, in the circuit 20R on the reception side (Reception) of the application 20, the input data transfer clock signal REF is used as the clock signal of the F / F circuits 55 and 56 in the first stage. . The F / F circuit needs some adjustment to satisfy the hold time of the setup time, but since this time is a fixed amount, it can be adjusted with a fixed delay circuit.
[0084]
As shown in FIG. 21, in the bus master 10, the internally generated reference clock signal CLK is used as the clock signal for the F / F circuits 61 and 62 at the final stage of the DATA and frame signal FRAME. In addition, when the device of the bus master 10 is used as the application 20, a reception circuit is added.
[0085]
Since the interrupt signals TINT, RINT, and BERR need not be synchronized with the reference clock signal CLK, the application 20 simply receives the input reference clock as shown in FIGS. The signal CLK is output as a clock signal for the final stage F / F circuits 53, 54, 57, 58. As shown in FIG. 21, the bus master 10 latches the input signal using the internally generated reference clock signal CLK as the clock signal of the first stage F / F circuits 65, 66, and 67.
[0086]
<Example of data transfer by each function>
Next, referring to FIGS. 22 to 24, data using the functions of Multi Width (multiple data widths), Multi Cast (multiple receptions), and Multiplex (multiplexing) shown in FIG. 8B. An example of transfer will be described. Here, a case in which one bus master 10 and four applications 20-1, 20-2, 20-3, and 20-4 are connected to the bus 30 will be described as an example. The MID (Main ID) of the device that becomes the bus master 10 is set to 0. The MIDs of the devices that are the applications 20-1, 20-2, 20-3, and 20-4 are MID1, MID2, MID3, and MID4, respectively. Each application 20-1, 20-2, 20-3, 20-4 has a plurality of input / output ports. The input / output ports of the applications 20-1, 20-2, 20-3, and 20-4 are assigned SIDs according to the logical input / output channel settings (see FIG. 5). The device connected to the bus 30 can be specified by MID. The port can be specified by SID.
[0087]
FIG. 22 shows an example of data transfer using the Multi Width function. In this example, data D1 output from the SID0 port of the MID1 application 20-1 is transferred to the SID0 port of the MID3 application 20-3. Further, the data D2 output from the SID1 port of the application 20-1 is transferred to the SID0 port of the MID4 application 20-4. The data D3 output from the SID0 port of the MID2 application 20-2 is transferred to the SID2 port of the MID3 application 20-3. Also, the data D4 output from the SID2 port of the application 20-2 is transferred to the SID3 port of the MID4 application 20-4. The data D5 output from the SID2 port of the MID4 application 20-4 is transferred to the SID3 port of the MID1 application 20-1.
[0088]
In the example of FIG. 22, two data D1 and D2 are output from the application 20-1, but if the command / data bus 31 of the bus 30 is 32 bits wide, the data width of the data D1 and D2 By setting each of these to 16 bits, for example, these two data D1 and D2 can be simultaneously output onto the bus as one packet data. Thereby, the bus width can be used effectively. The same applies to the data D3 and D4 output from the application 20-2.
[0089]
FIG. 23 shows an example of data transfer using the Multi Cast function. In this example, the data D11 output from the SID1 port of the MID1 application 20-1 is transferred to the SID1 port of the MID3 application 20-3 and the SID3 port of the MID4 application 20-4. The data D12 output from the SID0 port of the MID2 application 20-2 is transferred to the SID2 port of the MID3 application 20-3 and the SID0 port of the MID4 application 20-4. Also, the data D13 output from the SID2 port of the application 20-2 is transferred to the SID0 port of the MID3 application 20-3 and the SID2 port of the MID4 application 20-4.
[0090]
Thus, the data output from one device can be received by a plurality of devices by the Multi Cast function. In this case, the transmitting device transmits packet data in which information of its own ID is added to the transfer data. The receiving device receives data, if necessary, according to the MID and SID information of the transmitting device included in the transmitted packet data. Ignore the data if unnecessary.
[0091]
FIG. 24 shows an example of data transfer using the Multiplex function. In this example, the data D11 output from the SID0 port of the application 20-1 of the MID1, the data D12 output from the SID1 port of the application 20-1 to the SID2 port of the application 20-3 of MID3, The data D22 output from the SID2 port of the MID2 application 20-2 is multiplexed and transferred on the bus. The data D13 output from the SID2 port of the MID1 application 20-1 and the data D21 output from the SID0 port of the MID2 application 20-2 to the SID0 port of the MID4 application 20-4. Multiplexed and transferred on the bus. Further, the data D11 output from the SID0 port of the MID1 application 20-1, the data D12 output from the SID1 port of the application 20-1, and the MID2 Data D22 output from the SID2 port of the application 20-2 and data D23 output from the SID3 port of the application 20-2 are multiplexed and transferred.
[0092]
As described above, with the function of Multiplex, a plurality of data can be multiplexed on a bus in a time division manner and received by one or a plurality of devices. The receiving device looks at the MID and SID information of the transmitting device included in each packet data of the multiplexed data, and receives data if necessary. Ignore the data if unnecessary. A plurality of data is output from each transmission-side device in a time-sharing manner based on status information indicating priority under the control of the bus master 10. At this time, each transmitting device simultaneously outputs a frame signal FRAME indicating that the data is output together with the data to be transferred. The bus master 10 monitors the occupied state of the bus 30 based on the frame signal FRAME, and outputs a control command according to the occupied state of the bus, and the transfer data is multiplexed on the bus in a time division manner. In this way, control of each transmitting device is performed.
[0093]
<Bus initialization procedure>
Next, the initialization operation of this interface will be described with reference to the flowchart of FIG. In principle, this initialization operation is performed only once immediately after the power is turned on.
[0094]
When power is turned on to this interface, first, a power-on reset (ID acquisition) process is performed (step S1). After power-on, each interface device receives a reset signal and each device is in the initial state. At this time, the ID (MID) of each device is set.
[0095]
Next, a master acquisition process is performed (step S2). That is, one of the devices connected to the bus 30 is set as the bus master 10 by the external CPU. Next, bus transfer system setting processing is performed (step S3). A reset command may be sent from the bus master 10 for initialization of the bus interface. In addition, a Transfer Protocol Set command may be sent next to determine the data transfer method.
[0096]
Further, when using MPEG2-TS, the system PCR is set (step S4). In order to match the PCR of the entire system, PCR, Time Stamp and Time Stamp Offset are set.
[0097]
<Data transfer procedure>
FIG. 26 shows an example of a basic procedure for data transfer. First, the bus master 10 reads the statuses of all the transmitting side applications 20 and checks the statuses in order to check the existence of data on the transmitting side. In order to perform this process, the bus master 10 first automatically sends a command (Status Sense command) for reading the status of the application 20 on the transmission side onto the bus (step S11). In response to the command from the bus master 10, the transmitting-side application 20 sends the status to the bus 30 (the command / data bus 31 or the extended status data bus 41). This status contains information indicating the priority of data.
[0098]
The bus master 10 checks the priority information included in the status read from the transmission-side application 20 (step S12). Then, the bus master 10 sends an Active ID Set command specifying the MID and SID on the bus in order to start data transfer from the application 20 on the transmission side having the highest priority. The transmitting-side application 20 having the designated MID and SID starts to output data to the command / data bus 31 (step S13).
[0099]
The receiving-side application 20 takes in the data output from the transmitting-side application 20 inside. At this time, the receiving-side application 20 checks whether the data has been normally received by checking the CRC data at the end of the packet (step S14). When the CRC data is normal (step S14; Y), the first data transfer process is completed, but the transmitting-side application 20 waits for an Active ID Set command in preparation for the next data transfer. Further, the bus master 10 performs processing for checking the status on the transmission side in order to perform the next data transfer.
[0100]
On the other hand, when an error is detected (step S14; N), the receiving-side application 20 activates the error interrupt signal BERR and notifies the bus master 10 of the fact. When the bus master 10 detects the error interrupt signal BERR, the bus master 10 starts an error recovery operation set in advance (step S15). At this time, data is read again in some cases. When the bus master 10 detects the transmission interrupt signal TINT, the bus master 10 reads the status of the application 20 on the transmission side, and proceeds to the process of step S12.
[0101]
As described above, basically, the bus master 10 repeats the process of reading the status of the application 20 on the transmission side, checking the priority, and causing the data to be transferred. As a result, data is sequentially transferred. However, when performing faster data transfer, it may take time to read the status. In that case, the status information is read by checking not only the one with the highest priority but also the second or third one, and transferring them in order. The number of times can be reduced. In this case, when an error that causes a problem in transfer occurs, control is performed by the TINT, RINT, and BERR interrupt signals.
[0102]
<Status data regarding priority>
The priority of the transfer data is determined based on the status of each data. The status includes, for example, the following Device Status, TINT, Buffer Over, Priority Status, and Data Exist.
[0103]
・ Device Status ...... Check if there is a device.
TINT: Indicates whether or not a transfer-side interrupt has occurred.
• Buffer Over (BO): Indicates whether or not data cannot be stored in the buffer.
• Buffer Full (BF): Indicates whether the buffer is full.
・ Priority Status: Indicates the priority of data.
Data Exist (DE): Indicates whether data is in the buffer.
[0104]
Device Status indicates the validity of the sent status. As a priority, TINT has the highest priority, followed by Buffer Over and Buffer Full. When there is data in Data Exist, the priority of Priority Status is compared, and the one with higher priority is transferred first.
[0105]
FIG. 27 illustrates an example of a status generation method indicating the above-described priority, which is performed in the application 20 on the transmission side. Data Exist is generated by inputting bit data indicating the number of packets in the buffer memory 91 (FIG. 4B) to the OR circuit 101. Data Exist is, for example, 1-bit data, and the state of the flag is ‘1’ if there is data, and ‘0’ if there is no data.
[0106]
Priority is obtained by multiplying, for example, 8-bit Priority set in advance by an external CPU (not shown) or a bus control command by the number of packets stored in the buffer memory 91 by the multiplication circuit 102, for example, a lower order obtained as a result. It is assumed to be 8-bit data.
[0107]
Buffer Full is obtained by comparing the value of Value of Buffer Full set in advance with the number of packets stored in the buffer memory 91 by the comparison circuit CMP2. Buffer Full is, for example, 1-bit data, and the flag state is ‘1’ if the buffer is considered full, and ‘0’ if the buffer is not full. Similarly to Buffer Full, Buffer Over is, for example, 1-bit data, and the value of Buffer Over set in advance and the number of packets stored in the buffer memory 91 are compared by the comparison circuit CMP1. can get.
[0108]
The TINT is generated based on a preset TINT condition (interrupt condition). TINT is, for example, 1-bit data, and the state of the flag is “1” if there is an interrupt, and “0” if there is no interrupt.
[0109]
27, when the bus master 10 compares a plurality of status data obtained from the applications 20 on the transmitting side, the TINT, Buffer Over, Priority Status, and Data You can compare all the bits of Exist together. This greatly simplifies the configuration of the comparison circuit in the bus master 10. If all bit values of a certain status are “0”, it can be determined that there is no data.
[0110]
<Individual operation>
Next, the individual operations of the bus master 10 and the application 20 will be described more specifically.
[0111]
[Bus master operation]
<Send Status Sense command>
FIG. 28 shows the operation of sending a Status Sense command by the bus master 10. The bus master 10 sends Status Sense commands for all the applications 20 on the transmission side (data transfer source) onto the command / data bus 31 (step S21). In the extended bus mode, the data is transmitted on the extended status data bus 41. Information on the MID and SID of the application 20 on the transmission side is stored in a predetermined memory (status sense data memory 81) in the bus master 10 at the time of initialization.
[0112]
If the status response is obtained from the transmission-side application 20 (step S22; Y), the bus master 10 ends this processing. On the other hand, if the status response is not obtained (step S22; N), the bus master 10 performs processing for repeating the sending process of the Status Sense command as many times as set in advance. That is, if it is within the set number of times (step S23; N), the process returns to step S21. If the set number of times has been exceeded (step S23; Y), it is considered that the status reading has failed (step S24), and that fact is recorded in the log memory 83 (FIG. 4A) as error information ( Step S25).
[0113]
When the status is obtained by sending the Status Sense command, an Active ID Set command is sent to the transmitting-side application 20 in order to start data transfer to the transmitting-side application 20. There are a plurality of methods for determining the transmission destination of this Active ID Set command. As a first method, a priority order is created based on the obtained status and stored in the priority select register 82. Based on the priority stored in the priority select register 82, an Active ID Set command is transmitted. As another method, there is a method that does not depend on the priority order. In this case, the Status Sense command is sent in the order stored in the status sense data memory 81. If the DE flag of the status information that has responded is 1, an Active ID Set command is sent. As another method, there is also a method of sending an Active ID Set command in the order written in the status sense data memory 81. In this case, the Status Sense command is not sent.
[0114]
<Priority sequence>
Here, a method for starting data transfer by sending an Active ID Set command based on priority will be described. As shown in FIG. 29, the bus master 10 always monitors the transmission side interrupt signal TINT. If the transmission interrupt signal TINT is detected (step S31; Y), the processing after step S41 described later is performed. If the transmission side interrupt signal TINT is not detected (step S31; N), one piece of MID and SID information of the transmission side application 20 is obtained from the status sense data memory 81 (step S32). A Status Sense command is sent to the MID / SID application 20 (step S33). The application 20 having the specified MID and SID sends status data in response to the Status Sense command.
[0115]
When the DE (Data Exist) flag (see FIG. 27) of the status data that has responded is 0 (step S34; N), the bus master 10 is stored at the next address of the status sense data memory 81. Obtain the information of the MID and SID, and send the Status Sense command again. More specifically, the pointer indicating the address of the status sense data memory 81 is incremented by 1 (step S38), and then it is determined whether or not the address indicated by the pointer exceeds the last address (step S39). If the address indicated by the pointer does not exceed the last address and is within the valid address range (step S39; N), the process returns to step S32 and is stored in the address indicated by the pointer from the status sense data memory 81. Obtained MID and SID information and send a Status Sense command again. If it exceeds the last address (step S39; Y), the process returns to step S31.
[0116]
On the other hand, if the DE flag of the status data that has been responded is 1 (step S34; Y), this means that there is data to be transferred, so the bus master 10 determines the priority included in the status. The contents of the priority select register 82 are updated according to the information. In this case, the bus master 10 first compares priorities with other MIDs and SIDs stored in the priority select register 82 (step S35). Since the priority select register 82 stores information of four transfer sources with high priorities, if the priority comparison result is within the fourth place (step S36; Y), the priority select register 82 ranks. (Order) is changed to a new one (step S37), and the process proceeds to step S38. If the priority comparison result is not within 4th place (step S36; N), the process proceeds to step S38 without changing the order of the priority select register 82.
[0117]
As described above, the bus master 10 sends a Status Sense command until the MID and SID stored at the end of the memory address of the status sense data memory 81 are reached, and the status of each application 20 on the transmission side is transmitted. Investigate.
[0118]
On the other hand, when the transmission interrupt signal TINT is detected (step S31; Y), the bus master 10 checks whether or not the TINT processing request (TINT condition) command is on (step S41). If the TINT processing request command is ON (step S41; Y), the process proceeds to step S32. If the TINT processing request command is off (step S41; N), processing for checking which application 20 is the interrupt request is performed. That is, first, the pointer indicating the address of the status sense data memory 81 is set to 0 (step S42), the MID and SID information stored in the status sense data memory 81 is obtained (step S43), and the Status Sense command is issued. It is sent out (step S44).
[0119]
If the TINT flag in the responding status data is 0 (step S45; N), the bus master 10 checks the status sense data, SID, in order to check the status of the MID and SID stored in the next address. The pointer indicating the address of the memory 81 is incremented by 1 (step S46), and the process returns to step S43. On the other hand, if the TINT flag in the returned status data is 1 (step S45; Y), the bus master 10 turns on the TINT processing request command for the MID and SID (step S47). The process returns to step S31.
[0120]
FIG. 30 shows a procedure for causing the transmitting-side application 20 to perform data transfer based on the priority information determined by the processing of FIG. 29 and stored in the priority select register 82. The bus master 10 checks whether there is any data in the priority select register 82 that has not yet started data transfer (step S51). If there is no unsent data (step S51; N), this determination is repeated. If there is unsent data (step S51; Y), information on the highest priority MID and SID among those stored in the priority select register 82 is obtained (step S52), and the obtained MID is obtained. , An Active ID Set command is sent to the SID application 20 (step S53).
[0121]
If data transfer is not started from the application 20 of the designated MID and SID within a predetermined time after sending the Active ID Set command (step S54; N), the bus master 10 sets the preset number of times. Until it exceeds, the process of retransmitting the Active ID Set command (retry) is repeated (step S56; N). Even when data transfer is started (step S54; Y), if there is an output of the error interrupt signal BERR from the data receiving side (step S55; Y), the bus master 10 performs a retry. If the number of retries exceeds the set number (step S56; Y), the process returns to step S51. If there is no output of the error interrupt signal BERR (step S55; N), the process returns to step S51. By repeating the above processing, data transfer is performed in order from the application 20 having the MID and SID having the highest priority among those stored in the priority select register 82.
[0122]
<Error handling>
Next, error processing performed by the bus master 10 as a countermeasure against transmission errors will be described. Here, as a transmission error, no response to the Status Sense command, no response to the Active ID Set command, and error processing when the bus error interrupt signal BERR is detected will be described.
[0123]
(1) Error handling when there is no response to the Status Sense command
Even if the bus master 10 sends a Status Sense command, if there is no status response from the application 20, the bus master 10 retries the sending process of the Status Sense command up to a set number of times. When the set number of retries is reached, the Status Sense command is not transmitted to the MID and SID thereafter. However, it is also possible to set the mode to send the Status Sense command after that. The retry status is stored in the log memory 83. The contents of the log memory 83 can be read from the external CPU.
[0124]
(2) Error handling when there is no response to the Active ID Set command
Even if the bus master 10 sends an Active ID Set command and no response is received from the application 20, the bus master 10 retries the sending process of the Active ID Set command up to the set number of times. When the set number of retries is reached, the Status Sense command and the Active ID Set command are not transmitted to the MID and SID thereafter. However, it is also possible to set the mode in which those commands can be sent afterwards. The retry status is stored in the log memory 83. The contents of the log memory 83 can be read from the external CPU.
[0125]
(3) Error handling when the bus error interrupt signal BERR is detected
For example, suppose that after sending an Active ID Set command to the application 20 on the transmission side, a CRC error is detected in the application 20 on the reception side, and the bus error interrupt signal BERR is sent from the application 20 on the reception side. In this case, the bus master 10 retries the Active ID Set command transmission processing up to the set number of times, and causes the transmitting-side application 20 to perform data transfer again. When the set number of retries is reached, the Status Sense command and Active ID Set command are not transmitted to the MID and SID thereafter. However, it is also possible to set the mode in which those commands can be sent afterwards. The retry status is stored in the log memory 83. The contents of the log memory 83 can be read from the external CPU.
[0126]
[Application behavior]
<Command processing>
The application 20 detects a command from the bus master 10 and executes the processing. In the case of an Active ID Set command, transmission of data on the command / data bus 31 is started. When a Status Sense command is received, status data corresponding to the request is output on the command / data bus 31. When a Status Sense command is received on the extended status data bus 41, status data is output to the extended status data bus 41. If any other command is accepted, it is executed immediately. If an invalid command such as a command specifying an SID that is not set in the device is received, the command is ignored.
[0127]
<Receive packet control>
Information on the MID and SID of the transmitting-side application 20 to be received is stored in advance in the received PID memory 94 (FIG. 4B). Information of MID and SID to be received is written in accordance with a command from the bus master 10 at the time of initialization setting, for example. The reception of the packet data on the command / data bus 31 is executed when the MID and SID information stored in the received PID memory 94 and the MID and SID included in the packet data are compared and matched.
[0128]
During reception of packet data, CRC calculation is performed based on CRC data added to the packet data. If there is no CRC error immediately after the end of data reception, it is assumed that data has been received normally. When a CRC error occurs, the bus error interrupt signal BERR is activated and data at that time is not received. When packet data is correctly received, the packet data information is recorded in the PID memory 92 to indicate the presence of the received packet data. Information recorded in the PID memory 92 includes a data size, a time stamp value, and the like.
[0129]
[Measure transfer time using a time stamp generator]
This interface has a function of measuring the time required to transmit / receive transfer data by using the time stamp generator 93 (FIG. 4B). Next, the function of measuring the transfer time will be described. The time stamp generator 93 is reset by a reset signal from the bus master 10. As a whole bus interface, the value of Time Stamp is the same value at the same time. That is, the time stamp generator 84 of the bus master 10 and the time stamp generator 93 of each application 20 operate in synchronization with each other, and output the same time count value at the same time.
[0130]
Hereinafter, a method for measuring the transfer time will be described in detail with reference to FIG. Here, a case where packet data of the MPEG2-TS standard is transferred will be described as an example. The application 20T on the transmission side stores the value of Time Stamp of the time stamp generator 93 at the time when input of external packet data is started in the PID memory 92. This value is TMin. At this time, the payload of the input packet data contains PCR which is time management information in the MPEG standard. Let this PCR value be PCRin. The transmitting-side application 20T outputs packet data including the values of TMin and PCRin on the command / data bus 31.
[0131]
When the application 20R on the receiving side outputs the received packet data to the outside, it compares the value (TMgen) of its own time stamp generator 93 with the value TMin of the time stamp added to the packet data. Then, the difference (TMdiff = TMgen−TMin) is obtained. The obtained value TMdiff is a time required for data transmission / reception in this interface, that is, a time from when data is input to the transmission-side application 20T until it is transferred to the reception-side application 20R and output. It will be.
[0132]
The receiving-side application 20R also corrects the PCR value PCRin, which is time management information included in the packet data. That is, a value PCRout obtained by adding the above-described measurement time TMdiff to the PCR value PCRin is obtained.
PCRout = PCRin + TMdiff
[0133]
Finally, in order to adjust the delay amount of the entire bus, a preset Time Stamp Offset value (TMoffset) is added to the value PCRout. The value PCRreal thus obtained is the PCR value that is actually output.
PCRreal = PCRout + TMoffset
[0134]
As described above, according to the bus interface and the data transfer method thereof according to the present embodiment, the output of the control command and the transfer data on the command / data bus 31 (and the extended status data bus 41). Since transmission / reception is performed in a packet format, data can be transferred more efficiently than, for example, burst transfer by PCI.
[0135]
Further, since both the control command and the transfer data are transferred on the command / data bus 31, for example, a bus configuration in which the number of control lines is reduced as compared with the PCI can be achieved. As a result, the entire bus configuration including the circuit configuration of each device can be made compact, and the bus control can be simplified.
[0136]
Further, since the output of the control command by the bus master 10 and the transmission / reception of the transfer data in each application 20 are performed based on the separate clock signals CLK and REF, only a single clock signal such as PCI is used. Based on this, it is possible to increase the speed and stability of the data transfer as compared to the case of transmitting / receiving the transfer data. In addition, physical extension of the bus is facilitated.
[0137]
Further, since the transfer data transmitted from one application 20 is received by a plurality of receiving applications 20 (Multi Cast function), even when there are a plurality of receiving applications 20 Appropriate data transfer is possible. Furthermore, since it has a function (Multiplex) for multiplexing and transferring data output from a plurality of transmission side applications 20 on a bus in a time division manner, particularly when there are a plurality of transmission side applications 20. Even so, appropriate data transfer is possible.
[0138]
In addition, when an error occurs in the output process of the control command or the transmission / reception process of the transfer data, the process is retried as a countermeasure against the transmission error. can do.
[0139]
Also, based on the priority information of each transfer data included in the status data obtained from the transmission-side application 20, the bus master 10 determines the transfer order of the transfer data, and the data transfer is performed according to the order. As described above, since the transmission-side application 20 is controlled, it is possible to perform appropriate data transfer in consideration of the priority even when there are a plurality of transfer data. Furthermore, in the extended bus mode, status data including priority information is transmitted and received by the dedicated extended status data bus 41, so that priority information can be transferred efficiently, Transmission / reception of transfer data can be performed more efficiently.
[0140]
In addition, since the time stamp generator 93 (FIG. 4B) is used, it has a function of measuring the time required to transmit / receive transfer data, so that data transfer requiring real-time performance is possible. Can be easily accommodated. In particular, since it also has a function of correcting the time management information PCR included in the data of the MPEG2-TS standard based on the measured time, it is necessary to appropriately transfer the data regarding the data of the MPEG2-TS standard. Can do.
[0141]
In addition, by setting the data width to be variable and including multiple data of the same or multiple types in one packet, there is a function (Multi Width) to output the same or multiple types of data simultaneously on the bus. Therefore, data can be efficiently transferred by effectively using the bus width. For example, when the width of individual transfer data is smaller than the bus width, a plurality of data can be output onto the bus at the same time, so that data transfer can be performed more efficiently than PCI.
[0142]
As a result, various functions such as video signals, audio signals, compressed signals, and data signals can be transferred efficiently and at high speed, and errors such as transfer errors can be dealt with appropriately. A universal bus interface can be realized.
[0143]
【The invention's effect】
As described above, according to the data transfer method in the bus interface according to any one of claims 1 to 3 or the bus interface according to claim 4, in the control device and the plurality of transfer devices, Since the output of control commands and transmission / reception of transfer data are performed based on different clock signals, the data transfer is made faster and more stable than when transfer data is transmitted / received based on a single clock signal. And the physical extension of the bus is facilitated.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a standard configuration example of a bus interface according to an embodiment of the present invention.
FIG. 2 is a block diagram illustrating an extended configuration example of a bus interface according to an embodiment of the present invention.
FIG. 3 is an explanatory diagram showing a list of signal lines in a bus interface according to an embodiment of the present invention.
FIG. 4 is a block diagram showing an internal configuration of a bus master and an application in a bus interface according to an embodiment of the present invention.
FIG. 5 is an explanatory diagram showing setting of logical input / output channels in an application.
FIG. 6 is an explanatory diagram showing a comparison of characteristics of various bus drivers.
FIG. 7 is a circuit diagram showing a configuration example of a bus driver using BLVDS.
FIG. 8 is an explanatory diagram showing the characteristics and functions of a bus interface according to an embodiment of the present invention in comparison with PCI.
FIG. 9 is an explanatory diagram showing a packet structure of commands and data transferred in the bus interface according to the embodiment of the present invention.
FIG. 10 is an explanatory diagram showing an example of a packet structure of transfer data when a data bus is set to a 32-bit width.
FIG. 11 is an explanatory diagram showing an example of a packet structure of transfer data when the data bus is set to a 16-bit width.
FIG. 12 is a circuit diagram showing a basic circuit for calculating CRC.
FIG. 13 is an explanatory diagram showing an overview of control commands used in the bus interface according to the embodiment of the present invention.
FIG. 14 is a timing chart showing the output timing of each signal when data exists for a command when the bus is used at high speed.
FIG. 15 is a timing chart showing the output timing of each signal when only a command is sent continuously when the bus is used at high speed.
FIG. 16 is a timing chart showing the output timing of each signal when data is present with respect to a command when the safety of data transfer is emphasized.
FIG. 17 is a timing chart showing the output timing of each signal when only the command is continuously sent when the safety of data transfer is emphasized.
FIG. 18 is a timing chart showing output timing of each signal in the extended bus mode.
FIG. 19 is an explanatory diagram showing a relationship between a command and data output on a command / data bus and a clock signal serving as a reference for capturing the command and data;
FIG. 20 is a circuit diagram illustrating a configuration example of a processing circuit related to a clock on a transmission side and a reception side of an application.
FIG. 21 is a circuit diagram showing a configuration example of a clock-related processing circuit in the bus master.
FIG. 22 is a block diagram for explaining the function of Multi Width.
FIG. 23 is a block diagram for explaining the function of Multi Cast.
FIG. 24 is a block diagram for explaining functions of Multiplex.
FIG. 25 is a flowchart showing an initialization procedure in the bus interface according to the embodiment of the present invention.
FIG. 26 is a flowchart showing a basic procedure of data transfer in the bus interface according to the embodiment of the present invention.
FIG. 27 is a block diagram illustrating an example of a method for generating a status indicating priority.
FIG. 28 is a flowchart showing the operation of the bus master when a Status Sense command is sent.
FIG. 29 is a flowchart showing the operation of the bus master for determining the priority order of data transfer.
30 is a flowchart showing the operation of the bus master for causing each application to perform data transfer based on the priority order determined by the processing of FIG. 29. FIG.
FIG. 31 is a block diagram for explaining a transfer time measurement function using a time stamp generator;
[Explanation of symbols]
DESCRIPTION OF SYMBOLS 10 ... Bus master, 11, 21 ... Control circuit part, 20 (20-1, ... 20-N) ... Application, 22 ... I / O port, 30 ... Bus, 31 ... Command / data bus, 40 ... Expansion bus 41 ... Extended status data bus, 81 ... Status sense data memory, 82 ... Priority select register, 83 ... Log memory, 84, 93 ... Time stamp generator, 91 ... Buffer memory, 92 ... PID memory, 94: Received PID memory.

Claims (3)

転送データの送受信を行う複数の転送用デバイスと、
前記複数の転送用デバイスの制御を行う制御用デバイスと、
前記制御用デバイスおよび前記各転送用デバイス同士を複数の信号線によって相互接続するバスと
を備え、
前記制御用デバイスからの制御コマンドに従って、前記制御コマンドで指示された前記複数の転送用デバイス間で前記バスを介して転送データの送受信を行うようになされたバス・インタフェースにおけるデータ転送方法であって、
前記制御用デバイスから、バス全体の基準となる基準クロック信号を前記バス上に出力すると共に、その基準クロック信号に同期して、前記制御コマンドを前記バス上に出力し、
前記各転送用デバイスにおいて、前記基準クロック信号に基づいてデータ転送用の他のクロック信号を生成し、その生成されたデータ転送用の他のクロック信号に同期して、前記複数の転送用デバイス間で前記転送データの送受信を行う
ことを特徴とするバス・インタフェースにおけるデータ転送方法。
A plurality of transfer devices that transmit and receive transfer data; and
A control device for controlling the plurality of transfer devices;
A bus for interconnecting the control device and the transfer devices with each other by a plurality of signal lines,
A data transfer method in a bus interface configured to transmit / receive transfer data via the bus between the plurality of transfer devices instructed by the control command according to a control command from the control device. ,
From the control device, a reference clock signal serving as a reference for the entire bus is output on the bus, and the control command is output on the bus in synchronization with the reference clock signal.
Each of the transfer devices generates another clock signal for data transfer based on the reference clock signal, and synchronizes with the generated other clock signal for data transfer between the plurality of transfer devices. A data transfer method in a bus interface, characterized in that the transfer data is transmitted / received by
前記制御コマンドの出力と前記転送データの送受信とをパケット形式で行う
ことを特徴とする請求項1記載のバス・インタフェースにおけるデータ転送方法。
The data transfer method in the bus interface according to claim 1, wherein the output of the control command and the transmission / reception of the transfer data are performed in a packet format.
転送データの送受信を行う複数の転送用デバイスと、
前記複数の転送用デバイスの制御を行う制御用デバイスと、
前記制御用デバイスおよび前記各転送用デバイス同士を複数の信号線によって相互接続するバスと
を備え、
前記制御用デバイスからの制御コマンドに従って、前記制御コマンドで指示された前記複数の転送用デバイス間で前記バスを介して転送データの送受信を行うようになされ、
前記制御用デバイスは、バス全体の基準となる基準クロック信号を前記バス上に出力すると共に、その基準クロック信号に同期して、前記制御コマンドを前記バス上に出力し、
前記各転送用デバイスは、前記基準クロック信号に基づいてデータ転送用の他のクロック信号を生成し、その生成されたデータ転送用の他のクロック信号に同期して、前記複数の転送用デバイス間で前記転送データの送受信を行う
ように構成されていることを特徴とするバス・インタフェース。
A plurality of transfer devices that transmit and receive transfer data; and
A control device for controlling the plurality of transfer devices;
A bus for interconnecting the control device and the transfer devices with each other by a plurality of signal lines,
According to a control command from the control device, transfer data is transmitted and received via the bus between the plurality of transfer devices designated by the control command.
The control device outputs a reference clock signal serving as a reference for the entire bus on the bus, and outputs the control command on the bus in synchronization with the reference clock signal.
Each of the transfer devices generates another clock signal for data transfer based on the reference clock signal, and synchronizes with the generated other clock signal for data transfer between the plurality of transfer devices. A bus interface configured to transmit and receive the transfer data .
JP2001361049A 2001-11-27 2001-11-27 Data transfer method in bus interface and bus interface Expired - Fee Related JP3941096B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001361049A JP3941096B2 (en) 2001-11-27 2001-11-27 Data transfer method in bus interface and bus interface

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001361049A JP3941096B2 (en) 2001-11-27 2001-11-27 Data transfer method in bus interface and bus interface

Publications (2)

Publication Number Publication Date
JP2003162499A JP2003162499A (en) 2003-06-06
JP3941096B2 true JP3941096B2 (en) 2007-07-04

Family

ID=19171770

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001361049A Expired - Fee Related JP3941096B2 (en) 2001-11-27 2001-11-27 Data transfer method in bus interface and bus interface

Country Status (1)

Country Link
JP (1) JP3941096B2 (en)

Also Published As

Publication number Publication date
JP2003162499A (en) 2003-06-06

Similar Documents

Publication Publication Date Title
US11843529B2 (en) Slave-to-master data and out-of-sequence acknowledgements on a daisy-chained bus
US5907717A (en) Cross-connected memory system for allocating pool buffers in each frame buffer and providing addresses thereof
KR100294960B1 (en) Data communication system, data communication method, and data communication apparatus
JP4155413B2 (en) Asynchronous data pipe that automatically manages asynchronous data transfer between the application and the bus
US6516952B1 (en) Dual mode serializer-deserializer for data networks
US20040100944A1 (en) Serial ATA frame structure routing circuitry and protocols
KR100405250B1 (en) Data transfer control device and electronic apparatus
US20140149619A1 (en) Bus system including an interconnector, a master device, a slave device, and an operating method thereof
US20180159699A1 (en) Can controller and data transmission method using the same
EP3671720B1 (en) Real-time on-chip data transfer system
EP1093269B1 (en) Data transfer control device and electronic equipment
WO2001006711A1 (en) Data transfer controller and electronic device
JPH10171750A (en) Data transfer system between memories
JP2009502072A (en) FlexRay communication module, FlexRay communication control device, and method for transmitting a message between a FlexRay communication connection and a FlexRay subscriber device
JP2004193664A (en) Error detecting/correcting system and control apparatus employing the system
JP3941096B2 (en) Data transfer method in bus interface and bus interface
KR19990007118A (en) Serial interface circuit and signal processing method thereof
JP2001520823A (en) Protocol processor for data stream processing
US7177959B2 (en) Information signal processing apparatus and method
KR20180064274A (en) Can controller and method for transmission of data using the same
JP3539287B2 (en) Data transfer control device and electronic equipment
JP2003196229A (en) Data transfer method in bus interface and bus interface
CN120584341A (en) PCIE retimer for implementing redundant endpoint failover using inter-die data interfaces
JP4184458B2 (en) Method for extracting control information from packet data received by communication interface and video data packet control circuit
JP2003196227A (en) Data transfer method in bus interface and bus interface

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20061214

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20061219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070216

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070312

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070325

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100413

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110413

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120413

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees