JP6891789B2 - Arithmetic logic unit - Google Patents

Arithmetic logic unit Download PDF

Info

Publication number
JP6891789B2
JP6891789B2 JP2017238587A JP2017238587A JP6891789B2 JP 6891789 B2 JP6891789 B2 JP 6891789B2 JP 2017238587 A JP2017238587 A JP 2017238587A JP 2017238587 A JP2017238587 A JP 2017238587A JP 6891789 B2 JP6891789 B2 JP 6891789B2
Authority
JP
Japan
Prior art keywords
arithmetic unit
data
rom
cause
floating
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.)
Active
Application number
JP2017238587A
Other languages
Japanese (ja)
Other versions
JP2019106042A (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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2017238587A priority Critical patent/JP6891789B2/en
Publication of JP2019106042A publication Critical patent/JP2019106042A/en
Application granted granted Critical
Publication of JP6891789B2 publication Critical patent/JP6891789B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、各種演算処理を実行する演算装置の技術分野に関する。 The present invention relates to a technical field of an arithmetic unit that executes various arithmetic processes.

この種の装置として、浮動小数点演算を行うものが知られている。浮動小数点演算では、非数(NaN:Not a Number)が発生すると、以降の演算が正常に実行できなくなるおそれがある。このため、例えば特許文献1では、浮動小数点演算において非数が発生した場合に、対象のブロックを初期化して制御不良を防止するという技術が提案されている。 As a device of this type, a device that performs floating-point arithmetic is known. In floating-point arithmetic, if a non-number (NaN: Not a Number) occurs, subsequent arithmetic may not be able to be executed normally. Therefore, for example, Patent Document 1 proposes a technique of initializing a target block to prevent a control failure when a non-number occurs in a floating-point operation.

特開2004−278483号公報Japanese Unexamined Patent Publication No. 2004-278843

非数が発生した場合の対応策としては、フェールセーフへの移行や、演算結果データの上書きが挙げられる。フェールセーフへ移行すると、通常の制御が中止されるため、確実に異常の発生を抑制することができる一方で、システム全体の機能を著しく低下させてしまうおそれがある。他方、演算結果データの上書きをして制御を続行すると、重大な欠陥が生じている場合に、エラー対策処理が多重発生し、演算不能に陥るおそれがある。このため、フェールセーフへの移行と演算データの上書きとは、非数発生の原因に応じて選択されることが好ましい。しかしながら、上述した特許文献1においては、このようなケースは全く想定されておらず、十分に改善の余地がある。 Countermeasures when a non-number occurs include migration to fail-safe and overwriting of calculation result data. When shifting to fail-safe, normal control is stopped, so that the occurrence of abnormalities can be reliably suppressed, but there is a risk that the functions of the entire system will be significantly reduced. On the other hand, if the calculation result data is overwritten and the control is continued, if a serious defect occurs, multiple error countermeasure processing may occur and the calculation may become impossible. Therefore, it is preferable that the transition to fail-safe and the overwriting of the calculated data are selected according to the cause of the non-numerical occurrence. However, in the above-mentioned Patent Document 1, such a case is not assumed at all, and there is sufficient room for improvement.

本発明は、例えば上記問題点に鑑みてなされたものであり、非数が発生した原因に応じて適切な制御を実行することが可能な演算装置を提供することを課題とする。 The present invention has been made in view of the above problems, for example, and an object of the present invention is to provide an arithmetic unit capable of executing appropriate control according to the cause of occurrence of a non-number.

本発明に係る演算装置の一態様では、汎用レジスタ、浮動小数点演算器、及び固定小数点演算器を有するCPUと、前記CPUにデータバスを介して接続されたROM及びRAMとを備える演算装置であって、演算制御における前記浮動小数点演算器の演算結果が非数であった場合に、前記汎用レジスタ、前記浮動小数点演算器、前記データバス、前記ROM、又は前記RAMのいずれが原因で前記演算結果が非数になったのかを特定する特定手段と、(i)前記特定された原因が、前記浮動小数点演算器、前記ROM、又は前記RAMのいずれかであった場合には、前記演算制御を継続させ、(ii)前記特定された原因が、前記汎用レジスタ、又は前記データバスのいずれかであった場合には、前記演算制御を中止して、フェールセーフ処理へと移行させる対処手段とを備える。 One aspect of the arithmetic unit according to the present invention is an arithmetic unit including a CPU having a general-purpose register, a floating-point arithmetic unit, and a fixed-point arithmetic unit, and a ROM and RAM connected to the CPU via a data bus. When the calculation result of the floating-point arithmetic unit in the arithmetic control is non-number, the calculation result is caused by any of the general-purpose register, the floating-point arithmetic unit, the data bus, the ROM, or the RAM. The specific means for specifying whether or not the number has become non-number, and (i) when the specified cause is any of the floating-point arithmetic unit, the ROM, or the RAM, the arithmetic control is performed. (Ii) If the identified cause is either the general-purpose register or the data bus, the coping means for stopping the arithmetic control and shifting to fail-safe processing is provided. Be prepared.

本実施形態に係る演算装置の構成を示すブロック図である。It is a block diagram which shows the structure of the arithmetic unit which concerns on this embodiment. 本実施形態に係る演算装置によるエラー処理の流れを示すフローチャートである。It is a flowchart which shows the flow of error processing by the arithmetic unit which concerns on this embodiment. 本実施形態に係る演算装置による演算処理の最上位処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the top-level processing of the arithmetic processing by the arithmetic unit which concerns on this embodiment. 本実施形態に係る演算装置による通常処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the normal processing by the arithmetic unit which concerns on this embodiment. 非数発生要因とその場合の対処方法とを示す表である。It is a table showing the non-numerical factors and the countermeasures in that case.

以下、図面を参照して演算装置の実施形態について説明する。 Hereinafter, embodiments of the arithmetic unit will be described with reference to the drawings.

<システム構成>
まず、本実施形態に係る演算装置の構成について、図1を参照して説明する。図1は、本実施形態に係る演算装置の構成を示すブロック図である。
<System configuration>
First, the configuration of the arithmetic unit according to the present embodiment will be described with reference to FIG. FIG. 1 is a block diagram showing a configuration of an arithmetic unit according to the present embodiment.

図1に示すように、本実施形態に係る演算装置10は、CPU(Central Processing Unit)100、ROM(Read Only Memory)200、RAM(Random Access Memory)300、及び割り込みコントローラ400を備えて構成されている。 As shown in FIG. 1, the arithmetic unit 10 according to the present embodiment includes a CPU (Central Processing Unit) 100, a ROM (Read Only Memory) 200, a RAM (Random Access Memory) 300, and an interrupt controller 400. ing.

CPU100は、汎用レジスタ110、ALU.F(浮動小数点演算器)120、及びALU(固定小数点演算器)130を備えている。汎用レジスタ110は、ROM200及びRAM300からデータバス150を介して読み出したデータを一時的に格納する記憶装置である。ALU.F120及びALU130は、汎用レジスタ110に記憶されているデータを適宜読み出して演算処理を行うことが可能に構成されている。 The CPU 100 includes a general-purpose register 110, an ALU.F (floating point arithmetic unit) 120, and an ALU (fixed point arithmetic unit) 130. The general-purpose register 110 is a storage device that temporarily stores data read from the ROM 200 and the RAM 300 via the data bus 150. The ALU.F120 and ALU130 are configured to be able to appropriately read the data stored in the general-purpose register 110 and perform arithmetic processing.

ROM200は、予め記憶されたデータを格納している記憶装置であり、CPU100に対してデータバス150を介してデータを出力可能に構成されている。また、ROM200は、CPUに対して命令バス250を介して命令コードを出力可能に構成されている。 The ROM 200 is a storage device that stores data stored in advance, and is configured to be able to output data to the CPU 100 via the data bus 150. Further, the ROM 200 is configured to be able to output an instruction code to the CPU via the instruction bus 250.

RAM300は、データの読み書きが可能な記憶装置であり、CPU100との間でデータバス150を介してデータのやり取りが行えるように構成されている。 The RAM 300 is a storage device capable of reading and writing data, and is configured so that data can be exchanged with the CPU 100 via the data bus 150.

割り込みコントローラ400は、ALU.F120の演算結果に非数が発生したことを示す非数発生通知を受信可能に構成されている。割り込みコントローラ400は、非数発生通知を受信すると、CPU100に対してエラー処理を起動するように命令を出力することができる。エラー処理については、以下で詳しく説明する。 The interrupt controller 400 is configured to be able to receive a non-number occurrence notification indicating that a non-number has occurred in the calculation result of the ALU.F120. Upon receiving the non-numerical occurrence notification, the interrupt controller 400 can output an instruction to the CPU 100 to start error processing. Error handling will be described in detail below.

<エラー処理>
次に、本実施形態に係る演算装置10によるエラー処理(即ち、非数が発生した場合の処理)について、図2を参照して説明する。図2は、本実施形態に係る演算装置によるエラー処理の流れを示すフローチャートである。
<Error handling>
Next, error processing (that is, processing when a non-number occurs) by the arithmetic unit 10 according to the present embodiment will be described with reference to FIG. FIG. 2 is a flowchart showing a flow of error processing by the arithmetic unit according to the present embodiment.

図2に示すように、エラー処理時には、まず汎用レジスタ110のチェック(即ち、非数が発生した原因が汎用レジスタ100にあるか否かをチェックする処理)を実行する(ステップS11)。汎用レジスタ110のチェックは、例えば非数発生要因となり得る値(非数、+∞、−∞、0等)以外の特定値を汎用レジスタ110に書き込んだ後、書き込んだ値を読み出して、任意の値が書き込めるかチェックすればよい。この際には、命令に直接値を記載してROM200からデータを読み出さないようにする。 As shown in FIG. 2, at the time of error processing, first, a check of the general-purpose register 110 (that is, a process of checking whether or not the cause of the non-number occurrence is in the general-purpose register 100) is executed (step S11). The check of the general-purpose register 110 is performed by writing a specific value other than a value (non-number, + ∞, −∞, 0, etc.) that can cause a non-number to the general-purpose register 110, reading the written value, and arbitrarily Just check if the value can be written. At this time, the value is directly described in the instruction so that the data is not read from the ROM 200.

汎用レジスタ110のチェック後には、チェックの結果としてエラーがなかったか否か(即ち、非数が発生した原因が汎用レジスタ110でなかったか否か)を判定する(ステップS12)。エラーがなかった場合(ステップS12:YES)、ステップS14へと進む。一方、エラーがあった場合(ステップS12:NO)、エラーを管理する値であるFlag_Errに“ERROR1”を入力して(ステップS13)、ステップS25へと進む。 After checking the general-purpose register 110, it is determined whether or not there is an error as a result of the check (that is, whether or not the cause of the non-number occurrence is the general-purpose register 110) (step S12). If there is no error (step S12: YES), the process proceeds to step S14. On the other hand, if there is an error (step S12: NO), "ERROR1" is input to Flag_Err, which is a value for managing the error (step S13), and the process proceeds to step S25.

続いて、データバス150のチェック(即ち、非数が発生した原因がデータバス150にあるか否かをチェックする処理)を実行する(ステップS14)。データバス150のチェックは、例えば非数発生要因となり得る値(非数、+∞、−∞、0等)以外の特定値をROM200に書き込んだ後、書き込んだ値を読み出して、読み出したデータが書き込んでおいたデータと一致するか否かをチェックすればよい。 Subsequently, the check of the data bus 150 (that is, the process of checking whether or not the cause of the non-number occurrence is in the data bus 150) is executed (step S14). In the check of the data bus 150, for example, after writing a specific value other than a value (non-number, + ∞, −∞, 0, etc.) that can cause non-number generation to the ROM 200, the written value is read and the read data is read. You can check if it matches the written data.

データバス150のチェック後には、チェックの結果としてエラーがなかったか否か(即ち、非数が発生した原因がデータバス150でなかったか否か)を判定する(ステップS15)。エラーがなかった場合(ステップS15:YES)、ステップS17へと進む。一方、エラーがあった場合(ステップS15:NO)、Flag_Errに“ERROR2”を入力して(ステップS16)、ステップS25へと進む。 After checking the data bus 150, it is determined whether or not there is an error as a result of the check (that is, whether or not the cause of the non-number is not the data bus 150) (step S15). If there is no error (step S15: YES), the process proceeds to step S17. On the other hand, if there is an error (step S15: NO), "ERROR2" is input to Flag_Err (step S16), and the process proceeds to step S25.

続いて、ALU.F120のチェック(即ち、非数が発生した原因がALU.F120にあるか否かをチェックする処理)を実行する(ステップS17)。ALU.F120のチェックは、例えば浮動小数点演算により絶対に非数が発生しないデータの組み合わせ(例えば、非数、+∞、−∞、0以外)を使って演算を行い、演算結果が非数となっていないことをチェックすればよい。 Subsequently, the check of the ALU.F120 (that is, the process of checking whether or not the cause of the non-number has occurred in the ALU.F120) is executed (step S17). The ALU.F120 check is performed using, for example, a combination of data in which non-numbers are never generated by floating-point arithmetic (for example, non-numbers, other than + ∞, -∞, and 0), and the operation result is non-numerical. You can check that it is not.

ALU.F120のチェック後には、チェックの結果としてエラーがなかったか否か(即ち、非数が発生した原因がALU.F120でなかったか否か)を判定する(ステップS18)。エラーがなかった場合(ステップS18:YES)、ステップS20へと進む。一方、エラーがあった場合(ステップS18:NO)、Flag_Errに“ERROR3”を入力して(ステップS19)、ステップS25へと進む。 After checking the ALU.F120, it is determined whether or not there was an error as a result of the check (that is, whether or not the cause of the non-number was not the ALU.F120) (step S18). If there is no error (step S18: YES), the process proceeds to step S20. On the other hand, if there is an error (step S18: NO), "ERROR3" is input to Flag_Err (step S19), and the process proceeds to step S25.

続いて、ROM200のデータチェック(即ち、非数が発生した原因がROM200のデータにあるか否かをチェックする処理)を実行する(ステップS20)。ROM200のデータのチェックは、例えばROM200からデータを読み出して非数を発生させるような値(例えば、非数、+∞、−∞、0以外)でないことをチェックすればよい。 Subsequently, the data check of the ROM 200 (that is, the process of checking whether or not the cause of the non-number occurrence is in the data of the ROM 200) is executed (step S20). The data in the ROM 200 may be checked by checking that the data is not a value (for example, other than the non-number, +∞, −∞, 0) that reads the data from the ROM 200 and generates a non-number.

ROM200のデータのチェック後には、チェックの結果としてエラーがなかったか否か(即ち、非数が発生した原因がROM200のデータでなかったか否か)を判定する(ステップS21)。エラーがなかった場合(ステップS21:YES)、ステップS24へと進む。一方、エラーがあった場合(ステップS22:NO)、Flag_Errに“ERROR4”を入力し(ステップS22)、更にエラーが発生したアドレスを示す値であるErr_ADDRに異常のあったROM200のデータのアドレスを入力して、ステップS25へと進む。 After checking the data of the ROM 200, it is determined whether or not there is an error as a result of the check (that is, whether or not the cause of the non-number occurrence is the data of the ROM 200) (step S21). If there is no error (step S21: YES), the process proceeds to step S24. On the other hand, if there is an error (step S22: NO), "ERROR4" is input to Flag_Err (step S22), and the address of the ROM 200 data in which there is an abnormality in Err_ADDR, which is a value indicating the address where the error occurred, is entered. Input and proceed to step S25.

本実施形態に係る演算装置において、非数を発生させる原因となり得るのは、汎用レジスタ110、データバス150、ALU.F120、ROM200、及びRAM300のいずれかである。よって、ここまでのチェック処理(即ち、ステップS11、ステップS14、ステップS17、ステップS20の各処理)のいずれでもエラーがなかった場合には、残るRAM300に非数が発生する原因があると判断できる。このため、ステップS20の処理でもエラーがなかった場合には(ステップS21:YES)、RAM300にエラーがあると判断して、Flag_Errに“ERROR5”を入力する(ステップS24)。ただし、ROM200のデータをチェックした場合と同様に、実際にRAM300のデータをチェックしてエラーの有無を判断してもよい。 In the arithmetic unit according to the present embodiment, it is any one of the general-purpose register 110, the data bus 150, the ALU.F120, the ROM 200, and the RAM 300 that can cause the non-number to be generated. Therefore, if there is no error in any of the check processes up to this point (that is, each process of step S11, step S14, step S17, and step S20), it can be determined that there is a cause for the occurrence of a non-number in the remaining RAM 300. .. Therefore, if there is no error in the process of step S20 (step S21: YES), it is determined that there is an error in the RAM 300, and "ERROR5" is input to Flag_Err (step S24). However, as in the case of checking the data of the ROM 200, the data of the RAM 300 may be actually checked to determine the presence or absence of an error.

非数が発した原因となる部位が判明したら(即ち、チェク処理の結果としてFlag_Errに何らかの入力が完了したら)、Flag_Errに“ERROR5”が入力されているか否かを判定する(ステップS25)。即ち、非数が発生した原因がRAM300のデータであるか否かを判定する。Flag_Errに“ERROR5”が入力されている場合には(ステップS25:YES)、演算データを上書きして(ステップS26)、一連の処理を終了する。一方、Flag_Errに“ERROR5”が入力されていない場合には(ステップS25:NO)、演算データは上書きせずに(即ち、ステップS26は省略して)、一連の処理を終了する。 When the part causing the non-number is found (that is, when some input is completed in Flag_Err as a result of the check process), it is determined whether or not "ERROR5" is input in Flag_Err (step S25). That is, it is determined whether or not the cause of the non-number is the data of the RAM 300. When "ERROR5" is input to Flag_Err (step S25: YES), the operation data is overwritten (step S26), and the series of processes is completed. On the other hand, when "ERROR5" is not input to Flag_Err (step S25: NO), the operation data is not overwritten (that is, step S26 is omitted), and the series of processes is terminated.

<演算処理の最上位処理>
次に、本実施形態に係る演算装置10による演算処理の最上位処理について、図3を参照して説明する。図3は、本実施形態に係る演算装置による演算処理の最上位処理の流れを示すフローチャートである。
<Top level processing of arithmetic processing>
Next, the top-level processing of the arithmetic processing by the arithmetic unit 10 according to the present embodiment will be described with reference to FIG. FIG. 3 is a flowchart showing a flow of top-level processing of arithmetic processing by the arithmetic unit according to the present embodiment.

図3に示すように、演算処理の最上位処理では、まずFlag_Errに“ERROR1”及び“ERROR2”が入力されていない状態であるか否かを判定する(ステップS31)。即ち、非数が発生した要因が汎用レジスタ110及びデータバス150のいずれでもないのか否かを判定する。 As shown in FIG. 3, in the top-level processing of the arithmetic processing, it is first determined whether or not "ERROR1" and "ERROR2" are not input to Flag_Err (step S31). That is, it is determined whether or not the cause of the non-number is neither the general-purpose register 110 nor the data bus 150.

Flag_Errに“ERROR1”及び“ERROR2”が入力されていない状態である場合(ステップS31:YES)、通常処理1、通常処理2、…、通常処理Nをコールして順次実行していく(ステップS32〜ステップS34)。一方で、Flag_Errに“ERROR1”又は“ERROR2”が入力されている状態である場合(ステップS31:YES)、フェールセーフを実行する(ステップS35)。 When "ERROR1" and "ERROR2" are not input to Flag_Err (step S31: YES), normal process 1, normal process 2, ..., Normal process N are called and executed in sequence (step S32). ~ Step S34). On the other hand, when "ERROR1" or "ERROR2" is input to Flag_Err (step S31: YES), fail-safe is executed (step S35).

上述したように、本実施形態に係る演算装置10では、非数が発生した要因が汎用レジスタ110及びデータバス150のいずれでもない場合には、通常の演算処理が実行され、非数が発生した要因が汎用レジスタ110又はデータバス150のいずれかであった場合には、フェールセーフが実行される(言い換えれば、通常の演算処理は実行されない)。なお、フェールセーフは、演算結果に非数が発生したことに起因する不具合を防止するための処理である。 As described above, in the arithmetic unit 10 according to the present embodiment, when the cause of the non-number is neither the general-purpose register 110 nor the data bus 150, normal arithmetic processing is executed and the non-number is generated. If the cause is either the general-purpose register 110 or the data bus 150, fail-safe is executed (in other words, normal arithmetic processing is not executed). The fail-safe is a process for preventing a problem caused by the occurrence of a non-number in the calculation result.

<通常処理>
次に、本実施形態に係る演算装置10による通常処理(即ち、図3のステップS32からステップS34の各処理)について、図4を参照して説明する。図4は、本実施形態に係る演算装置による通常処理の流れを示すフローチャートである。
<Normal processing>
Next, the normal processing by the arithmetic unit 10 according to the present embodiment (that is, each processing from step S32 to step S34 in FIG. 3) will be described with reference to FIG. FIG. 4 is a flowchart showing the flow of normal processing by the arithmetic unit according to the present embodiment.

