JP2004013389A - System and method for data transfer - Google Patents

System and method for data transfer Download PDF

Info

Publication number
JP2004013389A
JP2004013389A JP2002164037A JP2002164037A JP2004013389A JP 2004013389 A JP2004013389 A JP 2004013389A JP 2002164037 A JP2002164037 A JP 2002164037A JP 2002164037 A JP2002164037 A JP 2002164037A JP 2004013389 A JP2004013389 A JP 2004013389A
Authority
JP
Japan
Prior art keywords
mode
address
data
data transfer
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2002164037A
Other languages
Japanese (ja)
Inventor
Samwald Chris
クリス・サムワルド
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 JP2002164037A priority Critical patent/JP2004013389A/en
Publication of JP2004013389A publication Critical patent/JP2004013389A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Bus Control (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a system and a method for data transfer which can support efficient memory access by enabling many kinds of plan addressing modes to be set. <P>SOLUTION: A linear mode, a 2D mode, and a circular mode are settable as addressing modes. In the linear mode, data as many as an access number specified with a byte count are accessed sequentially from the position specified by a start address. A parameter of a jump is usable to map a block base when data in macro block units are accessed in MPEG image processing. In the 2D mode, access to a two-dimensional block base becomes possible. In the circular mode, data as many as the access number specified by the byte count can cyclically be accessed. The circular mode is used to access data by lines. <P>COPYRIGHT: (C)2004,JPO

Description

【0001】
【発明の属する技術分野】
この発明は、複数のクライアントデバイスで1つのメモリを共用するようにしたデータ転送システム及びデータ転送システムのデータ転送方法に関するもので、特に、メモリアクセスの効率化に係わる。
【0002】
【従来の技術】
例えば、ディジタル衛星放送等で使われているMPEG(Moving Picture Coding Experts Group)2のトランスポートストリームを処理し、このトランスポートストリームからビデオパケットやオーディオパケットを分離し、デコードされたビデオデータに対して、画像処理を行ったり、OSD(On Screen Display)画像を重畳したりするような画像処理チップの開発が進められている。このような画像処理チップには、種々の画像処理を行うためのグラフィックスエンジン、任意のソース矩形領域の画像をデスティネーション領域にコピーするためのBitBLT(Bit Block Transfer)エンジン、静止画処理をするためのJPEG(Joint Photographic Experts Group)エンジン、OSD画面を生成して重畳したり、画面の拡大、縮小を行うディスプレイプロセッサ等が配される。これらのプロセッサは、メモリバスを介してメモリコントローラと接続されており、これらのプロセッサで、メモリが共用されている。
【0003】
各プロセッサがメモリバスを介してメモリコントローラにトランザクションを要求する場合、従来では、指定されたアドレスから連続的なアドレスへのアクセスしかサポートされていない。すなわち、各プロセッサからメモリコントローラに対するリクエストは、ライトかリードの何れかである。従来のライトのリクエストのプロトコルは、スタートアドレスから指定されたカウントだけメモリにデータを書き込めというものであり、また、リードのプロトコルは、スタートアドレスから指定されたカウントだけメモリからデータを読み出せというものである。このプロトコルでは、スタートアドレスから指定されたアクセスカウントだけ連続的なアドレスにアクセスするものである。
【0004】
【発明が解決しようとする課題】
メモリバスプロトコルの概念を、多数の異なるパラメータとされた非連続的なアクセスパターンのサポートを含むように、メモリバスプロトコルの概念を拡張することにより、バスプロトコルの利用性を強化できる。
【0005】
多彩なアクセスパターンをサポートすることは、バスとメモリコントローラとの双方を含めて、メモリバス全体の効率を増加させる。また、マルチクライアントシステムでは、アービトレーションの作業が単純化される。なぜなら、クライアントが必要とされるアービトレーションの巡回の数が著しく削減されるからである。
【0006】
更に、非連続なデータのアクセスを行うクライアントについては、クライアントの設計の複雑さは、削減される。なぜなら、データオブジェクトは、自然な単位で要求できるからである。これに対して、従来のメモリプロトコル上では、非連続のデータアクセスの場合に、一回に1つのデータワードのデータアクセスであり、非効率的である。
【0007】
そして、1以上のクライアントが同じコマンドを使う場合に、メモリ中で、シングルインスタンスのクライアントから、同じアドレス計算ロジックのマルチインスタンスに置き換えることにより、チップの全体領域が削減される
【0008】
したがって、この発明の目的は、上述の課題を解決することであり、複数の多種案アドレシングモードを設定できるようにすることで、効率的なメモリアクセスをサポートできるようにしたデータ転送システム及び方法を提供することにある。
【0009】
【課題を解決するための手段】
この発明は、複数のクライアントデバイスと、
複数のクライアントデバイスで共用されるメモリと、
メモリを制御するメモリ制御手段と、
複数のクライアントデバイスとメモリ制御手段との間を結ぶバスとを有し、
複数のクライアントデバイスは、メモリをアクセスする際には、バスを介してリソース制御手段にリクエストを送信し、
リクエストにはアドレスモードが含められ、複数のアドレスモードが設定できるようにしたデータ転送システムである。
【0010】
この発明は、複数のクライアントデバイスと、複数のクライアントデバイスで共用されるメモリと、メモリを制御するメモリ制御手段と、複数のクライアントデバイスとメモリ制御手段との間を結ぶバスとの間のデータ転送方法であって、
複数のクライアントデバイスは、メモリをアクセスする際には、バスを介してリソース制御手段にリクエストを送信し、
リクエストにはアドレスモードが含められ、複数のアドレスモードが設定できるようにしたデータ転送方法である。
【0011】
この発明では、アドレシングモードとして、リニアモードと、2Dモードと、サーキュラモードとが設定できる。
【0012】
リニアモードでは、パラメータとして、ジャンプ(Jump)とバイトカウント(Byte Count)が指定される。リニアモードは、バイトカウント(Byte Count)で指定されるアクセス数のデータを、スタートアドレスで指定された位置から順にアクセスするもので、最も標準的なアドレッシングモードである。
【0013】
ジャンプ(Jump)は、2の補数の数値でジャンプするワード(64ビット)を指定するものである。ジャンプは、ワードの境界で行われる。例えば、ジャンプ(Jump=2ワード)にセットすると、ワードの境界で、2ワードジャンプしてアドレスが進められる。負の値を指定することで、逆方法のアドレシングも可能である。ジャンプのパラメータは、例えば、MPEGの画像処理においてマクロブロック単位のデータをアクセスするときに、ブロックベースのマッピングをするのに利用できる。
【0014】
2Dモードでは、パラメータとして、ジャンプ(Jump)と、高さ(Hight)と、カラム(Col)と、ロウ(Row)とが指定できる。2Dモードは、二次元ブロックベースのアクセスを可能としたもので、ロウとカラムとで二次元にアドレスを指定できる。2Dモードは、MPEGで動きベクトルを求める際に、サーチブロックやリファレンスブロックを設定するのに利用できる。
【0015】
サーキュラモードは、パラメータとして、バイトカウント(Byte Count)が指定される。サーキュラモードでは、バイトカウント(Byte Count)で指定されるアクセス数のデータを、巡回的にアクセスするものである。すなわち、サーキュラモードでは、バイトカウント(Byte Count)が指定される範囲内で、エンドアドレスがスタートアドレスに戻ってくるような巡回的なアドレシングが行われる。サーキュラモードは、例えば、ライン毎のデータをアクセスするのに用いることができる。
【0016】
【発明の実施の形態】
以下、この発明の実施の形態について図面を参照しながら説明する。図1は、この発明が適用されたシステムの全体構成を説明するものである。
【0017】
図1において、クライアントデバイス11、12、13は、共用のリソースであるメモリ15をアクセスするデバイスである。例えば、信号処理チップを構成するシステムにおいては、クライアントデバイス11、12、13は、BitBLT(Bit Block Transfer)エンジン、JPEG(Joint Photographic Experts Group)エンジン等のプロセッサである。これらのクライアントデバイス11、12、13は、FIFO(First−In First−Out)メモリ21A、21B、21C及びFIFOメモリ22A、22B、22Cをそれぞれ介して、メモリバス10に接続される。また、メモリバス10には、FIFOメモリ23及び24を介して、メモリコントローラ14が接続される。メモリコントローラ14は、メモリ15のリード/ライトを制御するものである。
【0018】
メモリ15は、複数のクライアントデバイス11、12、13で共通に利用可能なリソースである。メモリ15としては、例えば、SDRAM(Synchronous Dynamic Random Access Memory)が用いられる。SDRAMは、クロックに同期した連続的なデータ転送が可能であり、バースト転送を指定すると、指定したデータ数のデータ転送を1クロック単位で連続して行うことができる。ここでは、SDRAMの構成とされたメモリ15は、1クロックで64ビットのデータを転送することができる。SDRAMは、SDR(Dingle Data Rate)でも、DDR(Double Data Rate)でも良い。また、メモリ15としては、DirectRDRAMを用いるようにしても良い。
【0019】
メモリバス10は、クライアントデバイス11、12、13と、メモリコントローラ14との間で、データの転送を行うバスである。メモリバス10は、クライアントデバイス11、12、13側からメモリコントローラ14側にデータを送る送信バス10Aと、メモリコントローラ14側からのデータをクライアントデバイス11、12、13側で受信する受信バス10Bとからなる。
【0020】
各クライアントデバイス11、12、13とメモリバス10との間には、FIFOメモリ21A、21B、21C及びFIFOメモリ22A、22B、22Cが設けられる。これらのFIFOメモリ21A、21B、21C、FIFOメモリ22A、22B、22Cは、バッファとして設けられる。各クライアントデバイス11、12、13とメモリバス10との間には、FIFOメモリ21A、21B、21C及びFIFOメモリ22A、22B、22Cが設けられているため、各クライアントデバイス11、12、13は、メモリバス10の転送クロックとは非同期で、リクエストの送信やデータの受信が行える。
【0021】
また、メモリコントローラ14とメモリバス10との間には、FIFOメモリ23及びFIFOメモリ24が設けられる。メモリコントローラ14とメモリバス10との間には、FIFOメモリ23及びFIFOメモリ24が設けられているため、メモリコントローラ14は、メモリバス10の転送クロックとは非同期で、リクエストの受信やデータの送信が行える。
【0022】
各クライアントデバイス11、12、13には、ユニークなデバイスIDが割り振られている。各クライアントデバイス11、12、13は、メモリ15をアクセスする場合には、メモリバス10の送信バス10Aを介して、リクエストを送信する。このリクエストは、パケット構造となっている。
【0023】
クライアントデバイス11、12、13は、全て、共通のメモリ15にアクセスすることが可能である。このため、複数のクライアントデバイス11、12、13で、メモリ15へのリクエストが同時に起こるようなことがあり得る。そこで、クライアントデバイス11、12、13からのリクエストの競合を防ぐために、アービタ16が設けられる。
【0024】
クライアントデバイス11、12、13がメモリ15をアクセスする場合には、まず、アービタ16にバスの使用権を得るためのリクエストが送られる。アービタ16は、複数のクライアントデバイスからのリクエストがあった場合には、そのリクエストを調停し、メモリバス10の使用を許可する1つのクライアントデバイスにのみ、グラントを返す。複数のクライアントデバイス11、12、13のうち、グラントが返されてきたクライアントデバイスのみがメモリ15をアクセスすることができる。
【0025】
メモリのライトのリクエストの場合には、クライアントデバイス11、12、13から、ライトのリクエストが送信される。このライトのリクエストが送信バス10Aを介して、メモリコントローラ14に送られる。メモリコントローラ14により、ライトのリクエストに応じて、クライアントデバイス11、12、13から送られたライトデータがメモリ15の所望のアドレスに書き込まれる。
【0026】
メモリのリードのリクエストの場合には、クライアントデバイス11、12、13から、リードのリクエストが送信される。このリードのリクエストが送信バス10Aを介して、メモリコントローラ14に送られる。メモリコントローラ14で、リードのリクエストに応じて、メモリ15の所望のアドレスからデータが読み出される。このリードデータがメモリコントローラ14から、受信バス10Bを介して転送され、リードのリクエストを送信したクライアントデバイス11、12、13で受信される。
【0027】
図2は、メモリバス10に転送されるパケットの構成を示すものである。図2に示すように、メモリバス10に転送されるデータは、ヘッダワードと、データワードと、エンドオブパケットワードとからなるパケット構成とされる。これら、ヘッダと、データと、エンドオブパケットのワードは、64ビットのデータにフラグ等の制御信号を加えた72ビットとなっている。
【0028】
図2A、図2B、及び図2Cは、それぞれ、ヘッダと、データと、エンドオブパケットの各ワードのビットアサインを示すものである。
【0029】
図2A〜図2Cに示すように、各ワードの先頭には、2ビットのフラグが設けられる。フラグは、そのワードが、ヘッダか、データか、エンドオブパケットかを識別するものである。このフラグが例えば、「01」ならヘッダであり、「10」ならデータであり、「11」ならエンドオブパケットである。
【0030】
図2Aのヘッダのワードにおいて、フラグの2ビットの次の6ビットは、クライアント側で定義可能とされている。
【0031】
次の6ビットは、デバイスIDである。各クライアントデバイス毎にユニークなデバイス番号が割り振られており、このデバイスIDは、ターゲットクライアントデバイスのIDを示している。
【0032】
次の6ビットはモードとなっている。モードは、アドレシングフォーマットと共に、アドレスモードを示している。アドレスモードとしては、リニアモード、2D(二次元)モード、サーキュラモード等が用意されている。
【0033】
モードの次の1ビットは、リードかライトかを示している。このビットが例えば「1」ならライトであり、「0」ならリードである。
【0034】
アドレシングフォーマットの次の2ビットは、将来の拡張のためにリザーブされている。
【0035】
その次の30ビットは、スタートアドレスとなっている。スタートアドレスは、リード又はライトするメモリの開始アドレスであり、このアドレスはバイト単位に設定される。
【0036】
図2B及び図2Cに示すように、データワード及びエンドオブパケットワードでは、2ビットのフラグの次に、8ビットのバイトイネーブルが配置され、次に、64ビットのデータが配置される。バイトイネーブルは、対応するデータが有効か無効かを示している。
【0037】
すなわち、1ワードの転送データが64ビットに満たない場合がある。1ワードの転送データが64ビットに満たない場合には、1ワードのデータが64ビットとなるように、図3に示すように、スタッフィングバイトが挿入される。
【0038】
図3Aは、64ビット(8バイト)のうちの下位3バイトがデータで、上位5バイトがスタッフィングバイトの場合を示している。この場合には、図3Aに示すように、バイトイネーブルの8ビットのうち、下位3ビットは有効であることを示す「1」となり、上位5ビットは、無効データであることを示す「0」となる。
【0039】
図3Bは、64ビット(8バイト)のうちの上位2バイトがデータで、下位6バイトがスタッフィングバイトの場合を示している。この場合には、図3Bに示すように、バイトイネーブルの8ビットのうち、上位2ビットは有効であることを示す「1」となり、下位6ビットは、無効データであることを示す「0」となる。
【0040】
図4Aに示すように、ヘッダワード(図2A)には、モードと、アドレシングフォーマットとが設けられ、このモードとアドレシングフォーマットは、アドレスモードを示している。アドレスモードとしては、リニアモード、2Dモード、サーキュラモード等が用意されている。
【0041】
図4Bから図4Dは、各アドレスモードを示すものである。リニアモードでは、図4Bに示すように、モードの4ビットが「0000」となる。
【0042】
リニアモードでは、パラメータとして、ジャンプ(Jump)とバイトカウント(Byte Count)が指定される。リニアモードは、バイトカウント(Byte Count)で指定されるアクセス数のデータを、スタートアドレスで指定された位置から順にアクセスするもので、最も標準的なアドレッシングモードである。
【0043】
ジャンプ(Jump)は、2の補数の数値でジャンプするワード(64ビット)を指定するものである。ジャンプは、ワードの境界で行われる。例えば、ジャンプ(Jump=2ワード)にセットすると、ワードの境界で、2ワードジャンプしてアドレスが進められる。負の値を指定することで、逆方法のアドレシングも可能である。バイトカウント(Byte Count)は、必要なバイト数をセットするものである。
【0044】
2Dモードでは、図4Cに示すように、モードの4ビットが「0001」となる。2Dモードでは、パラメータとして、ジャンプ(Jump)と、高さ(Height)と、カラム(Col)と、ロウ(Row)とが指定できる。2Dモードは、二次元ブロックベースのアクセスを可能としたもので、ロウとカラムとで二次元にアドレスを指定できる。
【0045】
サーキュラモードでは、図4Dに示すように、モードの4ビットが「0010」となる。サーキュラモードでは、パラメータとして、バイトカウント(Byte Count)が指定される。サーキュラモードは、バイトカウント(Byte Count)で指定されるアクセス数のデータを、巡回的にアクセスするものである。すなわち、サーキュラモードでは、バイトカウント(Byte Count)が指定される範囲内で、エンドアドレスがスタートアドレスに戻ってくるような巡回的なアドレシングが行われる。
【0046】
図5は、リニアモードで、スタートアドレスが「05h(hは16進数)」(Start Address=5h)、ジャンプが「2ワード」(Jump=2word)、バイトカウントが「31」(Byte Count=1Fh)が指定されたときのアクセスを示すものである。これは、メモリ上のアドレス「5h」から31バイト分をアクセスし、ワードとワードの境界で、2ワード分ジャンプするようなアクセスを示している。
【0047】
図5に示すように、最初に、「05h」から「07h」の3バイトのデータが順にアクセスされる。ワードとワードの境界となる「07h」からは、2ワードジャンプされ、「10h」から「17h」の1ワードがアクセスされ、ワードの境界で2ワードジャンプされ、「20h」から「27h」の1ワードがアクセスされ、ワードの境界で2ワードジャンプされ、「30h」から「37h」の1ワードがアクセスされ、ワードの境界で2ワードジャンプされ、「40h」から「43h」の4バイトのデータがアクセスされる。これにより、アドレス「05h」から順に、31バイト分のデータがアクセスされたことになる。
【0048】
このようにしてアクセスされたデータを読み出すと、図6に示すように、ヘッダのワードH1と、データのワードD1からD4と、エンドオブパケットのワードD5とからなるパケットとなる。
【0049】
図7Aに示すように、ヘッダのワードH1には、ヘッダであることを示すフラグ「01」が付加される。ヘッダには、図2Aに示したような各種の情報が記述される。
【0050】
図7Bから図7Eに示すように、ワードD1からD4には、データであることを示すフラグ「10」が付加される。ワードD1には、アドレス「05h」から「07h」の3バイトのデータが配置される。なお、3バイトのデータは64ビットに満たないので、ここには、スタッフィングバイトが挿入される。ワードD2には、アドレス「10h」から「17h」の64ビットのデータが配置される。ワードD3には、アドレス「20h」から「27h」の64ビットのデータが配置される。ワードD4には、アドレス「30h」から「37h」の64ビットのデータが配置される。ワードD5には、エンドオブパケットであることを示すフラグ「11」が付加される。ワードD5には、アドレス「40h」から「47h」の4バイトのデータが配置される。なお、4バイトのデータは64ビットに満たないので、ここには、スタッフィングバイトが挿入される。
【0051】
図8は、リニアモードで、スタートアドレスが「52h」(Start Address=52h)、ジャンプが「−3ワード」(Jump=−3word)、バイトカウントが「27」(Byte Count=1Bh)が指定されたときのアクセスを示すものである。これは、メモリ上のアドレス「52h」から27バイト分をアクセスし、ワードとワードの境界で、3ワード分マイナス方向にジャンプするようなアクセスを示している。
【0052】
図8に示すように、最初に、「52h」から「57h」の6バイトのデータが順にアクセスされる。ワードとワードの境界で、3ワードマイナス方向にジャンプされ、「38h」から「3Fh」の1ワードがアクセスされ、ワードの境界で3ワードマイナス方向にジャンプされ、「20h」から「27h」の1ワードがアクセスされ、ワードの境界で3ワードマイナス方向にジャンプされ、「08h」から「0Ch」の5バイトのデータがアクセスされる。これにより、アドレス「52h」から順に、27バイト分のデータがアクセスされたことになる。
【0053】
このようにしてアクセスされたデータを読み出すと、図9に示すように、ヘッダのワードH11と、データのワードD11からD13と、エンドオブパケットのワードD14とからなるパケットとなる。
【0054】
図10Aに示すように、ヘッダのワードH11には、ヘッダワードであることを示すフラグ「01」が付加される。フラグには、図2Aに示したような各種の情報が記述される。
【0055】
図10Bから図10Dに示すように、ワードD11からD13には、データワードであることを示すフラグ「10」が付加される。ワードD11には、アドレス「82h」から「87h」の6バイトのデータが配置される。なお、6バイトのデータは64ビットに満たないので、ここには、スタッフィングバイトが挿入される。ワードD12には、アドレス「38h」から「3Fh」の64ビットのデータが配置される。ワードD13には、アドレス「20h」から「27h」の64ビットのデータが配置される。ワードD14には、エンドオブパケットのワードであることを示すフラグ「11」が付加される。ワードD14には、アドレス「08h」から「0Ch」の4バイトのデータが配置される。なお、4バイトのデータは64ビットに満たないので、ここには、スタッフィングバイトが挿入される。
【0056】
このように、リニアモードでは、バイトカウント(Byte Count)で示されるアクセス数だけ、スタートアドレスから順にアドレスがアクセスされる。また、この例では、ジャンプ(Jump)のパラメータが正負の方向に設定できる。ジャンプ(Jump)のパラメータは、例えば、MPEGの画像処理においてマクロブロック単位のデータをアクセスするときに、ブロックベースのマッピングをするのに利用できる。
【0057】
すなわち、図11に示すように、マクロブロック(MB)の高さは「16」である。ジャンプ(Jump)に「16」という値をセットすると、ワードの境界で、(8×16)バイトアドレスだけジャンプされ、結果的に、ライン方向に連続的なイメージをアクセスすることができる。
【0058】
図12は、2Dモードでのアクセスを示すものである。2Dモードは、ブロックベースマッピングのメモリアクセスを行うためのアドレスモードである。2Dモードでは、図12に示すように、(Row×Col)で表されるバイト数だけアクセスされる。2Dモードは、MPEGで動きベクトルを求める際に、サーチブロックやリファレンスブロックを設定するのに利用できる。
【0059】
図13は、サーキュラモードのアクセスを示すものである。サーキュラモードは、スタートアドレス(Start Address)で指定された位置から、バイトカウント(Byte Count)で指定されるデータ量のデータを、巡回的にアクセスするものである。
【0060】
すなわち、サーキュラモードは、バイトカウント(Byte Count)で指定される範囲を次の式で表される順番でアクセスするものである。
for(i=0;i<ByteCount;i++)
Address_i=trunc(StartAddress,ByteCount)+mod(StartAddress+i,ByteCount)trunc(A,B):Aに最も近いBの倍数
mod(A,B):AをBで割ったときの剰余
iはバイト単位
【0061】
つまり、スタートアドレスに最も近いバイトカウントの倍数の位置を起点として、バイトカウントのアクセス数だけ、バイトカウントの剰余算で回りながら、スタートアドレスから順に、アクセスするものである。したがって、エンドアドレスは、スタートアドレスに戻るようになる。
【0062】
例えば、図13に示すように、バイトカウントを「32」バイト(Byte Count=20h)とし、スタートアドレスを「34h」とすると、
Byte Count=20h
Start Address=34h
スタートアドレス(Start Address)では、

Figure 2004013389
となり、アドレス「34h」からアクセスが開始される。
【0063】
1バイト進むと
Figure 2004013389
となり、以下、
Figure 2004013389
となり、アドレス「35h」、「36h」、「37h」がアクセスされる。
【0064】
アドレス「37h」がアクセスされると、次のワードに移り、
Figure 2004013389
となり、アドレス「38h」、「39h」、「3Ah」、「3Bh」、「3Ch」、「3Dh」、「3Eh」、「3Fh」がアクセスされる。アドレス「38h」から「3Fh」の64ビットがアクセスされると、次のワードに移る。
【0065】
次のアドレスでは、
Figure 2004013389
=20h+0=20hとなり、アドレス「20h」に戻る。それから、
【0066】
Figure 2004013389
となり、アドレス「21h」、「22h」、「23h」、「24h」、「25h」、「26h」「27h」がアクセスされる。アドレス「20h」から「27h」の64ビットがアクセスされると、次のワードに移る。
【0067】
次からのアドレスでは、
Figure 2004013389
となり、アドレス「28h」、「29h」、「2Ah」、「2Bh」、「2Ch」、「2Dh」「2Eh」、「2Fh」がアクセスされる。アドレス「28h」から「2Fh」の64ビットがアクセスされると、次のワードに移る。
【0068】
次からのアドレスでは、
Figure 2004013389
となり、アドレス「30h」、「31h」、「32h」、「33h」がアクセスされる。
【0069】
このようにしてアクセスされたデータを読み出すと、図14に示すように、ヘッダのワードH21と、データのワードD21からD24と、エンドオブパケットのワードD25とからなるパケットとなる。
【0070】
図15Aに示すように、ヘッダには、ヘッダのワードであることを示すフラグ「01」が付加される。ヘッダには、図2Aに示したような各種の情報が記述される。
【0071】
図15Bから図15Eに示すように、ワードD11からD13には、データのワードであることを示すフラグ「10」が付加される。ワードD21には、アドレス「34h」から「37h」の4バイトのデータが配置される。なお、4バイトのデータは64ビットに満たないので、ここには、スタッフィングバイトが挿入される。ワードD22には、アドレス「38h」から「3Fh」の64ビットのデータが配置される。ワードD23には、アドレス「20h」から「27h」の64ビットのデータが配置される。ワードD24には、アドレス「28h」から「2Fh」の64ビットのデータが配置される。ワードD25には、エンドオブパケットのワードであることを示すフラグ「11」が付加される。ワードD25には、アドレス「30h」から「33h」の4バイトのデータが配置される。なお、4バイトのデータは64ビットに満たないので、ここには、スタッフィングバイトが挿入される。
【0072】
このサーキュラモードは、例えば、ライン毎のデータをアクセスするのに用いることができる。例えば、図16に示すように、1ラインのデータをバイトカウントのデータとすると、そのラインのデータを一度にアクセスすることができる。これは、各ラインのデータをキャッシュレジスタに取り込みようなときに利用できる。
【0073】
このように、メモリバス10に転送されるデータは、パケット構造となっている。クライアントデバイス11、12、13からメモリコントローラ14側に送るパケットの種類は、図17に示すように、ライトリクエストのパケット(図17A)と、リードリクエストのパケット(図17B)との2つに分けられる。
【0074】
ライトリクエストのパケットは、図17Aに示すように、ヘッダのワードと、数ワードの書き込みデータとからなり、最後に、エンドオブパケットのワードが来る。
【0075】
リードリクエストのパケットは、図17Bに示すように、リードヘッダの1ワードであり、データワードやエンドオブパケットのワードは存在しない。
【0076】
リードリクエストかライトリクエストかは、パケットの先頭に付加されたヘッダのワードのR/Wビットにより識別できる(図2A参照)。
【0077】
メモリコントローラ14からクライアントデバイス11、12、13側に送られてくるパケットは、クライアントデバイス11、12、13からのリードリクエストに対応してメモリ15から読み出されてきたリードデータのパケットである。このリードデータのパケットは、図18に示すように、ヘッダのワードと、数ワードの書き込みデータとからなり、最後に、エンドオブパケットのワードが来ることになる。
【0078】
図19に示すように、各クライアントデバイス11、12、13には、ユニークなデバイスIDが割り振られる。例えば、図19に示すように、クライアントデバイス11には、デバイスIDとして(ID=01h)が割り当てられ、クライアントデバイス12には、デバイスIDとして(ID=02h)が割り当てられ、クライアントデバイス13には、デバイスIDとして(ID=03h)が割り当てられる。
【0079】
図19Aは送信バス10Aに転送されるワードを示し、図19Bは受信バス10Bに転送されるワードを示す。図19Aに示すように、例えば、クライアントデバイス11が16バイトのデータをメモリ15から読み出す要求をしたとすると、クライアントデバイス11から送信バス10Aを介して、リードリクエストのパケットP1が送られる。このリードリクエストのパケットP1はヘッダのみであり、このヘッダには、デバイスID(ID=01h)で、バイトカウント(Byte Count=16)が記述される。
【0080】
次に、クライアントデバイス12が8バイトのデータをメモリ15から読み出す要求をしたとすると、クライアントデバイス12から送信バス10Aを介して、リードリクエストのパケットP2が送られる。このリードリクエストのパケットはヘッダのみであり、このヘッダには、デバイスID(ID=02h)で、バイトカウント(Byte Count=8)が記述される。
【0081】
次に、クライアントデバイス13が24バイトのデータをメモリ15に書き込む要求をしたとすると、クライアントデバイス13から送信バス10Aを介して、ライトリクエストのパケットP3が送られる。このライトリクエストのパケットP3は、ヘッダのワードと、これに続く2バイト分のデータのワードと、1ワードのエンドオブパケットのワードからなる。このヘッダには、デバイスID(ID=03h)で、バイトカウントが(Byte Count=24)が記述される。
【0082】
このように、メモリバス10の送信バス10Aには、クライアントデバイス11、12、13から、リード又はライトのリクエストがパケット構造で次々に送られてくる。このリード又はライトのリクエストの各ワードは、送信バス10Aから、FIFOメモリ23に一旦読み込まれる。
【0083】
FIFOメモリ23に読み込まれたワードは、順に、メモリコントローラ14に送られる。メモリコントローラ14で、各リクエストに応じて、メモリ15がアクセスされる。
【0084】
すなわち、クライアントデバイス11からのリードリクエストのパケットP1に応答して、メモリ15から所望のアドレスのデータが16バイト分読み出される。このリードデータは、ヘッダと、それに続く1ワードのデータワードと、1ワードのエンドオブパケットからなるパケットP11にパケット化される。このリードデータのパケットP11は、図20Bに示すように、メモリコントローラ14から、受信バス10Bを介して送られる。このリードデータのパケットのヘッダには、デバイスIDとして(ID=01)が記述される。クライアントデバイス11では、デバイスIDが(ID=01)であることから、自分宛のリードデータであることがわかり、このリードデータのパケットP11がクライアントデバイス11で受信される。
【0085】
クライアントデバイス12からのリードリクエストのパケットP2に応答して、メモリ15から所望のアドレスのデータが8バイト分読み出される。このリードデータは、ヘッダと、それに続く1ワードのエンドオブパケットからなるパケットP12にパケット化される。このリードデータのパケットP12は、図20Bに示すように、メモリコントローラ14から、受信バス10Bを介して、送られる。このリードデータのパケットのヘッダには、デバイスIDとして(ID=02)が記述される。クライアントデバイス12では、デバイスIDが(ID=02)であることから、自分宛のリードデータであることがわかり、このリードデータのパケットP12がクライアントデバイス12で受信される。
【0086】
クライアントデバイス13からのリードリクエストのパケットP3に応答して、メモリ15の所望のアドレスに、ライトデータとしてクライアントデバイス13から転送されてきた24バイト分のデータが書き込まれる。
【0087】
なお、上述の例では、画像信号処理チップを構成する場合について説明したが、この発明は、複数のクライアントで1つのリソースを共用するようなシステムでは、同様に適用することが可能である。
【0088】
【発明の効果】
マルチアクセスパターンをサポートすることは、バスとメモリコントローラとの双方を含めて、メモリバス全体の効率を増加させる。また、マルチクライアントシステムでは、アービトレーションの作業が単純化される。なぜなら、クライアントが非隣接データ構成をアクセスするのに必要とされるアービトレーションの巡回の数が著しく削減されるからである。そして、1以上のクライアントが同じコマンドを使う場合に、メモリ中で、シングルインスタンスのクライアントから、同じアドレス計算ロジックのマルチインスタンスに置き換えることにより、チップの全体領域が削減される
【図面の簡単な説明】
【図1】この発明が適用された複数のクライアントデバイスとリソースとからなるシステムの一例のブロック図である。
【図2】バスに転送されるパケットの各ワードの説明に用いる略線図である。
【図3】バスに転送されるパケットのデータの説明に用いる略線図である。
【図4】バスに転送されるパケットのヘッダの説明に用いる略線図である。
【図5】リニアモードのプラス方向ジャンプの説明に用いる略線図である。
【図6】リニアモードのプラス方向ジャンプの説明に用いるタイミング図である。
【図7】リニアモードのプラス方向ジャンプの説明に用いる略線図である。
【図8】リニアモードのマイナス方向ジャンプの説明に用いる略線図である。
【図9】リニアモードのマイナス方向ジャンプの説明に用いるタイミング図である。
【図10】リニアモードのマイナス方向ジャンプの説明に用いる略線図である。
【図11】リニアモードのジャンプの説明に用いる略線図である。
【図12】2Dモードの説明に用いる略線図である。
【図13】サーキュラモードの説明に用いる略線図である。
【図14】サーキュラモードの説明に用いるタイミング図である。
【図15】サーキュラモードの説明に用いる略線図である。
【図16】サーキュラモードの説明に用いる略線図である。
【図17】送信バスに送られるパケットの説明に用いる略線図である。
【図18】受信バスに送られるパケットの説明に用いる略線図である。
【図19】この発明が適用された複数のクライアントデバイスとリソースとからなるシステムの一例の説明に用いるブロック図である。
【図20】この発明が適用された複数のクライアントデバイスとリソースとからなるシステムの一例の説明に用いるタイミング図である。
【符号の説明】
10・・・メモリバス、11、12、13・・・クライアントデバイス、14・・・メモリコントローラ、15・・・メモリ、16・・・アービタ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a data transfer system in which a single memory is shared by a plurality of client devices and a data transfer method of the data transfer system, and more particularly to an improvement in memory access efficiency.
[0002]
[Prior art]
For example, a transport stream of MPEG (Moving Picture Coding Experts Group) 2 used in digital satellite broadcasting or the like is processed, video packets and audio packets are separated from the transport stream, and decoded video data is processed. Image processing chips that perform image processing or superimpose an OSD (On Screen Display) image have been developed. Such an image processing chip performs a graphics engine for performing various types of image processing, a BitBLT (Bit Block Transfer) engine for copying an image of an arbitrary source rectangular area to a destination area, and a still image processing. (Joint Photographic Experts Group) engine for display, a display processor for generating and superimposing an OSD screen, and enlarging and reducing the screen. These processors are connected to a memory controller via a memory bus, and these processors share a memory.
[0003]
When each processor requests a transaction from the memory controller via the memory bus, conventionally, only access from a specified address to a continuous address is supported. That is, the request from each processor to the memory controller is either write or read. The conventional write request protocol is to write data to the memory by the count specified from the start address, and the read protocol is to read data from the memory by the count specified by the start address. It is. In this protocol, continuous addresses are accessed by a specified access count from a start address.
[0004]
[Problems to be solved by the invention]
The use of the bus protocol can be enhanced by extending the concept of the memory bus protocol to include support for a number of different parameterized non-contiguous access patterns.
[0005]
Supporting a variety of access patterns increases the efficiency of the entire memory bus, including both the bus and the memory controller. In a multi-client system, arbitration work is simplified. This is because the number of arbitration rounds required by the client is significantly reduced.
[0006]
Further, for clients accessing non-contiguous data, the complexity of the client design is reduced. This is because data objects can be requested in natural units. On the other hand, in the conventional memory protocol, in the case of non-consecutive data access, the data access is one data word at a time, which is inefficient.
[0007]
When one or more clients use the same command, the entire area of the chip is reduced by replacing a single-instance client with a multi-instance of the same address calculation logic in the memory.
[0008]
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to solve the above-described problems, and to provide a data transfer system and method that can support an efficient memory access by enabling a plurality of alternative addressing modes to be set. To provide.
[0009]
[Means for Solving the Problems]
The invention comprises a plurality of client devices,
Memory shared by multiple client devices;
Memory control means for controlling the memory;
A bus connecting between the plurality of client devices and the memory control means,
When accessing the memory, the plurality of client devices transmit a request to the resource control unit via the bus,
The request includes an address mode, and is a data transfer system in which a plurality of address modes can be set.
[0010]
The present invention relates to a plurality of client devices, a memory shared by the plurality of client devices, a memory control means for controlling the memory, and a data transfer between a bus connecting the plurality of client devices and the memory control means. The method,
When accessing the memory, the plurality of client devices transmit a request to the resource control unit via the bus,
The request includes an address mode, and is a data transfer method in which a plurality of address modes can be set.
[0011]
In the present invention, a linear mode, a 2D mode, and a circular mode can be set as the addressing mode.
[0012]
In the linear mode, jump (Jump) and byte count (Byte Count) are designated as parameters. The linear mode accesses the data of the access number specified by the byte count (Byte Count) sequentially from the position specified by the start address, and is the most standard addressing mode.
[0013]
The jump (Jump) specifies a word (64 bits) to be jumped by a two's complement numerical value. Jumps occur at word boundaries. For example, if the jump is set to (Jump = 2 words), the address is advanced by jumping 2 words at a word boundary. By specifying a negative value, addressing in the reverse way is also possible. Jump parameters can be used to perform block-based mapping when accessing data in units of macroblocks in MPEG image processing, for example.
[0014]
In the 2D mode, jump (Jump), height (High), column (Col), and row (Row) can be designated as parameters. In the 2D mode, two-dimensional block-based access is enabled, and addresses can be specified two-dimensionally by rows and columns. The 2D mode can be used to set a search block or a reference block when obtaining a motion vector by MPEG.
[0015]
In the circular mode, a byte count (Byte Count) is specified as a parameter. In the circular mode, data of the access number specified by the byte count (Byte Count) is accessed cyclically. That is, in the circular mode, cyclic addressing is performed such that the end address returns to the start address within the range in which the byte count (Byte Count) is specified. The circular mode can be used, for example, to access data for each line.
[0016]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 illustrates an overall configuration of a system to which the present invention is applied.
[0017]
In FIG. 1, client devices 11, 12, and 13 are devices that access a memory 15 that is a shared resource. For example, in a system constituting a signal processing chip, the client devices 11, 12, and 13 are processors such as a BitBLT (Bit Block Transfer) engine and a JPEG (Joint Photographic Experts Group) engine. These client devices 11, 12 and 13 are connected to the memory bus 10 via FIFO (First-In First-Out) memories 21A, 21B and 21C and FIFO memories 22A, 22B and 22C, respectively. Further, a memory controller 14 is connected to the memory bus 10 via FIFO memories 23 and 24. The memory controller 14 controls reading / writing of the memory 15.
[0018]
The memory 15 is a resource that can be commonly used by a plurality of client devices 11, 12, and 13. As the memory 15, for example, an SDRAM (Synchronous Dynamic Random Access Memory) is used. The SDRAM is capable of continuous data transfer synchronized with a clock, and when burst transfer is specified, data transfer of the specified number of data can be performed continuously in units of one clock. Here, the memory 15 configured as an SDRAM can transfer 64-bit data in one clock. The SDRAM may be an SDR (Dingle Data Rate) or a DDR (Double Data Rate). Further, as the memory 15, a DirectRDRAM may be used.
[0019]
The memory bus 10 is a bus for transferring data between the client devices 11, 12, and 13 and the memory controller 14. The memory bus 10 includes a transmission bus 10A for transmitting data from the client devices 11, 12, and 13 to the memory controller 14, and a reception bus 10B for receiving data from the memory controller 14 on the client devices 11, 12, and 13. Consists of
[0020]
Between the client devices 11, 12, 13 and the memory bus 10, FIFO memories 21A, 21B, 21C and FIFO memories 22A, 22B, 22C are provided. These FIFO memories 21A, 21B, 21C and FIFO memories 22A, 22B, 22C are provided as buffers. Since FIFO memories 21A, 21B, 21C and FIFO memories 22A, 22B, 22C are provided between each client device 11, 12, 13 and the memory bus 10, each client device 11, 12, 13 Request transmission and data reception can be performed asynchronously with the transfer clock of the memory bus 10.
[0021]
Further, a FIFO memory 23 and a FIFO memory 24 are provided between the memory controller 14 and the memory bus 10. Since the FIFO memory 23 and the FIFO memory 24 are provided between the memory controller 14 and the memory bus 10, the memory controller 14 receives requests and transmits data asynchronously with the transfer clock of the memory bus 10. Can be performed.
[0022]
A unique device ID is allocated to each of the client devices 11, 12, and 13. When accessing the memory 15, each of the client devices 11, 12, and 13 transmits a request via the transmission bus 10A of the memory bus 10. This request has a packet structure.
[0023]
All the client devices 11, 12, and 13 can access the common memory 15. Therefore, a request to the memory 15 may occur simultaneously in a plurality of client devices 11, 12, and 13. Therefore, an arbiter 16 is provided to prevent contention of requests from the client devices 11, 12, and 13.
[0024]
When the client devices 11, 12, and 13 access the memory 15, first, a request for obtaining the right to use the bus is sent to the arbiter 16. When there are requests from a plurality of client devices, the arbiter 16 arbitrates the requests and returns a grant to only one client device that is permitted to use the memory bus 10. Of the plurality of client devices 11, 12, and 13, only the client device for which the grant has been returned can access the memory 15.
[0025]
In the case of a memory write request, a write request is transmitted from the client devices 11, 12, and 13. This write request is sent to the memory controller 14 via the transmission bus 10A. The write data sent from the client devices 11, 12, and 13 is written to a desired address in the memory 15 by the memory controller 14 in response to the write request.
[0026]
In the case of a memory read request, a read request is transmitted from the client devices 11, 12, and 13. This read request is sent to the memory controller 14 via the transmission bus 10A. The memory controller 14 reads data from a desired address of the memory 15 in response to a read request. The read data is transferred from the memory controller 14 via the reception bus 10B, and is received by the client devices 11, 12, and 13 that have transmitted the read request.
[0027]
FIG. 2 shows a configuration of a packet transferred to the memory bus 10. As shown in FIG. 2, the data transferred to the memory bus 10 has a packet configuration including a header word, a data word, and an end-of-packet word. These header, data, and end-of-packet words are 72 bits obtained by adding control signals such as flags to 64-bit data.
[0028]
2A, 2B, and 2C show the header, data, and bit assignment of each word of the end-of-packet, respectively.
[0029]
As shown in FIGS. 2A to 2C, a 2-bit flag is provided at the head of each word. The flag identifies whether the word is a header, data, or end-of-packet. For example, if this flag is “01”, it is a header, if “10”, it is data, and if it is “11”, it is an end-of-packet.
[0030]
In the word of the header in FIG. 2A, the next 6 bits after the 2 bits of the flag can be defined on the client side.
[0031]
The next 6 bits are a device ID. A unique device number is assigned to each client device, and the device ID indicates the ID of the target client device.
[0032]
The next 6 bits are a mode. The mode indicates the address mode together with the addressing format. As the address mode, a linear mode, a 2D (two-dimensional) mode, a circular mode, and the like are prepared.
[0033]
The next one bit of the mode indicates read or write. If this bit is "1", for example, it is a write, and if it is "0", it is a read.
[0034]
The next two bits of the addressing format are reserved for future extensions.
[0035]
The next 30 bits are a start address. The start address is a start address of a memory to be read or written, and this address is set in byte units.
[0036]
As shown in FIGS. 2B and 2C, in the data word and the end of packet word, an 8-bit byte enable is arranged after a 2-bit flag, and then 64-bit data is arranged. The byte enable indicates whether the corresponding data is valid or invalid.
[0037]
That is, the transfer data of one word may be less than 64 bits. If the transfer data of one word is less than 64 bits, a stuffing byte is inserted as shown in FIG. 3 so that the data of one word becomes 64 bits.
[0038]
FIG. 3A shows a case where lower 3 bytes of 64 bits (8 bytes) are data and upper 5 bytes are stuffing bytes. In this case, as shown in FIG. 3A, out of the eight bits of the byte enable, the lower three bits become “1” indicating that the data is valid, and the upper five bits are “0” indicating that the data is invalid. It becomes.
[0039]
FIG. 3B shows a case where the upper 2 bytes of the 64 bits (8 bytes) are data and the lower 6 bytes are stuffing bytes. In this case, as shown in FIG. 3B, of the eight bits of the byte enable, the upper two bits become “1” indicating that the data is valid, and the lower six bits are “0” indicating that the data is invalid. It becomes.
[0040]
As shown in FIG. 4A, a mode and an addressing format are provided in the header word (FIG. 2A), and the mode and the addressing format indicate an address mode. As the address mode, a linear mode, a 2D mode, a circular mode, and the like are prepared.
[0041]
4B to 4D show each address mode. In the linear mode, as shown in FIG. 4B, four bits of the mode are “0000”.
[0042]
In the linear mode, jump (Jump) and byte count (Byte Count) are designated as parameters. The linear mode accesses the data of the access number specified by the byte count (Byte Count) sequentially from the position specified by the start address, and is the most standard addressing mode.
[0043]
The jump (Jump) specifies a word (64 bits) to be jumped by a two's complement numerical value. Jumps occur at word boundaries. For example, if the jump is set to (Jump = 2 words), the address is advanced by jumping 2 words at a word boundary. By specifying a negative value, addressing in the reverse way is also possible. The byte count (Byte Count) sets the required number of bytes.
[0044]
In the 2D mode, as shown in FIG. 4C, four bits of the mode become “0001”. In the 2D mode, jump (Jump), height (Height), column (Col), and row (Row) can be designated as parameters. In the 2D mode, two-dimensional block-based access is enabled, and addresses can be specified two-dimensionally by rows and columns.
[0045]
In the circular mode, as shown in FIG. 4D, four bits of the mode are “0010”. In the circular mode, a byte count (Byte Count) is specified as a parameter. In the circular mode, data of an access number specified by a byte count (Byte Count) is cyclically accessed. That is, in the circular mode, cyclic addressing is performed such that the end address returns to the start address within the range in which the byte count (Byte Count) is specified.
[0046]
FIG. 5 shows a linear mode in which the start address is “05h (h is a hexadecimal number)” (Start Address = 5h), the jump is “2 words” (Jump = 2word), and the byte count is “31” (Byte Count = 1Fh). ) Indicates access when specified. This indicates an access that accesses 31 bytes from the address “5h” on the memory and jumps by two words at the boundary between words.
[0047]
As shown in FIG. 5, first, 3-byte data of "05h" to "07h" are sequentially accessed. Two words are jumped from "07h" which is a boundary between words, one word from "10h" to "17h" is accessed, two words are jumped at a word boundary, and one word from "20h" to "27h" is jumped. A word is accessed, a two-word jump is performed at a word boundary, one word from "30h" to "37h" is accessed, a two-word jump is performed at a word boundary, and 4-byte data from "40h" to "43h" is stored. Is accessed. As a result, 31 bytes of data are accessed sequentially from the address “05h”.
[0048]
When the data accessed in this manner is read, as shown in FIG. 6, a packet is formed of the word H1 of the header, the words D1 to D4 of the data, and the word D5 of the end-of-packet.
[0049]
As shown in FIG. 7A, a flag “01” indicating that the word is a header is added to the word H1 of the header. Various kinds of information as shown in FIG. 2A are described in the header.
[0050]
As shown in FIGS. 7B to 7E, a flag “10” indicating data is added to the words D1 to D4. In the word D1, 3-byte data of addresses “05h” to “07h” are arranged. Note that since the 3-byte data is less than 64 bits, a stuffing byte is inserted here. In word D2, 64-bit data of addresses "10h" to "17h" are arranged. In word D3, 64-bit data of addresses "20h" to "27h" are arranged. In word D4, 64-bit data of addresses "30h" to "37h" are arranged. A flag “11” indicating the end of packet is added to the word D5. In the word D5, 4-byte data of addresses "40h" to "47h" are arranged. Since 4-byte data is less than 64 bits, a stuffing byte is inserted here.
[0051]
FIG. 8 shows a linear mode in which the start address is designated as "52h" (Start Address = 52h), the jump is designated as "-3 words" (Jump = -3word), and the byte count is designated as "27" (Byte Count = 1Bh). This indicates the access when it is performed. This indicates an access that accesses 27 bytes from the address “52h” on the memory and jumps in the minus direction by 3 words at the boundary between words.
[0052]
As shown in FIG. 8, first, 6-byte data of "52h" to "57h" are sequentially accessed. At the boundary between words, the word is jumped three words in the minus direction, one word from "38h" to "3Fh" is accessed, and at the word boundary, three words are jumped in the minus direction, and one word from "20h" to "27h" is accessed. A word is accessed and jumped by three words in the minus direction at the word boundary, and 5-byte data from "08h" to "0Ch" is accessed. As a result, 27 bytes of data are accessed sequentially from the address “52h”.
[0053]
When the data accessed in this manner is read, as shown in FIG. 9, a packet is formed of the word H11 of the header, the words D11 to D13 of the data, and the word D14 of the end of packet.
[0054]
As shown in FIG. 10A, a flag “01” indicating a header word is added to the word H11 of the header. Various kinds of information as shown in FIG. 2A are described in the flag.
[0055]
As shown in FIGS. 10B to 10D, a flag “10” indicating that the word is a data word is added to words D11 to D13. In word D11, 6-byte data of addresses "82h" to "87h" are arranged. Since 6-byte data is less than 64 bits, a stuffing byte is inserted here. In word D12, 64-bit data of addresses "38h" to "3Fh" are arranged. In the word D13, 64-bit data of addresses “20h” to “27h” are arranged. A flag “11” indicating that the word is an end-of-packet word is added to the word D14. In the word D14, 4-byte data of addresses "08h" to "0Ch" are arranged. Since 4-byte data is less than 64 bits, a stuffing byte is inserted here.
[0056]
As described above, in the linear mode, the addresses are sequentially accessed from the start address by the number of accesses indicated by the byte count (Byte Count). In this example, the parameter of the jump can be set in the positive and negative directions. Jump parameters can be used to perform block-based mapping when accessing data in units of macroblocks in MPEG image processing, for example.
[0057]
That is, as shown in FIG. 11, the height of the macroblock (MB) is “16”. When a value of "16" is set in the jump (Jump), the image is jumped by an (8 × 16) byte address at a word boundary, and as a result, a continuous image in the line direction can be accessed.
[0058]
FIG. 12 shows access in the 2D mode. The 2D mode is an address mode for performing block-based mapping memory access. In the 2D mode, as shown in FIG. 12, access is performed by the number of bytes represented by (Row × Col). The 2D mode can be used to set a search block or a reference block when obtaining a motion vector by MPEG.
[0059]
FIG. 13 shows access in the circular mode. In the circular mode, data of a data amount specified by a byte count (Byte Count) is cyclically accessed from a position specified by a start address (Start Address).
[0060]
That is, in the circular mode, the range specified by the byte count (Byte Count) is accessed in the order represented by the following expression.
for (i = 0; i <ByteCount; i ++)
Address_i = trunc (StartAddress, ByteCount) + mod (StartAddress + i, ByteCount) trunc (A, B): multiple of B closest to A
mod (A, B): remainder when A is divided by B
i is in bytes
[0061]
In other words, starting from the position of the multiple of the byte count closest to the start address, the access is performed sequentially from the start address while rotating by the byte count remainder calculation by the byte count access count. Therefore, the end address returns to the start address.
[0062]
For example, as shown in FIG. 13, if the byte count is “32” bytes (Byte Count = 20h) and the start address is “34h”,
Byte Count = 20h
Start Address = 34h
In the start address (Start Address),
Figure 2004013389
And the access is started from the address “34h”.
[0063]
One byte forward
Figure 2004013389
And below,
Figure 2004013389
And the addresses “35h”, “36h”, and “37h” are accessed.
[0064]
When the address “37h” is accessed, the processing moves to the next word,
Figure 2004013389
And the addresses “38h”, “39h”, “3Ah”, “3Bh”, “3Ch”, “3Dh”, “3Eh”, and “3Fh” are accessed. When 64 bits of “3Fh” are accessed from the address “38h”, the process moves to the next word.
[0065]
At the following address:
Figure 2004013389
= 20h + 0 = 20h, and returns to the address “20h”. then,
[0066]
Figure 2004013389
And the addresses “21h”, “22h”, “23h”, “24h”, “25h”, “26h” and “27h” are accessed. When the 64 bits of the addresses “20h” to “27h” are accessed, the process moves to the next word.
[0067]
In the following address,
Figure 2004013389
And the addresses “28h”, “29h”, “2Ah”, “2Bh”, “2Ch”, “2Dh”, “2Eh”, and “2Fh” are accessed. When 64 bits of “2Fh” are accessed from the address “28h”, the process moves to the next word.
[0068]
In the following address,
Figure 2004013389
And the addresses “30h”, “31h”, “32h”, and “33h” are accessed.
[0069]
When the data accessed in this manner is read, as shown in FIG. 14, it becomes a packet including the word H21 of the header, the words D21 to D24 of the data, and the word D25 of the end of packet.
[0070]
As shown in FIG. 15A, a flag “01” indicating the word of the header is added to the header. Various kinds of information as shown in FIG. 2A are described in the header.
[0071]
As shown in FIGS. 15B to 15E, a flag “10” indicating that the word is a data word is added to the words D11 to D13. In the word D21, 4-byte data of addresses "34h" to "37h" are arranged. Since 4-byte data is less than 64 bits, a stuffing byte is inserted here. In word D22, 64-bit data of addresses "38h" to "3Fh" are arranged. In word D23, 64-bit data of addresses "20h" to "27h" are arranged. In the word D24, 64-bit data of addresses “28h” to “2Fh” are arranged. A flag “11” indicating that the word is an end-of-packet word is added to the word D25. In the word D25, 4-byte data of addresses "30h" to "33h" are arranged. Since 4-byte data is less than 64 bits, a stuffing byte is inserted here.
[0072]
This circular mode can be used, for example, to access data for each line. For example, as shown in FIG. 16, when one line of data is byte count data, the data of that line can be accessed at a time. This can be used when data of each line is taken into a cache register.
[0073]
Thus, the data transferred to the memory bus 10 has a packet structure. As shown in FIG. 17, the types of packets sent from the client devices 11, 12, and 13 to the memory controller 14 are divided into two types: a write request packet (FIG. 17A) and a read request packet (FIG. 17B). Can be
[0074]
As shown in FIG. 17A, the write request packet includes a header word and several words of write data. Finally, an end-of-packet word comes.
[0075]
As shown in FIG. 17B, the read request packet is one word of the read header, and there is no data word or end-of-packet word.
[0076]
Whether the request is a read request or a write request can be identified by the R / W bit of the word of the header added to the head of the packet (see FIG. 2A).
[0077]
Packets sent from the memory controller 14 to the client devices 11, 12, 13 are read data packets read from the memory 15 in response to read requests from the client devices 11, 12, 13. As shown in FIG. 18, the read data packet includes a header word and several words of write data, and finally an end-of-packet word comes.
[0078]
As shown in FIG. 19, a unique device ID is assigned to each of the client devices 11, 12, and 13. For example, as shown in FIG. 19, the client device 11 is assigned (ID = 01h) as a device ID, the client device 12 is assigned (ID = 02h) as a device ID, and the client device 13 is assigned. , And (ID = 03h) are assigned as device IDs.
[0079]
FIG. 19A shows words transferred to the transmission bus 10A, and FIG. 19B shows words transferred to the reception bus 10B. As shown in FIG. 19A, for example, if the client device 11 requests to read 16-byte data from the memory 15, a read request packet P1 is transmitted from the client device 11 via the transmission bus 10A. This read request packet P1 has only a header, and in this header, a device ID (ID = 01h) and a byte count (Byte Count = 16) are described.
[0080]
Next, assuming that the client device 12 has made a request to read 8-byte data from the memory 15, a read request packet P2 is sent from the client device 12 via the transmission bus 10A. This read request packet has only a header, and the header describes a device ID (ID = 02h) and a byte count (Byte Count = 8).
[0081]
Next, assuming that the client device 13 makes a request to write 24-byte data to the memory 15, a write request packet P3 is sent from the client device 13 via the transmission bus 10A. The write request packet P3 includes a header word, a 2-byte data word following the header word, and a 1-word end-of-packet word. In this header, a device ID (ID = 03h) and a byte count (Byte Count = 24) are described.
[0082]
As described above, read or write requests are sequentially transmitted from the client devices 11, 12, and 13 in a packet structure to the transmission bus 10A of the memory bus 10. Each word of the read or write request is once read into the FIFO memory 23 from the transmission bus 10A.
[0083]
The words read into the FIFO memory 23 are sent to the memory controller 14 in order. The memory controller 14 accesses the memory 15 in response to each request.
[0084]
That is, in response to the packet P1 of the read request from the client device 11, 16 bytes of data at the desired address are read from the memory 15. This read data is packetized into a packet P11 including a header, a data word of one word following the header, and an end of packet of one word. The packet P11 of the read data is sent from the memory controller 14 via the reception bus 10B as shown in FIG. 20B. In the header of the packet of the read data, (ID = 01) is described as a device ID. Since the device ID is (ID = 01), the client device 11 knows that the read data is addressed to itself, and the client device 11 receives the packet P11 of the read data.
[0085]
In response to a read request packet P2 from the client device 12, data of a desired address is read from the memory 15 for 8 bytes. This read data is packetized into a packet P12 consisting of a header and a one-word end-of-packet following the header. The packet P12 of the read data is sent from the memory controller 14 via the reception bus 10B as shown in FIG. 20B. In the header of the packet of the read data, (ID = 02) is described as a device ID. Since the device ID is (ID = 02) in the client device 12, it is known that the read data is addressed to itself, and the packet P12 of this read data is received by the client device 12.
[0086]
In response to the read request packet P3 from the client device 13, the 24-byte data transferred from the client device 13 as write data is written to a desired address in the memory 15.
[0087]
In the above example, the case where the image signal processing chip is configured has been described. However, the present invention can be similarly applied to a system in which a plurality of clients share one resource.
[0088]
【The invention's effect】
Supporting multiple access patterns increases the efficiency of the entire memory bus, including both the bus and the memory controller. In a multi-client system, arbitration work is simplified. This is because the number of arbitration cycles required for a client to access a non-contiguous data structure is significantly reduced. When one or more clients use the same command, the entire area of the chip is reduced by replacing a single-instance client with a multi-instance of the same address calculation logic in the memory.
[Brief description of the drawings]
FIG. 1 is a block diagram of an example of a system including a plurality of client devices and resources to which the present invention is applied.
FIG. 2 is a schematic diagram used to explain each word of a packet transferred to a bus.
FIG. 3 is a schematic diagram used for describing data of a packet transferred to a bus.
FIG. 4 is a schematic diagram used for describing a header of a packet transferred to a bus.
FIG. 5 is a schematic diagram used for describing a positive-direction jump in a linear mode.
FIG. 6 is a timing chart used for describing a positive-direction jump in the linear mode.
FIG. 7 is a schematic diagram used for describing a positive-direction jump in a linear mode.
FIG. 8 is a schematic diagram used for describing a minus jump in the linear mode.
FIG. 9 is a timing chart used to explain a minus jump in the linear mode.
FIG. 10 is a schematic diagram used for explaining a minus jump in the linear mode.
FIG. 11 is a schematic diagram used to explain a jump in a linear mode.
FIG. 12 is a schematic diagram used for describing a 2D mode.
FIG. 13 is a schematic diagram used for describing a circular mode.
FIG. 14 is a timing chart used for explaining a circular mode.
FIG. 15 is a schematic diagram used for describing a circular mode.
FIG. 16 is a schematic diagram used for describing a circular mode.
FIG. 17 is a schematic diagram used for describing a packet sent to a transmission bus.
FIG. 18 is a schematic diagram used for describing a packet sent to a reception bus.
FIG. 19 is a block diagram used to describe an example of a system including a plurality of client devices and resources to which the present invention has been applied.
FIG. 20 is a timing chart used for describing an example of a system including a plurality of client devices and resources to which the present invention is applied.
[Explanation of symbols]
10: memory bus, 11, 12, 13 ... client device, 14: memory controller, 15: memory, 16: arbiter

Claims (18)

複数のクライアントデバイスと、
上記複数のクライアントデバイスで共用されるメモリと、
上記メモリを制御するメモリ制御手段と、
上記複数のクライアントデバイスと上記メモリ制御手段との間を結ぶバスとを有し、
上記複数のクライアントデバイスは、上記メモリをアクセスする際には、上記バスを介して上記リソース制御手段にリクエストを送信し、
上記リクエストにはアドレスモードが含められ、複数のアドレスモードが設定できるようにしたデータ転送システム。
Multiple client devices,
A memory shared by the plurality of client devices;
Memory control means for controlling the memory,
A bus connecting the plurality of client devices and the memory control means,
The plurality of client devices, when accessing the memory, transmit a request to the resource control unit via the bus,
A data transfer system in which an address mode is included in the request and a plurality of address modes can be set.
上記メモリは、所定のデータ長のワードを単位としてリード/ライトされるようにした請求項1に記載のデータ転送システム。2. The data transfer system according to claim 1, wherein the memory is read / written in units of words having a predetermined data length. 上記メモリは、SDR又はDDRのSDRAMである請求項2に記載のデータ転送システム。3. The data transfer system according to claim 2, wherein the memory is an SDR or DDR SDRAM. 上記リクエストは、パケット化されており、上記パケットのヘッダのワードに、上記スタートアドレスと、アドレシングモードと、パラメータが含められるようにした請求項1に記載のデータ転送システム。2. The data transfer system according to claim 1, wherein the request is packetized, and a word of a header of the packet includes the start address, the addressing mode, and a parameter. 上記アドレスモードはリニアモードであり、上記リニアモードでは、スタートアドレスと、アクセスカウントのパラメータとが指定され、上記スタートアドレスからアクセスカウントに達するまで、アドレスが順にアクセスされるようにした請求項1に記載のデータ転送システム。2. The method according to claim 1, wherein the address mode is a linear mode, and in the linear mode, a start address and a parameter of an access count are designated, and the addresses are sequentially accessed from the start address until the access count is reached. Data transfer system as described. 上記リニアモードでは、更に、ジャンプのパラメータが指定され、ワードの境界で上記ジャンプで指定されるアドレスだけジャンプしてアクセスされるようにした請求項5に記載のデータ転送システム。6. The data transfer system according to claim 5, wherein in the linear mode, a jump parameter is further specified, and the data is jumped and accessed at an address specified by the jump at a word boundary. 上記ジャンプのパラメータは、正負の方向に設定できるようにした請求項6に記載のデータ転送システム。7. The data transfer system according to claim 6, wherein the jump parameters can be set in positive and negative directions. 上記アドレスモードは2次元モードであり、上記二次元モードでは、スタートアドレスと、ロウ方向のパラメータと、カラム方向のパラメータとが指定され、二次元のアドレスがアクセスされるようにした請求項1に記載のデータ転送システム。2. The address mode is a two-dimensional mode. In the two-dimensional mode, a start address, a parameter in a row direction, and a parameter in a column direction are designated, and a two-dimensional address is accessed. Data transfer system as described. 上記二次元モードでは、更に、ジャンプのパラメータが指定され、ワードの境界で上記ジャンプで指定されるアドレスだけジャンプしてアクセスされるようにした請求項8に記載のデータ転送システム。9. The data transfer system according to claim 8, wherein in the two-dimensional mode, a jump parameter is further specified, and the data is jumped and accessed by an address specified by the jump at a word boundary. 上記アドレスモードはサーキュラモードであり、上記サーキュラモードでは、スタートアドレスと、アクセスカウントのパラメータとが指定され、上記スタートアドレスからアクセスカウントに達するまで、エンドアドレスがスタートアドレスに戻るように、アドレスが巡回的にアクセスされるようにした請求項1に記載のデータ転送システム。The above-mentioned address mode is a circular mode. In the above-mentioned circular mode, a start address and an access count parameter are specified, and the address is circulated so that the end address returns to the start address from the start address until the access count is reached. 2. The data transfer system according to claim 1, wherein the data transfer system is accessed dynamically. 複数のクライアントデバイスと、上記複数のクライアントデバイスで共用されるメモリと、上記メモリを制御するメモリ制御手段と、上記複数のクライアントデバイスと上記メモリ制御手段との間を結ぶバスとの間のデータ転送方法であって、
上記複数のクライアントデバイスは、上記メモリをアクセスする際には、上記バスを介して上記リソース制御手段にリクエストを送信し、
上記リクエストにはアドレスモードが含められ、複数のアドレスモードが設定できるようにしたデータ転送方法。
A plurality of client devices; a memory shared by the plurality of client devices; a memory control means for controlling the memory; and a data transfer between a bus connecting the plurality of client devices and the memory control means. The method,
The plurality of client devices, when accessing the memory, transmit a request to the resource control unit via the bus,
A data transfer method in which the request includes an address mode, and a plurality of address modes can be set.
上記リクエストは、パケット化されており、上記パケットのヘッダのワードに、上記スタートアドレスと、アドレシングモードと、パラメータが含められるようにした請求項11に記載のデータ転送方法。12. The data transfer method according to claim 11, wherein the request is packetized, and a word of a header of the packet includes the start address, the addressing mode, and a parameter. 上記アドレスモードはリニアモードであり、上記リニアモードでは、スタートアドレスと、アクセスカウントのパラメータとが指定され、上記スタートアドレスからアクセスカウントに達するまで、アドレスが順にアクセスされるようにした請求項11に記載のデータ転送方法。The address mode is a linear mode, and in the linear mode, a start address and an access count parameter are designated, and addresses are sequentially accessed from the start address until the access count is reached. Data transfer method described. 上記リニアモードでは、更に、ジャンプのパラメータが指定され、ワードの境界で上記ジャンプで指定されるアドレスだけジャンプしてアクセスされるようにした請求項13に記載のデータ転送方法。14. The data transfer method according to claim 13, wherein in the linear mode, a jump parameter is further specified, and a jump is performed at a word boundary by an address specified by the jump. 上記ジャンプのパラメータは、正負の方向に設定できるようにした請求項14に記載のデータ転送方法。15. The data transfer method according to claim 14, wherein the jump parameters can be set in positive and negative directions. 上記アドレスモードは2次元モードであり、上記二次元モードでは、スタートアドレスと、ロウ方向のパラメータと、カラム方向のパラメータとが指定され、二次元のアドレスがアクセスされるようにした請求項11に記載のデータ転送方法。The address mode is a two-dimensional mode, and in the two-dimensional mode, a start address, a parameter in a row direction, and a parameter in a column direction are designated, and a two-dimensional address is accessed. Data transfer method described. 上記二次元モードでは、更に、ジャンプのパラメータが指定され、ワードの境界で上記ジャンプで指定されるアドレスだけジャンプしてアクセスされるようにした請求項16に記載のデータ転送方法。17. The data transfer method according to claim 16, wherein in the two-dimensional mode, a jump parameter is further specified, and the data is jumped and accessed by an address specified by the jump at a word boundary. 上記アドレスモードはサーキュラモードであり、上記サーキュラモードでは、スタートアドレスと、アクセスカウントのパラメータとが指定され、上記スタートアドレスからアクセスカウントに達するまで、エンドアドレスがスタートアドレスに戻るように、アドレスが巡回的にアクセスされるようにした請求項11に記載のデータ転送方法。The above-mentioned address mode is a circular mode. In the above-mentioned circular mode, a start address and an access count parameter are specified, and the address is circulated so that the end address returns to the start address from the start address until the access count is reached. The data transfer method according to claim 11, wherein the data transfer is performed in a dynamic manner.
JP2002164037A 2002-06-05 2002-06-05 System and method for data transfer Pending JP2004013389A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002164037A JP2004013389A (en) 2002-06-05 2002-06-05 System and method for data transfer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002164037A JP2004013389A (en) 2002-06-05 2002-06-05 System and method for data transfer

Publications (1)

Publication Number Publication Date
JP2004013389A true JP2004013389A (en) 2004-01-15

Family

ID=30432295

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002164037A Pending JP2004013389A (en) 2002-06-05 2002-06-05 System and method for data transfer

Country Status (1)

Country Link
JP (1) JP2004013389A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006065864A (en) * 2004-08-19 2006-03-09 Sony Computer Entertainment Inc Image data structure for direct memory access
JP2006254437A (en) * 2005-03-11 2006-09-21 Ambarella Inc Low electric power memory hierarchy for high-performance video processor
KR100868451B1 (en) 2007-02-22 2008-11-11 삼성전자주식회사 Memory Access Method Using 3 Dimensional Address Mapping
KR101154286B1 (en) 2011-12-30 2012-06-14 (주)케이닷컴 Memory controller for simultaneously multiple access

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006065864A (en) * 2004-08-19 2006-03-09 Sony Computer Entertainment Inc Image data structure for direct memory access
JP4527029B2 (en) * 2004-08-19 2010-08-18 株式会社ソニー・コンピュータエンタテインメント Image data structure for direct memory access
JP2006254437A (en) * 2005-03-11 2006-09-21 Ambarella Inc Low electric power memory hierarchy for high-performance video processor
JP2013055703A (en) * 2005-03-11 2013-03-21 Ambarella Inc Low power memory hierarchy for high performance video processor
KR100868451B1 (en) 2007-02-22 2008-11-11 삼성전자주식회사 Memory Access Method Using 3 Dimensional Address Mapping
US7779225B2 (en) 2007-02-22 2010-08-17 Samsung Electronics Co., Ltd. Memory access method using three dimensional address mapping
KR101154286B1 (en) 2011-12-30 2012-06-14 (주)케이닷컴 Memory controller for simultaneously multiple access

