JP4372371B2 - Thinning device and enlargement device in SIMD type microprocessor - Google Patents

Thinning device and enlargement device in SIMD type microprocessor Download PDF

Info

Publication number
JP4372371B2
JP4372371B2 JP2001103319A JP2001103319A JP4372371B2 JP 4372371 B2 JP4372371 B2 JP 4372371B2 JP 2001103319 A JP2001103319 A JP 2001103319A JP 2001103319 A JP2001103319 A JP 2001103319A JP 4372371 B2 JP4372371 B2 JP 4372371B2
Authority
JP
Japan
Prior art keywords
data
register
stored
general
processor element
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2001103319A
Other languages
Japanese (ja)
Other versions
JP2002298135A (en
Inventor
慎一 山浦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001103319A priority Critical patent/JP4372371B2/en
Publication of JP2002298135A publication Critical patent/JP2002298135A/en
Application granted granted Critical
Publication of JP4372371B2 publication Critical patent/JP4372371B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、SIMD(Single Instruction−streamMultiple Data−stream;単一命令多データ処理)型マイクロプロセッサに関する。
【0002】
【従来の技術】
SIMD型マイクロプロセッサでは、複数のデータに対して1つの命令で同時に同一の演算処理が実行可能である。この構造により、演算は同一であるがデータ量が非常に多い処理(例えば、画像処理)に係る用途において、頻用される。
【0003】
SIMD型マイクロプロセッサにおける通常の演算処理では、複数の演算ユニット(Processor Element〔PE〕;プロセッサエレメント)を並べ同一の演算を同時に複数のデータに対して実行する。
【0004】
SIMD型マイクロプロセッサは、全てのPEが同時に動作する処理においてはその性能を十分に発揮できる。
【0005】
ところで、画像データの(演算)処理においては、処理対象の画像データの領域が、例えば、「文字領域」であるのか又は「写真領域」であるのか、を検出し、その検出結果を利用して領域別に処理内容を変更することがある。このような検出の場合、判定対象データとして相当に広い領域範囲の画素データの処理が必要とされる。ところが、SIMD型マイクロプロセッサにおいては、画素データを直接操作しようとすると、一度に処理できるのは精々「8×8」画素程度の範囲のデータに過ぎない。そこで、より広い範囲の画素データを処理するために、例えば「4×4」画素データを1つのデータ(ブロック)に変換し(ブロック化と言う。)、このブロックに対して領域判定処理を行なうことがある。「4×4」画素を1ブロックとしそのブロックを「8×8」個集めてその範囲で処理を行うと、結局「32×32」画素の範囲のデータが処理対象となる。図22にその様子を示す。従って、相当に広い範囲の画素データが一度に扱えることになる。
【0006】
上記のブロック化処理では、縮小処理が必須となる。
【0007】
しかし、SIMD型マイクロプロセッサでは通常この縮小処理を実施することは困難である。従来のSIMD型マイクロプロセッサにおいては、そのため種々の工夫がなされている。
【0008】
例えば、従来技術においては、PEに内蔵された出力レジスタに対しデータを出力するかどうかの指示を与えることにより外部に出力するデータの選択を行い、よって縮小を実現しているものがある。
【0009】
特開平8−123683号では、プロセッサから外部へ出力する出力シフトレジスタのシフト動作を制御して飛び飛びの画素データを出力することで、縮小処理を実現している。
【0010】
けれども、上記技術の場合には、出力データを縮小することにのみ限定され、演算の途中のデータを縮小することはできない。然も、各PEにて、データを出力するか否かを制御する回路を付加することが必要である(コスト高の問題を生じる)。さらに、縮小したデータを拡大しようとしても、上記の技術では全く対応できない。
【0011】
また、例えば、別の従来技術においては、PEに内蔵されたレジスタのデータを外部に出力し外部のFIFO(First In First Out)メモリにデータを保存する際に、任意のデータを間引いて該FIFOメモリに格納し、その後FIFOメモリから各PEのレジスタにデータを転送して、縮小を実現している。この場合にも、1ライン分のFIFOメモリが付加的に必要となる(コスト高の問題がある)。
【0012】
類似の従来技術が、特開平9−212637号で開示されている。そこでは、パラレル/シリアル変換器とシリアル/パラレル変換器をプロセッサエレメントに持たせ、よって縮小・拡大処理を実現している。この従来技術においても、上記のハードウエアを搭載することが必要であるため、縮小動作が不要な場合に不要なコストが発生する問題がある。
【0013】
【発明が解決しようとする課題】
本発明は、SIMD型マイクロプロセッサにおいて、簡易な構成及び低コストにより、間引き処理、即ち縮小処理、及び拡大処理を行なうことを目的とする。
【0014】
【課題を解決するための手段】
本発明は、上記の目的を達成するためになされたものである。本発明に係る請求項1に記載のデータ間引き装置は、
複数のプロセッサエレメントを含むSIMD型マイクロプロセッサが有する
プロセッサエレメントが内蔵している汎用レジスタに上記マイクロプロセッサ外部からアクセスするための、データ転送用ポートに接続されているデータ間引き装置であり、
内部に含まれるシーケンサにより制御され、
上記SIMD型マイクロプロセッサに含まれるグローバルプロセッサより行われる動作開始の指示設定に応じて自動的に動作することで上記SIMD型マイクロプロセッサのSIMD演算処理と並列して処理を実施し、
前記プロセッサエレメントが内蔵している汎用レジスタに格納されるデータの中から任意のデータを複数選択して読み出し、その後それら複数のデータを汎用レジスタに書き戻し、
書き戻しによりそれら複数のデータが格納されるプロセッサエレメントの間隔が、読み出し時にそれら複数のデータが格納されていたプロセッサエレメントの間隔よりも、小さいことを特徴とする。
【0015】
本発明に係る請求項2に記載のデータ拡大装置は、
複数のプロセッサエレメントを含むSIMD型マイクロプロセッサが有する
プロセッサエレメントが内蔵している汎用レジスタに上記マイクロプロセッサ外部からアクセスするための、データ転送用ポートに接続されているデータ拡大装置であり、
内部に含まれるシーケンサにより制御され、
上記SIMD型マイクロプロセッサに含まれるグローバルプロセッサより行われる動作開始の指示設定に応じて自動的に動作することで上記SIMD型マイクロプロセッサのSIMD演算処理と並列して処理を実施し、
前記プロセッサエレメントが内蔵している汎用レジスタに格納されるデータの中から任意のデータを複数選択して読み出し、その後それら複数のデータを汎用レジスタに書き戻し、
書き戻しによりそれら複数のデータが格納されるプロセッサエレメントの間隔が、読み出し時にそれら複数のデータが格納されていたプロセッサエレメントの間隔よりも、大きいことを特徴とする。
【0016】
本発明に係る請求項3に記載のデータ間引き装置は、
読み出されたデータにおいて、所定の位置の1ビットに格納されるデータ、若しくは所定の位置の複数ビットに格納されるデータを、選択し、
汎用レジスタに書き戻す際には、1つの汎用レジスタ上に、複数組の、上記データを格納させる、
請求項1に記載の、データ間引き装置である。
【0017】
本発明に係る請求項4に記載のデータ間引き装置は、
選択される任意のデータ以外のデータであって、プロセッサエレメント全体により構成される列の第1の端部近傍に位置するプロセッサエレメントが内蔵する汎用レジスタに格納される所定のデータを、読み出し、
それらデータを、プロセッサエレメント全体により構成される列の第2の端部近傍に位置するプロセッサエレメントが内蔵している汎用レジスタに、書き戻し、
同時に、
選択される任意のデータ以外のデータであって、プロセッサエレメント全体により構成される列の、第2の端部近傍に位置するプロセッサエレメントが内蔵する汎用レジスタに格納される所定のデータを、読み出し、
それらデータを、プロセッサエレメント全体により構成される列の第1の端部近傍に位置するプロセッサエレメントが内蔵している汎用レジスタに、書き戻す、
請求項1に記載の、データ間引き装置である。
【0018】
本発明に係る請求項5に記載のデータ拡大装置は、
読み出されたデータを、1ビットのデータ若しくは複数ビットのデータに、分割し、
上記分割により形成される複数組の上記データを、別のプロセッサエレメントに内蔵される汎用レジスタに書き戻す、
請求項2に記載の、データ拡大装置である。
【0019】
本発明に係る請求項6に記載のデータ拡大装置は、
書き戻しによりデータが格納される第1のプロセッサエレメントと、書き戻しによりデータが格納される第2のプロセッサエレメントとにおいて、
上記第1のプロセッサエレメントと上記第2のプロセッサエレメントとの間に、1つの又は複数の連続する第3のプロセッサエレメントが存在し、それら第3のプロセッサエレメントには、データ書き戻しは行なわれないとき、
第1のプロセッサエレメントに書き戻されるデータ、又は第2のプロセッサエレメントに書き戻されるデータが、
第3のプロセッサエレメントに内蔵される汎用レジスタに、複写して書かれる、
請求項2に記載の、データ拡大装置である。
【0020】
本発明に係る請求項7に記載のデータ間引き装置は、
縮小対象のデータを構成する最小構成単位が縮小対象のデータにいくつ含まれるかを示す個数分と等しい、ビット数までを、少なくともビット容量として備えるメモリ部を含み、
縮小対象のデータを構成する個々の最小構成単位にて間引き対象であるものと、上記メモリ部のビット位置とを対応させ、対応するビット位置に所定のデータを格納し、
その格納された所定のデータに基づいて、
プロセッサエレメントが内蔵している汎用レジスタに格納されるデータからの上記読み出し処理と、その後の汎用レジスタへの上記書き戻し処理とを行う
請求項1に記載の、データ間引き装置である。
【0021】
本発明に係る請求項8に記載のデータ拡大装置は、
拡大処理後のデータを構成する最小構成単位が拡大処理後のデータにいくつ含まれるかを示す個数分と等しい、ビット数までを、少なくともビット容量として備えるメモリ部を含み、
拡大処理後のデータを構成する個々の最小構成単位にて拡大制御対象であるものと、上記メモリ部のビット位置とを対応させ、対応するビット位置に所定のデータを格納し、
その格納された所定のデータ基づいて、
プロセッサエレメントが内蔵している汎用レジスタに格納されるデータからの上記読み出し処理と、その後の汎用レジスタへの上記書き戻し処理とを行う
請求項2に記載の、データ拡大装置である。
【0022】
【発明の実施の形態】
以下、添付の図面を参照しつつ、本発明に係る好適な実施の形態を説明する。
【0023】
図1及び図21は、本発明に係るSIMD型マイクロプロセッサ2の概略の構成を示すブロック図である。図1及び図21の構成は、後で説明する第1の実施の形態乃至第8の実施の形態のSIMD型マイクロプロセッサ2の、基礎となる構成である。
【0024】
図1のSIMD型マイクロプロセッサ2は、概略、グローバルプロセッサ4、レジスタファイル6、演算アレイ8、及び間引き器10若しくは拡大器12から構成される。
【0025】
(1)グローバルプロセッサ4
このグローバルプロセッサ4そのものは、いわゆるSISD(Single Instruction Stream,Single Data Stream)型のプロセッサであり、プログラムRAMとデータRAMを内蔵し、プログラムを解読し各種制御信号を生成する。この制御信号は内蔵する各種ブロックの以外に、レジスタファイル6、演算アレイ8に供給される。また、GP(グローバルプロセッサ)命令実行時は内蔵する汎用レジスタ、ALU(算術論理演算器)等を使用して各種演算処理、プログラム制御処理を行う。
【0026】
(2)レジスタファイル6
PE(プロセッサエレメント)命令で処理されるデータを保持している。PE(プロセッサエレメント)3は、公知のように、SIMD(Single Instruction−Stream,Multiple Data−Stream)型プロセッサにおいて個別の演算を実行する構成単位である。図21のレジスタファイル6及び演算アレイ8が示すように、図21のSIMD型マイクロプロセッサ2では256個のPE3を含んでいる。上記のPE命令はSIMD型の命令であり、レジスタファイル6に保持されている複数のデータに対し、同時に同じ処理を行なう。このレジスタファイル6からのデータの読み出し/書き込みの制御はグローバルプロセッサ4からの制御信号によって行なわれる。読み出されたデータは演算アレイ8(演算部)に送られ、演算アレイ8(演算部)での演算処理後にレジスタファイルに書き込まれる。
【0027】
図21のレジスタファイル6においては、1つのPE単位に8ビットのレジスタ34が32本内蔵されており、256個のPE分の(32本の)組がアレイ構成になっている。レジスタ34はPE毎に、R0、R1、R2、・・・R31と呼ばれる。
【0028】
また、レジスタファイル6はプロセッサ2外部からのアクセスが可能であり、グローバルプロセッサ4の制御とは別に、外部から特定のレジスタに対し読み出し/書き込みが行なわれる。
【0029】
(3)演算アレイ
PE命令の演算処理が行なわれる。処理の制御はすべてグローバルプロセッサ4から行なわれる。
【0030】
レジスタファイル6と演算アレイ8との接続部位に、7to1(7対1)のマルチプレクサ42が置かれている。図21及び図4に示すように、あるマルチプレクサ42から見て、左方向の3つのPE3に含まれるR0〜R31レジスタ34のデータと、右方向の3つのPE3に含まれるR0〜R31レジスタ34のデータと、自らが属するPE3に含まれるR0〜R31レジスタ34のデータを、演算対象として選択し得るように設定されている。
【0031】
各PE3には、PE番号と呼ばれる通し番号が付されている。図21のSIMD型マイクロプロセッサ2では、PEの個数が256個であるので、8ビットのビット列(即ち、00000000b〜11111111bの256通り。ここで、上記のような末尾の“b”は2進法表記であることを表す。)が、各PE3にPE番号データとして与えられる。PE番号は、各PE3に対し、PEの位置とは無関係に与えられても構わないが、本明細書においては、(右)端から順に付されているものとする。また、PE番号が「n」であるPEを、
・PE[n]
と表すことにする。従って、図21のSIMD型マイクロプロセッサ2は、右方から、PE[0]、PE[2]、PE[3]、・・・PE[254]、PE[255]により、構成される。
【0032】
(4)間引き器10、又は拡大器12
レジスタファイル6から読み出されたデータから、任意のデータを選択してレジスタファイル6に書き込む。書き込む場合には、通常、下位番号のPE3から詰めて書き込まれる。例えば、256個のPE3において、1/4の間引きの処理が行なわれる場合、PE[0]、PE[4]、PE[8]、PE[12]、PE[16]・・・における特定のレジスタ34のデータが読み出され、それらデータは、PE[0]、PE[1]、PE[2]、PE[3]、PE[4]・・に書き込まれる。「間引きの処理」については、後で詳しく説明する。
【0033】
≪第1の実施の形態≫
図2は、本発明の第1の実施の形態に係るSIMD型マイクロプロセッサ2のブロック図である。
【0034】
図2において、間引き器10は、プロセッサ2のレジスタファイル6の外部インタフェース14に接続される。このレジスタファイル6の外部インタフェース14では、アドレス、CLK、R/Wの信号がプロセッサ2外部より与えられると、アドレスで示されたPE3のレジスタ34にアクセスでき、ReadDataバス16によりレジスタ34の内容が読み出され、WriteDataバス18によりレジスタ34にデータが書き込まれる。
【0035】
間引き器10は、アクセス対象のPEのアドレスを生成するアドレス生成回路20、読み出されたデータを書き込みまでの期間保持するデータバッファ22、それらを制御するシーケンサ24により構成され、プロセッサ2のグローバルプロセッサ(GP)4より動作の設定が行なわれる。
【0036】
上記の構成において、256個のプロセッサエレメント3を有するSIMD型マイクロプロセッサ2での、1/4の間引き動作は以下のようになる。
【0037】
(1)PE[0](アドレス0)のレジスタのデータを読み出し、データバッファ22に格納する。
(2)PE[0](アドレス0)のレジスタへ、データバッファ22のデータを書き込む。
(3)PE[4](アドレス4)のレジスタのデータを読み出し、データバッファ22に格納する。
(4)PE[1](アドレス1)のレジスタへ、データバッファ22のデータを書き込む。
(5)PE[8](アドレス8)のレジスタのデータを読み出し、データバッファ22に格納する。
(6)PE[2](アドレス2)のレジスタへ、データバッファ22のデータを書き込む。
(7)PE[12](アドレス12)のレジスタのデータを読み出し、データバッファ22に格納する。
(8)PE[3](アドレス3)のレジスタへ、データバッファ22のデータを書き込む。
・・・・(同様の動作が繰り返されるため、途中略する。)
(123)PE[244](アドレス244)のレジスタのデータを読み出し、データバッファ22に格納する。
(124)PE[61](アドレス61)のレジスタへ、データバッファ22のデータを書き込む。
(125)PE[248](アドレス248)のレジスタのデータを読み出し、データバッファ22に格納する。
(126)PE[62](アドレス62)のレジスタへ、データバッファ22のデータを書き込む。
(127)PE[252](アドレス252)のレジスタのデータを読み出し、データバッファ22に格納する。
(128)PE[63](アドレス63)のレジスタへ、データバッファ22のデータを書き込む。
【0038】
なお、最初{上記(1)及び(2)}のPE[0]からの読み出し・書き込み動作は、データに変換が無いため省略可能である。
【0039】
上記の間引きの動作により、4個のPEおきのレジスタのデータが、PE[0]方向に詰めて配置されることになり、結果としてPE[0]〜PE[63]のレジスタに1/4に間引きされたデータが得られることになる。また、この処理は128ステップが必要であるが、間引き器10はGP4より開始の指示後は自動的に動作するため、プロセッサ2の命令によるSIMD演算処理は並列に実行され得る。
【0040】
≪第2の実施の形態≫
図3は、本発明の第2の実施の形態に係るSIMD型マイクロプロセッサ2のブロック図である。
【0041】
図3において、拡大器12は、プロセッサ2のレジスタファイル6の外部インタフェース14に接続される。拡大器12は、アクセス対象のPE3のアドレスを生成するアドレス生成回路20、読み出されたデータを書き込みまでの期間保持するデータバッファ22、それらを制御するシーケンサ24により構成され、プロセッサ2のグローバルプロセッサ(GP)4より動作の設定が行なわれる。
【0042】
上記の構成において、256個のプロセッサエレメント3を有するSIMD型マイクロプロセッサ2での、4倍の拡大動作は以下のようになる。
【0043】
(1)PE[63](アドレス63)のレジスタのデータを読み出し、データバッファ22に格納する。
(2)PE[252](アドレス252)のレジスタへ、データバッファ22のデータを書き込む。
(3)PE[62](アドレス62)のレジスタのデータを読み出し、データバッファ22に格納する。
(4)PE[248](アドレス248)のレジスタへ、データバッファ22のデータを書き込む。
(5)PE[61](アドレス61)のレジスタのデータを読み出し、データバッファ22に格納する。
(6)PE[244](アドレス244)のレジスタへ、データバッファ22のデータを書き込む。
(7)PE[60](アドレス60)のレジスタのデータを読み出し、データバッファ22に格納する。
(8)PE[240](アドレス240)のレジスタへ、データバッファ22のデータを書き込む。
・・・・(同様の動作が繰り返されるため、途中略する。)
(123)PE[2](アドレス2)のレジスタのデータを読み出し、データバッファ22に格納する。
(124)PE[8](アドレス8)のレジスタへ、データバッファ22のデータを書き込む。
(125)PE[1](アドレス1)のレジスタのデータを読み出し、データバッファ22に格納する。
(126)PE[4](アドレス4)のレジスタへ、データバッファ22のデータを書き込む。
(127)PE[0](アドレス0)のレジスタのデータを読み出し、データバッファ22に格納する。
(128)PE[0](アドレス0)のレジスタへ、データバッファ22のデータを書き込む。
【0044】
なお、最後{上記(127)及び(128)}のPE[0]からの読み出し・書き込み動作は、データに変換が無いため省略可能である。
【0045】
上記の拡大の動作により、PE[0]〜PE[63]のレジスタのデータが、4個のPEおきにPE[0]から間隔を取ってレジスタに配置されることになり、結果として4倍に拡大されたデータが得られることになる。また、この処理は128ステップが必要であるが、拡大器12はGP4より開始の指示後は自動的に動作するため、プロセッサ2の命令によるSIMD演算処理は並列に実行され得る。
【0046】
≪第3の実施の形態≫
従来技術で説明した領域判定処理のブロック化処理において、ブロック単位に保持するデータは、各ブロックに対する所定の判定の結果を示すデータであることが多い。しかも通常は、所定の判定に関して「一致/不一致」のみを示すデータである。このようなデータは1ビットのデータとして表現でき、よってブロック単位に保持するデータは、1ビットだけであることが多い。
【0047】
図4(及び図21)のブロック図にて示すように、本発明に係るSIMD型マイクロプロセッサ2では、あるPE3からみると、自らが属するPE3に含まれるR0〜R31レジスタ34のデータと、左右夫々の方向の3つのPE3に含まれるR0〜R31レジスタ34のデータとを、演算対象として選択し得るように設定されている。そのため、本発明に係るSIMD型マイクロプロセッサ2では、ある画素を中心にして(それ自身を含めて)左右7画素のデータを1回のアクセスにより処理することが可能であるが、その範囲を越えてデータアクセスしようとすると、ライン(主走査)方向でのシフト操作等が必要となってしまう。
【0048】
ところで、上記の領域判定処理では、広い範囲のデータが必要とされることがあり、例えば、ブロックデータで32ブロック程度のデータが必要とされる場合がある。仮に32ブロックまでを1回の操作でアクセス可能となる設定を構成しようとすると、32の対象から1つを選択させるようなマルチプレクサが必要となる。そうするとハードウエアに係るコストが上昇する。一方で、ライン方向にシフト操作を繰り返す構成を形成する場合、相当に多くのステップ数が必要になり性能を低下させてしまうことになり得る。そこで、上記ブロックデータのように1ビットのみで構成されているデータの場合は、1つのPE3のレジスタに、複数のPE3分のブロックデータを格納することにより、上記問題点を解決することが想定され得る。
【0049】
本発明に係るSIMD型マイクロプロセッサ2では、1つのレジスタ(例えば、R0)には8ビットのデータを格納可能である。よって、図5のようにデータを格納すれば、左右35ブロックまで1回のアクセスで扱えるようになる。なお、図5では、bit5、bit6及びbit7は、無効データとして扱う(5×1ビット・パック処理)。
【0050】
仮に、ブロックデータが2ビット必要な場合には、1つのレジスタを2ビットで分割して、複数のPE分のデータを格納することも可能である。本発明に係るSIMD型マイクロプロセッサ2では、レジスタは8ビットであるため、1つのPE3(のレジスタ)に2ビットのブロック後データが4個まで格納可能である。その場合は、左右28ブロックまで1回のアクセスで扱えるようになる(4×2ビット・パック処理)。
【0051】
図6は、本発明の第3の実施の形態に係るSIMD型マイクロプロセッサ2のブロック図である。
【0052】
図2に示される第1の実施の形態のSIMD型マイクロプロセッサ2に対して、データバッファ22への書き込みにバレルシフタ26が追加されており、レジスタ34の任意のビット位置のデータを、データバッファ22の任意のビットに書き込むことが可能な構成となっている。
【0053】
上記の構成において、256個のプロセッサエレメント3を有するSIMD型マイクロプロセッサ2での、「1/4の間引き」且つ「5×1ビット・パック」の動作は以下のようになる。ここで、PEの「レジスタのbit0」とは、所定のレジスタの最下位ビットを示す。同様に、「bit1」、「bit2」、「bit3」、「bit4」は、bit0からみて順に1つずつ上位のビットを示す。
【0054】
(1)PE[0]のレジスタのbit0を読み出し、データバッファ22のbit0に格納する。
(2)PE[4]のレジスタのbit0を読み出し、データバッファ22のbit1に格納する。
(3)PE[8]のレジスタのbit0を読み出し、データバッファ22のbit2に格納する。
(4)PE[12]のレジスタのbit0を読み出し、データバッファ22のbit3に格納する。
(5)PE[16]のレジスタのbit0を読み出し、データバッファ22のbit4に格納する。
(6)PE[0]のレジスタへ、データバッファ22のデータを書き込む。
(7)PE[20]のレジスタのbit0を読み出し、データバッファ22のbit0に格納する。
(8)PE[24]のレジスタのbit0を読み出し、データバッファ22のbit1に格納する。
(9)PE[28]のレジスタのbit0を読み出し、データバッファ22のbit2に格納する。
(10)PE[32]のレジスタのbit0を読み出し、データバッファ22のbit3に格納する。
(11)PE[36]のレジスタのbit0を読み出し、データバッファ22のbit4に格納する。
(12)PE[1]のレジスタへ、データバッファ22のデータを書き込む。
(13)PE[40]のレジスタのbit0を読み出し、データバッファ22のbit0に格納する。
(14)PE[44]のレジスタのbit0を読み出し、データバッファ22のbit1に格納する。
(15)PE[48]のレジスタのbit0を読み出し、データバッファ22のbit2に格納する。
(16)PE[52]のレジスタのbit0を読み出し、データバッファ22のbit3に格納する。
(17)PE[56]のレジスタのbit0を読み出し、データバッファ22のbit4に格納する。
(18)PE[2]のレジスタへ、データバッファ22のデータを書き込む。
・・・・(同様の動作が繰り返されるため、途中略する。)
(73)PE[240]のレジスタのbit0を読み出し、データバッファ22のbit0に格納する。
(74)PE[244]のレジスタのbit0を読み出し、データバッファ22のbit1に格納する。
(75)PE[248]のレジスタのbit0を読み出し、データバッファ22のbit2に格納する。
(76)PE[252]のレジスタのbit0を読み出し、データバッファ22のbit3に格納する。
(77)PE[12]のレジスタへ、データバッファ22のデータを書き込む。
【0055】
なお、最後のデータ{PE[12]のレジスタ}へ格納すべきデータは、4ビットデータとなる。また、上記の動作では、処理後のレジスタ内のデータの並びは図5とは異なる。例えば、PE[0]のレジスタのbit0のデータは、結局“bit0”に格納される(図5では、bit2に格納されている)。
【0056】
≪第4の実施の形態≫
画像処理の対象画像の(1ラインの、即ち主走査方向の)画素数が、SIMD型マイクロプロセッサ2のPE個数よりも多い場合は、PE数で分割して処理を行なうことになる。分割される画素データは、例えば、図7のように複数のレジスタ(行)を利用して格納される(ここでは、対象画素が1024個、PE数が256個である)。
【0057】
前に説明したように、そもそも本発明に係るSIMD型マイクロプロセッサ2では、1つのPE3の演算部において、該PE3の左隣3個までのPE3に備わるレジスタ、及び該PE3の右隣3個までのPE3に備わるレジスタと、アクセスできるように設定されている。例えば、画像データに関する所定のフィルタ処理を行なう場合、ある画素からみて(主走査方向上の)左右の幾つかの画素に係るデータが必要になることがある。上記設定はそのような処理に備えるためのものである。
【0058】
ところが、画素データを分割する場合、上記のように左右のいくつかの画素データとアクセスすることが必須となる処理を行なおうとしても、分割の境界及びその近傍においてアクセスすべき画素データが得られない、という問題が発生することがある。具体的に説明する。
【0059】
右3画素、左3画素を利用して、フィルタ処理を行なう場合を想定する。このとき、画素データは図7に示すようにレジスタ34に格納されているとする。「画素255」をR0レジスタに格納するPE[255]からは、右側3画素である「画素254」、「画素253」及び「画素252」に対して問題なくアクセスできる。しかし、左側3画素である「画素256」、「画素257」及び「画素258」は、PE[0]、PE[1]及びPE[2]のR1レジスタに格納されているため、PE[255]からは即座にはアクセスできない。
【0060】
上記の問題の対策として、分割の境界であるところの端部近傍のPE、例えばPE[0]の近傍のPEやPE[255]の近傍のPEにおいては、データの重なりを持たせて画素データを格納させる、というものがある。
【0061】
図8では、両端部近傍にて夫々4画素(データ)分の重なりを持たせて、画素データを格納している。つまり、PE[252]〜PE[255]のR0レジスタに格納されている画素248〜251は、画素247(PE[247])までのPEからの「参照画素」として使用され、PE[0]〜PE[3]のR1レジスタに格納されている画素244〜247は、画素248(PE[248])以降のPEからの「参照画素」として使用される。これらの「重なりの部分」は、画像処理終了後に最終的には不要データとして削除されて出力される。また、図面上の「ダミー」とは、1024画素分の画像データの両端に置かれている不要なデータであり、最終的には削除して出力される。このような「重なりの部分」の大きさは、画像処理の全体において左右方向の参照画素数がどの程度まで必要であるか、で決定される。通常は、16画素程度である。
【0062】
但し、上記のように、「重なりの部分」の画素データを格納するため、実質上有効なPE数が減少する。「重なりの部分」の画素データは参照のためにのみ供されるからである。よって、分割数が増加し格納されるレジスタ数が増加する。図8においては、R4レジスタもデータ格納のために利用されている。
【0063】
図8のように画像データを分割した場合、間引き処理後は図10のようになる。図10は、主走査方向の4画素を1ブロックとして1/4に間引いた処理を行なった結果である。図では、画素0〜3をブロック0、画素4〜7をブロック4、画素8〜11をブロック8、...というように、ブロックの名称を付けている。
【0064】
先ず図8の状況において、ブロックに含まれる画素データ、例えば画素0〜3の画素値をあるパターン値と比較して一致していれば“1”、一致しなければ“0”に、ブロックデータを設定して、ブロックの先頭の画素に係るPE(例ではPE[0]、PE[4]、PE[8]、...)のレジスタに格納する。このことにより、ブロックデータは図9のように4の倍数のPEに配置される。続いて、実施の形態1と同様にして1/4に間引くと、図10のようにPE[0]の方向に詰めて配置される。
【0065】
ところで、図10のような間引き処理後のブロックデータを使用して領域判定に係る処理を行なう場合、やはり左右方向のPE3の備えるレジスタ(に格納されるデータ)の参照が必要となることがある。例えば、図10において、参照ブロックデータが左右3ブロック(3個のPE)まで必要な処理を想定する。図10のPE[62]のレジスタR0に格納されているブロック244のデータに注目すると、右方向の参照ブロックデータは存在する。しかし、左方向の参照ブロックデータに関してはPE[63]のブロック248しか存在しない。同様に、PE[1]のレジスタR1に格納されているブロック248のデータは、左方向の参照ブロックデータは存在するが、右方向の参照ブロックデータはPE[0]のブロック244しか存在しない。従って、このままでは処理を継続できないことになってしまう。
【0066】
上記の問題点の解決策の一つとして、図8における間引き前の画素データの重なりの部分を相当に大きく取る、というものが考えられ得る。しかし、こうすると「重なりの部分」が図8のものの4倍も必要となってしまい、実質上有効なPE個数はますます減少してしまう。
【0067】
本発明の第4の実施の形態に係るSIMD型マイクロプロセッサ2は、それらの問題点をも解決するものである。
【0068】
図12は、本発明の第4の実施の形態に係るSIMD型マイクロプロセッサ2のブロック図である。図2に示される本発明の第1の実施の形態に係るSIMD型マイクロプロセッサ2と、略、同様の構成であるが、この第4の実施の形態では、データバッファ22内のバッファが5つ(buf0、buf1、buf2、buf3、buf4)となっている。
【0069】
上記の構成において、256個のプロセッサエレメント3を有するSIMD型マイクロプロセッサ2での、1/4の間引き動作は以下のようになる。
【0070】
先ず、間引き処理の前に、ブロックデータを図11のように予め配置する。必要なブロックデータは、図9と同様に、PE番号が「4の倍数」となるPE(のレジスタ)に格納されている。更に、PE番号が「4の倍数−1」のPE(のレジスタ)には、画像データを分割して形成された分割画像データの夫々の、1つ前の分割で取り扱われるブロックデータがPE一つ分右方向にずらされて、格納されている。同様に、PE番号が「4の倍数+1」のPE(のレジスタ)には、画像データを分割して形成された分割画像データの夫々の、1つ後の分割で取り扱われるブロックデータがPE一つ分左方向にずらされて、格納されている。
【0071】
図11において、例えば、R1レジスタに着目する。PE番号が4の倍数であるPEには、R1レジスタ(分割1)に格納されていたデータを処理したブロックデータが格納されている。つまり、前に説明したのと同様に、主走査方向の4画素を1ブロックとして、各ブロックに含まれる画素データに所定の演算を施しその結果値をブロックの先頭の画素に係るPEのR1レジスタに格納している。
【0072】
同様に、PE番号が「4の倍数−1」であるPEには、R0レジスタ(分割0)に格納されていたデータを処理したブロックデータが格納されている。つまり、「分割0」において主走査方向の4画素を1ブロックとして、各ブロックに含まれる画素データに所定の演算を施し、その結果値を「4の倍数−1」のPEのR1レジスタに(PE一つ分右方向にずらして)格納している。さらに、PE番号が「4の倍数+1」であるPEには、R2レジスタ(分割2)に格納されていたデータを処理したブロックデータが格納されている。つまり、「分割2」において主走査方向の4画素を1ブロックとして、各ブロックに含まれる画素データに所定の演算を施し、その結果値を「4の倍数+1」のPEのR1レジスタに(PE一つ分左方向にずらして)格納している。
【0073】
図11のように配置されたブロックデータに対して、間引き器10は、以下の動作を行なう。
【0074】
(1)PE[235]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(2)PE[0]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(3)PE[239]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(4)PE[1]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(5)PE[243]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(6)PE[2]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(7)PE[247]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(8)PE[3]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(9)PE[5]のレジスタのデータを読み出し、データバッファ22のbuf1に格納する。
(10)PE[9]のレジスタのデータを読み出し、データバッファ22のbuf2に格納する。
(11)PE[13]のレジスタのデータを読み出し、データバッファ22のbuf3に格納する。
(12)PE[17]のレジスタのデータを読み出し、データバッファ22のbuf4に格納する。
(13)PE[4]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(14)PE[4]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(15)PE[8]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(16)PE[5]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(17)PE[12]のレジスタのデータを読み出しデータバッファ22のbuf0に格納する。
(18)PE[6]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(19)PE[16]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(20)PE[7]のレジスタへデータバッファ22のbuf0のデータを書き込む。
・・・・(同様の動作が繰り返されるため、途中略する。)
(131)PE[240]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(132)PE[63]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(133)PE[244]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(134)PE[64]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(135)PE[248]のレジスタのデータを読み出し、データバッファ22のbuf0に格納する。
(136)PE[65]のレジスタへデータバッファ22のbuf0のデータを書き込む。
(137)PE[66]のレジスタへデータバッファ22のbuf1のデータを書き込む。
(138)PE[67]のレジスタへデータバッファ22のbuf2のデータを書き込む。
(139)PE[68]のレジスタへデータバッファ22のbuf3のデータを書き込む。
(140)PE[69]のレジスタへデータバッファ22のbuf4のデータを書き込む。
【0075】
上記の動作により、間引き後のブロックデータは、図13のように配置される。図10とは異なり、PE[65]のR0レジスタに格納されているブロック244のデータには、左右いずれの方向も参照ブロックデータが存在しており、同様にPE[4]のR1レジスタに格納されているブロック248のデータにも、左右いずれの方向も参照ブロックデータが存在している。
【0076】
上記の第3の実施の形態では、データバッファ22のバッファ数を5つとして構成している。これは、PE[5]、PE[9]、PE[13]、PE[17]のレジスタのデータが、間引き後に1/4に詰められたデータにより上書きされて消失するのを防ぐためである。このこと(即ち、消失を防ぐこと)は図2に示される第1の実施の形態の構成においても実現可能である。つまり、PE[5]、PE[9]、PE[13]、PE[17]のレジスタのデータを、一旦上記処理で他の用途に利用されないPEのレジスタ、例えばPE[235]、PE[239]、PE[243]、PE[247]のレジスタに待避し、PE[66]〜PE[69]に書き込む際にそれらから読み出す、というようなシーケンスの変更だけでも実現可能である。
【0077】
第3の実施の形態で示した、ビットパックによる間引き処理においても、画像データがPE数により分割される場合は、分割境界における参照データが欠缺しているという問題を回避するために、この第4の実施の形態と同様な処理が必要となることがある。
【0078】
≪第5の実施の形態≫
ブロックデータを使用した領域判定処理の実施後は、その判定結果により各画素毎に画像処理内容が決定される。したがって、1/4(等)に間引きしたデータより得られた領域判定結果は、4倍(等)に拡大して元の画素の位置にまで戻さなければならない。第1の実施の形態のSIMD型マイクロプロセッサ2により1/4に間引いた場合は、第2の実施の形態のSIMD型マイクロプロセッサ2により拡大すれば判定結果データを対応する元の画素の位置にまで戻すことができる。しかし、第3の実施の形態では、ビットパックが形成されているため、元に戻す(即ち、ビットパックを戻す、ビットアンパックする)には別の実施の形態を利用する必要がある。
【0079】
図14は、本発明の第5の実施の形態に係るSIMD型マイクロプロセッサ2のブロック図である。
【0080】
図3に示される第2の実施の形態のSIMD型マイクロプロセッサ2に対して、データバッファ22からの読み出しにバレルシフタ26’が追加されており、データバッファ22の任意のビット位置のデータを、レジスタ34の任意のビットに書き込みむことが可能な構成となっている。
【0081】
上記の構成において、256個のプロセッサエレメント3を有するSIMD型マイクロプロセッサ2での、「4倍の拡大」且つ「5×1ビットアンパック」の動作は以下のようになる。ここで、「データバッファのbit0」とは、所定のデータバッファ22の最下位ビットを示す。同様に、「bit1」、「bit2」、「bit3」、「bit4」は、bit0からみて順に1つずつ上位のビットを示す。
【0082】
(1)PE[12]のレジスタのデータを読み出し、データバッファ22に格納する。
(2)PE[252]のレジスタへ、データバッファ22のbit3のデータを書き込む。
(3)PE[248]のレジスタへ、データバッファ22のbit2のデータを書き込む。
(4)PE[244]のレジスタへ、データバッファ22のbit1のデータを書き込む。
(5)PE[240]のレジスタへ、データバッファ22のbit0のデータを書き込む。
(6)PE[11]のレジスタのデータを読み出し、データバッファ22に格納する。
(7)PE[236]のレジスタへ、データバッファ22のbit4のデータを書き込む。
(8)PE[232]のレジスタへ、データバッファ22のbit3のデータを書き込む。
(9)PE[228]のレジスタへ、データバッファ22のbit2のデータを書き込む。
(10)PE[224]のレジスタへ、データバッファ22のbit1のデータを書き込む。
(11)PE[220]のレジスタへ、データバッファ22のbit0のデータを書き込む。
・・・・(同様の動作が繰り返されるため、途中略する。)
(72)PE[0]のレジスタのデータを読み出し、データバッファ22に格納する。
(73)PE[16]のレジスタへ、データバッファ22のbit4のデータを書き込む。
(74)PE[12]のレジスタへ、データバッファ22のbit3のデータを書き込む。
(75)PE[8]のレジスタへ、データバッファ22のbit2のデータを書き込む。
(76)PE[4]のレジスタへ、データバッファ22のbit1のデータを書き込む。
(77)PE[0]のレジスタへ、データバッファ22のbit0のデータを書き込む。
【0083】
なお、最後{上記(77)}のPE[0]への書き込み動作は、データに変換が無いため省略可能である。
【0084】
≪第6の実施の形態≫
ブロックデータを使用した領域判定処理の実施後は、その判定結果により各画素毎に画像処理内容が決定される。したがって、1/4(等)に間引きしたデータより得られた領域判定結果は、4倍(等)に拡大して元の画素の位置にまで戻さなければならない。第1の実施の形態のSIMD型マイクロプロセッサ2により1/4に間引いた場合は、第2の実施の形態のSIMD型マイクロプロセッサ2により拡大すれば判定結果データを対応する元の画素の位置にまで戻すことができる。
【0085】
第5の実施の形態の説明で記したが、第2の実施の形態のSIMD型マイクロプロセッサ2を利用して、領域判定結果データが4倍(等)に拡大されると、PE番号が4の倍数であるPEにて、有効な領域判定結果データが配置される。図15はその様子を示す。
【0086】
拡大後の処理で、4の倍数以外のPE番号を備えるPEにおいては、そのPE番号以下で且つ直近の4の倍数のPE番号を備えるPEの、レジスタに格納される領域判定結果データを使用することになる。即ち、PE[0]〜PE[3]はPE[0]のレジスタ上の領域判定結果データ、PE[4]〜PE[7]はPE[4]のレジスタ上の領域判定結果データ、PE[8]〜PE[11]はPE[8]のレジスタ上の領域判定結果データ、・・・を使用することとなる。換言すると、PE番号が「4の倍数」のPEは自身のレジスタ上のデータ、PE番号が「4の倍数+1」のPEは1つ右のPEのレジスタ上のデータ、PE番号が「4の倍数+2」のPEは2つ右のPEのレジスタ上のデータ、PE番号が「4の倍数+3」のPEは3つ右のPEのレジスタ上のデータを参照することになる。
【0087】
上記のように、PE毎に処理が異なるものになる。そのため、全てのPEで同じ処理を実行(並列処理)するという、SIMD型マイクロプロセッサの特色をうまく利用することができない。
【0088】
図3のブロック図に示されるSIMD型マイクロプロセッサ2は、本発明の第2の実施の形態に係るものであると同時に、本発明の第6の実施の形態に係るものである。但し、第6の実施の形態においては、第2の実施の形態と処理のシーケンスが異なる。
【0089】
上記の構成において、256個のプロセッサエレメント3を有するSIMD型マイクロプロセッサ2での、4倍の拡大動作は以下のようになる。
【0090】
(1)PE[63](アドレス63)のレジスタのデータを読み出し、データバッファ22に格納する。
(2)PE[255](アドレス255)のレジスタへ、データバッファ22のデータを書き込む。
(3)PE[254](アドレス254)のレジスタへ、データバッファ22のデータを書き込む。
(4)PE[253](アドレス253)のレジスタへ、データバッファ22のデータを書き込む。
(5)PE[252](アドレス252)のレジスタへ、データバッファ22のデータを書き込む。
(6)PE[62](アドレス62)のレジスタのデータを読み出し、データバッファ22に格納する。
(7)PE[251](アドレス251)のレジスタへ、データバッファ22のデータを書き込む。
(8)PE[250](アドレス250)のレジスタへ、データバッファ22のデータを書き込む。
(9)PE[249](アドレス249)のレジスタへ、データバッファ22のデータを書き込む。
(10)PE[248](アドレス248)のレジスタへ、データバッファ22のデータを書き込む。
(11)PE[61](アドレス61)のレジスタのデータを読み出し、データバッファ22に格納する。
(12)PE[247](アドレス247)のレジスタへ、データバッファ22のデータを書き込む。
(13)PE[246](アドレス246)のレジスタへ、データバッファ22のデータを書き込む。
(14)PE[245](アドレス245)のレジスタへ、データバッファ22のデータを書き込む。
(15)PE[244](アドレス244)のレジスタへ、データバッファ22のデータを書き込む。
・・・・(同様の動作が繰り返されるため、途中略する。)
(311)PE[1](アドレス1)のレジスタのデータを読み出し、データバッファ22に格納する。
(312)PE[7](アドレス7)のレジスタへ、データバッファ22のデータを書き込む。
(313)PE[6](アドレス6)のレジスタへ、データバッファ22のデータを書き込む。
(314)PE[5](アドレス5)のレジスタへ、データバッファ22のデータを書き込む。
(315)PE[4](アドレス4)のレジスタへ、データバッファ22のデータを書き込む。
(316)PE[0](アドレス0)のレジスタのデータを読み出し、データバッファ22に格納する。
(317)PE[3](アドレス3)のレジスタへ、データバッファ22のデータを書き込む。
(318)PE[2](アドレス2)のレジスタへ、データバッファ22のデータを書き込む。
(319)PE[1](アドレス1)のレジスタへ、データバッファ22のデータを書き込む。
(320)PE[0](アドレス0)のレジスタへ、データバッファ22のデータを書き込む。
【0091】
なお、最後{上記(320)}のPE[0]への書き込み動作は、データに変換が無いため省略可能である。
【0092】
上記の動作によって拡大後のデータは図16のようになる。よって、全てのPEにおいて、そのPE自身に備わるレジスタに格納されるデータを、領域判定結果として参照すればよいことになる。
【0093】
≪第7の実施の形態≫
前述の第1の実施の形態の構成では、「間引き」の単位は、2のベキ乗(2、4、8、16、...)程度である。よって、ブロック化等の処理においては有効な構成である。ただし、画像データの縮小等の処理では、「間引き」の間隔が一定ではない。即ち、「間引き」の間隔が任意に指定され得る手段が備わることが望ましい。
【0094】
図17は、本発明に係る第7の実施の形態のSIMD型マイクロプロセッサ2のブロック図である。図2の第1の実施の形態と基本的には同様の構成であるが、シーケンサ24において、間引き間隔の指定のためのRAM30が設置されている。RAM30の容量は、単位あたり1ビットのデータを、縮小対象の画像データの主走査画素数分まで、少なくとも備え得る程度のものである。
【0095】
上記の構成において、縮小動作は以下のように行なう。
【0096】
(1)アドレス生成回路20のリードポインタ、ライトポインタを“0”に設定する。同時に、RAM30のアドレスポインタを“0”に設定する。
(2)リードポインタの値をアドレスとするPEのレジスタデータを読み出し、データバッファ22に格納する。同時に、RAM30のアドレスポインタで指定されたアドレスよりRAM30のデータを読み出し、リードポインタ、RAMアドレスポインタを“1”だけインクリメントする。
(3)読み出されたRAM30のデータが“1”であった場合は、ライトポインタをアドレスとするPEのレジスタに、データバッファ22のデータを書き込み、ライトポインタを“1”だけインクリメントする。
(4)上記の(2)(3)の動作を、リードポインタがPEの最大数を越えるまで繰り返す。
【0097】
上記の動作により、RAM30において“1”が格納されていない箇所(アドレス)(即ち、“0”が格納されている箇所(アドレス))に対応する画素は間引かれ、RAM30において“1”が格納されている箇所(アドレス)に対応する画素はPE[0]方向に詰められて、レジスタにデータが配置されることになる。
【0098】
縮小対象の画像データの画素数がPE数よりも大きく、画像データを分割して処理すべき場合においても、2つ目以降の分割画像データの縮小処理で上記(1)のRAMアドレスポインタのクリアを行なわずに処理を継続することができる。2つ目以降の分割画像データの縮小処理では、以下のような処理となる。
【0099】
(1)アドレス生成回路20のリードポインタ、ライトポインタを“0”に設定する。
(2)リードポインタの値をアドレスとするPEのレジスタデータを読み出し、データバッファ22に格納する。同時に、RAM30のアドレスポインタで指定されたアドレスよりRAM30のデータを読み出し、リードポインタ、RAMアドレスポインタを“1”だけインクリメントする。
(3)読み出されたRAM30のデータが“1”であった場合は、ライトポインタをアドレスとするPEのレジスタに、データバッファ22のデータを書き込み、ライトポインタを“1”だけインクリメントする。
(4)上記の(2)(3)の動作を、リードポインタがPEの最大数を越えるまで繰り返す。
【0100】
なお、上記の動作では、画像データを分割した場合に、縮小画像データが分割された単位で下位のPE側に間引かれて(詰められて)配置される、という問題点がある(上位のPEには“ダミー”データが並ぶことになる)。更に、縮小画像データにおいては、特に上記の「第4の実施の形態」で説明したような参照画素データが配置されていない、という問題点も発生する。そこで、図18のようにリード側のレジスタ6’(縮小前画像)とライト側のレジスタ(縮小後画像)6”を分けて接続する。図18の形態において、リード側のレジスタにおいてのみ画像データを分割して格納し、さらに、リードポインタのみを2つ目以降の画像データに進めることにより、縮小動作を継続する。こうすることで、分割画像の縮小後画像データの最終端のPEの次のPEから、次の分割画像の縮小画像データを配置することが可能となる。この場合には、リードポインタを2つ目以降の画像データに進めても、ライトポインタのクリアは行なわない。
【0101】
≪第8の実施の形態≫
前述の第2の実施の形態の構成では、「拡大」の単位は、2のベキ乗(2、4、8、16、...)程度である。よって、ブロック化された領域判定データの現画像データへの反映のための拡大処理等においては、有効な構成である。ただし、画像データの拡大等の処理では、「拡大」の間隔が一定ではない。即ち、「拡大」の間隔が任意に指定され得る手段が備わることが望ましい。
【0102】
図19は、本発明に係る第8の実施の形態のSIMD型マイクロプロセッサ2のブロック図である。図3の第2の実施の形態と基本的には同様の構成であるが、シーケンサ24において、拡大間隔の指定のためのRAM30が設置されている。RAM30の容量は、単位あたり1ビットのデータを、拡大後の画像データの主走査画素数分まで、少なくとも備え得る程度のものである。
【0103】
上記の構成において、拡大動作は以下のように行なう。
【0104】
(1)アドレス生成回路20のリードポインタを拡大前の画像データの主走査画素値、ライトポインタを拡大後の画像データの主走査画素値に設定する。同時に、RAM30のアドレスポインタを拡大後の画像データの主走査画素値に設定する。
(2)リードポインタの値をアドレスとするPEのレジスタデータを読み出し、データバッファ22に格納する。同時に、RAM30のアドレスポインタで指定されたアドレスよりRAM30のデータを読み出し、RAM30のアドレスポインタを“1”だけデクリメントする。読み出されたRAM30のデータが“1”であった場合は、リードポインタを“1”だけデクリメントする。
(3)ライトポインタをアドレスとするPEのレジスタに、データバッファ22のデータを書き込む。ライトポインタを“1”だけデクリメントする。
(4)上記の(2)(3)の動作を、ライトポインタが0となるまで繰り返す。
【0105】
上記の動作により、RAM30において“1”が格納されていない箇所(アドレス)(即ち、“0”が格納されている箇所(アドレス))に対応する画素には、リードポインタの直前のアドレスの(拡大前)画素データが書き込まれ、RAM30において“0”が格納されている箇所(アドレス)に対応する画素には、リードポインタの指し示すアドレスの(拡大前)画素データが書き込まれる。このようにして、拡大動作が実現され得る。
【0106】
なお、上記の動作では画像データを分割した場合に、拡大画像データが拡大前の画像データを、それらが読み出される前に、上書きしてしまうという問題点が発生し得る。そこで、図20のように、リード側のレジスタ6’(拡大前画像データ)とライト側のレジスタ6”(拡大後画像データ)を分けて接続する。動作終了後にライト側のレジスタの内容を、拡大後の分割画像データ格納レジスタに転送することにより、上記の上書きされるという問題点は回避され得る。このとき、以下のような動作となる。
【0107】
(1)アドレス生成回路20のリードポインタを拡大前の画像データの主走査画素値に設定する。ライトポインタを、拡大後の画像データの主走査画素値をPE個数で割った余りに、設定する。さらに、RAM30のアドレスポインタを拡大後の画像データの主走査画素値に設定する。
(2)リードポインタの値をアドレスとするPEのレジスタデータを読み出し、データバッファ22に格納する。同時に、RAM30のアドレスポインタで指定されたアドレスよりRAM30のデータを読み出し、RAM30のアドレスポインタを“1”だけデクリメントする。読み出されたRAM30のデータが“1”であった場合は、リードポインタを“1”だけデクリメントする。
(3)ライトポインタをアドレスとするPEのレジスタに、データバッファ22のデータを書き込む。ライトポインタを“1”だけデクリメントする。
(4)上記の(2)(3)の動作を、ライトポインタが0となるまで繰り返す。
(5)拡大後レジスタのデータを分割画像データ格納レジスタの「1分割目」に転送する。
(6)ライトポインタを、PE個数(の値)に設定する。
(7)リードポインタの値をアドレスとするPEのレジスタデータを読み出し、データバッファ22に格納する。同時に、RAM30のアドレスポインタで指定されたアドレスよりRAM30のデータを読み出し、RAM30のアドレスポインタを“1”だけデクリメントする。読み出されたRAM30のデータが“1”であった場合は、リードポインタを“1”だけデクリメントする。
(8)ライトポインタをアドレスとするPEのレジスタに、データバッファ22のデータを書き込む。ライトポインタを“1”だけデクリメントする。
(9)上記の(7)(8)の動作をライトポインタが0となるまで繰り返す。
(10)拡大後レジスタのデータを分割画像データ格納レジスタの「次の分割」に転送する。
(11)上記の(6)〜(10)をリードポインタが0となるまで繰り返す。
【0108】
なお、拡大前画像データが分割されていた場合には、拡大前レジスタの内容を処理中に変更し、各ポインタの制御を適宜変更することにより、対応可能である。
【0109】
≪その他の実施の形態≫
以上の実施の形態における間引き器は、いずれもシーケンサ24におけるシーケンスが異なることが主たる相違であるため、当然、幾つかの実施の形態を兼ね備えるような構成も簡単に実現できる。このことは以上の実施の形態における拡大器についても同様である。さらに、例えば、第1の実施の形態から第6の実施の形態の機能を、全部兼ね備える1つの装置を構成することも可能である。
【0110】
【発明の効果】
本発明を利用することにより、以下のような効果を得ることができる。
【0111】
第1の実施の形態に係るSIMD型マイクロプロセッサを利用すると、画素データにおいて主走査方向の間引き処理が、簡素な構成かつ低コストにより、実現することができる。
【0112】
第2の実施の形態に係るSIMD型マイクロプロセッサを利用すると、画素データにおいて主走査方向の拡大処理が、簡素な構成かつ低コストにより、実現することができる。
【0113】
第3の実施の形態に係るSIMD型マイクロプロセッサを利用すると、より広い範囲の参照画素データを一度の処理で扱えるようになる。
【0114】
第4の実施の形態に係るSIMD型マイクロプロセッサを利用すると、PE個数を越える画素数を持つ画像データに対し、フィルタ処理などで必要とされる(近傍の)参照データを考慮しつつ、間引き処理を行なうことが可能となる。
【0115】
第5の実施の形態に係るSIMD型マイクロプロセッサを利用すると、ビットパックされたデータを拡大処理することが可能となる。
【0116】
第6の実施の形態に係るSIMD型マイクロプロセッサを利用すると、拡大処理やブロック化処理の後、SIMD演算処理を少ないステップ行なうことができる。
【0117】
第7の実施の形態に係るSIMD型マイクロプロセッサを利用すると、画像縮小処理を実現することができる。
【0118】
第8の実施の形態に係るSIMD型マイクロプロセッサを利用すると、画像拡大処理を実現することができる。
【図面の簡単な説明】
【図1】 本発明に係るSIMD型マイクロプロセッサの概略の構成を示すブロック図(1)である。
【図2】 第1の実施の形態に係るSIMD型マイクロプロセッサのブロック図である。
【図3】 第2の実施の形態に係るSIMD型マイクロプロセッサのブロック図である。
【図4】 演算部とレジスタとの関係を示すブロック図である。
【図5】 演算部と、ビットパックデータが格納されたレジスタとの関係を示すブロック図である。
【図6】 第3の実施の形態に係るSIMD型マイクロプロセッサのブロック図である。
【図7】 画素数がSIMD型マイクロプロセッサのPE個数よりも多い場合の、画素データがレジスタに格納される状況を示す模式図である。
【図8】 画素数がSIMD型マイクロプロセッサのPE個数よりも多い場合、重なり部分を形成しつつ画素データがレジスタに格納される状況を示す模式図である。
【図9】 間引き前のブロックデータがレジスタに格納される状況を示す模式図である。
【図10】 間引き後のブロックデータがレジスタに格納される状況を示す模式図である。
【図11】 第4の実施の形態に係るSIMD型マイクロプロセッサにて利用されるブロックデータの、格納の状況を示す模式図である。
【図12】 第4の実施の形態に係るSIMD型マイクロプロセッサのブロック図である。
【図13】 第4の実施の形態に係るSIMD型マイクロプロセッサによって形成される、間引き後のブロックデータのレジスタへの格納の好適な状況を示す模式図である。
【図14】 第5の実施の形態に係るSIMD型マイクロプロセッサのブロック図である。
【図15】 第6の実施の形態に係るSIMD型マイクロプロセッサにて利用されるブロックデータの格納の状況を示す模式図である。
【図16】 第6の実施の形態に係るSIMD型マイクロプロセッサにて形成されるブロックデータの格納の状況を示す模式図である。
【図17】 第7の実施の形態に係るSIMD型マイクロプロセッサのブロック図(1)である。
【図18】 第7の実施の形態に係るSIMD型マイクロプロセッサのブロック図(2)である。
【図19】 第8の実施の形態に係るSIMD型マイクロプロセッサのブロック図(1)である。
【図20】 第8の実施の形態に係るSIMD型マイクロプロセッサのブロック図(2)である。
【図21】 本発明に係るSIMD型マイクロプロセッサの概略の構成を示すブロック図(2)である。
【図22】 ブロック化処理の概念図である。
【符号の説明】
2・・・SIMD型マイクロプロセッサ、
3・・・プロセッサエレメント(PE)、
4・・・グローバルプロセッサ(GP)、
6、6’、6”・・・レジスタファイル、
8・・・演算アレイ、
10・・・間引き器、
12・・・拡大器、
14、14’、14”・・・外部インタフェース、
20、20’、20”・・・アドレス生成回路、
22・・・データバッファ、
24・・・シーケンサ、
26、26’・・・バレルシフタ、
30・・・RAM(ランダムアクセスメモリ)、
34・・・レジスタ。
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a single instruction-stream data-stream (SIMD) type microprocessor.
[0002]
[Prior art]
In the SIMD type microprocessor, the same arithmetic processing can be executed simultaneously on a plurality of data with one instruction. This structure is frequently used in applications related to processing (for example, image processing) that has the same calculation but a very large amount of data.
[0003]
In normal arithmetic processing in a SIMD type microprocessor, a plurality of arithmetic units (Processor Elements [PE]; processor elements) are arranged and the same arithmetic is simultaneously performed on a plurality of data.
[0004]
The SIMD type microprocessor can sufficiently exhibit its performance in processing in which all PEs operate simultaneously.
[0005]
By the way, in the (arithmetic) processing of image data, it is detected whether the area of the image data to be processed is, for example, a “character area” or a “photo area”, and the detection result is used. Processing contents may be changed for each area. In the case of such detection, it is necessary to process pixel data in a considerably wide area range as determination target data. However, in the SIMD type microprocessor, when the pixel data is directly manipulated, only the data in the range of about “8 × 8” pixels can be processed at a time. Therefore, in order to process pixel data in a wider range, for example, “4 × 4” pixel data is converted into one data (block) (referred to as blocking), and region determination processing is performed on this block. Sometimes. When “4 × 4” pixels are taken as one block and “8 × 8” blocks are collected and processing is performed within the range, data in a range of “32 × 32” pixels is eventually processed. This is shown in FIG. Therefore, a considerably wide range of pixel data can be handled at a time.
[0006]
In the above block processing, reduction processing is essential.
[0007]
However, it is usually difficult for the SIMD type microprocessor to perform this reduction processing. In the conventional SIMD type microprocessor, various devices have been devised.
[0008]
For example, in the prior art, there is a technique in which reduction of data is realized by selecting data to be output to the outside by giving an instruction to output data to an output register built in the PE.
[0009]
In Japanese Patent Laid-Open No. 8-123683, the reduction process is realized by controlling the shift operation of the output shift register output from the processor to the outside and outputting the skipped pixel data.
[0010]
However, in the case of the above technique, it is limited only to reducing the output data, and data in the middle of the calculation cannot be reduced. However, it is necessary to add a circuit for controlling whether or not to output data in each PE (which causes a high cost problem). Furthermore, even if it tries to enlarge the reduced data, the above technique cannot cope with it at all.
[0011]
Further, for example, in another conventional technique, when outputting data of a register built in the PE to the outside and storing the data in an external FIFO (First In First Out) memory, arbitrary data is thinned out to the FIFO. The data is stored in the memory, and then the data is transferred from the FIFO memory to the register of each PE to realize reduction. Also in this case, a FIFO memory for one line is additionally required (there is a problem of high cost).
[0012]
A similar conventional technique is disclosed in Japanese Patent Laid-Open No. 9-212737. There, a processor element is provided with a parallel / serial converter and a serial / parallel converter, thereby realizing reduction / enlargement processing. In this prior art, since it is necessary to mount the hardware described above, there is a problem that unnecessary cost occurs when the reduction operation is unnecessary.
[0013]
[Problems to be solved by the invention]
An object of the present invention is to perform thinning processing, that is, reduction processing and enlargement processing with a simple configuration and low cost in a SIMD type microprocessor.
[0014]
[Means for Solving the Problems]
  The present invention has been made to achieve the above object. The data thinning-out device according to claim 1 according to the present invention includes:
  SIMD type microprocessor including a plurality of processor elementsHave,
  A data thinning device connected to a data transfer port for accessing a general-purpose register incorporated in a processor element from the outside of the microprocessor.
  Controlled by an internal sequencer,
  From the global processor included in the SIMD microprocessorPerforms processing in parallel with the SIMD arithmetic processing of the SIMD type microprocessor by automatically operating according to the operation start instruction setting to be performed,
  AboveSelect and read multiple arbitrary data from the data stored in the general-purpose register built in the processor element, and then write the multiple data back to the general-purpose register.
  The interval between the processor elements in which the plurality of data is stored by writing back is smaller than the interval between the processor elements in which the plurality of data is stored at the time of reading.
[0015]
  A data enlarging apparatus according to claim 2 according to the present invention includes:
  SIMD type microprocessor including a plurality of processor elementsHave,
  A data expansion device connected to a data transfer port for accessing a general-purpose register built in a processor element from the outside of the microprocessor,
  Controlled by an internal sequencer,
  From the global processor included in the SIMD microprocessorPerforms processing in parallel with the SIMD arithmetic processing of the SIMD type microprocessor by automatically operating according to the operation start instruction setting to be performed,
  AboveSelect and read multiple arbitrary data from the data stored in the general-purpose register built in the processor element, and then write the multiple data back to the general-purpose register.
  The interval between the processor elements in which the plurality of data is stored by writing back is larger than the interval between the processor elements in which the plurality of data is stored at the time of reading.
[0016]
  According to a third aspect of the present invention, there is provided a data thinning device according to the present invention.
  In the read data, it is stored in 1 bit at a predetermined position.dataOr stored in multiple bits at a predetermined positiondataSelect
  When writing back to a general-purpose register, a plurality of sets of the above-mentioned items are stored on one general-purpose register.dataStore
A data thinning device according to claim 1.
[0017]
The data thinning-out device according to claim 4 according to the present invention,
Read predetermined data stored in a general-purpose register built in the processor element located near the first end of the column constituted by the entire processor element, which is data other than the arbitrary data to be selected,
The data is written back to a general-purpose register built in the processor element located near the second end of the column constituted by the entire processor element,
at the same time,
Read predetermined data stored in a general-purpose register built in the processor element located near the second end of the column constituted by the entire processor element, other than the arbitrary data to be selected,
The data is written back to a general-purpose register built in the processor element located near the first end of the column constituted by the entire processor element.
A data thinning device according to claim 1.
[0018]
  A data enlarging apparatus according to claim 5 according to the present invention includes:
  1 bit of read datadataOr multiple bitsdataSplit into
  Multiple sets formed by the above divisionAbove dataIs written back to a general-purpose register built into another processor element,
A data enlarging apparatus according to claim 2.
[0019]
A data enlarging device according to claim 6 according to the present invention comprises:
In a first processor element in which data is stored by writing back and a second processor element in which data is stored by writing back,
One or a plurality of consecutive third processor elements exist between the first processor element and the second processor element, and no data is written back to these third processor elements. When
Data written back to the first processor element or data written back to the second processor element is
It is copied and written in a general-purpose register built in the third processor element.
A data enlarging apparatus according to claim 2.
[0020]
  The data thinning-out device according to claim 7 according to the present invention is provided.
  Including a memory unit having at least a bit capacity up to the number of bits, which is equal to the number indicating the number of minimum structural units constituting the data to be reduced included in the data to be reduced,
  Corresponding the data to be thinned out in each minimum constituent unit constituting the data to be reduced with the bit position of the memory unit, storing predetermined data in the corresponding bit position,
  To the stored dataOn the basis of,
The above read processing from the data stored in the general purpose register built in the processor element and the subsequent write back processing to the general purpose register are performed.
A data thinning device according to claim 1.
[0021]
  A data enlarging apparatus according to claim 8 according to the present invention includes:
  Including a memory unit having at least a bit capacity up to the number of bits, which is equal to the number indicating the number of minimum structural units constituting the data after the enlargement process included in the data after the enlargement process,
  Corresponding the expansion control target in each minimum constituent unit constituting the data after the expansion processing and the bit position of the memory unit, storing predetermined data in the corresponding bit position,
  The stored predetermined dataOn the basis of,
The above read processing from the data stored in the general purpose register built in the processor element and the subsequent write back processing to the general purpose register are performed.
A data enlarging apparatus according to claim 2.
[0022]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings.
[0023]
FIG. 1 and FIG. 21 are block diagrams showing a schematic configuration of a SIMD type microprocessor 2 according to the present invention. The configuration shown in FIGS. 1 and 21 is a basic configuration of the SIMD type microprocessor 2 according to the first to eighth embodiments which will be described later.
[0024]
The SIMD type microprocessor 2 shown in FIG. 1 generally includes a global processor 4, a register file 6, an operation array 8, and a thinning-out device 10 or an enlargement device 12.
[0025]
(1) Global processor 4
The global processor 4 itself is a so-called SISD (Single Instruction Stream, Single Data Stream) type processor, which includes a program RAM and a data RAM, decodes the program, and generates various control signals. This control signal is supplied to the register file 6 and the arithmetic array 8 in addition to various built-in blocks. When a GP (global processor) instruction is executed, various arithmetic processes and program control processes are performed using a built-in general-purpose register, an ALU (arithmetic logic unit), and the like.
[0026]
(2) Register file 6
It holds data processed by PE (processor element) instructions. As is well known, the PE (processor element) 3 is a structural unit that executes individual operations in a single instruction-stream (SIMD) type processor. As shown in the register file 6 and the operation array 8 in FIG. 21, the SIMD type microprocessor 2 in FIG. 21 includes 256 PE3. The PE instruction is a SIMD type instruction, and simultaneously performs the same processing on a plurality of data held in the register file 6. Control of reading / writing of data from the register file 6 is performed by a control signal from the global processor 4. The read data is sent to the arithmetic array 8 (arithmetic unit), and is written into the register file after arithmetic processing in the arithmetic array 8 (arithmetic unit).
[0027]
In the register file 6 of FIG. 21, 32 8-bit registers 34 are built in one PE unit, and a set of 256 PEs (32) has an array configuration. The register 34 is called R0, R1, R2,... R31 for each PE.
[0028]
Further, the register file 6 can be accessed from the outside of the processor 2, and reading / writing to a specific register is performed from the outside separately from the control of the global processor 4.
[0029]
(3) Arithmetic array
Processing of PE instruction is performed. All processes are controlled from the global processor 4.
[0030]
A 7 to 1 (7 to 1) multiplexer 42 is placed at a connection portion between the register file 6 and the operation array 8. As shown in FIGS. 21 and 4, when viewed from a certain multiplexer 42, the data in the R0-R31 registers 34 included in the three PEs 3 in the left direction and the data in the R0-R31 registers 34 included in the three PEs 3 in the right direction. The data and the data in the R0 to R31 register 34 included in the PE 3 to which the data belongs are set so that they can be selected as a calculation target.
[0031]
Each PE3 is given a serial number called a PE number. In the SIMD type microprocessor 2 in FIG. 21, since the number of PEs is 256, there are 256 bit sequences of 8 bits (that is, 256 types from 00000000b to 11111111b. Here, “b” at the end is binary. Is expressed as PE number data to each PE 3. The PE number may be given to each PE 3 regardless of the position of the PE, but in this specification, it is assumed that the PE numbers are assigned in order from the (right) end. Also, the PE whose PE number is “n” is
・ PE [n]
It will be expressed as Therefore, the SIMD type microprocessor 2 of FIG. 21 is configured by PE [0], PE [2], PE [3],... PE [254], PE [255] from the right.
[0032]
(4) Decimator 10 or enlarger 12
Arbitrary data is selected from the data read from the register file 6 and written to the register file 6. In the case of writing, normally, writing is performed from the lower number PE3. For example, when 1/4 thinning-out processing is performed in 256 PE3, specific processing in PE [0], PE [4], PE [8], PE [12], PE [16]. The data in the register 34 is read out, and the data is written in PE [0], PE [1], PE [2], PE [3], PE [4]. The “thinning process” will be described in detail later.
[0033]
<< First Embodiment >>
FIG. 2 is a block diagram of the SIMD type microprocessor 2 according to the first embodiment of the present invention.
[0034]
In FIG. 2, the thinning device 10 is connected to the external interface 14 of the register file 6 of the processor 2. In the external interface 14 of the register file 6, when the address, CLK, and R / W signals are given from the outside of the processor 2, the register 34 of the PE 3 indicated by the address can be accessed. The data is read and data is written to the register 34 by the WriteData bus 18.
[0035]
The decimation unit 10 includes an address generation circuit 20 that generates an address of a PE to be accessed, a data buffer 22 that holds read data for a period until writing, and a sequencer 24 that controls them. Operation setting is performed from (GP) 4.
[0036]
In the above configuration, the 1/4 thinning-out operation in the SIMD type microprocessor 2 having 256 processor elements 3 is as follows.
[0037]
(1) Read the register data of PE [0] (address 0) and store it in the data buffer 22.
(2) Write the data in the data buffer 22 to the register of PE [0] (address 0).
(3) The data in the register of PE [4] (address 4) is read and stored in the data buffer 22.
(4) Write the data in the data buffer 22 to the register of PE [1] (address 1).
(5) The data in the register of PE [8] (address 8) is read and stored in the data buffer 22.
(6) Write the data in the data buffer 22 to the register of PE [2] (address 2).
(7) The register data of PE [12] (address 12) is read and stored in the data buffer 22.
(8) Write the data in the data buffer 22 to the register of PE [3] (address 3).
・ ・ ・ ・ (Since the same operation is repeated, it will be omitted.)
(123) The data in the register of PE [244] (address 244) is read and stored in the data buffer 22.
(124) The data in the data buffer 22 is written to the register of PE [61] (address 61).
(125) The data of the register of PE [248] (address 248) is read and stored in the data buffer 22.
(126) Write the data in the data buffer 22 to the register of PE [62] (address 62).
(127) The data in the register of PE [252] (address 252) is read and stored in the data buffer 22.
(128) Write the data in the data buffer 22 to the register of PE [63] (address 63).
[0038]
Note that the first read / write operation from PE [0] in the above (1) and (2)} can be omitted because there is no conversion of data.
[0039]
By the above thinning-out operation, the data of every four PE registers is arranged in the PE [0] direction, and as a result, the registers of PE [0] to PE [63] are 1/4. Thus, the data thinned out in the above will be obtained. This process requires 128 steps. However, since the thinning-out device 10 automatically operates after an instruction to start from GP4, SIMD arithmetic processing by an instruction of the processor 2 can be executed in parallel.
[0040]
<< Second Embodiment >>
FIG. 3 is a block diagram of the SIMD type microprocessor 2 according to the second embodiment of the present invention.
[0041]
In FIG. 3, the expander 12 is connected to the external interface 14 of the register file 6 of the processor 2. The expander 12 includes an address generation circuit 20 that generates an address of the PE 3 to be accessed, a data buffer 22 that holds the read data for a period until writing, and a sequencer 24 that controls them. Operation setting is performed from (GP) 4.
[0042]
In the above configuration, the 4 times enlargement operation in the SIMD type microprocessor 2 having 256 processor elements 3 is as follows.
[0043]
(1) The data in the register of PE [63] (address 63) is read and stored in the data buffer 22.
(2) Write the data in the data buffer 22 to the register of PE [252] (address 252).
(3) The register data of PE [62] (address 62) is read and stored in the data buffer 22.
(4) Write the data in the data buffer 22 to the register of PE [248] (address 248).
(5) The data in the register of PE [61] (address 61) is read and stored in the data buffer 22.
(6) Write the data in the data buffer 22 to the register of PE [244] (address 244).
(7) The register data of PE [60] (address 60) is read and stored in the data buffer 22.
(8) Write the data in the data buffer 22 to the register of PE [240] (address 240).
・ ・ ・ ・ (Since the same operation is repeated, it will be omitted.)
(123) The data in the register of PE [2] (address 2) is read and stored in the data buffer 22.
(124) The data in the data buffer 22 is written to the register of PE [8] (address 8).
(125) The data in the register of PE [1] (address 1) is read and stored in the data buffer 22.
(126) Write the data in the data buffer 22 to the register of PE [4] (address 4).
(127) The register data of PE [0] (address 0) is read and stored in the data buffer 22.
(128) Write the data in the data buffer 22 to the register of PE [0] (address 0).
[0044]
Note that the read / write operation from PE [0] at the last {(127) and (128)} can be omitted because there is no conversion of data.
[0045]
By the above expansion operation, the register data of PE [0] to PE [63] is arranged in the register every four PEs at intervals from PE [0]. Thus, the data enlarged to the above will be obtained. This process requires 128 steps. However, since the expander 12 automatically operates after an instruction to start from GP4, SIMD arithmetic processing by an instruction of the processor 2 can be executed in parallel.
[0046]
<< Third Embodiment >>
In the blocking process of the area determination process described in the related art, the data held in units of blocks is often data indicating the result of a predetermined determination for each block. In addition, normally, the data indicates only “match / mismatch” regarding the predetermined determination. Such data can be expressed as 1-bit data. Therefore, data held in units of blocks is often only 1 bit.
[0047]
As shown in the block diagram of FIG. 4 (and FIG. 21), in the SIMD type microprocessor 2 according to the present invention, when viewed from a certain PE3, the data in the R0-R31 register 34 included in the PE3 to which it belongs and the left and right Data of the R0 to R31 registers 34 included in the three PEs 3 in the respective directions are set so that they can be selected as calculation targets. Therefore, in the SIMD type microprocessor 2 according to the present invention, it is possible to process data of 7 pixels on the left and right with a single pixel as a center (including itself) by one access. If data access is attempted, a shift operation or the like in the line (main scanning) direction is required.
[0048]
By the way, in the area determination process described above, a wide range of data may be required, and for example, about 32 blocks of block data may be required. If an attempt is made to configure settings that allow access to up to 32 blocks in a single operation, a multiplexer is required to select one from 32 targets. This increases the cost associated with the hardware. On the other hand, when a configuration in which the shift operation is repeated in the line direction is formed, a considerably large number of steps are required, and the performance may be deteriorated. Therefore, in the case of data composed of only one bit, such as the block data, it is assumed that the above-described problem can be solved by storing block data for a plurality of PEs 3 in a single PE 3 register. Can be done.
[0049]
In the SIMD type microprocessor 2 according to the present invention, 8-bit data can be stored in one register (for example, R0). Therefore, if data is stored as shown in FIG. 5, the left and right 35 blocks can be handled in one access. In FIG. 5, bit5, bit6, and bit7 are treated as invalid data (5 × 1 bit pack processing).
[0050]
If 2 bits of block data are required, it is possible to divide one register into 2 bits and store data for a plurality of PEs. In the SIMD type microprocessor 2 according to the present invention, since the register is 8 bits, up to 4 pieces of 2-bit block data can be stored in one PE3 (register). In that case, the left and right 28 blocks can be handled in one access (4 × 2 bit pack processing).
[0051]
FIG. 6 is a block diagram of a SIMD type microprocessor 2 according to the third embodiment of the present invention.
[0052]
With respect to the SIMD type microprocessor 2 of the first embodiment shown in FIG. 2, a barrel shifter 26 is added for writing to the data buffer 22, and data at an arbitrary bit position of the register 34 is transferred to the data buffer 22. It can be written in any bit.
[0053]
In the above configuration, the operation of “¼ thinning out” and “5 × 1 bit pack” in the SIMD type microprocessor 2 having 256 processor elements 3 is as follows. Here, “bit 0 of the register” of PE indicates the least significant bit of a predetermined register. Similarly, “bit 1”, “bit 2”, “bit 3”, and “bit 4” indicate the higher-order bits one by one as viewed from bit 0.
[0054]
(1) Read bit0 of the register of PE [0] and store it in bit0 of the data buffer 22.
(2) Read bit0 of the register of PE [4] and store it in bit1 of the data buffer 22.
(3) Read bit0 of the register of PE [8] and store it in bit2 of the data buffer 22.
(4) Read bit0 of the register of PE [12] and store it in bit3 of the data buffer 22.
(5) Read bit0 of the register of PE [16] and store it in bit4 of the data buffer 22.
(6) Write the data in the data buffer 22 to the register of PE [0].
(7) Read bit0 of the register of PE [20] and store it in bit0 of the data buffer 22.
(8) Read bit0 of the register of PE [24] and store it in bit1 of the data buffer 22.
(9) Read bit0 of the register of PE [28] and store it in bit2 of the data buffer 22.
(10) Read bit0 of the register of PE [32] and store it in bit3 of the data buffer 22.
(11) Read bit0 of the register of PE [36] and store it in bit4 of the data buffer 22.
(12) Write the data in the data buffer 22 to the register of PE [1].
(13) Read bit0 of the register of PE [40] and store it in bit0 of the data buffer 22.
(14) Read bit0 of the register of PE [44] and store it in bit1 of the data buffer 22.
(15) Read bit0 of the register of PE [48] and store it in bit2 of the data buffer 22.
(16) Read bit0 of the register of PE [52] and store it in bit3 of the data buffer 22.
(17) Read bit0 of the register of PE [56] and store it in bit4 of the data buffer 22.
(18) Write the data in the data buffer 22 to the register of PE [2].
・ ・ ・ ・ (Since the same operation is repeated, it will be omitted.)
(73) Read bit0 of the register of PE [240] and store it in bit0 of the data buffer 22.
(74) Read bit0 of the register of PE [244] and store it in bit1 of the data buffer 22.
(75) Read bit0 of the register of PE [248] and store it in bit2 of the data buffer 22.
(76) Read bit0 of the register of PE [252] and store it in bit3 of the data buffer 22.
(77) Write the data in the data buffer 22 to the register of PE [12].
[0055]
The data to be stored in the last data {register of PE [12]} is 4-bit data. In the above operation, the arrangement of data in the registers after processing is different from that shown in FIG. For example, the bit 0 data of the register of PE [0] is eventually stored in “bit 0” (in FIG. 5, it is stored in bit 2).
[0056]
<< Fourth Embodiment >>
When the number of pixels (one line, that is, in the main scanning direction) of the target image for image processing is larger than the number of PEs of the SIMD type microprocessor 2, the processing is performed by dividing the number of PEs. The pixel data to be divided is stored, for example, using a plurality of registers (rows) as shown in FIG. 7 (here, the target pixel is 1024 and the number of PEs is 256).
[0057]
As described above, in the SIMD type microprocessor 2 according to the present invention, in the operation unit of one PE3, up to three registers on the left side of the PE3 and up to three on the right side of the PE3. It is set so that the registers provided in PE3 can be accessed. For example, when performing a predetermined filtering process on image data, data on several pixels on the left and right (in the main scanning direction) from a certain pixel may be required. The above setting is for preparing for such processing.
[0058]
However, when dividing pixel data, pixel data to be accessed at and near the division boundary can be obtained even if processing that requires access to the left and right pixel data as described above is performed. The problem of not being able to occur may occur. This will be specifically described.
[0059]
A case is assumed where filter processing is performed using three right pixels and three left pixels. At this time, it is assumed that the pixel data is stored in the register 34 as shown in FIG. The PE [255] that stores the “pixel 255” in the R0 register can access the “pixel 254”, the “pixel 253”, and the “pixel 252” that are the three pixels on the right side without any problem. However, since “pixel 256”, “pixel 257”, and “pixel 258”, which are the left three pixels, are stored in the R1 registers of PE [0], PE [1], and PE [2], PE [255 ] Cannot be accessed immediately.
[0060]
As a countermeasure for the above-described problem, pixel data is overlapped in the PE near the end, which is the boundary of division, for example, PE near PE [0] or PE near 255 [PE]. Is stored.
[0061]
In FIG. 8, pixel data is stored with an overlap of 4 pixels (data) in the vicinity of both ends. That is, the pixels 248 to 251 stored in the R0 registers of PE [252] to PE [255] are used as “reference pixels” from the PEs up to the pixel 247 (PE [247]), and PE [0]. The pixels 244 to 247 stored in the R1 registers of .about.PE [3] are used as “reference pixels” from the PEs after the pixel 248 (PE [248]). These “overlapping parts” are finally deleted and output as unnecessary data after the image processing is completed. Further, “dummy” on the drawing is unnecessary data placed at both ends of the image data for 1024 pixels, and is finally deleted and output. The size of such an “overlapping portion” is determined by how much the number of reference pixels in the left-right direction is necessary in the entire image processing. Usually, it is about 16 pixels.
[0062]
However, as described above, since the pixel data of the “overlapping portion” is stored, the effective number of PEs is reduced. This is because the pixel data of the “overlapping portion” is provided only for reference. Therefore, the number of divisions increases and the number of registers to be stored increases. In FIG. 8, the R4 register is also used for data storage.
[0063]
When the image data is divided as shown in FIG. 8, it is as shown in FIG. 10 after the thinning process. FIG. 10 shows the result of performing the process of thinning out 1/4 to four blocks in the main scanning direction as one block. In the figure, pixels 0-3 are block 0, pixels 4-7 are block 4, pixels 8-11 are block 8,. . . In this way, the name of the block is given.
[0064]
First, in the situation of FIG. 8, the pixel data included in the block, for example, the pixel values of the pixels 0 to 3 are compared with a certain pattern value to “1”, and if they do not match, the block data is set to “0”. Is stored in the register of the PE (in the example, PE [0], PE [4], PE [8],...) Related to the top pixel of the block. As a result, the block data is arranged in multiples of 4 as shown in FIG. Subsequently, when thinned to ¼ as in the first embodiment, they are arranged in the direction of PE [0] as shown in FIG.
[0065]
By the way, when the processing related to the area determination is performed using the block data after the thinning processing as shown in FIG. 10, it is sometimes necessary to refer to the register (data stored in the PE3) in the left and right direction. . For example, in FIG. 10, it is assumed that the reference block data requires up to three left and right blocks (three PEs). When attention is paid to the data of the block 244 stored in the register R0 of the PE [62] in FIG. 10, there is the reference block data in the right direction. However, only the block 248 of PE [63] exists regarding the reference block data in the left direction. Similarly, the block 248 data stored in the register R1 of PE [1] has left-direction reference block data, but the right-direction reference block data has only PE [0] block 244. Therefore, the process cannot be continued in this state.
[0066]
As one of the solutions to the above problem, it can be considered that the overlapped portion of the pixel data before thinning in FIG. However, in this case, the “overlapping portion” needs to be four times as large as that in FIG. 8, and the effective number of PEs is further reduced.
[0067]
The SIMD type microprocessor 2 according to the fourth embodiment of the present invention solves these problems.
[0068]
FIG. 12 is a block diagram of a SIMD type microprocessor 2 according to the fourth embodiment of the present invention. The SIMD microprocessor 2 according to the first embodiment of the present invention shown in FIG. 2 has substantially the same configuration, but in the fourth embodiment, there are five buffers in the data buffer 22. (Buf0, buf1, buf2, buf3, buf4).
[0069]
In the above configuration, the 1/4 thinning-out operation in the SIMD type microprocessor 2 having 256 processor elements 3 is as follows.
[0070]
First, before thinning processing, block data is arranged in advance as shown in FIG. Necessary block data is stored in a PE (register) whose PE number is “a multiple of 4”, as in FIG. 9. Furthermore, in the PE (register) whose PE number is “multiple of 4−1”, block data handled in the previous division of each piece of divided image data formed by dividing the image data is the PE number. It is shifted and stored in the right direction. Similarly, in the PE (register) whose PE number is “multiple of 4 + 1”, block data handled in the next division of each piece of divided image data formed by dividing the image data is the PE number. It is shifted to the left and stored.
[0071]
In FIG. 11, for example, attention is focused on the R1 register. In the PE whose PE number is a multiple of 4, block data obtained by processing the data stored in the R1 register (division 1) is stored. That is, as described above, assuming that four pixels in the main scanning direction are one block, a predetermined operation is performed on the pixel data included in each block, and the result value is the R1 register of the PE related to the first pixel of the block. Is stored.
[0072]
Similarly, block data obtained by processing data stored in the R0 register (division 0) is stored in the PE whose PE number is “multiple of 4−1”. That is, in “division 0”, four pixels in the main scanning direction are set as one block, and a predetermined calculation is performed on pixel data included in each block, and the result value is stored in the R1 register of the PE of “multiple of 4−1” ( It is stored by shifting one PE to the right). Further, the PE whose PE number is “multiple of 4 + 1” stores block data obtained by processing the data stored in the R2 register (division 2). In other words, in “division 2”, four pixels in the main scanning direction are set as one block, and a predetermined calculation is performed on pixel data included in each block, and the result value is stored in the PE R1 register of “multiple of 4 + 1” (PE It is stored by shifting it to the left by one).
[0073]
The thinning-out device 10 performs the following operation on the block data arranged as shown in FIG.
[0074]
(1) The register data of PE [235] is read and stored in buf0 of the data buffer 22.
(2) Write the data of buf0 of the data buffer 22 to the register of PE [0].
(3) The data in the register of PE [239] is read and stored in buf0 of the data buffer 22.
(4) Write the data of buf0 of the data buffer 22 to the register of PE [1].
(5) Read the register data of PE [243] and store it in buf0 of the data buffer 22.
(6) Write buf0 data of the data buffer 22 to the register of PE [2].
(7) The register data of PE [247] is read and stored in buf0 of the data buffer 22.
(8) Write the data of buf0 of the data buffer 22 to the register of PE [3].
(9) The register data of PE [5] is read and stored in buf1 of the data buffer 22.
(10) The data in the register of PE [9] is read and stored in buf2 of the data buffer 22.
(11) Read the data in the register of PE [13] and store it in buf3 of the data buffer 22.
(12) The register data of PE [17] is read and stored in buf4 of the data buffer 22.
(13) The data in the register of PE [4] is read and stored in buf0 of the data buffer 22.
(14) The buf0 data of the data buffer 22 is written to the register of PE [4].
(15) The data in the register of PE [8] is read and stored in buf0 of the data buffer 22.
(16) Write the buf0 data of the data buffer 22 to the register of PE [5].
(17) The data in the register of PE [12] is read and stored in buf0 of the data buffer 22.
(18) Write the buf0 data of the data buffer 22 to the register of PE [6].
(19) The data in the register of PE [16] is read and stored in buf0 of the data buffer 22.
(20) Write the buf0 data of the data buffer 22 to the register of PE [7].
・ ・ ・ ・ (Since the same operation is repeated, it will be omitted.)
(131) The register data of PE [240] is read and stored in buf0 of the data buffer 22.
(132) The buf0 data of the data buffer 22 is written to the register of PE [63].
(133) The data in the register of PE [244] is read and stored in buf0 of the data buffer 22.
(134) The buf0 data of the data buffer 22 is written to the register of PE [64].
(135) The data in the register of PE [248] is read and stored in buf0 of the data buffer 22.
(136) The data of buf0 of the data buffer 22 is written to the register of PE [65].
(137) Write the data of buf1 of the data buffer 22 to the register of PE [66].
(138) The buf2 data of the data buffer 22 is written into the register of PE [67].
(139) The data of buf3 of the data buffer 22 is written to the register of PE [68].
(140) The buf4 data of the data buffer 22 is written into the register of PE [69].
[0075]
With the above operation, the block data after the thinning is arranged as shown in FIG. Unlike FIG. 10, the data of the block 244 stored in the R0 register of PE [65] has the reference block data in both the left and right directions, and is similarly stored in the R1 register of PE [4]. In the data of the block 248, the reference block data exists in both the left and right directions.
[0076]
In the third embodiment, the number of data buffers 22 is five. This is to prevent the data in the registers of PE [5], PE [9], PE [13], and PE [17] from being overwritten by data that has been reduced to 1/4 after decimation and disappearing. . This (that is, prevention of disappearance) can be realized also in the configuration of the first embodiment shown in FIG. That is, the data of the registers of PE [5], PE [9], PE [13], and PE [17] are temporarily stored in PE registers that are not used for other purposes in the above processing, for example, PE [235], PE [239]. ], PE [243], and PE [247] are saved in the registers, and can be realized only by changing the sequence of reading from them when writing to PE [66] to PE [69].
[0077]
Even in the thinning-out process by the bit pack shown in the third embodiment, when the image data is divided by the number of PEs, in order to avoid the problem that the reference data at the division boundary is missing, Processing similar to that of the fourth embodiment may be required.
[0078]
<< Fifth Embodiment >>
After the area determination process using the block data is performed, the image processing content is determined for each pixel based on the determination result. Therefore, the area determination result obtained from the data thinned out to ¼ (etc.) must be expanded four times (etc.) and returned to the original pixel position. If the SIMD type microprocessor 2 of the first embodiment thins it out to ¼, if it is enlarged by the SIMD type microprocessor 2 of the second embodiment, the determination result data is returned to the corresponding original pixel position. You can go back up. However, since the bit pack is formed in the third embodiment, it is necessary to use another embodiment to restore the original (that is, restore the bit pack or unpack the bit pack).
[0079]
FIG. 14 is a block diagram of a SIMD type microprocessor 2 according to the fifth embodiment of the present invention.
[0080]
A barrel shifter 26 ′ is added to read from the data buffer 22 with respect to the SIMD type microprocessor 2 of the second embodiment shown in FIG. 3, and data at an arbitrary bit position in the data buffer 22 is stored in the register. It is configured to be able to write to 34 arbitrary bits.
[0081]
In the above configuration, the operation of “4 times expansion” and “5 × 1 bit unpacking” in the SIMD type microprocessor 2 having 256 processor elements 3 is as follows. Here, “bit 0 of the data buffer” indicates the least significant bit of the predetermined data buffer 22. Similarly, “bit 1”, “bit 2”, “bit 3”, and “bit 4” indicate the higher-order bits one by one as viewed from bit 0.
[0082]
(1) The data in the register of PE [12] is read and stored in the data buffer 22.
(2) Write bit3 data of the data buffer 22 to the register of PE [252].
(3) Write the bit2 data of the data buffer 22 to the register of PE [248].
(4) Write bit1 data of the data buffer 22 to the register of PE [244].
(5) Write the data of bit 0 of the data buffer 22 to the register of PE [240].
(6) The data in the register of PE [11] is read and stored in the data buffer 22.
(7) Write the data of bit 4 of the data buffer 22 to the register of PE [236].
(8) Write bit3 data of the data buffer 22 to the register of PE [232].
(9) Write the bit2 data of the data buffer 22 to the register of PE [228].
(10) Write the data of bit1 of the data buffer 22 to the register of PE [224].
(11) Write the data of bit 0 of the data buffer 22 to the register of PE [220].
・ ・ ・ ・ (Since the same operation is repeated, it will be omitted.)
(72) The register data of PE [0] is read and stored in the data buffer 22.
(73) The bit4 data of the data buffer 22 is written to the register of PE [16].
(74) The bit3 data of the data buffer 22 is written to the register of PE [12].
(75) Write the bit2 data of the data buffer 22 to the register of PE [8].
(76) Write the bit1 data of the data buffer 22 to the register of PE [4].
(77) The data of bit 0 of the data buffer 22 is written to the register of PE [0].
[0083]
Note that the last write operation to {[77)} PE [0] can be omitted because there is no conversion of data.
[0084]
<< Sixth Embodiment >>
After the area determination process using the block data is performed, the image processing content is determined for each pixel based on the determination result. Therefore, the area determination result obtained from the data thinned out to ¼ (etc.) must be expanded four times (etc.) and returned to the original pixel position. If the SIMD type microprocessor 2 of the first embodiment thins it out to ¼, if it is enlarged by the SIMD type microprocessor 2 of the second embodiment, the determination result data is returned to the corresponding original pixel position. You can go back up.
[0085]
As described in the description of the fifth embodiment, when the area determination result data is expanded four times (etc.) using the SIMD type microprocessor 2 of the second embodiment, the PE number is 4. Valid region determination result data is arranged in PE that is a multiple of. FIG. 15 shows such a state.
[0086]
In the PE with a PE number other than a multiple of 4 in the process after expansion, the area determination result data stored in the register of the PE with the PE number less than that PE number and the nearest multiple of 4 is used. It will be. That is, PE [0] to PE [3] are area determination result data on the register of PE [0], PE [4] to PE [7] are area determination result data on the register of PE [4], and PE [4] 8] to PE [11] use the area determination result data on the register of PE [8],. In other words, a PE whose PE number is “multiple of 4” is data on its own register, a PE whose PE number is “multiple of 4 + 1” is data on the register of the right PE, and its PE number is “4”. The PE of “multiple +2” refers to the data on the register of the right two PEs, and the PE of PE number “multiple of 4 + 3” refers to the data on the registers of the right three PEs.
[0087]
As described above, the processing is different for each PE. Therefore, the feature of the SIMD type microprocessor that executes the same processing (parallel processing) on all PEs cannot be used well.
[0088]
The SIMD type microprocessor 2 shown in the block diagram of FIG. 3 is according to the sixth embodiment of the present invention as well as according to the second embodiment of the present invention. However, in the sixth embodiment, the processing sequence is different from that in the second embodiment.
[0089]
In the above configuration, the 4 times enlargement operation in the SIMD type microprocessor 2 having 256 processor elements 3 is as follows.
[0090]
(1) The data in the register of PE [63] (address 63) is read and stored in the data buffer 22.
(2) Write the data in the data buffer 22 to the register of PE [255] (address 255).
(3) Write the data in the data buffer 22 to the register of PE [254] (address 254).
(4) Write the data in the data buffer 22 to the register of PE [253] (address 253).
(5) Write the data in the data buffer 22 to the register of PE [252] (address 252).
(6) The data in the register of PE [62] (address 62) is read and stored in the data buffer 22.
(7) Write the data in the data buffer 22 to the register of PE [251] (address 251).
(8) Write the data in the data buffer 22 to the register of PE [250] (address 250).
(9) Write the data in the data buffer 22 to the register of PE [249] (address 249).
(10) Write the data in the data buffer 22 to the register of PE [248] (address 248).
(11) The data in the register of PE [61] (address 61) is read and stored in the data buffer 22.
(12) Write the data in the data buffer 22 to the register of PE [247] (address 247).
(13) Write the data in the data buffer 22 to the register of PE [246] (address 246).
(14) Write the data in the data buffer 22 to the register of PE [245] (address 245).
(15) Write the data in the data buffer 22 to the register of PE [244] (address 244).
・ ・ ・ ・ (Since the same operation is repeated, it will be omitted.)
(311) The register data of PE [1] (address 1) is read and stored in the data buffer 22.
(312) The data in the data buffer 22 is written to the register of PE [7] (address 7).
(313) Write the data in the data buffer 22 to the register of PE [6] (address 6).
(314) Write the data in the data buffer 22 to the register of PE [5] (address 5).
(315) Write the data in the data buffer 22 to the register of PE [4] (address 4).
(316) The data in the register of PE [0] (address 0) is read and stored in the data buffer 22.
(317) Write the data in the data buffer 22 to the register of PE [3] (address 3).
(318) Write the data in the data buffer 22 to the register of PE [2] (address 2).
(319) Write the data in the data buffer 22 to the register of PE [1] (address 1).
(320) Write the data in the data buffer 22 to the register of PE [0] (address 0).
[0091]
Note that the last write operation to {[320)} PE [0] can be omitted because there is no conversion of data.
[0092]
The data after enlargement by the above operation is as shown in FIG. Therefore, in all PEs, data stored in a register provided in the PE itself may be referred to as a region determination result.
[0093]
<< Seventh Embodiment >>
In the configuration of the first embodiment described above, the unit of “decimation” is about a power of 2 (2, 4, 8, 16,...). Therefore, it is an effective configuration in processing such as blocking. However, in the process of reducing the image data, the “thinning” interval is not constant. That is, it is desirable to provide a means by which the “thinning” interval can be arbitrarily designated.
[0094]
FIG. 17 is a block diagram of the SIMD type microprocessor 2 according to the seventh embodiment of the present invention. Although the configuration is basically the same as that of the first embodiment of FIG. 2, the sequencer 24 is provided with a RAM 30 for designating a thinning interval. The capacity of the RAM 30 is such that at least one bit of data per unit can be provided up to the number of main scanning pixels of the image data to be reduced.
[0095]
In the above configuration, the reduction operation is performed as follows.
[0096]
(1) The read pointer and write pointer of the address generation circuit 20 are set to “0”. At the same time, the address pointer of the RAM 30 is set to “0”.
(2) Read the register data of the PE whose address is the value of the read pointer and store it in the data buffer 22. At the same time, data in the RAM 30 is read from the address specified by the address pointer of the RAM 30, and the read pointer and the RAM address pointer are incremented by “1”.
(3) If the read data in the RAM 30 is “1”, the data in the data buffer 22 is written to the PE register whose address is the write pointer, and the write pointer is incremented by “1”.
(4) The above operations (2) and (3) are repeated until the read pointer exceeds the maximum number of PEs.
[0097]
Through the above operation, pixels corresponding to locations (addresses) where “1” is not stored in the RAM 30 (that is, locations (address) where “0” is stored) are thinned, and “1” is stored in the RAM 30. Pixels corresponding to the stored locations (addresses) are packed in the PE [0] direction, and data is arranged in the register.
[0098]
Even when the number of pixels of the image data to be reduced is larger than the number of PEs and the image data is to be divided and processed, the RAM address pointer of (1) above is cleared by the reduction processing of the second and subsequent divided image data. The processing can be continued without performing the above. In the reduction processing of the second and subsequent divided image data, the following processing is performed.
[0099]
(1) The read pointer and write pointer of the address generation circuit 20 are set to “0”.
(2) Read the register data of the PE whose address is the value of the read pointer and store it in the data buffer 22. At the same time, data in the RAM 30 is read from the address specified by the address pointer of the RAM 30, and the read pointer and the RAM address pointer are incremented by “1”.
(3) If the read data in the RAM 30 is “1”, the data in the data buffer 22 is written to the PE register whose address is the write pointer, and the write pointer is incremented by “1”.
(4) The above operations (2) and (3) are repeated until the read pointer exceeds the maximum number of PEs.
[0100]
In the above operation, there is a problem that when the image data is divided, the reduced image data is thinned out (packed) and arranged on the lower PE side in divided units (upper order). PE will be lined with “dummy” data). Further, the reduced image data has a problem that the reference pixel data as described in the above “fourth embodiment” is not arranged. Therefore, as shown in FIG. 18, the read side register 6 ′ (image before reduction) and the write side register (image after reduction) 6 ″ are connected separately. In the form of FIG. 18, image data is only in the read side register. Is further divided and stored, and the reduction operation is continued by advancing only the read pointer to the second and subsequent image data, whereby the next PE after the final end of the reduced image data of the divided image. In this case, even if the read pointer is advanced to the second and subsequent image data, the write pointer is not cleared.
[0101]
<< Eighth Embodiment >>
In the configuration of the second embodiment described above, the unit of “enlargement” is about 2 to the power (2, 4, 8, 16,...). Therefore, this is an effective configuration in enlargement processing for reflecting the block area determination data to the current image data. However, the interval of “enlargement” is not constant in processing such as enlargement of image data. That is, it is desirable to provide a means by which the “enlargement” interval can be arbitrarily designated.
[0102]
FIG. 19 is a block diagram of the SIMD type microprocessor 2 according to the eighth embodiment of the present invention. Although the configuration is basically the same as that of the second embodiment in FIG. 3, the sequencer 24 is provided with a RAM 30 for designating an expansion interval. The capacity of the RAM 30 is such that at least one bit of data per unit can be provided up to the number of main scanning pixels of the enlarged image data.
[0103]
In the above configuration, the enlargement operation is performed as follows.
[0104]
(1) The read pointer of the address generation circuit 20 is set to the main scanning pixel value of the image data before enlargement, and the write pointer is set to the main scanning pixel value of the image data after enlargement. At the same time, the address pointer of the RAM 30 is set to the main scanning pixel value of the enlarged image data.
(2) Read the register data of the PE whose address is the value of the read pointer and store it in the data buffer 22. At the same time, data in the RAM 30 is read from the address specified by the address pointer of the RAM 30, and the address pointer of the RAM 30 is decremented by “1”. When the read data in the RAM 30 is “1”, the read pointer is decremented by “1”.
(3) Write the data in the data buffer 22 to the PE register whose address is the write pointer. The write pointer is decremented by “1”.
(4) The above operations (2) and (3) are repeated until the write pointer becomes zero.
[0105]
As a result of the above operation, the pixel corresponding to the location (address) where “1” is not stored in the RAM 30 (that is, the location (address) where “0” is stored) is set to ( Before enlargement) pixel data is written, and the pixel data corresponding to the location (address) where “0” is stored in the RAM 30 is written (before enlargement) at the address indicated by the read pointer. In this way, an enlargement operation can be realized.
[0106]
In the above operation, when the image data is divided, there may be a problem that the enlarged image data overwrites the image data before enlargement before they are read out. Therefore, as shown in FIG. 20, the read-side register 6 ′ (pre-enlarged image data) and the write-side register 6 ″ (enlarged image data) are connected separately. By transferring to the divided image data storage register after enlargement, the above-described problem of overwriting can be avoided.
[0107]
(1) The read pointer of the address generation circuit 20 is set to the main scanning pixel value of the image data before enlargement. The write pointer is set to the remainder obtained by dividing the main scanning pixel value of the enlarged image data by the number of PEs. Further, the address pointer of the RAM 30 is set to the main scanning pixel value of the enlarged image data.
(2) Read the register data of the PE whose address is the value of the read pointer and store it in the data buffer 22. At the same time, data in the RAM 30 is read from the address specified by the address pointer of the RAM 30, and the address pointer of the RAM 30 is decremented by “1”. When the read data in the RAM 30 is “1”, the read pointer is decremented by “1”.
(3) Write the data in the data buffer 22 to the PE register whose address is the write pointer. The write pointer is decremented by “1”.
(4) The above operations (2) and (3) are repeated until the write pointer becomes zero.
(5) The data in the post-enlargement register is transferred to the “first division” of the divided image data storage register.
(6) The write pointer is set to the number of PEs (value).
(7) Read the register data of the PE whose address is the value of the read pointer and store it in the data buffer 22. At the same time, data in the RAM 30 is read from the address specified by the address pointer of the RAM 30, and the address pointer of the RAM 30 is decremented by “1”. When the read data in the RAM 30 is “1”, the read pointer is decremented by “1”.
(8) Write the data in the data buffer 22 to the PE register whose address is the write pointer. The write pointer is decremented by “1”.
(9) The above operations (7) and (8) are repeated until the write pointer becomes zero.
(10) Transfer the data in the post-enlargement register to the “next division” of the divided image data storage register.
(11) Repeat (6) to (10) above until the read pointer becomes zero.
[0108]
If the pre-enlargement image data is divided, the contents of the pre-enlargement register can be changed during processing, and the control of each pointer can be changed as appropriate.
[0109]
<< Other embodiments >>
Since the thinning-out devices in the above embodiments are mainly different in the sequence in the sequencer 24, it is naturally possible to easily realize a configuration that combines several embodiments. The same applies to the expander in the above embodiment. Furthermore, for example, it is also possible to configure one device that has all the functions of the first to sixth embodiments.
[0110]
【The invention's effect】
By using the present invention, the following effects can be obtained.
[0111]
When the SIMD type microprocessor according to the first embodiment is used, thinning-out processing in the main scanning direction can be realized in the pixel data with a simple configuration and low cost.
[0112]
When the SIMD type microprocessor according to the second embodiment is used, the enlargement process in the main scanning direction can be realized in the pixel data with a simple configuration and low cost.
[0113]
When the SIMD type microprocessor according to the third embodiment is used, a wider range of reference pixel data can be handled in a single process.
[0114]
When the SIMD type microprocessor according to the fourth embodiment is used, thinning-out processing is performed for image data having a number of pixels exceeding the number of PEs while considering (neighboring) reference data necessary for filter processing or the like. Can be performed.
[0115]
When the SIMD type microprocessor according to the fifth embodiment is used, it is possible to enlarge the bit-packed data.
[0116]
When the SIMD type microprocessor according to the sixth embodiment is used, SIMD arithmetic processing can be performed with few steps after enlargement processing and blocking processing.
[0117]
When the SIMD type microprocessor according to the seventh embodiment is used, image reduction processing can be realized.
[0118]
When the SIMD type microprocessor according to the eighth embodiment is used, image enlargement processing can be realized.
[Brief description of the drawings]
FIG. 1 is a block diagram (1) showing a schematic configuration of a SIMD type microprocessor according to the present invention;
FIG. 2 is a block diagram of a SIMD type microprocessor according to the first embodiment.
FIG. 3 is a block diagram of a SIMD type microprocessor according to a second embodiment.
FIG. 4 is a block diagram illustrating a relationship between a calculation unit and a register.
FIG. 5 is a block diagram illustrating a relationship between a calculation unit and a register in which bit pack data is stored.
FIG. 6 is a block diagram of a SIMD type microprocessor according to a third embodiment.
FIG. 7 is a schematic diagram showing a situation in which pixel data is stored in a register when the number of pixels is larger than the number of PEs of a SIMD type microprocessor.
FIG. 8 is a schematic diagram showing a situation in which pixel data is stored in a register while forming an overlapping portion when the number of pixels is larger than the number of PEs of a SIMD type microprocessor.
FIG. 9 is a schematic diagram illustrating a state in which block data before thinning is stored in a register.
FIG. 10 is a schematic diagram showing a situation in which block data after thinning is stored in a register.
FIG. 11 is a schematic diagram showing a storage state of block data used in the SIMD type microprocessor according to the fourth embodiment.
FIG. 12 is a block diagram of a SIMD type microprocessor according to a fourth embodiment.
FIG. 13 is a schematic diagram illustrating a preferable situation of storing block data after thinning into a register, which is formed by a SIMD type microprocessor according to the fourth embodiment;
FIG. 14 is a block diagram of a SIMD type microprocessor according to a fifth embodiment.
FIG. 15 is a schematic diagram showing a storage state of block data used in the SIMD type microprocessor according to the sixth embodiment.
FIG. 16 is a schematic diagram showing a storage state of block data formed by the SIMD type microprocessor according to the sixth embodiment.
FIG. 17 is a block diagram (1) of a SIMD type microprocessor according to a seventh embodiment;
FIG. 18 is a block diagram (2) of a SIMD type microprocessor according to a seventh embodiment;
FIG. 19 is a block diagram (1) of a SIMD type microprocessor according to an eighth embodiment;
FIG. 20 is a block diagram (2) of a SIMD type microprocessor according to an eighth embodiment;
FIG. 21 is a block diagram (2) showing a schematic configuration of a SIMD type microprocessor according to the present invention;
FIG. 22 is a conceptual diagram of blocking processing.
[Explanation of symbols]
2 ... SIMD type microprocessor,
3 ... Processor element (PE),
4 ... Global processor (GP),
6, 6 ', 6 "... register file,
8: Arithmetic array,
10: Thinning-out device,
12 ... Magnifier,
14, 14 ', 14 "... external interface,
20, 20 ', 20 "... Address generation circuit,
22: Data buffer,
24 ... Sequencer,
26, 26 '... barrel shifter,
30 ... RAM (Random Access Memory),
34: Register.

Claims (8)

複数のプロセッサエレメントを含むSIMD型マイクロプロセッサが有する
プロセッサエレメントが内蔵している汎用レジスタに上記マイクロプロセッサ外部からアクセスするための、データ転送用ポートに接続されているデータ間引き装置であり、
内部に含まれるシーケンサにより制御され、
上記SIMD型マイクロプロセッサに含まれるグローバルプロセッサより行われる動作開始の指示設定に応じて自動的に動作することで上記SIMD型マイクロプロセッサのSIMD演算処理と並列して処理を実施し、
前記プロセッサエレメントが内蔵している汎用レジスタに格納されるデータの中から任意のデータを複数選択して読み出し、その後それら複数のデータを汎用レジスタに書き戻し、
書き戻しによりそれら複数のデータが格納されるプロセッサエレメントの間隔が、読み出し時にそれら複数のデータが格納されていたプロセッサエレメントの間隔よりも、小さいことを特徴とする、
データ間引き装置。
A SIMD type microprocessor including a plurality of processor elements has ,
A data thinning device connected to a data transfer port for accessing a general-purpose register incorporated in a processor element from the outside of the microprocessor.
Controlled by the sequencer included inside,
The processing is performed in parallel with the SIMD arithmetic processing of the SIMD type microprocessor by automatically operating according to the instruction setting for starting the operation performed by the global processor included in the SIMD type microprocessor.
The reading arbitrary data from among the data stored in the general-purpose register processor elements incorporates a plurality selected, then written back plurality of data to the general-purpose register,
The interval between the processor elements in which the plurality of data is stored by writing back is smaller than the interval between the processor elements in which the plurality of data is stored at the time of reading.
Data thinning device.
複数のプロセッサエレメントを含むSIMD型マイクロプロセッサが有する
プロセッサエレメントが内蔵している汎用レジスタに上記マイクロプロセッサ外部からアクセスするための、データ転送用ポートに接続されているデータ拡大装置であり、
内部に含まれるシーケンサにより制御され、
上記SIMD型マイクロプロセッサに含まれるグローバルプロセッサより行われる動作開始の指示設定に応じて自動的に動作することで上記SIMD型マイクロプロセッサのSIMD演算処理と並列して処理を実施し
前記プロセッサエレメントが内蔵している汎用レジスタに格納されるデータの中から任意のデータを複数選択して読み出し、その後それら複数のデータを汎用レジスタに書き戻し、
書き戻しによりそれら複数のデータが格納されるプロセッサエレメントの間隔が、読み出し時にそれら複数のデータが格納されていたプロセッサエレメントの間隔よりも、大きいことを特徴とする、
データ拡大装置。
A SIMD type microprocessor including a plurality of processor elements has ,
A data expansion device connected to a data transfer port for accessing a general-purpose register incorporated in a processor element from outside the microprocessor,
Controlled by the sequencer included inside,
The processing is performed in parallel with the SIMD arithmetic processing of the SIMD microprocessor by automatically operating according to the operation start instruction setting performed by the global processor included in the SIMD microprocessor ,
The reading arbitrary data from among the data stored in the general-purpose register processor elements incorporates a plurality selected, then written back plurality of data to the general-purpose register,
The interval between the processor elements in which the plurality of data is stored by writing back is larger than the interval between the processor elements in which the plurality of data is stored at the time of reading.
Data expansion device.
読み出されたデータにおいて、所定の位置の1ビットに格納されるデータ、若しくは所定の位置の複数ビットに格納されるデータを、選択し、
汎用レジスタに書き戻す際には、1つの汎用レジスタ上に、複数組の、上記データを格納させる、
請求項1に記載の、データ間引き装置。
In the read data, select data stored in one bit at a predetermined position, or data stored in a plurality of bits at a predetermined position,
When writing back to the general-purpose register, a plurality of sets of the above data are stored on one general-purpose register.
The data thinning-out device according to claim 1.
選択される任意のデータ以外のデータであって、プロセッサエレメント全体により構成される列の第1の端部近傍に位置するプロセッサエレメントが内蔵する汎用レジスタに格納される所定のデータを、読み出し、
それらデータを、プロセッサエレメント全体により構成される列の第2の端部近傍に位置するプロセッサエレメントが内蔵している汎用レジスタに、書き戻し、
同時に、
選択される任意のデータ以外のデータであって、プロセッサエレメント全体により構成される列の、第2の端部近傍に位置するプロセッサエレメントが内蔵する汎用レジスタに格納される所定のデータを、読み出し、
それらデータを、プロセッサエレメント全体により構成される列の第1の端部近傍に位置するプロセッサエレメントが内蔵している汎用レジスタに、書き戻す、
請求項1に記載の、データ間引き装置。
Read predetermined data stored in a general-purpose register built in the processor element located near the first end of the column constituted by the entire processor element, which is data other than the arbitrary data to be selected,
The data is written back to a general-purpose register built in the processor element located near the second end of the column constituted by the entire processor element,
at the same time,
Read predetermined data stored in a general-purpose register built in the processor element located near the second end of the column constituted by the entire processor element, other than the arbitrary data to be selected,
The data is written back to a general-purpose register built in the processor element located near the first end of the column constituted by the entire processor element.
The data thinning-out device according to claim 1.
読み出されたデータを、1ビットのデータ若しくは複数ビットのデータに、分割し、
上記分割により形成される複数組の上記データを、別のプロセッサエレメントに内蔵される汎用レジスタに書き戻す、
請求項2に記載の、データ拡大装置。
Divide the read data into 1-bit data or multi-bit data,
The plurality of sets of data formed by the division are written back to a general-purpose register built in another processor element.
The data expansion device according to claim 2.
書き戻しによりデータが格納される第1のプロセッサエレメントと、書き戻しによりデータが格納される第2のプロセッサエレメントとにおいて、
上記第1のプロセッサエレメントと上記第2のプロセッサエレメントとの間に、1つの又は複数の連続する第3のプロセッサエレメントが存在し、それら第3のプロセッサエレメントには、データ書き戻しは行なわれないとき、
第1のプロセッサエレメントに書き戻されるデータ、又は第2のプロセッサエレメントに書き戻されるデータが、
第3のプロセッサエレメントに内蔵される汎用レジスタに、複写して書かれる、
請求項2に記載の、データ拡大装置。
In a first processor element in which data is stored by writing back and a second processor element in which data is stored by writing back,
One or a plurality of consecutive third processor elements exist between the first processor element and the second processor element, and no data is written back to these third processor elements. When
Data written back to the first processor element or data written back to the second processor element is
It is copied and written in a general-purpose register built in the third processor element.
The data expansion device according to claim 2.
縮小対象のデータを構成する最小構成単位が縮小対象のデータにいくつ含まれるかを示す個数分と等しい、ビット数までを、少なくともビット容量として備えるメモリ部を含み、
縮小対象のデータを構成する個々の最小構成単位にて間引き対象であるものと、上記メモリ部のビット位置とを対応させ、対応するビット位置に所定のデータを格納し、
その格納された所定のデータに基づいて、
プロセッサエレメントが内蔵している汎用レジスタに格納されるデータからの上記読み出し処理と、その後の汎用レジスタへの上記書き戻し処理とを行う
請求項1に記載の、データ間引き装置。
Including a memory unit having at least a bit capacity up to the number of bits, which is equal to the number indicating the number of minimum structural units constituting the data to be reduced included in the data to be reduced,
Corresponding the data to be thinned out in each minimum constituent unit constituting the data to be reduced with the bit position of the memory unit, storing predetermined data in the corresponding bit position,
Based on the stored predetermined data,
The data thinning-out apparatus according to claim 1, wherein the reading process from the data stored in the general-purpose register built in the processor element and the subsequent write-back process to the general-purpose register are performed.
拡大処理後のデータを構成する最小構成単位が拡大処理後のデータにいくつ含まれるかを示す個数分と等しい、ビット数までを、少なくともビット容量として備えるメモリ部を含み、
拡大処理後のデータを構成する個々の最小構成単位にて拡大制御対象であるものと、上記メモリ部のビット位置とを対応させ、対応するビット位置に所定のデータを格納し、
その格納された所定のデータに基づいて、
プロセッサエレメントが内蔵している汎用レジスタに格納されるデータからの上記読み出し処理と、その後の汎用レジスタへの上記書き戻し処理とを行う
請求項2に記載の、データ拡大装置。
Including a memory unit having at least a bit capacity up to the number of bits, which is equal to the number indicating the number of minimum structural units constituting the data after the enlargement process included in the data after the enlargement process,
Corresponding the enlargement control target in each minimum constituent unit constituting the data after the enlargement processing and the bit position of the memory unit, storing predetermined data in the corresponding bit position,
Based on the stored predetermined data,
The data expansion device according to claim 2, wherein the reading process from the data stored in the general-purpose register incorporated in the processor element and the subsequent write-back process to the general-purpose register are performed.
JP2001103319A 2001-04-02 2001-04-02 Thinning device and enlargement device in SIMD type microprocessor Expired - Fee Related JP4372371B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001103319A JP4372371B2 (en) 2001-04-02 2001-04-02 Thinning device and enlargement device in SIMD type microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001103319A JP4372371B2 (en) 2001-04-02 2001-04-02 Thinning device and enlargement device in SIMD type microprocessor