図4に示すように、通常処理時には、まずFlag_Errに“ERROR4”が入力されていない状態であるか否かを判定する(ステップS41)。即ち、非数が発生した要因がROM200のデータではないのか否か(言い換えれば、非数が発生した要因が、この時点で残された可能性であるALU.F120であるか否か)を判定する。 As shown in FIG. 4, at the time of normal processing, it is first determined whether or not "ERROR4" is not input to Flag_Err (step S41). That is, it is determined whether or not the cause of the non-number is not the data of the ROM 200 (in other words, whether or not the factor of the non-number is ALU.F120 which may have been left at this point). To do.

Flag_Errに“ERROR4”が入力されていない状態ではない場合(ステップS41:NO)、簡易制御ロジックによる演算処理を実行する(ステップS42)。即ち、非数の発生した原因がROM200ではなく、ALU.F120にあると判定できる場合には、簡易制御ロジックが採用された上で、通常の演算処理が実行される。簡易制御ロジックでは、例えば、制御状態等の主要パラメータによって、当該処理の代表値を返すようにすればよい。より具体的には、例えば代表値テーブルを、制御状態の入力データによって探索すればよい。この場合、エラーのあるALU.F120を使用しないように、扱うパラメータは浮動小数点ではなく、整数型のデータとする。 When "ERROR4" is not input to Flag_Err (step S41: NO), the calculation process by the simple control logic is executed (step S42). That is, when it can be determined that the cause of the non-number occurrence is not the ROM 200 but the ALU.F120, the simple control logic is adopted and the normal arithmetic processing is executed. In the simple control logic, for example, a representative value of the process may be returned according to a main parameter such as a control state. More specifically, for example, the representative value table may be searched by the input data of the control state. In this case, the parameter to be handled is not floating point but integer type data so as not to use ALU.F120 with an error.

Flag_Errに“ERROR4”が入力されていない状態である場合(ステップS41:YES)、Flag_Errに“ERROR3”が入力されており、且つ、演算処理がErr_ADDRのデータを使用するものであるか否かを判定する(ステップS43)。即ち、非数が発生した要因がROM200のデータであり、且つ、異常の見つかったアドレスのデータを使用して演算処理を実行するのか否かを判定する。 When "ERROR4" is not input to Flag_Err (step S41: YES), whether or not "ERROR3" is input to Flag_Err and the arithmetic processing uses the data of Err_ADDR. Determine (step S43). That is, it is determined whether or not the cause of the non-number occurrence is the data of the ROM 200 and the arithmetic processing is executed using the data of the address where the abnormality is found.

Flag_Errに“ERROR3”が入力されており、且つ、演算処理がErr_ADDRのデータを使用するものであると判定された場合(ステップS43:YES)、ROM値を使用しない制御ロジックで演算処理を実行する(ステップS44)。この場合の制御ロジックは、上述した簡易制御ロジックと同じであってもよい。また、ALU.Fに以上はないと判断できる状態なので、浮動小数点演算を実施してもよい。 When "ERROR3" is input to Flag_Err and it is determined that the arithmetic processing uses the data of Err_ADDR (step S43: YES), the arithmetic processing is executed by the control logic that does not use the ROM value. (Step S44). The control logic in this case may be the same as the simple control logic described above. Further, since it can be determined that there is no more than ALU.F, floating-point arithmetic may be performed.

Flag_Errに“ERROR3”が入力されていない、又は、演算処理がErr_ADDRのデータを使用するものではないと判定された場合(ステップS43:NO)、通常の演算処理(浮動小数点演算)を実行する(ステップS45)。 When "ERROR3" is not input to Flag_Err, or when it is determined that the arithmetic processing does not use the data of Err_ADDR (step S43: NO), the normal arithmetic processing (floating point arithmetic) is executed (floating point arithmetic). Step S45).

<技術的効果>
次に、本実施形態に係る演算装置10によって得られる技術的効果について、図5を参照して説明する。図5は、非数発生要因とその場合の対処方法とを示す表である。なお、図中の〇は“正常”、×は“異常(エラー)”、−は“チェック不要”を意味している。
<Technical effect>
Next, the technical effect obtained by the arithmetic unit 10 according to the present embodiment will be described with reference to FIG. FIG. 5 is a table showing non-numerical factors and countermeasures in that case. In the figure, 〇 means “normal”, × means “abnormal (error)”, and − means “no check required”.

図5に示すように、本実施形態に係る演算装置10では、エラー処理を実行することで、ALU.Fの演算結果に非数が発生した原因(非数発生要因)がどの部位にあるか否かを判定し、その判定結果に応じて相異なる対処を行う。 As shown in FIG. 5, in the arithmetic unit 10 according to the present embodiment, which part is the cause (non-number generation factor) of the non-number occurrence in the calculation result of ALU.F by executing the error processing. Judge whether or not, and take different measures according to the judgment result.

具体的には、(1)の汎用レジスタ110のチェック(即ち、図2のステップS11の処理)でエラーが見つかった場合には、非数発生要因が汎用レジスタ110のハード故障であると判断し、コントロール(即ち、通常の演算処理)を継続しない。(2)のデータバス150のチェック(即ち、図2のステップS14の処理)でエラーが見つかった場合には、データバス150の故障であると判断し、同様にコントロールを継続しない。 Specifically, if an error is found in the check of the general-purpose register 110 in (1) (that is, the process of step S11 in FIG. 2), it is determined that the non-numerical cause is a hardware failure of the general-purpose register 110. , Do not continue control (ie, normal arithmetic processing). If an error is found in the check of the data bus 150 (that is, the process of step S14 of FIG. 2) in (2), it is determined that the data bus 150 has failed, and the control is not continued in the same manner.

汎用レジスタ110又はデータバス150でエラーが見つかった場合には、その後の演算処理を継続することが極めて困難となる。このため、コントロールを継続しないことを選択する(フェールセーフを実行する)ことで、システム異常による不具合を最小限に抑えることができる。 If an error is found in the general-purpose register 110 or the data bus 150, it becomes extremely difficult to continue the subsequent arithmetic processing. Therefore, by selecting not to continue the control (execute fail-safe), it is possible to minimize the trouble caused by the system abnormality.

(3)のALU.F120のチェック(即ち、図2のステップS17の処理)でエラーが見つかった場合には、非数発生要因がALU.F120の故障であると判断し、ALU130だけを使った簡易ロジックでコントロールを継続する。(4)のROM200のデータチェック(即ち、図2のステップS20の処理)でエラーが見つかった場合には、非数発生要因がROM200のデータ値の異常であると判断し、異常のあるデータを使用しない範囲でコントロールを継続する。(5)のRAM300のデータチェック(すでに説明したように、省略可能)でエラーが見つかった場合には、非数発生要因がRAM300のデータ値の異常であると判断し、演算結果のデータを書き換えてコントロールを継続する。 If an error is found in the check of the ALU.F120 in (3) (that is, the process of step S17 in FIG. 2), it is determined that the non-number generation factor is the failure of the ALU.F120, and only the ALU130 is used. Continue control with simple logic. If an error is found in the data check of the ROM 200 in (4) (that is, the process of step S20 in FIG. 2), it is determined that the non-number generation factor is an abnormality in the data value of the ROM 200, and the abnormal data is selected. Continue control as long as you do not use it. If an error is found in the data check of the RAM 300 in (5) (optional as described above), it is determined that the non-numerical cause is an abnormality in the data value of the RAM 300, and the calculation result data is rewritten. To continue control.

ALU.F120、ROM200、又はRAM300のいずれかでエラーが見つかった場合には、何らかの対策を行うことで演算処理自体は継続して実行することが可能である。このため、コントロールを継続しない場合と比較すると、演算装置の機能低下を抑制することができる。 When an error is found in any of the ALU.F120, ROM200, or RAM300, the arithmetic processing itself can be continuously executed by taking some measures. Therefore, as compared with the case where the control is not continued, it is possible to suppress the functional deterioration of the arithmetic unit.

<付記>
以上説明した実施形態から導き出される発明の各種態様を以下に説明する。
<Additional notes>
Various aspects of the invention derived from the embodiments described above will be described below.

(付記1)
付記1に記載の演算装置は、汎用レジスタ、浮動小数点演算器、及び固定小数点演算器を有するCPUと、前記CPUにデータバスを介して接続されたROM及びRAMとを備える演算装置であって、演算制御における前記浮動小数点演算器の演算結果が非数であった場合に、前記汎用レジスタ、前記浮動小数点演算器、前記データバス、前記ROM、又は前記RAMのいずれが原因で前記演算結果が非数になったのかを特定する特定手段と、(i)前記特定された原因が、前記浮動小数点演算器、前記ROM、又は前記RAMのいずれかであった場合には、前記演算制御を継続させ、(ii)前記特定された原因が、前記汎用レジスタ、又は前記データバスのいずれかであった場合には、前記演算制御を中止して、フェールセーフ処理へと移行させる対処手段とを備える。
(Appendix 1)
The arithmetic unit according to Appendix 1 is an arithmetic unit including a CPU having a general-purpose register, a floating-point arithmetic unit, and a fixed-point arithmetic unit, and a ROM and a RAM connected to the CPU via a data bus. When the calculation result of the floating-point arithmetic unit in the calculation control is non-number, the calculation result is not due to any of the general-purpose register, the floating-point arithmetic unit, the data bus, the ROM, or the RAM. If the specific means for specifying whether the number has been reached and (i) the specified cause is any of the floating-point arithmetic unit, the ROM, or the RAM, the arithmetic control is continued. , (Ii) If the identified cause is either the general-purpose register or the data bus, the arithmetic control is stopped and the process shifts to fail-safe processing.

付記1に記載の演算装置によれば、浮動小数点演算器の演算結果が非数であった原因が、演算装置のどの部位であるかによって、相異なる対処が実行される。具体的には、浮動小数点演算器、ROM、又はRAMのいずれかであった場合には、演算制御が続行される。一方、浮動小数点演算器の演算結果が非数であった原因が、汎用レジスタ又はデータバスのいずれかであった場合には、演算制御が中止され、フェールセーフへと移行する。 According to the arithmetic unit described in Appendix 1, different measures are taken depending on which part of the arithmetic unit is the cause of the non-numerical calculation result of the floating-point arithmetic unit. Specifically, if it is any of a floating-point arithmetic unit, ROM, or RAM, arithmetic control is continued. On the other hand, if the cause of the non-numerical calculation result of the floating-point arithmetic unit is either a general-purpose register or a data bus, the arithmetic control is stopped and the process shifts to fail-safe.

非数の原因が、浮動小数点演算器、ROM、又はRAMのいずれかである場合には、フェールセーフへと移行せずとも、条件次第で演算制御を続行することが可能である。具体的には、例えば演算データの上書き、一部データの不使用、簡易ロジックの設定等を行うことで、演算制御を続行することができる。このように、演算結果が非数となった場合であっても、簡易的な対処を行いつつ演算制御を続行することで、演算装置としての機能が大きく低下してしまうことを抑制できる。 When the cause of the non-number is any of the floating-point arithmetic unit, ROM, or RAM, it is possible to continue the arithmetic control depending on the conditions without shifting to fail-safe. Specifically, the calculation control can be continued by, for example, overwriting the calculation data, not using some data, setting the simple logic, and the like. In this way, even when the calculation result is innumerable, it is possible to prevent the function as the calculation device from being significantly deteriorated by continuing the calculation control while taking simple measures.

他方、非数の原因が、汎用レジスタ又はデータバスのいずれかである場合には、演算制御を続行することが非常に困難であるため、即座にフェールセーフへと移行することが好ましい。演算制御を中止してフェールセーフへと移行すれば、演算結果が非数であることに起因する異常の発生を、確実に抑制することが可能である。 On the other hand, when the cause of the non-number is either a general-purpose register or a data bus, it is very difficult to continue arithmetic control, so it is preferable to immediately shift to fail-safe. If the calculation control is stopped and the process shifts to fail-safe, it is possible to surely suppress the occurrence of an abnormality caused by the innumerable calculation results.

本発明は、上述した実施形態に限られるものではなく、請求の範囲及び明細書全体から読み取れる発明の要旨或いは思想に反しない範囲で適宜変更可能であり、そのような変更を伴う演算装置もまた本発明の技術的範囲に含まれるものである。 The present invention is not limited to the above-described embodiment, and can be appropriately modified within the scope of claims and within a range not contrary to the gist or idea of the invention that can be read from the entire specification. It is included in the technical scope of the present invention.

10 演算装置
100 CPU
110 汎用レジスタ
120 ALU.F
130 ALU
150 データバス
200 ROM
250 命令バス
300 RAM
400 割り込みコントローラ
10 Arithmetic logic unit 100 CPU
110 General-purpose register 120 ALU.F
130 ALU
150 data bus 200 ROM
250 instruction bus 300 RAM
400 interrupt controller

Claims (1)

汎用レジスタ、浮動小数点演算器、及び固定小数点演算器を有するCPUと、前記CPUにデータバスを介して接続されたROM及びRAMとを備える演算装置であって、
演算制御における前記浮動小数点演算器の演算結果が非数であった場合に、前記汎用レジスタ、前記浮動小数点演算器、前記データバス、前記ROM、又は前記RAMのいずれが原因で前記演算結果が非数になったのかを特定する特定手段と、
(i)前記特定された原因が、前記浮動小数点演算器、前記ROM、又は前記RAMのいずれかであった場合には、前記演算制御を継続させ、(ii)前記特定された原因が、前記汎用レジスタ、又は前記データバスのいずれかであった場合には、前記演算制御を中止して、フェールセーフ処理へと移行させる対処手段と
を備え
前記特定手段は、前記浮動小数点演算器、前記ROM、又は前記RAMが原因であることを特定する処理よりも前に、前記汎用レジスタ、又は前記データバスが原因であることを特定する処理を実行する
ことを特徴とする演算装置。
An arithmetic unit including a CPU having a general-purpose register, a floating-point arithmetic unit, and a fixed-point arithmetic unit, and a ROM and RAM connected to the CPU via a data bus.
When the calculation result of the floating-point arithmetic unit in the arithmetic control is non-number, the calculation result is not due to any of the general-purpose register, the floating-point arithmetic unit, the data bus, the ROM, or the RAM. A specific means of identifying whether the number has been reached,
(I) When the identified cause is any of the floating-point arithmetic unit, the ROM, or the RAM, the arithmetic control is continued, and (ii) the identified cause is the said. If it is either a general-purpose register or the data bus, it is provided with a coping means for stopping the arithmetic control and shifting to fail-safe processing .
The specifying means executes a process of identifying the cause of the general-purpose register or the data bus before the process of identifying the cause of the floating-point arithmetic unit, the ROM, or the RAM. An arithmetic unit characterized by
JP2017238587A 2017-12-13 2017-12-13 Arithmetic logic unit Active JP6891789B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2017238587A JP6891789B2 (en) 2017-12-13 2017-12-13 Arithmetic logic unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2017238587A JP6891789B2 (en) 2017-12-13 2017-12-13 Arithmetic logic unit

Publications (2)

Publication Number Publication Date
JP2019106042A JP2019106042A (en) 2019-06-27
JP6891789B2 true JP6891789B2 (en) 2021-06-18

Family

ID=67061368

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2017238587A Active JP6891789B2 (en) 2017-12-13 2017-12-13 Arithmetic logic unit

Country Status (1)

Country Link
JP (1) JP6891789B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5339266A (en) * 1993-11-29 1994-08-16 Motorola, Inc. Parallel method and apparatus for detecting and completing floating point operations involving special operands
JP3644350B2 (en) * 2000-04-03 2005-04-27 株式会社デンソー Automotive electronic control device with floating point arithmetic function
JP4158566B2 (en) * 2003-03-18 2008-10-01 株式会社デンソー Electronic control device having floating point arithmetic function
WO2013145292A1 (en) * 2012-03-30 2013-10-03 富士通株式会社 Information processing device, information processing method, information processing program and recording medium

Also Published As

Publication number Publication date
JP2019106042A (en) 2019-06-27

Similar Documents

Publication Publication Date Title
JP5780174B2 (en) System and method for handling bad bit errors
US8812910B2 (en) Pilot process method for system boot and associated apparatus
KR101978984B1 (en) Apparatus and method for detecting fault of processor
JP6290303B2 (en) Circuit and method for testing error correction capability
JP5464128B2 (en) RAM failure diagnosis apparatus and program thereof
KR20080037060A (en) Memory arrangement and method for the operation thereof
JP6891789B2 (en) Arithmetic logic unit
KR20100031402A (en) Method and apparatus for detecting free page and error correction code decoding method and apparatus using the same
JP2019160270A (en) Method, device, server, and program for checking defective function
JP2016110503A (en) Micro controller
JP6332134B2 (en) Memory diagnostic circuit
JP2017058870A (en) Memory control device and memory control method
US20100174520A1 (en) Simulator
CN109710445B (en) Memory correction method and electronic equipment
KR20150075867A (en) Method and apparatus for executing bootloader
JP4135413B2 (en) MEMORY CHECK SYSTEM, MEMORY CHECK METHOD, SIGNAL PROCESSING DEVICE, SIGNAL PROCESSING DEVICE MEMORY CHECK METHOD, AND MEMORY CHECK PROGRAM
CN111352754A (en) Data storage error detection and correction method and data storage device
US20080270830A1 (en) Data Processing System and Method for Operating a Data Processing System
JP2011028657A (en) Ram diagnosis device and program
JP6363044B2 (en) Control device
JP4867557B2 (en) Programmable controller
JP6405966B2 (en) Electronic control unit
JP2013065261A (en) Memory management device
JP2011232910A (en) Memory diagnosis system
JP2009238168A (en) Microprocessor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20200526

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20210225

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20210302

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210414

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210510

R151 Written notification of patent or utility model registration

Ref document number: 6891789

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151