JP2004234110A - Parity prediction circuit for full adder - Google Patents

Parity prediction circuit for full adder Download PDF

Info

Publication number
JP2004234110A
JP2004234110A JP2003019036A JP2003019036A JP2004234110A JP 2004234110 A JP2004234110 A JP 2004234110A JP 2003019036 A JP2003019036 A JP 2003019036A JP 2003019036 A JP2003019036 A JP 2003019036A JP 2004234110 A JP2004234110 A JP 2004234110A
Authority
JP
Japan
Prior art keywords
parity
carry
bit
selector
circuit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003019036A
Other languages
Japanese (ja)
Other versions
JP4230234B2 (en
Inventor
Atsushi Ike
敦 池
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 JP2003019036A priority Critical patent/JP4230234B2/en
Publication of JP2004234110A publication Critical patent/JP2004234110A/en
Application granted granted Critical
Publication of JP4230234B2 publication Critical patent/JP4230234B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To construct a parity prediction circuit of a full adder from a small number of inputs and a small number of elements. <P>SOLUTION: The parity prediction circuit has computing units, each with a first selector which receives the inputs of carry four parity CP [k-1, 0] and CP [k-1, 1] when carry-in Cin=0 and 1 (k is an integer of not more than n) and which outputs either the input CP [k-1, 0] or CP [k-1, 1] as a carry four parity cp [k, 0] according to a generation bit g[k-2] resulting from addition inputs A[k-2] and B[k-2], and a second selector which receives the inputs of the carry four parity CP [k-1, 0] and CP [k-1, 1] and which outputs either the input CP [k-1, 0] or CP [k-1, 1] as an inverted signal of the carry four parity cp [k, 1] according to a propagation bit p [k-2] resulting from the addition inputs A[k-2] and B[k-2]. The computing units are interconnected in a plurality of rows, and either the carry four parity cp [n, 0] or cp [n, 1] is output as a carry four parity CPn according to the carry in Cin at the final selector. <P>COPYRIGHT: (C)2004,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、全加算器に併設されるパリティ予測回路に関し、特に、入力数や素子数を減らした新規なパリティ予測回路に関する。
【0002】
【従来の技術】
半導体集積回路の様々な箇所に全加算器が内蔵される。全加算器は、所定ビット(所定桁)の入力A、Bと下位からのキャリインCinとから、加算値SとキャリアウトCoutを生成する。最も一般的な全加算器は、1つのブロックが4ビットの入力A[0:3]、B[0:3]と1ビットのキャリインCinとから、4ビットの加算値S[0:3]と1ビットのキャリアウトCoutを生成する。本明細書では、説明の都合上、nビットの値に対して最上位ビット(MSB)を第0ビット(または第0桁)、最下位ビット(LSB)を第n−1ビット(または第n−1桁)とする。
【0003】
更に、例えば、所定のメモリから読み出されたデータA[0:3]、B[0:3]が、所定の伝送路を伝播して全加算器に入力され、加算結果が更に別の伝送路に出力されるなど、入力データが所定の伝送路を伝播し、出力データも別の伝送路を伝播する場合は、入力データにパリティビットが付加される。そして、これらのパリティビットが持つ伝播中のビット反転の有無という情報を、加算出力のパリティビットにもそのまま持たせるために、全加算回路に加えて、パリティ予測回路が設けられる。パリティ予測回路は、2つの入力データのパリティビットと加算演算での各桁でのキャリーとの排他的論理和を求めることにより、予測されたパリティビットを生成する。
【0004】
全加算器やパリティ予測回路では、入力データA[0:3]、B[0:3]から求められるジェネレーション(generation)gと、プロパゲーション(propagation)pと、ハーフサム(halfsome)hとが前段で生成され、それらg、p、hから加算値S[0:3]や予測パリティビットS[P]を生成する論理回路が構成される。
【0005】
尚、パリティ付きデータ演算回路が、以下の特許文献1に記載されている。
【0006】
【特許文献1】
特開平4−288629号公報
【0007】
【発明が解決しようとする課題】
しかしながら、予測パリティビットを生成するパリティ予測回路は、理論的に求められる予測パリティビットの演算式をそのままNANDやNORの論理ゲートに置き換えた構成を取るため、入力数が多くなり、論理ゲート数も多くなり、回路が大規模化する傾向にある。特に、入力データの桁数が増えると、その回路規模は指数関数的に増大することになり、高集積化の弊害になっている。
【0008】
そこで、本発明の目的は、少ない回路規模で予測パリティビットを生成するパリティビット予測回路を提供することにある。
【0009】
【課題を解決するための手段】
上記の目的を達成するために、本発明の一つの側面によれば、nビット幅の全加算器に含まれるパリティ予測回路のキャリーフォーパリティCPnを求める回路が、制御信号に応じていずれか一方の入力を選択する複数のセレクタで構成される。
【0010】
今、nビット幅の全加算器が、加算入力A[0:n−1,P]とB[0:n−1,P]と下位からのキャリーインCinとから、加算値S[0:n−1,P]を求めるとすると、その論理式は、
S[0:n−1,P]=A[0:n−1,P]+B[0:n−1,P]+Cin
となる。この場合の予測パリティS[P]を求める論理式は、
S[P]=A[P]vB[P]vCPn
CPn=c[0]vc[1]v...vc[n−1]
但し、A[P]、B[P]は入力A,Bのパリティビット、c[i]は第iビットの下位ビットからのキャリーイン、CPnはキャリーフォーパリティ、vは排他的論理和である。そして、前提としてキャリーフォーパリティCPnは、
CPn=Cin<cp[n,1], cp[n,0]>
で表されるものとする。但し、S<X,Y>は、(S・X)|(〜S・Y)を示すものとし、入力X,Yに対して、S=1の時はXを、S=0の時はYを出力するセレクタに対応する。また、cp[n,1]はキャリーインCin=1の時のnビットに対するキャリーフォーパリティCPnを、cp[n,0]はキャリーインCin=0の時のnビットに対するキャリーフォーパリティCPnをそれぞれ示すものとする。つまり、cp[n,1]、cp[n,0]のnはビット数を示す。
【0011】
以上の前提で、演算すると、次の演算式が求められる。
【0012】
cp[n,0] = (g[n−1]<cp[n−1,1], cp[n−1,0]>)
cp[n,1] = 〜(p[n−1]<cp[n−1,1], cp[n−1,0]>)
cp[n−1,0] = (g[n−2]<cp[n−2,1], cp[n−2,0]>)
cp[n−1,1] = 〜(p[n−2]<cp[n−2,1], cp[n−2,0]>)
........
cp[4,0] = (g[3]<cp[3,1], cp[3,0]>)
cp[4,1] = 〜(p[3]<cp[3,1], cp[3,0]>)
cp[3,0] = (g[2]<cp[2,1], cp[2,0]>)
cp[3,1] = 〜(p[2]<cp[2,1], cp[2,0]>)
cp[2,0] = (g[1]<cp[1,1], cp[1,0]>) = g[1]
cp[2,1] = 〜(p[1]<cp[1,1], cp[1,0]>) = 〜p[1]
cp[1,0] = 0(= Cin)
cp[1,1] = 1(= Cin)
そこで、上記の演算式に従えば、本発明のパリティ予測回路は、キャリーインCin=0及び1の場合のキャリーフォーパリティCP[k−1,0]及びCP[k−1,1]を入力とし(但しkはn以下の整数)、加算入力A[k−1]とB[k−1]とのジェネレーションビットg[k−1]に応じて、前記入力CP[k−1,0]またはCP[k−1,1]のいずれかをキャリーフォーパリティcp[k,0]として出力する第1のセレクタと、前記キャリーフォーパリティCP[k−1,0]及びCP[k−1,1]を入力とし、前記加算入力A[k−1]とB[k−1]とのプロパゲーションビットp[k−1]に応じて、前記入力CP[k−1,0]またはCP[k−1,1]のいずれかをキャリーフォーパリティcp[k,1]の反転信号として出力する第2のセレクタとを有する演算ユニットを有し、
当該演算ユニットが複数段、縦列に接続され、
最終段に、キャリーインCinに応じて、キャリーフォーパリティcp[n,0]またはcp[n,1]のいずれかをキャリーフォーパリティCPnとして出力する最終段セレクタを更に有することを特徴とするパリティ予測回路である。
【0013】
上記のパリティ予測回路によれば、2個のセレクタを有する演算ユニットを縦列に接続することで構成されるので、少ない素子数で構成することが可能になる。
【0014】
【発明の実施の形態】
以下、図面を参照して本発明の実施の形態例を説明する。しかしながら、本発明の保護範囲は、以下の実施の形態例に限定されるものではなく、特許請求の範囲に記載された発明とその均等物にまで及ぶものである。
【0015】
図1は、本実施の形態に適用される全加算器とパリティ予測回路とを示す図である。この例では、パリティビット付きの4ビットの入力A[0:3,P]、B[0:3,P]と、下位からのキャリインCinとから、予測パリティビット付きの4ビットの加算値S[0:3,P]とキャリアウトCoutとが生成される。即ち、この全加算器の演算式は、
S[0:3,P] = A[0:3,P] + B[0:3,P] + Cin
である。
【0016】
前述したとおり、前提として、4ビットのデータの最下位ビット(LSB)は「3」、最上位ビット(MSB)は「0」で表される。従って、n+1ビットのデータの場合は、最下位ビットが「n」で、最上位ビットが「0」で表される。また、本明細書では、反転記号として「〜」を利用する。
【0017】
前段階として、4ビットの入力A[0:3]、B[0:3]の各ビットに対して、それぞれプロパゲーションp[0:3]と、ジェネレーションg[0:3]と、ハーフサムh[0:3]とが、それぞれプロパゲーション生成回路P、ジェネレーション生成回路G、ハーフサム生成回路Hとで生成される。ここで、プロパゲーションp[0:3]と、ジェネレーションg[0:3]と、ハーフサムh[0:3]とは、次の論理式により求められる。
【0018】
p[0:3] = A[0:3] | B[0:3] (|は論理和(OR))
g[0:3] = A[0:3] ・ B[0:3] (・は論理積(AND))
h[0:3] = A[0:3] v B[0:3] (vは排他的論理和(EOR))
即ち、プロパゲーションpは、入力A,Bのいずれかが「1」の時に「1」になり、両方とも「0」の時に「0」になる。つまり、プロパゲーションpとは、下位ビットからのキャリー(桁上げ)が発生したときは、その桁上げを上位ビットに伝播するか(p=1)、伝播しないか(p=0)を示すビットである。例えば、n番目のビットのデータA[n],B[n]のプロパゲーションp[n]が「1」の場合は、下位のn+1ビットからキャリーがあれば、上位のn−1ビットにキャリーが発生するが、プロパゲーションp[n]が「0」の場合は、下位のn+1ビットからキャリーが発生しても、上位のn−1ビットにはキャリーは発生しない。
【0019】
ジェネレーションgは、入力A,Bの両方が「1」の時に「1」になり、いずれかが「0」の時に「0」になる。つまり、ジェネレーションgとは、下位ビットからのキャリーが発生しなくても、その桁で上位ビットへのキャリーを発生するか(g=1)、発生しないか(g=0)を示すビットである。例えば、n番目のビットのデータA[n],B[n]のジェネレーションg[n]が「1」の場合は、下位のn+1ビットからキャリーなくても、上位のn−1ビットにキャリーが発生するが、ジェネレーションg[n]が「0」の場合は、下位のn+1ビットからキャリーがなければ、上位のn−1ビットにはキャリーは発生しない。
【0020】
また、ハーフサムhは、入力A,Bが異なる時に「1」となり、同じ時に「0」になる。つまり、ハーフサムhとは、入力A,Bの加算結果を示すビットである。例えば、n番目のビットにおいて、A[n]とB[n]とが1,0または0,1の時は、ハーフサムh[n]は「1」になり、A[n]とB[n]とが0,0または1,1の時は、ハーフサムh[n]は「0」になる。
【0021】
従って、加算値生成回路10は、次の演算式による排他的論理和回路で構成されて、加算値S[0:3]を生成する。
【0022】
S[0] = h[0] v c[0]
S[1] = h[1] v c[1]
S[2] = h[2] v c[2]
S[3] = h[3] v c[3]
ここで、c[0],c[1],c[2],c[3]は、各ビットへのキャリーイン(桁上げ)のビットであり、これらのキャリービットcは、キャリー生成回路16で生成される。キャリー生成回路16は、次の演算式による論理回路で構成される。
【0023】

Figure 2004234110
即ち、最下位ビット(第3ビット)へのキャリーインc[3]は、下位からのキャリインCinである(式(1))。また、次の第2ビットへのキャリーインc[2]は、最下位ビットのジェネレーションg[3]がg[3]=1か、プロパゲーションp[3]がp[3]=1で且つキャリーインCinがCin=1の時に発生する(式(2))。更に、第1ビットへのキャリーインc[1]は、第2ビットのジェネレーションg[2]がg[2]=1か、プロパゲーションp[2]がp[2]=1でありかつ第2ビットへのキャリーインc[2]がc[2]=1の時に発生する(式(3))。この式(3)に式(2)を代入すると、上記式(4)が求められる。
【0024】
同様に、第0ビット(最上位ビット)へのキャリーインc[0]は、第1ビットのジェネレーションg[1]がg[1]=1か、プロパゲーションp[1]がp[1]=1でありかつ第1ビットへのキャリーインc[1]がc[1]=1の時に発生する(式(5))。この式(5)に式(4)を代入すると、上記式(6)が求められる。
【0025】
上記から理解されるとおり、キャリーインの一般式は、次の通りである。
【0026】
c[n]=g[n+1] | (p[n+1] ・ c[n+1]))
従って、キャリーアウト生成回路12は、次の演算式の論理回路で構成される。
【0027】
Cout=g[0] | (p[0] ・ c[0]))
さて、加算値とキャリーアウトを求める回路と共に、入力データA,Bのパリティビットから予測パリティビットを求める回路が設けられる。この回路は、CP(Carry for Parity)生成回路18と、予測パリティ生成回路14とからなる。入力データA,BのパリティビットA[P]、B[P]の不良の有無を示す情報をそのまま加算値SのパリティビットS[P]にも伝播させる予測パリティビットS[P]は、次の演算式で求められることが知られている。
【0028】
S[P] = A[P] v B[P] v CP4 (7)
ここで、CP4は、各ビット(各桁)での桁上げによるパリティビットへの影響を示すビットであり、キャリーフォーパリティ(パリティビットのキャリー)と称される。このキャリーフォーパリティCP4は、各ビット(各桁)へのキャリーインc[0],c[1],c[2],c[3]が何回発生したかを示すビットであり、次の一般的に知られた演算式により求められる。
【0029】
CP4 = c[0] v c[1] v c[2] v c[3] (8)
つまり、排他的論理和vは、「1」の時反転し、「0」の時反転しないことと等価であるので、結局、キャリフォーパリティCP4は、各桁へのキャリーインの回数が奇数(CP4=0)か偶数(CP4=1)かを示すビットデータである。
【0030】
上記式(8)に上記式(1)(2)(4)(6)をそれぞれ代入して展開すると、次の通りである。
【0031】
CP4 = [(g[1] ・ 〜g[2] ・ 〜g[3]) | (〜p[1] ・ g[2] ・ 〜g[3]) |
(〜g[1] ・ 〜p[2] ・ g[3]) | (p[1] ・ p[2] ・ g[3])] : if Cin = 0
[(〜g[1] ・ 〜g[2] ・ 〜p[3]) | (p[1] ・ g[2] ・ 〜p[3]) |
(g[1] ・ 〜p[2] ・ p[3]) | (〜p[1] ・ p[2] ・ p[3])] : if Cin = 1 (9)
この演算式(9)は、キャリーインCinが「0」の場合と「1」の場合とに区分して構成されているが、それぞれの演算式は、前段階で生成されるジェネレーションgとプロパゲーションpの反転、非反転ビットを入力とする論理回路で構成可能である。この演算式は、一般的に知られている。
【0032】
図2は、キャリーフォーパリティ生成回路18の論理回路図である。この論理回路図は、演算式(9)をそのまま論理回路に展開している。即ち、NANDゲート20〜23とそれらの出力のNANDゲート24とで、AND回路とOR回路とが生成され、演算式(9)のCin=0の場合の項が演算される。また、NANDゲート25〜28とそれらの出力のNANDゲート29とで、AND回路とOR回路とが生成され、演算式(9)のCin=1の場合の項が演算される。そして、セレクタ30が、ゲート24,29の出力を、Cin=1の時とCin=0の時とに応じて、選択する。
【0033】
図2のキャリーフォーパリティ生成回路18は、演算式(9)をそのまま論理回路に展開した構成になっている。この生成回路18は、3入力のゲート20〜23、25〜28を8個、4入力のゲート24,29を2個、そして、セレクタ30を有する。3入力のNANDゲートは、CMOS回路で構成されると6トランジスタを必要とする。また、4入力のNANDゲートは、CMOS回路で構成されると8トランジスタを必要とする。従って、図2の回路では、NANDゲートだけで64個のトランジスタを必要とし、セレクタ30が4トランジスタで構成されるとすると、全部で68個のトランジスタを必要とする。これが6ビット、8ビットと入力データのビット数が大きくなると、そのトランジスタの個数は指数関数的に増大することになり、高集積化を阻害する要因になる。
【0034】
そこで、本発明者は、パストランジスタ回路のみによるキャリーフォーパリティ生成回路を新たに発明した。パストランジスタとは、逆相のコントロールビットに応じて、2つの入力の一方を選択するセレクタであり、CMOS回路で構成すると、逆相のコントロールビットが使用可能状態であれば、4個のトランジスタで実現できる。
【0035】
図3は、CMOS回路で構成されたパストランジスタの回路図の一例を示す図である。パストランジスタ回路は、一種のセレクタであり、制御信号Sが「1」の時に入力Aを出力Xとして選択し、制御信号Sが「0」の時に入力Bを出力Xとして選択する。第1のトランスファーゲートを構成するNチャネルトランジスタN1とPチャネルトランジスタP1は、制御信号SがHレベル(S=1)の時に入力Aを通過させる。また、第2のトランスファーゲートを構成するNチャネルトランジスタN2とPチャネルトランジスタP2は、制御信号SがLレベル(S=0)の時に入力Bを通過させる。そこで、このようなパストランジスタ回路で構成されるセレクタSELを、図3に示されるように表記することにする。
【0036】
そして、出力Xの演算式として、次のような表記を採用することにする。
【0037】
X=(S・A)|(〜S・B)=S<A,B> (10)
この演算式は、Xが、S=1のときにA、S=0のときにBであることを示す。
この演算式は、入力A,B、制御信号Sからなるセレクタに対応する。
【0038】
そこで、キャリーフォーパリティCPを求める演算式を、上記の演算式(10)を利用して表記することで、図3のパストランジスタ回路によるセレクタを利用してキャリーフォーパリティ発生回路18を構成することができる。
【0039】
更に新たな表記方法として、nビットに対するキャリーフォーパリティCPnを、下位からのキャリインCin=0or1に対して、cp[n,0]、cp[n,1]と表すことにする。こうすることにより、次のように式(10)の形式で表すことができる。
【0040】
CPn=Cin<cp[n,1],cp[n,0]> (11)
この式は、前述の式10と同等であり、図3のパストランジスタ回路により実現可能である。
【0041】
図4は、キャリーフォーパリティを説明する図である。図4を参照しながら、1ビット〜4ビット及びnビットに対するキャリーフォーパリティCP1〜CP4、CP4について説明すると共に、その再帰性について説明する。nビットに対しては、最上位を第0ビット、最下位を第n−1ビットとしたことに伴い、図4では、ビット数が増加するたびに第1ビット、第2ビット、第3ビット...第n−1ビットと最下位ビットが付加されるように表記される。このように表記することで、キャリーフォーパリティの再帰性の説明が容易になる。
【0042】
図4(1)は1ビット(1桁)の場合であり、1ビットの場合は、前述の式8に示したとおり、キャリーフォーパリティCP1は、下位からのキャリーCinがあるかないかによって決まる。つまり、CP1=c[0]=Cinであるので、結局、1桁の場合のキャリーフォーパリティCP1は、次の式群(12)の通りである。
【0043】
CP1=Cin<cp[1,1],cp[1,0]>=Cin<1,0>
cp[1,0] =0
cp[1,1] =1 (12)
図4(2)は2ビット(2桁)の場合である。2ビットの場合は、1ビットの第0桁に対してキャリーが発生するか否かと考えることにより、2ビットのキャリーフォーパリティCP2を1ビットのキャリーフォーパリティCP1のcp[1,1],cp[1,0]を利用して表現することができる。つまり、キャリーインCin=0の場合は、最下位の第1ビットにキャリー(桁上げ)が発生するか否かを示すジェネレーションg[1]が、上位の1ビット(第0ビット)に対するキャリーインCinに対応するので、
cp[2,0]=g[1]<cp[1,1],cp[1,0]>
更に、キャリーインCin=1の場合は、そのキャリーインによる最下位の第1ビットでの反転と、最下位の第1ビットのプロパゲーションp[1]が、上位の1ビット(第0ビット)に対するキャリーインCinに対応することとを考慮すると、
cp[2,1]=〜p[1] <cp[1,1],cp[1,0]>
となる。
【0044】
以上をまとめると、2桁の場合のキャリーフォーパリティCP2は、以下の式群(13)の通りである。
【0045】
CP2=Cin<cp[2,1],cp[2,0]>
cp[2,0]=g[1]<cp[1,1],cp[1,0]>=g[1]
cp[2,1]=〜(p[1]<cp[1,1],cp[1,0]>)=〜p[1] (13)
図4(3)は3ビット(3桁)の場合である。3ビットの場合は、2ビットの第0、1桁に対してキャリーが発生するか否かと考えることにより、3ビットのキャリーフォーパリティCP3を2ビットのキャリーフォーパリティCP2のcp[2,1],cp[2,0]を利用して表現することができる。つまり、キャリーインCin=0の場合は、最下位の第2ビットにキャリー(桁上げ)が発生するか否かを示すジェネレーションg[2]が、上位の2ビット(第0、1ビット)に対するキャリーインCinに対応するので、
cp[3,0]=g[2]<cp[2,1],cp[2,0]>
更に、キャリーインCin=1の場合は、そのキャリーインによる最下位の第2ビットでの反転と、最下位の第2ビットのプロパゲーションp[2]が、上位の2ビット(第0、1ビット)に対するキャリーインCinに対応することを考慮すると、
cp[3,1]=〜p[2] <cp[2,1],cp[2,0]>
となる。
【0046】
従って、3桁の場合のキャリーフォーパリティCP3は、以下の式群(14)の通りである。
【0047】
Figure 2004234110
図4(4)は4ビット(4桁)の場合である。4ビットの場合は、2ビットの第0〜2桁に対してキャリーが発生するか否かと考えることにより、4ビットのキャリーフォーパリティCP4を3ビットのキャリーフォーパリティCP3のcp[3,1],cp[3,0]を利用して表現することができる。つまり、キャリーインCin=0の場合は、最下位の第3ビットにキャリー(桁上げ)が発生するか否かを示すジェネレーションg[3]が、上位の3ビット(第0〜2ビット)に対するキャリーインCinに対応するので、
cp[4,0]=g[3]<cp[3,1],cp[3,0]>
更に、キャリーインCin=1の場合は、そのキャリーインによる最下位の第3ビットでの反転と、最下位の第3ビットのプロパゲーションp[3]が、上位の3ビット(第0〜2ビット)に対するキャリーインCinに対応することを考慮すると、
cp[4,1]=〜p[3] <cp[3,1],cp[3,0]>
となる。
【0048】
結局、4桁の場合のキャリーフォーパリティCP4は、以下の式群(15)の通りである。
【0049】
Figure 2004234110
この展開式は前述の式(9)と一致している。
【0050】
図4(5)はnビットに一般化した場合を示し、上記と同様の再帰性を利用すると、nビットの全加算器でのキャリーフォーパリティCPnは、
CPn = Cin<cp[n,1], cp[n,0]>
cp[n,0] = (g[n−1]<cp[n−1,1], cp[n−1,0]>)
cp[n,1] = 〜(p[n−1]<cp[n−1,1], cp[n−1,0]>) (16)
上記の式(12)〜(16)を並べて記載すると、再帰的な関係を有していることが理解される。
【0051】
cp[n,0] = (g[n−1]<cp[n−1,1], cp[n−1,0]>)
cp[n,1] = 〜(p[n−1]<cp[n−1,1], cp[n−1,0]>)
cp[n−1,0] = (g[n−2]<cp[n−2,1], cp[n−2,0]>)
cp[n−1,1] = 〜(p[n−2]<cp[n−2,1], cp[n−2,0]>)
........
cp[4,0] = (g[3]<cp[3,1], cp[3,0]>)
cp[4,1] = 〜(p[3]<cp[3,1], cp[3,0]>)
cp[3,0] = (g[2]<cp[2,1], cp[2,0]>)
cp[3,1] = 〜(p[2]<cp[2,1], cp[2,0]>)
cp[2,0] = (g[1]<cp[1,1], cp[1,0]>) = g[1]
cp[2,1] = 〜(p[1]<cp[1,1], cp[1,0]>) = 〜p[1]
cp[1,0] = Cin = 0
cp[1,1] = Cin = 1 (17)
図5は、キャリーフォーパリティCPnを求める論理回路図である。この論理回路は、上記式群(16)をセレクタSEL1、SEL2、SELeと、インバータ40とで構成している。各セレクタは、図3のパストランジスタ回路がそれぞれ利用される。つまり、セレクタSELeが次の式に対応し、
CPn = Cin<cp[n,1], cp[n,0]>
セレクタSEL1が次の式に対応し、
cp[n,0] = (g[n−1]<cp[n−1,1], cp[n−1,0]>)
セレクタSEL2が次の式に対応する。
【0052】
cp[n,1] = 〜(p[n−1]<cp[n−1,1], cp[n−1,0]>)
そして、図5の回路からセレクタSELeを除いた部分が、ユニット回路UNITnを構成する。このユニット回路は、nを減じて、より前段のユニット回路を構成することができる。
【0053】
図6は、前段のユニット回路を示す図である。つまり、図5の前段には、ユニット回路UNITn−1が、その前段にはユニット回路UNITn−2が構成される。そして、n=3のユニット回路まで展開すると、nビット幅の全加算器のためのキャリーフォーパリティCPnを求める論理回路が完成する。
【0054】
図7は、4ビット幅の全加算器用のキャリーフォーパリティCP4を生成する回路18の論理回路である。この回路では、2段のユニット回路UNIT3、UNIT4と、最終段のキャリーインCinを制御信号とするセレクタSELeとで構成され、前述の式(17)のcp[4,0],cp[4,1]、cp[3,0],cp[3,1]が、セレクタ12、13及び10、11により求められる。従って、この論理回路は、各セレクタSEL10〜SEL13、SELeで4個のトランジスタ、各インバータ41,42で2個のトランジスタの、合計で24個のトランジスタで構成可能である。尚、各セレクタの制御信号g[1],g[2],g[3],p[1],p[2],p[3]とその反転信号は、図1のプロパゲーション生成回路P、ジェネレーション生成回路Gでそれぞれ生成されているものとする。
【0055】
図7の出力であるキャリーフォーパリティ信号CP4は、図1に示されるとおり、予測パリティ生成回路14に入力され、入力データA,BのパリティビットA[P]とB[P]との排他的論理和が求められて、加算値の予測パリティS[P]が生成される。つまり、本実施の形態のパリティ予測回路は、CP生成回路18と予測パリティ生成回路14とで構成される。そして、予測パリティ生成回路14は、排他的論理和演算をすればよいので、この排他的論理和回路も、周知のとおり、セレクタを組み合わせることで構成可能である。
【0056】
図8は、4ビット幅の全加算器用のキャリーフォーパリティCP4を生成する回路18の論理回路の変形例である。図7の回路では、セレクタSEL10とSEL12とSELeとが縦列に接続されている。従って、図8の回路では、伝搬信号の波形成形のために、各ユニットUNIT3,4の境界に波形成型用のバッファ43,45が設けられる。同様に、セレクタSEL11、SEL13、SELeの信号伝搬経路にも、波形成型用のバッファ44,46が設けられる。但し、この経路には、インバータ41,42が設けられているので、これらのバッファ44,46を省略することもできる。
【0057】
図9は、図7のキャリーフォーパリティ生成回路をnビット幅まで拡張した論理回路である。この回路でも複数段のユニット回路UNIT3〜nが縦列に接続される。ユニット回路UNIT1、UNIT2とは、図7のユニット回路UNIT3,4に対応する。つまり、ユニットUNITkが、k=3〜nまで繰り返され、最終段のセレクタ回路SELeには、ユニットUNITnのセレクタの出力が入力される。
【0058】
即ち、図9のキャリーフォーパリティ生成回路は、
加算入力A[1]とB[1]のジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、加算入力A[2]とB[2]のジェネレーションビットg[2]に応じて選択して出力する第5のセレクタSEL5と、
ジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、加算入力A[2]とB[2]のプロパゲーションビットp[2]に応じて選択して出力する第6のセレクタSEL6と、を有する第3のユニットUNIT3を有する。
【0059】
そして、第2k−3(但しkは1〜n−3の整数)のセレクタの出力または第2k−2のセレクタの出力の反転信号のいずれかを、加算入力A[k−1]とB[k−1]のジェネレーションビットg[k−1]に応じて選択して出力する第2k−1のセレクタと、
前記第2k−3のセレクタの出力または前記第2k−2のセレクタの出力の反転信号のいずれかを、前記加算入力A[k−1]とB[k−1]のプロパゲーションビットp[k−1]に応じて選択して出力する第2kのセレクタと、を有する第kのユニットUNITkが、k=3〜nまで繰り返し縦列に接続される。即ち、第3のユニットUNIT3〜第nのユニットUNITnが、縦列に接続される。
【0060】
更に、最終段のユニットUNITnの第2n−1のセレクタの出力または第2nのセレクタの出力の反転信号のいずれかを、キャリーインCinに応じて選択して、キャリーフォーパリティCPnとして出力する最終段セレクタSELeを有する。
【0061】
図9の論理回路においても、各ユニット間には、図8のようにバッファゲートを設けて、波形成形を行うことが好ましい。また、各セレクタが、パストランジスタで構成されることで、信号伝播を高速化して、キャリーフォーパリティビットCPnの生成を高速化することができる。
【0062】
以上のとおり、本実施の形態でのキャリーフォーパリティ信号生成回路は、少ない素子数と少ない入力数で構成することができる。従って、全加算器のパリティ予測回路を、少ない入力数、素子数で構成することができる。しかも、セレクタにパストランジスタを利用することで、高速にキャリーフォーパリティ信号を生成することができる。
【0063】
以上、実施の形態例をまとめると以下の付記の通りである。
【0064】
(付記1)nビット幅のパリティビット付き加算入力A[0:n−1,P]とB[0:n−1,P]とキャリーインCinとから、予測パリティビット付き加算値S[0:n−1,P]を求める全加算器におけるパリティ予測回路において、
前記予測パリティビットS[P]は、前記加算入力のパリティビットA[P]、B[P]と、各桁へのキャリービットc[i] (但しiは0〜n−1の整数)の排他的論理和であるキャリーフォーパリティCPnと、の排他的論理和により生成され、
前記キャリーフォーパリティCPnの演算式は、
CPn=Cin<cp[n,1], cp[n,0]>
で表されるものとし(但し、S<X,Y>は、S=1の時はXを、S=0の時はYを出力するものとし、更に、cp[n,1]は前記キャリーインCin=1の時のキャリーフォーパリティCPnを、cp[n,0]は前記キャリーインCin=0の時のキャリーフォーパリティCPnをそれぞれ示すものとする。)、
前記パリティ予測回路は、
前記キャリーインCin=0及び1の場合のキャリーフォーパリティCP[k−1,0]及びCP[k−1,1]を入力とし(但しkはn以下の整数)、加算入力A[k−1]とB[k−1]とのジェネレーションビットg[k−1]に応じて、前記入力CP[k−1,0]またはCP[k−1,1]のいずれかをキャリーフォーパリティcp[k,0]として出力する第1のセレクタと、前記キャリーフォーパリティCP[k−1,0]及びCP[k−1,1]を入力とし、前記加算入力A[k−1]とB[k−1]とのプロパゲーションビットp[k−1]に応じて、前記入力CP[k−1,0]またはCP[k−1,1]のいずれかをキャリーフォーパリティcp[k,1]の反転信号として出力する第2のセレクタとを有する演算ユニットを有し、
当該演算ユニットが複数段、縦列に接続され、
更に、最終段に、キャリーインCinに応じて、キャリーフォーパリティcp[n,0]またはcp[n,1]のいずれかをキャリーフォーパリティCPnとして出力する最終段セレクタを有することを特徴とするパリティ予測回路。
【0065】
(付記2)付記1において、
前記演算ユニットの第1及び第2のセレクタの出力が、後段の演算ユニットの入力として供給されるように縦列に接続されることを特徴とするパリティ予測回路。
【0066】
(付記3)付記2において、
前記各演算ユニットは、前記第2のセレクタの出力に接続されたインバータを有することを特徴とするパリティ予測回路。
【0067】
(付記4)付記2において、
前記各演算ユニットは、後段の演算ユニットとの間に、バッファゲートを有することを特徴とするパリティ予測回路。
【0068】
(付記5)付記1において、
前記第1、第2及び最終段のセレクタが、前記ジェネレーションビットg[k−1]、プロパゲーションビットp[k−1]、キャリーインビットCinを制御信号とするパストランジスタ回路で構成されていることを特徴とするパリティ予測回路。
【0069】
(付記6)4ビット幅のパリティビット付き入力A[0:3,P]とB[0:3,P]とキャリーインCinとから、予測パリティビット付き加算値S[0:3,P]を求める全加算器におけるパリティ予測回路において、
前記予測パリティビットS[P]は、前記入力のパリティビットA[P]、B[P]と、各桁へのキャリービットc[i] (但しiは0〜3の整数)の排他的論理和であるキャリーフォーパリティCP4との排他的論理和により生成され、
前記パリティ予測回路は、前記キャリーフォーパリティCP4を生成する回路を有し、
当該キャリーフォーパリティCP4生成回路は、
前記加算入力A[1]とB[1]のジェネレーションビットg[1]またはプロパゲーションビットp[1]の反転信号のいずれかを、前記加算入力A[2]とB[2]のジェネレーションビットg[2]に応じて選択して出力する第1のセレクタと、
前記ジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、前記加算入力A[2]とB[2]のプロパゲーションビットp[2]に応じて選択して出力する第2のセレクタと、
前記第1のセレクタの出力または前記第2のセレクタの出力の反転信号のいずれかを、前記加算入力A[3]とB[3]のジェネレーションビットg[3]に応じて選択して出力する第3のセレクタと、
前記第1のセレクタの出力または前記第2のセレクタの出力の反転信号のいずれかを、前記加算入力A[3]とB[3]のプロパゲーションビットp[3]に応じて選択して出力する第4のセレクタと、
前記第1のセレクタの出力または前記第2のセレクタの出力の反転信号のいずれかを、前記キャリーインCinに応じて選択して、前記キャリーフォーパリティCP4として出力する最終段セレクタとを有することを特徴とするパリティ予測回路。
【0070】
(付記7)付記6において、
更に、前記第2及び第4のセレクタの出力に接続されたインバータを有することを特徴とするパリティ予測回路。
【0071】
(付記8)付記6において、
前記セレクタは、制御信号に応じていずれか一方の入力を通過させるパストランジスタ回路により構成されることを特徴とするパリティ予測回路。
【0072】
(付記9)nビット幅のパリティビット付き入力A[0:n−1,P]とB[0:n−1,P]とキャリーインCinとから、予測パリティビット付き加算値S[0:n−1,P]を求める全加算器におけるパリティ予測回路において、
前記予測パリティビットS[P]は、前記入力のパリティビットA[P]、B[P]と、各桁へのキャリービットc[i] (但しiは0〜n−1の整数)の排他的論理和であるキャリーフォーパリティCPnとの排他的論理和により生成され、
前記パリティ予測回路は、前記キャリーフォーパリティCPnを生成する回路を有し、
当該キャリーフォーパリティCPn生成回路は、
前記加算入力A[1]とB[1]のジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、前記加算入力A[2]とB[2]のジェネレーションビットg[2]に応じて選択して出力する第5のセレクタと、
前記ジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、前記加算入力A[2]とB[2]のプロパゲーションビットp[2]に応じて選択して出力する第6のセレクタと、
第2k−3(但しkは4〜nの整数)のセレクタの出力または第2k−2のセレクタの出力の反転信号のいずれかを、前記加算入力A[k−1]とB[k−1]のジェネレーションビットg[k−1]に応じて選択して出力する第2k−1のセレクタと、
前記第2k−3のセレクタの出力または前記第2k−2のセレクタの出力の反転信号のいずれかを、前記加算入力A[k−1]とB[k−1]のプロパゲーションビットp[k−1]に応じて選択して出力する第2kのセレクタとを有し、
前記第2k−1のセレクタと第2kのセレクタとが、k=4〜nまで繰り返し縦列に接続され、
更に、前記第2n−1のセレクタの出力または前記第2nのセレクタの出力の反転信号のいずれかを、前記キャリーインCinに応じて選択して、前記キャリーフォーパリティCPnとして出力する最終段セレクタを有することを特徴とするパリティ予測回路。
【0073】
(付記10)付記9において、
更に、前記第2kのセレクタの出力にそれぞれ接続されたインバータを有することを特徴とするパリティ予測回路。
【0074】
(付記11)付記9において、
前記セレクタは、制御信号に応じていずれか一方の入力を通過させるパストランジスタ回路により構成されることを特徴とするパリティ予測回路。
【0075】
【発明の効果】
以上、本発明によれば、全加算器のパリティ予測回路を、少ない入力数、素子数で構成することができる。
【図面の簡単な説明】
【図1】本実施の形態に適用される全加算器とパリティ予測回路とを示す図である。
【図2】キャリーフォーパリティ生成回路18の論理回路図である。
【図3】CMOS回路で構成されたパストランジスタの回路図の一例を示す図である。
【図4】キャリーフォーパリティを説明する図である。
【図5】キャリーフォーパリティCPnを求める論理回路図である。
【図6】前段のユニット回路を示す図である。
【図7】4ビット幅の全加算器用のキャリーフォーパリティCP4を生成する回路18の論理回路である。
【図8】4ビット幅の全加算器用のキャリーフォーパリティCP4を生成する回路18の論理回路の変形例である。
【図9】nビット幅の全加算器用のキャリーフォーパリティCPnを生成する回路18の論理回路である。
【符号の説明】
SEL セレクタ、UNIT ユニット、g ジェネレーションビット、p プロパゲーションビット、h ハーフサムビット、A,B 加算入力、S 加算値、Cin
キャリーイン、CPn キャリーフォーパリティ[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a parity prediction circuit provided in a full adder, and more particularly, to a novel parity prediction circuit with a reduced number of inputs and elements.
[0002]
[Prior art]
Full adders are built in various places in a semiconductor integrated circuit. The full adder generates an addition value S and a carryout Cout from inputs A and B of predetermined bits (predetermined digits) and the carry-in Cin from the lower order. The most common full adder is a 4-bit addition value S [0: 3] in which one block is composed of 4-bit inputs A [0: 3] and B [0: 3] and a 1-bit carry-in Cin. And a 1-bit carry-out Cout is generated. In this specification, for the sake of explanation, the most significant bit (MSB) is the 0th bit (or the 0th digit) and the least significant bit (LSB) is the (n-1) th bit (or the nth bit) for an n-bit value. -1 digit).
[0003]
Further, for example, data A [0: 3] and B [0: 3] read from a predetermined memory propagate through a predetermined transmission path and are input to a full adder, and the addition result is further transmitted. When the input data propagates through a predetermined transmission path and the output data also propagates through another transmission path, such as output to a path, a parity bit is added to the input data. A parity prediction circuit is provided in addition to the full adder circuit so that the parity bit of the addition output has the information on the presence / absence of bit inversion during propagation of these parity bits. The parity prediction circuit generates a predicted parity bit by calculating an exclusive OR of the parity bit of the two input data and the carry at each digit in the addition operation.
[0004]
In the full adder and the parity prediction circuit, a generation g, a propagation p, and a half sum h obtained from input data A [0: 3] and B [0: 3] are included in a preceding stage. , And a logic circuit that generates the added value S [0: 3] and the predicted parity bit S [P] from these g, p, and h is configured.
[0005]
A data operation circuit with parity is described in Patent Document 1 below.
[0006]
[Patent Document 1]
JP-A-4-288629
[0007]
[Problems to be solved by the invention]
However, since the parity prediction circuit that generates the predicted parity bits takes a configuration in which the theoretically calculated prediction parity bit arithmetic expression is directly replaced with NAND or NOR logic gates, the number of inputs increases and the number of logic gates also increases. There is a tendency for circuits to increase in scale. In particular, when the number of digits of the input data increases, the circuit scale increases exponentially, which is a problem of high integration.
[0008]
Therefore, an object of the present invention is to provide a parity bit prediction circuit that generates a predicted parity bit with a small circuit scale.
[0009]
[Means for Solving the Problems]
In order to achieve the above object, according to one aspect of the present invention, a circuit for calculating a carry-for-parity CPn of a parity prediction circuit included in an n-bit-wide full adder is configured to perform one of the circuits according to a control signal. Is configured by a plurality of selectors for selecting the input.
[0010]
Now, a full adder having an n-bit width generates an added value S [0: 0] from the addition inputs A [0: n-1, P] and B [0: n-1, P] and the carry-in Cin from the lower order. n−1, P], the logical formula is
S [0: n-1, P] = A [0: n-1, P] + B [0: n-1, P] + Cin
It becomes. The logical expression for calculating the predicted parity S [P] in this case is:
S [P] = A [P] vB [P] vCPn
CPn = c [0] vc [1] v. . . vc [n-1]
Here, A [P] and B [P] are parity bits of inputs A and B, c [i] is carry-in from the lower bit of the ith bit, CPn is carry-for-parity, and v is exclusive OR. . And, as a premise, the carry for parity CPn is
CPn = Cin <cp [n, 1], cp [n, 0]>
It is assumed that Here, S <X, Y> indicates (S · X) | (〜S · Y). For inputs X and Y, when S = 1, X is given, and when S = 0, X is given. This corresponds to a selector that outputs Y. Further, cp [n, 1] is a carry-for-parity CPn for n bits when carry-in Cin = 1, and cp [n, 0] is a carry-for-parity CPn for n bits when carry-in Cin = 0. Shall be shown. That is, n in cp [n, 1] and cp [n, 0] indicates the number of bits.
[0011]
When the calculation is performed on the above assumptions, the following calculation expression is obtained.
[0012]
cp [n, 0] = (g [n−1] <cp [n−1,1], cp [n−1,0]>)
cp [n, 1] = 〜 (p [n−1] <cp [n−1,1], cp [n−1,0]>)
cp [n-1,0] = (g [n-2] <cp [n-2,1], cp [n-2,0]>)
cp [n−1,1] = 〜 (p [n−2] <cp [n−2,1], cp [n−2,0]>)
. . . . . . . .
cp [4,0] = (g [3] <cp [3,1], cp [3,0]>)
cp [4,1] = (p [3] <cp [3,1], cp [3,0]>)
cp [3,0] = (g [2] <cp [2,1], cp [2,0]>)
cp [3,1] = (p [2] <cp [2,1], cp [2,0]>)
cp [2,0] = (g [1] <cp [1,1], cp [1,0]>) = g [1]
cp [2,1] = (p [1] <cp [1,1], cp [1,0]>) = p [1]
cp [1,0] = 0 (= Cin)
cp [1,1] = 1 (= Cin)
Therefore, according to the above arithmetic expression, the parity prediction circuit of the present invention receives the carry-in parity CP [k-1,0] and CP [k-1,1] in the case of carry-in Cin = 0 and 1. (Where k is an integer equal to or less than n), and the input CP [k−1,0] according to the generation bits g [k−1] of the addition inputs A [k−1] and B [k−1]. Alternatively, a first selector that outputs any one of CP [k−1, 1] as carry-for-parity cp [k, 0], and a first selector that outputs the carry-for-parities CP [k−1, 0] and CP [k−1, 1] as input and the input CP [k-1,0] or CP [k-1] according to the propagation bit p [k-1] of the addition input A [k-1] and B [k-1]. k−1, 1] to carry for parity cp [k, 1]. An arithmetic unit and a second selector for outputting the inverted signal,
The arithmetic units are connected in a plurality of stages and columns,
The parity further comprising a final-stage selector that outputs either carry-for-parity cp [n, 0] or cp [n, 1] as carry-for-parity CPn in the last stage according to carry-in Cin. It is a prediction circuit.
[0013]
According to the parity prediction circuit described above, since it is configured by connecting arithmetic units having two selectors in cascade, it can be configured with a small number of elements.
[0014]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, embodiments of the present invention will be described with reference to the drawings. However, the scope of protection of the present invention is not limited to the following embodiments, but extends to the inventions described in the claims and their equivalents.
[0015]
FIG. 1 is a diagram showing a full adder and a parity prediction circuit applied to the present embodiment. In this example, a 4-bit addition value S with a predicted parity bit is obtained from a 4-bit input A [0: 3, P] and B [0: 3, P] with a parity bit and a carry-in Cin from the lower side. [0: 3, P] and the carry-out Cout are generated. That is, the arithmetic expression of this full adder is
S [0: 3, P] = A [0: 3, P] + B [0: 3, P] + Cin
It is.
[0016]
As described above, as a premise, the least significant bit (LSB) of 4-bit data is represented by "3" and the most significant bit (MSB) is represented by "0". Therefore, in the case of n + 1-bit data, the least significant bit is represented by “n” and the most significant bit is represented by “0”. In this specification, “「 ”is used as an inversion symbol.
[0017]
As a previous stage, for each bit of 4-bit input A [0: 3] and B [0: 3], propagation p [0: 3], generation g [0: 3], and half sum h [0: 3] are generated by the propagation generation circuit P, the generation generation circuit G, and the half sum generation circuit H, respectively. Here, the propagation p [0: 3], the generation g [0: 3], and the half sum h [0: 3] are obtained by the following logical expressions.
[0018]
p [0: 3] = A [0: 3] | B [0: 3] (| is a logical sum (OR))
g [0: 3] = A [0: 3] B [0: 3] (where is a logical product (AND))
h [0: 3] = A [0: 3] v B [0: 3] (v is exclusive OR (EOR))
That is, the propagation p becomes “1” when either of the inputs A and B is “1”, and becomes “0” when both are “0”. In other words, the propagation p is a bit indicating whether, when a carry (carry) from the lower bit occurs, the carry is propagated to the upper bit (p = 1) or not propagated (p = 0). It is. For example, when the propagation p [n] of the data A [n] and B [n] of the n-th bit is "1", if there is a carry from the lower n + 1 bits, the carry is carried to the upper n-1 bits. Is generated, but when the propagation p [n] is “0”, even if a carry occurs from the lower n + 1 bits, no carry occurs in the upper n−1 bits.
[0019]
Generation g becomes "1" when both inputs A and B are "1", and becomes "0" when either input is "0". That is, the generation g is a bit indicating whether a carry to an upper bit is generated at that digit (g = 1) or not (g = 0) even if a carry from the lower bit does not occur. . For example, when the generation g [n] of the data A [n] and B [n] of the n-th bit is “1”, the carry is carried out in the upper n−1 bits without carrying from the lower n + 1 bits. However, when generation g [n] is “0”, if there is no carry from the lower n + 1 bits, no carry occurs in the upper n−1 bits.
[0020]
The half sum h becomes "1" when the inputs A and B are different, and becomes "0" when the inputs A and B are the same. That is, the half sum h is a bit indicating the addition result of the inputs A and B. For example, when A [n] and B [n] are 1,0 or 0,1 in the n-th bit, the half sum h [n] becomes "1", and A [n] and B [n] ] Is 0, 0 or 1, 1, the half sum h [n] becomes “0”.
[0021]
Accordingly, the addition value generation circuit 10 is configured by an exclusive OR circuit based on the following arithmetic expression, and generates the addition value S [0: 3].
[0022]
S [0] = h [0] vc [0]
S [1] = h [1] vc [1]
S [2] = h [2] vc [2]
S [3] = h [3] vc [3]
Here, c [0], c [1], c [2], c [3] are carry-in (carry) bits for each bit, and these carry bits c are Generated by The carry generation circuit 16 is configured by a logic circuit based on the following arithmetic expression.
[0023]
Figure 2004234110
That is, the carry-in c [3] to the least significant bit (third bit) is the carry-in Cin from the lower bit (Equation (1)). Also, the carry-in c [2] to the next second bit is that the generation g [3] of the least significant bit is g [3] = 1, the propagation p [3] is p [3] = 1 and This occurs when the carry-in Cin is Cin = 1 (Equation (2)). Further, the carry-in c [1] to the first bit is such that the generation g [2] of the second bit is g [2] = 1, the propagation p [2] is p [2] = 1 and This occurs when carry-in c [2] to two bits is c [2] = 1 (Equation (3)). By substituting equation (2) into equation (3), equation (4) is obtained.
[0024]
Similarly, the carry-in c [0] to the 0-th bit (most significant bit) is such that the generation g [1] of the first bit is g [1] = 1 or the propagation p [1] is p [1]. = 1 and the carry-in c [1] to the first bit is c [1] = 1 (Equation (5)). By substituting equation (4) into equation (5), equation (6) is obtained.
[0025]
As understood from the above, the general formula of carry-in is as follows.
[0026]
c [n] = g [n + 1] | (p [n + 1] .c [n + 1]))
Therefore, the carry-out generation circuit 12 is constituted by a logic circuit of the following arithmetic expression.
[0027]
Cout = g [0] | (p [0] · c [0]))
By the way, a circuit for obtaining a predicted parity bit from the parity bits of the input data A and B is provided together with a circuit for obtaining the addition value and the carry-out. This circuit includes a CP (Carry for Parity) generation circuit 18 and a predicted parity generation circuit 14. The predicted parity bit S [P] that directly propagates information indicating the presence or absence of a defect in the parity bits A [P] and B [P] of the input data A and B to the parity bit S [P] of the addition value S is as follows. It is known that it is obtained by the following arithmetic expression.
[0028]
S [P] = A [P] vB [P] vCP4 (7)
Here, CP4 is a bit indicating the effect on the parity bit due to the carry of each bit (each digit), and is referred to as carry for parity (carry of parity bit). The carry for parity CP4 is a bit indicating how many times carry-in c [0], c [1], c [2], c [3] to each bit (each digit) has occurred. It is obtained by a generally known arithmetic expression.
[0029]
CP4 = c [0] vc [1] vc [2] vc [3] (8)
In other words, the exclusive OR v is equivalent to inversion when "1" and not inversion when "0", so that the carry-parity CP4 has an odd number of carry-ins to each digit. This is bit data indicating whether CP4 = 0) or an even number (CP4 = 1).
[0030]
When the above equations (1), (2), (4), and (6) are substituted into the above equation (8) and expanded, the following is obtained.
[0031]
CP4 = [(g [1] · 〜g [2] · ・ g [3]) | (〜p [1] · g [2] · 〜g [3]) |
(〜G [1] · 〜p [2] · g [3]) | (p [1] · p [2] · g [3])]: if Cin = 0
[(~ G [1] · ~ g [2] · ~ p [3]) | (p [1] · g [2] · ~ p [3]) |
(G [1] · 〜p [2] · p [3]) | (〜p [1] · p [2] · p [3])]: if Cin = 1 (9)
The operation expression (9) is configured to be divided into a case where the carry-in Cin is “0” and a case where the carry-in Cin is “1”, and each operation expression is composed of the generation g and the property generated in the previous stage. It can be configured by a logic circuit that receives the inverted and non-inverted bits of the gate p. This arithmetic expression is generally known.
[0032]
FIG. 2 is a logic circuit diagram of the carry-for-parity generating circuit 18. In this logic circuit diagram, the arithmetic expression (9) is developed as it is in a logic circuit. That is, an AND circuit and an OR circuit are generated by the NAND gates 20 to 23 and their output NAND gate 24, and the term in the case of Cin = 0 in the arithmetic expression (9) is calculated. An AND circuit and an OR circuit are generated by the NAND gates 25 to 28 and the output NAND gate 29, and the term in the case where Cin = 1 in the arithmetic expression (9) is calculated. Then, the selector 30 selects the output of the gates 24 and 29 according to the case where Cin = 1 and the case where Cin = 0.
[0033]
The carry-for-parity generating circuit 18 in FIG. 2 has a configuration in which the arithmetic expression (9) is directly expanded into a logic circuit. The generation circuit 18 has eight 3-input gates 20 to 23, 25 to 28, two 4-input gates 24 and 29, and a selector 30. A three-input NAND gate requires six transistors when configured with a CMOS circuit. In addition, a 4-input NAND gate requires eight transistors when configured with a CMOS circuit. Therefore, the circuit of FIG. 2 requires 64 transistors only with the NAND gate, and if the selector 30 is composed of 4 transistors, a total of 68 transistors are required. When the number of bits of input data is increased to 6 bits or 8 bits, the number of transistors increases exponentially, which hinders high integration.
[0034]
Therefore, the inventor has newly invented a carry-for-parity generating circuit using only a pass transistor circuit. A pass transistor is a selector that selects one of two inputs according to a control bit of the opposite phase. When configured with a CMOS circuit, if the control bit of the opposite phase can be used, four transistors are used. realizable.
[0035]
FIG. 3 is a diagram showing an example of a circuit diagram of a pass transistor constituted by a CMOS circuit. The pass transistor circuit is a kind of selector, and selects the input A as the output X when the control signal S is “1”, and selects the input B as the output X when the control signal S is “0”. The N-channel transistor N1 and the P-channel transistor P1 constituting the first transfer gate allow the input A to pass when the control signal S is at the H level (S = 1). Further, the N-channel transistor N2 and the P-channel transistor P2 constituting the second transfer gate allow the input B to pass when the control signal S is at the L level (S = 0). Therefore, a selector SEL configured with such a pass transistor circuit will be described as shown in FIG.
[0036]
Then, the following notation will be adopted as the arithmetic expression of the output X.
[0037]
X = (SA) | (~ SB) = S <A, B> (10)
This arithmetic expression indicates that X is A when S = 1 and B when S = 0.
This operation expression corresponds to a selector including inputs A and B and a control signal S.
[0038]
Accordingly, the arithmetic expression for calculating the carry-for-parity CP is expressed using the above-described arithmetic expression (10), whereby the carry-for-parity generating circuit 18 is configured using the selector formed by the pass transistor circuit in FIG. Can be.
[0039]
As a new notation, the carry-for-parity CPn for n bits is expressed as cp [n, 0] and cp [n, 1] with respect to the carry-in Cin = 0 or 1 from the lower order. By doing so, it can be expressed in the form of Expression (10) as follows.
[0040]
CPn = Cin <cp [n, 1], cp [n, 0]> (11)
This equation is equivalent to Equation 10 described above, and can be realized by the pass transistor circuit of FIG.
[0041]
FIG. 4 is a diagram illustrating the carry for parity. With reference to FIG. 4, carry-for-parities CP1 to CP4 and CP4 for 1 to 4 bits and n bits will be described, and their recursiveness will be described. With respect to n bits, the most significant bit is the 0th bit and the least significant bit is the (n-1) th bit. In FIG. 4, the first bit, the second bit, and the third bit each time the number of bits increases. . . . It is described so that the (n-1) th bit and the least significant bit are added. Such notation facilitates the description of the recursiveness of the carry-for-parity.
[0042]
FIG. 4A shows the case of one bit (one digit). In the case of one bit, the carry-for-parity CP1 is determined by whether or not there is a carry Cin from the lower order, as shown in the above-described Expression 8. That is, since CP1 = c [0] = Cin, after all, the carry-for-parity CP1 in the case of one digit is represented by the following formula group (12).
[0043]
CP1 = Cin <cp [1,1], cp [1,0]> = Cin <1,0>
cp [1,0] = 0
cp [1,1] = 1 (12)
FIG. 4B shows a case of two bits (two digits). In the case of 2 bits, it is considered whether or not a carry occurs in the 0th digit of 1 bit, and the carry for parity CP2 of 2 bits is changed to cp [1, 1], cp of the carry for parity CP1 of 1 bit. It can be expressed using [1,0]. In other words, when carry-in Cin = 0, generation g [1] indicating whether or not a carry (carry) occurs in the least significant first bit is the carry-in for the upper one bit (the 0th bit). Because it corresponds to Cin,
cp [2,0] = g [1] <cp [1,1], cp [1,0]>
Further, in the case of carry-in Cin = 1, the inversion of the least significant first bit by the carry-in and the propagation p [1] of the least significant first bit become the upper one bit (0th bit). Considering that it corresponds to carry-in Cin for
cp [2,1] = 〜p [1] <cp [1,1], cp [1,0]>
It becomes.
[0044]
To summarize the above, the carry-for-parity CP2 in the case of two digits is represented by the following formula group (13).
[0045]
CP2 = Cin <cp [2,1], cp [2,0]>
cp [2,0] = g [1] <cp [1,1], cp [1,0]> = g [1]
cp [2,1] = 〜 (p [1] <cp [1,1], cp [1,0]>) = 〜p [1] (13)
FIG. 4C shows a case of three bits (three digits). In the case of 3 bits, it is considered whether or not a carry occurs for the 0th and 1st digits of the 2 bits, so that the carry for parity CP3 of 3 bits is changed to cp [2, 1] of the carry for parity CP2 of 2 bits. , Cp [2,0]. In other words, when carry-in Cin = 0, generation g [2] indicating whether or not a carry (carry) occurs in the second least significant bit is generated for the upper two bits (0th and 1st bits). Because it corresponds to carry-in Cin,
cp [3,0] = g [2] <cp [2,1], cp [2,0]>
Further, when carry-in Cin = 1, the inversion of the least significant second bit by the carry-in and the propagation p [2] of the least significant second bit are performed by the upper two bits (0th and 1st bits). Considering the corresponding carry-in Cin
cp [3,1] = 〜p [2] <cp [2,1], cp [2,0]>
It becomes.
[0046]
Therefore, the carry-for-parity CP3 in the case of three digits is represented by the following formula group (14).
[0047]
Figure 2004234110
FIG. 4D shows a case of 4 bits (4 digits). In the case of 4 bits, by considering whether or not a carry occurs for the 0th to 2nd digits of the 2 bits, the carry for parity CP4 of 4 bits is changed to cp [3,1] of the carry for parity CP3 of 3 bits. , Cp [3,0]. In other words, when carry-in Cin = 0, generation g [3] indicating whether or not a carry (carry) occurs in the least significant third bit is determined with respect to the upper three bits (0th to 2nd bits). Because it corresponds to carry-in Cin,
cp [4,0] = g [3] <cp [3,1], cp [3,0]>
Further, when carry-in Cin = 1, the inversion of the least significant third bit by the carry-in and the propagation p [3] of the least significant third bit are replaced by the upper three bits (0th to 2nd bits). Considering the corresponding carry-in Cin
cp [4,1] = 〜p [3] <cp [3,1], cp [3,0]>
It becomes.
[0048]
After all, the carry for parity CP4 in the case of four digits is as shown in the following formula group (15).
[0049]
Figure 2004234110
This expansion equation matches the above-mentioned equation (9).
[0050]
FIG. 4 (5) shows a case where the generalization is made to n bits. Using the same recursiveness as above, the carry-for-parity CPn in the n-bit full adder becomes
CPn = Cin <cp [n, 1], cp [n, 0]>
cp [n, 0] = (g [n−1] <cp [n−1,1], cp [n−1,0]>)
cp [n, 1] = (p [n−1] <cp [n−1,1], cp [n−1,0]>) (16)
If the above equations (12) to (16) are described side by side, it is understood that they have a recursive relationship.
[0051]
cp [n, 0] = (g [n−1] <cp [n−1,1], cp [n−1,0]>)
cp [n, 1] = 〜 (p [n−1] <cp [n−1,1], cp [n−1,0]>)
cp [n-1,0] = (g [n-2] <cp [n-2,1], cp [n-2,0]>)
cp [n−1,1] = 〜 (p [n−2] <cp [n−2,1], cp [n−2,0]>)
. . . . . . . .
cp [4,0] = (g [3] <cp [3,1], cp [3,0]>)
cp [4,1] = (p [3] <cp [3,1], cp [3,0]>)
cp [3,0] = (g [2] <cp [2,1], cp [2,0]>)
cp [3,1] = (p [2] <cp [2,1], cp [2,0]>)
cp [2,0] = (g [1] <cp [1,1], cp [1,0]>) = g [1]
cp [2,1] = (p [1] <cp [1,1], cp [1,0]>) = p [1]
cp [1,0] = Cin = 0
cp [1,1] = Cin = 1 (17)
FIG. 5 is a logic circuit diagram for determining carry for parity CPn. In this logic circuit, the above formula group (16) is configured by selectors SEL1, SEL2, and SELe, and an inverter 40. Each selector uses the pass transistor circuit of FIG. That is, the selector SELe corresponds to the following equation,
CPn = Cin <cp [n, 1], cp [n, 0]>
The selector SEL1 corresponds to the following equation,
cp [n, 0] = (g [n−1] <cp [n−1,1], cp [n−1,0]>)
The selector SEL2 corresponds to the following equation.
[0052]
cp [n, 1] = 〜 (p [n−1] <cp [n−1,1], cp [n−1,0]>)
The portion excluding the selector SELe from the circuit of FIG. 5 constitutes a unit circuit UNITn. This unit circuit can constitute a unit circuit at a preceding stage by reducing n.
[0053]
FIG. 6 is a diagram showing a unit circuit in the preceding stage. That is, the unit circuit UNITn-1 is configured at the preceding stage in FIG. 5, and the unit circuit UNITn-2 is configured at the preceding stage. Then, when the processing is expanded up to the unit circuit of n = 3, a logic circuit for obtaining the carry-for-parity CPn for the full adder having the n-bit width is completed.
[0054]
FIG. 7 shows a logic circuit of the circuit 18 for generating a carry-for-parity CP4 for a 4-bit width full adder. This circuit is composed of two-stage unit circuits UNIT3 and UNIT4 and a selector SELe that uses the carry-in Cin of the last stage as a control signal, and cp [4,0] and cp [4, 1], cp [3,0], cp [3,1] are obtained by the selectors 12, 13 and 10, 11. Therefore, this logic circuit can be constituted by a total of 24 transistors, that is, four transistors in each of the selectors SEL10 to SEL13 and SELe, and two transistors in each of the inverters 41 and 42. The control signals g [1], g [2], g [3], p [1], p [2], and p [3] of each selector and their inverted signals are represented by the propagation generation circuit P in FIG. , Are generated by the generation generation circuit G.
[0055]
The carry-for-parity signal CP4, which is the output of FIG. 7, is input to the predicted parity generation circuit 14 as shown in FIG. 1, and the exclusive bits of the parity bits A [P] and B [P] of the input data A and B are exclusive. The logical sum is obtained, and a predicted parity S [P] of the added value is generated. That is, the parity prediction circuit according to the present embodiment includes the CP generation circuit 18 and the predicted parity generation circuit 14. Then, since the predicted parity generation circuit 14 only needs to perform an exclusive OR operation, this exclusive OR circuit can also be configured by combining selectors, as is well known.
[0056]
FIG. 8 shows a modification of the logic circuit of the circuit 18 for generating the carry-for-parity CP4 for the 4-bit full adder. In the circuit of FIG. 7, the selectors SEL10, SEL12, and SELe are connected in cascade. Therefore, in the circuit of FIG. 8, buffers 43 and 45 for shaping the waveform are provided at the boundaries between the units UNIT 3 and 4 for shaping the waveform of the propagation signal. Similarly, waveform shaping buffers 44 and 46 are provided in the signal propagation paths of the selectors SEL11, SEL13, and SELe. However, since the inverters 41 and 42 are provided on this path, these buffers 44 and 46 can be omitted.
[0057]
FIG. 9 shows a logic circuit obtained by extending the carry-for-parity generating circuit of FIG. 7 to an n-bit width. Also in this circuit, a plurality of unit circuits UNIT3 to UNITn are connected in cascade. The unit circuits UNIT1 and UNIT2 correspond to the unit circuits UNIT3 and UNIT4 in FIG. That is, the unit UNITk is repeated from k = 3 to n, and the output of the selector of the unit UNITn is input to the selector circuit SELe at the last stage.
[0058]
That is, the carry-for-parity generating circuit of FIG.
Either the generation bit g [1] of the addition inputs A [1] and B [1] or the inverted signal of the propagation bit p [1] is converted to the generation bits g [of the addition inputs A [2] and B [2]. A fifth selector SEL5 that selects and outputs the selected signal according to [2],
Either the generation bit g [1] or the inverted signal of the propagation bit p [1] is selected and output according to the addition bits A [2] and the propagation bit p [2] of B [2]. And a third unit UNIT 3 having six selectors SEL6.
[0059]
Then, either the output of the 2k-3 (where k is an integer of 1 to n-3) selector or the inverted signal of the output of the 2k-2 selector is added to the addition inputs A [k-1] and B [ k-1] selectors for selecting and outputting according to the generation bits g [k-1] of k-1];
Either the output of the 2k-3th selector or the inverted signal of the output of the 2k-2th selector is output to the addition bits p [k-1] of the addition inputs A [k-1] and B [k-1]. -1], and a k-th unit UNITk having a 2k-th selector for selecting and outputting according to -1] is repeatedly connected in cascade from k = 3 to n. That is, the third unit UNIT3 to the n-th unit UNITn are connected in cascade.
[0060]
Further, a final stage in which either the output of the 2n-1st selector or the inverted signal of the output of the 2n selector of the last unit UNITn is selected according to the carry-in Cin, and is output as the carry-for parity CPn. It has a selector SELe.
[0061]
In the logic circuit of FIG. 9 as well, it is preferable to provide a buffer gate between the units as shown in FIG. 8 to perform waveform shaping. In addition, since each selector is configured by a pass transistor, signal propagation can be speeded up, and generation of the carry-for-parity bit CPn can be sped up.
[0062]
As described above, the carry-for-parity signal generation circuit in the present embodiment can be configured with a small number of elements and a small number of inputs. Therefore, the parity prediction circuit of the full adder can be configured with a small number of inputs and a small number of elements. Moreover, by using a pass transistor for the selector, a carry-for-parity signal can be generated at high speed.
[0063]
As described above, the embodiments are summarized as follows.
[0064]
(Supplementary Note 1) From the addition inputs A [0: n−1, P] and B [0: n−1, P] with parity bits of n-bit width and the carry-in Cin, the addition value S [0 with prediction parity bits : N-1, P] in a parity prediction circuit in a full adder,
The predicted parity bit S [P] is composed of the parity bits A [P] and B [P] of the addition input and the carry bit c [i] (where i is an integer of 0 to n-1). It is generated by exclusive OR of the carry-or-parity CPn, which is an exclusive OR,
The arithmetic expression of the carry for parity CPn is:
CPn = Cin <cp [n, 1], cp [n, 0]>
(Where S <X, Y> outputs X when S = 1 and Y when S = 0, and furthermore, cp [n, 1] is the carry Carry-in parity CPn when in Cin = 1, and cp [n, 0] indicate carry-in parity CPn when carry-in Cin = 0, respectively),
The parity prediction circuit,
The carry for parities CP [k−1,0] and CP [k−1,1] when the carry-in Cin = 0 and 1 are input (where k is an integer of n or less), and an addition input A [k− 1] and B [k-1], either carry-in parity CP [k-1,0] or CP [k-1,1] according to generation bit g [k-1] of B [k-1]. A first selector for outputting as [k, 0], and the carry for parities CP [k−1, 0] and CP [k−1, 1] as inputs, and the addition inputs A [k−1] and B According to the propagation bit p [k-1] with [k-1], either the input CP [k-1,0] or CP [k-1,1] is carried for parity cp [k, 1] that outputs an inverted signal of [1]. It has a Tsu door,
The arithmetic units are connected in a plurality of stages and columns,
Furthermore, the final stage has a final stage selector that outputs either the carry for parity cp [n, 0] or cp [n, 1] as the carry for parity CPn according to the carry-in Cin. Parity prediction circuit.
[0065]
(Supplementary Note 2) In Supplementary Note 1,
A parity prediction circuit, wherein outputs of the first and second selectors of the arithmetic unit are connected in cascade so as to be supplied as inputs of a subsequent arithmetic unit.
[0066]
(Supplementary Note 3) In Supplementary note 2,
A parity predicting circuit, wherein each of the arithmetic units has an inverter connected to an output of the second selector.
[0067]
(Supplementary Note 4) In supplementary note 2,
A parity prediction circuit, wherein each of the operation units has a buffer gate between the operation unit and a subsequent operation unit.
[0068]
(Supplementary Note 5) In Supplementary Note 1,
The first, second, and last-stage selectors are configured by pass transistor circuits that use the generation bit g [k-1], the propagation bit p [k-1], and the carry-in bit Cin as control signals. A parity prediction circuit characterized in that:
[0069]
(Supplementary Note 6) Addition value S [0: 3, P] with a predicted parity bit from inputs A [0: 3, P] and B [0: 3, P] with a parity bit having a 4-bit width and carry-in Cin In a parity prediction circuit in a full adder for
The predicted parity bit S [P] is an exclusive logic of the input parity bits A [P] and B [P] and a carry bit c [i] (where i is an integer of 0 to 3) for each digit. It is generated by exclusive OR with the carry for parity CP4 that is the sum,
The parity prediction circuit has a circuit that generates the carry for parity CP4,
The carry-for-parity CP4 generation circuit includes:
Either the generation bit g [1] of the addition inputs A [1] and B [1] or the inverted signal of the propagation bit p [1] is converted to the generation bits of the addition inputs A [2] and B [2]. a first selector for selecting and outputting according to g [2];
Either the generation bit g [1] or the inverted signal of the propagation bit p [1] is selected and output according to the addition bits A [2] and B [2] of the propagation bit p [2]. A second selector to
Either the output of the first selector or the inverted signal of the output of the second selector is selected and output according to the generation bits g [3] of the addition inputs A [3] and B [3]. A third selector;
Either the output of the first selector or the inverted signal of the output of the second selector is selected and output according to the propagation bits p [3] of the addition inputs A [3] and B [3]. A fourth selector,
A final-stage selector that selects either the output of the first selector or the inverted signal of the output of the second selector according to the carry-in Cin and outputs the selected signal as the carry-for parity CP4. Characteristic parity prediction circuit.
[0070]
(Supplementary Note 7) In Supplementary note 6,
The parity prediction circuit further includes an inverter connected to outputs of the second and fourth selectors.
[0071]
(Supplementary Note 8) In supplementary note 6,
A parity predicting circuit, wherein the selector is constituted by a pass transistor circuit that allows any one of the inputs to pass according to a control signal.
[0072]
(Supplementary note 9) The addition value S [0: n−1, P] in a full adder,
The predicted parity bit S [P] is exclusive of the input parity bits A [P] and B [P] and the carry bit c [i] (where i is an integer from 0 to n-1) to each digit. Generated by an exclusive OR with a carry-or-parity CPn that is a logical OR,
The parity prediction circuit has a circuit that generates the carry for parity CPn,
The carry-for-parity CPn generation circuit includes:
Either the generation bit g [1] of the addition inputs A [1] and B [1] or the inverted signal of the propagation bit p [1] is converted to the generation bits of the addition inputs A [2] and B [2]. a fifth selector for selecting and outputting according to g [2];
Either the generation bit g [1] or the inverted signal of the propagation bit p [1] is selected and output according to the addition bits A [2] and B [2] of the propagation bit p [2]. A sixth selector,
Either the output of the 2k-3th (where k is an integer of 4 to n) selector or the inverted signal of the output of the 2k-2th selector is output to the addition inputs A [k-1] and B [k-1]. 2k-1 selector for selecting and outputting according to the generation bit g [k-1]
Either the output of the 2k-3th selector or the inverted signal of the output of the 2k-2th selector is output to the addition bits p [k-1] of the addition inputs A [k-1] and B [k-1]. -1] and a 2k selector for selecting and outputting the selected signal according to
The 2k-1th selector and the 2kth selector are repeatedly connected in cascade from k = 4 to n,
Further, a final-stage selector that selects either the output of the 2n-1 selector or the inverted signal of the output of the 2n selector according to the carry-in Cin and outputs the selected output as the carry-for parity CPn. A parity prediction circuit comprising:
[0073]
(Supplementary Note 10) In Supplementary Note 9,
The parity prediction circuit further includes an inverter connected to an output of the second k selector.
[0074]
(Supplementary Note 11) In supplementary note 9,
A parity predicting circuit, wherein the selector is constituted by a pass transistor circuit that allows any one of the inputs to pass according to a control signal.
[0075]
【The invention's effect】
As described above, according to the present invention, the parity prediction circuit of the full adder can be configured with a small number of inputs and a small number of elements.
[Brief description of the drawings]
FIG. 1 is a diagram showing a full adder and a parity prediction circuit applied to the present embodiment.
FIG. 2 is a logic circuit diagram of a carry-for-parity generating circuit 18;
FIG. 3 is a diagram showing an example of a circuit diagram of a pass transistor formed of a CMOS circuit.
FIG. 4 is a diagram for explaining carry for parity.
FIG. 5 is a logic circuit diagram for determining carry for parity CPn.
FIG. 6 is a diagram showing a unit circuit in a preceding stage.
FIG. 7 is a logic circuit of a circuit 18 for generating a carry-for-parity CP4 for a 4-bit wide full adder.
FIG. 8 is a modified example of the logic circuit of the circuit 18 for generating the carry-for-parity CP4 for the 4-bit width full adder.
FIG. 9 is a logic circuit of a circuit 18 that generates a carry-for-parity CPn for a full adder having an n-bit width.
[Explanation of symbols]
SEL selector, UNIT unit, g generation bit, p propagation bit, h half sum bit, A, B addition input, S addition value, Cin
Carry in, CPn Carry for parity

Claims (10)

nビット幅のパリティビット付き加算入力A[0:n−1,P]とB[0:n−1,P]とキャリーインCinとから、予測パリティビット付き加算値S[0:n−1,P]を求める全加算器におけるパリティ予測回路において、
前記予測パリティビットS[P]は、前記加算入力のパリティビットA[P]、B[P]と、各桁へのキャリービットc[i] (但しiは0〜n−1の整数)の排他的論理和であるキャリーフォーパリティCPnと、の排他的論理和により生成され、
前記キャリーフォーパリティCPnの演算式は、
CPn=Cin<cp[n,1], cp[n,0]>
で表されるものとし(但し、S<X,Y>は、S=1の時はXを、S=0の時はYを出力するものとし、更に、cp[n,1]は前記キャリーインCin=1の時のキャリーフォーパリティCPnを、cp[n,0]は前記キャリーインCin=0の時のキャリーフォーパリティCPnをそれぞれ示すものとする。)、
前記パリティ予測回路は、
前記キャリーインCin=0及び1の場合のキャリーフォーパリティCP[k−1,0]及びCP[k−1,1]を入力とし(但しkはn以下の整数)、加算入力A[k−1]とB[k−1]とのジェネレーションビットg[k−1]に応じて、前記入力CP[k−1,0]またはCP[k−1,1]のいずれかをキャリーフォーパリティcp[k,0]として出力する第1のセレクタと、前記キャリーフォーパリティCP[k−1,0]及びCP[k−1,1]を入力とし、前記加算入力A[k−1]とB[k−1]とのプロパゲーションビットp[k−1]に応じて、前記入力CP[k−1,0]またはCP[k−1,1]のいずれかをキャリーフォーパリティcp[k,1]の反転信号として出力する第2のセレクタとを有する演算ユニットを有し、
当該演算ユニットが複数段、縦列に接続され、
更に、最終段に、キャリーインCinに応じて、キャリーフォーパリティcp[n,0]またはcp[n,1]のいずれかをキャリーフォーパリティCPnとして出力する最終段セレクタを有することを特徴とするパリティ予測回路。
From the addition inputs A [0: n−1, P] and B [0: n−1, P] with parity bits having n-bit width and the carry-in Cin, the addition value S [0: n−1 with prediction parity bits is obtained. , P] in the parity predicting circuit in the full adder,
The predicted parity bit S [P] is composed of the parity bits A [P] and B [P] of the addition input and the carry bit c [i] (where i is an integer of 0 to n-1). It is generated by exclusive OR of the carry-or-parity CPn, which is an exclusive OR,
The arithmetic expression of the carry for parity CPn is:
CPn = Cin <cp [n, 1], cp [n, 0]>
(Where S <X, Y> outputs X when S = 1 and Y when S = 0, and furthermore, cp [n, 1] is the carry Carry-in parity CPn when in Cin = 1, and cp [n, 0] indicate carry-in parity CPn when carry-in Cin = 0, respectively),
The parity prediction circuit,
The carry for parities CP [k−1,0] and CP [k−1,1] when the carry-in Cin = 0 and 1 are input (where k is an integer of n or less), and an addition input A [k− 1] and B [k-1], either carry-in parity CP [k-1,0] or CP [k-1,1] according to generation bit g [k-1] of B [k-1]. A first selector for outputting as [k, 0], and the carry for parities CP [k−1, 0] and CP [k−1, 1] as inputs, and the addition inputs A [k−1] and B According to the propagation bit p [k-1] with [k-1], either the input CP [k-1,0] or CP [k-1,1] is carried for parity cp [k, 1] that outputs an inverted signal of [1]. It has a Tsu door,
The arithmetic units are connected in a plurality of stages and columns,
Furthermore, the final stage has a final stage selector that outputs either the carry for parity cp [n, 0] or cp [n, 1] as the carry for parity CPn according to the carry-in Cin. Parity prediction circuit.
請求項1において、
前記演算ユニットの第1及び第2のセレクタの出力が、後段の演算ユニットの入力として供給されるように縦列に接続されることを特徴とするパリティ予測回路。
In claim 1,
A parity prediction circuit, wherein outputs of the first and second selectors of the arithmetic unit are connected in cascade so as to be supplied as inputs of a subsequent arithmetic unit.
請求項2において、
前記各演算ユニットは、前記第2のセレクタの出力に接続されたインバータを有することを特徴とするパリティ予測回路。
In claim 2,
A parity predicting circuit, wherein each of the arithmetic units has an inverter connected to an output of the second selector.
付記1において、
前記第1、第2及び最終段のセレクタが、前記ジェネレーションビットg[k−1]、プロパゲーションビットp[k−1]、キャリーインビットCinを制御信号とするパストランジスタ回路で構成されていることを特徴とするパリティ予測回路。
In Appendix 1,
The first, second, and last-stage selectors are configured by pass transistor circuits that use the generation bit g [k-1], the propagation bit p [k-1], and the carry-in bit Cin as control signals. A parity prediction circuit characterized in that:
付記6(付記6)4ビット幅のパリティビット付き入力A[0:3,P]とB[0:3,P]とキャリーインCinとから、予測パリティビット付き加算値S[0:3,P]を求める全加算器におけるパリティ予測回路において、
前記予測パリティビットS[P]は、前記入力のパリティビットA[P]、B[P]と、各桁へのキャリービットc[i] (但しiは0〜3の整数)の排他的論理和であるキャリーフォーパリティCP4との排他的論理和により生成され、
前記パリティ予測回路は、前記キャリーフォーパリティCP4を生成する回路を有し、
当該キャリーフォーパリティCP4生成回路は、
前記加算入力A[1]とB[1]のジェネレーションビットg[1]またはプロパゲーションビットp[1]の反転信号のいずれかを、前記加算入力A[2]とB[2]のジェネレーションビットg[2]に応じて選択して出力する第1のセレクタと、
前記ジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、前記加算入力A[2]とB[2]のプロパゲーションビットp[2]に応じて選択して出力する第2のセレクタと、
前記第1のセレクタの出力または前記第2のセレクタの出力の反転信号のいずれかを、前記加算入力A[3]とB[3]のジェネレーションビットg[3]に応じて選択して出力する第3のセレクタと、
前記第1のセレクタの出力または前記第2のセレクタの出力の反転信号のいずれかを、前記加算入力A[3]とB[3]のプロパゲーションビットp[3]に応じて選択して出力する第4のセレクタと、
前記第1のセレクタの出力または前記第2のセレクタの出力の反転信号のいずれかを、前記キャリーインCinに応じて選択して、前記キャリーフォーパリティCP4として出力する最終段セレクタとを有することを特徴とするパリティ予測回路。
Appendix 6 (Supplementary Note 6) From the inputs A [0: 3, P] and B [0: 3, P] with a parity bit having a 4-bit width and the carry-in Cin, an addition value S [0: 3, with a predicted parity bit] P] in a parity predicting circuit in a full adder,
The predicted parity bit S [P] is an exclusive logic of the input parity bits A [P] and B [P] and a carry bit c [i] (where i is an integer of 0 to 3) for each digit. It is generated by exclusive OR with the carry for parity CP4 that is the sum,
The parity prediction circuit has a circuit that generates the carry for parity CP4,
The carry-for-parity CP4 generation circuit includes:
Either the generation bit g [1] of the addition inputs A [1] and B [1] or the inverted signal of the propagation bit p [1] is converted to the generation bits of the addition inputs A [2] and B [2]. a first selector for selecting and outputting according to g [2];
Either the generation bit g [1] or the inverted signal of the propagation bit p [1] is selected and output according to the addition bits A [2] and B [2] of the propagation bit p [2]. A second selector to
Either the output of the first selector or the inverted signal of the output of the second selector is selected and output according to the generation bits g [3] of the addition inputs A [3] and B [3]. A third selector;
Either the output of the first selector or the inverted signal of the output of the second selector is selected and output according to the propagation bits p [3] of the addition inputs A [3] and B [3]. A fourth selector,
A final-stage selector that selects either the output of the first selector or the inverted signal of the output of the second selector according to the carry-in Cin and outputs the selected signal as the carry-for parity CP4. Characteristic parity prediction circuit.
請求項5において、
更に、前記第2及び第4のセレクタの出力に接続されたインバータを有することを特徴とするパリティ予測回路。
In claim 5,
The parity prediction circuit further includes an inverter connected to outputs of the second and fourth selectors.
請求項5において、
前記セレクタは、制御信号に応じていずれか一方の入力を通過させるパストランジスタ回路により構成されることを特徴とするパリティ予測回路。
In claim 5,
A parity predicting circuit, wherein the selector is constituted by a pass transistor circuit that allows any one of the inputs to pass according to a control signal.
nビット幅のパリティビット付き入力A[0:n−1,P]とB[0:n−1,P]とキャリーインCinとから、予測パリティビット付き加算値S[0:n−1,P]を求める全加算器におけるパリティ予測回路において、
前記予測パリティビットS[P]は、前記入力のパリティビットA[P]、B[P]と、各桁へのキャリービットc[i] (但しiは0〜n−1の整数)の排他的論理和であるキャリーフォーパリティCPnとの排他的論理和により生成され、
前記パリティ予測回路は、前記キャリーフォーパリティCPnを生成する回路を有し、
当該キャリーフォーパリティCPn生成回路は、
前記加算入力A[1]とB[1]のジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、前記加算入力A[2]とB[2]のジェネレーションビットg[2]に応じて選択して出力する第5のセレクタと、
前記ジェネレーションビットg[1]またはプロパゲーションビットp[1] の反転信号のいずれかを、前記加算入力A[2]とB[2]のプロパゲーションビットp[2]に応じて選択して出力する第6のセレクタと、
第2k−3(但しkは4〜nの整数)のセレクタの出力または第2k−2のセレクタの出力の反転信号のいずれかを、前記加算入力A[k−1]とB[k−1]のジェネレーションビットg[k−1]に応じて選択して出力する第2k−1のセレクタと、
前記第2k−3のセレクタの出力または前記第2k−2のセレクタの出力の反転信号のいずれかを、前記加算入力A[k−1]とB[k−1]のプロパゲーションビットp[k−1]に応じて選択して出力する第2kのセレクタとを有し、
前記第2k−1のセレクタと第2kのセレクタとが、k=4〜nまで繰り返し縦列に接続され、
更に、前記第2n−1のセレクタの出力または前記第2nのセレクタの出力の反転信号のいずれかを、前記キャリーインCinに応じて選択して、前記キャリーフォーパリティCPnとして出力する最終段セレクタを有することを特徴とするパリティ予測回路。
From the inputs A [0: n−1, P] with parity bits and B [0: n−1, P] and the carry-in Cin having the n-bit width, the addition value S [0: n−1, P] in a parity predicting circuit in a full adder,
The predicted parity bit S [P] is exclusive of the input parity bits A [P] and B [P] and the carry bit c [i] (where i is an integer from 0 to n-1) to each digit. Generated by an exclusive OR with a carry-or-parity CPn that is a logical OR,
The parity prediction circuit has a circuit that generates the carry for parity CPn,
The carry-for-parity CPn generation circuit includes:
Either the generation bit g [1] of the addition inputs A [1] and B [1] or the inverted signal of the propagation bit p [1] is converted to the generation bits of the addition inputs A [2] and B [2]. a fifth selector for selecting and outputting according to g [2];
Either the generation bit g [1] or the inverted signal of the propagation bit p [1] is selected and output according to the addition bits A [2] and B [2] of the propagation bit p [2]. A sixth selector,
Either the output of the 2k-3th (where k is an integer of 4 to n) selector or the inverted signal of the output of the 2k-2th selector is output to the addition inputs A [k-1] and B [k-1]. 2k-1 selector for selecting and outputting according to the generation bit g [k-1]
Either the output of the 2k-3th selector or the inverted signal of the output of the 2k-2th selector is output to the addition bits p [k-1] of the addition inputs A [k-1] and B [k-1]. -1] and a 2k selector for selecting and outputting the selected signal according to
The 2k-1th selector and the 2kth selector are repeatedly connected in cascade from k = 4 to n,
Further, a final-stage selector that selects either the output of the 2n-1 selector or the inverted signal of the output of the 2n selector according to the carry-in Cin and outputs the selected output as the carry-for parity CPn. A parity prediction circuit comprising:
請求項8において、
更に、前記第2kのセレクタの出力にそれぞれ接続されたインバータを有することを特徴とするパリティ予測回路。
In claim 8,
The parity prediction circuit further includes an inverter connected to an output of the second k selector.
請求項8において、
前記セレクタは、制御信号に応じていずれか一方の入力を通過させるパストランジスタ回路により構成されることを特徴とするパリティ予測回路。
In claim 8,
A parity predicting circuit, wherein the selector is constituted by a pass transistor circuit that allows any one of the inputs to pass according to a control signal.
JP2003019036A 2003-01-28 2003-01-28 Parity prediction circuit for full adder Expired - Fee Related JP4230234B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003019036A JP4230234B2 (en) 2003-01-28 2003-01-28 Parity prediction circuit for full adder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003019036A JP4230234B2 (en) 2003-01-28 2003-01-28 Parity prediction circuit for full adder