Publications (2)

Publication Number Publication Date
JP2002298135A JP2002298135A (en) 2002-10-11
JP4372371B2 true JP4372371B2 (en) 2009-11-25

Family

ID=18956395

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001103319A Expired - Fee Related JP4372371B2 (en) 2001-04-02 2001-04-02 Thinning device and enlargement device in SIMD type microprocessor

Country Status (1)

Country Link
JP (1) JP4372371B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4641151B2 (en) * 2004-01-19 2011-03-02 株式会社リコー SIMD type processor and image processing processor
JP4537420B2 (en) * 2007-04-02 2010-09-01 株式会社リコー SIMD type microprocessor

Also Published As

Publication number Publication date
JP2002298135A (en) 2002-10-11

Similar Documents

Publication Publication Date Title
JP5575310B2 (en) Tile-based interleaving and deinterleaving for digital signal processing
JP2009223758A (en) Image processing apparatus
JP4372371B2 (en) Thinning device and enlargement device in SIMD type microprocessor
JP4537420B2 (en) SIMD type microprocessor
JP4844406B2 (en) Data processing apparatus, image processing apparatus, and data processing program
JP4786484B2 (en) Data supply method for arithmetic processing and image processing apparatus
JPH04295953A (en) Parallel data processor with built-in two-dimensional array of element processor and sub-array unit of element processor
JP4432786B2 (en) Camera device and image processing method
US10284743B2 (en) Image processing apparatus and method for controlling the same
JP2007073010A (en) Simd processor and image processing method using the simd method processor and image processor
JP3821198B2 (en) Signal processing device
JP4408113B2 (en) Signal processing method
JP3971719B2 (en) SIMD type microprocessor
JP5738639B2 (en) Data processing apparatus and data processing method
KR20200069477A (en) Hardware accelerator for neural network including a single port memory and operation method thereof
JP4381778B2 (en) Texture processing device
JP3596644B2 (en) Image processing apparatus and processing method thereof
JP3553376B2 (en) Parallel image processor
JP4516495B2 (en) Data processing method in SIMD type microprocessor
US10169040B2 (en) System and method for sample rate conversion
JP5658612B2 (en) Image processing apparatus, image processing system, and image processing method
JP2003216950A (en) Simd type microprocessor for performing pattern matching or the like
JP3426484B2 (en) Image data processing apparatus and image data processing method
JP2770516B2 (en) Drawing method
JP2008226190A (en) Image processor and method for it

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090119

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090203

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090403

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090519

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090721

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: 20090825

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20090902

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

Free format text: PAYMENT UNTIL: 20120911

Year of fee payment: 3

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: 20130911

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees