JP3804591B2 - Arithmetic processing unit - Google Patents

Arithmetic processing unit Download PDF

Info

Publication number
JP3804591B2
JP3804591B2 JP2002206940A JP2002206940A JP3804591B2 JP 3804591 B2 JP3804591 B2 JP 3804591B2 JP 2002206940 A JP2002206940 A JP 2002206940A JP 2002206940 A JP2002206940 A JP 2002206940A JP 3804591 B2 JP3804591 B2 JP 3804591B2
Authority
JP
Japan
Prior art keywords
arithmetic
processing
arithmetic processing
memory
unit
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
JP2002206940A
Other languages
Japanese (ja)
Other versions
JP2004054335A (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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yaskawa Electric Corp filed Critical Yaskawa Electric Corp
Priority to JP2002206940A priority Critical patent/JP3804591B2/en
Publication of JP2004054335A publication Critical patent/JP2004054335A/en
Application granted granted Critical
Publication of JP3804591B2 publication Critical patent/JP3804591B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Advance Control (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、マイクロプロセッサやディジタルシグナルプロセッサ(DSP)を利用した数値の演算処理を行う演算処理装置に関するものである。
【0002】
【従来の技術】
従来のマイクロプロセッサやディジタルシグナルプロセッサ(DSP)を利用した数値の演算処理を行う演算処理装置は図6に示すようになっている。図6は従来例を示す演算処理装置のブロック図である。
図6において、1は加減乗除、論理演算および数値比較などを行う算術演算ユニット、2は算術演算ユニット1へ入力される値を保持する入力メモリで、AとBの二つで構成される。3は演算結果を保持する出力メモリR、4は算術演算ユニット1にて処理される機能を切りかえるためのオペコード設定メモリである。
ここで、加算処理を行う際を考えてみると、まず、加算を実行するためのオペコードをセットし、入力値としてメモリAに10、メモリBに20の数値をセットした場合、算術演算ユニット1からの出力値としては、(10+20=)30を得ることになる。
この例は、簡単な演算処理であるが、一般的な演算処理を行うシステムでは、複雑な演算が数多く処理されており、算術演算ユニット1にて演算した結果を入力メモリ2にフィードバックし、1つの算術演算ユニットを何度も利用してシステム全体の演算処理を行っている。
また、最近では画像処理のように複雑な演算を行うために、画像処理プロセッサとして算術演算ユニットの中に複数の機能モジュールを配置したものが提案されている(例えば,特表2000−503427号)。
【0003】
【発明が解決しようとする課題】
ところが、従来技術のような算術演算ユニットを利用して演算処理を行う場合、演算の高速化を実現するためには、マイクロプロセッサやDSPの動作周波数を高くして対応することが一般的である。これは、チップの発熱や放射ノイズの原因となり、製品の信頼性を低減させる要因となる。
また、算術演算ユニットを並列に配置することで、高速化を実現する手段もある。特表2000−503427号の画像処理プロセッサでは、並列演算により最終的には1つの演算処理結果を出力することが可能となっているが、複数の演算処理結果を出力できないため並列演算性を生かした処理が実現できていない。
さらに、従来技術のマイクロプロセッサやDSPを、複数のタスクからなるリアルタイム処理システムに使用した場合、1つの算術演算ユニットを複数の異なる処理のために切り替えて演算を行うため、一定時間ごとに演算結果を出力することが困難となっている(演算処理時間は一定ではない)。つまり、現状ではリアルタイム処理専用の演算ユニットは存在していない。
【0004】
本発明は上記課題を解決するためになされたものであり、動作周波数を高くすることなく、低い動作周波数でも演算性能を向上することができる、リアルタイム制御演算処理に最適な演算処理装置を提供することを目的とする。
【0005】
【課題を解決するための手段】
上記問題を解決するため、請求項1記載の本発明は,、複数の入力データを保持するための入力メモリ(2)と、加減乗除、論理演算および数値比較を行うための複数の算術演算ユニット(1)と、前記算術演算ユニットにて実行する機能を決定するための複数のオペコード設定メモリ(4)と、前記算術演算ユニットからの演算結果を保持する出力メモリ(3)とを備えた数値の演算処理を行う演算処理装置において、前記算術演算ユニット(1)にて実行された演算結果を用いてシフト処理する複数のバレルシフタ回路(5)と、該演算結果のシフト量を決定する設定メモリ(9)と、
前記バレルシフタ回路(5)で得られた複数の演算結果を切替えて出力するマルチプレクサ(7)と、前記マルチプレクサからの出力値を選択する演算機能コード設定メモリ(8)と、備えたものである。
請求項1記載の演算処理装置によれば、内蔵する各算術演算ユニットのオペコード設定および、マルチプレクサ出力値を選択する演算機能コードを利用することで、本演算ユニットにて処理できる演算機能を数多く実現でき、一度に複雑な演算処理も可能となる。特に、モータ制御システムのような演算処理にて、頻繁に利用される演算パターンを本演算ユニットとして構成することで、従来実現が困難であった高度な演算処理も可能となる。また、演算ユニットの内部構成を並列して演算処理できるようにすることで、更なる処理性能の向上につながる。さらに、本演算ユニットでは、演算処理に要するクロック数が毎回同一クロック数であるため、処理時間の予測が可能となり、決められた時間内に演算処理を完了しなければならないリアルタイム制御に最適となる。すなわち、演算ユニットの動作周波数を高くしなくても、演算処理性能の向上とリアルタイム性を実現し、チップの発熱の抑制および放射ノイズの防止につながることができる。
【0006】
請求項2記載の本発明は,請求項1記載の演算処理装置において、リミット演算処理を行うためのコンパレータ(10)と、上限および下限リミット設定値を保存するためのメモリ(11)と、前記コンパレータ機能を有効とするフラグメモリ(12)を備えたものである。
請求項2記載の演算処理装置によれば、最終的な演算結果の値にリミット処理を行いたい場合、上限と下限のリミット処理を一度に実行できるため、処理の高速化につながる。また、リミット処理を行わない場合は、有効フラグを無効にしておくことで、コンパレータへの入力データをスルー状態とする。これにより、リミット処理の演算実行あり/なしに関わらず、一定の演算クロック数にて処理を完了させることができ、リアルタイム性も維持できることになる。
【0007】
請求項3記載の本発明は, 請求項1または2に記載の演算処理装置において、前記算術演算ユニット(1)は、加算結果にキャリーが発生する場合には1を出力し、ボローが発生する場合には−1を出力する加算器(13)と、この加算器の機能を有効とするためのフラグメモリ(14)を内蔵することを特徴とする。
請求項3記載の演算処理装置によれば、従来では条件判断(if文などによる処理)が必要であった、キャリーとボローを利用した演算処理において、本加算器のキャリーおよびボロー処理回路を有効にフラグ設定するのみで演算を実行できることになる。つまり、数クロックを要する条件判断処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
【0008】
請求項4記載の本発明は、請求項1〜3に記載の演算処理装置において、前記演算処理装置を複数個並列に配置したものである。
請求項4記載の演算処理装置によれば、請求項1から3記載の演算ユニットにて処理される演算を、複数の演算ユニットにて並列処理させることで、更なる演算の高速化を実現できる。また、多軸モータ制御システムのように、同様の演算処理を並行して実行する場合、複数個並列に配置した演算ユニットの効果が顕著となる。すなわち、本特許の目的とする演算ユニットの動作周波数を高くしなくても、演算処理性能の向上とリアルタイム性を実現し、チップの発熱の抑制および放射ノイズの防止につなげることができる。
【0009】
【発明の実施の形態】
以下、本発明の実施例を図に基づいて説明する。
図1は本発明の第1実施例を示す演算処理装置のブロック図である。
1は算術演算ユニット、2は入力メモリ、3は出力メモリ、4はオペコード設定メモリ、5はバレルシフタ回路、6は回路接続網、7はマルチプレクサ、8は演算機能コード設定メモリ、9はシフト量設定メモリである。なお、構成要素のうち、算術演算ユニット1と、入力メモリ2と、出力メモリ3と、オペコード設定メモリ4については本装置に複数設けた構成以外は従来と同じであるため、その説明を省略する。
【0010】
本発明の特徴は以下のとおりである。
すなわち、演算処理装置は、算術演算ユニット1にて実行された演算結果を用いてシフト処理する複数のバレルシフタ回路5と、該演算結果のシフト量を決定する設定メモ9と、バレルシフタ回路5で得られた複数の演算結果を切替えて出力するマルチプレクサ7と、マルチプレクサ7からの出力値を選択する演算機能コード設定メモリ8を備えた点である。
【0011】
次に動作について説明する。
演算処理措置は、複数の入力データを保持するための入力メモリ2として、IN1、IN2‥INmが配置されており、加減乗除、論理演算および数値比較を行うための複数の算術演算ユニット1(ALU1、ALU2、‥ALUn)に接続されている。算術演算ユニットALU1には、IN1とIN2のデータが入力され、算術演算ユニットALU2には、IN3とIN4のデータが入力されている。各算術演算ユニットにて実行する機能を決定するオペコード設定メモリ4は、算術演算ユニットの数だけ配置されており、前記ALU1とALU2にはオペコード1とオペコード2が対応する。各算術演算ユニット1にて実行された演算結果は、左右にシフト処理するバレルシフタ回路5に接続され、シフト量を決定する設定メモリ9に格納された数値によりシフト処理される。図ではALU1の演算結果はBRL1に、ALU2の演算結果はBRL2に接続されており、シフト量はShift1とShift2のメモリ値により決定される。BRL1とBRL2からの出力値は、ALU3に入力され、オペコード3に対応する演算処理が実行され、その演算結果はBRL3へ入力される。一方、BRL1とBRL2およびBRL3の出力値、さらにINmの入力データは、算術演算ユニット1とバレルシフタ回路5を複数含む回路接続網6に接続され、その他の演算処理が可能となっている。回路接続網6からの出力値は、複数の演算結果を切り替えて出力するマルチプレクサ7に接続される場合もあれば、また更なる算術演算ユニットALUnに入力され、オペコードnに対応する演算処理を実行し、その演算結果がBRLnへ入力されシフト処理を行い、最終的にマルチプレクサに入力される場合もある。前記マルチプレクサには、出力値を選択する演算機能コード設定メモリ(8)からのデータが入力され、演算出力値を保持する出力メモリ(3)にデータが格納される。
【0012】
上記算術演算ユニットにて実行可能な処理例として、以下のようなものがある。ここでは、入力されるデータをAとBとした場合について記述する。
・A + B (加算)
・A − B (減算)
・A × B (乗算)
・A ÷ B (除算)
・|A + B| (加算絶対値)
・A & B (論理AND)
・A | B (論理OR)
・A ^ B (論理EX−OR)
・A < B,A > B (数値の大小比較)
・A = B,A != B (数値の一致,不一致)
などが、各算術演算ユニットにて実行できる。
【0013】
よって、上記演算処理装置によれば、次のような演算処理を一度に実行可能とすることができる。説明を簡略化するため、この演算例ではBRL3の演算結果が回路接続網6にて何も処理されずスルーしてALUnに接続され、シフト処理は乗算を実行する場合のみ行っているものとする。
【0014】
R1=(IN1+IN2)
R2=(IN3−IN4)
R3=((IN1+IN2)×(IN3−IN4))>>Shift3


Rn=(((IN1+IN2)×(IN3−IN4))>>Shift3)+I Nm
【0015】
本発明の第1実施例は上記に述べた構成にしたので、内蔵する各算術演算ユニットのオペコード設定、およびマルチプレクサ出力値を選択する演算機能コードを利用することで、本演算処理装置にて処理できる演算機能を数多く実現でき、一度に複雑な演算処理も可能となり、演算性能を向上させることできる。
【0016】
図2は、本発明の演算処理装置におけるタイミングチャートを示す図であり、図1と合わせて以下に説明する。
図2において、16はクロック、17はStart信号、18は演算機能コードデータ、19はオペコードデータ、20はシフトデータである。
図2のように、本発明の演算処理装置はクロック16に同期して動作し、演算ユニットの処理はStart信号17が有効となっている期間に行われる。データ処理の流れに沿って説明すると、まず演算処理装置にて演算を開始する前に、演算機能コードデータを演算機能コード設定メモリ8に、オペコードデータをオペコード設定メモリ4に、シフトデータをシフト量設定メモリ9に設定する。
次に、Start信号17を有効とすることで、前記のメモリに設定した演算機能コードデータ18(MUX Code)と、オペコードデータ19(OP1〜OPn)と、シフトデータ20(Shift1〜Shiftn)が演算ユニットに入力される。
これにより、演算処理装置内部の処理が開始されることになり、最初のクロックサイクルでは、入力メモリ2(IN1〜INm)に演算を行うためのデータがセットされる。次のクロックサイクルでは、ALU1とBRL1およびALU2とBRL2の演算処理が並行して実行される。引き続くクロックサイクルでは、ALU3とBRL3の演算処理が実行され、その後のクロックサイクルでは算術演算ユニット1とバレルシフタ回路5を複数含む回路接続網6における演算処理、ALUnとBRLnの演算処理が実行されることになる。ここで、回路接続網6に内蔵される算術演算ユニット1とバレルシフタ回路5の個数によって演算処理に必要とされるクロック数は異なることになる。
以上の各算術演算ユニット1とバレルシフタ回路5による演算処理が完了した後、最後のクロックサイクルにて演算機能コードデータの設定値によりマルチプレクサ7から必要な演算結果データを出力メモリにセットすることになる。この出力メモリへのデータセットが完了すると共に、Start信号は無効となり演算処理装置での処理が完了する。ここで、本演算処理装置による演算処理を複数回実行する場合は、図2による動作を繰り返して行うことになる。
【0017】
よって、図2に示されているように、1回の演算処理装置での処理に要するクロック数は一定であることから、処理時間の予測が可能となり、決められた時間内に演算処理を完了しなければならないリアルタイム処理システムに最適であるといえる。
【0018】
次に本発明の第2実施例を説明する。
図3は本発明の第2実施例を示す演算処理装置のブロック図である。
図3において、10はコンパレータ、11は上限/下限リミット設定メモリ、12はコンパレータ機能有効フラグメモリ、21はコンパレータ入力データLINである。
第2実施例が第1実施例と異なる点は、リミット演算処理を行うためのコンパレータ10と、上限および下限リミット設定値を保存するためのメモリ11と、コンパレータ機能を有効とするフラグメモリ12を備えたことである。
次に動作説明を簡略化するため、図1との相違点についてのみ説明するものとする。
演算処理装置に設けた回路接続網から出力されるデータは、コンパレータ10(CMP)への入力データ21(LIN)となる。予め、上限/下限リミット設定メモリ11にセットされたデータにより、LINはリミット処理されることになる。コンパレータ10では、LINが上限リミット設定値から下限リミット設定値の範囲内である場合、LINをそのまま出力する。しかし、LINが上限リミット設定値以上の場合は、上限リミット設定値を出力し、LINが下限リミット設定値以下の場合は、下限リミット設定値を出力する。また、このコンパレータ10でのリミット処理が実行されるのは、コンパレータ機能を有効とするフラグメモリ12が有効にセットされている場合のみである。コンパレータ機能が無効の場合は、入力データLINはコンパレータ10をスルーして出力されることになる。
【0019】
本発明の第2実施例は上記に述べた構成にしたので、本演算処理装置では、リミット処理を算術演算ユニットの大小比較(<,>など)にて実行する場合と異なり、上限と下限のリミット処理を一度に1クロックで実行可能なため、処理の高速化を実現できる。また、リミット処理の演算実行ありなしに関わらず、一定の演算クロック数にて処理を完了させるため、リアルタイム性を維持することができる。
【0020】
次に本発明の第3実施例を説明する。
図4は本発明の第3実施例を示す算術演算ユニットに内蔵する加算器の構成図である。
図4において、13は加算器、14は加算器機能有効フラグメモリ、
第3実施例が第1、第2実施例と異なる点は,算術演算ユニット1が、加算結果にキャリーが発生する場合には1を出力し、ボローが発生する場合には−1を出力する加算器13と、この加算器の機能を有効とするためのフラグメモリ14を備えたものである。この有効フラグが無効の場合は、通常の加算器として機能するものである。
【0021】
次に動作を説明する。
この加算器13を内蔵する算術演算ユニット1を使用することで、従来の加算器にて加算結果にキャリーまたはボローが発生した場合、各状態を示すフラグを利用し、ソフトウェアにより一致/不一致の演算(=,!=など)にて条件判断を行い、キャリーの場合は上位ワードに1を加算し、ボローの場合は1を減算していた処理が削減可能となる。つまり、加算器機能フラグメモリ14を有効とし、キャリー/ボローどちらの処理でも加算結果と上位ワードを加算すれば良いことになる。
本発明の第3実施例は上記に述べた構成にしたので、数クロックを要していた条件判断処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
【0022】
次に本発明の第4実施例を説明する。
図5は本発明の第4実施例を示す演算処理装置のブロック図である。
第4実施例が第1、第2実施例と異なる点は第1、第2実施例で示した演算処理装置を複数並列に配置した点である。各演算ユニット内部での処理内容は、既に実施例として記載しているとおりである。しかし、これら演算処理装置を並列に配置することで、本発明の演算ユニットを1個利用した場合、数回に分けて演算を行っていた処理を、並列演算することが可能となる。
【0023】
本発明の第4実施例は上記に述べた構成にしたので、並列した演算処理を実行するシステムでは、本演算ユニットの並列演算機能を活用することで、大幅な演算性能を向上させることができる。
【0024】
【発明の効果】
請求項1記載の演算処理装置によれば、内蔵する各算術演算ユニットのオペコード設定および、マルチプレクサ出力値を選択する演算機能コードを利用することで、本演算ユニットにて処理できる演算機能を数多く実現でき、一度に複雑な演算処理も可能となる。特に、モータ制御システムのような演算処理にて、頻繁に利用される演算パターンを本演算ユニットとして構成することで、従来実現が困難であった高度な演算処理も可能となる。また、演算ユニットの内部構成を並列して演算処理できるようにすることで、更なる処理性能の向上につながる。さらに、本演算ユニットでは、演算処理に要するクロック数が毎回同一クロック数であるため、処理時間の予測が可能となり、決められた時間内に演算処理を完了しなければならないリアルタイム制御に最適となる。すなわち、演算ユニットの動作周波数を高くしなくても、演算処理性能の向上とリアルタイム性を実現し、チップの発熱の抑制および放射ノイズの防止につなげることができる。
【0025】
請求項2記載の演算処理装置によれば、最終的な演算結果の値にリミット処理を行う場合、上限と下限のリミット処理を一度に実行できるため、処理の高速化につながる。また、リミット処理を行わない場合は、有効フラグを無効にしておくことで、コンパレータへの入力データをスルー状態とする。これにより、リミット処理の演算実行ありなしに関わらず、一定の演算クロック数にて処理を完了させることができ、リアルタイム性が維持されることになる。
【0026】
請求項3記載の演算処理装置によれば、従来では条件判断(if文などによる処理)が必要であった、キャリーとボローを利用した演算処理において、本発明の加算器のキャリーおよびボロー処理回路を有効にフラグ設定するのみで演算を実行できることになる。つまり、数クロックを要する条件判断処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
【0027】
請求項4記載の演算処理装置によれば、請求項1から3記載の演算ユニットにて処理される演算を別の演算ユニットに処理させることで、更なる演算の高速化を実現できる。また、多軸モータ制御のように、同様の演算処理を並行して複数実行する場合、複数個並列に配置した演算ユニットの効果が顕著となる。すなわち、本特許の目的とする演算ユニットの動作周波数を高くしなくても、演算処理性能の向上とリアルタイム性を実現し、チップの発熱の抑制および放射ノイズの防止につなげることができる。
【図面の簡単な説明】
【図1】本発明の第1実施例を示す演算処理装置のブロック図である。
【図2】本発明のタイミングチャートを示す図である。
【図3】本発明の第2実施例を示す演算処理装置のブロック図である。
【図4】本発明の第3実施例を示す算術演算ユニットに内蔵する加算器の構成図である。
【図5】本発明の第4実施例を示す演算処理装置のブロック図である。
【図6】 従来例を示す演算処理装置のブロック図である。
【符号の説明】
1:算術演算ユニット
2:入力メモリ
3:出力メモリ
4:オペコード設定メモリ
5:バレルシフタ回路
6:回路接続網
7:マルチプレクサ
8:演算機能コード設定メモリ
9:シフト量設定メモリ
10:コンパレータ
11:上限/下限リミット設定メモリ
12:コンパレータ機能有効フラグメモリ
13:加算器
14:加算器機能有効フラグメモリ
15:演算処理装置
16:クロック
17:Start信号
18:演算機能コードデータ
19:オペコードデータ
20:シフトデータ
21:コンパレータ入力データLIN
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to an arithmetic processing apparatus that performs numerical arithmetic processing using a microprocessor or a digital signal processor (DSP).
[0002]
[Prior art]
FIG. 6 shows an arithmetic processing unit that performs numerical arithmetic processing using a conventional microprocessor or digital signal processor (DSP). FIG. 6 is a block diagram of an arithmetic processing unit showing a conventional example.
In FIG. 6, 1 is an arithmetic operation unit for performing addition / subtraction / division / division, logical operation and numerical comparison, and 2 is an input memory for holding a value input to the arithmetic operation unit 1 and is composed of two of A and B. Reference numeral 3 denotes an output memory R that holds operation results, and reference numeral 4 denotes an operation code setting memory for switching a function processed by the arithmetic operation unit 1.
Here, when considering the addition process, first, when an operation code for executing addition is set and a numerical value of 10 is set in the memory A and 20 is set as the input value, the arithmetic unit 1 (10 + 20 =) 30 is obtained as an output value from.
This example is a simple arithmetic process, but in a general arithmetic processing system, a lot of complicated arithmetic processes are processed, and the result calculated by the arithmetic operation unit 1 is fed back to the input memory 2 and 1 The arithmetic processing of the entire system is performed by using one arithmetic operation unit many times.
Recently, in order to perform complex operations such as image processing, an image processing processor in which a plurality of functional modules are arranged in an arithmetic operation unit has been proposed (for example, JP 2000-503427 A). .
[0003]
[Problems to be solved by the invention]
However, when performing arithmetic processing using an arithmetic operation unit as in the prior art, it is common to increase the operating frequency of a microprocessor or DSP in order to achieve high-speed operation. . This causes heat generation of the chip and radiation noise, and reduces the reliability of the product.
There is also a means for realizing high speed by arranging arithmetic operation units in parallel. In the image processing processor of JP-T-2000-503427, it is possible to finally output one calculation processing result by parallel calculation. However, since a plurality of calculation processing results cannot be output, the parallel processing property is utilized. Processing has not been realized.
In addition, when a conventional microprocessor or DSP is used in a real-time processing system composed of a plurality of tasks, one arithmetic operation unit is switched for a plurality of different processes to perform the operation. Is difficult to output (the processing time is not constant). That is, at present, there is no arithmetic unit dedicated to real-time processing.
[0004]
The present invention has been made to solve the above-described problems, and provides an arithmetic processing apparatus optimal for real-time control arithmetic processing that can improve arithmetic performance even at a low operating frequency without increasing the operating frequency. For the purpose.
[0005]
[Means for Solving the Problems]
In order to solve the above problems, the present invention includes an input memory (2) for holding a plurality of input data, and a plurality of arithmetic operation units for performing addition / subtraction / multiplication / division, logical operation and numerical comparison. (1), a numerical value including a plurality of operation code setting memories (4) for determining a function to be executed by the arithmetic operation unit, and an output memory (3) for holding an operation result from the arithmetic operation unit A plurality of barrel shifter circuits (5) for performing shift processing using the calculation result executed by the arithmetic operation unit (1), and a setting memory for determining the shift amount of the calculation result (9)
A multiplexer (7) for switching and outputting a plurality of computation results obtained by the barrel shifter circuit (5), and a computation function code setting memory (8) for selecting an output value from the multiplexer are provided.
According to the arithmetic processing device of claim 1, by using the operation code setting of each built-in arithmetic operation unit and the arithmetic function code for selecting the multiplexer output value, many arithmetic functions that can be processed by this arithmetic unit are realized. It is possible to perform complicated arithmetic processing at a time. In particular, by constructing a frequently used calculation pattern as this calculation unit in calculation processing such as in a motor control system, it is possible to perform advanced calculation processing that has been difficult to realize in the past. In addition, by allowing the internal configuration of the arithmetic unit to perform arithmetic processing in parallel, the processing performance is further improved. Furthermore, in this arithmetic unit, since the number of clocks required for arithmetic processing is the same clock number every time, processing time can be predicted, and it is optimal for real-time control in which arithmetic processing must be completed within a predetermined time. . That is, even if the operating frequency of the arithmetic unit is not increased, the arithmetic processing performance can be improved and real-time performance can be realized, leading to suppression of heat generation of the chip and prevention of radiation noise.
[0006]
According to a second aspect of the present invention, in the arithmetic processing apparatus according to the first aspect, a comparator (10) for performing limit arithmetic processing, a memory (11) for storing upper and lower limit setting values, A flag memory (12) for enabling the comparator function is provided.
According to the arithmetic processing apparatus of the second aspect, when it is desired to perform the limit process on the final calculation result value, the upper limit and the lower limit process can be executed at a time, which leads to an increase in the processing speed. Further, when the limit process is not performed, the input data to the comparator is set to the through state by disabling the valid flag. As a result, regardless of whether or not the limit processing is executed, the processing can be completed with a fixed number of operation clocks, and real-time performance can be maintained.
[0007]
According to a third aspect of the present invention, in the arithmetic processing unit according to the first or second aspect, the arithmetic operation unit (1) outputs 1 when a carry occurs in the addition result, and a borrow occurs. In this case, an adder (13) that outputs -1 and a flag memory (14) for enabling the function of the adder are incorporated.
According to the arithmetic processing device of claim 3, the carry and borrow processing circuit of the adder is effective in the arithmetic processing using carry and borrow, which conventionally required condition judgment (processing by an if statement or the like). The calculation can be executed only by setting the flag. That is, the condition determination process requiring several clocks can be realized with one clock, and the arithmetic processing performance can be improved.
[0008]
A fourth aspect of the present invention is the arithmetic processing device according to any one of the first to third aspects, wherein a plurality of the arithmetic processing devices are arranged in parallel.
According to the arithmetic processing device according to claim 4, further speeding up of the arithmetic operation can be realized by causing the arithmetic processing units according to claims 1 to 3 to perform parallel processing with a plurality of arithmetic units. . Further, when the same arithmetic processing is executed in parallel as in the multi-axis motor control system, the effect of the arithmetic units arranged in parallel becomes remarkable. That is, even if the operating frequency of the arithmetic unit that is the object of this patent is not increased, the arithmetic processing performance can be improved and real-time performance can be realized, and the chip heat generation can be suppressed and radiation noise can be prevented.
[0009]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram of an arithmetic processing unit showing a first embodiment of the present invention.
1 is an arithmetic operation unit, 2 is an input memory, 3 is an output memory, 4 is an operation code setting memory, 5 is a barrel shifter circuit, 6 is a circuit connection network, 7 is a multiplexer, 8 is an operation function code setting memory, and 9 is a shift amount setting. It is memory. Among the constituent elements, the arithmetic operation unit 1, the input memory 2, the output memory 3, and the operation code setting memory 4 are the same as those in the prior art except for the configuration provided in the apparatus, and the description thereof is omitted. .
[0010]
The features of the present invention are as follows.
That is, the arithmetic processing unit obtains the plurality of barrel shifter circuits 5 that perform shift processing using the arithmetic results executed in the arithmetic arithmetic unit 1, the setting memo 9 that determines the shift amount of the arithmetic results, and the barrel shifter circuit 5. A multiplexer 7 for switching and outputting a plurality of computation results, and a computation function code setting memory 8 for selecting an output value from the multiplexer 7 are provided.
[0011]
Next, the operation will be described.
In the arithmetic processing measure, IN1, IN2,... INm are arranged as an input memory 2 for holding a plurality of input data, and a plurality of arithmetic operation units 1 (ALU1) for performing addition / subtraction / multiplication / division, logical operation and numerical comparison are provided. , ALU2,... ALUN). Data of IN1 and IN2 are input to the arithmetic operation unit ALU1, and data of IN3 and IN4 are input to the arithmetic operation unit ALU2. The operation code setting memory 4 for determining the function to be executed in each arithmetic operation unit is arranged by the number of arithmetic operation units, and the operation codes 1 and 2 correspond to the ALU1 and ALU2. The calculation result executed in each arithmetic operation unit 1 is connected to a barrel shifter circuit 5 that performs a shift process to the left and right, and is shifted by a numerical value stored in a setting memory 9 that determines a shift amount. In the figure, the calculation result of ALU1 is connected to BRL1, the calculation result of ALU2 is connected to BRL2, and the shift amount is determined by the memory values of Shift1 and Shift2. The output values from BRL1 and BRL2 are input to ALU3, the arithmetic processing corresponding to opcode 3 is executed, and the arithmetic result is input to BRL3. On the other hand, the output values of BRL1, BRL2 and BRL3, and further the input data of INm are connected to a circuit connection network 6 including a plurality of arithmetic operation units 1 and barrel shifter circuits 5, and other arithmetic processing is possible. The output value from the circuit connection network 6 may be connected to a multiplexer 7 for switching and outputting a plurality of calculation results, or may be input to a further arithmetic operation unit ALUn to execute an operation process corresponding to the operation code n. In some cases, the calculation result is input to BRLn, shifted, and finally input to the multiplexer. Data from the arithmetic function code setting memory (8) for selecting an output value is input to the multiplexer, and the data is stored in an output memory (3) for holding the arithmetic output value.
[0012]
Examples of processing that can be executed by the arithmetic unit include the following. Here, a case where input data is A and B will be described.
・ A + B (addition)
・ A-B (subtraction)
・ A x B (multiplication)
・ A ÷ B (Division)
・ | A + B | (Absolute value)
・ A & B (Logical AND)
・ A | B (Logical OR)
・ A ^ B (Logic EX-OR)
・ A <B, A> B (Comparison of numerical values)
・ A = B, A! = B (numeric match, mismatch)
Etc. can be executed in each arithmetic unit.
[0013]
Therefore, according to the arithmetic processing device, the following arithmetic processing can be executed at a time. In order to simplify the explanation, in this calculation example, it is assumed that the calculation result of BRL3 is not processed in the circuit connection network 6 and is passed through and connected to ALUn, and shift processing is performed only when multiplication is executed. .
[0014]
R1 = (IN1 + IN2)
R2 = (IN3-IN4)
R3 = ((IN1 + IN2) × (IN3-IN4)) >> Shift3


Rn = (((IN1 + IN2) × (IN3−IN4)) >> Shift3) + I Nm
[0015]
Since the first embodiment of the present invention has the configuration described above, the operation processing unit performs processing by using the operation code setting for each built-in arithmetic operation unit and the operation function code for selecting the multiplexer output value. Many calculation functions that can be performed can be realized, and complicated calculation processing can be performed at once, thereby improving calculation performance.
[0016]
FIG. 2 is a diagram showing a timing chart in the arithmetic processing apparatus of the present invention, which will be described below in conjunction with FIG.
In FIG. 2, 16 is a clock, 17 is a Start signal, 18 is arithmetic function code data, 19 is opcode data, and 20 is shift data.
As shown in FIG. 2, the arithmetic processing unit of the present invention operates in synchronization with the clock 16, and processing of the arithmetic unit is performed during a period in which the Start signal 17 is valid. To explain along the flow of data processing, first, before the operation is started by the arithmetic processing unit, the operation function code data is stored in the operation function code setting memory 8, the operation code data is stored in the operation code setting memory 4, and the shift data is shifted by the shift amount. Set in setting memory 9.
Next, by enabling the Start signal 17, the calculation function code data 18 (MUX Code), the operation code data 19 (OP1 to OPn), and the shift data 20 (Shift1 to Shiftn) set in the memory are calculated. Input to the unit.
As a result, processing inside the arithmetic processing unit is started, and data for performing arithmetic is set in the input memory 2 (IN1 to INm) in the first clock cycle. In the next clock cycle, ALU1 and BRL1, and ALU2 and BRL2 are executed in parallel. In the subsequent clock cycle, arithmetic processing of ALU3 and BRL3 is executed, and in subsequent clock cycles, arithmetic processing in the circuit connection network 6 including a plurality of arithmetic operation units 1 and barrel shifter circuits 5, and arithmetic processing of ALUn and BRLn are executed. become. Here, the number of clocks required for the arithmetic processing differs depending on the number of arithmetic operation units 1 and barrel shifter circuits 5 incorporated in the circuit connection network 6.
After the arithmetic processing by each arithmetic operation unit 1 and the barrel shifter circuit 5 is completed, necessary operation result data is set in the output memory from the multiplexer 7 in accordance with the set value of the operation function code data in the last clock cycle. . When the data set to the output memory is completed, the Start signal becomes invalid and the processing in the arithmetic processing unit is completed. Here, when the arithmetic processing by the arithmetic processing apparatus is executed a plurality of times, the operation shown in FIG. 2 is repeated.
[0017]
Therefore, as shown in FIG. 2, since the number of clocks required for processing in one processing unit is constant, the processing time can be predicted, and the processing is completed within the determined time. It can be said that it is optimal for a real-time processing system that must be performed.
[0018]
Next, a second embodiment of the present invention will be described.
FIG. 3 is a block diagram of an arithmetic processing unit showing a second embodiment of the present invention.
In FIG. 3, 10 is a comparator, 11 is an upper limit / lower limit setting memory, 12 is a comparator function valid flag memory, and 21 is comparator input data LIN.
The second embodiment is different from the first embodiment in that a comparator 10 for performing limit calculation processing, a memory 11 for storing upper and lower limit setting values, and a flag memory 12 for enabling the comparator function are provided. It is to be prepared.
Next, only the differences from FIG. 1 will be described in order to simplify the operation description.
Data output from the circuit connection network provided in the arithmetic processing unit becomes input data 21 (LIN) to the comparator 10 (CMP). LIN is subjected to limit processing based on data set in the upper limit / lower limit setting memory 11 in advance. The comparator 10 outputs the LIN as it is when the LIN is within the range from the upper limit setting value to the lower limit setting value. However, when LIN is equal to or greater than the upper limit limit set value, the upper limit limit set value is output, and when LIN is equal to or lower than the lower limit limit set value, the lower limit limit set value is output. Further, the limit processing in the comparator 10 is executed only when the flag memory 12 that enables the comparator function is set to be effective. When the comparator function is invalid, the input data LIN is output through the comparator 10.
[0019]
Since the second embodiment of the present invention is configured as described above, the present arithmetic processing unit differs from the case where limit processing is executed by comparing the size of arithmetic operation units (<,>, etc.). Since limit processing can be executed in one clock at a time, processing speed can be increased. In addition, regardless of whether or not the limit processing is executed, the processing is completed with a fixed number of operation clocks, so that real-time performance can be maintained.
[0020]
Next, a third embodiment of the present invention will be described.
FIG. 4 is a block diagram of an adder built in the arithmetic operation unit according to the third embodiment of the present invention.
In FIG. 4, 13 is an adder, 14 is an adder function valid flag memory,
The third embodiment differs from the first and second embodiments in that the arithmetic unit 1 outputs 1 when a carry occurs in the addition result and outputs -1 when a borrow occurs. An adder 13 and a flag memory 14 for enabling the function of the adder are provided. When this valid flag is invalid, it functions as a normal adder.
[0021]
Next, the operation will be described.
By using the arithmetic operation unit 1 incorporating the adder 13, when a carry or borrow occurs in the addition result in the conventional adder, a flag indicating each state is used, and a match / mismatch operation is performed by software. (=,! =, Etc.) The condition is determined, and in the case of carry, 1 can be added to the upper word, and in the case of borrow, the process of subtracting 1 can be reduced. That is, the adder function flag memory 14 is validated, and the addition result and the upper word may be added in both carry / borrow processing.
Since the third embodiment of the present invention has the above-described configuration, the condition determination processing that required several clocks can be realized with one clock, and the arithmetic processing performance can be improved.
[0022]
Next, a fourth embodiment of the present invention will be described.
FIG. 5 is a block diagram of an arithmetic processing unit showing a fourth embodiment of the present invention.
The fourth embodiment is different from the first and second embodiments in that a plurality of arithmetic processing units shown in the first and second embodiments are arranged in parallel. The processing content inside each arithmetic unit is as already described in the embodiment. However, by arranging these arithmetic processing devices in parallel, when one arithmetic unit of the present invention is used, it is possible to perform parallel processing on the processing that has been performed in several steps.
[0023]
Since the fourth embodiment of the present invention is configured as described above, in a system that executes parallel arithmetic processing, it is possible to greatly improve the arithmetic performance by utilizing the parallel arithmetic function of this arithmetic unit. .
[0024]
【The invention's effect】
According to the arithmetic processing device of claim 1, by using the operation code setting of each built-in arithmetic operation unit and the arithmetic function code for selecting the multiplexer output value, many arithmetic functions that can be processed by this arithmetic unit are realized. It is possible to perform complicated arithmetic processing at a time. In particular, by constructing a frequently used calculation pattern as this calculation unit in calculation processing such as in a motor control system, it is possible to perform advanced calculation processing that has been difficult to realize in the past. In addition, by allowing the internal configuration of the arithmetic unit to perform arithmetic processing in parallel, the processing performance is further improved. Furthermore, in this arithmetic unit, since the number of clocks required for arithmetic processing is the same clock number every time, processing time can be predicted, and it is optimal for real-time control in which arithmetic processing must be completed within a predetermined time. . That is, even if the operating frequency of the arithmetic unit is not increased, the arithmetic processing performance can be improved and real-time performance can be realized, and the chip heat generation can be suppressed and radiation noise can be prevented.
[0025]
According to the arithmetic processing apparatus of the second aspect, when the limit process is performed on the final calculation result value, the upper limit and the lower limit process can be executed at a time, which leads to the speeding up of the process. Further, when the limit process is not performed, the input data to the comparator is set to the through state by disabling the valid flag. As a result, the processing can be completed with a constant number of operation clocks regardless of whether or not the limit processing is executed, and real-time performance is maintained.
[0026]
According to the arithmetic processing apparatus of claim 3, in the arithmetic processing using carry and borrow, which conventionally required condition judgment (processing by an if statement or the like), the carry and borrow processing circuit of the adder of the present invention The calculation can be executed only by setting the flag effectively. That is, the condition determination process requiring several clocks can be realized with one clock, and the arithmetic processing performance can be improved.
[0027]
According to the arithmetic processing device of the fourth aspect, it is possible to realize further speeding up of the arithmetic operation by causing another arithmetic unit to process the arithmetic processing processed by the arithmetic unit according to the first to third aspects. In addition, when a plurality of similar arithmetic processes are executed in parallel as in the multi-axis motor control, the effect of the arithmetic units arranged in parallel becomes remarkable. That is, even if the operating frequency of the arithmetic unit that is the object of this patent is not increased, the arithmetic processing performance can be improved and real-time performance can be realized, and the chip heat generation can be suppressed and radiation noise can be prevented.
[Brief description of the drawings]
FIG. 1 is a block diagram of an arithmetic processing unit showing a first embodiment of the present invention.
FIG. 2 is a timing chart of the present invention.
FIG. 3 is a block diagram of an arithmetic processing unit showing a second embodiment of the present invention.
FIG. 4 is a configuration diagram of an adder built in an arithmetic operation unit according to a third embodiment of the present invention.
FIG. 5 is a block diagram of an arithmetic processing unit showing a fourth embodiment of the present invention.
FIG. 6 is a block diagram of an arithmetic processing unit showing a conventional example.
[Explanation of symbols]
1: arithmetic operation unit 2: input memory 3: output memory 4: opcode setting memory 5: barrel shifter circuit 6: circuit connection network 7: multiplexer 8: arithmetic function code setting memory 9: shift amount setting memory 10: comparator 11: upper limit / Lower limit setting memory 12: Comparator function valid flag memory 13: Adder 14: Adder function valid flag memory 15: Arithmetic processor 16: Clock 17: Start signal 18: Arithmetic function code data 19: Opcode data 20: Shift data 21 : Comparator input data LIN

Claims (4)

複数の入力データを保持するための入力メモリ(2)と、加減乗除、論理演算および数値比較を行うための複数の算術演算ユニット(1)と、前記算術演算ユニットにて実行する機能を決定するための複数のオペコード設定メモリ(4)と、前記算術演算ユニットからの演算結果を保持する出力メモリ(3)とを備えた数値の演算処理を行う演算処理装置において、
前記算術演算ユニット(1)にて実行された演算結果を用いてシフト処理する複数のバレルシフタ回路(5)と、
該演算結果のシフト量を決定する設定メモリ(9)と、
前記バレルシフタ回路(5)で得られた複数の演算結果を切替えて出力するマルチプレクサ(7)と、
前記マルチプレクサからの出力値を選択する演算機能コード設定メモリ(8)と、備えたことを特徴とする演算処理装置。
An input memory (2) for holding a plurality of input data, a plurality of arithmetic operation units (1) for performing addition / subtraction / multiplication / division, logical operation and numerical comparison, and a function to be executed by the arithmetic operation unit are determined. In an arithmetic processing apparatus for performing numerical arithmetic processing, comprising a plurality of operation code setting memories (4) for output and an output memory (3) for holding arithmetic results from the arithmetic arithmetic unit,
A plurality of barrel shifter circuits (5) for performing shift processing using the calculation results executed in the arithmetic operation unit (1);
A setting memory (9) for determining the shift amount of the calculation result;
A multiplexer (7) for switching and outputting a plurality of operation results obtained by the barrel shifter circuit (5);
An arithmetic processing apparatus comprising: an arithmetic function code setting memory (8) for selecting an output value from the multiplexer.
リミット演算処理を行うためのコンパレータ(10)と、
上限および下限リミット設定値を保存するためのメモリ(11)と、前記コンパレータ機能を有効とするフラグメモリ(12)を備えたことを特徴とする請求項1記載の演算処理装置。
A comparator (10) for performing limit calculation processing;
The arithmetic processing unit according to claim 1, further comprising a memory (11) for storing upper and lower limit set values and a flag memory (12) for enabling the comparator function.
前記算術演算ユニット(1)は、加算結果にキャリーが発生する場合には1を出力し、ボローが発生する場合には−1を出力する加算器(13)と、この加算器の機能を有効とするためのフラグメモリ(14)を内蔵することを特徴とする請求項1または2に記載の演算処理装置。The arithmetic operation unit (1) outputs an adder (13) that outputs 1 when a carry occurs in the addition result, and outputs a -1 when a borrow occurs, and the function of this adder is enabled. An arithmetic processing unit according to claim 1 or 2, wherein a flag memory (14) is incorporated. 前記演算処理装置を、複数個並列に配置したことを特徴とする請求項1〜3に記載の演算処理装置。The arithmetic processing device according to claim 1, wherein a plurality of the arithmetic processing devices are arranged in parallel.
JP2002206940A 2002-07-16 2002-07-16 Arithmetic processing unit Expired - Fee Related JP3804591B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002206940A JP3804591B2 (en) 2002-07-16 2002-07-16 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002206940A JP3804591B2 (en) 2002-07-16 2002-07-16 Arithmetic processing unit

Publications (2)

Publication Number Publication Date
JP2004054335A JP2004054335A (en) 2004-02-19
JP3804591B2 true JP3804591B2 (en) 2006-08-02

Family

ID=31931530

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002206940A Expired - Fee Related JP3804591B2 (en) 2002-07-16 2002-07-16 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JP3804591B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011196927A (en) * 2010-03-23 2011-10-06 Yokogawa Electric Corp Waveform measuring instrument

Also Published As

Publication number Publication date
JP2004054335A (en) 2004-02-19

Similar Documents

Publication Publication Date Title
US6009451A (en) Method for generating barrel shifter result flags directly from input data
US20020169942A1 (en) VLIW processor
US5299320A (en) Program control type vector processor for executing a vector pipeline operation for a series of vector data which is in accordance with a vector pipeline
JP2000222206A (en) Data processing device
JP3188467B2 (en) Minimum / maximum value search device
EP0730223B1 (en) Pipeline data processing apparatus for executing a plurality of data processes having a data-dependent relationship
JP3578883B2 (en) Data processing device
US8335810B2 (en) Register-based shifts for a unidirectional rotator
US6055628A (en) Microprocessor with a nestable delayed branch instruction without branch related pipeline interlocks
US20080307029A1 (en) Arithmetic device and arithmetic method
US5253349A (en) Decreasing processing time for type 1 dyadic instructions
JP3804591B2 (en) Arithmetic processing unit
JPH1115658A (en) Data processing device
US6725360B1 (en) Selectively processing different size data in multiplier and ALU paths in parallel
US20130212362A1 (en) Image processing device and data processor
US20060218378A1 (en) Integrated circuit device
JP4258350B2 (en) Arithmetic processing unit
GB2296350A (en) Data processing divider enabling reduced interrupt latency
US7278087B2 (en) Hardware circuit for the puncturing and repetitive coding of data streams, and a method for operating the said hardware circuit
JP2004021573A (en) Data processing device
US12299444B2 (en) Arithmetic unit for reduced instruction set computer processors and related method, system and device
JP3461887B2 (en) Variable length pipeline controller
JP3573874B2 (en) Arithmetic circuit
JP3526773B2 (en) Multiprocessor device and control method thereof
JP2925842B2 (en) Pipeline processing equipment

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20050609

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20060414

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060501

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

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20100519

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20110519

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20130519

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20140519

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees