JP6344135B2 - Error detection code generation circuit, error detection code generation method, and format conversion apparatus - Google Patents

Error detection code generation circuit, error detection code generation method, and format conversion apparatus Download PDF

Info

Publication number
JP6344135B2
JP6344135B2 JP2014165824A JP2014165824A JP6344135B2 JP 6344135 B2 JP6344135 B2 JP 6344135B2 JP 2014165824 A JP2014165824 A JP 2014165824A JP 2014165824 A JP2014165824 A JP 2014165824A JP 6344135 B2 JP6344135 B2 JP 6344135B2
Authority
JP
Japan
Prior art keywords
format
data
xor
bit
decimal
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
JP2014165824A
Other languages
Japanese (ja)
Other versions
JP2016042651A (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.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2014165824A priority Critical patent/JP6344135B2/en
Publication of JP2016042651A publication Critical patent/JP2016042651A/en
Application granted granted Critical
Publication of JP6344135B2 publication Critical patent/JP6344135B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Error Detection And Correction (AREA)

Description

本発明は,エラー検出コード生成回路,エラー検出コード生成方法及びフォーマット変換装置に関する。   The present invention relates to an error detection code generation circuit, an error detection code generation method, and a format conversion apparatus.

2進の浮動小数点形式では誤差が発生する場合があるため,財務計算などでは10進の浮動小数点で演算が行われている。10進数の表現として,BCD(Binary Coded Decimal)形式が広く用いられている。しかし,BCD形式は10進数の1桁を4ビットの2進数で表現するため,4ビットで表現できる16種類の数値のうち10個の数値(0−9)しか使用していない。そのため,BCD形式は,例えば64ビットでは64÷4ビット=16桁の10進数しか表現できず,表現できる10進数の桁数に対してデータ量が大きくなる。   Since errors may occur in the binary floating point format, operations are performed in decimal floating point in financial calculations. A BCD (Binary Coded Decimal) format is widely used as a decimal number representation. However, since the BCD format expresses one decimal digit by a 4-bit binary number, only 10 numerical values (0-9) are used among 16 types of numerical values that can be expressed by 4 bits. Therefore, in the BCD format, for example, 64 bits can represent only 64 ÷ 4 bits = 16-digit decimal numbers, and the amount of data increases with respect to the number of decimal digits that can be represented.

そのため,近年,IEEE浮動小数点演算の標準化(IEEE Standard for Floating-Point Arithmetic (IEEE Std 754-2008))が,BCD形式の10進数を圧縮して格納するDPD(Densely-Packed Decimal)形式を提案している。DPD形式の場合は,後述するとおり,10進数の3桁(0−999)を10ビットの2進数で表現する。10ビットで表現できる数値は1024種類であるが,そのうち1000種類を使用するので,BCD形式よりもビットの利用効率が高い。   Therefore, in recent years, the IEEE Standard for Floating-Point Arithmetic (IEEE Std 754-2008) has proposed a DPD (Densely-Packed Decimal) format that compresses and stores decimal numbers in BCD format. ing. In the case of the DPD format, as will be described later, three decimal digits (0-999) are represented by 10-bit binary numbers. There are 1024 numerical values that can be expressed in 10 bits, but 1000 of them are used, so the bit utilization efficiency is higher than in the BCD format.

しかし,DPD形式は,10進数の3桁を表現する12ビット(1桁4ビット)のBCD形式を特殊なエンコーディングによって10ビットのDPD形式に変換しているので,DPD形式で演算することはできないまたは困難である。そのため,圧縮されたDPD形式でメモリに記憶したり,送信したりするが,メモリから読み出したり受信した後にDPD形式からBCD形式に変換し,BCD形式で10進演算を行い,演算結果のBCD形式をDPD形式に再度変換することが行われる。   However, in the DPD format, the 12-bit (1 digit 4 bits) BCD format that expresses 3 decimal digits is converted to the 10-bit DPD format by special encoding, so it cannot be operated in the DPD format. Or difficult. Therefore, it is stored in memory or transmitted in compressed DPD format, but after reading or receiving from memory, it is converted from DPD format to BCD format, decimal operation is performed in BCD format, and BCD format of the operation result Is converted back to DPD format.

そこで,DPD形式の10進浮動小数点数のデータのエラー検出コードを生成して,DPD形式の10進浮動小数点数のデータにエラー検出コードを付加して記憶したり,送信したりすることが提案されている。例えば,以下の特許文献などである。   Therefore, it is proposed to generate an error detection code for DPD-format decimal floating-point data, store the error detection code in DPD-format decimal floating-point data, and send it. Has been. For example, the following patent documents.

特開2014−38413号公報JP 2014-38413 A

前述のとおり演算結果のBCD形式の10進浮動小数点数は,DPD形式にフォーマット変換され,変換後のDPD形式の10進浮動小数点数がメモリに記憶されたり,送信されたりする。したがって,変換後のDPD形式の10進浮動小数点数を論理演算してエラー検出コードを生成し,DPD形式の10進浮動小数点数と共にメモリに記憶したり送信したりする。   As described above, the BCD-format decimal floating point number obtained as a result of the operation is format-converted to the DPD format, and the converted DPD-format decimal floating-point number is stored in the memory or transmitted. Therefore, an error detection code is generated by performing a logical operation on the converted decimal floating point number in the DPD format, and stored in a memory or transmitted together with the decimal floating point number in the DPD format.

しかし,BCD形式からDPD形式へのフォーマット変換演算とDPD形式のデータのエラー検出コード生成の演算とを行うと,演算回路の段数が長くなり,高速処理の妨げになる。また,フォーマット変換後のDPD形式のデータを演算してエラー検出コードを生成すると,フォーマット変換回路でエラーが発生した場合,そのエラーを含んだDPD形式のデータから生成したエラー検出コードでは,そのエラーを検出することができない。   However, if the format conversion calculation from the BCD format to the DPD format and the error detection code generation calculation of the data in the DPD format are performed, the number of stages of the arithmetic circuit becomes long, which hinders high-speed processing. Also, if an error detection code is generated by calculating the DPD format data after format conversion, if an error occurs in the format conversion circuit, the error detection code generated from the DPD format data that includes the error Cannot be detected.

そこで,実施の形態の一つの目的は,演算回路の高速化のためのエラー検出コード生成回路,エラー検出コード生成方法,及びフォーマット変換回路を有するフォーマット変換装置を提供することにある。   Accordingly, an object of the embodiment is to provide an error detection code generation circuit, an error detection code generation method, and a format conversion device having a format conversion circuit for speeding up an arithmetic circuit.

実施の形態の第1の側面のエラー検出コード生成回路は,4ビットで0から9までの数字を表現する第1の形式の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットをそれぞれ生成する複数の第1のXOR生成回路と,
前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成する第2のXOR生成回路と,
前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式の10進数データのエラー検出用XORビットとして,生成する第3のXOR生成回路とを有し,
前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力する。
The error detection code generation circuit according to the first aspect of the embodiment has 12 bits assigned to 3 decimal digits included in decimal data of the first format that expresses a number from 0 to 9 in 4 bits. A plurality of first XOR generation circuits each generating a first XOR bit for
A second XOR generation circuit for generating a second XOR bit for four bits allocated to one decimal digit included in the decimal data in the first format;
The first XOR bit, the second XOR bit, the sign bit, and the third XOR bit for the exponent bit are represented by 10 bits converted from the decimal data of the first format to represent three decimal digits. A third XOR generation circuit for generating XOR bits for error detection of decimal data in the second format
The error detection XOR bit and the modulo 3 of the decimal data in the first format are output as redundant data for error detection of the decimal data in the second format.

演算回路を高速化することができる。エラー検出コードの信頼性を向上することができる。   The arithmetic circuit can be speeded up. The reliability of the error detection code can be improved.

DPDフォーマットの10進浮動小数点数を説明するための図である。It is a figure for demonstrating the decimal floating point number of a DPD format. コンビネーションフィールドGの上位5ビットGUのエンコーディングを示す図である。6 is a diagram illustrating encoding of upper 5 bits GU of a combination field G. FIG. DPD形式の10ビットの組declet (b[9:0])からBCD形式の3桁の10進数(100 × h + 10 × t + o)への変換方法を示す図である。It is a figure which shows the conversion method from the 10-bit set declet (b [9: 0]) of a DPD format to the decimal number (100 * h + 10 * t + o) of a BCD format. BCD形式の3桁の10進数(100 × h + 10 × t + o)からDPD形式の10ビットの組declet(b[9:0])への変換方法を示す図である。It is a figure which shows the conversion method from the decimal number (100 * h + 10 * t + o) of a BCD format to the 10-bit set declet (b [9: 0]) of a DPD format. DPD形式の単精度と倍精度のフォーマットを示す図である。It is a figure which shows the single precision and double precision format of a DPD format. DPDのRAS用冗長データ生成回路の全体構成図である。It is a whole block diagram of the redundant data generation circuit for RAS of DPD. pgu及びpgl生成回路601の構成を示す図である。5 is a diagram showing a configuration of a pgu and pgl generation circuit 601. FIG. pgu及びpgl生成回路601内のpgu生成回路801の構成を示す図である。5 is a diagram showing a configuration of a pgu generation circuit 801 in the pgu and pgl generation circuit 601. FIG. pt生成回路602の構成図である。3 is a configuration diagram of a pt generation circuit 602. FIG. pt生成回路602内の各decletのデータD0[9:0]−D4[9:0]のmod3データptY[1:0]とxorデータptXを有するRAS用冗長データを生成するpd#生成回路の構成図である。pd # generation circuit for generating redundant data for RAS having mod3 data ptY [1: 0] of data D0 [9: 0] -D4 [9: 0] of each declet in the pt generation circuit 602 and xor data ptX It is a block diagram. DPD形式とBCD形式の利用の一例を示す図である。It is a figure which shows an example of utilization of a DPD format and a BCD format. 本実施の形態におけるエラー検出コード生成回路を有するフォーマット変換装置を示す図である。It is a figure which shows the format conversion apparatus which has the error detection code generation circuit in this Embodiment. 本実施の形態におけるエラー検出コード生成回路を有するフォーマット変換装置を示す図である。It is a figure which shows the format conversion apparatus which has the error detection code generation circuit in this Embodiment. RAS用冗長データ生成回路12を示す図である。2 is a diagram showing a RAS redundant data generation circuit 12. FIG. BCD形式のデータのフォーマットを示す図である。It is a figure which shows the format of the data of a BCD format. pd(i)生成回路12_0〜12_4の論理回路を示す図である。It is a figure which shows the logic circuit of pd (i) production | generation circuits 12_0-12_4. pd(5)生成回路12_5の論理回路を示す図である。It is a figure which shows the logic circuit of pd (5) generation circuit 12_5.

以下,2進数の場合,10進数と区別するために,2進数のビット列の最後に下付き添字2を付加する場合がある。例えば,11111のとおりに表記する。 Hereinafter, in the case of a binary number, in order to distinguish it from a decimal number, a subscript 2 may be added to the end of the binary bit string. For example, it referred to as 11111 2.

本実施の形態を説明する前に,BCDフォーマット及びDPDフォーマットとの関係と,DPD形式のデータのエラー検出コード生成回路について説明する。   Before describing this embodiment, the relationship between the BCD format and the DPD format, and an error detection code generation circuit for data in the DPD format will be described.

[BCDフォーマット]
BCDフォーマットは,10進数の1桁を4ビットの2進数で表記する。例えば,3桁の10進数100×h+10×t+oの場合,100の位をh[3:0],10の位をt[3:0],1の位をo[3:0]で表記する。したがって,3桁の10進数を,各4ビットの数h[3:0],t[3:0],o[3:0]の合計12ビットで表記する。したがって,BCD形式の場合は,64ビットで16桁の10進数を表記する。
[BCD format]
In the BCD format, one decimal digit is expressed as a 4-bit binary number. For example, in the case of a 3-digit decimal number 100 × h + 10 × t + o, the 100's place is represented by h [3: 0], the 10's place is represented by t [3: 0], and the 1's place is represented by o [3: 0]. . Therefore, a 3-digit decimal number is expressed by a total of 12 bits, each of a 4-bit number h [3: 0], t [3: 0], and o [3: 0]. Therefore, in the case of the BCD format, a 16-digit decimal number is expressed by 64 bits.

BCD形式の10進数に,符号ビットと指数データを加えることで,DPD形式の10進数浮動小数点数にエンコードすることができる。   By adding a sign bit and exponent data to a decimal number in BCD format, it can be encoded into a decimal floating point number in DPD format.

[DPDフォーマット]
図1(A)〜(C)は,DPDフォーマットの10進浮動小数点数を説明するための図である。図1(A)はDPDフォーマットの10進浮動小数点数のビット長を示す図であり,図1(B)は単精度のDPDフォーマットの10進浮動小数点数のフォーマットを示す図であり,図1(C)は倍精度のDPDフォーマットの10進浮動小数点数のフォーマットを示す図である。
[DPD format]
FIGS. 1A to 1C are diagrams for explaining decimal floating point numbers in the DPD format. 1A is a diagram showing the bit length of a decimal floating point number in the DPD format, and FIG. 1B is a diagram showing the format of a decimal floating point number in the single precision DPD format. (C) is a diagram showing a format of a decimal floating point number in a double precision DPD format.

DPD形式10進浮動小数点数は,符号フィールドS,コンビネーションフィールドG,後続仮数部フィールドTからなる。DPD形式10進浮動小数点数は,符号S(0または1),指数exponentと仮数significandで表現し,下記の式で示される値を表す。   The DPD format decimal floating point number includes a sign field S, a combination field G, and a trailing mantissa field T. A DPD-format decimal floating point number is represented by a sign S (0 or 1), an exponent exponent and a mantissa significand, and represents a value represented by the following expression.

そして,指数exponentはコンビネーションフィールドGに,仮数significandはコンビネーションフィールドGと後続仮数部フィールドTに分割して格納される。   The exponent exponent is stored in the combination field G, and the mantissa significand is stored in the combination field G and the subsequent mantissa field T.

図1(A)(B)に示すように,単精度の10進浮動小数点数は,1ビットの符号フィールドS,11ビットのコンビネーションフィールドG,及び20ビットの後続仮数部フィールドTを有し,全データ長が32ビットである。11ビットのコンビネーションフィールドGは,5ビットの上位ビットGU[4:0]と,w(=6)ビットの下位ビットGL[w−1:0]を有する。   As shown in FIGS. 1A and 1B, a single-precision decimal floating point number has a 1-bit code field S, an 11-bit combination field G, and a 20-bit trailing mantissa field T. The total data length is 32 bits. The 11-bit combination field G has a 5-bit upper bit GU [4: 0] and a w (= 6) -bit lower bit GL [w-1: 0].

図2(C)に示すように,倍精度の10進浮動小数点数は,1ビットの符号フィールドS,13ビットのコンビネーションフィールドG,及び50ビットの後続仮数部フィールドTを有し,全データ長が64ビットである。13ビットのコンビネーションフィールドGは,5ビットの上位ビットGU[4:0]と,w(=8)ビットの下位ビットGL[w−1:0]を有する。   As shown in FIG. 2C, the double-precision decimal floating point number has a 1-bit sign field S, a 13-bit combination field G, and a 50-bit trailing mantissa field T, and has a total data length. Is 64 bits. The 13-bit combination field G has a 5-bit upper bit GU [4: 0] and a w (= 8) -bit lower bit GL [w-1: 0].

符号Sは,符号フィールドSに格納される。指数exponentは,コンビネーションフィールドGの一部に格納される。仮数significandは,コンビネーションフィールドGの一部と後続仮数部フィールドTとに分割して格納される。   The code S is stored in the code field S. The exponent exponent is stored in a part of the combination field G. The mantissa significand is divided and stored in a part of the combination field G and a subsequent mantissa field T.

図2は,コンビネーションフィールドGの上位5ビットGUのエンコーディングを示す図である。コンビネーションフィールドGは,5ビットの上位ビットGU[4:0]とwビットの下位ビットGL[w−1:0]とに分けられる。図2に示すように,5ビットの上位ビットGU[4:0]には,指数部の上位2ビットと仮数部の最上位桁(leftmost digit:LMD)の2つの情報が格納される。   FIG. 2 is a diagram showing the encoding of the upper 5 bits GU of the combination field G. The combination field G is divided into five upper bits GU [4: 0] and w lower bits GL [w-1: 0]. As shown in FIG. 2, two pieces of information, that is, the upper 2 bits of the exponent part and the leftmost digit (LMD) of the mantissa part are stored in the 5 upper bits GU [4: 0].

図2において,GU[4:0]=11111の場合,GL[w−1]=1なら非数SNaNを,GL[w−1]=0なら非数QNaNを示し,GL[w−2:0]はdon’t careになる。非数QNaNは,例えば,±0÷±0,±∞÷±∞, √(−1) 等の演算が行われたときに出力される演算結果の非数である。非数SNaNは,例えば,ユーザーやソフトウェアが,バグ検出のトリガとして敢えて仕込む場合に使用される非数であり,通常演算(例えば,四則演算)に非数SNaNの入力があった場合,無効例外が報告される。これに対し,非数QNaNの入力があった場合,演算結果は各演算仕様に従った非数QNaNを出力し,非数SNaNの場合と異なり,無効例外を引き起こすことはない。後続仮数フィールドTは,非数QNaN又はSNaNの診断情報を示すペイロード(payload)になる。 In FIG. 2, GU [4: 0] = 11111 For 2, GL [w-1] = 1 if non number SNaN, shows a-number QNaN if GL [w-1] = 0 , GL [w-2 : 0] becomes don't care. The non-number QNaN is a non-number of calculation results that are output when calculations such as ± 0 ÷ ± 0, ± ∞ ÷ ± ∞, √ (−1) are performed. The non-number SNaN is a non-number that is used, for example, when a user or software dares to prepare a bug detection trigger. When a non-number SNaN is input to a normal operation (for example, four arithmetic operations), an invalid exception is issued. Is reported. On the other hand, when a non-number QNaN is input, the calculation result outputs a non-number QNaN according to each calculation specification, and unlike the case of a non-number SNaN, an invalid exception is not caused. The subsequent mantissa field T becomes a payload indicating diagnostic information of non-number QNaN or SNaN.

GU[4:0]=11110の場合,+∞または−∞を示す。この場合GL[w−1:0]はdon’t careになる。 GU [4: 0] = 11110 For 2 shows a + ∞ or -∞. In this case, GL [w-1: 0] becomes don't care.

GU[4:0]=1110xまたは110xxの場合(xは1または0のいずれか),GU[2:1]は指数部上位2ビットを示し,8+GU[0]で仮数部最上位桁LMDの8または9を示す。この場合,指数部上位2ビットは,GU[2:1]=00,01,10のいずれかになり,仮数部最上行桁LMDはGU[0]=0なら8に,GU[0]=1なら9になる。そして,下位ビットGL[w−1:0]は指数部の下位ビットを示す。 GU [4: 0] = 1110x case of 2 or 110Xx 2 (either x is 1 or 0), GU [2: 1 ] indicates the exponent upper 2 bits, 8 + GU [0] in the mantissa most significant digit LMD 8 or 9 is indicated. In this case, the upper 2 bits of the exponent part are any one of GU [2: 1] = 00 2 , 01 2 , 10 2 , and the most significant digit LMD of the mantissa part is set to 8 when GU [0] = 0. If 0] = 1, it becomes 9. The lower bits GL [w-1: 0] indicate the lower bits of the exponent part.

一方,GU[4:0]=10xxxまたは0xxxxの場合,上記とはGUビットの意味が異なり,GU[4:3]が指数部上位2ビットを示し,GU[2:0]で仮数部最上位桁LMDの0−7を示す。この場合,指数部上位2ビットは,GU[4:3]=00,01,10のいずれかになり,仮数部最上行桁LMDはGU[2:0]の3ビット2進数で0−7のいずれかになる。そして,下位ビットGL[w−1:0]は指数部の下位ビットを示す。 On the other hand, when GU [4: 0] = 10xxxx 2 or 0xxxx 2 , the meaning of the GU bit is different from the above, GU [4: 3] indicates the upper 2 bits of the exponent part, and GU [2: 0] The most significant digit LMD 0-7 is shown. In this case, the upper 2 bits of the exponent part are any one of GU [4: 3] = 00 2 , 01 2 , and 10 2 , and the most significant digit LMD of the mantissa part is a 3-bit binary number of GU [2: 0]. It will be one of 0-7. The lower bits GL [w-1: 0] indicate the lower bits of the exponent part.

したがって,仮数部最上位桁がゼロになるのは,図2の最下段の場合であり,上位ビットGU[4:0]が00000,01000,10000のいずれかのときであり,下位3ビットでゼロが表現される。したがって,10進数の「+0」は,S=0, T=0であり,かつ上位ビットGU[4:0]が00000,01000,10000のいずれかである。すなわち,2ビットGU[4:3]の3パターンと下位ビットGL[w−1:0]のビット幅wの分だけゼロのバリエーション (コホート) がある。 Therefore, the most significant digit of the mantissa part is zero in the case of the lowermost stage in FIG. 2 when the upper bits GU [4: 0] are any one of 00000 2 , 01000 2 , and 10000 2. Zero is represented by 3 bits. Therefore, the decimal number “+0” is S = 0, T = 0, and the upper bits GU [4: 0] are any one of 00000 2 , 01000 2 , and 10000 2 . That is, there are zero variations (cohorts) corresponding to the 3 patterns of 2 bits GU [4: 3] and the bit width w of the lower bits GL [w-1: 0].

このように,コンビネーションフィールドGの上位ビットGU[4:0]のコードに応じて,非数NaN情報を示したり,指数部上位2ビットと仮数部最上位桁及び下位ビットを異なるフォーマットで表示する。このようなエンコーディングにより,コンビネーションフィールドG=GU,GLを少ないビット数でより多くの情報を表現するようにしている。   As described above, according to the code of the upper bits GU [4: 0] of the combination field G, the non-numeric NaN information is displayed, or the upper 2 bits of the exponent part and the most significant digit and the lower bit of the mantissa part are displayed in different formats. . By such encoding, the combination field G = GU, GL is used to express more information with a smaller number of bits.

次に,後続仮数部フィールドTについて説明する。後続仮数部フィールドTは,10ビットの組decletが複数個連なる。図1(A)に示すように,単精度では20ビットの後続仮数部フィールドTが2個の10ビットの組decletを有し,倍精度では50ビットの後続仮数部フィールドTが5個の10ビットの組decletを有する。各10ビットの組decletは,0から999までの3桁の10進数を表現する。図1(A)に示すように,単精度では後続仮数部フィールドTは3桁×2組=6桁の10進数を表現可能であり,倍精度では後続仮数部フィールドTは3桁×5組=15桁の10進数を表現可能である。   Next, the subsequent mantissa field T will be described. In the subsequent mantissa field T, a plurality of 10-bit sets declet are connected. As shown in FIG. 1A, a 20-bit trailing mantissa field T has two 10-bit sets declet in single precision, and a 50-bit trailing mantissa field T has five 10 bits in double precision. It has a set of bits declet. Each 10-bit set declet represents a 3-digit decimal number from 0 to 999. As shown in FIG. 1A, in the single precision, the trailing mantissa field T can represent a decimal number of 3 digits × 2 pairs = 6 digits, and in the double precision, the trailing mantissa field T has 3 digits × 5 pairs. = A decimal number of 15 digits can be expressed.

[DPDフォーマットとBCDフォーマット間の変換]
図3は,DPD形式の10ビットの組declet (b[9:0])からBCD形式の3桁の10進数(100 × h + 10 × t + o)への変換方法を示す図である。図4は,BCD形式の3桁の10進数(100 ×h + 10 × t + o)からDPD形式の10ビットの組declet(b[9:0])への変換方法を示す図である。ここで,10ビットの組decletは10ビットのb[9:0]で表され,3桁の10進数は「100×h+10×t+o」で表される。hは,百の位を表す4ビットh[3:0]のデータである。tは,十の位を表す4ビットt[3:0]のデータである。oは,一の位を表す4ビットo[3:0]のデータである。以下,上記のb,h,t,oをbiのように表記する。
[Conversion between DPD format and BCD format]
FIG. 3 is a diagram showing a conversion method from a 10-bit set declet (b [9: 0]) in the DPD format to a 3-digit decimal number (100 × h + 10 × t + o) in the BCD format. FIG. 4 is a diagram showing a conversion method from a three-digit decimal number (100 × h + 10 × t + o) in the BCD format to a 10-bit set declet (b [9: 0]) in the DPD format. Here, a 10-bit set declet is represented by 10-bit b [9: 0], and a 3-digit decimal number is represented by “100 × h + 10 × t + o”. h is 4-bit data h [3: 0] representing hundreds. t is 4-bit t [3: 0] data representing the tens place. o is 4-bit o [3: 0] data representing the one's place. Hereinafter, the above b, h, t, and o are represented as bi.

なお,図4の1行目から8行目は,図3の1,2,3,7,4,6,5,8行目に対応している。   Note that the first to eighth lines in FIG. 4 correspond to the first, second, third, seventh, fourth, sixth, fifth, and eighth lines in FIG.

前述したとおり,DPD形式における10ビットのb[9:0]で表現できる数は1024種類であり,3桁の10進数で表現できる数は1000種類であり,両者は異なる。N組の10ビットの組declet,b[9:0]が,3N桁の10進数に対応している。   As described above, the number that can be represented by 10 bits of b [9: 0] in the DPD format is 1024 types, and the number that can be represented by a 3-digit decimal number is 1000 types, which are different. N sets of 10-bit sets declet, b [9: 0] correspond to 3N-digit decimal numbers.

図3,4に示したDPD形式の圧縮法では,BCD形式のある10進の桁の値が3ビットの2進で表現できな8以上の場合は8または9しかないことを利用して,BCD形式の10進の桁が8または9になる場合は,8または9になる桁の2進の最下位だけを,10ビットのb[9:0]内に含めるようにして,ビット数を節約している。   In the DPD format compression method shown in FIGS. 3 and 4, when the decimal value of a BCD format is 8 or more that cannot be expressed in 3-bit binary, only 8 or 9 is used. When the decimal digit of BCD format is 8 or 9, only the binary least significant digit of 8 or 9 digit is included in 10-bit b [9: 0], and the number of bits is set. Saving.

圧縮法を具体的に説明すると,次のとおりである。
(1)BCD形式の3桁がすべて0−7の場合は,DPDのb[3]=0とし,以下のような対応になる。
DPDのb[9:7]=BCDのh[2:0]
DPDのb[6:4]=BCDのt[2:0]
DPDのb[2:0]=BCDのo[2:0]
A specific description of the compression method is as follows.
(1) When all three digits of the BCD format are 0-7, DPD b [3] = 0 is set, and the following correspondence is obtained.
B [9: 7] of DPD = h [2: 0] of BCD
B [6: 4] of DPD = t [2: 0] of BCD
B [2: 0] of DPD = o [2: 0] of BCD

(2)BCD形式の3桁のうち1桁が8または9の場合は,DPDのb[3]=1とし,DPDのb[2,1]でどの桁が8または9になるかを示す。そして,以下のような対応になる。
BCDの1の位が8または9の場合,DPDのb[0]=0,1でBCDの8,9(8+b[0])
BCDの十の位が8または9の場合,DPDのb[4]=0,1でBCDの8,9(8+b[4])
BCDの百の位が8または9の場合,DPDのb[7]=0,1でBCDの8,9(8+b[7])
(2) If one of the three digits in the BCD format is 8 or 9, set DPD b [3] = 1 to indicate which digit is 8 or 9 in DPD b [2,1]. . And it becomes the following correspondence.
When the 1's place of BCD is 8 or 9, b [0] = 0,1 of DPD and 8,9 of BCD (8 + b [0])
When the tens place of BCD is 8 or 9, b [4] of DPD = 0, 1 and 8,9 of BCD (8 + b [4])
When the hundreds of BCD is 8 or 9, b [7] of DPD = 0,1 and 8,9 of BCD (8 + b [7])

(3)BCD形式の3桁のうち複数桁が8または9の場合は,DPDのb[3,2,1]=111とし,DPDのb[6,5]でどの2桁または3桁が8または9になるかを示す。BCDの8または9の桁とDPDの対応は上記と同じである。   (3) If multiple digits of the 3 digits in the BCD format are 8 or 9, set b [3,2,1] = 111 in DPD, and which 2 digits or 3 digits are in b [6,5] in DPD Indicates whether it will be 8 or 9. The correspondence between BCD 8 or 9 digits and DPD is the same as above.

(4)BCD形式で8または9になる桁がある場合の,BCD形式の0−7とDPD形式のビットの位置は,図3,4に示されるとおりである。   (4) The positions of BCD format 0-7 and DPD format bits when there are 8 or 9 digits in the BCD format are as shown in FIGS.

[DPD形式の10進浮動小数点数のエラー検出コード]
DPDフォーマットにすることでデータ量を圧縮できるので,DPD形式の10進浮動小数点数からエラー検出コードを演算し,エラー検出コードと共にメモリに記憶したり,送信することが行われる。そこで,前述の特許文献1にはDPD形式の10進浮動小数点数のエラー検出コードを生成する回路が記載されている。
[Error detection code of decimal floating point number in DPD format]
Since the amount of data can be compressed by using the DPD format, an error detection code is calculated from a decimal floating point number in the DPD format, and stored in the memory together with the error detection code or transmitted. Therefore, Patent Document 1 described above describes a circuit for generating an error detection code of a decimal floating point number in the DPD format.

このエラー検出コードは,一種のRAS(信頼性,可用性,保守性:Reliability, Availability and Serviceability)用冗長データである。そこで,以下エラー検出コードをRAS用冗長データと称する。   This error detection code is a kind of redundant data for RAS (Reliability, Availability and Serviceability). Therefore, the error detection code is hereinafter referred to as RAS redundant data.

RAS用冗長データは,DPD形式の10進浮動小数点数のデータを論理演算して生成される。RAS用冗長データは,10進浮動小数点数の仮数部のモジュロ3(3で除した余り,以下mod3,%3と称する)と,mod3データでは検出できないエラーを検出するためのXOR値(排他的論理和,以下xorと称する)を有する。一般に,2進数の1ビットが変化すると必ずそのmod3データも変化するので,mod3データは1ビットエラーの存在を検出するために有効なRAS用冗長コードである。但し,DPD形式は符号ビット,指数,仮数を有するためmod3データだけでは検出できない1ビットエラーが存在するので,mod3データに所定のビットのXORビットを付加してRAS用冗長データとしている。   Redundant data for RAS is generated by logically operating decimal floating point data in DPD format. Redundant data for RAS consists of the modulo 3 of the mantissa part of the decimal floating-point number (the remainder after dividing by 3; hereinafter referred to as mod3,% 3) and the XOR value for detecting errors that cannot be detected with mod3 data (exclusive Logical sum, hereinafter referred to as xor). In general, whenever one bit of a binary number changes, its mod3 data also changes. Therefore, mod3 data is an effective RAS redundancy code for detecting the presence of a 1-bit error. However, since the DPD format has a sign bit, an exponent, and a mantissa, there is a 1-bit error that cannot be detected only by mod3 data. Therefore, the XOR bit of a predetermined bit is added to mod3 data to form redundant data for RAS.

DPD形式の10進浮動小数点数の仮数部のmod3データは,BCD形式の10進数のmod3データと一致する。このようにすることで,BCD形式からDPD形式に変換した場合,BDC形式のRAS用冗長データとして有するmod3データを,DPD形式のRAS用冗長データのmod3データに利用することができる。したがって,DPD形式のRAS用冗長データを生成する回路は,DPDフォーマットに基づいて上記のmod3データを生成する。   The mod3 data in the mantissa part of the decimal floating point number in the DPD format matches the decimal mod3 data in the BCD format. In this way, when the BCD format is converted to the DPD format, the mod3 data included as redundant data for RAS in the BDC format can be used as mod3 data for redundant data for RAS in the DPD format. Therefore, the circuit that generates redundant data for RAS in the DPD format generates the above mod3 data based on the DPD format.

さらに,BCD形式の10進数データをDPD形式の10進浮動小数点数データに変換する場合,BCD形式の10進数データに,DPD形式に含まれる符号ビットと指数ビットを加えて,フォーマット変換回路に入力する。フォーマット変換により,入力に加えられた符号ビットと指数ビットはそのまま変換後のDPD形式のデータに含まれる。また,DPD形式の仮数部の10進数の数値と,BCD形式の10進数の数値は当然に一致する。但し,同じ10進数の数が両形式のフォーマットに基づいてエンコードされる。   Furthermore, when converting decimal data in BCD format to decimal floating point data in DPD format, the sign bit and exponent bit included in the DPD format are added to the decimal data in BCD format and input to the format conversion circuit. To do. The sign bit and exponent bit added to the input by format conversion are included in the converted DPD format data as they are. In addition, the decimal number in the mantissa part of the DPD format and the decimal number in the BCD format naturally match. However, the same decimal number is encoded based on both formats.

図5は,DPD形式の単精度と倍精度のフォーマットを示す図である。単精度の場合,後続仮数部フィールドTは,2組のdeclet,b[11:0]を有する。また,倍精度の場合,後続仮数部フィールドTは,5組のdeclet,b[11:0]を有する。また,コンビネーションフィールドの上位ビットGU[4:0]は共に5ビットであり,下位ビットGL[w−1:0]は,単精度は6ビット,倍精度は8ビットである。そして,仮数部の最上位桁LMDは,上位ビットGU[4:0]にエンコードされている。   FIG. 5 is a diagram showing the single precision and double precision formats of the DPD format. In the case of single precision, the subsequent mantissa field T has two sets of declet, b [11: 0]. In the case of double precision, the subsequent mantissa field T has 5 sets of declet, b [11: 0]. Further, the upper bits GU [4: 0] of the combination field are both 5 bits, and the lower bits GL [w−1: 0] are 6 bits for single precision and 8 bits for double precision. The most significant digit LMD of the mantissa part is encoded in the higher order bits GU [4: 0].

[DPDのRAS用冗長データ生成回路]
図6は,DPDのRAS用冗長データ生成回路の全体構成図である。RAS用冗長データ生成回路112は,レジスタ111に格納されているDPD形式の浮動小数点数から,RAS用冗長データp[2:0]を生成する。この3ビットのRAS用冗長データp[2:0]は,xorビットp[2]と,mod3ビットp[1:0]とを有する。以下,図6では,倍精度の場合を例に示すが,単精度の場合も同様である。
[Redundant data generation circuit for DPD RAS]
FIG. 6 is an overall configuration diagram of a DPD RAS redundant data generation circuit. The RAS redundant data generation circuit 112 generates RAS redundant data p [2: 0] from the DPD-format floating point number stored in the register 111. The 3-bit redundant data p [2: 0] for RAS has an xor bit p [2] and a mod3 bit p [1: 0]. Hereinafter, in FIG. 6, the case of double precision is shown as an example, but the same applies to the case of single precision.

前提として,以下のように定義する。
演算記号^はxorを示す。
演算記号x%3はxmod3を示し,xを3で割った余りである。
(1)符号ビットSのRAS用冗長データpsは,ps=Sである。
(2)コンビネーションフィールドGの上位ビットGUのRAS用冗長データpguは,xorビットのpguX(1ビット)とmod3ビットのpguY[1,0](2ビット)を有する。
(3)下位ビットGLのRAS用冗長データpglは,xorビットのpglX(1ビット)だけである。
(4)後続仮数部フィールドTのRAS用冗長データptは,xorビットのptXと,各decletのmod3ビットを合成したptY[1:0]を有する。
As a premise, it is defined as follows.
The operation symbol ^ indicates xor.
The operation symbol x% 3 represents xmod3 and is the remainder of dividing x by 3.
(1) The redundant data ps for RAS of the sign bit S is ps = S.
(2) The RAS redundant data pgu of the upper bits GU of the combination field G has xor bits of pguX (1 bit) and mod3 bits of pguY [1, 0] (2 bits).
(3) The RAS redundant data pgl of the lower bits GL is only xor bits of pglX (1 bit).
(4) The RAS redundant data pt of the subsequent mantissa field T has ptY [1: 0] obtained by combining xor bits of ptX and mod3 bits of each declet.

RAS用冗長データ生成回路112の論理式は次のとおりである。以下の論理式が生成するRAS用冗長データは,上記の(1)−(4)のRAS用冗長データと対応している。
(1)ps(1bit)
ps = S
(2)pgu : pguX(1bit), pguY[1,0](図8)
(2−1)GU[4:1] = 11112 のとき,pguX = GU[4] ^ GU[3] ^ GU[2] ^ GU[1] ^ GU[0]
pguY[1,0] = 0
(2−2)GU[4:1] = 11102 or 110x2 のとき,pguX = GU[4] ^ GU[3] ^ GU[2] ^ GU[1]
pguY[1,0] = (2 + GU[0]) %3
(2−3)GU[4:1] = 10xx2 or 0xxx2 のとき,pguX = GU[4] ^ GU[3] ^ GU[2] ^ GU[1]
pguY[1,0] = (2*GU[1] + GU[2] + GU[0]) %3
(3)pgl:pglX(1bit)
pglX = GL[w-1] ^ GL[w-2] ^ ... ^ GL[1] ^ GL[0] (図7)
(4)pt : ptX(1bit), ptY[1,0] 〜 ptY[13:0] (図9,図10)
Tフィールドは,単精度ならば2個の,倍精度ならば5個のdecletから成る。ptはdeclet単位で計算されたRAS用冗長データを,さらに加工することで完成する。そして,declet1個のRAS用冗長データ(=pd(pdX, pdY)とする)の生成方法は以下のとおりである。
e-1) pd : pdX(1bit), pdY[1,0] (図10)
decletの10bitをb[9:0]とする。
(4−1)pdX = b[6] ^ b[5] ^ b[3] ^ b[2] ^ b[1]
(4−2)b[6,5,3:1] = xx0xx2, xx1012,, 101112 のとき(図3の1,3,7行)
pdY[1,0] = { 2*(b[8] + b[5] + b[1]) + b[9] + b[7] + b[6] + b[4] + b[2] + b[0] } %3
(4−3)b[6,5,3:1] = xx1002, 011112 のとき(図3の2,6行)
pdY[1,0] = { 2*(b[8] + b[5] + b[1]) + b[9] + b[7] + b[6] + b[4] + b[2] + b[0] + 2 } %3
(4−4)b[6,5,3:1] = xx1102, 001112 のとき(図3の4,5行)
pdY[1,0] = { 2*(b[8] + b[5] + b[1]) + b[9] + b[7] + b[6] + b[4] + b[2] + b[0] + 1 } %3
(4−5)b[6,5,3:1] = 111112 のとき(図3の8行)
pdY[1,0] = { 2*( b[5] + b[1]) + b[7] + b[6] + b[4] + b[2] + b[0] } %3
上記において,b[6,5,3:1] = 111112 のときb[9,8] はドントケアなデータになる。よって上記方法ではb[6,5,3:1] = 111112 のときにb[9,8]のデータ化けが発生してもエラーを検出しないようにpdY[1:0]の演算式にb[9,8]を含めていない。もしこれもエラーとして検出したい場合は,b[6,5,3:1] = 111112 のときだけ pdX = b[9] ^ b[8] ^ b[6] ^ b[5] ^ b[3] ^ b[2] ^ b[1] とpdXの計算方法を変更する。
The logical expression of the RAS redundant data generation circuit 112 is as follows. The RAS redundant data generated by the following logical expressions corresponds to the RAS redundant data (1) to (4) described above.
(1) ps (1 bit)
ps = S
(2) pgu: pguX (1bit), pguY [1,0] (Fig. 8)
(2-1) When GU [4: 1] = 1111 2 , pguX = GU [4] ^ GU [3] ^ GU [2] ^ GU [1] ^ GU [0]
pguY [1,0] = 0
(2-2) When GU [4: 1] = 1110 2 or 110x 2 , pguX = GU [4] ^ GU [3] ^ GU [2] ^ GU [1]
pguY [1,0] = (2 + GU [0])% 3
(2-3) When GU [4: 1] = 10xx 2 or 0xxx 2 , pguX = GU [4] ^ GU [3] ^ GU [2] ^ GU [1]
pguY [1,0] = (2 * GU [1] + GU [2] + GU [0])% 3
(3) pgl: pglX (1bit)
pglX = GL [w-1] ^ GL [w-2] ^ ... ^ GL [1] ^ GL [0] (Figure 7)
(4) pt: ptX (1 bit), ptY [1,0] to ptY [13: 0] (FIGS. 9 and 10)
The T field consists of two declets for single precision and five declets for double precision. pt is completed by further processing the redundant data for RAS calculated in declet units. A method of generating one declet redundant data for RAS (= pd (pdX, pdY)) is as follows.
e-1) pd: pdX (1bit), pdY [1,0] (Fig. 10)
The 10 bits of the declet are b [9: 0].
(4-1) pdX = b [6] ^ b [5] ^ b [3] ^ b [2] ^ b [1]
(4-2) When b [6,5,3: 1] = xx0xx 2 , xx101 2 ,, 10111 2 (lines 1, 3 and 7 in Fig. 3)
pdY [1,0] = {2 * (b [8] + b [5] + b [1]) + b [9] + b [7] + b [6] + b [4] + b [2 ] + b [0]}% 3
(4-3) When b [6,5,3: 1] = xx100 2 , 01111 2 (lines 2 and 6 in Fig. 3)
pdY [1,0] = {2 * (b [8] + b [5] + b [1]) + b [9] + b [7] + b [6] + b [4] + b [2 ] + b [0] + 2}% 3
(4-4) When b [6,5,3: 1] = xx110 2 , 00111 2 (lines 4 and 5 in FIG. 3)
pdY [1,0] = {2 * (b [8] + b [5] + b [1]) + b [9] + b [7] + b [6] + b [4] + b [2 ] + b [0] + 1}% 3
(4-5) When b [6,5,3: 1] = 11111 2 (8 lines in FIG. 3)
pdY [1,0] = {2 * (b [5] + b [1]) + b [7] + b [6] + b [4] + b [2] + b [0]}% 3
In the above, b [6,5,3: 1] = 11111 2 when b [9, 8] becomes do not care data. Therefore, in the above method b [6,5,3: 1] = 11111 b at 2 [9, 8] PDY as garbled data does not detect the error to occur in the 1: 0] of the calculation formula b [9,8] is not included. If you want to detect this as an error too, only when b [6,5,3: 1] = 11111 2 pdX = b [9] ^ b [8] ^ b [6] ^ b [5] ^ b [ 3] ^ b [2] ^ b [1] and pdX calculation method are changed.

上記の演算式(4−1)では,pdXは,b[6], b[5], b[3], b[2], b[1] の xorデータである。このxorデータは,mod3で検出できないエラービットを検出するために必要なxorデータである。   In the above equation (4-1), pdX is the xor data of b [6], b [5], b [3], b [2], b [1]. This xor data is xor data necessary for detecting error bits that cannot be detected by mod3.

また,上記の演算式(4−2)〜(4−5)で求めるpdY[1,0]は,decletを3桁の10進数へ変換したときの値を3で割った余り(=モジュロ3=mod3=%3)になっている。なお,3桁の10進数のmod3は,3桁それぞれの数字のmod3を加算したものと等価である。そして,演算式(4−3)(4−4)内の+2,+1は,DPD形式のデータに埋め込まれたコードに基づいて求められた値である。以下,演算式(4−2)〜(4−5)について簡単に説明する。   Further, pdY [1,0] obtained by the above arithmetic expressions (4-2) to (4-5) is a remainder obtained by dividing the value obtained by converting declet into a 3-digit decimal number by 3 (= modulo 3 = Mod3 =% 3). The 3-digit decimal number mod3 is equivalent to the addition of the 3-digit number mod3. Then, +2, +1 in the arithmetic expressions (4-3) and (4-4) are values obtained based on the code embedded in the data in the DPD format. The arithmetic expressions (4-2) to (4-5) will be briefly described below.

図4の1行目(図3の1行目)のモジュロ3は,次の通りである。
pdY[1,0]={ (4*b[9] + 2*b[8] + b[7]) + (4*b[6] + 2*b[5] + b[4]) + (4*b[2] + 2*b[1] + b[0])} %3
ここで,(4*b) %3 = b %3であるので,上記演算式は次の通り(4−2)と同じになる。
pdY[1,0]={ (b[9] + 2*b[8] + b[7]) + (b[6] + 2*b[5] + b[4]) + (b[2] + 2*b[1] + b[0])} %3
={ 2*(b[8] + b[5] + b[1]) + b[9] + b[7] + b[6] + b[4] + b[2] + b[0] } %3
図4の2行目(図3の2行目)は1の位が8または9であるので,モジュロ3は,
pdY[1,0]={(4*b[9] + 2*b[8] + b[7]) + (4*b[6] + 2*b[5] + b[4]) + (8 + b[0])} %3
ここで,(4*b) %3 = b %3, 8 %3 = 2 %であるので,上記の演算式は次のとおりになる。
pdY[1,0]={ (b[9] + 2*b[8] + b[7]) + (b[6] + 2*b[5] + b[4]) + (2 + b[0]) } %3
= { 2*(b[8] + b[5]) + b[9] + b[7] + b[6] + b[4] + b[0] + 2 } %3
そして,b[6,5,3,2,1] = xx100であるので,演算式(4−3)にb[2]=0, b[1]=0を代入すると上記の式と一致する。
The modulo 3 in the first line in FIG. 4 (the first line in FIG. 3) is as follows.
pdY [1,0] = {(4 * b [9] + 2 * b [8] + b [7]) + (4 * b [6] + 2 * b [5] + b [4]) + (4 * b [2] + 2 * b [1] + b [0])}% 3
Here, since (4 * b)% 3 = b% 3, the above arithmetic expression is the same as (4-2) as follows.
pdY [1,0] = {(b [9] + 2 * b [8] + b [7]) + (b [6] + 2 * b [5] + b [4]) + (b [2 ] + 2 * b [1] + b [0])}% 3
= {2 * (b [8] + b [5] + b [1]) + b [9] + b [7] + b [6] + b [4] + b [2] + b [0] }% 3
In the second line of FIG. 4 (second line of FIG. 3), the 1's place is 8 or 9, so modulo 3 is
pdY [1,0] = {(4 * b [9] + 2 * b [8] + b [7]) + (4 * b [6] + 2 * b [5] + b [4]) + (8 + b [0])}% 3
Here, (4 * b)% 3 = b% 3, 8% 3 = 2%, so the above equation is as follows.
pdY [1,0] = {(b [9] + 2 * b [8] + b [7]) + (b [6] + 2 * b [5] + b [4]) + (2 + b [0])}% 3
= {2 * (b [8] + b [5]) + b [9] + b [7] + b [6] + b [4] + b [0] + 2}% 3
Since b [6,5,3,2,1] = xx100, substituting b [2] = 0 and b [1] = 0 into the equation (4-3) agrees with the above equation .

図4の3行目(図3の3行目)は10の位が8または9であり,1の位がb[6]b[5]b[0]で表されるので,モジュロ3は以下のように変形できる。
pdY[1,0] = { (4*b[9] + 2*b[8] + b[7]) + (8 + b[4]) + (4*b[6] + 2*b[5] + b[0])} %3
={ (b[9] + 2*b[8] + b[7]) + (2 + b[4]) + (b[6] + 2*b[5] + b[0])} %3
={ 2*(b[8] + b[5]) + b[9] + b[7] + b[6] + b[4] + b[0] + 2} %3
そして,b[6,5,3,2,1] = xx101であるので,演算式(4−2)にb[2]=0, 2*b[1]=2を代入すると上記の式と一致する。
In the third row of FIG. 4 (third row of FIG. 3), the tenth place is 8 or 9, and the first place is represented by b [6] b [5] b [0]. It can be modified as follows.
pdY [1,0] = ((4 * b [9] + 2 * b [8] + b [7]) + (8 + b [4]) + (4 * b [6] + 2 * b [ 5] + b [0])}% 3
= {(b [9] + 2 * b [8] + b [7]) + (2 + b [4]) + (b [6] + 2 * b [5] + b [0])}% Three
= {2 * (b [8] + b [5]) + b [9] + b [7] + b [6] + b [4] + b [0] + 2}% 3
Since b [6,5,3,2,1] = xx101, substituting b [2] = 0, 2 * b [1] = 2 into the equation (4-2) Match.

図4の4行目(図3の7行目)は10,1の位が8または9であるのでモジュロ3は以下のように変形できる。
pdY[1,0] = { (4*b[9] + 2*b[8] + b[7]) + (8 + b[4]) + (8 + b[0])} %3
= { (b[9] + 2*b[8] + b[7]) + (2 + b[4]) + (2 + b[0])} %3
= { 2*b[8] + b[9] + b[7] + b[4] + b[0] + 4 } %3
そして,b[6,5,3,2,1] = 10111であるので,(4−2)にb[6]=1, 2*b[5]=0, b[2]=1, 2*b[1]=2を代入すると上記の式と一致する。
In the fourth line of FIG. 4 (the seventh line of FIG. 3), the place of 10,1 is 8 or 9, so the modulo 3 can be modified as follows.
pdY [1,0] = {(4 * b [9] + 2 * b [8] + b [7]) + (8 + b [4]) + (8 + b [0])}% 3
= {(b [9] + 2 * b [8] + b [7]) + (2 + b [4]) + (2 + b [0])}% 3
= {2 * b [8] + b [9] + b [7] + b [4] + b [0] + 4}% 3
Since b [6,5,3,2,1] = 10111, b [6] = 1, 2 * b [5] = 0, b [2] = 1, 2 in (4-2) Substituting * b [1] = 2 matches the above formula.

図4の5行目(図3の4行目)は100の位が8または9であるのでモジュロ3は以下のように変形できる。
pdY[1,0] ={ (8 + b[7]) + (4*b[6] + 2*b[5] + b[4]) + (4*b[9] + 2*b[8] + b[0])} %3
= { (2 + b[7]) + (b[6] + 2*b[5] + b[4]) + (b[9] + 2*b[8] + b[0])} %3
= { 2*(b[8] + b[5]) + b[9] + b[7] + b[6] + b[4] + b[0] + 1} %3
そして,b[6,5,3,2,1] = xx110であるので,(4−4)にb[2]=1, 2*b[1]=0を代入すると上記の式と一致する。
In the fifth line of FIG. 4 (the fourth line of FIG. 3), the modulo 3 can be modified as follows because the hundreds place is 8 or 9.
pdY [1,0] = {(8 + b [7]) + (4 * b [6] + 2 * b [5] + b [4]) + (4 * b [9] + 2 * b [ 8] + b [0])}% 3
= {(2 + b [7]) + (b [6] + 2 * b [5] + b [4]) + (b [9] + 2 * b [8] + b [0])}% Three
= {2 * (b [8] + b [5]) + b [9] + b [7] + b [6] + b [4] + b [0] + 1}% 3
And since b [6,5,3,2,1] = xx110, substituting b [2] = 1, 2 * b [1] = 0 into (4-4) agrees with the above equation .

図4の6行目(図3の6行目)は100,1の位が8または9であるのでモジュロ3は以下のように変形できる。
pdY[1,0] ={ (8 + b[7]) + (4*b[9] + 2*b[8] + b[4]) + (8 + b[0])} %3
= { (2 + b[7]) + (b[9] + 2*b[8] + b[4]) + (2 + b[0])} %3
= { 2*b[8] + b[9] + b[7] + b[4] + b[0] + 4} %3
そして,b[6,5,3,2,1] = 01111であるので,(4−3)にb[6]=0, 2*b[5]=2, b[2]=1, 2*b[1]=2を代入すると上記の式と一致する。なお,7%3 = 4%3 = 1である。
Since the sixth line of FIG. 4 (the sixth line of FIG. 3) is 100 or 1 is 8 or 9, the modulo 3 can be modified as follows.
pdY [1,0] = {(8 + b [7]) + (4 * b [9] + 2 * b [8] + b [4]) + (8 + b [0])}% 3
= {(2 + b [7]) + (b [9] + 2 * b [8] + b [4]) + (2 + b [0])}% 3
= {2 * b [8] + b [9] + b [7] + b [4] + b [0] + 4}% 3
Since b [6,5,3,2,1] = 01111, b [6] = 0, 2 * b [5] = 2, b [2] = 1, 2 in (4-3) Substituting * b [1] = 2 matches the above formula. Note that 7% 3 = 4% 3 = 1.

図4の7行目(図3の5行目)は100,10の位が8または9であるのでモジュロ3は以下のように変形できる。
pdY[1,0] ={ (8 + b[7]) + (8 + b[4]) + (4*b[9] + 2*b[8] + b[0])} %3
= { (2 + b[7]) + (2 + b[4]) + (b[9] + 2*b[8] + b[0])} %3
= { 2*b[8] + b[9] + b[7] + b[4] + b[0] + 4} %3
そして,b[6,5,3,2,1] = 00111であるので,(4−4)にb[6]=0, 2*b[5]=0, b[2]=1, 2*b[1]=2を代入すると上記の式と一致する。
Since the 7th line in FIG. 4 (the 5th line in FIG. 3) has the positions of 100 and 10 being 8 or 9, the modulo 3 can be modified as follows.
pdY [1,0] = {(8 + b [7]) + (8 + b [4]) + (4 * b [9] + 2 * b [8] + b [0])}% 3
= {(2 + b [7]) + (2 + b [4]) + (b [9] + 2 * b [8] + b [0])}% 3
= {2 * b [8] + b [9] + b [7] + b [4] + b [0] + 4}% 3
Since b [6,5,3,2,1] = 00111, b [6] = 0, 2 * b [5] = 0, b [2] = 1, 2 in (4-4) Substituting * b [1] = 2 matches the above formula.

最後に,図4の8行目(図3の8行目)は100,10,1の位が8または9であるのでモジュロ3は以下のように変形できる。
pdY[1,0] ={ (8 + b[7]) + (8 + b[4]) + (8 + b[0])} %3
= { (2 + b[7]) + (2 + b[4]) + (2 + b[0])} %3
= { b[7] + b[4] + b[0] + 6} %3
そして,b[6,5,3,2,1] = 11111であるので,(4−5)にb[6]=1, 2*b[5]=2, b[2]=1, 2*b[1]=2を代入すると上記の式と一致する。
Finally, since the 8th line in FIG. 4 (the 8th line in FIG. 3) has the positions of 100, 10, 1 being 8 or 9, the modulo 3 can be modified as follows.
pdY [1,0] = {(8 + b [7]) + (8 + b [4]) + (8 + b [0])}% 3
= {(2 + b [7]) + (2 + b [4]) + (2 + b [0])}% 3
= {b [7] + b [4] + b [0] + 6}% 3
Since b [6,5,3,2,1] = 11111, b [6] = 1, 2 * b [5] = 2, b [2] = 1, 2 in (4-5) Substituting * b [1] = 2 matches the above formula.

次に,上記の演算式に基づいて,RAS用冗長データ生成回路112について説明する。まず,RAS用冗長データ生成回路112は,pgu及びpgl生成回路601,pt生成回路602,モジュロ演算回路603及びXOR演算回路604を有する。   Next, the RAS redundant data generation circuit 112 will be described based on the above arithmetic expression. First, the RAS redundant data generation circuit 112 includes a pgu and pgl generation circuit 601, a pt generation circuit 602, a modulo operation circuit 603, and an XOR operation circuit 604.

pgu及びpgl生成回路601は,コンビネーションフィールドGの上位ビットGUに対してモジュロ演算を行い,mod3ビットのpguY[1:0]を出力し,上位ビットGUと下位ビットGLに対してXOR演算を行い,1ビットのxorデータpgXを出力する。   The pgu and pgl generation circuit 601 performs a modulo operation on the upper bits GU of the combination field G, outputs mod3 bits of pguY [1: 0], and performs an XOR operation on the upper bits GU and the lower bits GL. , 1-bit xor data pgX is output.

pt生成回路602は,後続仮数部フィールドTの5組のdecletのデータD0「9:0」〜D4[9:0]に対してXOR演算及びモジュロ演算を行い,1ビットのxorデータptX及び2ビットのmod3データptY[1:0]を出力する。   The pt generation circuit 602 performs an XOR operation and a modulo operation on five sets of declet data D0 “9: 0” to D4 [9: 0] of the subsequent mantissa field T, thereby obtaining 1-bit xor data ptX and 2 Bit mod3 data ptY [1: 0] is output.

モジュロ演算回路603は,pgu及びpgl生成回路601が生成する上位ビットGUのmod3データであるpguY[1:0]と,pt生成回路602が生成する後続仮数部フィールドTのmod3データであるptY[1:0]とをモジュロ演算して,2ビットのmod3データp[1:0]を出力する。   The modulo arithmetic circuit 603 generates pguY [1: 0], which is mod3 data of the upper bit GU generated by the pgu and pgl generation circuit 601, and ptY [, which is mod3 data of the subsequent mantissa field T generated by the pt generation circuit 602. 1: 0] is modulo-calculated to output 2-bit mod3 data p [1: 0].

一方,XOR演算回路604は,符号フィールドSのRAS用冗長データpsと,pgu及びpgl生成回路601が生成するxorデータpgXと,pt生成回路602が生成するxorデータptXのXOR演算を行って,xorデータであるp[2]を出力する。   On the other hand, the XOR operation circuit 604 performs an XOR operation of the RAS redundant data ps of the code field S, the xor data pgX generated by the pgu and pgl generation circuit 601 and the xor data ptX generated by the pt generation circuit 602. Outputs p [2] which is xor data.

なお,2ビットデータであるmod3データのpguY[1:0]の四則演算上の扱いは,pguY[1:0]=2×pguY[1]+pguY[0]である。以下,同様である。上記のとおり,RAS用冗長データ生成回路112は,1ビットのxorデータp[2]及び2ビットのmod3データp[1:0]を合成して,3ビットデータp[2:0]をエラー検出コードとして出力する。   Note that pguY [1: 0] is treated as pguY [1: 0] = 2 × pguY [1] + pguY [0] in mod3 data, which is 2-bit data. The same applies hereinafter. As described above, the RAS redundant data generation circuit 112 synthesizes the 1-bit xor data p [2] and the 2-bit mod3 data p [1: 0] to generate the 3-bit data p [2: 0] as an error. Output as detection code.

図7は,pgu及びpgl生成回路601の構成を示す図である。図8は,pgu及びpgl生成回路601内のpgu生成回路801の構成を示す図である。pgu及びpgl生成回路601の論理式は,前述の(2)(2−1)−(2−3),(3)のとおりである。   FIG. 7 is a diagram showing the configuration of the pgu and pgl generation circuit 601. As shown in FIG. FIG. 8 is a diagram showing a configuration of the pgu generation circuit 801 in the pgu and pgl generation circuit 601. The logical expressions of the pgu and pgl generation circuit 601 are as described in (2) (2-1)-(2-3) and (3) above.

pgu及びpgl生成回路601は,pgu生成回路801,XOR演算回路802及び803を有する。pgu生成回路801は,上位ビットGU[4:0]に対してモジュロ演算を行い,2ビットデータpguY[1:0]及び1ビットデータpguXを出力する。XOR演算回路802は,論理式(3)のとおり,wビットの下位ビットGL[w−1:0]の各ビットのXOR演算を行い,1ビットのxorデータpglXを出力する。XOR回路803は,上位ビットGUのxorデータpguX及び下位ビットGLのxorビットpglXのXOR演算を行い,1ビットのxorデータpgxを出力する。そして,pgu及びpgl生成回路601は,上位ビットGUの2ビットのmod3データpguY[1:0]及び上位ビットGUと下位ビットGLの1ビットデータpgXを出力する。   The pgu and pgl generation circuit 601 includes a pgu generation circuit 801 and XOR operation circuits 802 and 803. The pgu generation circuit 801 performs a modulo operation on the upper bits GU [4: 0] and outputs 2-bit data pguY [1: 0] and 1-bit data pguX. The XOR operation circuit 802 performs an XOR operation on each bit of the lower bits GL [w−1: 0] of w bits as shown in the logical expression (3), and outputs 1-bit xor data pglX. The XOR circuit 803 performs an XOR operation on the xor data pguX of the upper bit GU and the xor bit pgX of the lower bit GL, and outputs 1-bit xor data pgx. The pgu and pgl generation circuit 601 outputs 2-bit mod3 data pguY [1: 0] of the upper bit GU and 1-bit data pgX of the upper bit GU and the lower bit GL.

図8は,図7のpgu生成回路801の構成を示す図である。前述の論理式(2−1)−(2−3)に対応付けて説明する。   FIG. 8 is a diagram showing a configuration of the pgu generation circuit 801 in FIG. The description will be made in association with the above logical expressions (2-1)-(2-3).

(2−1)コンビネーションフィールドGの上位ビットGU[4:0]は,図2に示したとおり,GU[4:0]=11111または11110の場合は,非数(NaN,∞)を示すので,論理回路908がGU[4:1]=1111の場合に「1」を出力し,AND回路909を介してGU[0]をEOR回路910に入力し,EOR回路910がGU[4:0]の5ビットのxorデータpguXを出力する。また,mod3データpguY[1:0]は0になる。 (2-1) Combination field G upper bits GU in the 4: 0], as shown in FIG. 2, GU [4: 0 '= 11111 If 2 or 11110 2-a-number (NaN, ∞) Therefore, when the logic circuit 908 is GU [4: 1] = 1111, “1” is output, GU [0] is input to the EOR circuit 910 via the AND circuit 909, and the EOR circuit 910 is GU [4 : 0], 5-bit xor data pguX is output. Also, the mod3 data pguY [1: 0] is 0.

(2−2)コンビネーションフィールドGの上位ビットGU[4:0]は,図2に示したとおり,GU[4:0]=1110xまたは110xxの場合は,仮数部最上位桁LMDが8+GU[0]になるので,論理回路901がGU[4:0]=1110xまたは110xxの場合に「1」を出力し,AND/OR回路であるセレクタ回路905が,論理回路903が出力する仮数部最上位桁のmod3データをmod3データpguY[1:0]として出力する。論理回路903の演算式(2+GU[0])%3は,図2の(8+GU[0])%3と等価である。そして,倫理回路908は「0」を出力するので,EOR回路910がGU[4:1]の4ビットのxorデータpguXを出力する。 (2-2) Combination field G upper bits GU [4: 0], as shown in FIG. 2, GU [4: 0] = case of 1110X 2 or 110Xx 2, mantissa most significant digit LMD is 8 + GU since [0], the logic circuit 901 GU: outputs "1" when the [4 0] = 1110x 2 or 110Xx 2, the selector circuit 905 is a aND / oR circuit, the logic circuit 903 outputs The mod3 data of the mantissa most significant digit is output as mod3 data pguY [1: 0]. The arithmetic expression (2 + GU [0])% 3 of the logic circuit 903 is equivalent to (8 + GU [0])% 3 in FIG. Since the ethics circuit 908 outputs “0”, the EOR circuit 910 outputs the 4-bit xor data pguX of GU [4: 1].

(2−3)同様に,コンビネーションフィールドGの上位ビットGU[4:0]は,図2に示したとおり,GU[4:0]=10xxxまたは0xxxxの場合は,仮数部最上位桁LMDが4×GU[2]+2×GU[1]+GU[0]になるので,論理回路902がGU[4:0]=10xxxまたは0xxxxの場合に「1」を出力し,AND/OR回路であるセレクタ回路905が,論理回路904が出力する仮数部最上位桁のmod3データをmod3データpguY[1:0]として出力する。そして,倫理回路908は「0」を出力するので,EOR回路910がGU[4:1]の4ビットのxorデータpguXを出力する。 (2-3) Similarly, the upper bit GU combination field G [4: 0], as shown in FIG. 2, GU [4: 0] = For the 10xxx 2 or 0xXXX 2, mantissa most significant digit since LMD becomes 4 × GU [2] + 2 × GU [1] + GU [0], the logic circuit 902 GU [4: 0] = 10xxx outputs "1" when 2 or 0xXXX 2, the aND / A selector circuit 905 that is an OR circuit outputs the mod3 data of the most significant mantissa part output from the logic circuit 904 as mod3 data pguY [1: 0]. Since the ethics circuit 908 outputs “0”, the EOR circuit 910 outputs the 4-bit xor data pguX of GU [4: 1].

図9は,pt生成回路602の構成図である。図10は,pt生成回路602内の各decletのデータD0[9:0]−D4[9:0]のmod3データptY[1:0]とxorデータptXを有するRAS用冗長データを生成するpd#生成回路の構成図である。   FIG. 9 is a configuration diagram of the pt generation circuit 602. FIG. 10 shows a pd for generating redundant data for RAS having mod3 data ptY [1: 0] of data D0 [9: 0] -D4 [9: 0] of each declet in the pt generation circuit 602 and xor data ptX. # Is a block diagram of a generation circuit.

後続仮数部フィールドTは,倍精度の場合,5個の10ビットデータD0[9:0],D1[9:0],D2[9:0],D3[9:0],D4[9:0]を有する。図9において,pd0生成回路1001は,10ビットデータD0[9:0]に対してモジュロ演算とXOR演算を行い,1ビットのxorデータpd0X及び2ビットのmod3データpd0Y[1:0]を出力する。pd1生成回路1002−1005も同様である。モジュロ演算回路1006は,各pd#生成回路1001−1005が出力するmod3データpd0Y[1:0]−pd4Y[1:0]のモジュロ演算を行い,合成された2ビットのmod3データptY[1:0]を出力する。XOR回路1007は,各pd#生成回路1001−1005が出力するxorデータpd0X−pd4XのXOR演算を行い,合成された1ビットのxorデータptXを出力する。すなわち,
ptX=pd4X^pd3X^pd2X^pd1X^pd0Xである。
In the case of double precision, the subsequent mantissa field T has five 10-bit data D0 [9: 0], D1 [9: 0], D2 [9: 0], D3 [9: 0], D4 [9: 0]. In FIG. 9, a pd0 generation circuit 1001 performs modulo operation and XOR operation on 10-bit data D0 [9: 0], and outputs 1-bit xor data pd0X and 2-bit mod3 data pd0Y [1: 0]. To do. The same applies to the pd1 generation circuits 1002-1005. The modulo arithmetic circuit 1006 performs modulo arithmetic on the mod3 data pd0Y [1: 0] -pd4Y [1: 0] output from the pd # generation circuits 1001-1005, and combines the combined 2-bit mod3 data ptY [1: 0] is output. The XOR circuit 1007 performs an XOR operation on the xor data pd0X-pd4X output from each pd # generation circuit 1001-1005, and outputs the combined 1-bit xor data ptX. That is,
ptX = pd4X ^ pd3X ^ pd2X ^ pd1X ^ pd0X.

図10のpd#生成回路はpd0−pd5生成回路1001−1005を示す。図10中には,前述の(4−1)(4−2)(4−3)(4−4)(4−5)の対応が示されている。   The pd # generation circuit in FIG. 10 indicates pd0-pd5 generation circuits 1001-1005. FIG. 10 shows the correspondence of the above-mentioned (4-1) (4-2) (4-3) (4-4) (4-5).

まず,論理式(4−1)に基づき,XOR回路1111は,次式のように,D0[6]^D0[5]^D0[3]^D0[2]^D0[1]のXOR演算を行い,次の1ビットのxorデータpd0Xを出力する。
pd0X=D0[6]^D0[5]^D0[3]^D0[2]^D0[1]
次に,pd#生成回路は,図3と図4に基づき,演算式(4−2)(4−3)(4−4)(4−5)にしたがってmod3データpd#Y[2:0]を生成する。演算式に沿って説明する。
First, based on the logical expression (4-1), the XOR circuit 1111 performs the XOR operation of D0 [6] ^ D0 [5] ^ D0 [3] ^ D0 [2] ^ D0 [1] as shown in the following expression. And the next 1-bit xor data pd0X is output.
pd0X = D0 [6] ^ D0 [5] ^ D0 [3] ^ D0 [2] ^ D0 [1]
Next, the pd # generation circuit, based on FIGS. 3 and 4, mod3 data pd # Y [2: 0] according to the arithmetic expressions (4-2) (4-3) (4-4) (4-5). ] Is generated. A description will be given along the arithmetic expression.

(4−2)モジュロ演算回路1105が{2×(D0[8]+D0[5]+D0[1])+D0[9]+D0[7]+D0[6]+D0[4]+D0[2]+D0[0]}%3のモジュロ演算を行い,mod3データA2を出力する。図3の1,3,7行(図4の右端に示す行)に対応するmod3演算であり,b[6,5,3:1] = xx0xx2, xx1012,, 101112のときに(すなわち,論理回路1101,1102,1103がいずれも真でない場合),AND/OR回路によるセレクタ1106が「0」を出力するので,モジュロ演算回路1105のmod3データA2がmod3データpd#Y[2:0]として出力される。 (4-2) The modulo arithmetic circuit 1105 is {2 × (D0 [8] + D0 [5] + D0 [1]) + D0 [9] + D0 [7] + D0 [6] + D0 [4] + D0 [2] + D0 [0. ]} Modulo operation of% 3 is performed and mod3 data A2 is output. This is a mod3 operation corresponding to the first, third, and seventh rows in FIG. 3 (the row shown at the right end in FIG. 4), and when b [6,5,3: 1] = xx0xx 2 , xx101 2 ,, 10111 2 ( That is, when none of the logic circuits 1101, 1102, and 1103 is true), the selector 1106 by the AND / OR circuit outputs “0”, so that the mod3 data A2 of the modulo arithmetic circuit 1105 is mod3 data pd # Y [2: 0].

なお,モジュロ演算回路1105の出力A2は,演算式(4−3)(4−4)の条件を満たす場合にmod3データA2に,セレクタ1106が出力する「1」「2」がそれぞれ加算され,mod3データpd#Yが出力される。   The output A2 of the modulo arithmetic circuit 1105 adds “1” and “2” output from the selector 1106 to the mod3 data A2 when the conditions of the arithmetic expressions (4-3) and (4-4) are satisfied. mod3 data pd # Y is output.

(4−4)図3の4,5行に対応するmod3演算であり,論理回路1101は,b[6,5,3:1] = xx1102, 001112 のとき,言い換えると3ビットデータD0[3:1]が110又は5ビットデータD0[6,5,3:1]が00111であるときには「1」を出力し,セレクタ1106がmod3データ「1」を選択して出力する。そして,モジュロ演算回路1110が,そのmod3データ「1」をモジュロ演算回路1105の出力A2に加算してmod3データpd#Y[2:0]が出力される。その結果,演算式(4−4)に示したmod3データpdY[1,0]が生成される。 (4-4) mod3 operation corresponding to the 4th and 5th rows in FIG. 3, and the logic circuit 1101 is b [6,5,3: 1] = xx110 2 , 00111 2 , in other words, 3-bit data D0 [3: 1] 110 2 or 5-bit data D0 [6,5,3: 1] outputs "1" when a 00111 2, the selector 1106 selects and outputs the mod3 data "1". The modulo arithmetic circuit 1110 adds the mod3 data “1” to the output A2 of the modulo arithmetic circuit 1105, and mod3 data pd # Y [2: 0] is output. As a result, mod3 data pdY [1, 0] shown in the arithmetic expression (4-4) is generated.

(4−3)図3の2,6行に対応するmod3演算であり,論理回路1102は,b[6,5,3:1] = xx1002, 011112 のとき,言い換えると3ビットデータD0[3:1]が100又は5ビットデータD0[6,5,3:1]が01111であるときには「1」を出力し,セレクタ1106がmod3データ「2」を選択して出力する。そして,モジュロ演算回路1110が,そのmod3データ「2」をモジュロ演算回路1105の出力A2に加算してmod3データpd#Y[2:0]が出力される。その結果,演算式(4−3)に示したmod3データpdY[1,0]が生成される。 (4-3) mod3 operation corresponding to the 2nd and 6th rows in FIG. 3, and the logic circuit 1102 is b [6,5,3: 1] = xx100 2 , 01111 2 , in other words, 3-bit data D0 [3: 1] 100 2 or 5-bit data D0 [6,5,3: 1] outputs "1" when a 01111 2, the selector 1106 selects and outputs the mod3 data "2". Then, the modulo arithmetic circuit 1110 adds the mod3 data “2” to the output A2 of the modulo arithmetic circuit 1105, and mod3 data pd # Y [2: 0] is output. As a result, mod3 data pdY [1, 0] shown in the arithmetic expression (4-3) is generated.

(4−5)図3の8行に対応するmod3演算であり,論理回路1103は,b[6,5,3:1] = 111112のとき,言い換えると5ビットデータD0[6,5,3:1]が11111であるときには「1」を出力し,セレクタ1106がモジュロ演算回路1104のmod3データ,2×D0[9]+D0[8])%3を出力する。そして,モジュロ演算回路1110が,セレクタ1106が選択したmod3データA1とモジュロ演算回路1105が生成したmod3データA2とを加算してmod3データpd#Y[1:0]を出力する。その結果,演算式(4−5)に示したmod3データpdY[1,0]が生成される。 (4-5) is the corresponding mod3 operation on eight rows of FIG. 3, the logic circuit 1103, b [6,5,3: 1] = 11111 when 2, in other words 5-bit data D0 [6,5, 3: 1] outputs "1" when a 11111 2, selector 1106 outputs the mod3 data, 2 × D0 [9] + D0 [8])% 3 modulo circuit 1104. The modulo arithmetic circuit 1110 adds the mod3 data A1 selected by the selector 1106 and the mod3 data A2 generated by the modulo arithmetic circuit 1105, and outputs mod3 data pd # Y [1: 0]. As a result, mod3 data pdY [1, 0] shown in the arithmetic expression (4-5) is generated.

なぜなら,この場合のモジュロ演算回路1110の演算は,(2*b[9]+b[9])%3=0であるので,以下のとおりとなる。
(2*b[9]+b[8])%3+{2*(b[8]+b[5]+b[1])+b[9]+b[7]+b[6]+b[4]+b[2]+b[0])%3=
{2*(b[5]+b[1])+b[7]+b[6]+b[4]+b[2]+b[0]}%3
なお,D0[6,5,3:1]が11111のとき,D0[9:8]はドントケアなデータになる。よって,上記の方法ではD0[6,5,3:1]が11111のときに,D0[9:8]のデータ化けが発生しても,エラーを検出しないようになっている。もし,これもエラーとして検出したい場合は,D0[6,5,3:1]が11111のときだけ,次式により,データpd#Xを演算すればよい。
pd#X=D0[9]^D0[8]^D0[6]^D0[5]^D0[3]^D0[2]^D0[1]
This is because the operation of the modulo arithmetic circuit 1110 in this case is (2 * b [9] + b [9])% 3 = 0, and is as follows.
(2 * b [9] + b [8])% 3+ {2 * (b [8] + b [5] + b [1]) + b [9] + b [7] + b [6] + b [4] + b [2 ] + B [0])% 3 =
{2 * (b [5] + b [1]) + b [7] + b [6] + b [4] + b [2] + b [0]}% 3
Incidentally, D0 [6,5,3: 1] When is 11111 2, D0 [9: 8 ] is a do not care data. Therefore, in the above method D0 [6,5,3: 1] is at the 11111 2, D0: garbled data of [9 8] also generated, so as not to detect an error. If, if this also to be detected as an error, D0: Only [6,5,3 1] When is 11111 2, the following equation may be operational data pd # X.
pd # X = D0 [9] ^ D0 [8] ^ D0 [6] ^ D0 [5] ^ D0 [3] ^ D0 [2] ^ D0 [1]

以上のとおり,pd#Xはb[6], b[5], b[3], b[2], b[1] の xorデータ,pd#Y[1,0]はdecletを3桁の10進数へ変換したときの値を3で割った余り(=モジュロ3=mod3=%3)になっている。   As described above, pd # X has xor data of b [6], b [5], b [3], b [2], b [1], and pd # Y [1,0] has 3 digits of declet. It is a remainder (= modulo 3 = mod3 =% 3) obtained by dividing the value when converted to decimal number by 3.

図5で示したとおり,DPD形式のTフィールドに存在するdecletを,単精度の場合にD1,D0,倍精度の場合にD4−D0とし,それぞれのdecletに対応したRAS用冗長データpdを,単精度の場合はpd1,pd0,倍精度の場合はpd4−pd0とする。   As shown in FIG. 5, the declet existing in the T field of the DPD format is D1, D0 in the case of single precision, D4-D0 in the case of double precision, and the redundant data pd for RAS corresponding to each declet, In the case of single precision, pd1, pd0, and in the case of double precision, pd4-pd0.

そして,倍精度で説明すると,各decletのDiのRAS用冗長データpdi(i=4−0)は以下のようにデータ圧縮できる。すなわち,図9に示されるとおり,各decletD4−D0のRAS用冗長データpd4−pd0を全て圧縮することで,TフィールドのRAS用冗長データpt(=ptX,ptY[1:0])は,次の通りになる。
ptX = pd4X ^ pd3X ^ pd2X ^ pd1X ^ pd0X
ptY[1,0] = (pd4Y[1,0] + pd3Y[1,0] + pd2Y[1,0] + pd1Y[1,0] + pd0Y[1,0] ) %3
Tフィールドで行った圧縮操作は,同様にDPDの各フィールドのRAS冗長データに対しても行うことができる。具体的には,xorデータのRAS用冗長データ同士( ps, pguX, pglX, ptX ) はそれらを1ビットにまで圧縮できて,mod3データ同士 (pguY[1,0] , ptY[1,0]) はそれらを2ビットにまで圧縮できる。したがって,図6に示されるとおり,DPD全体のRAS冗長データをp[2:0]と書くと,以下の式になる。
p[2] = ps ^ pguX ^ pglX ^ ptX
p[1,0] = ( pguY[1,0] + ptY[1,0] ) %3
mod3データpguY[1:0]は,図2,図8に示されるとおり,仮数部最上位桁LMDのmod3データである。したがって,mod3データp[1:0]は,仮数部が10進の16桁の場合,最上位桁(1桁)のmod3と,decletで表されるそれぞれ10進の3桁のmod3とを加算したmod3データを意味する。
When described in double precision, the RAS redundant data pdi (i = 4-0) of Di in each declet can be compressed as follows. That is, as shown in FIG. 9, the RAS redundant data pt (= ptX, ptY [1: 0]) in the T field is obtained by compressing all the RAS redundant data pd4-pd0 of each declet D4-D0. It becomes as follows.
ptX = pd4X ^ pd3X ^ pd2X ^ pd1X ^ pd0X
ptY [1,0] = (pd4Y [1,0] + pd3Y [1,0] + pd2Y [1,0] + pd1Y [1,0] + pd0Y [1,0])% 3
The compression operation performed in the T field can be similarly performed on the RAS redundant data in each field of the DPD. Specifically, xor data redundant data for RAS (ps, pguX, pglX, ptX) can be compressed to 1 bit, and mod3 data (pguY [1,0], ptY [1,0] ) Can compress them down to 2 bits. Therefore, as shown in FIG. 6, when the RAS redundant data of the entire DPD is written as p [2: 0], the following equation is obtained.
p [2] = ps ^ pguX ^ pglX ^ ptX
p [1,0] = (pguY [1,0] + ptY [1,0])% 3
The mod3 data pguY [1: 0] is mod3 data of the mantissa most significant digit LMD as shown in FIGS. Therefore, mod3 data p [1: 0] is obtained by adding mod3 of the most significant digit (1 digit) and mod3 of decimal 3 each represented by declet when the mantissa is 16 digits of decimal. Means mod3 data.

一方,xorデータp[2]は,図7のGフィールドの下位ビットGL[w−1:0]のxorデータpglXと,図8の上位ビットGU[4:0]のxorデータpguXと,図10のTフィールドのdecletのb[6:1]のxorデータpd#Xを図9で圧縮したxorデータptXとを,図7のXOR回路803と図6のXOR回路604とで圧縮したxorデータである。DPD形式の10進浮動小数点数を示す64ビットのうち,上記のビットのxorデータp[2]により,mod3データp[1:0]では検出できない1ビットエラーを検出することができることを,コンピュータシミュレーションにより確認済みである。   On the other hand, the xor data p [2] includes the xor data pglX of the lower bits GL [w-1: 0] of the G field of FIG. 7, the xor data pguX of the upper bits GU [4: 0] of FIG. The xor data ptX obtained by compressing the xor data pd # X of b [6: 1] of the declet of 10 T fields in FIG. 9 and the xor data compressed by the XOR circuit 803 in FIG. 7 and the XOR circuit 604 in FIG. It is. Of the 64 bits indicating the decimal floating point number in the DPD format, the computer can detect a 1-bit error that cannot be detected by the mod3 data p [1: 0] from the xor data p [2] of the above bits. Confirmed by simulation.

[DPD形式とBCD形式の利用例]
図11は,DPD形式とBCD形式の利用の一例を示す図である。この利用例によれば,ハードディスクHDD1に記憶しているDPD形式の10進浮動小数点数DPD_1とそのRAS用冗長データRAS(DPD_1)とが読み出される(S10)。このRAS用冗長データRAS(DPD_1)には,前述のとおり,mod3データとxorデータとが含まれている。
[Examples of using DPD and BCD formats]
FIG. 11 is a diagram illustrating an example of using the DPD format and the BCD format. According to this usage example, the decimal floating point number DPD_1 in the DPD format and its redundant data RAS (DPD_1) for RAS stored in the hard disk HDD1 are read (S10). The redundant data RAS (DPD_1) for RAS includes mod3 data and xor data as described above.

そして,読み出されたDPD形式のデータDPD_1が,フォーマット変換され,BCD形式のデータBCD_1に変換される(S11)。そして,この変換後のBCD形式のデータBCD_1のRAS用冗長データRAS(BCD_1)として,DPD形式のデータDPD_1のRAS用冗長データRAS(DPD_1)に含まれているmod3データがそのまま採用される。なぜなら,BCD形式でもDPD形式でも含まれている16桁の10進数の値は同じであるので,前述のとおり,最上位桁のmod3と5組の3桁の10進数のmod3とを圧縮したmod3データは,一致するからである。このmod3データを利用することで,例えば,フォーマット変換処理S11で,変換回路の不良動作により1ビットエラーが発生したことを検出することができる。   Then, the read DPD format data DPD_1 is subjected to format conversion and converted to BCD format data BCD_1 (S11). Then, the mod3 data included in the RAS redundant data RAS (DPD_1) of the DPD-format data DPD_1 is directly adopted as the RAS redundant data RAS (BCD_1) of the BCD-format data BCD_1 after the conversion. This is because the 16-digit decimal value included in the BCD format and the DPD format is the same, and as described above, the most significant digit mod3 and 5 sets of 3-digit decimal mod3 are compressed. This is because the data match. By using the mod3 data, for example, it is possible to detect that a 1-bit error has occurred due to a defective operation of the conversion circuit in the format conversion process S11.

次に,例えば2組のBCD形式の10進浮動小数点数BCD_1が,10進数による四則演算され,BCD形式の演算結果BCD_2が生成される(S12)。BCD形式であれば10進数演算が容易である。この演算S12と並行して,2組のRAS用冗長データRAS(BCD_1)のmod3データも同じ演算により,演算後のBCD形式の10進浮動小数点数BCD_2に対するmod3データが求められる(S13)。一般に,A mod3+A mod3=(A+B)mod3であるので,mod3データであれば演算後のBCD形式のデータBCD_2に対するmod3データを簡単に求めることができる。   Next, for example, two sets of BCD format decimal floating point numbers BCD_1 are subjected to four arithmetic operations using decimal numbers, and BCD format operation results BCD_2 are generated (S12). In the BCD format, decimal arithmetic is easy. In parallel with this operation S12, mod3 data of the two sets of RAS redundant data RAS (BCD_1) is obtained by the same operation to obtain mod3 data for the BCD decimal floating point number BCD_2 after the operation (S13). In general, since A mod3 + A mod3 = (A + B) mod3, mod3 data can be easily obtained for the BCD format data BCD_2 after the operation.

そこで,演算結果のBCD形式のデータBCD_2をフォーマット変換して,対応するDPD形式のデータDPD_2が生成される(S14)。これによりデータ量が圧縮される。そして,フォーマット変換されたDPD形式のデータDPD_2について,図6〜図10のDPD形式のデータのRAS用冗長データ生成回路が,エラー検出コードであるRAS用冗長データを生成する(S15)。その結果,DPD形式のデータDPD_2のRAS用冗長データRAS(DPD_2)が,演算結果であるDPD形式のデータDPD_2と共に,ハードディスクHDD2に記憶される(S16)。   Therefore, the BCD-format data BCD_2 as a result of the operation is converted in format to generate the corresponding DPD-format data DPD_2 (S14). Thereby, the data amount is compressed. Then, for the DPD data DPD_2 whose format has been converted, the RAS redundant data generation circuit for the DPD data in FIGS. 6 to 10 generates RAS redundant data as an error detection code (S15). As a result, the redundant data RAS for RAS (DPD_2) of the data DPD_2 in the DPD format is stored in the hard disk HDD 2 together with the data DPD_2 in the DPD format as the operation result (S16).

上記のとおり,演算結果のBCD形式のデータBCD_2は,DPD形式のデータDPD_2にフォーマット変換されるとともに,そのDPD形式のデータDPD_2からRAS用冗長データRAS(DPD_2)を演算で求めると,2つの演算回路を通過することになり,論理回路の段数が過剰になり,演算時間が長くなる。また,工程S14のフォーマット変換回路でエラーが発生した場合,フォーマット変換後のDPD形式のデータDPD_2からRAS用冗長データRAS(DPD_2)を生成すると,フォーマット変換回路で発生したエラーを検出できない。   As described above, the BCD-format data BCD_2 that is the result of the operation is converted to the DPD-format data DPD_2, and when the redundant data RAS (DPD_2) for RAS is calculated from the DPD-format data DPD_2, two operations are performed. The circuit passes through the circuit, the number of logic circuit stages becomes excessive, and the computation time becomes longer. In addition, when an error occurs in the format conversion circuit in step S14, if the RAS redundant data RAS (DPD_2) is generated from the DPD format data DPD_2 after the format conversion, the error generated in the format conversion circuit cannot be detected.

図12は,本実施の形態におけるエラー検出コード生成回路を有するフォーマット変換装置を示す図である。本実施の形態におけるフォーマット変換装置は,演算結果のBCD形式のデータBCD_2をDPD形式のデータDPD_2に変換するフォーマット変換回路10と,BCD形式のデータBCD_2からDPD形式のデータDPD_2のRAS用冗長データRAS(DPD_2)を生成するRAS用冗長データ生成回路12とを有する。   FIG. 12 is a diagram showing a format conversion apparatus having an error detection code generation circuit in the present embodiment. The format conversion apparatus according to the present embodiment includes a format conversion circuit 10 that converts BCD-format data BCD_2 as a calculation result into DPD-format data DPD_2, and redundant data RAS for RAS from BCD-format data BCD_2 to DPD-format data DPD_2. RAS redundant data generation circuit 12 for generating (DPD_2).

RAS用冗長データ生成回路12は,BCD形式データBCD_2のRAS用冗長データRAS(BCD_2)のmod3データをそのままDPD形式データDPD_2のmod3データとして出力する。また,RAS用冗長データ生成回路12は,BCD形式データBCD_2からxorデータを生成し,DPD形式データDPD_2のxorデータとして出力する。このRAS用冗長データ生成回路12は,図6〜図10に示したRAS用冗長データ生成回路が生成するxorデータp[2]と同じxorデータを生成する。RAS用冗長データ生成回路12の演算回路は,BCD形式とDPD形式のフォーマットの違いを考慮して,DPD形式データDPD_2のxorデータp[2]と同じデータを生成するように,その回路が構成される。   The RAS redundant data generation circuit 12 outputs the mod3 data of the RAS redundant data RAS (BCD_2) of the BCD format data BCD_2 as the mod3 data of the DPD format data DPD_2. The redundant data generation circuit 12 for RAS generates xor data from the BCD format data BCD_2 and outputs it as xor data of the DPD format data DPD_2. The RAS redundant data generation circuit 12 generates the same xor data as the xor data p [2] generated by the RAS redundant data generation circuit shown in FIGS. The arithmetic circuit of the RAS redundant data generation circuit 12 is configured to generate the same data as the xor data p [2] of the DPD format data DPD_2 in consideration of the difference between the BCD format and the DPD format. Is done.

図12のような構成にすることで,演算結果であるBCD形式のデータから直接,DPD形式のデータDPD_2のRAS用冗長データRAS(DPD_2)を生成することができるので,演算遅延時間が短くなる。また,フォーマット変換回路10でのエラーをRAS用冗長データRAS(DPD_2)により検出することができる。   With the configuration shown in FIG. 12, the RAS redundant data RAS (DPD_2) of the DPD format data DPD_2 can be generated directly from the BCD format data as the calculation result, so that the calculation delay time is shortened. . Further, an error in the format conversion circuit 10 can be detected by the RAS redundant data RAS (DPD_2).

[本実施の形態におけるエラー検出コード生成回路を有するフォーマット変換装置]
図13は,本実施の形態におけるエラー検出コード生成回路を有するフォーマット変換装置を示す図である。図13は,図12に示したフォーマット変換回路10とRAS生成回路12に加えて,BCD形式のデータBCD_2からmod3をRAS用冗長データとして生成するRAS生成回路14と,比較回路16と,DPD形式のデータDPD_2からxorとmod3をRAS用冗長データとして生成するRAS生成回路18と,比較回路20とエラー処理回路22とを有する。
[Format Conversion Device Having Error Detection Code Generation Circuit in Present Embodiment]
FIG. 13 is a diagram showing a format conversion apparatus having an error detection code generation circuit in the present embodiment. 13 shows, in addition to the format conversion circuit 10 and the RAS generation circuit 12 shown in FIG. 12, a RAS generation circuit 14 that generates mod3 as redundant data for RAS from BCD format data BCD_2, a comparison circuit 16, and a DPD format. RAS generation circuit 18 for generating xor and mod3 as redundant data for RAS from the data DPD_2, comparison circuit 20 and error processing circuit 22.

図12で説明したとおり,BCD形式のデータBCD_2のmod3データは,演算前のBCD形式のデータBCD_1のmod3データを,10進数データの演算と同じ演算をして生成され,RASのレジスタRAS(BCD_2)に格納されている。そこで,RAS生成回路14が演算後のBCD形式のデータBCD_2を入力してmod3データを生成し,比較回路16が,RASのレジスタRAS(BCD_2)に格納されているmod3データと,RAS生成回路14が生成したmod3データとを比較してエラー検出を行う。   As described in FIG. 12, the mod3 data of the BCD format data BCD_2 is generated by performing the same operation as the operation of the decimal data on the mod3 data of the BCD format data BCD_1 before the operation, and the RAS register RAS (BCD_2 ). Therefore, the RAS generation circuit 14 inputs the BCD-format data BCD_2 after calculation to generate mod3 data, and the comparison circuit 16 compares the mod3 data stored in the register RAS (BCD_2) of the RAS and the RAS generation circuit 14 Compares the generated mod3 data with the error detection.

そして,DPD_RAS生成回路12は,BCD形式のデータBCD_2(BCD形式の10進数にDPD形式のための符号ビット及び指数データを追加したデータ)から,xorデータを生成し,レジスタRAS(BCD_2)に格納されているmod3データと共に,レジスタRAS(DPD_2)に格納する。このレジスタRAS(DPD_2)に格納したxorデータとmod3データを有するRAS用冗長データを利用して,フォーマット変換後のDPD形式のデータDPD_2のエラーチェックを行う。すなわち,RAS生成回路18が,DPD形式のデータDPD_2を入力してxorデータとmod3データを有するRAS用冗長データを生成する。そして,比較回路20が,RAS生成回路18が生成したRAS用冗長データと,レジスタRAS(DPD_2)に格納されているRAS用冗長データとを比較しエラー検出を行う。これにより,フォーマット変換回路10で発生したエラーを検出できる。   Then, the DPD_RAS generation circuit 12 generates xor data from the BCD format data BCD_2 (data obtained by adding the sign bit and exponent data for the DPD format to the decimal number in the BCD format) and stores it in the register RAS (BCD_2) It is stored in the register RAS (DPD_2) together with the mod3 data. Using the RAS redundant data having the xor data and mod3 data stored in the register RAS (DPD_2), the DPD data DPD_2 after the format conversion is checked for errors. That is, the RAS generation circuit 18 inputs DPD format data DPD_2 and generates redundant data for RAS having xor data and mod3 data. Then, the comparison circuit 20 compares the RAS redundant data generated by the RAS generation circuit 18 with the RAS redundant data stored in the register RAS (DPD_2) and performs error detection. Thereby, an error generated in the format conversion circuit 10 can be detected.

2つの比較回路16,20は,比較結果であるエラー報告情報をエラー処理回路22に出力する。そして,エラー処理回路22がエラー報告情報に基づいてエラー処理を行う。   The two comparison circuits 16 and 20 output error report information as a comparison result to the error processing circuit 22. Then, the error processing circuit 22 performs error processing based on the error report information.

[本実施の形態におけるエラー検出コード生成回路]
次に,図12,13で示したBCD形式の10進浮動小数点数からDPD形式の10進浮動小数点数のエラー検出コード(RAS用冗長データ)を生成するエラー検出コード生成回路12(RAS用冗長データ生成回路)について説明する。このRAS用冗長データ生成回路12は,BCD形式の10進浮動小数点数のデータBCD_2から,DPD形式の10進浮動小数点数のデータDPD_2のxorデータを生成し,既に生成済みのBCD形式のデータBCD_2のmod3データと共にRAS用冗長データpd[2:0]として出力する。ただし,RAS用冗長データ生成回路12は,BCD形式のデータの仮数の数値からmod3データを生成してもよい。
[Error detection code generation circuit in the present embodiment]
Next, an error detection code generation circuit 12 (RAS redundancy) for generating an error detection code (redundancy data for RAS) of a decimal floating point number in DPD format from the decimal floating point number in BCD format shown in FIGS. Data generation circuit) will be described. The redundant data generation circuit 12 for RAS generates xor data of decimal data DPD_2 in decimal floating point number DPD_2 from decimal data BCD_2 in decimal BCD format, and data BCD_2 in already generated BCD format RAS redundant data pd [2: 0] is output together with the mod3 data. However, the RAS redundant data generation circuit 12 may generate mod3 data from the mantissa value of the data in the BCD format.

以下のRAS用冗長データ生成回路12は,BCDが倍精度の場合を例にして説明する。ただし,BCDが単精度でも同様に適用できる。BCD形式のデータと,そのRAS用冗長データは,次の通りとする。
BCD形式のデータ(仮数):BCD[63:0]
BCD形式のデータのRAS用冗長データ:pb[1,0] =BCD %3 =BCD mod3
したがって,BCD形式のデータの16桁の10進数を示すBCD[63:0]は64ビットであり,BCD形式のデータのRAS用冗長データはmod3データpb[1,0]である。
The following RAS redundant data generation circuit 12 will be described by taking a case where the BCD is double precision as an example. However, the same applies to BCD with single precision. BCD format data and redundant data for RAS are as follows.
BCD format data (mantissa): BCD [63: 0]
Redundant data for RAS of BCD format data: pb [1,0] = BCD% 3 = BCD mod3
Therefore, BCD [63: 0] indicating a 16-digit decimal number of BCD format data is 64 bits, and redundant data for RAS of BCD format data is mod3 data pb [1,0].

図14は,BCD形式のデータのフォーマットを示す図である。BCD形式の場合3桁の10進数は12ビットで表現され,1桁の10進数は4ビットで表現される。図15によれば,BCD形式のデータBCD[63:0]が,5組の3桁の10進数b0[11:0]-b4[11:0]と,1組の1桁の10進数b5[3:0]とからなる。   FIG. 14 is a diagram showing a data format of BCD format. In the case of the BCD format, a 3-digit decimal number is represented by 12 bits, and a 1-digit decimal number is represented by 4 bits. According to FIG. 15, BCD format data BCD [63: 0] includes five sets of three-digit decimal numbers b0 [11: 0] -b4 [11: 0] and one set of one-digit decimal numbers b5. [3: 0].

また,BCDのフォーマットには含まれないが,DPD形式では必要になる情報(符号,指数)は,通常はBCD形式のデータに付随して存在しており,以下の記号で表すこととする。
符号:sb (=1bit)
指数:eb[9:0](倍精度の場合。単精度なら8ビットのeb[7:0]になる)
一方,BCD形式のデータと上記符号と指数とから変換されるDPD形式のデータは64ビットであり,以下のように表す。
DPD[63:0]
DPD形式のデータの仮数部の16桁の10進数は,BCD形式の16桁の10進数と同じである。そして,BCD形式のデータに付加される符号sbと指数eb[9:0](単精度ならeb[7:0])は,DPD形式のデータの符号s,指数GU[2:1]またはGU[4:3]及びGL[w-1:0]と同じである。
In addition, information (sign, index) that is not included in the BCD format but is necessary in the DPD format usually exists along with the data in the BCD format, and is represented by the following symbols.
Code: sb (= 1bit)
Exponent: eb [9: 0] (for double precision, 8-bit eb [7: 0] for single precision)
On the other hand, DPD format data converted from BCD format data and the above sign and exponent is 64 bits and is expressed as follows.
DPD [63: 0]
The 16-digit decimal number of the mantissa part of the data in the DPD format is the same as the 16-digit decimal number in the BCD format. The sign sb and the index eb [9: 0] (eb [7: 0] for single precision) added to the BCD format data are the code s, index GU [2: 1] or GU of the DPD format data. Same as [4: 3] and GL [w-1: 0].

そこで,DPD形式のデータのRAS用冗長データをpd[2:0]で表すことにする。このDPDのRAS用冗長データの下位2ビットpd[2:0]は,仮数の各桁のmod3を圧縮したものであるので,BCD形式のデータのRAS用冗長ビットのmod3データをそのまま流用できる。よって,以下のとおりとなる。
pd[1:0] = pb[1:0]
続いて,DPDのRAS用冗長データの残りのxorビットpd[2]の計算方法について以下説明する。図14に示したとおり,BCD形式の10進数を下位から3桁(2進数の12ビット)区切りにし,各3桁のセットはb0[11:0]-b4[11:0],最上位の桁はb5[3:0]とする。
Therefore, RAS redundant data of DPD format data is represented by pd [2: 0]. Since the lower 2 bits pd [2: 0] of the DPD RAS redundant data are obtained by compressing the mod3 of each mantissa digit, the mod3 data of the RAS redundant bits of the BCD format data can be used as it is. Therefore, it is as follows.
pd [1: 0] = pb [1: 0]
Next, a method of calculating the remaining xor bit pd [2] of the DPD RAS redundant data will be described below. As shown in Fig. 14, the decimal number in BCD format is divided into 3 digits from the bottom (binary 12 bits), and each 3-digit set is b0 [11: 0] -b4 [11: 0] The digit is b5 [3: 0].

図14は,RAS用冗長データ生成回路12を示す図である。図14のRAS用冗長データ生成回路12では,BCD形式のデータBCD[63:0]の各3桁のセットb0[11:0]-b4[11:0]それぞれを入力してxorデータpb(i) (i=0,1,2,3,4,5)をそれぞれ生成するpb(i)生成回路12_0〜12_4と,最上位桁のセットb5[3:0]を入力してxorデータpb(5)を生成するpb(5)生成回路12_5を有する。さらに,RAS用冗長データ生成回路12は,符号と指数のxorデータを生成するXOR回路1200と,全てのxorデータを圧縮するXOR回路1201とを有する。   FIG. 14 is a diagram showing the RAS redundant data generation circuit 12. In the RAS redundant data generation circuit 12 shown in FIG. 14, each set of three digits b0 [11: 0] -b4 [11: 0] of BCD format data BCD [63: 0] is input and xor data pb ( i) The pb (i) generation circuit 12_0 to 12_4 for generating (i = 0,1,2,3,4,5) respectively, and the most significant digit set b5 [3: 0] are input and the xor data pb A pb (5) generation circuit 12_5 for generating (5) is included. Further, the redundant data generation circuit 12 for RAS includes an XOR circuit 1200 that generates xor data of sign and exponent, and an XOR circuit 1201 that compresses all xor data.

上記の回路により,DPDのRAS用冗長データの残りのxorビットpd[2]は,各セットbi (i=0,1,2,3,4,5) から算出された1ビットのxorデータpb(i) (i=0,1,2,3,4,5) と,符号sbと指数eb[9:0]のxorデータとを有する全ビットの xorデータから生成される。つまり,演算式は次のとおりである。
(5−1)pd[2] = sb ^ eb[9:0] ^ pb(5) ^ pb(4) ^ pb(3) ^ pb(2) ^ pb(1) ^ pb(0)
次に,各セットbi(i=0,1,2,3,4,5)のxorデータpb(i)うち,例えば最下位セットb0[11:0]のxorデータpb(0)を生成する演算式は,以下のとおりである。同様の演算式で他のセットのxorデータpb(4)〜pb(1)も算出することができる。
(5−2)b0[11]=0, b0[7]=0, b0[3]=0 のとき,pb(0) = b0[6] ^ b0[5] ^ b0[2] ^ b0[1]
(5−3)b0[11]=0, b0[7]=0, b0[3]=1 のとき,pb(0) = ~( b0[6] ^ b0[5] )
(5−4)b0[11]=0, b0[7]=1, b0[3]=0 のとき,pb(0) = b0[2] ^ b0[1]
(5−5)b0[11]=0, b0[7]=1, b0[3]=1 のとき,pb(0) = 0
(5−6)b0[11]=1, b0[7]=0, b0[3]=0 のとき,pb(0) = b0[6] ^ b0[5]
(5−7)b0[11]=1, b0[7]=0, b0[3]=1 のとき,pb(0) = 0
(5−8)b0[11]=1, b0[7]=1, b0[3]=0 のとき,pb(0) = 1
(5−9)b0[11]=1, b0[7]=1, b0[3]=1 のとき,pb(0) = 1
また,最上位桁のpb(5)は1digitなので,以下のようにpb(4)〜pb(0)とは異なる計算式で算出される。
(5−10)b5[3]=0 のとき pb(5) = b5[2] ^ b5[1]
(5−11)b5[3]=1 のとき pb(5) = 0
なお,b0[11:0]とb[9:0]とは異なり,b0[11:0]はBCD形式の3桁の10進数を表しており,図7−図10のRAS用冗長データ生成回路のb[9:0]は,DPD形式の3桁の10進数を表している。
With the above circuit, the remaining xor bits pd [2] of the DPD RAS redundant data are converted into 1-bit xor data pb calculated from each set bi (i = 0,1,2,3,4,5). (i) It is generated from xor data of all bits having (i = 0, 1, 2, 3, 4, 5), code sb, and xor data of exponent eb [9: 0]. In other words, the arithmetic expression is as follows.
(5-1) pd [2] = sb ^ eb [9: 0] ^ pb (5) ^ pb (4) ^ pb (3) ^ pb (2) ^ pb (1) ^ pb (0)
Next, among the xor data pb (i) of each set bi (i = 0, 1, 2, 3, 4, 5), for example, xor data pb (0) of the lowest set b0 [11: 0] is generated. The arithmetic expression is as follows. Other sets of xor data pb (4) to pb (1) can be calculated with the same arithmetic expression.
(5-2) When b0 [11] = 0, b0 [7] = 0, b0 [3] = 0, pb (0) = b0 [6] ^ b0 [5] ^ b0 [2] ^ b0 [ 1]
(5-3) When b0 [11] = 0, b0 [7] = 0, b0 [3] = 1, pb (0) = ~ (b0 [6] ^ b0 [5])
(5-4) When b0 [11] = 0, b0 [7] = 1, b0 [3] = 0, pb (0) = b0 [2] ^ b0 [1]
(5-5) When b0 [11] = 0, b0 [7] = 1, b0 [3] = 1, pb (0) = 0
(5-6) When b0 [11] = 1, b0 [7] = 0, b0 [3] = 0, pb (0) = b0 [6] ^ b0 [5]
(5-7) When b0 [11] = 1, b0 [7] = 0, b0 [3] = 1, pb (0) = 0
(5-8) When b0 [11] = 1, b0 [7] = 1, b0 [3] = 0, pb (0) = 1
(5-9) When b0 [11] = 1, b0 [7] = 1, b0 [3] = 1, pb (0) = 1
In addition, since the most significant digit pb (5) is 1 digit, it is calculated by a calculation formula different from pb (4) to pb (0) as follows.
(5-10) When b5 [3] = 0 pb (5) = b5 [2] ^ b5 [1]
(5-11) When b5 [3] = 1 pb (5) = 0
Unlike b0 [11: 0] and b [9: 0], b0 [11: 0] represents a 3-digit decimal number in BCD format. B [9: 0] of the circuit represents a 3-digit decimal number in the DPD format.

上記の演算式(5−2)〜(5−9)は,図4の右端に示した図3の行番号と以下のような対応である。
(5−2):図4の1行
(5−3):図4の2行
(5−4):図4の3行
(5−5):図4の7行
(5−6):図4の4行
(5−7):図4の6行
(5−8):図4の5行
(5−9):図4の8行
これらの演算式により生成されるBCD形式のデータb0[11:0]から生成されるxorデータは,図7−図10のDPD形式のデータb[9:0]から生成したxorデータと一致する。BCD形式とDPD形式の変換論理に基づいて,上記の演算式が導き出されている。但し,回路構成を最小化するために,上記のxorデータを算出する演算式も整理して簡素化されている。
The above arithmetic expressions (5-2) to (5-9) correspond to the row numbers in FIG. 3 shown at the right end of FIG. 4 as follows.
(5-2): Line 1 (5-3) in FIG. 4: Line 2 (5-4) in FIG. 4: Line 3 (5-5) in FIG. 4: Line 7 (5-6) in FIG. 4 line (5-7) in FIG. 4: 6 line (5-8) in FIG. 4: 5 line (5-9) in FIG. 4: 8 line in FIG. 4 BCD format data generated by these arithmetic expressions The xor data generated from b0 [11: 0] matches the xor data generated from the data b [9: 0] in the DPD format shown in FIGS. Based on the conversion logic of the BCD format and the DPD format, the above arithmetic expression is derived. However, in order to minimize the circuit configuration, the arithmetic expression for calculating the above xor data is also arranged and simplified.

図14のRAS用冗長データ生成回路12は,演算式(5−1)がXOR回路1200,1201により演算されている。また,演算式(5−2)〜(5−11)が,pb(i)生成回路12_0〜12_5により演算されている。   In the RAS redundant data generation circuit 12 of FIG. 14, the arithmetic expression (5-1) is calculated by the XOR circuits 1200 and 1201. The arithmetic expressions (5-2) to (5-11) are calculated by the pb (i) generation circuits 12_0 to 12_5.

図16は,pd(i)生成回路12_0〜12_4の論理回路を示す図である。論理回路1204はbi[11,7,3]=000が真の場合に「1」を出力するので,演算式(5−2)に対応する。同様に,論理回路1205〜1209は,図中の条件が真の場合に「1」を出力するので,それぞれの条件式と演算式との対応は次のとおりである。
論理回路1204,bi[11,7,3]=000:演算式(5−2)
論理回路1205,bi[11,7,3]=001:演算式(5−3)
論理回路1206,bi[11,7,3]=010:演算式(5−4)
論理回路1207,bi[11,7,3]=100:演算式(5−6)
論理回路1208,bi[11,7,3]=011 or 101:演算式(5−5)(5−7)
論理回路1209,bi[11,7,3]=110 or 111:演算式(5−8)(5−9)
そして,ANDゲートとORゲートからなるセレクタ1211は,論理回路1204−1209が出力する「1」に対応した値を,xorデータpb(i)として出力する。したがって,上記の演算式(5−2)〜(5−9)の演算結果pb(i)が,条件に対応してセレクタ1211から出力される。
FIG. 16 is a diagram illustrating a logic circuit of the pd (i) generation circuits 12_0 to 12_4. Since the logic circuit 1204 outputs “1” when bi [11,7,3] = 000 is true, it corresponds to the arithmetic expression (5-2). Similarly, since the logic circuits 1205 to 1209 output “1” when the condition in the figure is true, the correspondence between each conditional expression and the arithmetic expression is as follows.
Logic circuit 1204, bi [11,7,3] = 000: arithmetic expression (5-2)
Logic circuit 1205, bi [11,7,3] = 001: arithmetic expression (5-3)
Logic circuit 1206, bi [11,7,3] = 010: arithmetic expression (5-4)
Logic circuit 1207, bi [11,7,3] = 100: arithmetic expression (5-6)
Logic circuit 1208, bi [11,7,3] = 011 or 101: arithmetic expressions (5-5) (5-7)
Logic circuit 1209, bi [11,7,3] = 110 or 111: arithmetic expressions (5-8) (5-9)
The selector 1211 composed of an AND gate and an OR gate outputs a value corresponding to “1” output from the logic circuits 1204-1209 as xor data pb (i). Therefore, the calculation results pb (i) of the above-described arithmetic expressions (5-2) to (5-9) are output from the selector 1211 corresponding to the conditions.

図17は,pd(5)生成回路12_5の論理回路を示す図である。この論理回路は,XOR回路1220とAND回路1221とインバータ1222とを有し,上記の演算式(5−10)(5−11)に示された演算結果pb(5)を出力する。   FIG. 17 is a diagram illustrating a logic circuit of the pd (5) generation circuit 12_5. This logic circuit includes an XOR circuit 1220, an AND circuit 1221, and an inverter 1222, and outputs the operation result pb (5) shown in the above-described arithmetic expressions (5-10) and (5-11).

また,上記の演算式(5−1)〜(5−11)は,BCD形式のデータがBCDフォーマットに従っている場合のみ有効である。具体的には,BCDフォーマットには10進として成り立たないデータがある。例えば,1桁が4ビットの2進数で表現されるので,1001=910より大きなデータ(16進数のA-F)は成り立たない。上記の演算式は,そのような例外がないことが前提となる。もしも例外データを含めた全ケースを見る必要がある場合には,演算式は次のとおりにする。
b0[11]=0, b0[7]=0, b0[3]=0 のとき pb(0) = b0[6] ^ b0[5] ^ b0[2] ^ b0[1]
b0[11]=0, b0[7]=0, b0[3:1]=100 のとき pb(0) = ~( b0[6] ^ b0[5] )
b0[11]=0, b0[7:5]=100, b0[3]=0 のとき pb(0) = b0[2] ^ b0[1]
b0[11]=0, b0[7:5]=100, b0[3:1]=100 のとき pb(0) = 0
b0[11:9]=100, b0[7]=0, b0[3]=0 のとき pb(0) = b0[6] ^ b0[5]
b0[11:9]=100, b0[7]=0, b0[3:1]=100 のとき pb(0) = 0
b0[11:9]=100, b0[7:5]=100, b0[3]=0 のとき pb(0) = 1
b0[11:9]=100, b0[7:5]=100, b0[3:1]=100 のとき pb(0) = 1
b5[3]=0 のとき pb(5) = b5[2] ^ b5[1]
b5[3:1]=100 のとき pb(5) = 0
そして,この条件に合わないケースはデータエラーとして相応の処理が必要となる。
The above arithmetic expressions (5-1) to (5-11) are effective only when the data in the BCD format conforms to the BCD format. Specifically, the BCD format has data that does not hold in decimal. For example, because one digit is expressed by a binary number of 4 bits, 1001 2 = 9 10 large data (hexadecimal AF) than it does not hold. The above arithmetic expressions are based on the premise that there are no such exceptions. If it is necessary to see all cases including exception data, the arithmetic expression is as follows.
When b0 [11] = 0, b0 [7] = 0, b0 [3] = 0 pb (0) = b0 [6] ^ b0 [5] ^ b0 [2] ^ b0 [1]
When b0 [11] = 0, b0 [7] = 0, b0 [3: 1] = 100 pb (0) = ~ (b0 [6] ^ b0 [5])
When b0 [11] = 0, b0 [7: 5] = 100, b0 [3] = 0 pb (0) = b0 [2] ^ b0 [1]
When b0 [11] = 0, b0 [7: 5] = 100, b0 [3: 1] = 100 pb (0) = 0
When b0 [11: 9] = 100, b0 [7] = 0, b0 [3] = 0 pb (0) = b0 [6] ^ b0 [5]
When b0 [11: 9] = 100, b0 [7] = 0, b0 [3: 1] = 100 pb (0) = 0
When b0 [11: 9] = 100, b0 [7: 5] = 100, b0 [3] = 0 pb (0) = 1
When b0 [11: 9] = 100, b0 [7: 5] = 100, b0 [3: 1] = 100 pb (0) = 1
When b5 [3] = 0 pb (5) = b5 [2] ^ b5 [1]
When b5 [3: 1] = 100, pb (5) = 0
If this condition is not met, appropriate processing is required as a data error.

図14,16,17に示されたRAS用冗長データ生成回路12は,上記の演算式に応じて修正されることが必要になる。   The RAS redundant data generation circuit 12 shown in FIGS. 14, 16, and 17 needs to be modified according to the above arithmetic expression.

以上説明したとおり,本実施の形態のRAS用冗長データ生成回路(エラー検出コード生成回路)12は,DPD形式のデータから生成されるxorデータを,BCD形式のデータから生成する。したがって,BCD形式のデータをDPD形式のデータに変換するフォーマット変換回路と並行して,BCD形式のデータからDPD形式のデータのエラー検出コードであるxorデータを生成することができる。よって,演算遅延時間が短くなり,フォーマット変換回路のエラーを検出できる。   As described above, the RAS redundant data generation circuit (error detection code generation circuit) 12 according to the present embodiment generates xor data generated from DPD format data from BCD format data. Therefore, in parallel with the format conversion circuit that converts BCD format data into DPD format data, xor data, which is an error detection code for DPD format data, can be generated from BCD format data. Therefore, the operation delay time is shortened and an error in the format conversion circuit can be detected.

上記の実施の形態をまとめると以下の付記のとおりである。   The above embodiment is summarized as follows.

(付記1)
4ビットで0から9までの数字を表現する第1の形式(BCD)の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットをそれぞれ生成する複数の第1のXOR生成回路(12_0〜12_4)と,
前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成する第2のXOR生成回路(12_5)と,
前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式(DPD)の10進数データのエラー検出用XORビットとして,生成する第3のXOR生成回路(1200,1201)とを有し,
前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力するエラー検出コード生成回路。
(Appendix 1)
A plurality of first XOR bits for the 12 bits allocated to the three decimal digits included in the decimal data of the first format (BCD) representing the numbers from 0 to 9 with 4 bits. 1 XOR generator (12_0 ~ 12_4),
A second XOR generation circuit (12_5) for generating a second XOR bit for 4 bits allocated to one decimal digit included in the decimal data in the first format;
The first XOR bit, the second XOR bit, the sign bit, and the third XOR bit for the exponent bit are represented by 10 bits converted from the decimal data of the first format to represent three decimal digits. A third XOR generation circuit (1200, 1201) for generating XOR bits for error detection of decimal data in the second format (DPD)
An error detection code generation circuit for outputting the XOR bit for error detection and the modulo 3 of the decimal data in the first format as redundant data for error detection of the decimal data in the second format.

(付記2)
前記第1の形式の10進数データは,複数桁の10進数データを有し,
前記第2の形式の10進数データは,第1のフィールドに格納された符号ビットと,第2のフィールドに格納された指数ビットと最上位桁の仮数ビットと,第3のフィールドに格納された下位の仮数ビットとを有し,
前記第1の形式の10進数データの10進数と,前記第2の形式の10進数データの仮数部の10進数とが同じ10進数である付記1に記載のエラー検出コード生成回路。
(Appendix 2)
The decimal data in the first format includes decimal data of a plurality of digits,
The decimal data in the second format is stored in the third field, the sign bit stored in the first field, the exponent bit and the most significant mantissa bit stored in the second field, and the third field. Lower mantissa bits, and
The error detection code generation circuit according to appendix 1, wherein the decimal number of the decimal data in the first format and the decimal number of the mantissa part of the decimal data in the second format are the same decimal number.

(付記3)
複数の第1のXOR生成回路と第2のXOR生成回路と第3のXOR生成回路とを有するエラー検出コード生成回路において,
前記複数の第1のXOR生成回路が,4ビットで0から9までの数字を表現する第1の形式の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットをそれぞれ生成し,
前記第2のXOR生成回路が,前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成し,
前記第3のXOR生成回路が、前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式の10進数データのエラー検出用XORビットとして生成することにより,前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力するエラー検出コード生成方法。
(Appendix 3)
In an error detection code generation circuit having a plurality of first XOR generation circuits, second XOR generation circuits, and third XOR generation circuits,
The plurality of first XOR generation circuits includes a first XOR for 12 bits allocated to 3 decimal digits included in decimal data of a first format expressing a number from 0 to 9 in 4 bits. Generate each bit,
The second XOR generation circuit generates a second XOR bit for 4 bits allocated to one decimal digit included in the decimal data of the first format;
The third XOR generation circuit converts the format of the first XOR bit, the second XOR bit, the third XOR bit for the sign bit, and the exponent bit from the decimal data in the first format. The error detection XOR bit and the modulo 3 of the decimal data in the first format are generated by generating XOR bits for error detection of the decimal data in the second format that expresses three decimal digits in 10 bits. Is generated as redundant data for error detection of decimal data in the second format.

(付記4)
4ビットで0から9までの数字を表現する第1の形式の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットを生成する複数の第1のXOR生成回路と,
前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成する第2のXOR生成回路と,
前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式の10進数データのエラー検出用XORビットとして,生成する第3のXOR生成回路とを有し,
前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力する第1のエラー検出コード生成回路(12)と,
前記第1の形式の10進数データを前記第2の形式の10進数データに変換するフォーマット変換回路(10)とを有する,
フォーマット変換装置。
(Appendix 4)
A plurality of first XOR generators that generate first XOR bits for 12 bits allocated to 3 decimal digits included in decimal data of the first format that expresses a number from 0 to 9 in 4 bits Circuit,
A second XOR generation circuit for generating a second XOR bit for four bits allocated to one decimal digit included in the decimal data in the first format;
The first XOR bit, the second XOR bit, the sign bit, and the third XOR bit for the exponent bit are represented by 10 bits converted from the decimal data of the first format to represent three decimal digits. A third XOR generation circuit for generating XOR bits for error detection of decimal data in the second format
A first error detection code generation circuit (12) for outputting the error detection XOR bit and the modulo 3 of the decimal data of the first format as error detection redundant data of the decimal data of the second format. )When,
A format conversion circuit (10) for converting the decimal data in the first format into the decimal data in the second format,
Format conversion device.

(付記5)
前記フォーマット変換装置は,さらに,
前記変換された第2の形式(DPD)の10進数データのコンビネーションフィールド内の仮数最上位桁の第1のモジュロ3を生成する第1のモジュロ生成回路(801)と,前記変換された第2の形式の10進数データの後続仮数部フィールドの前記10進数3桁を表現する10ビットのデクレットの第2のモジュロ3をそれぞれ生成する複数の第2のモジュロ生成回路(1001-1005)と,前記第1のモジュロ3及び複数の第2のモジュロ3の第3のモジュロ3(P[1:0])を生成する第3のモジュロ生成回路(603)と,前記第2の形式の10進数データのエラー検出用XORビットを生成する第4のXOR生成回路(604)とを有する第2のエラー検出コード生成回路(112)と,
前記第1のエラー検出コード生成回路(12)が生成する前記第2の形式の10進数データのエラー検出用XORビット(pd[2])及び前記第1の形式の10進数データのモジュロ3(pd[1:0])と,前記第2のエラー検出コード生成回路(112)が生成する前記第2の形式の10進数データのエラー検出用XORビット(P[2])と前記第3のモジュロ3(P[1:0])とをそれぞれ比較する比較器(20)とを有する
付記4に記載のフォーマット変換装置。
(Appendix 5)
The format conversion device further includes:
A first modulo generation circuit (801) for generating the first modulo 3 of the mantissa most significant digit in the combination field of the decimal data in the converted second format (DPD), and the converted second A plurality of second modulo generation circuits (1001-1005) each generating second modulo 3 of a 10-bit decret representing the three decimal digits of the subsequent mantissa field of decimal data of the form A third modulo generating circuit (603) for generating a first modulo 3 and a third modulo 3 (P [1: 0]) of the second modulo 3; and decimal data of the second format A second error detection code generation circuit (112) having a fourth XOR generation circuit (604) for generating the error detection XOR bit;
The error detection XOR bit (pd [2]) of the decimal data in the second format generated by the first error detection code generation circuit (12) and the modulo 3 of the decimal data in the first format ( pd [1: 0]), the XOR bit (P [2]) for error detection of the decimal data in the second format generated by the second error detection code generation circuit (112), and the third The format conversion apparatus according to attachment 4, further comprising a comparator (20) that compares the modulo 3 (P [1: 0]) with each other.

(付記6)
前記第1の形式の10進数データは,複数桁の10進数データを有し,
前記第2の形式の10進数データは,第1のフィールドに格納された符号ビットと,第2のフィールドに格納された指数ビットと最上位桁の仮数ビットと,第3のフィールドに格納された下位の仮数ビットとを有し,
前記第1の形式の10進数データの10進数と,前記第2の形式の10進数データの仮数部の10進数とが同じ10進数である付記4に記載のフォーマット変換装置。
(Appendix 6)
The decimal data in the first format includes decimal data of a plurality of digits,
The decimal data in the second format is stored in the third field, the sign bit stored in the first field, the exponent bit and the most significant mantissa bit stored in the second field, and the third field. Lower mantissa bits, and
The format conversion apparatus according to appendix 4, wherein the decimal number of the decimal data of the first format and the decimal number of the mantissa part of the decimal data of the second format are the same decimal number.

(付記7)
前記フォーマット変換回路には,前記第1の形式の10進数データと,前記第2の形式の10進数データに含まれる符号ビットと指数ビットとが入力される付記4に記載のフォーマット変換装置。
(Appendix 7)
The format conversion apparatus according to appendix 4, wherein the format conversion circuit receives the decimal data in the first format and the sign bit and the exponent bit included in the decimal data in the second format.

12:第1のエラー検出コード生成回路
112,18:第2のエラー検出コード生成回路
20:比較回路
BCD:第1の形式
DPD:第2の形式
12: First error detection code generation circuit 112, 18: Second error detection code generation circuit 20: Comparison circuit
BCD: First format
DPD: Second format

Claims (4)

4ビットで0から9までの数字を表現する第1の形式の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットをそれぞれ生成する複数の第1のXOR生成回路と,
前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成する第2のXOR生成回路と,
前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式の10進数データのエラー検出用XORビットとして,生成する第3のXOR生成回路とを有し,
前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力するエラー検出コード生成回路。
A plurality of first XORs, each generating a first XOR bit for 12 bits assigned to 3 decimal digits included in decimal data of the first format expressing a number from 0 to 9 in 4 bits A generator circuit;
A second XOR generation circuit for generating a second XOR bit for four bits allocated to one decimal digit included in the decimal data in the first format;
The first XOR bit, the second XOR bit, the sign bit, and the third XOR bit for the exponent bit are represented by 10 bits converted from the decimal data of the first format to represent three decimal digits. A third XOR generation circuit for generating XOR bits for error detection of decimal data in the second format
An error detection code generation circuit for outputting the XOR bit for error detection and the modulo 3 of the decimal data in the first format as redundant data for error detection of the decimal data in the second format.
複数の第1のXOR生成回路と第2のXOR生成回路と第3のXOR生成回路とを有するエラー検出コード生成回路において,
前記複数の第1のXOR生成回路が,4ビットで0から9までの数字を表現する第1の形式の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットをそれぞれ生成し,
前記第2のXOR生成回路が,前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成し,
前記第3のXOR生成回路が、前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式の10進数データのエラー検出用XORビットとして生成することにより,前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力するエラー検出コード生成方法。
In an error detection code generation circuit having a plurality of first XOR generation circuits, second XOR generation circuits, and third XOR generation circuits,
The plurality of first XOR generation circuits includes a first XOR for 12 bits allocated to 3 decimal digits included in decimal data of a first format expressing a number from 0 to 9 in 4 bits. Generate each bit,
The second XOR generation circuit generates a second XOR bit for 4 bits allocated to one decimal digit included in the decimal data of the first format;
The third XOR generation circuit converts the format of the first XOR bit, the second XOR bit, the third XOR bit for the sign bit, and the exponent bit from the decimal data in the first format. The error detection XOR bit and the modulo 3 of the decimal data in the first format are generated by generating XOR bits for error detection of the decimal data in the second format that expresses three decimal digits in 10 bits. Is generated as redundant data for error detection of decimal data in the second format.
4ビットで0から9までの数字を表現する第1の形式の10進数データに含まれる,10進数3桁に割り当てられた12ビットに対する第1のXORビットを生成する複数の第1のXOR生成回路と,
前記第1の形式の10進数データに含まれる,10進数1桁に割り当てられた4ビットに対する第2のXORビットを生成する第2のXOR生成回路と,
前記第1のXORビットと前記第2のXORビットと符号ビットと指数ビットに対する第3のXORビットを,前記第1の形式の10進数データからフォーマット変換された10ビットで10進数3桁を表現する第2の形式の10進数データのエラー検出用XORビットとして,生成する第3のXOR生成回路とを有し,
前記エラー検出用XORビットと前記第1の形式の10進数データのモジュロ3とを,前記第2の形式の10進数データのエラー検出用冗長データとして出力する第1のエラー検出コード生成回路と,
前記第1の形式の10進数データを前記第2の形式の10進数データに変換するフォーマット変換回路とを有する,
フォーマット変換装置。
A plurality of first XOR generators that generate first XOR bits for 12 bits allocated to 3 decimal digits included in decimal data of the first format that expresses a number from 0 to 9 in 4 bits Circuit,
A second XOR generation circuit for generating a second XOR bit for four bits allocated to one decimal digit included in the decimal data in the first format;
The first XOR bit, the second XOR bit, the sign bit, and the third XOR bit for the exponent bit are represented by 10 bits converted from the decimal data of the first format to represent three decimal digits. A third XOR generation circuit for generating XOR bits for error detection of decimal data in the second format
A first error detection code generation circuit for outputting the error detection XOR bit and the modulo 3 of the decimal data of the first format as error detection redundant data of the decimal data of the second format;
A format conversion circuit for converting the decimal data in the first format into the decimal data in the second format,
Format conversion device.
前記フォーマット変換装置は,さらに,
前記変換された第2の形式の10進数データのコンビネーションフィールド内の仮数最上位桁の第1のモジュロ3を生成する第1のモジュロ生成回路と,前記変換された第2の形式の10進数データの後続仮数部フィールドの前記10進数3桁を表現する10ビットのデクレットの第2のモジュロ3をそれぞれ生成する複数の第2のモジュロ生成回路と,前記第1のモジュロ3及び複数の第2のモジュロ3の第3のモジュロ3を生成する第3のモジュロ生成回路と,前記第2の形式の10進数データのエラー検出用XORビットを生成する第4のXOR生成回路とを有する第2のエラー検出コード生成回路と,
前記第1のエラー検出コード生成回路が生成する前記第2の形式の10進数データのエラー検出用XORビット及び前記第1の形式の10進数データのモジュロ3と,前記第2のエラー検出コード生成回路が生成する前記第2の形式の10進数データのエラー検出用XORビットと前記第3のモジュロ3とをそれぞれ比較する比較器とを有する,
請求項3記載のフォーマット変換装置。
The format conversion device further includes:
A first modulo generation circuit for generating the first modulo 3 of the most significant digit in the combination field of the converted decimal data in the second format; and the converted decimal data in the second format A plurality of second modulo generation circuits that respectively generate a second modulo 3 of a 10-bit declet representing the three decimal digits of the subsequent mantissa field of the first mantissa field, and the first modulo 3 and the plurality of second modulo 3 A second error having a third modulo generation circuit for generating a third modulo 3 of the modulo 3 and a fourth XOR generation circuit for generating an XOR bit for error detection of the decimal data in the second format A detection code generation circuit;
XOR bit for error detection of decimal data in the second format generated by the first error detection code generation circuit, modulo 3 of the decimal data in the first format, and generation of the second error detection code A comparator that compares the XOR bit for error detection of the decimal data in the second format generated by the circuit with the third modulo 3;
The format conversion apparatus according to claim 3.
JP2014165824A 2014-08-18 2014-08-18 Error detection code generation circuit, error detection code generation method, and format conversion apparatus Active JP6344135B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014165824A JP6344135B2 (en) 2014-08-18 2014-08-18 Error detection code generation circuit, error detection code generation method, and format conversion apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014165824A JP6344135B2 (en) 2014-08-18 2014-08-18 Error detection code generation circuit, error detection code generation method, and format conversion apparatus

Publications (2)

Publication Number Publication Date
JP2016042651A JP2016042651A (en) 2016-03-31
JP6344135B2 true JP6344135B2 (en) 2018-06-20

Family

ID=55592218

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014165824A Active JP6344135B2 (en) 2014-08-18 2014-08-18 Error detection code generation circuit, error detection code generation method, and format conversion apparatus

Country Status (1)

Country Link
JP (1) JP6344135B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10915385B2 (en) 2017-03-21 2021-02-09 International Business Machines Corporation Residue prediction of packed data

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8286061B2 (en) * 2009-05-27 2012-10-09 International Business Machines Corporation Error detection using parity compensation in binary coded decimal and densely packed decimal conversions
JP6069690B2 (en) * 2012-08-13 2017-02-01 富士通株式会社 Arithmetic circuit and control method of arithmetic circuit

Also Published As

Publication number Publication date
JP2016042651A (en) 2016-03-31

Similar Documents

Publication Publication Date Title
US20160092169A1 (en) Standalone floating-point conversion unit
US8131794B2 (en) RAID system and Galois field product computation method
US8286061B2 (en) Error detection using parity compensation in binary coded decimal and densely packed decimal conversions
US8082480B2 (en) Distributed checksum computation
EP3082046B1 (en) Data error correcting method and device, and computer storage medium
US8346828B2 (en) System and method for storing numbers in first and second formats in a register file
JP5407589B2 (en) Arithmetic circuit, arithmetic processing device, and arithmetic processing method
JP6069690B2 (en) Arithmetic circuit and control method of arithmetic circuit
US20100049779A1 (en) Shared parallel adder tree for executing multiple different population count operations
JP6344135B2 (en) Error detection code generation circuit, error detection code generation method, and format conversion apparatus
EP2326014B1 (en) Error detecting/correcting code generating circuit and method of controlling the same
US20140313064A1 (en) Encoding apparatus, decoding apparatus, encoding method, encoding program, decoding method, and decoding program
US20130262546A1 (en) Arithmetic circuit and arithmetic method
US10929213B2 (en) Residue prediction of packed data
CN112596699A (en) Multiplier, processor and electronic equipment
JP5133693B2 (en) Computer technology solution of hybrid number carry system and carry line digital engineering method
JP7044528B2 (en) Leading Zero Forecast
WO2011108089A1 (en) Data compression device, data compression method, and program
US20190121615A1 (en) Apparatus and method for subtracting significand values of floating-point operands
US20070294330A1 (en) Systems, methods and computer program products for providing a combined moduli-9 and 3 residue generator
US11221826B2 (en) Parallel rounding for conversion from binary floating point to binary coded decimal
Ndjountche Digital electronics 1: Combinational logic circuits
US9836278B2 (en) Floating point computation apparatus and method
CN117632857A (en) Data processing method, device and equipment
Pandey Preliminary Proposal to Encode Diwani Siyaq Numbers in the UCS

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170511

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180413

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180507

R150 Certificate of patent or registration of utility model

Ref document number: 6344135

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150