JP3970049B2 - Address data generation apparatus and memory addressing method - Google Patents
Address data generation apparatus and memory addressing method Download PDFInfo
- Publication number
- JP3970049B2 JP3970049B2 JP2002049269A JP2002049269A JP3970049B2 JP 3970049 B2 JP3970049 B2 JP 3970049B2 JP 2002049269 A JP2002049269 A JP 2002049269A JP 2002049269 A JP2002049269 A JP 2002049269A JP 3970049 B2 JP3970049 B2 JP 3970049B2
- Authority
- JP
- Japan
- Prior art keywords
- value
- register
- address
- adder
- 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
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は、メモリのモジュロアドレッシングを高速に行うための演算器に関する。
【0002】
【従来の技術】
デジタル複写機やファクシミリ装置等の画像処理では、画素数の増加、画像処理の多様化などにより、データの高速処理が求められている。画像処理などにはDSP(Digital Signal Processor)や、SIMD(Single Instruction−stream Multiple Data−stream)方式のプロセッサが用いられることが多いが、いずれも大量のデータを高速に処理するための工夫を必要とする。
【0003】
例えば、SIMD方式のプロセッサは、算術論理演算器とレジスタファイルを備えたプロセッサエレメント(以下、PEと言う。)(図1、図2参照)と呼ばれるブロックを複数個装備する。それら複数個のPEにより、複数のデータを一度に(同時)処理する。PEにはプロセッサの外部ポートよりデータが順次レジスタファイルに取り込まれ、PE内で処理された後、レジスタファイルに書き込まれ、外部ポートよりプロセッサ外にデータが出力される。このような処理を例えばデジタル複写機に当てはめてみると、プロセッサの外部からスキャナ(CCD)でデータを取り込み、プロセッサ内でデータを加工し、プリンタにデータを送り印刷する、ということになる。
【0004】
SIMD方式のプロセッサではデータを処理するにあたり、複数のデータをPE内に保持しておく必要があることが想定される。このような場合に、データを一時貯めておけるメモリが各PEに備わり、且つレジスタファイルから該メモリにリード・ライト(読み書き)できるような構成が設定されていれば、効率良くデータの処理を行うことができる。本明細書では、そのようなメモリを「ラインバッファ」と称する。
【0005】
ところで、このラインバッファを備えるプロセッサでは、ラインバッファとレジスタファイルとのデータの入出力を高速に行えるか否かが、プロセッサのデータ処理能力に大きく関わる。そのようなデータ入出力を高速に行なうためには、ラインバッファに対するアドレッシングが効率良く行なわれなければならない。ところが、アドレッシングを効率良く行うには、通常、アドレス計算を高速に行うための回路が別途必要である。また、レジスタを組み合わせての複雑なアドレッシングを行うという方策も想定され得る。いずれにしても、コストや処理の複雑さにおいて、問題点を含んでいる。
【0006】
上記以外の方策として、複数のレジスタを用意し、加算器を複数段設け、その上で、オフセットとなるレジスタにモジュロ値を加算すると言ったモジュロアドレッシングを行う、というものも挙げられる。けれども、やはり、加算器を複数段設けることは高速処理に影響する。
【0007】
ここで、一般的なプロセッサにおいても、モジュロアドレッシングは重要である。近年、画像データや音声データなどの大容量のデータを処理するために、DSPやRISCプロセッサが利用されている。こういったプロセッサの中にもモジュロアドレッシングを含むものは多い。
【0008】
【発明が解決しようとする課題】
本発明は、プロセッサにおいてモジュロアドレッシングを高速に行うことを目的とする。
【0009】
【課題を解決するための手段】
本発明は、上記の目的を達成するために為されたものである。本発明に係る請求項1に記載のメモリアドレッシング方法は、
メモリへのアクセスを行う際のアドレスをカレントポインタレジスタに格納し、
命令が実行されるときのアドレスとして、上記カレントポインタレジスタを実効アドレスとするメモリアドレッシング方法であって、
(1)命令実行後に、実効アドレスの値が、別途設置されたハイポインタレジスタの値以上の場合、実効アドレスの値から別途設置されたレングスレジスタの値を減算して算出された値をカレントポインタレジスタに格納し、
実効アドレスの値が、ハイポインタレジスタの値未満の場合、実効アドレスの値に別途設けられたインデクスレジスタの値を加算して算出された値をカレントポインタレジスタに格納するステップと、
(2)命令実行後に、実効アドレスの値に1を加算した値が、別途設置されたハイポインタレジスタの値と別途設置されたインデクスレジスタの値とを加算した値に一致した場合は、ハイポインタレジスタの値から別途設置されたレングスレジスタの値を減算して算出された値をカレントポインタレジスタに格納し、
実効アドレスの値に1を加算した値が、別途設置されたハイポインタレジスタの値と別途設置されたインデクスレジスタの値とを加算した値に一致しなかった場合は、実効アドレスに1を加算して算出された値をカレントポインタレジスタに格納するステップと
のうち、いずれか一を行うメモリアドレッシング方法である。
【0010】
本発明に係る請求項2に記載のアドレスデータ生成装置は、
カレントポインタレジスタの値からハイポインタレジスタの値を減算する第1の減算器と、
カレントポインタレジスタの値とインデクスレジスタの値とを加算する第2の加算器と、
カレントポインタレジスタの値からレングスレジスタの値を減算する第3の減算器と、
第1の減算器のキャリー出力をセレクト信号として、第2の加算器の出力値と第3の減算器の出力値との、いずれかを選択する第1のマルチプレクサと
から構成される、
請求項1に記載のメモリアドレッシング方法を行う、アドレスデータ生成装置である。
【0011】
本発明に係る請求項3に記載のアドレスデータ生成装置は、
カレントポインタレジスタの値に1を加算する第4の加算器と、
インデクスレジスタの値とハイポインタレジスタの値とを加算する第5の加算器と、
ハイポインタレジスタの値からレングスレジスタの値を減算する第6の減算器と、
第4の加算器の出力値と第5の加算器の出力値とを比較する第1のコンパレータと、
第1のコンパレータからの比較結果信号をセレクト信号として、第4の加算器の出力値と第6の減算器の出力値との、いずれかを選択する第2のマルチプレクサと
から構成される、
請求項1に記載のメモリアドレッシング方法を行う、アドレスデータ生成装置である。
【0012】
本発明に係る請求項4に記載のアドレスデータ生成装置は、
−1とハイポインタレジスタとの値のいずれかを選択する第3のマルチプレクサと、
カレントポインタレジスタの値とハイポインタレジスタの値とのいずれかを選択する第4のマルチプレクサと、
カレントポインタレジスタの値から上記第3のマルチプレクサの出力値を減算する第7の減算器と、
インデクスレジスタの値と上記第4のマルチプレクサの値とを加算する第8の加算器と、
上記第4のマルチプレクサの出力値からレングスレジスタの値を減算する第9の減算器と、
第7の減算器の出力値と第8の加算器の出力値とを比較する第2のコンパレータと、
第7の減算器のキャリーと、第2のコンパレータからの比較結果信号とを、セレクト信号として、第7の減算器の出力値と第8の加算器の出力値と第9の減算器の出力値との、いずれかを選択する第5のマルチプレクサと
から構成される、
請求項1に記載のメモリアドレッシング方法を行う、アドレスデータ生成装置である。
【0014】
【発明の実施の形態】
以下、図面を参照して本発明に係る好適な実施形態について説明する。
【0015】
図3乃至図5において、本発明に係る第1の実施の形態、第2の実施の形態、及び第3の実施の形態のアドレスデータ生成装置30、30’、30”を示す。いずれも、4つのレジスタと、3つの加算器または減算器とが、基本的に含まれる。それら4つのレジスタは、
(1)メモリ中の指定のエリアにアクセスするためのメモリの先頭アドレスを格納するカレントポインタレジスタ(以下、Cレジスタと言う。)32、
(2)エリアの終了に関連するアドレスを格納するハイポインタレジスタ(以降Hレジスタ)34、
(3)モジュロ値を格納するインデクスレジスタ(以下、Iレジスタと言う。)36、及び、
(4)転送データ数(エリアの大きさ)に関連する値を格納するレングスレジスタ(以下、Lレジスタと言う。)38
である。説明の便宜上、ここでは各レジスタを16ビットのものに限定しているが、メモリサイズにより増減してもよい。また、レジスタの個数も夫々1個を用意しているが、複数個であればレジスタの組み合わせを複数にすることができる。
【0016】
≪第1の実施の形態≫
図3は、本発明の第1の実施の形態に係るアドレスデータ生成装置30の概略の構成を示すブロック図である。該アドレスデータ生成装置30は、Cレジスタ32の値からHレジスタ34の値を減算する第1の減算器40と、Cレジスタ32の値とIレジスタ36の値を加算する第2の加算器42と、Cレジスタ32の値からLレジスタ38の値を減算する第3の減算器44と、第1の減算器40のキャリー出力をセレクト信号として、第2の加算器42の出力値と第3の減算器44の出力値とのいずれかを選択する第1の2対1マルチプレクサ46とから構成される。
【0017】
第1の減算器40の演算においてキャリーが生じた場合には、
(Cレジスタの値)≧(Hレジスタの値)
が成立する。このとき第1の2対1マルチプレクサ46では、Cレジスタ32の値からLレジスタ38の値を減算した値、つまり第3の減算器44の出力値を選択するように、制御される。同演算において、キャリーがなかった場合は、
(Cレジスタの値)<(Hレジスタの値)
が成立する。このとき第1の2対1マルチプレクサ46では、Cレジスタ32の値にIレジスタ36の値を加算した値、つまり第2の加算器42の出力値を選択するように、制御される。
【0018】
≪第2の実施の形態≫
図4は、本発明の第2の実施の形態に係るアドレスデータ生成装置30’の概略の構成を示すブロック図である。該アドレスデータ生成装置30’は、Cレジスタ32の値に“1”を加算する第4の加算器48と、Iレジスタ36の値とHレジスタ34の値とを加算する第5の加算器50と、Hレジスタ34の値からLレジスタ38の値を減算する第6の減算器52と、第4の加算器48の出力値と第5の加算器50の出力値とを比較する第1のコンパレータ54と、第1のコンパレータ54からの比較結果信号をセレクト信号として、第4の加算器48の出力値と第6の減算器52の出力値とのいずれかを選択する第2の2対1マルチプレクサ56とから構成される。
【0019】
第1のコンパレータ54での比較結果信号は、第4の加算器48の出力値と第5の加算器50の出力値とが全ビットで全く同じ場合、つまり、
(Cレジスタの値+1)=(Hレジスタの値+Iレジスタの値)
が成り立つ場合、Hレジスタ34の値からLレジスタ38の値を減算した値、即ち第6の減算器52の出力値を選択し、第4の加算器48の出力値と第5の加算器50の出力値とが1ビットでも異なっている場合、つまり、
(Cレジスタの値+1)≠(Hレジスタの値+Iレジスタの値)
が成り立つ場合、Cレジスタ32の値に“1”加算した値、即ち第4の加算器48の出力値を選択するように、第2の2対1マルチプレクサ56を制御する。
【0020】
第4の加算器48においては、代わりに減算器を用いて、“1”を入力するのではなく“−1”を入力するようにしてもよい。
【0021】
≪第3の実施の形態≫
図5は、本発明の第3の実施の形態に係るアドレスデータ生成装置30”の概略の構成を示すブロック図である。該アドレスデータ生成装置30”は、
・“−1”とHレジスタ34の値とのいずれかを選択する第3の2対1マルチプレクサ58と、
・Cレジスタ32の値とHレジスタ34の値のいずれかを選択する第4の2対1マルチプレクサ60と、
・Cレジスタ32の値から第3の2対1マルチプレクサ58の出力値を減算する第7の減算器62と、
・Iレジスタ36の値と第4の2対1マルチプレクサ60の出力値とを加算する第8の加算器64と、
・第4の2対1マルチプレクサ60の出力値からLレジスタ38の値を減算する第9の減算器66と、
・第7の減算器62の出力値と第8の加算器64の出力値とを比較する第2のコンパレータ68と、
・第2のコンパレータ68の比較結果信号をセレクト信号1(S1)として、更に第7の減算器62のキャリーをセレクト信号2(S2)として、第7の減算器62、第8の加算器64、若しくは第9の減算器66の出力値のいずれかを選択する3対1マルチプレクサ70と
から構成される。
【0022】
図5において、セレクト信号(セレクト信号1、セレクト信号2)は、直接に3対1マルチプレクサ70に入力されるように図示しているが、実際にはアドレッシングの種類によって、どちらか一方を有効にするように制御される。例えば、アドレッシングが後で説明する「レジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング」(図6参照)である場合は、セレクト信号1のみを使用するように制御され、アドレッシングが後で説明する「レジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング」(図7参照)である場合は、セレクト信号2のみを使用するように制御される。
【0023】
更に、第3の2対1マルチプレクサ58、及び、第4の2対1マルチプレクサ60に対する選択信号も、上記のアドレッシングによって決定される。
【0024】
≪第4の実施の形態≫
以下、本発明の第4の実施形態に係るSIMD型マイクロプロセッサ2を説明する。該SIMD型マイクロプロセッサ2は、本発明に係るアドレッシングデータ生成装置30、30’、30”を内部に含み、利用する。
【0025】
図1のように、上記SIMD型マイクロプロセッサ2は、レジスタファイル8と演算アレイ10とから成るプロセッサエレメント6と呼ばれるブロックを複数持つ。各プロセッサエレメント6は、外部入出力を通してデータをレジスタファイル8に入力・出力する。外部入出力は、例えばデジタル複写機で言えば、スキャナ(CCD)からデータを読み取ったり、SIMD型マイクロプロセッサ2で変倍・フィルタなどの画像処理を施した結果のデータをプリンタなどに送ったりすることである。
【0026】
SIMD型マイクロプロセッサ2は、複数のプロセッサを保有するが、グローバルプロセッサ4と呼ばれるブロックを少なくとも一つ備える。グローバルプロセッサ4は、RAM(図示せず。)から読み取られたプログラムコードを処理し、グローバルプロセッサ4自身やプロセッサエレメント6に制御信号を送る。
【0027】
図2は、SIMD型マイクロプロセッサ2において、プロセッサエレメント6をより詳しく表記したもので、例えば、320個のプロセッサエレメント6と1個のグローバルプロセッサ4とから成る。この場合であれは、一度に(同時)処理できるデータ数は、最大320個となる。
【0028】
以降の説明のため、この一度に(同時)処理できる(320個の)データ数の単位を、“1SIMD”と称することにする。例えば、あるデジタル複写機などで1ラインのデータを読み出した場合そのデータ数が6400個あったような場合、このSIMD型マイクロプロセッサ2では320個のデータを一度に(同時)処理することが可能なため、6400個のデータであれば20SIMDの処理で1ラインのデータが処理可能となる。
【0029】
各々のプロセッサエレメント4には、1Kbytes(キロバイト)のメモリ(以下、PERAMと言う。)12と、メモリからデータを入出力しかつ外部入出力からデータの入出力を行うことのできるレジスタ(以下、Rレジスタと言う。)14とが、設置されている。ここでRレジスタ14は各PE6毎に、R0〜R31までの32本用意されている。
【0030】
なお、本発明とは関連がないが、7対1マルチプレクサ16により、各PE6は左右夫々3つ隣のPE6までの、Rレジスタ14のいずれかとデータを入出力でき、更にそのデータはPE6に含まれるALU18の片側の入力となり得る。
【0031】
その他図2には、Aレジスタ20、Fレジスタ22、Mレジスタ24、Tレジスタ26などが記されているが、いずれも本発明では利用しないため説明を省略する。
【0032】
図には記していないが、本実施の形態では、例えば、Cレジスタ32として16ビットのレジスタがC0〜C15までの16本、Lレジスタ38として16ビットのレジスタがL0〜L7の8本、Iレジスタ36として16ビットのレジスタがI0〜I3の4本、Hレジスタ34として16ビットのレジスタがH0〜H15までの16本、グローバルプロセッサ4内に用意されている。更に、本発明に係る第1の実施の形態、第2の実施の形態、若しくは第3の実施の形態であるアドレスデータ生成装置30、30’、30”も、グローバルプロセッサ4内に設置されている。これらのいずれのレジスタもメモリのサイズによって決定されるため、16ビットである必要はない。よってメモリのサイズが増えた場合には、レジスタのサイズが増やされてもよい。レジスタの本数も、上記のものに限定されない。
【0033】
本実施の形態に係るSIMD型マイクロプロセッサ2においては、上記のPERAM12にアクセスする命令(コマンド)として、例えば、次のような2つのものが想定される。
・「STR」命令:ソース・オペランド(のレジスタ)のデータを、デスティネーション・オペランドに指定するメモリアドレッシングにより決定される(メモリの)アドレスにストアする。
・「LDR」命令:ソース・オペランドに指定するメモリアドレッシングにより決定される(メモリの)アドレスに格納されているデータを、デスティネーション・オペランド(のレジスタ)にロードする。
【0034】
ここで上記のメモリアドレッシング(とその表記)として、次の2つ((1)、(2))が用意されている。
(1)「レジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング」;(表記)[C,I,L]
(2)「レジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング」;(表記)[C,I,L]+
【0035】
上記(1)、(2)の表記において、C、I、Lは夫々、Cレジスタ32、Iレジスタ36、Lレジスタ38である。上記の表記には、Hレジスタ34が無いが、Hレジスタ34はCレジスタ32と同じ番号のレジスタが選択されるようになっている。例えば、“C0”と表記した場合、自動的に“H0”が選択される。これは命令コード量の削減のためであるので、上記の表記に限定されるものではない。
【0036】
上記のSTR命令、LDR命令では、メモリアドレッシングのオペランド以外は、Rレジスタ14が対象として使用される。
【0037】
メモリアドレッシングの[C,I,L]は、第1の実施の形態(若しくは第3の実施の形態)に係るアドレスデータ生成装置30(、30”)を利用する。一方、[C,I,L]+は、第2の実施の形態(若しくは第3の実施の形態)に係るアドレスデータ生成装置30’(、30”)を利用する。
【0038】
まず、レジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング([C,I,L])を利用して連続してアドレッシングする方法の例を、図6のフローチャートにより示す。
【0039】
現在実行している命令にPERAM12へのレジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング([C,I,L])がある場合、Cレジスタ32の値をメモリのアドレスとして、命令を実行しメモリのリード(読出し)若しくはライト(書出し)を行う(図6:S02)。
【0040】
次に、Cレジスタ32の値とHレジスタ34の値とを比較して(図6:S04)、Cレジスタ32の値がHレジスタ34の値以上であれば(図6:S04でYESに分岐)、Cレジスタ32の値からLレジスタ34の値を減算してCレジスタ32に格納する(図6:S06)。Cレジスタ32の値がHレジスタ34の値未満であれば(図6:S04でNOに分岐)、Cレジスタ32の値にIレジスタ36の値を加算しCレジスタ32に格納する(図6:S08)。
【0041】
続く命令において、PERAM12へのこのメモリアドレッシング([C,I,L])がある場合、上記のS06又はS08にて更新されたCレジスタ32の値をPERAM12のメモリのアドレスとして、メモリのリード若しくはライトを行う(図6:S10)。
【0042】
即ち、同じレジスタの組み合わせを用いる限り、Cレジスタ32の値は、Hレジスタ34の値以上にならないとき、Iレジスタ36の値ずつ増えていくことになり、Hレジスタ34の値以上になったとき、そのときのCレジスタ32の値からLレジスタ38の値を減算した値がCレジスタ32の値となる。
【0043】
続いて、レジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング([C,I,L]+)を利用して連続してアドレッシングする方法の例を、図7のフローチャートにより示す。
【0044】
現在実行している命令にPERAM12へのレジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング([C,I,L]+)がある場合、Cレジスタ32の値をメモリのアドレスとして、命令を実行しメモリのリード(読出し)若しくはライト(書出し)を行う(図7:S22)。
【0045】
次に、Cレジスタ32の値に“1”を加算した値とHレジスタ34の値にIレジスタ36の値を加算した値とを比較して(図7:S24)、一致すれば(図7:S24でYESに分岐)、Hレジスタ34の値からLレジスタ38の値を減算してCレジスタ32に格納する(図7:S26)。一致しなければ(図7:S24でNOに分岐)、Cレジスタ32の値に“1”を加算しCレジスタ32に格納する(図7:S28)。
【0046】
続く命令において、PERAM12へのこのメモリアドレッシング([C,I,L]+)がある場合、上記のS26又はS28にて更新されたCレジスタ32の値をPERAM12のメモリのアドレスとして、メモリのリードもしくはライトを行う(図7:S30)。
【0047】
即ち、同じレジスタの組み合わせを用いる限り、Cレジスタ32の値は、(Hレジスタ34の値+Iレジスタ36の値)と一致しないとき、1ずつ増えていくことになり、(Hレジスタ34の値+Iレジスタ36の値)と一致したとき、そのときのCレジスタ32の値からLレジスタ38の値を減算した値がCレジスタ32の値となる。
【0048】
≪具体的な利用例について≫
上記の本発明に係るモジュロアドレッシングは、メモリ内のある矩形領域をアクセスするのに適合するアドレッシング方法である。前に説明したように該アドレッシングにおいては、メモリアドレッシングに係る命令を実行する前に、Cレジスタ32には矩形領域の先頭のアドレス、Hレジスタ34にはアクセスする矩形領域の最終アドレスに関連するアドレス、Iレジスタ36にはモジュロ値(矩形領域内で何アドレスおきにアクセスするかの設定値)、Lレジスタ38には矩形領域のデータ数に関連する値を、設定する必要がある。
【0049】
メモリの矩形領域に配列を割り当てた例を用いて、メモリアドレッシング及びアクセスの例示を、以下に述べる。
【0050】
図8及び図9には、8×5の配列領域にメモリを置き換えた図を示す。(X,Y)の2次元座標で配列が表わされる。“X”は図8及び図9の横方向、“Y”は縦方向に相当する。Xについては右方向が正方向であり、Yについては下方向が正方向である。配列の1要素はメモリの1つのアドレスに対応する。アドレスは、例えば、100h番地から順に右方向に1hインクリメントし、右端に達すれば、2段目の左端108hから順に同じようにインクリメントする。このとき配列は、(0,0)から順に右方向にX座標が“1”インクリメントし、右端(8,0)に達すれば2段目の左端に進んでX座標が“0”に戻りY座標が“1”インクリメントし、更に2段目の左端(0,1)から順に同じようにインクリメントする。8×5の配列で表されたメモリ空間であるため、最終アドレスは27h加算された値、即ち127hとなる。
【0051】
なお、本明細書において、例えば、“100h”における“h”は、16進表記であることを示す。
【0052】
この矩形領域をアクセスする順序の代表的なものとして、2つ挙げられる。1つ目は、図8の点線のように、先ずY方向に順にアクセスする、というものである。この場合、(0,0)−>(0,1)−>(0,2)−>(0,3)−>(0,4)−>(1,0)−>(1,1)−>・・・というように、Y方向の最大まで達すれば、X座標を1加算しY座標を0にして、次の列のアクセスを行う。メモリのアドレスでは、100h−>108h−>110h−>118h−>120h−>101h−>・・・となる。
【0053】
2つ目は、図9の点線のように、X方向に順にアクセスする、というものである。この場合、(0,0)−>(1,0)−>(2,0)−>(3,0)−>(4,0)−>(5,0)−>(6,0)−>(7,0)−>(0,1)−>・・・というように、X方向の最大まで達すれば、Y座標を1加算しX座標を0にして、次の行のアクセスを行う。メモリのアドレスでは、100h−>101h−>102h−>・・・とメモリのアドレスの増加方向通りとなる。
【0054】
ここで、当初にて一度だけ各レジスタを設定し、「レジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング」([C,I,L])を命令のオペランドに使用して、繰り返してアクセスに係る命令を実行すれば、図8に示されるメモリ空間の配列において点線で示す順に配列内の全データへのアクセスを為すことができる。本発明に係るレジスタ・インダイレクト・ウィズ・モディファイ・アドレッシングにおいては、1つのアクセス命令の実行後にCレジスタ32の値を変更し、その変更されたCレジスタ32の値を次のアクセス命令実行時に使用し、更に、2種類のアドレス計算と並行して別の加算器(減算器)でY方向の範囲越えのチェックを行い、2種類のアドレス計算の結果の選択をその別の加算器(減算器)の結果に委ねるからである。前に説明したように、このときには、第1の実施の形態(若しくは第3の実施の形態)に係るアドレスデータ生成装置30(、30”)を利用する。
【0055】
図8の場合、当初に各レジスタに設定される値を示すと、
・Cレジスタ32は配列領域の先頭アドレスで100h、
・Iレジスタ36はX方向の分割数で8h、
・Hレジスタ34は先頭列の最終行のアドレスで120h、
・Lレジスタ38は「X方向の分割数×(Y方向の分割数―1)―1」で「1fh(=8*(5−1)−1)」
となる。(0,0)〜(0,3)のアクセス時には、Cレジスタ32はIレジスタ36の値8hずつ増加していくが、(0,4)のアクセス時(直後)には、Cレジスタ32の値が120hとなる。この値は、Hレジスタ34の値以上であるため、Cレジスタ32の値120hからLレジスタ38の値1fhを減算した結果101hをCレジスタ32に格納することになる。従って、各レジスタ(C、I、H、L)について別途の値設定を行うことなく次の列のアクセスを行うことができる。
【0056】
ところで、Lレジスタ38の値を、「X方向の分割数×(Y方向の分割数―1)」とすれば、当初のCレジスタ32の値に戻すことができる。この場合に他の列をアクセスすることを考慮するならば、例えば、C0レジスタに最初の列の先頭アドレスを格納し、C1レジスタに2列目の先頭アドレスを格納する、というように、個別の具体的レジスタを特定の列に固定すれば、アクセス実行可能である。このとき、Hレジスタ34もCレジスタ32に合わせて設定する必要があるが、Iレジスタ36、Lレジスタ38は同じものを利用できる。最初の列と最後の列のみ処理したい場合などにも、これらの考え方は利用可能である。
【0057】
さらに、当初にて一度だけ各レジスタを設定し、「レジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング」([C,I,L]+)を命令のオペランドに使用して、繰り返してアクセスに係る命令を実行すれば、図9に示されるメモリ空間の配列において点線で示す順に配列内の全データへのアクセスを為すことができる。本発明に係るレジスタ・インダイレクト・ウィズ・インクリメント・アドレッシングにおいては、1つのアクセス命令の実行後にCレジスタ32の値を1インクリメントし、配列内の最後の(アドレスの)データをアクセスした後は、Cレジスタ32の値は配列の先頭のアドレスに戻るからである。前に説明したように、このときには、第2の実施の形態(若しくは第3の実施の形態)に係るアドレスデータ生成装置30’(、30”)を利用する。
【0058】
図9の場合、当初に各レジスタに設定される値を示すと、
・Cレジスタ32は配列領域の先頭アドレスで100h、
・Iレジスタ36はX方向の分割数で8h、
・Hレジスタ34は先頭列の最終行のアドレスで120h、
・Lレジスタ38は「X方向の分割数×(Y方向の分割数―1)」で「20h(=8*(5−1))」となる。(0,0)−>(1,0)−>・・・(7,0)−>(0,1)−>(1,1)−>・・・−>(7,4)とアクセスしていくわけであるが、最終の(7,4)までCレジスタ32の値を“1”ずつインクリメントしていく。そして、(Hレジスタの値“120h”)+(Iレジスタの値“8h”)と、(Cレジスタの値“127h”)+(1h)とが、一致したとき、つまり(7,4)の配列に相当するアドレスをアクセスしたときに、Cレジスタ32の値は、(Hレジスタの値“120h”)―(Lレジスタの値“20h”)=100hとなる。従って、もしアドレス“127h”以降のアドレス空間にも展開される配列領域もアクセスするのであれば、別のCレジスタ32を使用し、そのCレジスタ32に例えば128hを設定しておけばよい。
【0059】
なお、通常のラインバック処理の場合、以下のように2つのアドレッシングを組み合わせて使用することが多い。例えば、図10のような配列領域があった場合、次の順序でアクセスする。
【0060】
(0,0)−>(0,1)−>(0,2)−>(0,3)−>(0,4)までの参照(この場合メモリからのリードを行う)を[C,I,L]のアドレッシングで行う。Lレジスタ38の値が予め“20h”に設定されており、そのため(0,4)の次は(0,0)のアドレスがCレジスタ32に設定される。ところで、(0,0)のアドレスのデータは、ラインバッファとして最も古いラインのデータであり不要とされるべきデータであるため、(0,0)に最新のラインのデータが書き込まれる必要がある。そこで、[C,I,L]+のアドレッシングを採用し、メモリに最新ラインのデータを書き込まれると、次に、アクセスされるのは自ずと(1,0)となり(この場合メモリからのリードを行う)、それ以降また同じように[C,I,L]を使用する。このような命令を繰り返すことで、図10の矢印の順のラインバック処理が可能となる。
【0061】
【発明の効果】
以上の説明から明白なように、本発明を利用することで、以下のような効果を奏することが可能である。
【0062】
本発明に係る請求項1に記載のアドレッシング方法、又は請求項2若しくは請求項3に記載のアドレスデータ生成装置を利用することにより、レジスタを最初に設定するだけで、配列領域のデータアクセスを簡易に行うことができる。
【0063】
従来技術であれば、モジュロアドレッシングにおいては、アドレス計算を行い、更に終端であるかのチェックを行うため、アドレスが決定するまで時間を要する。本発明では、アドレス計算は前命令で完了していることと、演算器(加算器、減算器)を並行して配置しているため、レジスタからの出力は実質1段の演算器(加算器、減算器)を通過するのみであることとから、高速の処理が可能となっている。
【0064】
本発明に係る請求項4に記載のアドレスデータ生成装置は、請求項2に記載のアドレスデータ生成装置と、請求項3に記載のアドレスデータ生成装置とを、いずれも含む構成を備える。即ち、指定されるアドレッシングにより、2つのマルチプレクサを制御し、演算器(加算器、減算器)の入力を変え、3種類の出力を3対1のマルチプレクサで選択する。このことで、2つのアドレッシングを1つの回路で行っており、回路構成が少なくなっている。
【0065】
SIMD型マイクロプロセッサでのデータ処理では、配列形式の処理が多用される。SIMD型マイクロプロセッサはX方向(即ち、主走査方向)のデータを一度に入力するが、例えばX方向のみ平滑化処理をする場合には本発明を利用しなくとも問題は生じ難い。ここで、平滑化処理とは、ある画素データ(注目画素)を中心に、前後左右方向の画素データにマトリクス状の係数をかけあわせ、その和を注目画素データにすること、即ち、注目画素のデジタルデータを周辺のデータでぼかすことである。同様に、Y方向(即ち、副走査方向)に前後のデータを複数のレジスタに設定し演算する場合でも、レジスタの数さえ余っていれば、本発明を利用しなくとも問題は生じ難い。しかし、Y方向に相当多数の画素データが必要になる場合などは、レジスタの数が不足してしまうことは明白である。このとき、本発明、特に、請求項2に係るアドレスデータ生成装置を利用することにより、Y方向の相当多数の画素データをPERAMに格納しておき、多数のデータを処理することができる。
【0066】
請求項3に係るアドレスデータ生成装置を利用する場合にも、複数SIMD間の同一PEの位置にある画素データが、同一PEのPERAMに格納され得ることになるから、非常に広範囲のデータが同一PEにおける処理の対象となり得る。
【図面の簡単な説明】
【図1】 本発明の第4の実施の形態に係るSIMD型マイクロプロセッサの概略の構成を示すブロック図である。
【図2】 本発明の第4の実施の形態に係るSIMD型マイクロプロセッサのやや詳細な構成を示すブロック図である。
【図3】 本発明の第1の実施の形態に係るアドレスデータ生成装置の概略の構成を示すブロック図である。
【図4】 本発明の第2の実施の形態に係るアドレスデータ生成装置の概略の構成を示すブロック図である。
【図5】 本発明の第3の実施の形態に係るアドレスデータ生成装置の概略の構成を示すブロック図である。
【図6】 本発明に係るレジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング([C,I,L])を利用して連続してアドレッシングする方法の例を示すフローチャートである。
【図7】 本発明に係るレジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング([C,I,L]+)を利用して連続してアドレッシングする方法の例を示すフローチャートである。
【図8】 本発明に係るレジスタ・インダイレクト・ウィズ・モディファイ・アドレッシング([C,I,L])を利用するデータアクセスの例である。
【図9】 本発明に係るレジスタ・インダイレクト・ウィズ・インクリメント・アドレッシング([C,I,L]+)を利用するデータアクセスの例である。
【図10】 本発明に係る2つのアドレッシングを利用するラインバック処理を示す。
【符号の説明】
2・・・SIMD型マイクロプロセッサ、4・・・グローバルプロセッサ、6・・・プロセッサエレメント、12・・・PERAM、14・・・Rレジスタ、30、30’、30”・・・アドレスデータ生成装置、32・・・Cレジスタ、34・・・Hレジスタ、36・・・Iレジスタ、38・・・Lレジスタ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an arithmetic unit for performing modulo addressing of a memory at high speed.
[0002]
[Prior art]
In image processing such as digital copying machines and facsimile machines, high-speed data processing is required due to an increase in the number of pixels and diversification of image processing. DSP (Digital Signal Processor) and SIMD (Single Instruction-stream Multiple Data-stream) type processors are often used for image processing, etc., but all of them require a device to process a large amount of data at high speed. And
[0003]
For example, a SIMD processor is equipped with a plurality of blocks called processor elements (hereinafter referred to as PE) (see FIGS. 1 and 2) each having an arithmetic logic unit and a register file. A plurality of data are processed at the same time (simultaneously) by the plurality of PEs. In the PE, data is sequentially taken into the register file from the external port of the processor, processed in the PE, then written into the register file, and the data is output from the external port to the outside of the processor. When such processing is applied to, for example, a digital copying machine, data is acquired from the outside of the processor by a scanner (CCD), the data is processed in the processor, and the data is sent to a printer for printing.
[0004]
It is assumed that the SIMD processor needs to hold a plurality of data in the PE when processing the data. In such a case, if each PE is equipped with a memory that can temporarily store data, and a configuration is set so that the memory can be read / written from the register file, the data is efficiently processed. be able to. In this specification, such a memory is referred to as a “line buffer”.
[0005]
By the way, in a processor equipped with this line buffer, whether or not data input / output between the line buffer and the register file can be performed at a high speed greatly affects the data processing capability of the processor. In order to perform such data input / output at high speed, addressing to the line buffer must be performed efficiently. However, in order to efficiently perform addressing, a circuit for performing address calculation at high speed is usually required separately. Also, it is possible to envisage a method of performing complex addressing by combining registers. In any case, there are problems in cost and complexity of processing.
[0006]
As a measure other than the above, there is a method of preparing a plurality of registers, providing a plurality of adders, and performing modulo addressing such as adding a modulo value to the offset register. However, again, providing a plurality of adders affects high-speed processing.
[0007]
Here, even in a general processor, modulo addressing is important. In recent years, DSPs and RISC processors have been used to process large volumes of data such as image data and audio data. Many of these processors include modulo addressing.
[0008]
[Problems to be solved by the invention]
An object of the present invention is to perform modulo addressing at high speed in a processor.
[0009]
[Means for Solving the Problems]
The present invention has been made to achieve the above object. According to the first aspect of the present invention, there is provided a memory addressing method comprising:
Stores the address when accessing the memory in the current pointer register,
A memory addressing method using the current pointer register as an effective address as an address when an instruction is executed,
(1) If the value of the effective address is equal to or greater than the value of the separately installed high pointer register after execution of the instruction, the value calculated by subtracting the value of the separately installed length register from the effective address value is used as the current pointer. Stored in a register,
When the value of the effective address is less than the value of the high pointer register, adding the value of the index register separately provided to the value of the effective address and storing the value calculated in the current pointer register ;
(2) After execution of the instruction, if the value obtained by adding 1 to the effective address value matches the value obtained by adding the value of the separately installed high pointer register and the value of the separately installed index register, the high pointer Store the value calculated by subtracting the value of the separately installed length register from the register value in the current pointer register,
If the value obtained by adding 1 to the value of the effective address does not match the value obtained by adding the value of the separately installed high pointer register and the value of the separately installed index register, add 1 to the effective address. Storing the calculated value in the current pointer register; and
The memory addressing method performs any one of the above.
[0010]
The address data generation device according to
A first subtractor for subtracting the value of the high pointer register from the value of the current pointer register;
A second adder for adding the value of the current pointer register and the value of the index register;
A third subtracter for subtracting the length register value from the current pointer register value;
A first multiplexer that selects one of the output value of the second adder and the output value of the third subtractor using the carry output of the first subtractor as a select signal;
An address data generation apparatus for performing the memory addressing method according to
[0011]
The address data generation device according to
A fourth adder for adding 1 to the value of the current pointer register;
A fifth adder for adding the value of the index register and the value of the high pointer register;
A sixth subtractor for subtracting the length register value from the high pointer register value;
A first comparator for comparing the output value of the fourth adder with the output value of the fifth adder;
A comparison result signal from the first comparator is used as a select signal, and the second multiplexer for selecting either the output value of the fourth adder or the output value of the sixth subtractor is selected.
An address data generation apparatus for performing the memory addressing method according to
[0012]
The address data generation device according to
A third multiplexer for selecting one of the values of -1 and the high pointer register;
A fourth multiplexer for selecting either the value of the current pointer register or the value of the high pointer register;
A seventh subtracter for subtracting the output value of the third multiplexer from the value of the current pointer register;
An eighth adder for adding the value of the index register and the value of the fourth multiplexer;
A ninth subtractor for subtracting the value of the length register from the output value of the fourth multiplexer;
A second comparator for comparing the output value of the seventh subtractor with the output value of the eighth adder;
The carry value of the seventh subtracter and the comparison result signal from the second comparator are used as select signals, the output value of the seventh subtracter, the output value of the eighth adder, and the output of the ninth subtractor. And a fifth multiplexer that selects one of the values,
An address data generation apparatus for performing the memory addressing method according to
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the drawings.
[0015]
3 to 5, the address
(1) A current pointer register (hereinafter referred to as C register) 32 for storing the start address of the memory for accessing a specified area in the memory,
(2) a high pointer register (hereinafter referred to as H register) 34 for storing an address related to the end of the area;
(3) an index register (hereinafter referred to as I register) 36 for storing a modulo value; and
(4) A length register (hereinafter referred to as L register) 38 for storing a value related to the number of transfer data (area size) 38
It is. For convenience of explanation, each register is limited to 16 bits here, but may be increased or decreased depending on the memory size. Also, one register is prepared for each register, but a plurality of registers can be combined as long as there are a plurality of registers.
[0016]
<< First Embodiment >>
FIG. 3 is a block diagram showing a schematic configuration of the address
[0017]
If a carry occurs in the operation of the
(C register value) ≥ (H register value)
Is established. At this time, the first 2-to-1
(C register value) <(H register value)
Is established. At this time, the first 2-to-1
[0018]
<< Second Embodiment >>
FIG. 4 is a block diagram showing a schematic configuration of an address
[0019]
The comparison result signal in the
(C register value + 1) = (H register value + I register value)
Is satisfied, a value obtained by subtracting the value of the L register 38 from the value of the
(C register value + 1) ≠ (H register value + I register value)
Is satisfied, the second 2-to-1
[0020]
In the
[0021]
<< Third Embodiment >>
FIG. 5 is a block diagram showing a schematic configuration of an address
A third 2-to-1
A fourth 2-to-1 multiplexer 60 for selecting either the value of the
A
An eighth adder 64 that adds the value of the
A ninth subtractor 66 for subtracting the value of the L register 38 from the output value of the fourth 2-to-1 multiplexer 60;
A
The comparison result signal of the
[0022]
In FIG. 5, the select signals (
[0023]
Furthermore, selection signals for the third 2-to-1
[0024]
<< Fourth Embodiment >>
The
[0025]
As shown in FIG. 1, the
[0026]
The
[0027]
FIG. 2 shows the
[0028]
For the following explanation, the unit of the number of data (320) that can be processed at the same time (simultaneously) will be referred to as “1 SIMD”. For example, when one line of data is read by a digital copying machine or the like and the number of data is 6400, this
[0029]
Each
[0030]
Although not related to the present invention, the 7-to-1
[0031]
In addition, FIG. 2 shows the A register 20, the F register 22, the M register 24, the
[0032]
Although not shown in the figure, in the present embodiment, for example, 16 16-bit registers C0 to C15 as the
[0033]
In the
“STR” instruction: Stores the data of the source operand (in the register) at an address (in the memory) determined by the memory addressing specified in the destination operand.
“LDR” instruction: Loads data stored in an address determined by the memory addressing specified in the source operand into the destination operand.
[0034]
Here, the following two ((1) and (2)) are prepared as the memory addressing (and its notation).
(1) “Register indirect with modify addressing”; (notation) [C, I, L]
(2) “Register Indirect With Increment Addressing”; (Notation) [C, I, L] +
[0035]
In the notations (1) and (2) above, C, I, and L are a
[0036]
In the above STR instruction and LDR instruction, the
[0037]
[C, I, L] of the memory addressing uses the address data generation device 30 (, 30 ″) according to the first embodiment (or the third embodiment). L] + uses the address
[0038]
First, an example of a continuous addressing method using register indirect with modify addressing ([C, I, L]) is shown in the flowchart of FIG.
[0039]
If there is a register indirect with modify addressing ([C, I, L]) to the
[0040]
Next, the value of the
[0041]
In the subsequent instruction, when there is this memory addressing ([C, I, L]) to the
[0042]
That is, as long as the same register combination is used, when the value of the
[0043]
Next, an example of a method of consecutive addressing using register indirect with increment addressing ([C, I, L] +) is shown in the flowchart of FIG.
[0044]
If the currently executed instruction has register indirect with increment addressing ([C, I, L] +) to PERAM 12, the instruction is executed using the value of C register 32 as the memory address. Reading (reading) or writing (writing) is performed (FIG. 7: S22).
[0045]
Next, the value obtained by adding “1” to the value of the
[0046]
When there is this memory addressing ([C, I, L] +) to the
[0047]
That is, as long as the same combination of registers is used, when the value of the
[0048]
≪Specific usage examples≫
The modulo addressing according to the present invention is an addressing method suitable for accessing a certain rectangular area in the memory. As described above, in the addressing, before executing an instruction related to memory addressing, the
[0049]
An example of memory addressing and access will be described below using an example in which an array is assigned to a rectangular area of memory.
[0050]
8 and 9 are diagrams in which the memory is replaced with an 8 × 5 array region. An array is represented by two-dimensional coordinates (X, Y). “X” corresponds to the horizontal direction in FIGS. 8 and 9, and “Y” corresponds to the vertical direction. For X, the right direction is the positive direction, and for Y, the downward direction is the positive direction. One element of the array corresponds to one address in the memory. For example, the address is incremented by 1h in the right direction sequentially from the
[0051]
In this specification, for example, “h” in “100h” indicates hexadecimal notation.
[0052]
Two typical examples of the order of accessing this rectangular area are listed. First, as shown by the dotted line in FIG. In this case, (0,0)->(0,1)->(0,2)->(0,3)->(0,4)->(1,0)-> (1,1) If the maximum value in the Y direction is reached, the X coordinate is incremented by 1 to set the Y coordinate to 0, and the next column is accessed. In the memory address, 100h->108h->110h->118h->120h->101h->.
[0053]
The second is to access sequentially in the X direction as shown by the dotted line in FIG. In this case, (0,0)->(1,0)->(2,0)->(3,0)->(4,0)->(5,0)-> (6,0) -> (7, 0)-> (0, 1)->... When the maximum in the X direction is reached, the Y coordinate is incremented by 1 and the X coordinate is set to 0 to access the next line. Do. In the memory address, 100h->101h->102h->... Follows the increasing direction of the memory address.
[0054]
Here, each register is set only once at the beginning, and “Register Indirect With Modify Addressing” ([C, I, L]) is used as the operand of the instruction, and the instruction related to the access is repeated. Is executed, all data in the array can be accessed in the order indicated by the dotted lines in the array of the memory space shown in FIG. In the register indirect with modify addressing according to the present invention, the value of the
[0055]
In the case of FIG. 8, the values initially set in the registers are as follows:
The
-The I register 36 is 8h in the number of divisions in the X direction,
H register 34 is the address of the last row of the first column, 120h,
L register 38 is “number of divisions in X direction × (number of divisions in Y direction−1) −1” and “1fh (= 8 * (5-1) −1)”.
It becomes. At the time of accessing (0, 0) to (0, 3), the
[0056]
By the way, if the value of the
[0057]
In addition, each register is set only once at the beginning, and “Register Indirect With Increment Addressing” ([C, I, L] +) is used as the operand of the instruction, and the instruction related to the access is repeated. Is executed, all the data in the array can be accessed in the order indicated by the dotted lines in the array of the memory space shown in FIG. In the register indirect with increment addressing according to the present invention, after executing one access instruction, the value of the
[0058]
In the case of FIG. 9, when the values initially set in the respective registers are shown,
The
-The I register 36 is 8h in the number of divisions in the X direction,
H register 34 is the address of the last row of the first column, 120h,
The L register 38 becomes “20h (= 8 * (5-1))” by “the number of divisions in the X direction × (the number of divisions in the Y direction−1)”. (0,0)->(1,0)-> ... (7,0)->(0,1)->(1,1)->...-> (7,4) However, the value of the
[0059]
In the case of normal line back processing, two addressing methods are often used in combination as follows. For example, when there is an array area as shown in FIG. 10, access is made in the following order.
[0060]
Reference to (0,0)->(0,1)->(0,2)->(0,3)-> (0,4) (in this case, reading from the memory) is performed [C, I, L] addressing. The value of the
[0061]
【The invention's effect】
As is clear from the above description, the following effects can be obtained by using the present invention.
[0062]
Addressing method according to
[0063]
In the case of the prior art, in modulo addressing, it takes time to determine an address because it calculates an address and checks whether it is the end. In the present invention, since the address calculation is completed by the previous instruction and the arithmetic units (adder, subtractor) are arranged in parallel, the output from the register is substantially one stage arithmetic unit (adder). ), The high-speed processing is possible.
[0064]
According to a fourth aspect of the present invention, there is provided an address data generating device including the address data generating device according to the second aspect and the address data generating device according to the third aspect . That is, the two multiplexers are controlled by the designated addressing, the inputs of the arithmetic units (adder and subtractor) are changed, and three types of outputs are selected by the three-to-one multiplexer. As a result, two addressing operations are performed by one circuit, and the circuit configuration is reduced.
[0065]
In the data processing in the SIMD type microprocessor, processing in an array format is frequently used. The SIMD type microprocessor inputs data in the X direction (that is, the main scanning direction) at a time. However, for example, when smoothing processing is performed only in the X direction, a problem hardly occurs even if the present invention is not used. Here, the smoothing process is to multiply the pixel data in the front-rear and left-right directions around a certain pixel data (target pixel) by a matrix coefficient, and to obtain the sum as the target pixel data. To blur digital data with surrounding data. Similarly, even when the preceding and succeeding data are set in a plurality of registers in the Y direction (that is, the sub-scanning direction), the problem is unlikely to occur without using the present invention as long as the number of registers remains. However, it is obvious that the number of registers is insufficient when a considerable amount of pixel data is required in the Y direction. At this time, by using the present invention, in particular, the address data generating apparatus according to
[0066]
Even when the address data generation device according to
[Brief description of the drawings]
FIG. 1 is a block diagram showing a schematic configuration of a SIMD type microprocessor according to a fourth embodiment of the present invention;
FIG. 2 is a block diagram showing a slightly detailed configuration of a SIMD type microprocessor according to a fourth embodiment of the present invention.
FIG. 3 is a block diagram showing a schematic configuration of an address data generating apparatus according to the first embodiment of the present invention.
FIG. 4 is a block diagram showing a schematic configuration of an address data generating apparatus according to a second embodiment of the present invention.
FIG. 5 is a block diagram showing a schematic configuration of an address data generating apparatus according to a third embodiment of the present invention.
FIG. 6 is a flowchart showing an example of a method of consecutive addressing using register indirect with modify addressing ([C, I, L]) according to the present invention.
FIG. 7 is a flowchart illustrating an example of a method of consecutive addressing using register indirect with increment addressing ([C, I, L] +) according to the present invention.
FIG. 8 is an example of data access using register indirect with modify addressing ([C, I, L]) according to the present invention.
FIG. 9 is an example of data access using register indirect with increment addressing ([C, I, L] +) according to the present invention.
FIG. 10 shows a line-back process using two addressing according to the present invention.
[Explanation of symbols]
2 ... SIMD type microprocessor, 4 ... global processor, 6 ... processor element, 12 ... PERAM, 14 ... R register, 30, 30 ', 30 "... address
Claims (4)
命令が実行されるときのアドレスとして、上記カレントポインタレジスタを実効アドレスとするメモリアドレッシング方法であって、
(1)命令実行後に、実効アドレスの値が、別途設置されたハイポインタレジスタの値以上の場合、実効アドレスの値から別途設置されたレングスレジスタの値を減算して算出された値をカレントポインタレジスタに格納し、
実効アドレスの値が、ハイポインタレジスタの値未満の場合、実効アドレスの値に別途設けられたインデクスレジスタの値を加算して算出された値をカレントポインタレジスタに格納するステップと、
(2)命令実行後に、実効アドレスの値に1を加算した値が、別途設置されたハイポインタレジスタの値と別途設置されたインデクスレジスタの値とを加算した値に一致した場合は、ハイポインタレジスタの値から別途設置されたレングスレジスタの値を減算して算出された値をカレントポインタレジスタに格納し、
実効アドレスの値に1を加算した値が、別途設置されたハイポインタレジスタの値と別途設置されたインデクスレジスタの値とを加算した値に一致しなかった場合は、実効アドレスに1を加算して算出された値をカレントポインタレジスタに格納するステップと
のうち、いずれか一を行うメモリアドレッシング方法。Stores the address when accessing the memory in the current pointer register,
A memory addressing method using the current pointer register as an effective address as an address when an instruction is executed,
(1) If the value of the effective address is equal to or greater than the value of the separately installed high pointer register after execution of the instruction, the value calculated by subtracting the value of the separately installed length register from the effective address value is used as the current pointer. Stored in a register,
When the value of the effective address is less than the value of the high pointer register, adding the value of the index register separately provided to the value of the effective address and storing the value calculated in the current pointer register ;
(2) After execution of the instruction, if the value obtained by adding 1 to the effective address value matches the value obtained by adding the value of the separately installed high pointer register and the value of the separately installed index register, the high pointer Store the value calculated by subtracting the value of the separately installed length register from the register value in the current pointer register,
If the value obtained by adding 1 to the value of the effective address does not match the value obtained by adding the value of the separately installed high pointer register and the value of the separately installed index register, add 1 to the effective address. Storing the calculated value in the current pointer register; and
Memory addressing method for performing any one of them .
カレントポインタレジスタの値とインデクスレジスタの値とを加算する第2の加算器と、
カレントポインタレジスタの値からレングスレジスタの値を減算する第3の減算器と、
第1の減算器のキャリー出力をセレクト信号として、第2の加算器の出力値と第3の減算器の出力値との、いずれかを選択する第1のマルチプレクサと
から構成される、
請求項1に記載のメモリアドレッシング方法を行う、アドレスデータ生成装置。A first subtractor for subtracting the value of the high pointer register from the value of the current pointer register;
A second adder for adding the value of the current pointer register and the value of the index register;
A third subtracter for subtracting the length register value from the current pointer register value;
A first multiplexer that selects one of the output value of the second adder and the output value of the third subtractor using the carry output of the first subtractor as a select signal;
An address data generation apparatus for performing the memory addressing method according to claim 1.
インデクスレジスタの値とハイポインタレジスタの値とを加算する第5の加算器と、
ハイポインタレジスタの値からレングスレジスタの値を減算する第6の減算器と、
第4の加算器の出力値と第5の加算器の出力値とを比較する第1のコンパレータと、
第1のコンパレータからの比較結果信号をセレクト信号として、第4の加算器の出力値と第6の減算器の出力値との、いずれかを選択する第2のマルチプレクサと
から構成される、
請求項1に記載のメモリアドレッシング方法を行う、アドレスデータ生成装置。A fourth adder for adding 1 to the value of the current pointer register;
A fifth adder for adding the value of the index register and the value of the high pointer register;
A sixth subtractor for subtracting the length register value from the high pointer register value;
A first comparator for comparing the output value of the fourth adder with the output value of the fifth adder;
A comparison result signal from the first comparator is used as a select signal, and the second multiplexer for selecting either the output value of the fourth adder or the output value of the sixth subtractor is selected.
An address data generation apparatus for performing the memory addressing method according to claim 1 .
カレントポインタレジスタの値とハイポインタレジスタの値とのいずれかを選択する第4のマルチプレクサと、
カレントポインタレジスタの値から上記第3のマルチプレクサの出力値を減算する第7の減算器と、
インデクスレジスタの値と上記第4のマルチプレクサの値とを加算する第8の加算器と、
上記第4のマルチプレクサの出力値からレングスレジスタの値を減算する第9の減算器と、
第7の減算器の出力値と第8の加算器の出力値とを比較する第2のコンパレータと、
第7の減算器のキャリーと、第2のコンパレータからの比較結果信号とを、セレクト信号として、第7の減算器の出力値と第8の加算器の出力値と第9の減算器の出力値との、いずれかを選択する第5のマルチプレクサと
から構成される、
請求項1に記載のメモリアドレッシング方法を行う、アドレスデータ生成装置。A third multiplexer for selecting one of the values of -1 and the high pointer register;
A fourth multiplexer for selecting either the value of the current pointer register or the value of the high pointer register;
A seventh subtracter for subtracting the output value of the third multiplexer from the value of the current pointer register;
An eighth adder for adding the value of the index register and the value of the fourth multiplexer;
A ninth subtractor for subtracting the value of the length register from the output value of the fourth multiplexer;
A second comparator for comparing the output value of the seventh subtractor with the output value of the eighth adder;
The carry value of the seventh subtracter and the comparison result signal from the second comparator are used as select signals, the output value of the seventh subtracter, the output value of the eighth adder, and the output of the ninth subtractor. And a fifth multiplexer that selects one of the values,
An address data generation apparatus for performing the memory addressing method according to claim 1 .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002049269A JP3970049B2 (en) | 2002-02-26 | 2002-02-26 | Address data generation apparatus and memory addressing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002049269A JP3970049B2 (en) | 2002-02-26 | 2002-02-26 | Address data generation apparatus and memory addressing method |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007122356A Division JP4708387B2 (en) | 2007-05-07 | 2007-05-07 | Address data generation apparatus and memory addressing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003248621A JP2003248621A (en) | 2003-09-05 |
| JP3970049B2 true JP3970049B2 (en) | 2007-09-05 |
Family
ID=28661823
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002049269A Expired - Fee Related JP3970049B2 (en) | 2002-02-26 | 2002-02-26 | Address data generation apparatus and memory addressing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3970049B2 (en) |
-
2002
- 2002-02-26 JP JP2002049269A patent/JP3970049B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003248621A (en) | 2003-09-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10334194B2 (en) | Block operations for an image processor having a two-dimensional execution lane array and a two-dimensional shift register | |
| US5657403A (en) | Vision coprocessing | |
| US9978116B2 (en) | Core processes for block operations on an image processor having a two-dimensional execution lane array and a two-dimensional shift register | |
| US10719295B2 (en) | Circuit to perform dual input value absolute value and sum operation | |
| EP0518462B1 (en) | Filtering system and operation method for very high-speed image processing | |
| KR20010031192A (en) | Data processing system for logically adjacent data samples such as image data in a machine vision system | |
| JP2009223758A (en) | Image processing apparatus | |
| JP5633122B2 (en) | Processor and information processing system | |
| JP4708387B2 (en) | Address data generation apparatus and memory addressing method | |
| JP3970049B2 (en) | Address data generation apparatus and memory addressing method | |
| JP4101253B2 (en) | Compression device and method | |
| JP3413344B2 (en) | Image processing apparatus and operation method thereof | |
| US6940619B1 (en) | Polynomial based multi-level screening | |
| US6781717B1 (en) | Threshold screening using range reduction | |
| JP2008072585A (en) | Method of supplying data for arithmetic processing and image processing apparatus | |
| JP4516495B2 (en) | Data processing method in SIMD type microprocessor | |
| JP3969580B2 (en) | Data processing apparatus, image processing apparatus, image forming apparatus, program, and storage medium | |
| JP2007073010A (en) | SIMD processor, image processing method using the SIMD processor, and image processing apparatus | |
| JP2011134085A (en) | Image processor | |
| GB2213620A (en) | Data processing systems | |
| JP4933462B2 (en) | Image processing method | |
| JP4451433B2 (en) | Parallel processor | |
| JP2010033426A (en) | Simd type microprocessor and operation method | |
| JP4294190B2 (en) | Parallel processor and image processing apparatus using the same | |
| EP1120958A2 (en) | Polynomial based multi-level screening |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050223 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20070227 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20070306 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20070507 |
|
| 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: 20070529 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20070605 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110615 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110615 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120615 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130615 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |