JPS607816B2 - Overflow detection and correction circuit - Google Patents
Overflow detection and correction circuitInfo
- Publication number
- JPS607816B2 JPS607816B2 JP52114845A JP11484577A JPS607816B2 JP S607816 B2 JPS607816 B2 JP S607816B2 JP 52114845 A JP52114845 A JP 52114845A JP 11484577 A JP11484577 A JP 11484577A JP S607816 B2 JPS607816 B2 JP S607816B2
- Authority
- JP
- Japan
- Prior art keywords
- output
- overflow
- ofn
- flip
- input
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired
Links
- 238000001514 detection method Methods 0.000 title claims description 21
- 230000003111 delayed effect Effects 0.000 claims description 5
- 101150065817 ROM2 gene Proteins 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 125000004122 cyclic group Chemical group 0.000 description 1
- 230000010355 oscillation Effects 0.000 description 1
Description
【発明の詳細な説明】 本発明は桁あふれ検出及び訂正回路に関する。[Detailed description of the invention] The present invention relates to overflow detection and correction circuits.
2次巡回形ディジタルフィルタ等において、加算器にお
いて生じる桁あふれはリミットサイクルと呼ばれる発振
現象を引き起す可能性があり問題となる。In a secondary cyclic digital filter or the like, overflow occurring in an adder may cause an oscillation phenomenon called a limit cycle, which poses a problem.
このため、桁あふれ検出回路と桁あふれ訂正回路が必要
となる。以下の説明では、入出力データはすべて2の橘
数表示とし、最4・重みビット(以下LSBと略称)が
時間的に最初にくるような直列データ形式とする。Therefore, an overflow detection circuit and an overflow correction circuit are required. In the following explanation, all input/output data are expressed in digit numbers of 2, and are in a serial data format in which the 4th most significant bit (hereinafter abbreviated as LSB) comes first in terms of time.
第1図は、従来から用いられている桁あふれ検出回路の
一例を示したものである。FIG. 1 shows an example of a conventional overflow detection circuit.
端子1,2には加算すべき2つのデータが入力され、端
子3には加算後のデータが入力される。Two data to be added are input to terminals 1 and 2, and data after addition is input to terminal 3.
さらに端子4には極性を表示するための符号ビット(以
下MSBと略称)の位置を示すパルスが入力される。加
算前の2個の入力データの符号(極性)が共に負(“1
”)でありかつ加算後のデータの符号が正ぐ0”)であ
る場合には、NAND素子10の出力は“1”となって
端子10川こ出力され、負の桁あふれを起こしたことを
示す。Furthermore, a pulse indicating the position of a sign bit (hereinafter abbreviated as MSB) for indicating polarity is input to the terminal 4. If the signs (polarity) of the two input data before addition are both negative (“1”)
”) and the sign of the data after addition is positive (0), the output of the NAND element 10 becomes “1” and is output from the terminal 10, causing negative overflow. shows.
逆に、加算すべき2つの入力データの符号が共に正ぐ0
”)でありかつ加算後のデータの符号が負(“1”)で
ある場合には、NAND素子20の出力は“1”となっ
て端子200に出力され、正の桁あふれを起こしたこと
を示す。Conversely, if the signs of the two input data to be added are both correct 0
”) and the sign of the data after addition is negative (“1”), the output of the NAND element 20 becomes “1” and is output to the terminal 200, causing a positive overflow. shows.
第2図は従来から用いられている桁あふれ訂正回路の一
例を示したものである。FIG. 2 shows an example of a conventional overflow correction circuit.
端子1,2には正の桁あふれを検出した情報が入力され
端子3,4には負の桁あふれを検出した情報が入力され
る。Information indicating that a positive overflow has been detected is input to terminals 1 and 2, and information indicating that a negative overflow has been detected is input to terminals 3 and 4.
ここでは、第1図に示すような桁あふれ検出回路が2組
前段にあると想定している。また、端子5には絶対値が
最大の正の数が入力され、端子6には絶対値が最大の負
の数が与えられる。以上のような構成により桁あふれを
起こした場合、符号に応じた絶対値の最大数が端子8に
得られる。また、桁あふれを起こさない時には、端子7
に入力されたデータが、そのまま端子8に出力される。
第3図は第1図に示した桁あふれ検出回路と第2図に示
した桁あふれ訂正回路とを組合わせて構成した桁あふれ
検出及び訂正回路のブロック図である。Here, it is assumed that two sets of overflow detection circuits as shown in FIG. 1 are provided at the front stage. Further, the positive number with the maximum absolute value is input to the terminal 5, and the negative number with the maximum absolute value is input to the terminal 6. With the above configuration, when overflow occurs, the maximum number of absolute values depending on the sign can be obtained at the terminal 8. Also, when overflow does not occur, terminal 7
The data input to the terminal 8 is output to the terminal 8 as is.
FIG. 3 is a block diagram of an overflow detection and correction circuit constructed by combining the overflow detection circuit shown in FIG. 1 and the overflow correction circuit shown in FIG.
参照数字1川ま第1図に示した桁あふれ検出回路、参照
数字20及び30はフリップフロップ「参照数字40は
正および負の最大数発生回路、参照数字50は第2図に
示した桁あふれ検出回路および参照数字60は1語長分
のシフトレジスタである。Reference numeral 1 means the overflow detection circuit shown in Figure 1, reference numerals 20 and 30 refer to the flip-flops, reference numeral 40 represents the positive and negative maximum number generation circuit, and reference numeral 50 represents the overflow detection circuit shown in Figure 2. The detection circuit and reference numeral 60 are one word long shift registers.
第1図に示したように端子1,2には加算すべき2つの
データが入力され、端子3には加算後のデータが入力さ
れる。As shown in FIG. 1, two data to be added are input to terminals 1 and 2, and data after addition is input to terminal 3.
また、正の桁あふれが起こった時、MSBの時点で端子
1 1が“1”となり、負の桁あふれが起こった時MS
Bの時点で端子12が“1”となる。従って、桁あふれ
を起こしたデータを訂正するためにはフリツプフロツプ
20及び21を用いて桁あふれを起したか否かの情報を
一語長(1データ)分保持しておく必要がある。さらに
加算後のデータはシフトレジスタ6川こ与えられ、1語
長分遅延させた出力61と正および負の最大数発生回路
40の出力41及び42とフリップフロップ30の出力
31とを桁あふれ訂正回路50の入力とすれば、端子4
には桁あふれを訂正した出力データが得られる。以上述
べたように、従釆の桁あふれ検出回路及び桁あふれ訂正
回路には、SS1(スモール・サイズド・インチグレイ
テツド・サーキット)を用いられるためにICの個数も
多く、ハードウェア規模の増大を招く欠点がある。本発
明の目的は桁あふれ検出回路と桁あふれ訂正回路を一体
化しその構成を簡単にした桁あふれ検出及び訂正回路を
提供することにある。Also, when a positive overflow occurs, terminal 1 becomes “1” at the MSB, and when a negative overflow occurs, the MSB
At time B, the terminal 12 becomes "1". Therefore, in order to correct data that has caused an overflow, it is necessary to use the flip-flops 20 and 21 to hold information for one word length (one data) as to whether or not an overflow has occurred. Furthermore, the data after the addition is given to the shift register 6, and the output 61 delayed by one word length, the outputs 41 and 42 of the positive and negative maximum number generation circuit 40, and the output 31 of the flip-flop 30 are corrected for overflow. If it is the input of the circuit 50, the terminal 4
output data with overflow corrected is obtained. As mentioned above, the number of ICs is large because SS1 (small sized inch graded circuit) is used for the subordinate overflow detection circuit and overflow correction circuit, which increases the hardware scale. There are drawbacks that lead to An object of the present invention is to provide an overflow detection and correction circuit that integrates an overflow detection circuit and an overflow correction circuit and has a simplified configuration.
本発明の他の目的は回路規模の小さい桁あふれ検出及び
訂正回路を提供することにある。Another object of the present invention is to provide an overflow detection and correction circuit with a small circuit scale.
本発明の桁あふれ検出及び訂正回路は8入力2出力の読
出し専用メモリ(以下ROMと略称)と、第1および第
2の2個のフリップフロップと、2−1セレクタと、シ
フトレジスタとを備え、加算すべき2個の直列データ×
及びYと加算後の直列データZnと前記直列データZn
を1ビット遅らせた直列データZn−,と前記第1のフ
リツプフロップの出力OFn−,と前記第2のフリップ
フロップの出力sn−,と前記直列データ×,Yおよび
Znの符号ビット(以下MSBと略称)の位置を示すタ
イミングパルスと前記MSBより2ビットの位置を示す
タイミングパルスとを前記ROMの8入力とし、桁あふ
れを示すOFnと前記直列データZnが桁あふれを起こ
した時に前記データZnを訂正するための出力snを前
記ROMの2出力とし、前記桁あふれを示すOFnと前
記ROMの出力snをそれぞれ前記第1および第2のフ
リツプフロップの入力とし、前記第2のフリップフロツ
プの出力sn−,と前記直列データZnを1データ分遅
らせた直列データとを前記2一1セレクタの2個の入力
とし、前記第1のフリップフロツプの出力OFn一,を
前記2−1セレクタの選択信号入力とするように構成し
たことを特徴とする。The overflow detection and correction circuit of the present invention includes an 8-input and 2-output read-only memory (hereinafter referred to as ROM), two flip-flops, a first and second flip-flop, a 2-1 selector, and a shift register. , two serial data to be added ×
and Y, the serial data Zn after addition, and the serial data Zn
serial data Zn- delayed by 1 bit, the output OFn- of the first flip-flop, the output sn- of the second flip-flop, and the sign bit (hereinafter abbreviated as MSB) of the serial data ×, Y, and Zn. ) and a timing pulse indicating the position of 2 bits from the MSB are set as 8 inputs of the ROM, and OFn indicating an overflow and the data Zn are corrected when the serial data Zn causes an overflow. The output sn for the flip-flop is set as two outputs of the ROM, the OFn indicating the overflow and the output sn of the ROM are respectively input to the first and second flip-flops, and the outputs sn-, and Serial data obtained by delaying the serial data Zn by one data are used as two inputs of the 2-1 selector, and the output OFn of the first flip-flop is used as a selection signal input of the 2-1 selector. It is characterized by having been configured.
まず、本発明について説明する前に1語長のビット数と
桁あふれとの関係について簡単に述べる。First, before explaining the present invention, the relationship between the number of bits of one word length and overflow will be briefly described.
データ議長をMビットとし、小数点以下(M−2)ビッ
トとして考える。Let the data chair be M bits, and consider it as (M-2) bits below the decimal point.
この場合、表示可能なデータ×の値は−2S×<2とな
る。今、加算すべき2個のデータをX,Y、また、それ
らの和のデータをZとする。但し、Z=X+Yであり、
×,Y,Z共にMビットで表わすものとする。また、入
力データX,Yは一2SX<2,一2SY<2の範囲に
あるものとし、出力Zは−ISZ<1の条件を満たすも
のとする。従って、Zは−4ミZ<4となり、一ISZ
<1の条件を満たさないZは桁あふれを起こしたものと
見なされる。従って、桁あふれが生じる場合は、次の2
通りに限定される。第1には、Zが−2ミZ<−1,1
ミZ<2の範囲にある場合である。In this case, the value of the displayable data x is −2S×<2. Now, assume that the two data to be added are X and Y, and the data of their sum is Z. However, Z=X+Y,
It is assumed that ×, Y, and Z are all expressed in M bits. It is also assumed that the input data X and Y are in the range of -2SX<2, -2SY<2, and the output Z satisfies the condition -ISZ<1. Therefore, Z becomes -4miZ<4, and -ISZ
Z that does not satisfy the condition <1 is considered to have caused an overflow. Therefore, if overflow occurs, the following two steps should be taken.
limited to the street. First, Z is -2 mi Z<-1,1
This is a case where MiZ<2.
この時には、上位2ビットの一致、不一致を判定して桁
あふれを検出できる。また、その時の桁あふれを起さな
い真の符号はZのMSBに一致している。第2には、Z
が−4ミZ<−2,2ミZ<4の範囲にある場合である
。At this time, overflow can be detected by determining whether the upper two bits match or do not match. Further, the true code that does not cause overflow at that time matches the MSB of Z. Second, Z
is in the range of -4miZ<-2, 2miZ<4.
この時は、入力データX,Yが同符号の時にZが異符号
になっていることから桁あふれを検出できる。また、そ
の時の桁あふれを起さない真の符号は入力データXまた
はYのMSBに一致している。以上述べたように桁あふ
れは第1の場合と第2の場合とに限定されているから桁
あふれ検出及び桁あふれ訂正は上記2つの場合について
行なえばよいことになる。At this time, overflow can be detected since input data X and Y have the same sign and Z has a different sign. Further, the true code that does not cause overflow at that time matches the MSB of input data X or Y. As described above, overflow is limited to the first case and the second case, so overflow detection and overflow correction need only be performed for the above two cases.
次に図面を参照して本発明を詳細に説明する。Next, the present invention will be explained in detail with reference to the drawings.
第4図は本発明の一実施例を示すブロック図である。参
照数字2は256ワード×2ビットのROM、参照数字
1,3および4はフリップフロップ、参照数字5は2一
1セレク夕、参照数字6はシフトレジスタである。第4
図のROM2に書き込まれた内容を第1表、第2表及び
第3表に示す。FIG. 4 is a block diagram showing one embodiment of the present invention. Reference numeral 2 is a 256 word x 2 bit ROM, reference numerals 1, 3 and 4 are flip-flops, reference numeral 5 is a 2-1 selector, and reference numeral 6 is a shift register. Fourth
The contents written in the ROM 2 in the figure are shown in Tables 1, 2, and 3.
第1表
2表
第3表
第1表、第2表及び第3表において、記号OFh−,,
sn−.,Zn,Zn一,,×およびyは入力ビットを
示し、記号OFn,snは出力ビットを示す。Table 1 Table 2 Table 3 In Tables 1, 2 and 3, the symbols OFh-,,
sn-. , Zn, Zn-, , x and y indicate input bits, and symbols OFn, sn indicate output bits.
また記号0/1は“0”でも“1”でもよいことを示す
。第1表はMSBの位置を示すタイミングパルスが“1
”の時のROM2の内容を示したものである。Further, the symbol 0/1 indicates that it may be either "0" or "1". Table 1 shows that the timing pulse indicating the MSB position is “1”.
” shows the contents of ROM2 at the time of “.
出力ビットOFnは、“1”の時には桁あふれを生じた
ことを示し“0”の時には桁あふれを生じてないことを
示す。When the output bit OFn is "1", it indicates that an overflow has occurred, and when it is "0", it indicates that an overflow has not occurred.
例えば、Zn=“0”,Zn−,=“1”,x=“0”
及びy=“0”の時は和ZのMSBはZn=“0”であ
り、MSBより1ビット前のビットはZn,=“1”で
あるから上述の第1の場合の桁あふれと見なされて出力
ビットOFn=“1”となっている。For example, Zn="0", Zn-,="1", x="0"
And when y="0", the MSB of the sum Z is Zn="0", and the bit 1 bit before the MSB is Zn="1", so it can be considered as an overflow in the first case mentioned above. As a result, the output bit OFn becomes "1".
また、Zn=“0”,x=“1”及びy=“1”の時は
和ZのMSBはZn=“0”でありこの時の入力X,Y
のMSBはx=“1”及びy=“1”となっているから
上述の第2の場合の桁あふれと見なされて、出力ビット
OFn=“1”となっている。出力ビットsnは出力ビ
ットOFnが“1”の時のみ意味を持ち桁あふれを起こ
さない時の真の加算結果の符号と反対のものを出力する
。例えば、上の例ではZn=“0”,Zn−,一“1”
,x=“0”及びy=“0”の時桁あふれを起さない時
の真の加算結果は正であるからSn=“1”となる。ま
た、Zn=“0”,Zn一,=‘‘0”,x=“1”及
びy=“1”の時、桁あふれを起さない時の真の加算結
果は、負であるからsn=“0”となる。Also, when Zn="0", x="1" and y="1", the MSB of sum Z is Zn="0", and the inputs X, Y at this time
Since the MSB of is x=“1” and y=“1”, it is regarded as an overflow in the above-mentioned second case, and the output bit OFn becomes “1”. Output bit sn has meaning only when output bit OFn is "1" and outputs the opposite sign of the true addition result when overflow does not occur. For example, in the above example, Zn="0", Zn-, one "1"
, x=“0” and y=“0”, the true addition result when digit overflow does not occur is positive, so Sn=“1”. Also, when Zn = "0", Zn = ''0'', x = "1" and y = "1", the true addition result without overflow is negative, so sn = “0”.
出力ビットsnは桁あふれ訂正のために正しい加算結果
の符号に応じた最大数を発生するためのものである。The output bit sn is used to generate the maximum number according to the sign of the correct addition result for overflow correction.
第2表は、MSBの位置を示すタイミングパルス及びM
SBより2ビット前の位置を示すタイミングパルスが共
に“0”の時のROM2の内容を示したものである。Table 2 shows the timing pulses and M
This shows the contents of the ROM 2 when the timing pulses indicating the position 2 bits before SB are both "0".
入力ビットOFn‐,と出力ビットOFnとは全く同一
内容であり入力ビットsn−,と出力ビットsnを全く
同一内容である。第3表は、MSBより2ビット前の位
置を示すタイミングパルスが“1”の時のROM2の内
容を示したものである。入力ビットOFn−,と出力ビ
ットOFnとは全く同一内容であるが入力ビットsn−
,と出力ビットsnは逆の内容となっている。第1表、
第2表及び第3表の入力ビットZn,x及びyはそれぞ
れ第4図の入力端子300,400及び500‘こ現わ
れる。Input bit OFn- and output bit OFn have exactly the same content, and input bit sn- and output bit sn have exactly the same content. Table 3 shows the contents of the ROM 2 when the timing pulse indicating the position 2 bits before the MSB is "1". Input bit OFn- and output bit OFn have exactly the same content, but input bit sn-
, and output bit sn have opposite contents. Table 1,
The input bits Zn, x and y of Tables 2 and 3 appear at input terminals 300, 400 and 500' of FIG. 4, respectively.
また、入力ビットOFn−,,sn−,及びZn−,は
それぞれROM2の入力30,40及び1川こ対応して
いる。さらに第1表、第2表及び第3表の出力ビットO
Fn及びsnはそれぞれ第3図の出力21及び22に対
応している。第4図において、端子100及び200に
はそれぞれMSBの位置を示すタイミングパルスとが入
力される。Furthermore, input bits OFn-, , sn-, and Zn- correspond to inputs 30, 40, and 1 of the ROM 2, respectively. Furthermore, the output bit O of Tables 1, 2, and 3
Fn and sn correspond to outputs 21 and 22 in FIG. 3, respectively. In FIG. 4, timing pulses indicating the position of the MSB are input to terminals 100 and 200, respectively.
今、3個の直列データZ,×,YのMSBがそれぞれ端
子300,400および500に入力された時には、第
1表に従いROM2より読み出された出力ビットOFn
およびsnが出力21,22として生じる。Now, when the MSB of three serial data Z,
and sn are produced as outputs 21, 22.
出力ビットOFnおよびsnに対応するROM2の出力
21および22は、それぞれフリップフロップ3および
4により1ビット遅延された後帰還されてROM2の入
力30(OFn−,)および40(sn−,)となる。
MSBより2ビット前の位置を示すタイミングパルスが
“1’’になるまでROM2は、第2表に従い出力ビッ
トOFnおよびsnを読み出す。Outputs 21 and 22 of ROM2 corresponding to output bits OFn and sn are delayed by 1 bit by flip-flops 3 and 4, respectively, and then fed back to become inputs 30 (OFn-,) and 40 (sn-,) of ROM2. .
The ROM 2 reads output bits OFn and sn according to Table 2 until the timing pulse indicating the position 2 bits before the MSB becomes "1".
次に、MSBより2ビット前の位置を示すタイミングパ
ルスが“1”の時にはROM2は第3表に従い出力ビッ
トOFn及びsnを読み出す。最後に、MSBより1ビ
ット前の時点では、ROM2は第2表に従い出力ビット
OFn及びsnを読み出す。ROM2の読出し操作は、
以上述べた動作を繰り返す。Next, when the timing pulse indicating the position 2 bits before the MSB is "1", the ROM 2 reads out the output bits OFn and sn according to Table 3. Finally, at a point one bit before the MSB, the ROM 2 reads output bits OFn and sn according to Table 2. The read operation of ROM2 is
Repeat the operations described above.
また、第4図の2−1セレク夕5は、フリツプフロツプ
3の出力OFnが“1”の時には、入力40を選択し、
“0”の時には入力60を選択する。参照数字6は1語
長(Mビット)のシフトレジス夕を示す。第5図は第4
図のブロックの動作を説明するためのタイミングチャー
トであり、参照英字aはMSBの位置を示すタイミング
パルス、参照英字bは加算すべき2つの入力×およびY
とそれらの和Zのおのおの1語長のタイミング位相とM
SBの位置とを代表的に示したものである。Further, the 2-1 selector 5 in FIG. 4 selects the input 40 when the output OFn of the flip-flop 3 is "1".
When it is "0", input 60 is selected. Reference numeral 6 indicates a shift register of one word length (M bits). Figure 5 is the 4th
This is a timing chart for explaining the operation of the block in the figure, where the reference letter a is a timing pulse indicating the position of the MSB, and the reference letter b is the two inputs × and Y to be added.
and the timing phase of each one word length of their sum Z and M
The position of SB is representatively shown.
但し、sはXおよびYでは符号ビット(MSB)とみな
されるが、Zでは不明である。また、sはsを反転した
ものである。参照英字cおよびdは第4図のROM2の
出力ビットSnに対応する出力22とフリツプフロツプ
4の出力40(Sn一,)とをそれぞれ示している。参
照数字eはMSBより2ビット前の位置を示すタイミン
グパルスを示している。参照数字fおよびgは第4図の
ROM2の出力ビットOFnに対応する出力21とフリ
ツブフロツプ3の出力30(OFn−,)とをそれぞれ
示している。従って、参照英字gのOFn−,を第4図
に示したように2一1セレクタ5の選択信号入力とする
ことにより参照数字bに示すタイミング位相にある前記
和Z又は参照英字dのsn−,のどちらかが選択されて
第4図の端子5川こ出力される。However, s is considered a sign bit (MSB) in X and Y, but is unknown in Z. Moreover, s is the inversion of s. Reference letters c and d designate the output 22 corresponding to the output bit Sn of the ROM 2 in FIG. 4 and the output 40 (Sn-) of the flip-flop 4, respectively. Reference numeral e indicates a timing pulse indicating a position two bits before the MSB. Reference numerals f and g designate the output 21 corresponding to the output bit OFn of the ROM 2 in FIG. 4 and the output 30 (OFn-,) of the flip-flop 3, respectively. Therefore, by making OFn-, of the reference alphabetic character g, the selection signal input of the 2-1 selector 5 as shown in FIG. , is selected and output from terminal 5 in FIG.
次に本発明の動作を具体例を挙げて説明する。データ語
長Viを5ビットとし、次のような加算を考える。但し
、瓜Bは最小重みビットを表わす。Next, the operation of the present invention will be explained using a specific example. Let the data word length Vi be 5 bits, and consider the following addition. However, B represents the least weighted bit.
上式において、カッコ内は左記の2進符号を10進数で
表わしたものである。In the above formula, the binary code shown on the left is expressed in decimal notation in parentheses.
上記の演算において、加算結果Zを6ビットで表わせば
、011,010(十3.25)となり真の加算結果が
得られるが、入力×,Yと同様にZも5ビットで表示す
るために11.010(一0.750)と見なされてし
まう。即ち桁あふれが生じる。本発明を用いて上式を演
算すれば、次のようになる。In the above calculation, if the addition result Z is expressed in 6 bits, it becomes 011,010 (13.25), which is the true addition result, but in order to express Z in 5 bits like the inputs x and Y, It will be considered as 11.010 (-0.750). In other words, overflow occurs. If the above equation is calculated using the present invention, the following will be obtained.
山BからMSBまでの5ビットに対応したビットをクロ
ツク0,1,2,3および4と名づける。クロック4の
時点において、桁あふれを起こしたか否かが検出なれる
。この時、Zn=“1”,Zn−.=“1”,x=“0
”及びy=“0”がそれぞれ第4図のROM2の入力端
子A,B,CおよびDに入力され、第1表に従いOFn
=“1”およびsn=‘‘1”がそれぞれROM2の出
力21および22として与えられる。次に、クロツク0
の時点ではOFn−,−“1”,sn−,=“1”が入
力され、第2表に従いOFn=“1”,sn=“1”が
出力される。The bits corresponding to the five bits from peak B to MSB are named clocks 0, 1, 2, 3, and 4. At clock 4, it is possible to detect whether overflow has occurred. At this time, Zn="1", Zn-. = “1”, x = “0
” and y=“0” are respectively input to the input terminals A, B, C and D of ROM2 in FIG. 4, and OFn is input according to Table 1.
="1" and sn="1" are given as outputs 21 and 22 of ROM2, respectively.Next, clock 0
At the time point, OFn-, -"1", sn-,="1" are input, and OFn="1", sn="1" are output according to Table 2.
クロック1の時点では、同機にOFn−,=‘‘1”,
sn,=“1”が入力され第2表に従いOFn=“1”
,sn=“1”が出力される。クロツク2の時点ではM
SBよりも2ビット前であるからOFn,,sn−,が
入力され、第3表に従いOFn=“1”,sn−,=“
0”が出力される。従って、第5図のタイミングチャー
トにも示したように、クロツク4からクロツク3までO
Fn=“1”となるからクロツク0からクロツク4まで
OFn一,=“1”となり、第4図の2一1セレクタ5
でフリップフロッブ4の出力40を選択することになる
。また、フリツプフロツプ4の出力40は、sn−,に
対応しているから“1”,“1”,“1”,“0”,“
0”の順で出力されることになる。従つて入力データZ
の値は00.111(十0.875)と訂正され出力5
0となる。但し、出力されたデー外ま入力データZに比
べて5ビット(Mビット)遅延されて出力される。以上
述べたように、本発明によれば、ROMとフリツプフロ
ツプと2−1セレクタとシフトレジスタとを用いて回路
が簡単でハードウェアの規模の小さな桁あふれ検出及び
訂正回路が提供できる。At clock 1, the aircraft has OFn-,=''1'',
sn,="1" is input and OFn="1" according to Table 2
, sn="1" is output. M at the time of Clock 2
Since it is 2 bits before SB, OFn,,sn-, is input, and according to Table 3, OFn="1", sn-,="
0" is output. Therefore, as shown in the timing chart of FIG.
Since Fn=“1”, OFn=“1” from clock 0 to clock 4, and selector 5 of 2-1 in FIG.
The output 40 of the flip-flop 4 will be selected. Furthermore, since the output 40 of the flip-flop 4 corresponds to sn-, "1", "1", "1", "0", "
0". Therefore, the input data Z
The value of is corrected to 00.111 (100.875) and output 5
It becomes 0. However, the output data is delayed by 5 bits (M bits) compared to the input data Z. As described above, according to the present invention, it is possible to provide an overflow detection and correction circuit with a simple circuit and small hardware scale using a ROM, a flip-flop, a 2-1 selector, and a shift register.
第1図は従来の桁あふれ検出回路の一例を示す図、第2
図は従来の桁あふれ訂正回路の一例を示す図、第3図は
第1図及び第2図の回路を組合わせた従来の桁あふれ検
出及び訂正回路のブロック図、第4図は、本発明の一実
施例を示すブロック図および第5図a〜gは第4図の回
路の動作を説明するための図である。
第4図において、1,3,4……フリツプフロツプ、2
・・・・・・ROM、5・・・…2一1セレクタ、6”
“”シフトレジスタ。
猪′図
髪ぞ図
努J図
髪4図
髪5図Figure 1 shows an example of a conventional overflow detection circuit; Figure 2 shows an example of a conventional overflow detection circuit;
The figure shows an example of a conventional overflow correction circuit, FIG. 3 is a block diagram of a conventional overflow detection and correction circuit that combines the circuits of FIGS. 1 and 2, and FIG. 4 shows the present invention. A block diagram showing one embodiment of the present invention and FIGS. 5a to 5g are diagrams for explaining the operation of the circuit shown in FIG. 4. In Fig. 4, 1, 3, 4... flip-flop, 2
...ROM, 5...2-1 selector, 6"
“” shift register. Ino'zu hair zozu Tsutomu J figure hair 4 figure hair 5 figure
Claims (1)
列データZnと前記直列データZnを1ビツト遅延させ
た直列データZn−_1と第1のフリツプフロツプの出
力OFn−_1と第2のフリツプフロツプの出力sn−
_1と前記直列データX,YおよびZの極性表示ビツト
の位置を示す第1のタイミングパルスと前記極性表示ビ
ツトより2ビツト前の位置を示す第2のタイミングパル
スとを入力とし前記直列データZnの桁あふれを示す出
力OFhと前記直列データZnが起あふれを起した時に
前記データZnを訂正するための出力snとを生じる読
出し専用メモリと、前記メモリの出力OFnを入力とす
る前記第1のフリツプフロツプと、前記メモリの出力s
nを入力とする前記第2のフリツプフロツプと、前記第
1のフリツプフロツプの出力OFn−_1を選択信号と
し前記第2のフリツプフロツプの出力sn−_1と前記
直列データZnを1データ分遅延させた直列データとを
2個の入力としそれらの入力のいずれかを選択する2−
1セレクタとから構成されたことを特徴とする桁あふれ
検出及び訂正回路。1 Two serial data X and Y to be added, serial data Zn after addition, serial data Zn-_1 obtained by delaying the serial data Zn by 1 bit, output OFn-_1 of the first flip-flop, and output OFn-_1 of the second flip-flop. The output sn-
_1, a first timing pulse indicating the position of the polarity display bit of the serial data X, Y, and Z, and a second timing pulse indicating the position 2 bits before the polarity display bit are input, a read-only memory that generates an output OFh indicating an overflow and an output sn for correcting the data Zn when the serial data Zn causes an overflow; and the first flip-flop which receives the output OFn of the memory. and the output s of the memory
The second flip-flop inputs n, and the output OFn-_1 of the first flip-flop is used as a selection signal, and the output sn-_1 of the second flip-flop and the serial data Zn are delayed by one data. and is two inputs and selects one of those inputs 2-
An overflow detection and correction circuit comprising: 1 selector.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP52114845A JPS607816B2 (en) | 1977-09-22 | 1977-09-22 | Overflow detection and correction circuit |
| US05/943,836 US4215415A (en) | 1977-09-19 | 1978-09-19 | Recursive digital filter comprising a circuit responsive to first sum and feedback sign bits and second sum sign and integer bits for detecting overflow in the second sum |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP52114845A JPS607816B2 (en) | 1977-09-22 | 1977-09-22 | Overflow detection and correction circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS5448136A JPS5448136A (en) | 1979-04-16 |
| JPS607816B2 true JPS607816B2 (en) | 1985-02-27 |
Family
ID=14648136
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP52114845A Expired JPS607816B2 (en) | 1977-09-19 | 1977-09-22 | Overflow detection and correction circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS607816B2 (en) |
-
1977
- 1977-09-22 JP JP52114845A patent/JPS607816B2/en not_active Expired
Also Published As
| Publication number | Publication date |
|---|---|
| JPS5448136A (en) | 1979-04-16 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3714570B2 (en) | Division circuit for parallel processing | |
| JPS607816B2 (en) | Overflow detection and correction circuit | |
| JPH02292632A (en) | Multiplier circuit | |
| JP2766133B2 (en) | Parallel-serial data conversion circuit | |
| JPS607815B2 (en) | Overflow detection and correction circuit | |
| JPS63108566A (en) | Digital muting circuit | |
| JP4200682B2 (en) | Image forming apparatus | |
| JP2558739B2 (en) | Absolute value circuit | |
| JP3238439B2 (en) | Synchronous counter | |
| JP2513021B2 (en) | Signed digit number sign judgment circuit | |
| JPS5866445A (en) | signal matching circuit | |
| JP2591164B2 (en) | Parity operation circuit | |
| JP2757714B2 (en) | Frame pulse generation circuit | |
| JP2589884B2 (en) | Bit search circuit | |
| JPH0621820A (en) | Sign magnitude outputting device | |
| JP2536489B2 (en) | Compressed data decoding device | |
| JP2914813B2 (en) | Error correction decoding device | |
| JPS6015967B2 (en) | 3-input series full adder capable of detecting overflow | |
| JPH039661B2 (en) | ||
| JP2001034457A (en) | Addition / subtraction circuit | |
| SU842798A1 (en) | Adding and subtracting device | |
| CN114895868A (en) | Division operation unit and divider based on two-digit quotient calculation | |
| JPS60182830A (en) | data processing equipment | |
| JPS62154134A (en) | Data converter | |
| JPS5925416A (en) | Waiting circuit |