Similar Documents

Publication Publication Date Title
US6611883B1 (en) Method and apparatus for implementing PCI DMA speculative prefetching in a message passing queue oriented bus system
JP3641675B2 (en) Split buffer architecture
US6622193B1 (en) Method and apparatus for synchronizing interrupts in a message passing queue oriented bus system
JP4439491B2 (en) Multi-graphics processor system, graphics processor and data transfer method
JP4275085B2 (en) Information processing apparatus, information processing method, and data stream generation method
KR100245821B1 (en) Video interface and overlay system and process
JP2007183692A (en) Data processor
KR20170026116A (en) high performance transaction-based memory systems
JP2009032243A (en) Optimal use of buffer space by storage controller for writing directly retrieved data to memory
JP2013509655A (en) Address translation unit containing multiple virtual queues
JPH06187298A (en) Data transfer processing method and data transfer processor
US20050253858A1 (en) Memory control system and method in which prefetch buffers are assigned uniquely to multiple burst streams
JP2001022638A (en) Information processing system
US6647439B1 (en) Arrangement with a plurality of processors sharing a collective memory
US7865632B2 (en) Memory allocation and access method and device using the same
WO2000000887A9 (en) Method and apparatus for transporting information to a graphic accelerator card
JP2004013389A (en) System and method for data transfer
JP2005209206A (en) Data transfer method for multiprocessor system, multiprocessor system, and processor for executing the method
JP2002084311A (en) Packet transmission equipment
JP2000339220A (en) Cache block reserving method and computer system with cache block reserving function
JP4748641B2 (en) Information processing system
JP2001125826A (en) Device provided with plural processors having interface for set memory
JP4126959B2 (en) Data transfer system and access monitor device
US6785795B1 (en) Data processing device for use in cooperation with a memory
JP2003271445A (en) Memory control device and method