Publications (2)

Publication Number Publication Date
JP2004234110A true JP2004234110A (en) 2004-08-19
JP4230234B2 JP4230234B2 (en) 2009-02-25

Family

ID=32949022

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003019036A Expired - Fee Related JP4230234B2 (en) 2003-01-28 2003-01-28 Parity prediction circuit for full adder

Country Status (1)

Country Link
JP (1) JP4230234B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006106576A1 (en) * 2005-03-31 2006-10-12 Fujitsu Limited Parity prediction circuit and logic operation circuit using the same
JP2013009314A (en) * 2011-05-20 2013-01-10 Semiconductor Energy Lab Co Ltd Semiconductor device

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006106576A1 (en) * 2005-03-31 2006-10-12 Fujitsu Limited Parity prediction circuit and logic operation circuit using the same
US7962829B2 (en) 2005-03-31 2011-06-14 Fujitsu Limited Parity prediction circuit and logic operation circuit using same
JP2013009314A (en) * 2011-05-20 2013-01-10 Semiconductor Energy Lab Co Ltd Semiconductor device

Also Published As

Publication number Publication date
JP4230234B2 (en) 2009-02-25

Similar Documents

Publication Publication Date Title
US4525797A (en) N-bit carry select adder circuit having only one full adder per bit
US5920498A (en) Compression circuit of an adder circuit
JPH0215088B2 (en)
JPH0447849B2 (en)
JPH064271A (en) Multiplier
US5636157A (en) Modular 64-bit integer adder
US7620677B2 (en) 4:2 Carry save adder and 4:2 carry save adding method
US7024445B2 (en) Method and apparatus for use in booth-encoded multiplication
EP0849663A2 (en) Conditional sum adder using pass-transistor logic
JPH09222991A (en) Adding method and adder
JPH11143686A (en) Partial product generation circuit
JP4230234B2 (en) Parity prediction circuit for full adder
JP3663186B2 (en) Partial product generation circuit and multiplier
Grad et al. A hybrid Ling carry-select adder
US5909386A (en) Digital adder
FAJOOLUNISSA et al. Design and Implementation of High Speed Carry Skip Adder
JPH09185493A (en) Integrated circuit for adder
JP2004171491A (en) Addition circuit and semiconductor device equipped with addition circuit
Meruguboina Efficient Design of Carry Select Adder Using Domino Manchester Carry Chain
KATNENI et al. Design and Implementation of Carry Select Adder with Pass Transistor Logic
JP3199196B2 (en) 5-input adder
Dave et al. Design and synthesis of flagged binary adders with constant addition
Chawla et al. Design and Analysis of a High Speed Carry Select Adder
KR100206119B1 (en) Adder
JP2563467B2 (en) Binary calculator

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060123

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20080731

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20080929

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081007

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081107

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20081203

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

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

Free format text: PAYMENT UNTIL: 20111212

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20121212

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20121212

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20131212

Year of fee payment: 5

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees