JP2012194599A - Arithmetic unit and error detection method - Google Patents

Arithmetic unit and error detection method Download PDF

Info

Publication number
JP2012194599A
JP2012194599A JP2011055853A JP2011055853A JP2012194599A JP 2012194599 A JP2012194599 A JP 2012194599A JP 2011055853 A JP2011055853 A JP 2011055853A JP 2011055853 A JP2011055853 A JP 2011055853A JP 2012194599 A JP2012194599 A JP 2012194599A
Authority
JP
Japan
Prior art keywords
unit
nop
operand
signal
arithmetic
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.)
Granted
Application number
JP2011055853A
Other languages
Japanese (ja)
Other versions
JP5732933B2 (en
Inventor
Satoshi Nakazato
聡 中里
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2011055853A priority Critical patent/JP5732933B2/en
Publication of JP2012194599A publication Critical patent/JP2012194599A/en
Application granted granted Critical
Publication of JP5732933B2 publication Critical patent/JP5732933B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Advance Control (AREA)
  • Executing Machine-Instructions (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To increase an error detection effect.SOLUTION: An arithmetic unit 1 includes an instruction control section 100, a first operant control section 200, a second operand control section 300, an arithmetic section 400, an NOP detection section 500, and an error detection section 600. According to control signals outputted by the NOP detection section 500, the instruction control section 100, the first operand control section 200, and the second operand control section 300 output input signals received in a clock cycle immediately before to the arithmetic section 400 as test signals. The error detection section 600 compares arithmetic result data obtained by the arithmetic section 400 with test arithmetic result data, and discriminates whether or not an error has occurred.

Description

本発明は、演算装置及びエラー検出方法に関する。   The present invention relates to an arithmetic device and an error detection method.

算術演算器のエラーを検出する方法として、一般的には、モジュロ3チェックや、パリティ・プリディクションなどの手法が用いられる。また、この他に、算術演算器全体をエラーの検出対象とする手法が提案されている。   Generally, methods such as modulo 3 check and parity prediction are used as methods for detecting errors in arithmetic units. In addition to this, a method has been proposed in which the entire arithmetic operator is targeted for error detection.

特許文献1は、スーパースカラプロセッサ等で同一の機能を有する2つのALU(Arithmetic Logic Unit)を有する算術論理演算器において、一方のALUにしか有効な演算処理が行われていないタイミングで、両方のALUに同一のデータを与えて同じ処理を実行させ、互いの出力同士を比較することでエラーを検出する方法を開示している。   In Patent Document 1, an arithmetic logic unit having two ALUs (Arithmetic Logic Units) having the same function in a superscalar processor or the like is used at the timing when only one ALU performs an effective arithmetic process. A method of detecting an error by giving the same data to the ALU to execute the same processing and comparing the outputs of each other is disclosed.

特許文献2は、WAIT状態の時に、機能診断用データが格納された記憶手段からデータを読み出して演算を実行し、演算後の結果を予め格納されていた診断データと比較することでエラーを検出する方法を開示している。   In Patent Document 2, in the WAIT state, data is read from the storage means storing the function diagnosis data, the calculation is performed, and an error is detected by comparing the result after the calculation with the diagnostic data stored in advance. The method of doing is disclosed.

特開平3−014134号公報JP-A-3-014134 特開平9−282166号公報JP-A-9-282166

パリティ・プリディクション等の一般的なエラー検出方法は、検査回路が複雑な構成になるため、コストや回路規模の都合上、一部の回路にのみ搭載されることが多い。このため、このようなエラー検出方法では、全ての回路におけるエラーを検出することができない。   A general error detection method such as parity prediction has a complicated configuration of an inspection circuit, and is often mounted only on a part of the circuits because of cost and circuit scale. For this reason, such an error detection method cannot detect errors in all circuits.

また、特許文献1が開示する手法は、2つのALUの出力を比較することでエラーを検出する方法であるため、ALUを1つしか有していない算術論理演算器においては適用することができない。   Further, since the method disclosed in Patent Document 1 is a method of detecting an error by comparing the outputs of two ALUs, it cannot be applied to an arithmetic logic unit having only one ALU. .

また、特許文献2が開示する手法は、ALUが1つしか有さない場合でも適用できるが、試験データを予め格納しておく必要があり、実行する試験命令や試験データが限られる。よって、エラー検出効果が限定されることとなり、特許文献2が開示する手法では、演算器内でエラーを検出できない箇所が存在し得ることとなる。   The technique disclosed in Patent Document 2 can be applied even when there is only one ALU, but it is necessary to store test data in advance, and test instructions and test data to be executed are limited. Therefore, the error detection effect is limited, and with the method disclosed in Patent Document 2, there may be a portion where an error cannot be detected in the arithmetic unit.

本発明は、上記事情に鑑みてなされたものであり、エラーの検出効果を高くすることができる演算装置及びエラー検出方法を提供することを目的とする。   The present invention has been made in view of the above circumstances, and an object of the present invention is to provide an arithmetic device and an error detection method capable of enhancing the error detection effect.

上記目的を達成するため、本発明の第1の観点に係る演算装置は、
演算装置に有効な演算命令が入力されていないNOP状態の検出に従って、受信する入力信号を制御する制御信号を出力するNOP検出部と、
前記NOP検出部が出力した前記制御信号に従って、演算命令を示すOPコード信号を受信し、受信した前記OPコード信号を出力する命令制御部と、
前記NOP検出部が出力した前記制御信号に従って、被演算データを示すオペランド信号を受信し、受信した前記オペランド信号を出力するオペランド制御部と、
前記命令制御部が出力した前記OPコード信号が示す演算命令に従って、前記オペランド制御部が出力した前記オペランド信号が示す被演算データに対する演算処理を実行し、求めた演算結果データを出力する演算部と、
前記演算部が出力した前記演算結果データに基づいて、エラーが発生したか否かを判別するエラー検出部と、を備える、
ことを特徴とする。
In order to achieve the above object, an arithmetic device according to the first aspect of the present invention provides:
A NOP detection unit that outputs a control signal for controlling an input signal to be received in accordance with detection of a NOP state in which a valid operation command is not input to the arithmetic device;
In accordance with the control signal output from the NOP detector, an instruction control unit that receives an OP code signal indicating an operation command and outputs the received OP code signal;
According to the control signal output from the NOP detection unit, an operand control unit that receives an operand signal indicating operation data and outputs the received operand signal;
An arithmetic unit that performs arithmetic processing on the operand data indicated by the operand signal output from the operand control unit according to the arithmetic instruction indicated by the OP code signal output from the instruction control unit, and outputs the obtained arithmetic result data; ,
An error detection unit that determines whether an error has occurred based on the calculation result data output by the calculation unit;
It is characterized by that.

上記目的を達成するため、本発明の第2の観点に係るエラー検出方法は、
演算装置に有効な演算命令が入力されていないNOP状態の検出に従って、受信する入力信号を制御する制御信号を出力するNOP検出ステップと、
前記NOP検出ステップで出力した前記制御信号に従って、演算命令を示すOPコード信号を受信し、受信した前記OPコード信号を出力する命令制御ステップと、
前記NOP検出ステップで出力した前記制御信号に従って、被演算データを示すオペランド信号を受信し、受信した前記オペランド信号を出力するオペランド制御ステップと、
前記命令制御ステップで出力した前記OPコード信号が示す演算命令に従って、前記オペランド制御ステップで出力した前記オペランド信号が示す被演算データに対する演算処理を実行し、求めた演算結果データを出力する演算ステップと、
前記演算ステップで出力した前記演算結果データに基づいて、エラーが発生したか否かを判別するエラー検出ステップと、を備える、
ことを特徴とする。
In order to achieve the above object, an error detection method according to a second aspect of the present invention includes:
A NOP detection step of outputting a control signal for controlling an input signal to be received in accordance with detection of a NOP state in which a valid arithmetic command is not input to the arithmetic device;
In accordance with the control signal output in the NOP detection step, an instruction control step of receiving an OP code signal indicating an operation instruction and outputting the received OP code signal;
According to the control signal output in the NOP detecting step, receiving an operand signal indicating data to be processed, and outputting the received operand signal;
An arithmetic step of performing arithmetic processing on the operand data indicated by the operand signal output in the operand control step and outputting the calculated arithmetic result data in accordance with the arithmetic instruction indicated by the OP code signal output in the instruction control step; ,
An error detection step of determining whether an error has occurred based on the calculation result data output in the calculation step;
It is characterized by that.

本発明によれば、エラーの検出効果を高くすることができる。   According to the present invention, the error detection effect can be enhanced.

本発明の第1実施形態に係る演算装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the arithmetic unit which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係る演算装置の詳細な構成例を示す回路図である。It is a circuit diagram which shows the detailed structural example of the arithmetic unit which concerns on 1st Embodiment of this invention. 本発明の第1実施形態に係る演算装置の動作例のフローを示すタイムチャートである。It is a time chart which shows the flow of the operation example of the arithmetic unit which concerns on 1st Embodiment of this invention. 本発明の第2実施形態に係る演算装置の構成例を示すブロック図である。It is a block diagram which shows the structural example of the arithmetic unit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る演算装置の詳細な構成例を示す回路図である。It is a circuit diagram which shows the detailed structural example of the arithmetic unit which concerns on 2nd Embodiment of this invention. 本発明の第2実施形態に係る演算装置の動作例のフローを示すタイムチャートである。It is a time chart which shows the flow of the operation example of the arithmetic unit which concerns on 2nd Embodiment of this invention. 本発明の第3実施形態に係る演算装置の詳細な構成例を示す回路図である。It is a circuit diagram which shows the detailed structural example of the arithmetic unit which concerns on 3rd Embodiment of this invention. 本発明の第3実施形態に係る演算装置の動作例のフローを示すタイムチャートである。It is a time chart which shows the flow of the operation example of the arithmetic unit which concerns on 3rd Embodiment of this invention. 本発明の各実施形態に係る演算装置のハードウェア構成の一例を示すブロック図である。It is a block diagram which shows an example of the hardware constitutions of the arithmetic unit which concerns on each embodiment of this invention.

本発明の実施形態に係る演算装置について、図面を参照して説明する。   An arithmetic device according to an embodiment of the present invention will be described with reference to the drawings.

[第1実施形態]
本実施形態に係る演算装置1は、図1に示すように、命令制御部100と、第1オペランド制御部200と、第2オペランド制御部300と、演算部400と、NOP(No Operation)検出部500と、エラー検出部600と、を備える。
[First Embodiment]
As shown in FIG. 1, the arithmetic device 1 according to the present embodiment includes an instruction control unit 100, a first operand control unit 200, a second operand control unit 300, a calculation unit 400, and NOP (No Operation) detection. Unit 500 and error detection unit 600.

命令制御部100は、演算部400に対する入力信号であるOP(Operation)コード信号を外部から受信し、OPコード信号を演算部400とNOP検出部500に出力する。さらに、命令制御部100は、OPコード信号を再帰的に自身に出力する。   The instruction control unit 100 receives an OP (Operation) code signal that is an input signal to the calculation unit 400 from the outside, and outputs the OP code signal to the calculation unit 400 and the NOP detection unit 500. Furthermore, the instruction control unit 100 recursively outputs the OP code signal to itself.

なお、OPコード信号とは、演算部400が演算命令を実行する際に必要な全ての制御信号を含む信号である。例えば、有効な演算命令であるか否かを示すバリッド信号や、演算命令の種別を識別する信号、浮動小数点演算である場合の丸め制御信号等である。   The OP code signal is a signal including all control signals necessary when the arithmetic unit 400 executes an arithmetic instruction. For example, a valid signal indicating whether the operation instruction is valid, a signal for identifying the type of the operation instruction, a rounding control signal in the case of a floating point operation, or the like.

第1オペランド制御部200は、入力信号である被演算データとなる第1オペランド信号を外部から受信し、第1オペランド信号を演算部400に出力する。また、第1オペランド制御部200は、第1オペランド信号を第2オペランド制御部300に出力する。   The first operand control unit 200 receives a first operand signal, which is an operation signal, which is an input signal, from the outside, and outputs the first operand signal to the operation unit 400. Further, the first operand control unit 200 outputs the first operand signal to the second operand control unit 300.

第2オペランド制御部300は、入力信号である被演算データとなる第2オペランド信号を外部から受信し、第2オペランド信号を演算部400に出力する。また、第2オペランド制御部300は、第2オペランド信号を第1オペランド制御部200に出力する。   The second operand control unit 300 receives from the outside a second operand signal, which is an operation signal that is an input signal, and outputs the second operand signal to the calculation unit 400. Further, the second operand control unit 300 outputs the second operand signal to the first operand control unit 200.

演算部400は、命令制御部100が出力したOPコード信号と、第1オペランド制御部200と第2オペランド制御部300が出力した第1オペランド信号と第2オペランド信号と、を受信する。演算部400は、OPコード信号が示す演算命令に従って演算処理を行い、演算結果のデータをエラー検出部600に出力する。なお、後述する動作により、演算部400は、タイミングをずらして被演算データを入れ替えて演算処理を実行する。この演算結果のデータも、エラー検出部600に出力される。   The arithmetic unit 400 receives the OP code signal output from the instruction control unit 100, and the first and second operand signals output from the first operand control unit 200 and the second operand control unit 300. Arithmetic unit 400 performs arithmetic processing according to the arithmetic instruction indicated by the OP code signal, and outputs data of the arithmetic result to error detection unit 600. Note that the calculation unit 400 performs calculation processing by exchanging data to be calculated at different timings by an operation described later. This calculation result data is also output to the error detection unit 600.

NOP検出部500は、命令制御部100が出力したOPコード信号を受信し、NOP状態を検出する。NOP検出部500は、NOP検出信号をエラー検出部600に出力し、また、NOP検出信号を命令制御部100、第1オペランド制御部200、第2オペランド制御部300の制御信号として出力する。なお、NOP状態とは、OPコード信号が無効である状態のことである。   The NOP detection unit 500 receives the OP code signal output from the instruction control unit 100 and detects the NOP state. The NOP detection unit 500 outputs a NOP detection signal to the error detection unit 600, and outputs the NOP detection signal as control signals for the instruction control unit 100, the first operand control unit 200, and the second operand control unit 300. The NOP state is a state where the OP code signal is invalid.

エラー検出部600は、演算部400が出力した二つの演算結果のデータを比較し、NOP検出部500が出力したNOP検出信号が示す値と、比較結果を示す値とを基に、エラーが発生しているか否かを検出する。また、エラー検出部600は、演算部400が出力した演算結果のデータを、外部に出力する。   The error detection unit 600 compares two calculation result data output from the calculation unit 400, and an error occurs based on the value indicated by the NOP detection signal output by the NOP detection unit 500 and the value indicating the comparison result. It is detected whether it is doing. Further, the error detection unit 600 outputs the calculation result data output from the calculation unit 400 to the outside.

以上が、演算装置1の構成である。   The above is the configuration of the arithmetic device 1.

続いて、演算装置1の詳細な構成の一例について説明する。   Next, an example of a detailed configuration of the arithmetic device 1 will be described.

命令制御部100は、図2に示すように、2入力セレクタ110と、OPコードレジスタ120と、から構成される。入力信号であるOPコード信号は、2入力セレクタ110を介してOPコードレジスタ120に記憶される。2入力セレクタ110は、一方の入力を外部からの入力信号であるOPコード信号とし、他方の入力をOPコードレジスタ120から出力されるOPコード信号とする。他方の入力が有効になった場合、OPコードレジスタ120の値が保持されることになる。   The instruction control unit 100 includes a two-input selector 110 and an OP code register 120 as shown in FIG. An OP code signal which is an input signal is stored in the OP code register 120 via the two-input selector 110. The two-input selector 110 uses one input as an OP code signal that is an external input signal, and the other input as an OP code signal output from the OP code register 120. When the other input becomes valid, the value of the OP code register 120 is held.

第1オペランド制御部200は、2入力セレクタ210と、第1オペランドレジスタ220と、から構成される。入力信号である第1オペランド信号は、2入力セレクタ210を介して第1オペランドレジスタ220に記憶される。   The first operand control unit 200 includes a two-input selector 210 and a first operand register 220. The first operand signal that is an input signal is stored in the first operand register 220 via the two-input selector 210.

第2オペランド制御部300は、2入力セレクタ310と、第2オペランドレジスタ320と、から構成される。入力信号である第2オペランド信号は、2入力セレクタ310を介して第2オペランドレジスタ320に記憶される。   The second operand control unit 300 includes a two-input selector 310 and a second operand register 320. The second operand signal that is an input signal is stored in the second operand register 320 via the two-input selector 310.

第1オペランドレジスタ220に記憶される第1オペランド信号は、第2オペランド制御部300の2入力セレクタ310に出力される。また、第2オペランドレジスタ320に記憶される第2オペランド信号は、第1オペランド制御部200の2入力セレクタ210に出力される。   The first operand signal stored in the first operand register 220 is output to the 2-input selector 310 of the second operand control unit 300. The second operand signal stored in the second operand register 320 is output to the 2-input selector 210 of the first operand control unit 200.

すなわち、第1オペランド制御部200の2入力セレクタ210は、一方の入力を第1オペランド信号とし、他方の入力を第2オペランド信号とする。また、第2オペランド制御部300の2入力セレクタ310は、一方の入力を第2オペランド信号とし、他方の入力を第1オペランド信号とする。   That is, the two-input selector 210 of the first operand control unit 200 uses one input as the first operand signal and the other input as the second operand signal. The two-input selector 310 of the second operand control unit 300 uses one input as a second operand signal and the other input as a first operand signal.

演算部400は、算術演算器410と、第1演算結果レジスタ420と、第2演算結果レジスタ430と、から構成される。算術演算器410は、OPコードレジスタ120に記憶されるOPコード信号、第1オペランドレジスタ220と第2オペランドレジスタ320に記憶される二つのオペランド信号、を入力とし、OPコード信号に基づいて演算処理を実行する。第1演算結果レジスタ420は、算術演算器410が出力した演算結果のデータを記憶し、第2演算結果レジスタ430は、第1演算結果レジスタ420が出力した演算結果のデータを記憶する。なお、算術演算器410が実行する演算処理は、加算、乗算、整数加算、整数乗算、浮動小数点加算、浮動小数点乗算等である。   The operation unit 400 includes an arithmetic operation unit 410, a first operation result register 420, and a second operation result register 430. The arithmetic operation unit 410 receives an OP code signal stored in the OP code register 120 and two operand signals stored in the first operand register 220 and the second operand register 320 as input, and performs arithmetic processing based on the OP code signal. Execute. The first operation result register 420 stores operation result data output from the arithmetic operation unit 410, and the second operation result register 430 stores operation result data output from the first operation result register 420. The arithmetic processing executed by the arithmetic operator 410 includes addition, multiplication, integer addition, integer multiplication, floating point addition, floating point multiplication, and the like.

NOP検出部500は、NOP検出器510と、第1NOPレジスタ520と、第2NOPレジスタ530と、から構成される。NOP検出器510は、一方の入力を入力信号であるOPコード信号とし、他方の入力をOPコードレジスタ120に記憶されるOPコード信号とする。NOP検出器510が出力するNOP検出信号は、2入力セレクタ110、210、310の制御信号として出力される。第1NOPレジスタ520は、NOP検出器510が出力したNOP検出信号が示す値を記憶する。第2NOPレジスタ530は、第1NOPレジスタ520が出力した値を記憶する。   The NOP detection unit 500 includes a NOP detector 510, a first NOP register 520, and a second NOP register 530. The NOP detector 510 uses one input as an OP code signal which is an input signal, and the other input as an OP code signal stored in the OP code register 120. The NOP detection signal output from the NOP detector 510 is output as a control signal for the two-input selectors 110, 210, and 310. First NOP register 520 stores a value indicated by the NOP detection signal output from NOP detector 510. The second NOP register 530 stores the value output from the first NOP register 520.

NOP検出器510は、一方の入力、すなわち入力信号であるOPコード信号が無効であり、他方の入力、すなわちOPコードレジスタ120に記憶されているOPコード信号が有効であるタイミングを検出する。すなわち、NOP検出器510は、直前に演算命令が入力されており、かつ、現在演算命令が入力されていないタイミングを検出する。   The NOP detector 510 detects the timing at which one input, that is, the OP code signal that is an input signal is invalid, and the other input, that is, the OP code signal stored in the OP code register 120 is valid. That is, the NOP detector 510 detects the timing when the operation command is input immediately before and the current operation command is not input.

エラー検出部600は、比較器610と、論理積回路620と、から構成される。比較器610は、第1演算結果レジスタ420に記憶された演算結果のデータと、第2演算結果レジスタ430に記憶された演算結果のデータと、を比較する。論理積回路620は、第2NOPレジスタ530に記憶されるNOP検出信号が示す値と比較器610が出力した比較結果を示す値との論理積を出力する。この出力結果が、エラー検出信号となる。   The error detection unit 600 includes a comparator 610 and a logical product circuit 620. The comparator 610 compares the calculation result data stored in the first calculation result register 420 with the calculation result data stored in the second calculation result register 430. The AND circuit 620 outputs a logical product of the value indicated by the NOP detection signal stored in the second NOP register 530 and the value indicating the comparison result output from the comparator 610. This output result becomes an error detection signal.

以上が、演算装置1の詳細な構成である。   The detailed configuration of the arithmetic device 1 has been described above.

続いて、演算装置1の具体的な動作の一例について、タイミングチャートを参照して具体的に説明する。   Subsequently, an example of a specific operation of the arithmetic device 1 will be specifically described with reference to a timing chart.

図3に示すように、クロックサイクルT1では、有効な演算命令のOPコードMUL(乗算)と、その演算処理に対する第1オペランドY0と、第2オペランドZ0と、が入力されている。   As shown in FIG. 3, in a clock cycle T1, an OP code MUL (multiplication) of a valid operation instruction, a first operand Y0 and a second operand Z0 for the operation processing are input.

クロックサイクルT2では、有効な演算命令のOPコードADD(加算)と、その演算処理に対する第1オペランドY1と、第2オペランドZ1と、が入力されている。また、クロックサイクルT1で入力されたOPコードMULが、OPコードレジスタ120に記憶され、第1オペランドY0が、第1オペランドレジスタ220に記憶され、第2オペランドZ0が、第2オペランドレジスタ320に記憶されている。   In the clock cycle T2, the OP code ADD (addition) of a valid operation instruction, the first operand Y1 for the operation process, and the second operand Z1 are input. The OP code MUL input at clock cycle T1 is stored in the OP code register 120, the first operand Y0 is stored in the first operand register 220, and the second operand Z0 is stored in the second operand register 320. Has been.

クロックサイクルT3では、有効な演算命令が存在しないため、NOP検出器510はNOP状態を検出している。また、クロックサイクルT1で入力された演算命令に対する演算処理が終了し、第1演算結果レジスタ420は、演算結果X0を記憶し、演算結果としてX0が出力されている。また、クロックサイクルT2で入力されたOPコードADDが、OPコードレジスタ120に記憶され、第1オペランドY1が、第1オペランドレジスタ220に記憶され、第2オペランドZ1が、第2オペランドレジスタ320に記憶されている。   In clock cycle T3, since there is no valid operation instruction, NOP detector 510 detects the NOP state. In addition, the arithmetic processing for the arithmetic instruction input in the clock cycle T1 ends, the first arithmetic result register 420 stores the arithmetic result X0, and X0 is output as the arithmetic result. Further, the OP code ADD input at the clock cycle T2 is stored in the OP code register 120, the first operand Y1 is stored in the first operand register 220, and the second operand Z1 is stored in the second operand register 320. Has been.

クロックサイクルT4では、有効な演算命令のOPコードADDと、その演算処理に対する第1オペランドY2と、第2オペランドZ2と、が入力されている。また、クロックサイクルT2で入力された演算命令に対する演算処理が終了し、第1演算結果レジスタ420は、演算結果X1を記憶し、演算結果としてX1が出力されている。このとき、第2演算結果レジスタ430は、クロックサイクルT1で入力された演算命令の演算結果X0を記憶している。クロックサイクルT4では、有効な演算命令が入力されているため、NOP検出器510はNOP状態を検出しないが、第1NOPレジスタ520は、NOP状態を示す値(例えば真)を記憶している。   In the clock cycle T4, the OP code ADD of a valid operation instruction, the first operand Y2 for the operation processing, and the second operand Z2 are input. Further, the arithmetic processing for the arithmetic instruction input in the clock cycle T2 is completed, the first arithmetic result register 420 stores the arithmetic result X1, and X1 is output as the arithmetic result. At this time, the second operation result register 430 stores the operation result X0 of the operation instruction input in the clock cycle T1. In the clock cycle T4, since a valid operation instruction is input, the NOP detector 510 does not detect the NOP state, but the first NOP register 520 stores a value (eg, true) indicating the NOP state.

ここで、クロックサイクルT3で出力されたNOP検出信号は、2入力セレクタ110、210、310に出力され、2入力セレクタ110、210、310は、入力信号を切り替える。すなわち、2入力セレクタ110は、OPコードレジスタ120に記憶されているOPコードを入力とし、2入力セレクタ210は、第2オペランドレジスタ320に記憶されている第2オペランドを入力とし、2入力セレクタ310は、第1オペランドレジスタ220に記憶されている第1オペランドを入力とする。   Here, the NOP detection signal output in the clock cycle T3 is output to the 2-input selectors 110, 210, and 310, and the 2-input selectors 110, 210, and 310 switch the input signals. That is, the 2-input selector 110 receives the OP code stored in the OP code register 120 as input, and the 2-input selector 210 receives the second operand stored in the second operand register 320 as input. Takes as input the first operand stored in the first operand register 220.

このため、OPコードレジスタ120は、クロックサイクルT3で記憶されたOPコードと同じOPコードADDを記憶し、第1オペランドレジスタ220は、クロックサイクルT3で第2オペランドレジスタ320に記憶された第2オペランドZ1を記憶し、第2オペランドレジスタ320は、クロックサイクルT3で第1オペランドレジスタ220に記憶された第1オペランドY1を記憶する。   Therefore, the OP code register 120 stores the same OP code ADD as the OP code stored in the clock cycle T3, and the first operand register 220 stores the second operand stored in the second operand register 320 in the clock cycle T3. Z1 is stored, and the second operand register 320 stores the first operand Y1 stored in the first operand register 220 in the clock cycle T3.

すなわち、クロックサイクルT4では、第1オペランドレジスタ220と第2オペランドレジスタ320に記憶されている値は、NOP状態を検出したクロックサイクルT3で記憶されていた値をそれぞれ入れ替えたデータとなる。   That is, in the clock cycle T4, the values stored in the first operand register 220 and the second operand register 320 are data obtained by replacing the values stored in the clock cycle T3 in which the NOP state is detected.

なお、クロックサイクルT4では、NOP状態を検出していないため、2入力セレクタ110、210、310の入力は元に戻る。   In the clock cycle T4, since the NOP state is not detected, the inputs of the two-input selectors 110, 210, and 310 are restored.

クロックサイクルT5では、有効な演算命令のOPコードMULと、その演算処理に対する第1オペランドY3と、第2オペランドZ3と、が入力されている。また、OPコードレジスタ120は、クロックサイクルT4で入力されたOPコードADDを記憶し、第1オペランドレジスタ220は、クロックサイクルT4で入力された第1オペランドY2を記憶し、第2オペランドレジスタ320は、クロックサイクルT4で入力された第2オペランドZ2を記憶している。クロックサイクルT4で第1演算結果レジスタ420に記憶された演算結果X1は、第2演算結果レジスタ430に記憶されている。   In the clock cycle T5, the valid operation instruction OP code MUL, the first operand Y3 for the operation processing, and the second operand Z3 are input. The OP code register 120 stores the OP code ADD input in the clock cycle T4, the first operand register 220 stores the first operand Y2 input in the clock cycle T4, and the second operand register 320 The second operand Z2 input at the clock cycle T4 is stored. The calculation result X1 stored in the first calculation result register 420 at the clock cycle T4 is stored in the second calculation result register 430.

また、クロックサイクルT5では、上述のようにクロックサイクルT4で入れ替えたオペランドの演算結果X1’が、第1演算結果レジスタ420に記憶されている。また、クロックサイクルT4で第1NOPレジスタ520に記憶されたNOP検出信号は、クロックサイクルT5では第2NOPレジスタ530に記憶されている。この第2NOPレジスタ530に記憶されているNOP検出信号は、比較器610のイネーブル信号となる。   In the clock cycle T5, the operation result X1 'of the operand replaced in the clock cycle T4 as described above is stored in the first operation result register 420. Further, the NOP detection signal stored in the first NOP register 520 in the clock cycle T4 is stored in the second NOP register 530 in the clock cycle T5. The NOP detection signal stored in the second NOP register 530 becomes an enable signal for the comparator 610.

比較器610は、第1演算結果レジスタ420に記憶されている演算結果X1’と、第2演算結果レジスタ430に記憶されている演算結果X1とを比較し、仮に両値が不一致であった場合、論理積回路620によるイネーブル化を経て、エラー検出信号が出力される。   The comparator 610 compares the calculation result X1 ′ stored in the first calculation result register 420 with the calculation result X1 stored in the second calculation result register 430, and if both values do not match The error detection signal is output after enabling by the AND circuit 620.

このように、演算装置1は、有効な演算命令が入力されていないタイミングを検出して試験演算命令を実行し、以下の式で表される比較を行い、エラーの検出を行う。
Yn+Zn=Zn+Yn
又は
Yn×Zn=Zn×Yn
なお、Yn、Znは、NOP状態を検出する直前のクロックサイクルにおけるオペランドである。
As described above, the arithmetic device 1 detects a timing when a valid arithmetic instruction is not input, executes the test arithmetic instruction, performs a comparison represented by the following expression, and detects an error.
Yn + Zn = Zn + Yn
Or Yn × Zn = Zn × Yn
Yn and Zn are operands in the clock cycle immediately before the NOP state is detected.

クロックサイクルT6以降は、上述のような動作を実行し、同様にエラーを検出する。   After the clock cycle T6, the above-described operation is performed, and an error is similarly detected.

なお、NOP検出時に入れ替えたデータに対する演算結果は、演算命令に対する出力結果ではないため、演算装置1の外部でこの値を無視する必要がある。また、演算装置1内にこのような値を無視する機構を配置することも可能である。   Note that the operation result for the data exchanged at the time of detecting the NOP is not the output result for the operation instruction, so this value needs to be ignored outside the arithmetic device 1. It is also possible to arrange a mechanism for ignoring such values in the arithmetic unit 1.

以上が、演算装置1の動作の一例である。   The above is an example of the operation of the arithmetic device 1.

以上説明したように、本実施形態に係る演算装置1は、有効な命令がないタイミングを検出して直前の演算命令に対するオペランドを入れ替えて演算処理を実行することで、試験命令や試験データを限定することなくエラーを検出することができる。   As described above, the arithmetic device 1 according to the present embodiment limits the test instruction and the test data by detecting the timing when there is no valid instruction and replacing the operand for the immediately preceding arithmetic instruction to execute the arithmetic processing. An error can be detected without doing so.

また、本実施形態に係る演算装置1は、装置内に算術演算器410が一つしかない場合でも、演算器全体をエラー検出の対象とすることができ、エラー検出効果を高くすることができる。   In addition, the arithmetic device 1 according to the present embodiment can make the entire arithmetic device subject to error detection even when there is only one arithmetic operation device 410 in the device, and can increase the error detection effect. .

また、本実施形態に係る演算装置1は、エラーを検出するための回路として、入力信号に対するセレクタ、演算結果を格納するレジスタ、演算結果を比較するための比較器、等を追加する程度であり、いずれも算術演算器410の外部への追加が可能であるため、算術演算器410内部のクリティカルパスに影響を与えない。よって、本実施形態に係る演算装置1は、回路規模や信号遅延等のインパクトを小さくすることができる。   In addition, the arithmetic device 1 according to the present embodiment is such that a selector for the input signal, a register for storing the operation result, a comparator for comparing the operation result, and the like are added as a circuit for detecting an error. Any of them can be added to the outside of the arithmetic operation unit 410, so that the critical path inside the arithmetic operation unit 410 is not affected. Therefore, the arithmetic device 1 according to the present embodiment can reduce the impact such as circuit scale and signal delay.

[第2実施形態]
本実施形態に係る演算装置2は、図4に示すように、第1実施形態に係る演算装置1の構成に加え、減算検出部700と、符号反転部800と、否定部900と、を更に備える。演算装置2は、第1実施形態に係る演算装置1が検出できるエラーに加え、整数減算や浮動小数点減算等の演算処理に対してもエラーを検出することができ、さらに試験演算結果のデータをマスクすることができる。なお、第1実施形態に係る演算装置1と同様の機能を実現する要素については、同一の符号を付し、説明を省略する。
[Second Embodiment]
As shown in FIG. 4, the arithmetic device 2 according to the present embodiment further includes a subtraction detection unit 700, a sign inversion unit 800, and a negation unit 900 in addition to the configuration of the arithmetic device 1 according to the first embodiment. Prepare. The arithmetic device 2 can detect errors in arithmetic processing such as integer subtraction and floating point subtraction in addition to errors that can be detected by the arithmetic device 1 according to the first embodiment. Can be masked. In addition, about the element which implement | achieves the function similar to the arithmetic unit 1 which concerns on 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.

減算検出部700は、命令制御部100から出力したOPコード信号を受信し、OPコード信号が減算命令であるか否かを検出する。減算検出部700は、減算検出信号を符号反転部800に出力する。   The subtraction detection unit 700 receives the OP code signal output from the instruction control unit 100 and detects whether the OP code signal is a subtraction instruction. The subtraction detection unit 700 outputs a subtraction detection signal to the sign inversion unit 800.

符号反転部800は、減算検出部700が出力した減算検出信号と演算部400が出力した演算結果のデータを受信し、受信した減算検出信号が減算を示している場合、すなわち、OPコード信号が減算命令であった場合、演算結果のデータの符号を反転させる。符号反転部800は、符号反転後の演算結果のデータをエラー検出部600に出力する。   The sign inversion unit 800 receives the subtraction detection signal output from the subtraction detection unit 700 and the data of the calculation result output from the calculation unit 400, and when the received subtraction detection signal indicates subtraction, that is, the OP code signal is If the instruction is a subtraction instruction, the sign of the operation result data is inverted. The sign inversion unit 800 outputs data of the operation result after the sign inversion to the error detection unit 600.

なお、符号反転とは、整数減算の場合は2の補数を求める処理のことであり、浮動小数点減算の場合は最上位ビットである符号ビットを反転させる処理のことである。   The sign inversion is a process of obtaining a 2's complement in the case of integer subtraction, and a process of inverting the sign bit which is the most significant bit in the case of floating point subtraction.

否定部900は、NOP検出部500が出力したNOP検出信号を否定し、エラー検出部600に出力する。NOP検出信号の否定とは、NOP検出信号が示す値を反転することである。例えば、検出信号が1(真)を示す場合、否定部900は、0(偽)として出力し、検出信号が0(偽)を示す場合、否定部900は、1(真)として出力する。この出力は、試験演算結果の出力をマスクする際に用いられる。   The negation unit 900 negates the NOP detection signal output from the NOP detection unit 500 and outputs it to the error detection unit 600. The negation of the NOP detection signal is to invert the value indicated by the NOP detection signal. For example, when the detection signal indicates 1 (true), the negative unit 900 outputs as 0 (false), and when the detection signal indicates 0 (false), the negative unit 900 outputs as 1 (true). This output is used when masking the output of the test calculation result.

以上が、演算装置2の構成である。   The above is the configuration of the arithmetic device 2.

続いて、演算装置2の詳細な構成の一例について説明する。   Next, an example of a detailed configuration of the arithmetic device 2 will be described.

減算検出部700は、図5に示すように、減算検出器710と、減算レジスタ720と、から構成される。減算検出器710は、OPコードレジスタ120に記憶されているOPコードを受信し、受信したOPコードが減算命令であるか否かを示す減算検出信号を減算レジスタ720に記憶する。減算レジスタ720に記憶された減算検出信号が示す値は、符号反転器810に出力される。   As shown in FIG. 5, the subtraction detection unit 700 includes a subtraction detector 710 and a subtraction register 720. The subtraction detector 710 receives the OP code stored in the OP code register 120, and stores a subtraction detection signal indicating whether or not the received OP code is a subtraction instruction in the subtraction register 720. The value indicated by the subtraction detection signal stored in the subtraction register 720 is output to the sign inverter 810.

符号反転部800は、符号反転器810から構成され、減算レジスタ720に記憶された減算検出信号と第1演算結果レジスタ420に記憶された演算結果のデータを受信する。符号反転器810は、減算レジスタ720に記憶された減算検出信号が減算命令であることを示す値であった場合、受信した演算結果のデータの符号を反転し、符号反転した演算結果のデータを第2演算結果レジスタ430に記憶する。   The sign inverting unit 800 includes a sign inverter 810 and receives the subtraction detection signal stored in the subtraction register 720 and the calculation result data stored in the first calculation result register 420. If the subtraction detection signal stored in the subtraction register 720 is a value indicating that it is a subtraction instruction, the sign inverter 810 inverts the sign of the received operation result data, and the sign-inverted operation result data The result is stored in the second operation result register 430.

否定部900は、NOTゲート910から構成される。NOTゲート910は、第2NOPレジスタ530に記憶されたNOP検出信号を受信し、受信したNOP検出信号を否定して論理積回路630に出力する。論理積回路630は、NOTゲート910が出力した否定信号と第1演算結果レジスタ420が記憶した演算結果を示すデータを受信し、両値の論理積を出力する。このため、第2NOPレジスタ530にNOPを示す値が記憶されている場合、その値が否定されて論理積が求められるため、試験演算命令の演算結果をマスクすることができる。   The negation unit 900 includes a NOT gate 910. The NOT gate 910 receives the NOP detection signal stored in the second NOP register 530, negates the received NOP detection signal, and outputs it to the AND circuit 630. The AND circuit 630 receives a negative signal output from the NOT gate 910 and data indicating the operation result stored in the first operation result register 420, and outputs a logical product of both values. Therefore, when a value indicating NOP is stored in the second NOP register 530, the value is negated and a logical product is obtained, so that the operation result of the test operation instruction can be masked.

以上が、演算装置2の詳細な構成の一例である。   The above is an example of the detailed configuration of the arithmetic device 2.

続いて、演算装置2の動作の一例について、タイミングチャートを参照して具体的に説明する。   Next, an example of the operation of the arithmetic device 2 will be specifically described with reference to a timing chart.

図6に示すように、クロックサイクルT2では、有効な演算命令であるOPコードSUB(減算)と、その演算処理に対する第1オペランドY1と、第2オペランドZ1と、が入力されている。また、クロックサイクルT3では、有効な演算命令が入力されず、NOP検出器510は、NOPを検出している。このため、第1実施形態と同様に、クロックサイクルT3では、クロックサイクルT2で入力されたオペランドを入れ替えて試験演算命令を実行している。   As shown in FIG. 6, in the clock cycle T2, an OP code SUB (subtraction) that is a valid operation instruction, a first operand Y1 and a second operand Z1 for the operation processing are input. In clock cycle T3, a valid operation instruction is not input, and NOP detector 510 detects NOP. For this reason, as in the first embodiment, in the clock cycle T3, the operands input in the clock cycle T2 are replaced and the test operation instruction is executed.

クロックサイクルT3では、減算検出器710は、OPコードが減算命令であることを示す減算検出信号を出力し、減算レジスタ720に記憶している。これと同時に、NOP検出器510も、NOP検出信号を出力し、クロックサイクルT4で第1NOPレジスタ520に記憶されている。また、クロックサイクルT4では、第1演算結果レジスタ420に、クロックサイクルT2で入力されたオペランドY1、Z1の減算命令に対する演算結果X1が記憶されている。   In clock cycle T3, the subtraction detector 710 outputs a subtraction detection signal indicating that the OP code is a subtraction instruction, and stores it in the subtraction register 720. At the same time, the NOP detector 510 also outputs a NOP detection signal, which is stored in the first NOP register 520 at the clock cycle T4. In the clock cycle T4, the operation result X1 for the subtraction instruction of the operands Y1 and Z1 input in the clock cycle T2 is stored in the first operation result register 420.

クロックサイクルT4では、減算レジスタ720にOPコードが減算命令であることを示す値が記憶されているため、符号反転器810は、第1演算結果レジスタ420の出力(X1)に対して符号反転処理を実行する。よって、クロックサイクルT5では、符号反転器810は、符号反転させた演算結果X1を、第2演算結果レジスタ430に記憶する。また、第1演算結果レジスタ420は、クロックサイクルT2で入れ替えられたオペランドに対する演算結果X1’を記憶する。   In clock cycle T4, since the value indicating that the OP code is a subtraction instruction is stored in subtraction register 720, sign inverter 810 performs sign inversion processing on the output (X1) of first operation result register 420. Execute. Therefore, in the clock cycle T5, the sign inverter 810 stores the operation result X1 whose sign is inverted in the second operation result register 430. The first operation result register 420 stores the operation result X1 'for the operand replaced in the clock cycle T2.

クロックサイクルT5では、比較器610は、第1演算結果レジスタ420が記憶している演算結果X1’と、第2演算結果レジスタ430が記憶している符号反転させた演算結果とを比較する。論理積回路620は、比較結果のデータと第2NOPレジスタ530が出力するNOP検出信号との論理積を求め、これをエラー検出信号として出力する。   In the clock cycle T5, the comparator 610 compares the operation result X1 'stored in the first operation result register 420 with the operation result obtained by inverting the sign stored in the second operation result register 430. The AND circuit 620 calculates a logical product of the comparison result data and the NOP detection signal output from the second NOP register 530, and outputs this as an error detection signal.

クロックサイクルT5では、論理積回路630は、第1演算結果レジスタ420が出力するデータと、第2NOPレジスタ530が出力する否定データとの論理積を求める。すなわち、クロックサイクルT5では、第2NOPレジスタ530はNOP状態を示す値を記憶しているため、論理積回路630によって試験演算結果X1’がマスクされる。第2NOPレジスタ530は、演算装置2が試験演算処理を実行するタイミングのみでNOP状態を示す値を記憶している。このため、試験演算結果はマスクされるが、通常の演算結果はマスクされることはない。   In clock cycle T5, the logical product circuit 630 obtains the logical product of the data output from the first operation result register 420 and the negative data output from the second NOP register 530. That is, in the clock cycle T5, since the second NOP register 530 stores a value indicating the NOP state, the logical product circuit 630 masks the test operation result X1 '. The second NOP register 530 stores a value indicating the NOP state only at the timing when the arithmetic device 2 executes the test arithmetic processing. For this reason, the test calculation result is masked, but the normal calculation result is not masked.

このように、演算装置2は、第1実施形態と同様に、有効な演算命令が入力されていないタイミングを検出して試験演算命令を実行し、第1実施形態に加え、以下の式で表される比較を行い、エラーの検出を行う。
Yn−Zn=Zn−Yn
なお、Yn、Znは、NOP状態を検出する直前のクロックサイクルにおけるオペランドである。
As described above, as in the first embodiment, the arithmetic device 2 detects the timing at which a valid arithmetic instruction is not input and executes the test arithmetic instruction. In addition to the first embodiment, the arithmetic device 2 is represented by the following equation: Comparison is performed, and an error is detected.
Yn-Zn = Zn-Yn
Yn and Zn are operands in the clock cycle immediately before the NOP state is detected.

クロックサイクルT6以降も、上述のような動作を実行し、同様にエラーを検出する。   After the clock cycle T6, the above-described operation is performed and an error is detected in the same manner.

以上が、演算装置2の動作の一例である。   The above is an example of the operation of the arithmetic device 2.

以上説明したように、本実施形態に係る演算装置2は、第1実施形態に係る演算装置1が奏する効果に加え、整数減算や浮動小数点減算に対してもエラーを検出することが可能であり、更に、試験演算命令に対する演算結果をマスクすることができる。   As described above, the arithmetic device 2 according to the present embodiment can detect errors for integer subtraction and floating point subtraction in addition to the effects exhibited by the arithmetic device 1 according to the first embodiment. Furthermore, the operation result for the test operation instruction can be masked.

演算装置2内で試験演算命令に対する演算結果をマスクすることができるため、外部装置でこのような試験演算命令に対する演算結果を考慮する必要がない。   Since the calculation result for the test calculation command can be masked in the calculation device 2, it is not necessary to consider the calculation result for such a test calculation command in the external device.

[第3実施形態]
本実施形態に係る演算装置3は、図7に示すように、第1実施形態に係る演算装置1の構成と同様であるが、詳細な構成が異なり、算術演算器410が3Tのパイプライン構造となっている。なお、第1実施形態に係る演算装置1と同様の機能を実現する要素については、同一の符号を付し、説明を省略する。
[Third Embodiment]
As shown in FIG. 7, the arithmetic device 3 according to the present embodiment is the same as the configuration of the arithmetic device 1 according to the first embodiment, but the detailed configuration is different, and the arithmetic operator 410 has a 3T pipeline structure. It has become. In addition, about the element which implement | achieves the function similar to the arithmetic unit 1 which concerns on 1st Embodiment, the same code | symbol is attached | subjected and description is abbreviate | omitted.

算術演算器410は、内部に第1パイプラインレジスタ440と、第2パイプラインレジスタ450と、を備える。   The arithmetic operator 410 includes a first pipeline register 440 and a second pipeline register 450 inside.

このような構成の場合、NOP検出信号を記憶するレジスタの段数を、パイプラインの段数と合わせれば良い。よって、NOP検出部500は、第3NOPレジスタ540と、第4NOPレジスタ550と、を更に備える。   In such a configuration, the number of register stages storing the NOP detection signal may be matched with the number of pipeline stages. Therefore, the NOP detection unit 500 further includes a third NOP register 540 and a fourth NOP register 550.

以上が、演算装置3の詳細な構成の一例である。   The above is an example of the detailed configuration of the arithmetic device 3.

続いて、演算装置3の動作の一例について、タイミングチャートを参照して具体的に説明する。   Next, an example of the operation of the arithmetic device 3 will be specifically described with reference to a timing chart.

図8に示すように、クロックサイクルT2では、有効な演算命令であるOPコードADDと、その演算命令に対する第1オペランドY1と、第2オペランドZ1と、が入力される。また、クロックサイクルT3では、有効な命令が存在していない。クロックサイクルT3では、第1オペランドY1と第2オペランドZ1に対する演算処理が実行されるが、算術演算器410がパイプライン構造であるため、演算結果X1は、クロックサイクルT6で第1演算結果レジスタ420に記憶される。その後、演算結果X1は、クロックサイクルT7で第2演算結果レジスタ430に記憶され、オペランドを入れ替えた演算結果X1’との比較が行われる。   As shown in FIG. 8, in a clock cycle T2, an OP code ADD that is a valid operation instruction, a first operand Y1 for the operation instruction, and a second operand Z1 are input. In clock cycle T3, no valid instruction exists. In the clock cycle T3, the arithmetic processing for the first operand Y1 and the second operand Z1 is executed, but since the arithmetic operator 410 has a pipeline structure, the arithmetic result X1 is the first arithmetic result register 420 in the clock cycle T6. Is remembered. Thereafter, the operation result X1 is stored in the second operation result register 430 at the clock cycle T7, and is compared with the operation result X1 'with the operands replaced.

クロックサイクルT3では、有効な演算命令が入力されなかったため、NOP検出器510は、NOP検出信号を出力する。これにより、クロックサイクルT4では、第1NOPレジスタ520は、NOPを示す値を記憶する。第2NOPレジスタ530は、クロックサイクルT5にて、第1NOPレジスタが記憶している値を記憶する。第3NOPレジスタ540、第4NOPレジスタ550も同様に、クロックサイクルを1つずつずらしてNOP状態を示す値が記憶される。   In clock cycle T3, since a valid operation instruction has not been input, NOP detector 510 outputs a NOP detection signal. Thereby, in the clock cycle T4, the first NOP register 520 stores a value indicating NOP. Second NOP register 530 stores the value stored in first NOP register in clock cycle T5. Similarly, the third NOP register 540 and the fourth NOP register 550 store a value indicating the NOP state by shifting the clock cycle one by one.

NOP状態を示す値を記憶するレジスタを多段構成にすることで、最後の第4NOPレジスタ550は、演算結果を比較するタイミングと同じタイミングでイネーブル信号を出力することができ、エラー検出部600は、エラーを検出することができる。   By making the register for storing the value indicating the NOP state into a multi-stage configuration, the last fourth NOP register 550 can output the enable signal at the same timing as the timing of comparing the operation results. An error can be detected.

このように、演算装置3は、第1実施形態と同様に、算術演算器410がパイプライン構成であっても、有効な演算命令が入力されていないタイミングを検出して試験演算命令を実行することができる。   As described above, similarly to the first embodiment, the arithmetic device 3 detects the timing when a valid arithmetic instruction is not input and executes the test arithmetic instruction even if the arithmetic operator 410 has a pipeline configuration. be able to.

クロックサイクルT6以降も、上述のような動作を実行し、同様にエラーを検出する。   After the clock cycle T6, the above-described operation is performed and an error is detected in the same manner.

以上が、演算装置3の動作の一例である。   The above is an example of the operation of the arithmetic device 3.

以上説明したように、本実施形態に係る演算装置3は、第1実施形態に係る演算装置1が奏する効果に加え、算術演算器410がパイプライン構成であっても、エラーを検出することができる。   As described above, the arithmetic device 3 according to the present embodiment can detect an error even when the arithmetic operator 410 has a pipeline configuration in addition to the effects exhibited by the arithmetic device 1 according to the first embodiment. it can.

[変形例]
本発明は、上記実施形態に限定されず、種々の変形例及び応用が可能である。上記実施形態では、デジタル回路で構成される演算装置について説明したが、これに限られず、コンピュータで構成することも可能である。
[Modification]
The present invention is not limited to the above embodiment, and various modifications and applications are possible. In the above-described embodiment, the arithmetic device including a digital circuit has been described. However, the present invention is not limited to this, and the arithmetic device may be configured with a computer.

この場合、コンピュータで構成される演算装置4は、図9に示すように、制御部11と、主記憶部12と、外部記憶部13と、操作部14と、表示部15と、送受信部16と、から構成される。主記憶部12と、外部記憶部13と、操作部14と、表示部15と、送受信部16とは、いずれも内部バス10を介して制御部11と接続している。   In this case, as shown in FIG. 9, the arithmetic device 4 configured by a computer includes a control unit 11, a main storage unit 12, an external storage unit 13, an operation unit 14, a display unit 15, and a transmission / reception unit 16. And. The main storage unit 12, the external storage unit 13, the operation unit 14, the display unit 15, and the transmission / reception unit 16 are all connected to the control unit 11 via the internal bus 10.

送受信部16は、シリアルインタフェースまたはLAN(Local Area Network)インタフェース等から構成されている。送受信部16は、シリアルインタフェースやネットワークを介して送信された情報等を受信する。また、送受信部16は、受信した情報等を、制御部11に供給する。   The transmission / reception unit 16 includes a serial interface or a LAN (Local Area Network) interface. The transmission / reception unit 16 receives information transmitted via a serial interface or a network. The transmission / reception unit 16 supplies the received information and the like to the control unit 11.

外部記憶部13は、フラッシュメモリ、ハードディスク、DVD−RAM(Digital Versatile Disc Random−Access Memory)、DVD−RW(Digital Versatile Disc ReWritable)等の不揮発性メモリから構成され、各処理を制御部11に行わせるためのプログラム19を予め記憶し、また、制御部11の指示に従って、外部記憶部13が記憶するデータを制御部11に供給し、制御部11から供給されたデータを記憶する。   The external storage unit 13 includes a non-volatile memory such as a flash memory, a hard disk, a DVD-RAM (Digital Versatile Disc Random Access Memory), and a DVD-RW (Digital Versatile Disc Rewriteable), and performs each process on the control unit 11. A program 19 is stored in advance, and the data stored in the external storage unit 13 is supplied to the control unit 11 in accordance with an instruction from the control unit 11, and the data supplied from the control unit 11 is stored.

主記憶部12は、RAM(Random−Access Memory)等から構成され、外部記憶部13に記憶されているプログラム19を読み込み、さらに制御部11の作業領域としても使用される。   The main storage unit 12 includes a RAM (Random-Access Memory) and the like, reads the program 19 stored in the external storage unit 13, and is also used as a work area for the control unit 11.

制御部11は、CPU(Central Processing Unit)等から構成され、外部記憶部13に記憶されているプログラム19に従って、後述する各処理を実行する。   The control unit 11 includes a CPU (Central Processing Unit) and the like, and executes each process described later according to a program 19 stored in the external storage unit 13.

操作部14は、キーボードやマウス、操作キーやタッチパネルなどの入力デバイス等と、入力デバイス等を内部バス10に接続するインタフェース装置から構成されている。操作部14は、ユーザの指示を処理する機能を備え、ユーザの操作によって入力されたデータを制御部11に供給する。   The operation unit 14 includes an input device such as a keyboard, a mouse, an operation key, and a touch panel, and an interface device that connects the input device and the like to the internal bus 10. The operation unit 14 has a function of processing a user instruction, and supplies data input by the user operation to the control unit 11.

表示部15は、LCD(Liquid Crystal Display)または有機EL(Electro Luminescence)等から構成されている。表示部15は、各データや情報等を表示する。   The display unit 15 includes an LCD (Liquid Crystal Display) or an organic EL (Electro Luminescence). The display unit 15 displays each data and information.

上述のような一般的な情報処理装置に命令制御部100、第1オペランド制御部200、第2オペランド制御部300、演算部400、NOP検出部500、エラー検出部600、減算検出部700、符号反転部800、否定部900、の各処理を実行させることで、演算装置4は、上述の各実施形態に係る演算装置1〜3と同等の機能、効果を実現することができる。   The general information processing apparatus as described above includes an instruction control unit 100, a first operand control unit 200, a second operand control unit 300, a calculation unit 400, a NOP detection unit 500, an error detection unit 600, a subtraction detection unit 700, a code By causing the reversing unit 800 and the negating unit 900 to execute the processing, the arithmetic device 4 can realize functions and effects equivalent to those of the arithmetic devices 1 to 3 according to the above-described embodiments.

なお、本発明は、本発明の広義の趣旨及び範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。つまり、本発明の範囲は、実施形態ではなく、特許請求の範囲によって示される。そして、特許請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、本発明の範囲内とみなされる。   Note that the present invention can be variously modified and modified without departing from the broad meaning and scope of the present invention. Further, the above-described embodiment is for explaining the present invention, and does not limit the scope of the present invention. That is, the scope of the present invention is shown not by the embodiments but by the claims. Various modifications within the scope of the claims and within the scope of the equivalent invention are considered to be within the scope of the present invention.

上記実施形態の一部又は全ては、以下の付記のようにも記載されうるが、以下には限られない。   A part or all of the above embodiment can be described as in the following supplementary notes, but is not limited thereto.

(付記1)
演算装置に有効な演算命令が入力されていないNOP状態の検出に従って、受信する入力信号を制御する制御信号を出力するNOP検出部と、
前記NOP検出部が出力した前記制御信号に従って、演算命令を示すOPコード信号を受信し、受信した前記OPコード信号を出力する命令制御部と、
前記NOP検出部が出力した前記制御信号に従って、被演算データを示すオペランド信号を受信し、受信した前記オペランド信号を出力するオペランド制御部と、
前記命令制御部が出力した前記OPコード信号が示す演算命令に従って、前記オペランド制御部が出力した前記オペランド信号が示す被演算データに対する演算処理を実行し、求めた演算結果データを出力する演算部と、
前記演算部が出力した前記演算結果データに基づいて、エラーが発生したか否かを判別するエラー検出部と、を備える、
ことを特徴とする演算装置。
(Appendix 1)
A NOP detection unit that outputs a control signal for controlling an input signal to be received in accordance with detection of a NOP state in which a valid operation command is not input to the arithmetic device;
In accordance with the control signal output from the NOP detector, an instruction control unit that receives an OP code signal indicating an operation command and outputs the received OP code signal;
According to the control signal output from the NOP detection unit, an operand control unit that receives an operand signal indicating operation data and outputs the received operand signal;
An arithmetic unit that performs arithmetic processing on the operand data indicated by the operand signal output from the operand control unit according to the arithmetic instruction indicated by the OP code signal output from the instruction control unit, and outputs the obtained arithmetic result data; ,
An error detection unit that determines whether an error has occurred based on the calculation result data output by the calculation unit;
An arithmetic device characterized by that.

(付記2)
前記命令制御部は、前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記OPコード信号を前記演算部に出力し、
前記オペランド制御部は、前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記オペランド信号を前記演算部に出力し、
前記エラー検出部は、前記演算部が直前に求めた前記演算結果データと前記NOP状態を検出した際に求めた前記演算結果データとを比較し、それぞれが異なる場合にエラーが発生したと判断する、
ことを特徴とする付記1に記載の演算装置。
(Appendix 2)
When the NOP detection unit detects the NOP state, the command control unit outputs the OP code signal received immediately before to the arithmetic unit,
When the NOP detection unit detects the NOP state, the operand control unit outputs the operand signal received immediately before to the arithmetic unit,
The error detection unit compares the calculation result data obtained immediately before by the calculation unit with the calculation result data obtained when the NOP state is detected, and determines that an error has occurred when they are different from each other. ,
The arithmetic unit according to Supplementary Note 1, wherein

(付記3)
前記オペランド制御部は、第1オペランド制御部と、第2オペランド制御部と、を備え、
前記第1オペランド制御部は、
前記NOP検出部が前記NOP状態を検出していない場合、第1オペランド信号を受信し、受信した前記第1オペランド信号を前記演算部に出力し、
前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記第1オペランド信号を前記第2オペランド制御部に出力し、前記第2オペランド制御部が出力した第2オペランド信号を受信し、受信した前記第2オペランド信号を前記演算部に出力し、
前記第2オペランド制御部は、
前記NOP検出部が前記NOP状態を検出していない場合、前記第2オペランド信号を受信し、受信した前記第2オペランド信号を前記演算部に出力し、
前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記第2オペランド信号を前記第1オペランド制御部に出力し、前記第1オペランド制御部が出力した前記第1オペランド信号を受信し、受信した前記第1オペランド信号を前記演算部に出力する、
ことを特徴とする付記1又は2に記載の演算装置。
(Appendix 3)
The operand control unit includes a first operand control unit and a second operand control unit,
The first operand controller is
When the NOP detection unit does not detect the NOP state, the first operand signal is received, and the received first operand signal is output to the arithmetic unit,
When the NOP detection unit detects the NOP state, the first operand signal received immediately before is output to the second operand control unit, and the second operand signal output by the second operand control unit is received. Outputting the received second operand signal to the arithmetic unit;
The second operand controller is
When the NOP detection unit does not detect the NOP state, the second operand signal is received, and the received second operand signal is output to the arithmetic unit,
When the NOP detection unit detects the NOP state, the second operand signal received immediately before is output to the first operand control unit, and the first operand signal output by the first operand control unit is received. Outputting the received first operand signal to the arithmetic unit;
The arithmetic unit according to appendix 1 or 2, characterized in that:

(付記4)
前記NOP検出部は、前記NOP状態を検出したことを示すNOP検出信号を前記エラー検出部に出力し、
前記エラー検出部は、前記NOP検出信号を受信し、前記NOP検出信号が前記NOP状態を示している場合、かつ、エラーが発生したと判別した場合、エラーが発生したことを示すエラー検出信号を出力する、
ことを特徴とする付記1乃至3のいずれか1つに記載の演算装置。
(Appendix 4)
The NOP detection unit outputs a NOP detection signal indicating that the NOP state has been detected to the error detection unit,
The error detection unit receives the NOP detection signal, and when the NOP detection signal indicates the NOP state and determines that an error has occurred, an error detection signal indicating that an error has occurred. Output,
The arithmetic unit according to any one of supplementary notes 1 to 3, characterized in that:

(付記5)
前記OPコード信号が減算命令を示しているか否かを検出する減算検出部と、
前記演算部が求めた前記演算結果データの符号を反転させる符号反転部と、を更に備え、
前記符号反転部は、前記減算検出部が前記減算命令を検出した場合、前記演算部が求めた前記演算結果データの符号を反転し、
前記エラー検出部は、前記演算部が求めた前記演算結果データと、前記符号反転部が符号を反転した前記演算結果データとを比較する、
ことを特徴とする付記1乃至4のいずれか1つに記載の演算装置。
(Appendix 5)
A subtraction detector that detects whether the OP code signal indicates a subtraction instruction;
A code inversion unit for inverting the sign of the calculation result data obtained by the calculation unit,
When the subtraction detection unit detects the subtraction instruction, the sign inversion unit inverts the sign of the operation result data obtained by the operation unit,
The error detection unit compares the calculation result data obtained by the calculation unit with the calculation result data obtained by inverting the sign of the sign inverting unit.
The arithmetic unit according to any one of supplementary notes 1 to 4, wherein:

(付記6)
前記NOP検出部が出力した前記NOP検出信号を否定する否定部をさらに備え、
前記否定部は、否定した前記NOP検出信号を前記エラー検出部に出力し、
前記エラー検出部は、前記演算部が求めた前記演算結果データと前記否定部が否定して出力した前記NOP検出信号が示す値との論理積を求め、求めた前記論理積を前記演算結果データとして出力する、
ことを特徴とする付記1乃至5のいずれか1つに記載に演算装置。
(Appendix 6)
A negative unit that negates the NOP detection signal output by the NOP detection unit;
The negative part outputs the negative NOP detection signal to the error detection part,
The error detection unit obtains a logical product of the computation result data obtained by the computation unit and a value indicated by the NOP detection signal output by negation by the negation unit, and obtains the obtained logical product as the computation result data. Output as
The arithmetic unit according to any one of appendices 1 to 5, characterized in that:

(付記7)
前記演算部は、パイプライン構成であり、
前記NOP検出部は、前記NOP検出信号が示す値を記憶する記憶部を前記パイプラインの段数に従った数備える、
ことを特徴とする付記1乃至6のいずれか1つに記載の演算装置。
(Appendix 7)
The arithmetic unit has a pipeline configuration,
The NOP detection unit includes a number of storage units that store a value indicated by the NOP detection signal according to the number of stages of the pipeline.
The arithmetic unit according to any one of appendices 1 to 6, characterized in that:

(付記8)
前記命令制御部は、受信した前記OPコード信号を記憶するOPコード記憶部を備え、
前記第1オペランド制御部は、受信した前記オペランド信号を記憶する第1オペランド記憶部を備え、
前記第2オペランド制御部は、受信した前記オペランド信号を記憶する第2オペランド記憶部を備え、
前記NOP検出部は、前記NOP検出信号を記憶する第1NOP記憶部と、前記第1NOP記憶部が記憶している前記NOP検出信号を記憶する第2NOP記憶部と、を備え、
前記演算部は、前記演算結果データを記憶する第1演算結果記憶部と、前記第1演算結果記憶部が記憶している前記演算結果データを記憶する第2演算結果記憶部と、を備え、
前記NOP検出部が前記NOP状態を検出した第1のクロックサイクルにおいて、
前記NOP検出部は、前記第1NOP記憶部に前記NOP検出信号を記憶し、前記制御信号を前記命令制御部と前記第1オペランド制御部及び前記第2オペランド制御部に出力し、
前記命令制御部は、直前に受信した前記OPコード信号を前記OPコード記憶部に記憶し、前記OPコード記憶部に記憶された前記OPコード信号を前記演算部に出力し、
前記第1オペランド制御部は、前記第2オペランド制御部から受信した前記第2オペランド信号を前記第1オペランド記憶部に記憶し、前記第1オペランド記憶部に記憶された前記第2オペランド信号を前記演算部に出力し、
前記第2オペランド制御部は、前記第1オペランド制御部から受信した前記第1オペランド信号を前記第2オペランド記憶部に記憶し、前記第2オペランド記憶部に記憶された前記第1オペランド信号を前記演算部に出力し、
前記演算部は、求めた前記演算結果データを前記第1演算結果記憶部に記憶する、
ことを特徴とする付記3に記載の演算装置。
(Appendix 8)
The command control unit includes an OP code storage unit that stores the received OP code signal.
The first operand control unit includes a first operand storage unit that stores the received operand signal,
The second operand control unit includes a second operand storage unit that stores the received operand signal.
The NOP detection unit includes a first NOP storage unit that stores the NOP detection signal, and a second NOP storage unit that stores the NOP detection signal stored in the first NOP storage unit,
The calculation unit includes a first calculation result storage unit that stores the calculation result data, and a second calculation result storage unit that stores the calculation result data stored in the first calculation result storage unit,
In the first clock cycle in which the NOP detector detects the NOP state,
The NOP detection unit stores the NOP detection signal in the first NOP storage unit, and outputs the control signal to the instruction control unit, the first operand control unit, and the second operand control unit,
The instruction control unit stores the OP code signal received immediately before in the OP code storage unit, and outputs the OP code signal stored in the OP code storage unit to the arithmetic unit,
The first operand control unit stores the second operand signal received from the second operand control unit in the first operand storage unit, and stores the second operand signal stored in the first operand storage unit. Output to the arithmetic unit,
The second operand control unit stores the first operand signal received from the first operand control unit in the second operand storage unit, and stores the first operand signal stored in the second operand storage unit. Output to the arithmetic unit,
The calculation unit stores the calculated calculation result data in the first calculation result storage unit.
The arithmetic unit according to Supplementary Note 3, wherein

(付記9)
前記第1のクロックサイクルの次の第2のクロックサイクルにおいて、
前記NOP検出部は、前記第1NOP記憶部に記憶された前記NOP検出信号を前記第2NOP記憶部に記憶し、前記第2NOP記憶部に記憶された前記NOP検出信号を前記エラー検出部に出力し、
前記演算部は、前記第1演算結果記憶部に記憶された前記演算結果データを前記第2演算結果記憶部に記憶し、前記命令制御部と前記第1オペランド制御部及び前記第2オペランド制御部の出力信号に従って試験演算結果データを求め、求めた前記試験演算結果データを前記第1演算結果記憶部に記憶し、前記第1演算結果記憶部に記憶された前記試験演算結果データと前記第2演算結果記憶部に記憶された前記演算結果データを前記エラー検出部に出力し、
前記エラー検出部は、前記演算部が出力した前記試験演算結果データと前記演算結果データとを比較し、両者が異なる値である場合、かつ、前記NOP検出部が出力した前記NOP検出信号が前記NOP状態を示している場合、前記エラー検出信号を出力する、
ことを特徴とする付記8に記載の演算装置。
(Appendix 9)
In a second clock cycle following the first clock cycle,
The NOP detection unit stores the NOP detection signal stored in the first NOP storage unit in the second NOP storage unit, and outputs the NOP detection signal stored in the second NOP storage unit to the error detection unit. ,
The calculation unit stores the calculation result data stored in the first calculation result storage unit in the second calculation result storage unit, and the instruction control unit, the first operand control unit, and the second operand control unit. The test calculation result data is obtained in accordance with the output signal, the obtained test calculation result data is stored in the first calculation result storage unit, and the test calculation result data stored in the first calculation result storage unit and the second calculation result storage unit are stored. The calculation result data stored in the calculation result storage unit is output to the error detection unit,
The error detection unit compares the test calculation result data output from the calculation unit with the calculation result data, and when both are different values, the NOP detection signal output from the NOP detection unit is When the NOP state is indicated, the error detection signal is output.
The arithmetic unit according to appendix 8, characterized by:

(付記10)
演算装置に有効な演算命令が入力されていないNOP状態の検出に従って、受信する入力信号を制御する制御信号を出力するNOP検出ステップと、
前記NOP検出ステップで出力した前記制御信号に従って、演算命令を示すOPコード信号を受信し、受信した前記OPコード信号を出力する命令制御ステップと、
前記NOP検出ステップで出力した前記制御信号に従って、被演算データを示すオペランド信号を受信し、受信した前記オペランド信号を出力するオペランド制御ステップと、
前記命令制御ステップで出力した前記OPコード信号が示す演算命令に従って、前記オペランド制御ステップで出力した前記オペランド信号が示す被演算データに対する演算処理を実行し、求めた演算結果データを出力する演算ステップと、
前記演算ステップで出力した前記演算結果データに基づいて、エラーが発生したか否かを判別するエラー検出ステップと、を備える、
ことを特徴とするエラー検出方法。
(Appendix 10)
A NOP detection step of outputting a control signal for controlling an input signal to be received in accordance with detection of a NOP state in which a valid arithmetic command is not input to the arithmetic device;
In accordance with the control signal output in the NOP detection step, an instruction control step of receiving an OP code signal indicating an operation instruction and outputting the received OP code signal;
According to the control signal output in the NOP detecting step, receiving an operand signal indicating data to be processed, and outputting the received operand signal;
An arithmetic step of performing arithmetic processing on the operand data indicated by the operand signal output in the operand control step and outputting the calculated arithmetic result data in accordance with the arithmetic instruction indicated by the OP code signal output in the instruction control step; ,
An error detection step of determining whether an error has occurred based on the calculation result data output in the calculation step;
An error detection method characterized by the above.

1、2、3、4 演算装置
100 命令制御部
200 第1オペランド制御部
300 第2オペランド制御部
400 演算部
500 NOP検出部
600 エラー検出部
700 減算検出部
800 符号反転部
900 否定部
110、210、310 2入力セレクタ
120 OPコードレジスタ
220 第1オペランドレジスタ
320 第2オペランドレジスタ
410 算術演算器
420 第1演算結果レジスタ
430 第2演算結果レジスタ
440 第1パイプラインレジスタ
450 第2パイプラインレジスタ
510 NOP検出器
520 第1NOPレジスタ
530 第2NOPレジスタ
540 第3NOPレジスタ
550 第4NOPレジスタ
610 比較器
620、630 論理積回路
710 減算検出器
720 減算レジスタ
810 符号反転器
910 NOTゲート
10 内部バス
11 制御部
12 主記憶部
13 外部記憶部
14 操作部
15 表示部
16 送受信部
19 プログラム
1, 2, 3, 4 Arithmetic unit 100 Instruction control unit 200 First operand control unit 300 Second operand control unit 400 Operation unit 500 NOP detection unit 600 Error detection unit 700 Subtraction detection unit 800 Sign inversion unit 900 Negation unit 110, 210 310 Input selector 120 OP code register 220 First operand register 320 Second operand register 410 Arithmetic operator 420 First operation result register 430 Second operation result register 440 First pipeline register 450 Second pipeline register 510 NOP detection 520 First NOP register 530 Second NOP register 540 Third NOP register 550 Fourth NOP register 610 Comparator 620, 630 AND circuit 710 Subtraction detector 720 Subtraction register 810 Sign inverter 910 NOT gate 1 Internal bus 11 controller 12 main storage unit 13 the external storage unit 14 operation unit 15 display unit 16 reception unit 19 program

Claims (10)

演算装置に有効な演算命令が入力されていないNOP状態の検出に従って、受信する入力信号を制御する制御信号を出力するNOP検出部と、
前記NOP検出部が出力した前記制御信号に従って、演算命令を示すOPコード信号を受信し、受信した前記OPコード信号を出力する命令制御部と、
前記NOP検出部が出力した前記制御信号に従って、被演算データを示すオペランド信号を受信し、受信した前記オペランド信号を出力するオペランド制御部と、
前記命令制御部が出力した前記OPコード信号が示す演算命令に従って、前記オペランド制御部が出力した前記オペランド信号が示す被演算データに対する演算処理を実行し、求めた演算結果データを出力する演算部と、
前記演算部が出力した前記演算結果データに基づいて、エラーが発生したか否かを判別するエラー検出部と、を備える、
ことを特徴とする演算装置。
A NOP detection unit that outputs a control signal for controlling an input signal to be received in accordance with detection of a NOP state in which a valid operation command is not input to the arithmetic device;
In accordance with the control signal output from the NOP detector, an instruction control unit that receives an OP code signal indicating an operation command and outputs the received OP code signal;
According to the control signal output from the NOP detection unit, an operand control unit that receives an operand signal indicating operation data and outputs the received operand signal;
An arithmetic unit that performs arithmetic processing on the operand data indicated by the operand signal output from the operand control unit according to the arithmetic instruction indicated by the OP code signal output from the instruction control unit, and outputs the obtained arithmetic result data; ,
An error detection unit that determines whether an error has occurred based on the calculation result data output by the calculation unit;
An arithmetic device characterized by that.
前記命令制御部は、前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記OPコード信号を前記演算部に出力し、
前記オペランド制御部は、前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記オペランド信号を前記演算部に出力し、
前記エラー検出部は、前記演算部が直前に求めた前記演算結果データと前記NOP状態を検出した際に求めた前記演算結果データとを比較し、それぞれが異なる場合にエラーが発生したと判断する、
ことを特徴とする請求項1に記載の演算装置。
When the NOP detection unit detects the NOP state, the command control unit outputs the OP code signal received immediately before to the arithmetic unit,
When the NOP detection unit detects the NOP state, the operand control unit outputs the operand signal received immediately before to the arithmetic unit,
The error detection unit compares the calculation result data obtained immediately before by the calculation unit with the calculation result data obtained when the NOP state is detected, and determines that an error has occurred when they are different from each other. ,
The arithmetic unit according to claim 1.
前記オペランド制御部は、第1オペランド制御部と、第2オペランド制御部と、を備え、
前記第1オペランド制御部は、
前記NOP検出部が前記NOP状態を検出していない場合、第1オペランド信号を受信し、受信した前記第1オペランド信号を前記演算部に出力し、
前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記第1オペランド信号を前記第2オペランド制御部に出力し、前記第2オペランド制御部が出力した第2オペランド信号を受信し、受信した前記第2オペランド信号を前記演算部に出力し、
前記第2オペランド制御部は、
前記NOP検出部が前記NOP状態を検出していない場合、前記第2オペランド信号を受信し、受信した前記第2オペランド信号を前記演算部に出力し、
前記NOP検出部が前記NOP状態を検出した場合、直前に受信した前記第2オペランド信号を前記第1オペランド制御部に出力し、前記第1オペランド制御部が出力した前記第1オペランド信号を受信し、受信した前記第1オペランド信号を前記演算部に出力する、
ことを特徴とする請求項1又は2に記載の演算装置。
The operand control unit includes a first operand control unit and a second operand control unit,
The first operand controller is
When the NOP detection unit does not detect the NOP state, the first operand signal is received, and the received first operand signal is output to the arithmetic unit,
When the NOP detection unit detects the NOP state, the first operand signal received immediately before is output to the second operand control unit, and the second operand signal output by the second operand control unit is received. Outputting the received second operand signal to the arithmetic unit;
The second operand controller is
When the NOP detection unit does not detect the NOP state, the second operand signal is received, and the received second operand signal is output to the arithmetic unit,
When the NOP detection unit detects the NOP state, the second operand signal received immediately before is output to the first operand control unit, and the first operand signal output by the first operand control unit is received. Outputting the received first operand signal to the arithmetic unit;
The arithmetic unit according to claim 1 or 2, wherein
前記NOP検出部は、前記NOP状態を検出したことを示すNOP検出信号を前記エラー検出部に出力し、
前記エラー検出部は、前記NOP検出信号を受信し、前記NOP検出信号が前記NOP状態を示している場合、かつ、エラーが発生したと判別した場合、エラーが発生したことを示すエラー検出信号を出力する、
ことを特徴とする請求項1乃至3のいずれか1項に記載の演算装置。
The NOP detection unit outputs a NOP detection signal indicating that the NOP state has been detected to the error detection unit,
The error detection unit receives the NOP detection signal, and when the NOP detection signal indicates the NOP state and determines that an error has occurred, an error detection signal indicating that an error has occurred. Output,
The arithmetic unit according to any one of claims 1 to 3, wherein
前記OPコード信号が減算命令を示しているか否かを検出する減算検出部と、
前記演算部が求めた前記演算結果データの符号を反転させる符号反転部と、を更に備え、
前記符号反転部は、前記減算検出部が前記減算命令を検出した場合、前記演算部が求めた前記演算結果データの符号を反転し、
前記エラー検出部は、前記演算部が求めた前記演算結果データと、前記符号反転部が符号を反転した前記演算結果データとを比較する、
ことを特徴とする請求項1乃至4のいずれか1項に記載の演算装置。
A subtraction detector that detects whether the OP code signal indicates a subtraction instruction;
A code inversion unit for inverting the sign of the calculation result data obtained by the calculation unit,
When the subtraction detection unit detects the subtraction instruction, the sign inversion unit inverts the sign of the operation result data obtained by the operation unit,
The error detection unit compares the calculation result data obtained by the calculation unit with the calculation result data obtained by inverting the sign of the sign inverting unit.
The arithmetic unit according to claim 1, wherein the arithmetic unit is any one of the above.
前記NOP検出部が出力した前記NOP検出信号を否定する否定部をさらに備え、
前記否定部は、否定した前記NOP検出信号を前記エラー検出部に出力し、
前記エラー検出部は、前記演算部が求めた前記演算結果データと前記否定部が否定して出力した前記NOP検出信号が示す値との論理積を求め、求めた前記論理積を前記演算結果データとして出力する、
ことを特徴とする請求項1乃至5のいずれか1項に記載に演算装置。
A negative unit that negates the NOP detection signal output by the NOP detection unit;
The negative part outputs the negative NOP detection signal to the error detection part,
The error detection unit obtains a logical product of the computation result data obtained by the computation unit and a value indicated by the NOP detection signal output by negation by the negation unit, and obtains the obtained logical product as the computation result data. Output as
The arithmetic unit according to any one of claims 1 to 5, wherein:
前記演算部は、パイプライン構成であり、
前記NOP検出部は、前記NOP検出信号が示す値を記憶する記憶部を前記パイプラインの段数に従った数備える、
ことを特徴とする請求項1乃至6のいずれか1項に記載の演算装置。
The arithmetic unit has a pipeline configuration,
The NOP detection unit includes a number of storage units that store a value indicated by the NOP detection signal according to the number of stages of the pipeline.
The arithmetic unit according to claim 1, wherein
前記命令制御部は、受信した前記OPコード信号を記憶するOPコード記憶部を備え、
前記第1オペランド制御部は、受信した前記オペランド信号を記憶する第1オペランド記憶部を備え、
前記第2オペランド制御部は、受信した前記オペランド信号を記憶する第2オペランド記憶部を備え、
前記NOP検出部は、前記NOP検出信号を記憶する第1NOP記憶部と、前記第1NOP記憶部が記憶している前記NOP検出信号を記憶する第2NOP記憶部と、を備え、
前記演算部は、前記演算結果データを記憶する第1演算結果記憶部と、前記第1演算結果記憶部が記憶している前記演算結果データを記憶する第2演算結果記憶部と、を備え、
前記NOP検出部が前記NOP状態を検出した第1のクロックサイクルにおいて、
前記NOP検出部は、前記第1NOP記憶部に前記NOP検出信号を記憶し、前記制御信号を前記命令制御部と前記第1オペランド制御部及び前記第2オペランド制御部に出力し、
前記命令制御部は、直前に受信した前記OPコード信号を前記OPコード記憶部に記憶し、前記OPコード記憶部に記憶された前記OPコード信号を前記演算部に出力し、
前記第1オペランド制御部は、前記第2オペランド制御部から受信した前記第2オペランド信号を前記第1オペランド記憶部に記憶し、前記第1オペランド記憶部に記憶された前記第2オペランド信号を前記演算部に出力し、
前記第2オペランド制御部は、前記第1オペランド制御部から受信した前記第1オペランド信号を前記第2オペランド記憶部に記憶し、前記第2オペランド記憶部に記憶された前記第1オペランド信号を前記演算部に出力し、
前記演算部は、求めた前記演算結果データを前記第1演算結果記憶部に記憶する、
ことを特徴とする請求項3に記載の演算装置。
The command control unit includes an OP code storage unit that stores the received OP code signal.
The first operand control unit includes a first operand storage unit that stores the received operand signal,
The second operand control unit includes a second operand storage unit that stores the received operand signal.
The NOP detection unit includes a first NOP storage unit that stores the NOP detection signal, and a second NOP storage unit that stores the NOP detection signal stored in the first NOP storage unit,
The calculation unit includes a first calculation result storage unit that stores the calculation result data, and a second calculation result storage unit that stores the calculation result data stored in the first calculation result storage unit,
In the first clock cycle in which the NOP detector detects the NOP state,
The NOP detection unit stores the NOP detection signal in the first NOP storage unit, and outputs the control signal to the instruction control unit, the first operand control unit, and the second operand control unit,
The instruction control unit stores the OP code signal received immediately before in the OP code storage unit, and outputs the OP code signal stored in the OP code storage unit to the arithmetic unit,
The first operand control unit stores the second operand signal received from the second operand control unit in the first operand storage unit, and stores the second operand signal stored in the first operand storage unit. Output to the arithmetic unit,
The second operand control unit stores the first operand signal received from the first operand control unit in the second operand storage unit, and stores the first operand signal stored in the second operand storage unit. Output to the arithmetic unit,
The calculation unit stores the calculated calculation result data in the first calculation result storage unit.
The arithmetic unit according to claim 3.
前記第1のクロックサイクルの次の第2のクロックサイクルにおいて、
前記NOP検出部は、前記第1NOP記憶部に記憶された前記NOP検出信号を前記第2NOP記憶部に記憶し、前記第2NOP記憶部に記憶された前記NOP検出信号を前記エラー検出部に出力し、
前記演算部は、前記第1演算結果記憶部に記憶された前記演算結果データを前記第2演算結果記憶部に記憶し、前記命令制御部と前記第1オペランド制御部及び前記第2オペランド制御部の出力信号に従って試験演算結果データを求め、求めた前記試験演算結果データを前記第1演算結果記憶部に記憶し、前記第1演算結果記憶部に記憶された前記試験演算結果データと前記第2演算結果記憶部に記憶された前記演算結果データを前記エラー検出部に出力し、
前記エラー検出部は、前記演算部が出力した前記試験演算結果データと前記演算結果データとを比較し、両者が異なる値である場合、かつ、前記NOP検出部が出力した前記NOP検出信号が前記NOP状態を示している場合、前記エラー検出信号を出力する、
ことを特徴とする請求項8に記載の演算装置。
In a second clock cycle following the first clock cycle,
The NOP detection unit stores the NOP detection signal stored in the first NOP storage unit in the second NOP storage unit, and outputs the NOP detection signal stored in the second NOP storage unit to the error detection unit. ,
The calculation unit stores the calculation result data stored in the first calculation result storage unit in the second calculation result storage unit, and the instruction control unit, the first operand control unit, and the second operand control unit. The test calculation result data is obtained in accordance with the output signal, the obtained test calculation result data is stored in the first calculation result storage unit, and the test calculation result data stored in the first calculation result storage unit and the second calculation result storage unit are stored. The calculation result data stored in the calculation result storage unit is output to the error detection unit,
The error detection unit compares the test calculation result data output from the calculation unit with the calculation result data, and when both are different values, the NOP detection signal output from the NOP detection unit is When the NOP state is indicated, the error detection signal is output.
The arithmetic unit according to claim 8.
演算装置に有効な演算命令が入力されていないNOP状態の検出に従って、受信する入力信号を制御する制御信号を出力するNOP検出ステップと、
前記NOP検出ステップで出力した前記制御信号に従って、演算命令を示すOPコード信号を受信し、受信した前記OPコード信号を出力する命令制御ステップと、
前記NOP検出ステップで出力した前記制御信号に従って、被演算データを示すオペランド信号を受信し、受信した前記オペランド信号を出力するオペランド制御ステップと、
前記命令制御ステップで出力した前記OPコード信号が示す演算命令に従って、前記オペランド制御ステップで出力した前記オペランド信号が示す被演算データに対する演算処理を実行し、求めた演算結果データを出力する演算ステップと、
前記演算ステップで出力した前記演算結果データに基づいて、エラーが発生したか否かを判別するエラー検出ステップと、を備える、
ことを特徴とするエラー検出方法。
A NOP detection step of outputting a control signal for controlling an input signal to be received in accordance with detection of a NOP state in which a valid arithmetic command is not input to the arithmetic device;
In accordance with the control signal output in the NOP detection step, an instruction control step of receiving an OP code signal indicating an operation instruction and outputting the received OP code signal;
According to the control signal output in the NOP detecting step, receiving an operand signal indicating data to be processed, and outputting the received operand signal;
An arithmetic step of performing arithmetic processing on the operand data indicated by the operand signal output in the operand control step and outputting the calculated arithmetic result data in accordance with the arithmetic instruction indicated by the OP code signal output in the instruction control step; ,
An error detection step of determining whether an error has occurred based on the calculation result data output in the calculation step;
An error detection method characterized by the above.
JP2011055853A 2011-03-14 2011-03-14 Arithmetic apparatus and error detection method Expired - Fee Related JP5732933B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011055853A JP5732933B2 (en) 2011-03-14 2011-03-14 Arithmetic apparatus and error detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011055853A JP5732933B2 (en) 2011-03-14 2011-03-14 Arithmetic apparatus and error detection method

Publications (2)

Publication Number Publication Date
JP2012194599A true JP2012194599A (en) 2012-10-11
JP5732933B2 JP5732933B2 (en) 2015-06-10

Family

ID=47086477

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011055853A Expired - Fee Related JP5732933B2 (en) 2011-03-14 2011-03-14 Arithmetic apparatus and error detection method

Country Status (1)

Country Link
JP (1) JP5732933B2 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57212539A (en) * 1981-06-24 1982-12-27 Nec Corp Arithmetic device
JPH09305423A (en) * 1996-05-20 1997-11-28 Nec Corp Arithmetic processor
JPH10161875A (en) * 1996-12-03 1998-06-19 Toshiba Corp Instruction parallel execution type data processor
JP2006209374A (en) * 2005-01-27 2006-08-10 Renesas Technology Corp Semiconductor integrated circuit device and compiler
JP2006286015A (en) * 2006-06-07 2006-10-19 Fujitsu Ltd Arithmetic processing device and self-diagnosis method thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS57212539A (en) * 1981-06-24 1982-12-27 Nec Corp Arithmetic device
JPH09305423A (en) * 1996-05-20 1997-11-28 Nec Corp Arithmetic processor
JPH10161875A (en) * 1996-12-03 1998-06-19 Toshiba Corp Instruction parallel execution type data processor
JP2006209374A (en) * 2005-01-27 2006-08-10 Renesas Technology Corp Semiconductor integrated circuit device and compiler
JP2006286015A (en) * 2006-06-07 2006-10-19 Fujitsu Ltd Arithmetic processing device and self-diagnosis method thereof

Also Published As

Publication number Publication date
JP5732933B2 (en) 2015-06-10

Similar Documents

Publication Publication Date Title
US10157059B2 (en) Instruction and logic for early underflow detection and rounder bypass
JP5607832B2 (en) General logic operation method and apparatus
JP2015505998A (en) Perform arithmetic operations using both large and small floating-point values
CN104321741A (en) Double rounded combined floating-point multiply and add
JP2010271818A (en) Device and method of instruction fusion calculation
CN101689233B (en) Standby operation of a resonant power converter
Smith Speedup of self-timed digital systems using early completion
JP2009230338A (en) Processor and information processing apparatus
JP4883251B1 (en) Semiconductor integrated circuit and index calculation method
US8713086B2 (en) Three-term predictive adder and/or subtracter
Kelly et al. Arithmetic data value speculation
JP5732933B2 (en) Arithmetic apparatus and error detection method
US7356553B2 (en) Data processing apparatus and method for determining a processing path to perform a data processing operation on input data elements
US9244653B2 (en) Method and device for handling data values
US9268527B2 (en) Method and device for generating an exception
US6112291A (en) Method and apparatus for performing a shift instruction with saturate by examination of an operand prior to shifting
Zulkifli et al. Reduced stall MIPS architecture using pre-fetching accelerator
CN109977701B (en) Fixed floating point arithmetic device
US7386580B2 (en) Data processing apparatus and method for computing an absolute difference between first and second data elements
JP4382128B2 (en) Information processing apparatus and error calculation detection method thereof
US11080054B2 (en) Data processing apparatus and method for generating a status flag using predicate indicators
JP3541005B2 (en) Data processing apparatus and method
Didier et al. RISC-V word-size modular instructions for Residue Number Systems
US6760738B2 (en) Exponent unit of data processing system
Andorno Design of the frontend for LEN5, a RISC-V Out-of-Order processor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140207

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141024

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141111

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150109

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20150127

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20150226

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150330

R150 Certificate of patent or registration of utility model

Ref document number: 5732933

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees