JP4230234B2 - Parity prediction circuit for full adder - Google Patents

Parity prediction circuit for full adder Download PDF

Info

Publication number
JP4230234B2
JP4230234B2 JP2003019036A JP2003019036A JP4230234B2 JP 4230234 B2 JP4230234 B2 JP 4230234B2 JP 2003019036 A JP2003019036 A JP 2003019036A JP 2003019036 A JP2003019036 A JP 2003019036A JP 4230234 B2 JP4230234 B2 JP 4230234B2
Authority
JP
Japan
Prior art keywords
parity
carry
bit
selector
output
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 - Fee Related
Application number
JP2003019036A
Other languages
Japanese (ja)
Other versions
JP2004234110A (en
Inventor
敦 池
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Semiconductor Ltd
Original Assignee
Fujitsu Semiconductor 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 Semiconductor Ltd filed Critical Fujitsu Semiconductor 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

Landscapes

  • Detection And Correction Of Errors (AREA)

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 0004230234
即ち、最下位ビット(第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】
Figure 0004230234
この演算式(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 0004230234
図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】
CP4=Cin<cp[4,1],cp[4,0]>
cp[4,0] = (g[3]<cp[3,1], cp[3,0]>)
= g[3]< (p[2]・p[1]|〜p[2]・〜g[1]),(g[2]・〜p[1]|〜g[2]・g[1]) >
= (g[3] ・ p[2] ・ p[1]) | (g[3] ・ 〜p[2] ・ 〜g[1]) |
(〜g[3] ・ g[2] ・ 〜p[1]) | (〜g[3] ・ 〜g[2] ・ g[1]) (if Cin = 0)
cp[4,1] = 〜(p[3]<cp[3,1], cp[3,0]>)
= 〜(p[3]< (p[2]・p[1]|〜p[2]・〜g[1]),(g[2]・〜p[1]|〜g[2]・g[1])>)
= (p[3] ・ p[2] ・ 〜p[1]) | (p[3] ・ 〜p[2] ・ g[1]) |
(〜p[3]・ g[2] ・ p[1]) | (〜p[3] ・ 〜g[2] ・ 〜g[1]) (if Cin = 1) (15)
この展開式は前述の式(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]
BACKGROUND 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 incorporated at various locations in the semiconductor integrated circuit. The full adder generates an addition value S and a carrier out Cout from inputs A and B of predetermined bits (predetermined digits) and carry-in Cin from the lower order. The most common full adder is a 4-bit addition value S [0: 3] from a 4-bit input A [0: 3], B [0: 3] and a 1-bit carry-in Cin in one block. And 1-bit carrier out Cout. In this specification, for convenience of explanation, the most significant bit (MSB) is the 0th bit (or 0th digit) and the least significant bit (LSB) is the (n-1) th bit (or nth bit) for the n-bit value. -1 digit).
[0003]
Further, for example, data A [0: 3] and B [0: 3] read from a predetermined memory are propagated through a predetermined transmission path and input to a full adder, and the addition result is further transmitted to another transmission. When input data propagates through a predetermined transmission path, such as being output to a path, and output data also propagates through another transmission path, a parity bit is added to the input data. In addition, a parity prediction circuit is provided in addition to the full adder circuit so that the parity bit of the added output has the same information on the presence or absence of bit inversion during propagation that these parity bits have. The parity prediction circuit generates a predicted parity bit by obtaining an exclusive OR of the parity bits of the two input data and the carry at each digit in the addition operation.
[0004]
In a full adder and a parity prediction circuit, generation g, propagation p, and halfsome h obtained from input data A [0: 3] and B [0: 3] A logic circuit is generated that generates an added value S [0: 3] and a predicted parity bit S [P] from these g, p, and h.
[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 has a configuration in which the theoretically calculated prediction parity bit calculation formula is replaced with a NAND or NOR logic gate as it is, the number of inputs increases and the number of logic gates also increases. The number of circuits tends to increase and the circuit scale becomes larger. In particular, when the number of digits of input data increases, the circuit scale increases exponentially, which is an adverse effect 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 obtaining a carry-for-parity CPn of a parity prediction circuit included in a full adder having an n-bit width is provided according to a control signal. It consists of a plurality of selectors that select the input.
[0010]
Now, a full adder having an n-bit width adds an addition 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 expression is
S [0: n-1, P] = A [0: n-1, P] + B [0: n-1, P] + Cin
It becomes. The logical expression for obtaining 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]
Where A [P] and B [P] are the parity bits of the inputs A and B, c [i] is the carry-in from the lower bit of the i-th bit, CPn is the carry-for-parity, and v is the exclusive OR. . And as a premise, carry for parity CPn is
CPn = Cin <cp [n, 1], cp [n, 0]>
It shall be represented by However, S <X, Y> indicates (S · X) | (˜S · Y), and for inputs X and Y, when S = 1, when S = 0. This corresponds to a selector that outputs Y. Cp [n, 1] is the carry for parity CPn for n bits when carry-in Cin = 1, and cp [n, 0] is the 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 computing based on the above assumptions, the following computing equation 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 inputs carry for parity CP [k−1,0] and CP [k−1,1] when carry-in Cin = 0 and 1 (Where k is an integer less than or equal to n), and depending on the generation bit g [k-1] of the addition inputs A [k-1] and B [k-1], the input CP [k-1,0] Or a first selector that outputs either CP [k−1,1] as carry for parity cp [k, 0], and carry for parity CP [k−1,0] and CP [k−1, 1] as an input, and depending on the propagation bit p [k-1] of the addition inputs A [k-1] and B [k-1], the input CP [k-1,0] or CP [ and a second selector that outputs any one of k−1,1] as an inverted signal of carry for parity cp [k, 1],
The arithmetic units are connected in multiple rows and columns,
The final stage further includes a final stage selector that outputs either carry for parity cp [n, 0] or cp [n, 1] as carry for parity CPn according to carry-in Cin. This is a prediction circuit.
[0013]
According to the parity prediction circuit described above, it is configured by connecting arithmetic units having two selectors in a column, so that it can be configured with a small number of elements.
[0014]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of the present invention will be described below with reference to the drawings. However, the protection scope of the present invention is not limited to the following embodiments, but extends to the invention described in the claims and equivalents thereof.
[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 4-bit inputs A [0: 3, P] and B [0: 3, P] with a parity bit and a carry-in Cin from the lower order. [0: 3, P] and a carrier 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 the present specification, “˜” is used as an inversion symbol.
[0017]
As a previous step, for each bit of 4-bit input A [0: 3], 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 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 inputs are “0”. That is, the propagation p is a bit indicating whether or not a carry (carry) from the lower bit is propagated to the upper bit (p = 1) or not (p = 0). It is. For example, when the propagation p [n] of the nth bit data A [n] and B [n] is “1”, if there is a carry from the lower n + 1 bits, the carry to the upper n−1 bits is carried. However, when the propagation p [n] is “0”, even if a carry is generated from the lower n + 1 bits, no carry is generated in the upper n−1 bits.
[0019]
The generation g is “1” when both of the inputs A and B are “1”, and is “0” when either of them is “0”. That is, the generation g is a bit indicating whether or not a carry to the 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 n-th bit data A [n] and B [n] is “1”, even if the carry is not performed from the lower n + 1 bits, the carry is performed in the upper n−1 bits. However, when the generation g [n] is “0”, if there is no carry from the lower n + 1 bits, no carry is generated in the upper n−1 bits.
[0020]
The half sum h is “1” when the inputs A and B are different, and is “0” at the same time. That is, the half sum h is a bit indicating the addition result of the inputs A and B. For example, in the nth bit, when A [n] and B [n] are 1, 0 or 0, 1, the half sum h [n] becomes “1”, and A [n] and B [n ] Is 0, 0 or 1, 1, the half sum h [n] is "0".
[0021]
Accordingly, the addition value generation circuit 10 is configured by an exclusive OR circuit using 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], and c [3] are carry-in (carry) bits for each bit, and these carry bits c are carried by the carry generation circuit 16. Is generated. Carry generating circuit 16 is composed of a logic circuit based on the following arithmetic expression.
[0023]
Figure 0004230234
That is, the carry-in c [3] to the least significant bit (third bit) is the carry-in Cin from the lower order (formula (1)). Also, the carry-in c [2] to the next second bit is such that the least significant bit generation g [3] is g [3] = 1, or the propagation p [3] is p [3] = 1 and It occurs when carry-in Cin is Cin = 1 (formula (2)). Furthermore, the carry-in c [1] to the first bit has the second bit generation g [2] of g [2] = 1, or the propagation p [2] of p [2] = 1 and This occurs when the carry-in c [2] to 2 bits is c [2] = 1 (equation (3)). Substituting equation (2) into equation (3) yields equation (4) above.
[0024]
Similarly, in the carry-in c [0] to the 0th bit (most significant bit), the generation g [1] of the 1st bit is g [1] = 1, or the propagation p [1] is p [1]. Occurs when the carry-in c [1] to the first bit is c [1] = 1 (equation (5)). Substituting equation (4) into equation (5) yields equation (6) above.
[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 composed of a logic circuit having the following arithmetic expression.
[0027]
Cout = g [0] | (p [0] ・ c [0]))
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 added value and 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 propagates the information indicating the presence / 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 added value S as it is is It is known that it can be calculated by the following equation.
[0028]
S [P] = A [P] v B [P] v CP4 (7)
Here, CP4 is a bit indicating the influence on the parity bit by the carry in each bit (each digit), and is referred to as carry for parity (carry of parity bit). This carry for parity CP4 is a bit indicating how many times the 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)
That is, since the exclusive OR v is equivalent to inversion when “1” and not when “0”, the carry-parity CP4 eventually has an odd number of carry-ins to each digit ( It is bit data indicating whether CP4 = 0) or even number (CP4 = 1).
[0030]
When the above equations (1), (2), (4), and (6) are assigned to the above equation (8) and expanded, the following is obtained.
[0031]
Figure 0004230234
This arithmetic expression (9) is divided into a case where the carry-in Cin is “0” and a case where the carry-in Cin is “1”, and each arithmetic expression is composed of the generation g and the properties 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 generation circuit 18. In this logic circuit diagram, the arithmetic expression (9) is developed as it is in the logic circuit. That is, an NAND circuit and an OR circuit are generated by the NAND gates 20 to 23 and the NAND gate 24 of their outputs, and a term for Cin = 0 in the arithmetic expression (9) is calculated. The NAND gates 25 to 28 and the NAND gate 29 of their outputs generate an AND circuit and an OR circuit, and the term for Cin = 1 in the arithmetic expression (9) is calculated. Then, the selector 30 selects the outputs of the gates 24 and 29 according to when Cin = 1 and when Cin = 0.
[0033]
The carry for parity generation circuit 18 in FIG. 2 has a configuration in which the arithmetic expression (9) is expanded as it is into a logic circuit. The generation circuit 18 includes eight three-input gates 20 to 23 and 25 to 28, two four-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 8 transistors when configured with a CMOS circuit. Therefore, in the circuit of FIG. 2, if the NAND gate alone requires 64 transistors, and the selector 30 is composed of 4 transistors, a total of 68 transistors are required. If the number of bits of input data increases, such as 6 bits or 8 bits, the number of transistors increases exponentially, which hinders high integration.
[0034]
Therefore, the present inventor newly invented a carry-for-parity generation circuit using only a pass transistor circuit. The pass transistor is a selector that selects one of the two inputs according to the anti-phase control bit. When configured with a CMOS circuit, if the anti-phase control bit is usable, the pass transistor is composed of four transistors. realizable.
[0035]
FIG. 3 is a diagram illustrating an example of a circuit diagram of a pass transistor configured with 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 pass the input A when the control signal S is at the H level (S = 1). 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, the selector SEL composed of such a pass transistor circuit is expressed as shown in FIG.
[0036]
Then, the following notation is adopted as an arithmetic expression for the output X.
[0037]
X = (S · A) | (˜S · B) = S <A, B> (10)
This arithmetic expression indicates that X is A when S = 1 and B when S = 0. This arithmetic expression corresponds to a selector composed of inputs A and B and a control signal S.
[0038]
Therefore, the carry-for-parity generation circuit 18 is configured using the selector of the pass transistor circuit of FIG. 3 by expressing the calculation formula for obtaining the carry-for-parity CP by using the above-described calculation formula (10). Can do.
[0039]
Further, as a new notation method, carry for parity CPn for n bits is represented as cp [n, 0] and cp [n, 1] for carry-in Cin = 0or1 from the lower order. By doing so, it can be expressed in the form of equation (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 for explaining carry for parity. With reference to FIG. 4, carry-for parities CP <b> 1 to CP <b> 4 and CP <b> 4 for 1 to 4 bits and n bits will be described, and the recursiveness thereof will be described. For n bits, the highest bit is the 0th bit and the lowest bit is the (n-1) th bit, so in FIG. 4, every time the number of bits increases, the first bit, the second bit, and the third bit . . . It is expressed so that the (n-1) th bit and the least significant bit are added. This notation facilitates explanation of the recursive nature of carry for parity.
[0042]
FIG. 4 (1) shows a case of 1 bit (one digit). In the case of 1 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 equation 8. That is, since CP1 = c [0] = Cin, the carry for parity CP1 in the case of one digit is as shown in the following equation 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 the case of 2 bits (2 digits). In the case of 2 bits, by considering whether or not a carry is generated for the 0th digit of 1 bit, cp [1,1], cp of 2 bits of carry for parity CP2 is changed to 1 bit of carry for parity CP1. Can be expressed using [1,0]. That is, when carry-in Cin = 0, generation g [1] indicating whether or not a carry (carry) occurs in the least significant first bit is a carry-in for the upper 1 bit (the 0th bit). Since it corresponds to Cin,
cp [2,0] = g [1] <cp [1,1], cp [1,0]>
Further, when carry-in Cin = 1, the inversion at the least significant first bit by the carry-in and the propagation p [1] of the least significant first bit is the most significant bit (0th bit). Considering that it corresponds to the carry-in Cin against
cp [2,1] = ~ p [1] <cp [1,1], cp [1,0]>
It becomes.
[0044]
In summary, the carry for parity CP2 in the case of two digits is as shown in the following equation 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. 4 (3) shows a case of 3 bits (3 digits). In the case of 3 bits, by considering whether or not a carry occurs for the 0th and 1st digits of 2 bits, cp [2,1] of 3 bits of carry for parity CP3 is changed to 2 bits of carry for parity CP2. , Cp [2,0]. That is, when carry-in Cin = 0, generation g [2] indicating whether or not a carry (carry) occurs in the second least significant bit corresponds to the upper 2 bits (0th and 1st bits). Since it corresponds to the carry-in Cin,
cp [3,0] = g [2] <cp [2,1], cp [2,0]>
Further, when carry-in Cin = 1, the inversion at the second least significant bit by the carry-in and the propagation p [2] of the second least significant bit are the two most significant bits (0th, 1st). Bit) to carry in Cin,
cp [3,1] = ~ p [2] <cp [2,1], cp [2,0]>
It becomes.
[0046]
Accordingly, the carry for parity CP3 in the case of 3 digits is as shown in the following equation group (14).
[0047]
Figure 0004230234
FIG. 4 (4) shows a case of 4 bits (4 digits). In the case of 4 bits, cp [3,1] of 3 bits of carry-for-parity CP3 is converted from 4 bits of carry-for-parity CP4 by considering whether or not carry occurs for the 0th to 2nd digits of 2 bits. , Cp [3,0]. That is, when carry-in Cin = 0, generation g [3] indicating whether or not a carry (carry) occurs in the least significant third bit is for the upper 3 bits (0th to 2nd bits). Since it corresponds to the carry-in Cin,
cp [4,0] = g [3] <cp [3,1], cp [3,0]>
Further, in the case of carry-in Cin = 1, the inversion at the least significant third bit by the carry-in and the least significant third bit propagation p [3] are the most significant 3 bits (0th to 2nd bits). Bit) to 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 4 digits is as shown in the following equation group (15).
[0049]
CP4 = Cin <cp [4,1], cp [4,0]>
cp [4,0] = (g [3] <cp [3,1], cp [3,0]>)
= g [3] <(p [2] ・ p [1] | 〜p [2] ・ 〜g [1]), (g [2] ・ 〜p [1] | 〜g [2] ・ g [1])>
= (g [3]-p [2]-p [1]) | (g [3]-~ p [2]-~ g [1]) |
(~ G [3]-g [2]-~ p [1]) | (~ g [3]-~ g [2]-g [1]) (if Cin = 0)
cp [4,1] = ~ (p [3] <cp [3,1], cp [3,0]>)
= ~ (P [3] <(p [2] · p [1] | ~ p [2] · ~ g [1]), (g [2] · ~ p [1] | ~ g [2] · g [1])>)
= (p [3] · p [2] · ~ p [1]) | (p [3] · ~ p [2] · g [1]) |
(~ P [3], g [2], p [1]) | (~ p [3], ~ g [2], ~ g [1]) (if Cin = 1) (15)
This expansion equation coincides with the aforementioned equation (9).
[0050]
FIG. 4 (5) shows a generalized case of n bits. When recursiveness similar to the above is used, carry for parity CPn in an n-bit full adder is
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)
When the above formulas (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 obtaining carry for parity CPn. In this logic circuit, the equation group (16) is composed of selectors SEL1, SEL2, and SELe and an inverter 40. Each selector uses the pass transistor circuit of FIG. In other words, the selector SELe corresponds to the following formula:
CPn = Cin <cp [n, 1], cp [n, 0]>
Selector SEL1 corresponds to the following formula,
cp [n, 0] = (g [n-1] <cp [n-1,1], cp [n-1,0]>)
The selector SEL2 corresponds to the following formula.
[0052]
cp [n, 1] = ~ (p [n-1] <cp [n-1,1], cp [n-1,0]>)
The part of the circuit of FIG. 5 excluding the selector SELe constitutes a unit circuit UNITn. In this unit circuit, n can be reduced to form a unit circuit in the previous stage.
[0053]
FIG. 6 is a diagram illustrating a unit circuit in the previous stage. That is, the unit circuit UNITn-1 is configured in the previous stage of FIG. 5, and the unit circuit UNITn-2 is configured in the previous stage. Then, when developing up to n = 3 unit circuits, a logic circuit for obtaining carry-for-parity CPn for an n-bit wide adder is completed.
[0054]
FIG. 7 is a logic circuit of the circuit 18 that generates a carry-for-parity CP4 for a 4-bit wide full adder. This circuit is composed of a two-stage unit circuit UNIT3, UNIT4 and a selector SELe using the carry-in Cin of the final stage as a control signal, and cp [4,0], 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 composed of a total of 24 transistors: 4 transistors for each selector SEL10 to SEL13, SELe and 2 transistors for each inverter 41, 42. It should be noted that the control signals g [1], g [2], g [3], p [1], p [2], p [3] and their inverted signals of the selectors and their inverted signals are the propagation generation circuit P of FIG. Assume that the generation is 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 exclusive of the parity bits A [P] and B [P] of the input data A and B A 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 prediction parity generation circuit 14. 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 that generates the carry-for-parity CP4 for a 4-bit wide full adder. In the circuit of FIG. 7, selectors SEL10, SEL12, and SELe are connected in a column. Therefore, in the circuit of FIG. 8, the waveform shaping buffers 43 and 45 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 also provided in the signal propagation paths of the selectors SEL11, SEL13, and SELe. However, since the inverters 41 and 42 are provided in this path, these buffers 44 and 46 can be omitted.
[0057]
FIG. 9 is a logic circuit obtained by extending the carry for parity generation circuit of FIG. 7 to an n-bit width. In this circuit, a plurality of unit circuits UNIT3 to UNITn are connected in a column. Unit circuits UNIT1 and UNIT2 correspond to 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 final selector circuit SELe.
[0058]
That is, the carry for parity generation 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 used as the generation bit g [of the addition inputs A [2] and B [2]. 2], and a fifth selector SEL5 for selecting and outputting in accordance with
Select and output either the generation bit g [1] or the inverted signal of the propagation bit p [1] according to the propagation bit p [2] of the addition inputs A [2] and B [2]. And a third unit UNIT3 having six selectors SEL6.
[0059]
Then, either the output of the second k-3 (where k is an integer from 1 to n-3) selector or the inverted signal of the output of the second k-2 selector is used as the addition inputs A [k-1] and B [ a second k-1 selector for selecting and outputting according to the generation bit g [k-1] of k-1],
Either the output of the second k-3 selector or the inverted signal of the output of the second k-2 selector is used as a propagation bit p [k of the addition inputs A [k-1] and B [k-1]. −1] and a k-th unit UNITk having a 2k-th selector that selects and outputs the same is repeatedly connected in a column from k = 3 to n. That is, the third unit UNIT3 to the nth unit UNITn are connected in a column.
[0060]
In addition, the final stage that outputs either the output of the 2n-1 selector of the unit UNITn of the final stage or the inverted signal of the output of the 2n selector according to the carry-in Cin and outputs it as the carry for parity CPn. It has a selector SELe.
[0061]
Also in the logic circuit of FIG. 9, it is preferable to perform waveform shaping by providing a buffer gate between each unit as shown in FIG. In addition, since each selector is configured by a pass transistor, signal propagation can be accelerated and generation of carry-for-parity bits CPn can be accelerated.
[0062]
As described above, the carry for parity signal generation circuit in this 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 the number of elements. Moreover, a carry-for-parity signal can be generated at high speed by using a pass transistor as the selector.
[0063]
The exemplary embodiments are summarized as follows.
[0064]
(Supplementary note 1) From the addition inputs A [0: n−1, P] and B [0: n−1, P] and carry-in Cin of n bits wide, the added value S [0 with the predicted parity bit : n-1, P] in the parity prediction circuit in the full adder,
The predicted parity bit S [P] consists of the parity bits A [P] and B [P] of the addition input and the carry bit c [i] (where i is an integer from 0 to n-1) to each digit. It is generated by exclusive OR with carry for parity CPn which is exclusive OR,
The arithmetic expression of the carry for parity CPn is
CPn = Cin <cp [n, 1], cp [n, 0]>
(However, S <X, Y> outputs X when S = 1, Y when S = 0, and cp [n, 1] indicates the carry. The carry for parity CPn when in Cin = 1 is assumed, and cp [n, 0] is the carry for parity CPn when carry in Cin = 0.
The parity prediction circuit includes:
Carry-in parity CP [k−1,0] and CP [k−1,1] in the case of carry-in Cin = 0 and 1 are input (where k is an integer equal to or less than n), and addition input A [k− Depending on the generation bit g [k-1] between 1] and B [k-1], either the input CP [k-1,0] or CP [k-1,1] is carried for parity cp The first selector output as [k, 0] and the carry for parities CP [k-1,0] and CP [k-1,1] are input, and the addition inputs A [k-1] and B Depending on 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] having a second selector that outputs an inverted signal of 1],
The arithmetic units are connected in multiple rows and columns,
Further, the final stage has a final stage selector that outputs either carry for parity cp [n, 0] or cp [n, 1] as carry for parity CPn according to carry-in Cin. Parity prediction circuit.
[0065]
(Appendix 2) In Appendix 1,
A parity prediction circuit, wherein the outputs of the first and second selectors of the arithmetic unit are connected in series so as to be supplied as inputs of a subsequent arithmetic unit.
[0066]
(Appendix 3) In Appendix 2,
Each of the arithmetic units includes an inverter connected to an output of the second selector.
[0067]
(Appendix 4) In Appendix 2,
Each of the arithmetic units has a buffer gate between the arithmetic unit at the subsequent stage and the parity prediction circuit.
[0068]
(Appendix 5) In Appendix 1,
The first, second and final stage selectors are composed of pass transistor circuits using 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 by the above.
[0069]
(Supplementary note 6) Addition value S [0: 3, P] with a predicted parity bit from inputs A [0: 3, P], B [0: 3, P] and carry-in Cin with a 4-bit width parity bit In the parity prediction circuit in the full adder for obtaining
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] to each digit (where i is an integer of 0 to 3). Generated by exclusive OR with carry for parity CP4 which is the sum,
The parity prediction circuit has a circuit for generating the carry for parity CP4,
The carry for parity CP4 generation circuit
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 used as the generation bit of the addition inputs A [2] and B [2]. a first selector that selects and outputs 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 propagation bit p [2] of the addition inputs A [2] and B [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 bit 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 to
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. A feature parity prediction circuit.
[0070]
(Appendix 7) In Appendix 6,
The parity prediction circuit further comprises an inverter connected to the outputs of the second and fourth selectors.
[0071]
(Appendix 8) In Appendix 6,
2. The parity prediction circuit according to claim 1, wherein the selector includes a pass transistor circuit that allows one of the inputs to pass in accordance with a control signal.
[0072]
(Supplementary note 9) An added value S [0: with predicted parity bit is calculated from the inputs A [0: n-1, P] and B [0: n-1, P] with parity bits of n bits wide and carry-in Cin. In the parity prediction circuit in the full adder for obtaining n-1, P]
The predicted parity bit S [P] is exclusive of the input parity bits A [P] and B [P] and carry bits c [i] (where i is an integer from 0 to n-1) to each digit. Is generated by exclusive OR with carry for parity CPn, which is a logical OR,
The parity prediction circuit has a circuit for generating the carry for parity CPn,
The carry for parity CPn generation circuit
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 used as the generation bit 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 propagation bit p [2] of the addition inputs A [2] and B [2] A sixth selector to
Either the output of the 2k-3 selector (where k is an integer from 4 to n) or the inverted signal of the output of the 2k-2 selector is used as the addition inputs A [k-1] and B [k-1 ] A second k-1 selector to select and output according to the generation bit g [k-1] of
Either the output of the second k-3 selector or the inverted signal of the output of the second k-2 selector is used as a propagation bit p [k of the addition inputs A [k-1] and B [k-1]. -1] to select and output according to the 2k selector,
The 2k-1 selector and the 2k selector are repeatedly connected in a column 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 carry-for-parity CPn. A parity prediction circuit comprising:
[0073]
(Appendix 10) In Appendix 9,
The parity prediction circuit further comprises an inverter connected to each output of the second k selector.
[0074]
(Appendix 11) In Appendix 9,
2. The parity prediction circuit according to claim 1, wherein the selector includes a pass transistor circuit that allows one of the inputs to pass in accordance with 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 the 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 generation circuit 18;
FIG. 3 is a diagram illustrating an example of a circuit diagram of a pass transistor configured with a CMOS circuit.
FIG. 4 is a diagram illustrating carry for parity.
FIG. 5 is a logic circuit diagram for obtaining carry for parity CPn.
FIG. 6 is a diagram showing a unit circuit in the previous stage.
FIG. 7 is a logic circuit of a circuit 18 that generates a carry-for-parity CP4 for a 4-bit full adder.
FIG. 8 is a modification of the logic circuit of the circuit 18 that generates a carry-for-parity CP4 for a 4-bit 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と、の排他的論理和により生成され、
ジェネレーションビット g[ i ] は、前記加算入力 A[i] B[i] の両方が1のとき1になり、いずれかが0のときに0になり、
プロパゲーションビット p [i] は、前記加算入力 A[i] B[i] のいずれかが1のとき1になり、両方が0のときに0になり、
前記キャリーフォーパリティ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として出力する最終段セレクタを有することを特徴とするパリティ予測回路。
Addition value S [0: n-1 with predicted parity bit is calculated from addition inputs A [0: n-1, P] and B [0: n-1, P] and carry-in Cin of n bits wide. , P] in the parity prediction circuit in the full adder,
The predicted parity bit S [P] consists of the parity bits A [P] and B [P] of the addition input and the carry bit c [i] (where i is an integer from 0 to n-1) to each digit. It is generated by exclusive OR with carry for parity CPn which is exclusive OR,
The generation bit g [i] is 1 when both the addition inputs A [i] and B [i] are 1, and is 0 when either is 0,
The propagation bit p [i] is 1 when one of the addition inputs A [i] and B [i] is 1, and is 0 when both are 0.
The arithmetic expression of the carry for parity CPn is
CPn = Cin <cp [n, 1], cp [n, 0]>
(However, S <X, Y> outputs X when S = 1, Y when S = 0, and cp [n, 1] indicates the carry. The carry for parity CPn when in Cin = 1 is assumed, and cp [n, 0] is the carry for parity CPn when carry in Cin = 0.
The parity prediction circuit includes:
Carry-in parity CP [k−1,0] and CP [k−1,1] in the case of carry-in Cin = 0 and 1 are input (where k is an integer equal to or less than n), and addition input A [k− Depending on the generation bit g [k-1] between 1] and B [k-1], either the input CP [k-1,0] or CP [k-1,1] is carried for parity cp The first selector output as [k, 0] and the carry for parities CP [k-1,0] and CP [k-1,1] are input, and the addition inputs A [k-1] and B Depending on 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] having a second selector that outputs an inverted signal of 1],
The arithmetic units are connected in multiple rows and columns,
Further, the final stage has a final stage selector that outputs either carry for parity cp [n, 0] or cp [n, 1] as carry for parity CPn according to carry-in Cin. Parity prediction circuit.
請求項1において、
前記演算ユニットの第1及び第2のセレクタの出力が、後段の演算ユニットの入力として供給されるように縦列に接続されることを特徴とするパリティ予測回路。
In claim 1,
A parity prediction circuit, wherein the outputs of the first and second selectors of the arithmetic unit are connected in series so as to be supplied as inputs of a subsequent arithmetic unit.
請求項2において、
前記各演算ユニットは、前記第2のセレクタの出力に接続されたインバータを有することを特徴とするパリティ予測回路。
In claim 2,
Each of the arithmetic units includes an inverter connected to an output of the second selector.
請求項1において、
前記第1、第2及び最終段のセレクタが、前記ジェネレーションビットg[k-1]、プロパゲーションビットp[k-1]、キャリーインビットCinを制御信号とするパストランジスタ回路で構成されていることを特徴とするパリティ予測回路。
In claim 1,
The first, second and final stage selectors are composed of pass transistor circuits using 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 by the above.
ビット幅のパリティビット付き入力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との排他的論理和により生成され、
ジェネレーションビット g[i] は、前記加算入力 A[i] B[i] の両方が1のとき1になり、いずれかが0のときに0になり、
プロパゲーションビット p [i] は、前記加算入力 A[i] B[i] のいずれかが1のとき1になり、両方が0のときに0になり、
前記パリティ予測回路は、前記キャリーフォーパリティ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のセレクタと、
前記第のセレクタの出力または前記第のセレクタの出力の反転信号のいずれかを、前記キャリーインCinに応じて選択して、前記キャリーフォーパリティCP4として出力する最終段セレクタとを有することを特徴とするパリティ予測回路。
4- bit wide input with parity bit A [0: 3, P] and B [0: 3, P] and carry-in Cin to calculate addition S [0: 3, P] with predicted parity bit In the parity prediction circuit in the device,
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] to each digit (where i is an integer of 0 to 3). Generated by exclusive OR with carry for parity CP4 which is the sum,
The generation bit g [i] is 1 when both the addition inputs A [i] and B [i] are 1, and is 0 when either is 0,
The propagation bit p [i] is 1 when one of the addition inputs A [i] and B [i] is 1, and is 0 when both are 0.
The parity prediction circuit has a circuit for generating the carry for parity CP4,
The carry for parity CP4 generation circuit
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 used as the generation bit of the addition inputs A [2] and B [2]. a first selector that selects and outputs 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 propagation bit p [2] of the addition inputs A [2] and B [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 bit 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 to
A final-stage selector that selects either the output of the third selector or the inverted signal of the output of the fourth selector according to the carry-in Cin and outputs the selected signal as the carry-for-parity CP4. A feature parity prediction circuit.
請求項5において、
更に、前記第2及び第4のセレクタの出力に接続されたインバータを有することを特徴とするパリティ予測回路。
In claim 5,
The parity prediction circuit further comprises an inverter connected to the outputs of the second and fourth selectors.
請求項5において、
前記セレクタは、制御信号に応じていずれか一方の入力を通過させるパストランジスタ回路により構成されることを特徴とするパリティ予測回路。
In claim 5,
2. The parity prediction circuit according to claim 1, wherein the selector includes a pass transistor circuit that allows one of the inputs to pass in accordance with 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との排他的論理和により生成され、
ジェネレーションビット g[i] は、前記加算入力 A[i] B[i] の両方が1のとき1になり、いずれかが0のときに0になり、
プロパゲーションビット p [i] は、前記加算入力 A[i] B[i] のいずれかが1のとき1になり、両方が0のときに0になり、
前記パリティ予測回路は、前記キャリーフォーパリティ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として出力する最終段セレクタを有することを特徴とするパリティ予測回路。
An added value S [0: n−1 with predicted parity bits is calculated from the inputs A [0: n−1, P] and B [0: n−1, P] with parity bits of n bits wide and carry-in Cin. In the parity prediction circuit in the full adder for obtaining P],
The predicted parity bit S [P] is exclusive of the input parity bits A [P] and B [P] and carry bits c [i] (where i is an integer from 0 to n-1) to each digit. Is generated by exclusive OR with carry for parity CPn, which is a logical OR,
The generation bit g [i] is 1 when both the addition inputs A [i] and B [i] are 1, and is 0 when either is 0,
The propagation bit p [i] is 1 when one of the addition inputs A [i] and B [i] is 1, and is 0 when both are 0.
The parity prediction circuit has a circuit for generating the carry for parity CPn,
The carry for parity CPn generation circuit
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 used as the generation bit 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 propagation bit p [2] of the addition inputs A [2] and B [2] A sixth selector to
Either the output of the 2k-3 selector (where k is an integer from 4 to n) or the inverted signal of the output of the 2k-2 selector is used as the addition inputs A [k-1] and B [k-1 ] A second k-1 selector to select and output according to the generation bit g [k-1] of
Either the output of the second k-3 selector or the inverted signal of the output of the second k-2 selector is used as a propagation bit p [k of the addition inputs A [k-1] and B [k-1]. -1] to select and output according to the 2k selector,
The 2k-1 selector and the 2k selector are repeatedly connected in a column 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 carry-for-parity CPn. A parity prediction circuit comprising:
請求項8において、
更に、前記 2k-2 および第2kのセレクタの出力にそれぞれ接続されたインバータを有することを特徴とするパリティ予測回路。
In claim 8,
Further, the parity prediction circuit characterized by having a respective inverter connected to the output of the selector of the first 2k-2 and a 2k.
請求項8において、
前記 2k-3 2k-2 2k-1 2k (k=4〜n)のセレクタは、制御信号に応じていずれか一方の入力を通過させるパストランジスタ回路により構成されることを特徴とするパリティ予測回路。
In claim 8,
The second k-3 , 2k-2 , 2k-1 , 2k (k = 4 to n) selectors are constituted by pass transistor circuits that allow one of the inputs to pass in accordance with a control signal. Parity prediction circuit.
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 JP2004234110A (en) 2004-08-19
JP4230234B2 true 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)

Families Citing this family (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
JP5936908B2 (en) * 2011-05-20 2016-06-22 株式会社半導体エネルギー研究所 Parity bit output circuit and parity check circuit

Also Published As

Publication number Publication date
JP2004234110A (en) 2004-08-19

Similar Documents

Publication Publication Date Title
US6240438B1 (en) Multiplier circuit for reducing the number of necessary elements without sacrificing high speed capability
US8495116B2 (en) Circuit and method converting boolean and arithmetic masks
US5070471A (en) High speed multiplier which divides multiplying factor into parts and adds partial end products
US5636157A (en) Modular 64-bit integer adder
US7024445B2 (en) Method and apparatus for use in booth-encoded multiplication
JP4230234B2 (en) Parity prediction circuit for full adder
CN115102553B (en) Device for converting binary code into thermometer code and electronic equipment
JPH09222991A (en) Adding method and adder
JP7099904B2 (en) Decoder circuit and how to design the decoder circuit
US20050193051A1 (en) Logic circuit
JP3663186B2 (en) Partial product generation circuit and multiplier
US7277909B2 (en) High speed adder
JPH03229321A (en) Priority encoder
US5909386A (en) Digital adder
JPH09185493A (en) Integrated circuit for adder
FAJOOLUNISSA et al. Design and Implementation of High Speed Carry Skip Adder
Meruguboina Efficient Design of Carry Select Adder Using Domino Manchester Carry Chain
JP3157741B2 (en) Binary-decimal conversion circuit
JP3199196B2 (en) 5-input adder
JP4803829B2 (en) Bit counting method and bit counting circuit
US8516030B2 (en) Carry look-ahead circuit and carry look-ahead method
JP3198795B2 (en) Adder and addition method
KATNENI et al. Design and Implementation of Carry Select Adder with Pass Transistor Logic
Rajoriya et al. Parametric Optimization Speed, Power and Area for Carry Select Adder: A Survey
JP2001325093A (en) ONE-BIT COMPARISON FULL ADDER, n-BIT COMPARISON FULL ADDER, SEMICONDUCTOR ARITHMETIC UNIT AND LAYOUT LIBRARY

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