JP4258350B2 - Arithmetic processing unit - Google Patents

Arithmetic processing unit Download PDF

Info

Publication number
JP4258350B2
JP4258350B2 JP2003363974A JP2003363974A JP4258350B2 JP 4258350 B2 JP4258350 B2 JP 4258350B2 JP 2003363974 A JP2003363974 A JP 2003363974A JP 2003363974 A JP2003363974 A JP 2003363974A JP 4258350 B2 JP4258350 B2 JP 4258350B2
Authority
JP
Japan
Prior art keywords
arithmetic
memory
data
arithmetic processing
processing
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
JP2003363974A
Other languages
Japanese (ja)
Other versions
JP2005128807A (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 JP2003363974A priority Critical patent/JP4258350B2/en
Publication of JP2005128807A publication Critical patent/JP2005128807A/en
Application granted granted Critical
Publication of JP4258350B2 publication Critical patent/JP4258350B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Description

本発明は、マイクロプロセッサやディジタルシグナルプロセッサ(DSP)を利用した数値の演算処理を行う演算処理装置に関する。   The present invention relates to an arithmetic processing apparatus that performs numerical arithmetic processing using a microprocessor or a digital signal processor (DSP).

従来のマイクロプロセッサやディジタルシグナルプロセッサ(DSP)を利用した数値の演算処理を行う演算処理装置は図6に示すようになっている。図6は従来例を示す演算処理装置のブロック図である。
図6において、1は加減乗除・論理演算および数値比較などを行う算術演算ユニット、2は算術演算ユニット1へ入力される値を保持する入力メモリで、AとBの二つで構成される。3は演算結果を保持する出力メモリ、4は算術演算ユニット1にて処理される機能を切り替えるためのオペコード設定メモリである。
ここで、加算処理を行う際を考えてみると、まず、加算を実行するためのオペコードをセットし、入力値としてメモリAに10、メモリBに20の数値をセットした場合、算術演算ユニット1からの出力値としては、(10+20=)30を得ることになる。
この例は、簡単な演算処理であるが、一般的な演算処理を行うシステムでは、複雑な演算が数多く処理されており、算術演算ユニット1にて演算した結果を入力メモリ2にフィードバックし、1つの算術演算ユニットを何度も利用してシステム全体の演算処理を行っている。
また、最近では画像処理のように複雑な演算を行うために、画像処理プロセッサとして算術演算ユニットの中に複数の機能モジュールを配置したものが提案されている(例えば特許文献1参照)。
特表2000−503427号公報(図1)
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 for holding calculation results, and 4 is an operation code setting memory for switching functions to be 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 As an output value from (10 + 20 =) 30 is obtained.
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 complicated 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 (see, for example, Patent Document 1).
JP 2000-503427 A (FIG. 1)

ところが、従来技術のような算術演算ユニットを利用して演算処理を行う場合、演算の高速化を実現するためには、マイクロプロセッサやDSPの動作周波数を高くして対応することが一般的である。これは、チップの発熱や放射ノイズの原因となり、製品の信頼性を低減させる要因となる。
また、算術演算ユニットを並列に配置することで、高速化を実現する手段もある。特表2000−503427号の画像処理プロセッサでは、並列演算により最終的には1つの演算処理結果を出力することが可能となっているが、複数の演算処理結果を出力できないため並列演算性を生かした処理が実現できていない。
さらに、従来技術のマイクロプロセッサやDSPを、複数のタスクからなるリアルタイム処理システムに使用した場合、1つの算術演算ユニットを複数の異なる処理のために切り替えて演算を行うため、一定時間ごとに演算結果を出力することが困難となっている(演算処理時間が一定でない)。つまり、現状ではリアルタイム処理専用の演算ユニットは存在していない。
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.

本発明は上記課題を解決するためになされたものであり、動作周波数を高くすることなく、低い動作周波数でも演算性能を向上することができる、リアルタイム制御演算処理に最適な演算処理装置を提供することを目的とする。   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.

上記問題を解決するため、請求項1記載の本発明は、複数の入力データを保持するための入力メモリと、加減乗除、論理演算および数値比較を行うための複数の算術演算ユニットと、前記算術演算ユニットにて実行する機能を決定するための複数のオペコード設定メモリと、前記算術演算ユニットからの演算結果を保持する出力メモリと、前記算術演算ユニットにて実行された演算結果を用いてシフト処理する複数のバレルシフタ回路と、該演算結果のシフト量を決定する設定メモリと、前記バレルシフタ回路で得られた複数の演算結果を切り替えて出力するマルチプレクサと、前記マルチプレクサからの出力値を選択する演算機能コード設定メモリとを備えた演算処理装置において、前記バレルシフタ回路は、前記算術演算ユニットからの演算結果を入力データとし、該入力データの上位または下位ワードを選択するためのフラグメモリと、上位または下位ワードデータを選択するセレクタと、前記セレクタの出力データにゼロのワードデータを付加するゼロワードデータ付加手段と、上位または下位ワード選択機能を有効とするためのフラグメモリと、前記バレルシフタ回路への入力データを切り替えるためのセレクタとを備えたものである。     In order to solve the above problem, the present invention as set forth in claim 1 includes an input memory for holding a plurality of input data, a plurality of arithmetic operation units for performing addition / subtraction / multiplication / division, logical operation and numerical comparison, and the arithmetic Shift processing using a plurality of operation code setting memories for determining a function to be executed in the arithmetic unit, an output memory for holding an arithmetic result from the arithmetic arithmetic unit, and an arithmetic result executed in the arithmetic arithmetic unit A plurality of barrel shifter circuits, a setting memory for determining a shift amount of the calculation result, a multiplexer for switching and outputting a plurality of calculation results obtained by the barrel shifter circuit, and an arithmetic function for selecting an output value from the multiplexer In the arithmetic processing device including the code setting memory, the barrel shifter circuit is connected to the arithmetic operation unit. A flag memory for selecting an upper or lower word of the input data, a selector for selecting upper or lower word data, and a zero word for adding zero word data to the output data of the selector It comprises data adding means, a flag memory for enabling the upper or lower word selection function, and a selector for switching input data to the barrel shifter circuit.

請求項2記載の本発明は、請求項1記載の演算処理装置において、リミット演算処理を行うためのコンパレータと、上限および下限リミット設定値を保存するためのメモリと、前記コンパレータ機能を有効とするフラグメモリを備えたものである。   According to a second aspect of the present invention, in the arithmetic processing unit according to the first aspect, a comparator for performing limit calculation processing, a memory for storing upper and lower limit setting values, and the comparator function are enabled. A flag memory is provided.

請求項3記載の本発明は、請求項1または2に記載の演算処理装置において、前記算術演算ユニットは、加算結果にキャリーが発生する場合には1を出力し、ボローが発生する場合にはマイナス1を出力する加算器と、前記加算器の機能を有効とするためのフラグメモリを備えたものである。   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 outputs 1 when a carry occurs in the addition result, and when a borrow occurs. An adder that outputs minus 1 and a flag memory for enabling the function of the adder are provided.

請求項4記載の本発明は、請求項1〜3に記載の演算処理装置において、前記演算処理装置を複数個並列に配置したものである。   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.

請求項1記載の演算処理装置によれば、内蔵する各算術演算ユニットのオペコード設定および、マルチプレクサ出力値を選択する演算機能コードを利用することで、本演算ユニットにて処理できる演算機能を数多く実現でき、一度に複雑な演算処理も可能となる。特に、モータ制御システムのような演算処理にて、頻繁に利用される演算パターンを本演算処理装置として構成することで、従来実現が困難であった高度な演算処理も可能となる。
また、演算処理装置の内部構成を並列して演算処理できるようにすることで、更なる処理性能の向上につながる。さらに、本演算処理装置では、演算処理に要するクロック数が毎回同一クロック数であるため、処理時間の予測が可能となり、決められた時間内に演算処理を完了しなければならないリアルタイム制御に最適となる。すなわち、演算処理装置の動作周波数を高くしなくても、演算処理性能の向上とリアルタイム性を実現し、チップの発熱の抑制および放射ノイズの防止につなげることができる。
また、従来では算術演算ユニットからバレルシフタ回路に入力されるデータの上位ワードのみシフト処理する必要がある場合、上位ワードを切り出すためのシフト量aと、その上位ワードのデータをシフト処理するためのシフト量bを加算してシフト量設定メモリに入力しなければならなかったが、上位ワードを選択するためのフラグメモリと、この選択信号の機能を有効とするためのフラグメモリと、シフト量bをシフト量設定メモリに入力するのみとなる。つまり、シフト量aとシフト量bの加算処理の削除と、多段のシフト処理が削減でき、数クロックを要していたシフト処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
一方、下位ワードのみをシフト処理する必要がある場合、従来のバレルシフタ回路では下位ワードを切り出した後(つまり上位ワードをマスクした後)、そのデータをシフト処理する必要があったが、請求項1記載の演算処理装置では、下位ワードを選択するフラグメモリと、この選択信号の機能を有効とするためのフラグメモリと、シフト量をシフト量設定メモリに入力するのみとなる。つまり、上位ワードのマスク処理を削除し、数クロックを要するシフト処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
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 frequently used calculation patterns in the calculation processing as in the motor control system as this calculation processing device, it is possible to perform high-level calculation processing that has been difficult to realize in the past.
In addition, the processing performance can be further improved by making it possible to perform arithmetic processing in parallel with the internal configuration of the arithmetic processing unit. Furthermore, in this arithmetic processing unit, the number of clocks required for the arithmetic processing is the same number of clocks every time, so it is possible to predict the processing time, and it is optimal for real-time control in which the arithmetic processing must be completed within a predetermined time. Become. That is, even if the operation frequency of the arithmetic processing device 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.
Conventionally, when it is necessary to shift only the upper word of the data input from the arithmetic unit to the barrel shifter circuit, the shift amount a for extracting the upper word and the shift for shifting the data of the upper word The amount b must be added and input to the shift amount setting memory, but the flag memory for selecting the upper word, the flag memory for enabling the function of this selection signal, and the shift amount b It is only input to the shift amount setting memory. That is, it is possible to eliminate the addition process of the shift amount a and the shift amount b and the multi-stage shift process, and the shift process that required several clocks can be realized with one clock, and the arithmetic processing performance can be improved. .
On the other hand, when it is necessary to shift only the lower word, the conventional barrel shifter circuit needs to shift the data after cutting out the lower word (that is, after masking the upper word). In the described arithmetic processing unit, the flag memory for selecting the lower word, the flag memory for enabling the function of the selection signal, and the shift amount are only input to the shift amount setting memory. That is, the mask process for the upper word is deleted, and a shift process requiring several clocks can be realized with one clock, and the arithmetic processing performance can be improved.

請求項2記載の演算処理装置によれば、最終的な演算結果の値にリミット処理を行う場合、上限と下限のリミット処理を一度に実行できるため、処理の高速化につながる。また、リミット処理を行わない場合は、有効フラグを無効にしておくことで、コンパレータへの入力データをスルー状態とする。これにより、リミット処理の演算実行ありなしに関わらず、一定の演算クロック数にて処理を完了させることができ、リアルタイム性が維持されることになる。   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.

請求項記載の演算処理装置によれば、請求項1または請求項2記載の演算処理装置にて処理される演算を別の演算処理装置に処理させることで、更なる演算の高速化を実現できる。また、多軸モータ制御のように、同様の演算処理を並行して複数実行する場合、複数個並列に配置した演算処理装置の効果が顕著となる。すなわち、本特許の目的とする演算処理装置の動作周波数を高くしなくても、演算処理性能の向上とリアルタイム性を実現し、チップの発熱の抑制および放射ノイズの防止につなげることができる。
According to the arithmetic processing apparatus according to claim 3, by processing operations to be processed by the processing unit according to claim 1 or claim 2 wherein in another processing unit, realize high-speed further computation it can. Further, when a plurality of similar arithmetic processes are executed in parallel as in the multi-axis motor control, the effect of the arithmetic processing devices arranged in parallel becomes remarkable. That is, even if the operating frequency of the arithmetic processing device targeted by 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.

以下、本発明の実施例を図に基づいて説明する。   Embodiments of the present invention will be described below with reference to the drawings.

図1は本発明の第1実施例を示す演算処理装置のブロック図であり、図2は本発明のバレルシフタ回路の構成図である。図1および図2において、1は算術演算ユニット、2は入力メモリ、3は出力メモリ、4はオペコード設定メモリ、5はバレルシフタ、6は回路接続網、7はマルチプレクサ、8は演算機能コード設定メモリ、9はシフト量設定メモリ、22はバレルシフタ回路へ入力されるデータの上位/下位ワードを選択するためのフラグメモリ、23は上位/下位ワードの選択機能を有効にするためのフラグメモリ、24は上位/下位ワードのデータを選択するセレクタ、25はバレルシフタ5に入力されるデータを切り替えるためのセレクタ、26は本発明のバレルシフタ回路、27はゼロのワードデータを付加するゼロワードデータ付加手段である。   FIG. 1 is a block diagram of an arithmetic processing unit showing a first embodiment of the present invention, and FIG. 2 is a block diagram of a barrel shifter circuit of the present invention. 1 and 2, 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, 6 is a circuit connection network, 7 is a multiplexer, and 8 is an operation function code setting memory. , 9 is a shift amount setting memory, 22 is a flag memory for selecting upper / lower words of data input to the barrel shifter circuit, 23 is a flag memory for enabling the upper / lower word selection function, and 24 is A selector for selecting upper / lower word data, 25 is a selector for switching data input to the barrel shifter 5, 26 is a barrel shifter circuit of the present invention, and 27 is zero word data adding means for adding zero word data. .

次に図1を用いて動作について説明する。
演算処理措置は、複数の入力データを保持するための入力メモリ2として、IN1、IN2‥INmが配置されており、加減乗除、論理演算および数値比較を行うための複数の算術演算ユニット1(ALU1、ALU2、‥ALUn)に接続されている。算術演算ユニットALU1には、IN1とIN2のデータが入力され、算術演算ユニットALU2には、IN3とIN4のデータが入力されている。各算術演算ユニットにて実行する機能を決定するオペコード設定メモリ4は、算術演算ユニットの数だけ配置されており、前記ALU1とALU2にはオペコード1とオペコード2が対応する。各算術演算ユニット1にて実行された演算結果は、左右にシフト処理するバレルシフタ回路26に接続され、シフト量を決定する設定メモリ9に格納された数値によりシフト処理される。図1ではALU1の演算結果はBRL1に、ALU2の演算結果はBRL2に接続されており、シフト量はShift1とShift2のメモリ値により決定される。BRL1とBRL2からの出力値は、ALU3に入力され、オペコード3に対応する演算処理が実行され、その演算結果はBRL3へ入力される。一方、BRL1とBRL2およびBRL3の出力値、さらにINmの入力データは、算術演算ユニット1とバレルシフタ回路26を複数含む回路接続網6に接続され、その他の演算処理が可能となっている。回路接続網6からの出力値は、複数の演算結果を切り替えて出力するマルチプレクサ7に接続される場合もあれば、また更なる算術演算ユニットALUnに入力され、オペコードnに対応する演算処理を実行し、その演算結果がBRLnへ入力されシフト処理を行い、最終的にマルチプレクサに入力される場合もある。前記マルチプレクサには、出力値を選択する演算機能コード設定メモリ8からのデータが入力され、演算出力値を保持する出力メモリ3にデータが格納される。
Next, the operation will be described with reference to FIG.
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 26 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 FIG. 1, 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 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 26, 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 calculation function code setting memory 8 for selecting an output value is input to the multiplexer, and the data is stored in the output memory 3 for holding the calculation output value.

次に図2を使ってバレルシフタ回路26の動作を説明する。
まず、上位/下位ワード選択機能有効フラグメモリ23に「0(無効)」が設定されている場合について述べる。算術演算ユニット1から演算結果データが入力されと、バレルシフタ入力データセレクタ25を介してバレルシフタ5へ入力される。入力されたデータは、シフト量設定メモリ9に設定された数値分のシフト処理が行われる。この動作は、従来のバレルシフタと同様である。
一方、上位/下位ワード選択機能有効フラグメモリ23に「1(有効)」が設定されている場合について述べる。このとき、上位/下位ワード選択フラグメモリ22に「1(上位ワード)」が設定されている場合、算術演算ユニット1から演算結果データが入力されると、このデータは上位ワードデータと下位ワードデータに分割され、上位/下位ワードデータセレクタ24を介して上位ワードデータのみが出力される。バレルシフタ回路26はゼロワードデータ付加手段27を有しており、この出力データの上位側に、出力データと同じビット幅のゼロのワードデータを付加したデータが、バレルシフタ入力データセレクタ25を介してバレルシフタ5へ入力される。その後のシフト処理は、前記と同様の処理が行われる。
また、上位/下位ワード選択フラグメモリ22に「0(下位ワード)」が設定されている場合、算術演算ユニット1から演算結果データが入力されると、このデータは上位ワードデータと下位ワードデータに分割され、上位/下位ワードデータセレクタ24を介して下位ワードデータのみが出力される。この出力データの上位側に、出力データと同じビット幅のゼロのワードデータをゼロワードデータ付加手段27により付加したデータが、バレルシフタ入力データセレクタ25を介してバレルシフタ5へ入力される。その後のシフト処理は、前記と同様の処理が行われる。
本発明の第1実施例は上記に述べた構成にしたので、上位/下位ワード選択機能有効フラグメモリ23を「1(有効)」に設定すると、上位ワードのみシフト処理する必要がある場合、シフト量の加算処理を削除し、多段のシフト処理が削減できる。また、下位ワードのみシフト処理する必要がある場合、上位ワードのマスク処理を削除することができる。どちらにしても、数クロックを要していたシフト処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
Next, the operation of the barrel shifter circuit 26 will be described with reference to FIG.
First, the case where “0 (invalid)” is set in the upper / lower word selection function valid flag memory 23 will be described. When operation result data is input from the arithmetic operation unit 1, it is input to the barrel shifter 5 via the barrel shifter input data selector 25. The input data is shifted by a numerical value set in the shift amount setting memory 9. This operation is the same as that of a conventional barrel shifter.
On the other hand, a case where “1 (valid)” is set in the upper / lower word selection function valid flag memory 23 will be described. At this time, when “1 (upper word)” is set in the upper / lower word selection flag memory 22, when operation result data is input from the arithmetic operation unit 1, this data is converted into upper word data and lower word data. Only the upper word data is output via the upper / lower word data selector 24. The barrel shifter circuit 26 has zero word data adding means 27, and data obtained by adding zero word data having the same bit width as the output data to the upper side of the output data via the barrel shifter input data selector 25. 5 is input. Subsequent shift processing is performed in the same manner as described above.
In addition, when “0 (lower word)” is set in the upper / lower word selection flag memory 22, when operation result data is input from the arithmetic operation unit 1, this data is converted into upper word data and lower word data. The data is divided and only the lower word data is output via the upper / lower word data selector 24. Data obtained by adding zero word data having the same bit width as that of the output data by the zero word data adding unit 27 is input to the barrel shifter 5 via the barrel shifter input data selector 25 on the upper side of the output data. Subsequent shift processing is performed in the same manner as described above.
Since the first embodiment of the present invention is configured as described above, if the upper / lower word selection function valid flag memory 23 is set to “1 (valid)”, if only the upper word needs to be shifted, the shift is performed. By deleting the amount addition processing, multi-stage shift processing can be reduced. If only the lower word needs to be shifted, the mask process for the upper word can be deleted. In either case, shift processing that required several clocks can be realized with one clock, and the arithmetic processing performance can be improved.

次に本発明の第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をスルーして出力されることになる。
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 a circuit connection network provided in the arithmetic processing device 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.

本発明の第2実施例は上記に述べた構成にしたので、本演算処理装置では、リミット処理を算術演算ユニットの大小比較(<、>など)にて実行する場合と異なり、上限と下限のリミット処理を一度に1クロックで実行可能なため、処理の高速化を実現できる。また、リミット処理の演算実行ありなしに関わらず、一定の演算クロック数にて処理を完了させるため、リアルタイム性を維持することができる。   Since the second embodiment of the present invention is configured as described above, the present arithmetic processing unit differs from the case where the limit processing is executed by comparing the arithmetic operation units (<,>, etc.) with the upper and lower limits. 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.

次に本発明の第3実施例を説明する。
図4は本発明の第3実施例を示す算術演算ユニットに内蔵する加算器の構成図である。
図4において、13は加算器、14は加算器機能有効フラグメモリである。
第3実施例が第1、第2実施例と異なる点は、算術演算ユニット1が、加算結果にキャリーが発生する場合には1を出力し、ボローが発生する場合にはマイナス1を出力する加算器13と、この加算器の機能を有効とするためのフラグメモリ14を備えたものである。
この有効フラグが無効の場合は、通常の加算器として機能するものである。
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, and 14 is an adder function valid flag memory.
The third embodiment is different from the first and second embodiments in that the arithmetic unit 1 outputs 1 when a carry occurs in the addition result, and outputs minus 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.

次に動作を説明する。
この加算器13を内蔵する算術演算ユニット1を使用することで、従来の加算器にて加算結果にキャリーまたはボローが発生した場合、各状態を示すフラグを利用し、ソフトウェアにより一致/不一致の演算(=、!=など)にて条件判断を行い、キャリーの場合は上位ワードに1を加算し、ボローの場合は1を減算していた処理が削減可能となる。つまり、加算器機能フラグメモリ14を有効とし、キャリー/ボローどちらの処理でも加算結果と上位ワードを加算すれば良いことになる。
本発明の第3実施例は上記に述べた構成にしたので、数クロックを要していた条件判断処理が1クロックで実現可能となり、演算処理性能を向上させることができる。
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.

次に本発明の第4実施例を説明する。
図5は本発明の第4実施例を示す演算処理装置のブロック図である。
15は本発明の第1〜3実施例で述べた演算処理装置である。
第4実施例が第1〜3実施例と異なる点は、演算処理装置15を複数並列に配置した点である。各演算処理装置内部での処理内容は、既に実施例として記載しているとおりである。
しかし、これら演算処理装置を並列に配置することで、本発明の演算処理装置を1個利用した場合、数回に分けて演算を行っていた処理を、並列演算することが可能となる。
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.
Reference numeral 15 denotes the arithmetic processing unit described in the first to third embodiments of the present invention.
The fourth embodiment is different from the first to third embodiments in that a plurality of arithmetic processing devices 15 are arranged in parallel. The contents of processing in each arithmetic processing unit are as already described in the embodiments.
However, by arranging these arithmetic processing devices in parallel, when one arithmetic processing device of the present invention is used, it is possible to perform parallel processing on the processing that has been performed in several steps.

本発明の第4実施例は上記に述べた構成にしたので、並列の演算処理を実行するシステムでは、本演算処理装置の並列演算機能を活用することで、大幅な演算性能を向上させることができる。   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 significantly improve the arithmetic performance by utilizing the parallel arithmetic function of the arithmetic processing unit. it can.

複雑な演算を並列処理により演算性能を向上できるので、FA用途の制御装置や信号処理装置の高性能化に利用することができる。   Since the computation performance can be improved by parallel processing of complex computations, it can be used to improve the performance of FA-use control devices and signal processing devices.

本発明の第1実施例を示す演算処理装置のブロック図である。It is a block diagram of the arithmetic processing unit showing the first embodiment of the present invention. 本発明のバレルシフタ回路の構成図である。It is a block diagram of the barrel shifter circuit of this invention. 本発明の第2実施例を示す演算処理装置のブロック図である。It is a block diagram of the arithmetic processing unit which shows 2nd Example of this invention. 本発明の第3実施例を示す算術演算ユニットに内蔵する加算器の構成図である。It is a block diagram of the adder built in the arithmetic operation unit which shows 3rd Example of this invention. 本発明の第4実施例を示す演算処理装置のブロック図である。It is a block diagram of the arithmetic processing unit which shows 4th Example of this invention. 従来例を示す演算処理装置のブロック図である。It is a block diagram of the arithmetic processing unit which shows a prior art example.

符号の説明Explanation of symbols

1 算術演算ユニット
2 入力メモリ
3 出力メモリ
4 オペコード設定メモリ
5 バレルシフタ
6 回路接続網
7 マルチプレクサ
8 演算機能コード設定メモリ
9 シフト量設定メモリ
10 コンパレータ
11 上限/下限リミット設定メモリ
12 コンパレータ機能有効フラグメモリ
13 加算器
14 加算器機能有効フラグメモリ
15 演算処理装置
21 コンパレータ入力データLIN
22 上位/下位ワード選択フラグメモリ
23 上位/下位ワード選択機能有効フラグメモリ
24 上位/下位ワードデータセレクタ
25 バレルシフタ入力データセレクタ
26 バレルシフタ回路
27 ゼロワードデータ付加手段
DESCRIPTION OF SYMBOLS 1 Arithmetic operation unit 2 Input memory 3 Output memory 4 Operation code setting memory 5 Barrel shifter 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 effective flag memory 13 Addition 14 Adder function valid flag memory 15 Arithmetic processor 21 Comparator input data LIN
22 upper / lower word selection flag memory 23 upper / lower word selection function valid flag memory 24 upper / lower word data selector 25 barrel shifter input data selector 26 barrel shifter circuit 27 zero word data addition means

Claims (3)

複数の入力データを保持するための入力メモリと、加減乗除、論理演算および数値比較を行うための複数の算術演算ユニットと、前記算術演算ユニットにて実行する機能を決定するための複数のオペコード設定メモリと、前記算術演算ユニットからの演算結果を保持する出力メモリと、前記算術演算ユニットにて実行された演算結果を用いてシフト処理する複数のバレルシフタ回路と、該演算結果のシフト量を決定する設定メモリと、前記バレルシフタ回路で得られた複数の演算結果を切り替えて出力するマルチプレクサと、前記マルチプレクサからの出力値を選択する演算機能コード設定メモリと、を備えた演算処理装置において、
前記バレルシフタ回路は、前記算術演算ユニットからの演算結果を入力データとし、該入力データの上位または下位ワードを選択するためのフラグメモリと、
上位または下位ワードデータを選択するセレクタと、
前記セレクタの出力データにゼロのワードデータを付加するゼロワードデータ付加手段と、
上位または下位ワード選択機能を有効とするためのフラグメモリと、
前記バレルシフタ回路への入力データを切り替えるためのセレクタと、を備えたことを特徴とする演算処理装置。
An input memory for holding a plurality of input data, a plurality of arithmetic operation units for performing addition / subtraction / multiplication / division, logical operation and numerical comparison, and a plurality of operation code settings for determining a function to be executed by the arithmetic operation unit A memory, an output memory for holding an operation result from the arithmetic operation unit, a plurality of barrel shifter circuits that perform shift processing using the operation result executed by the arithmetic operation unit, and a shift amount of the operation result are determined; In an arithmetic processing device comprising: a setting memory; a multiplexer that switches and outputs a plurality of arithmetic results obtained by the barrel shifter circuit; and an arithmetic function code setting memory that selects an output value from the multiplexer.
The barrel shifter circuit uses a calculation result from the arithmetic operation unit as input data, and a flag memory for selecting an upper or lower word of the input data;
A selector for selecting upper or lower word data;
Zero word data adding means for adding zero word data to the output data of the selector;
A flag memory to enable the upper or lower word selection function;
An arithmetic processing unit comprising: a selector for switching input data to the barrel shifter circuit.
リミット演算処理を行うためのコンパレータと、
上限および下限リミット設定値を保存するためのメモリと、
前記コンパレータ機能を有効とするフラグメモリと、を備えたことを特徴とする請求項1記載の演算処理装置。
A comparator for performing limit calculation processing;
Memory for storing upper and lower limit setpoints,
The arithmetic processing apparatus according to claim 1, further comprising: a flag memory that enables the comparator function.
前記演算処理装置を、複数個並列に配置したことを特徴とする請求項1または請求項2記載の演算処理装置。3. The arithmetic processing device according to claim 1, wherein a plurality of the arithmetic processing devices are arranged in parallel.
JP2003363974A 2003-10-24 2003-10-24 Arithmetic processing unit Expired - Fee Related JP4258350B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003363974A JP4258350B2 (en) 2003-10-24 2003-10-24 Arithmetic processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003363974A JP4258350B2 (en) 2003-10-24 2003-10-24 Arithmetic processing unit

Publications (2)

Publication Number Publication Date
JP2005128807A JP2005128807A (en) 2005-05-19
JP4258350B2 true JP4258350B2 (en) 2009-04-30

Family

ID=34643100

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003363974A Expired - Fee Related JP4258350B2 (en) 2003-10-24 2003-10-24 Arithmetic processing unit

Country Status (1)

Country Link
JP (1) JP4258350B2 (en)

Also Published As

Publication number Publication date
JP2005128807A (en) 2005-05-19

Similar Documents

Publication Publication Date Title
US7171535B2 (en) Serial operation pipeline, arithmetic device, arithmetic-logic circuit and operation method using the serial operation pipeline
US6009451A (en) Method for generating barrel shifter result flags directly from input data
JP2008071130A (en) Simd type microprocessor
JPH0667851A (en) Multiplier provided with overflow detecting function
KR20050071614A (en) Arrangement, system and method for vector permutation in single-instruction multiple-data microprocessors
US20060218378A1 (en) Integrated circuit device
JP4258350B2 (en) Arithmetic processing unit
CN108196881B (en) Fixed-point operation acceleration unit based on configurable technology
US20080307029A1 (en) Arithmetic device and arithmetic method
JP4129280B2 (en) Barrel shift device
JP2006072961A (en) Memory circuit for arithmetic processing unit
JP3804591B2 (en) Arithmetic processing unit
US20100088493A1 (en) Image processing device and data processor
US7047271B2 (en) DSP execution unit for efficient alternate modes for processing multiple data sizes
JP4873546B2 (en) Data processing apparatus and data processing method
US9606798B2 (en) VLIW processor, instruction structure, and instruction execution method
JP2014164659A (en) Processor
US20060271610A1 (en) Digital signal processor having reconfigurable data paths
US20030037088A1 (en) Speed of execution of a conditional subtract instruction and increasing the range of operands over which the instruction would be performed correctly
JP2003099250A (en) Register readout circuit and microprocessor
KR100251547B1 (en) Digital signal processor
US20110066827A1 (en) Multiprocessor
US20070180016A1 (en) Method of operand width reduction to enable usage of narrower saturation adder
JP5701930B2 (en) Semiconductor device
US20050283581A1 (en) Data reading structure

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060906

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081107

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081211

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

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

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

Free format text: PAYMENT UNTIL: 20120220

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20130220

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20140220

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20150220

Year of fee payment: 6

LAPS Cancellation because of no payment of annual fees