JP2518030B2 - Shift circuit - Google Patents
Shift circuitInfo
- Publication number
- JP2518030B2 JP2518030B2 JP1005664A JP566489A JP2518030B2 JP 2518030 B2 JP2518030 B2 JP 2518030B2 JP 1005664 A JP1005664 A JP 1005664A JP 566489 A JP566489 A JP 566489A JP 2518030 B2 JP2518030 B2 JP 2518030B2
- Authority
- JP
- Japan
- Prior art keywords
- bit
- parity
- data
- bits
- 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.)
- Expired - Lifetime
Links
Landscapes
- Detection And Correction Of Errors (AREA)
Description
【発明の詳細な説明】 [産業上の利用分野] この発明はデータ処理装置に使用されるシフト回路に
関し、特にその符号誤りの検出に関するものである。Description: TECHNICAL FIELD The present invention relates to a shift circuit used in a data processing device, and more particularly to detection of a code error thereof.
[従来の技術] 第5図はパリティビットを有するデータのシフトに関
する説明図であって、第5図(a)はシフト前、同図
(b)はシフト後(図に示す例は2ビットのシフト)の
状態を示す。[Prior Art] FIG. 5 is an explanatory diagram relating to a shift of data having a parity bit. FIG. 5 (a) is before shift, FIG. (Shift) state.
図においてa0,a1,a2,………a8,a9,………b0,b1,b2,…
……はそれぞれデータビット、c0,c1,cn,d0,d1,dnはそ
れぞれパリティビットであり、8ビット(一般的にはm
ビット)ごとに1ビットのパリティビットを付加して1
個のデータを構成している例である。シフト後はa2⇒b
0,a3⇒b1,………a8⇒b6,a9⇒b7の位置に入るが、シフト
後のデータb0〜b7に対しては、c0は関係が無くなるので
これは除去し、b0〜b7に対するパリティビットd0を生成
して、図に示す位置に挿入する。In the figure a0, a1, a2, ... …… a8, a9, ………… b0, b1, b2,…
... are data bits, c0, c1, cn, d0, d1, dn are parity bits, and 8 bits (generally m
1) by adding 1 parity bit for each
This is an example of configuring individual data. A2 ⇒ b after the shift
0, a3⇒b1, ……… a8⇒b6, a9⇒b7, but c0 has no relation to the shifted data b0 to b7, so this is removed and the parity for b0 to b7 is removed. Generate bit d0 and insert it in the position shown.
第4図は従来のこの種の回路を示す説明図であって、
図において(1)はnビット・マスタ・バレルシフタ
(master barrel shifter)、(9)はnビット・スレ
ーブ・バレルシフタ(slave barrel shifter)、(11)
はパリティ・チェッカ、(12)はパリティ・ジェネレー
タ、(13)は比較回路である。またnはmの整数倍で、
n=kmとする。FIG. 4 is an explanatory diagram showing a conventional circuit of this type,
In the figure, (1) is an n-bit master barrel shifter, (9) is an n-bit slave barrel shifter, (11)
Is a parity checker, (12) is a parity generator, and (13) is a comparison circuit. N is an integer multiple of m,
Let n = km.
入力データは総計k(m+1)ビットでるが、m+1
ビットの各データごとにパリティ・チェッカ(11)によ
るパリティ・チェックが行われて、ここでパリティビッ
トが削除され、n=kmビットのデータとしてバレルシフ
タ(1),(9)に並列に入力される。The input data has a total of k (m + 1) bits, but m + 1
A parity checker (11) performs a parity check on each bit data, the parity bits are deleted here, and the data is input in parallel to barrel shifters (1) and (9) as n = km bit data. .
バレルシフタ(1),(9)が共に正常に動作すると
きは、比較回路(13)の2入力が常に一致しており、ま
たバレルシフタ(1)の出力に対応するパリティビット
(第5図d0,d1,……)はパリティ・ジェネレータ(12)
によって生成される。When both barrel shifters (1) and (9) operate normally, the two inputs of the comparison circuit (13) are always in agreement, and the parity bit corresponding to the output of the barrel shifter (1) (Fig. 5, d0, d1, ...) is the parity generator (12)
Generated by.
[発明が解決しようとする課題] 従来の回路は以上のように構成されているので、入力
信号のパリティ・チェック、マスタ・バレルシフタの動
作チェック、出力信号のパリティチェックをそれぞれ独
立に行うことができるが、それだけに冗長度が大きく回
路の容積が大きくなるという問題がある。また出力信号
に対するパリティビットは出力信号から生成されるの
で、この生成時間だけ出力パリティ信号が遅れるという
問題があった。[Problems to be Solved by the Invention] Since the conventional circuit is configured as described above, it is possible to independently perform the parity check of the input signal, the operation check of the master barrel shifter, and the parity check of the output signal. However, there is a problem that the redundancy is large and the volume of the circuit is large accordingly. Further, since the parity bit for the output signal is generated from the output signal, there is a problem that the output parity signal is delayed by this generation time.
この信号遅れを除去するための対策の一例が特開昭59
−158438号公報に「シフト回路」(以下先行技術とい
う)として開示されている。然し、この先行技術では、
入力信号ビット数より、少ないビット数しか取り出すこ
とが出来ず、単一方向にしかシフトすることが出来ない
という問題がある。One example of measures for removing this signal delay is JP-A-59.
It is disclosed as a "shift circuit" (hereinafter referred to as prior art) in Japanese Patent Laid-Open No. 158438. However, in this prior art,
There is a problem that only a smaller number of bits than the number of input signal bits can be taken out, and shifting can be performed only in a single direction.
この発明は従来のものにおける上述の課題を解決する
ためになされたもので、簡単な回路によって構成したシ
フト回路を得、かつ入力信号と同一幅の出力を取り出す
ことが出来、また両方向にシフトすることも可能とする
シフト回路を得ることを目的とする。The present invention has been made to solve the above-mentioned problems in the conventional one, and it is possible to obtain a shift circuit constituted by a simple circuit, take out an output having the same width as an input signal, and shift in both directions. The purpose of the invention is to obtain a shift circuit that enables the above.
[課題を解決するための手段] この発明にかかるシフト回路は、入力する各ワードに
対応してmビット・パリティ・プリディクト回路を設
け、シフト数をpm+qで表し(pは0又は正の整数、q
<m)、qビットシフトの際のシフト後のパリティビッ
トを作成することとした。[Means for Solving the Problem] A shift circuit according to the present invention is provided with an m-bit parity predict circuit corresponding to each input word, and the shift number is represented by pm + q (p is 0 or a positive integer, q
<M), it is decided to create the parity bit after the shift in the q-bit shift.
[作用] qビットシフト後のパリティビットからpm+qビット
シフト後のパリティビットを生成することは容易であ
り、mビット・パリティ・プリディクト回路を設けるこ
とによって全体の回路構成を簡単にすることができる。[Operation] It is easy to generate the parity bit after pm + q bit shift from the parity bit after q bit shift, and the entire circuit configuration can be simplified by providing the m bit parity predict circuit.
[実施例] 以下、この発明の実施例を図面を用いて説明する。第
1図はこの発明の一実施例を示す説明図で、図において
第4図と同一符号は同一または相当部分を示し、(2)
はパリティ・プリディクト回路、(7)は入力データ、
(8)は出力パリティ信号である。Embodiments Embodiments of the present invention will be described below with reference to the drawings. FIG. 1 is an explanatory view showing an embodiment of the present invention, in which the same reference numerals as those in FIG. 4 indicate the same or corresponding portions, and (2)
Is the parity predict circuit, (7) is the input data,
(8) is an output parity signal.
この場合の入力データ(7)はパリティビットを含む
信号であって、パリティ・プリディクト回路(2)には
パリティビットが付加されたまま入力され、nビット・
マスタ・バレルシフタ(1)にはパリティビットが除去
されて入力される。nビット・マスタ・バレルシフタ
(1)の動作は、第4図のnビット・マスタ・バレルシ
フタ(1)の動作と同一である。In this case, the input data (7) is a signal including a parity bit, and the parity predict circuit (2) is input with the parity bit added, and n bits
The parity bit is removed and input to the master barrel shifter (1). The operation of the n-bit master barrel shifter (1) is the same as that of the n-bit master barrel shifter (1) of FIG.
第2図はパリティ・プリディクト回路(2)の構成の
一例を示すブロック図で、図において第1図と同一符号
は同一部分を示し、(3)はそれぞれ8ビット・パリテ
ィ・プリディクト回路、(4)は8ビット・シフタ、
(5)はコントロール回路、(6)はそれぞれ制御信
号、(9)はシフトカウント信号、(10)はシフト方向
信号である。FIG. 2 is a block diagram showing an example of the configuration of the parity predict circuit (2). In the figure, the same reference numerals as those in FIG. 1 indicate the same parts, and (3) shows an 8-bit parity predict circuit and (4) respectively. ) Is an 8-bit shifter,
(5) is a control circuit, (6) is a control signal, (9) is a shift count signal, and (10) is a shift direction signal.
第3図は第2図の8ビット・パリティ・プリディクト
回路(3)の一例を示すブロック図で、図において
(7)は第2図の(7)と同じ入力信号、(6a)は前段
からの制御信号(6)、(6b)は後段への制御信号
(6)、(30)はマスクロジック、(31)はコントロー
ル回路(5)からのシフト信号、(32)はパリティビッ
ト生成回路、(33)は排他的論理和回路である。FIG. 3 is a block diagram showing an example of the 8-bit parity predict circuit (3) in FIG. 2, in which (7) is the same input signal as (7) in FIG. 2 and (6a) is from the previous stage. Control signals (6) and (6b) are control signals (6) and (30) to the subsequent stage, mask logic, (31) is a shift signal from the control circuit (5), and (32) is a parity bit generation circuit, (33) is an exclusive OR circuit.
次に動作について説明する。コントロール回路(5)
にはシフトカウント信号(9)とシフト方向信号(10)
とが入力されるが、これを左シフトのシフトカウントに
変更する。例えば、右2ビットシフトは左62ビットシフ
トに変換される。次にこのシフト数をpm+qの形で表
す。図に示す例ではm=8であるので左62ビットシフト
ではp=7,q=6(62=7×8+6)となるので、8ビ
ット・パリティ・プリディクト回路(3)をqで、8ビ
ット・シフタ(4)をpで制御する。Next, the operation will be described. Control circuit (5)
Shift count signal (9) and shift direction signal (10)
Although and are input, change this to the shift count for left shift. For example, a right 2 bit shift is converted to a left 62 bit shift. Next, this shift number is expressed in the form of pm + q. Since m = 8 in the example shown in the figure, p = 7 and q = 6 (62 = 7 × 8 + 6) in the left 62-bit shift, so the 8-bit parity predict circuit (3) is set to -Control the shifter (4) with p.
8データビットと1パリティビットから構成される各
入力データ(7)は各マスクロジック(30)に入力され
る。qビットの左シフト指令はシフト信号(31)として
入力され、各入力データ(7)のうちシフトアウトされ
ないデータだけを、マスクロジック(30)で論理「0」
にマスクして、シフトアウトされるqビットおよび入力
パリティビットだけをパリティビット生成回路(32)に
入力する様コントロールする。パリティビット生成回路
(32)は排出されるビットに含まれる論理「1」のビッ
トの数が偶数(0を含む)であるか奇数であるかをチェ
ックし、奇数のときに論理「1」の信号を出力する。Each input data (7) composed of 8 data bits and 1 parity bit is input to each mask logic (30). The q-bit left shift command is input as a shift signal (31), and only the data that is not shifted out of each input data (7) is logic "0" in the mask logic (30).
It is controlled so that only q bits and input parity bits to be shifted out are input to the parity bit generation circuit (32). The parity bit generation circuit (32) checks whether the number of logic "1" bits included in the discharged bits is an even number (including 0) or an odd number. Output a signal.
ところで、マスクロジック(30)に入力データ(7)
が入力された時点ではデータのパリティが保たれている
筈で、この中から奇数の「1」が排出されることは残り
のデータのパリティが成立しなくなったことを意味し、
偶数の「1」が排出されることは残りのデータのパリテ
ィが保たれることを意味する。この意味で、パリティビ
ット生成回路(32)の出力を仮にパリティビットとい
い、これを排他的論理和回路(33)の一方の入力とする
と共に、これを制御信号(6b)として次段に送る。前段
からシフトアウトされたビットは次段に入力されるの
で、当該段のパリティがどうなるかを判定するには前段
からの制御信号(6a)の論理と当該段のパリティビット
生成回路(32)の出力の排他的論理和により決定される
ことになる。By the way, input data (7) to the mask logic (30).
The parity of the data should be maintained at the time when is input, and the fact that the odd number "1" is discharged from this means that the parity of the remaining data is no longer valid.
Ejecting an even number of "1" means that the parity of the remaining data is preserved. In this sense, the output of the parity bit generation circuit (32) is tentatively called a parity bit, which is used as one input of the exclusive OR circuit (33) and is sent to the next stage as a control signal (6b). . Since the bits shifted out from the previous stage are input to the next stage, the logic of the control signal (6a) from the previous stage and the parity bit generation circuit (32) of the relevant stage should be used to determine what happens to the parity of that stage. It will be determined by the exclusive OR of the outputs.
従って、排他的論理和回路(33)の出力を8ビット・
シフタ(4)の対応する段に入力すれば、qブット左シ
フトの時の各データに対するパリティビットを得ること
ができる。実際にはpm+qビットの左シフトに対するパ
リティビットが必要であるので、8ビット・シフタ
(4)の入力をpビットだけ左へシフトして出力パリテ
ィ信号(8)とし、このパリティビットをnビット・マ
スタ・バレルシフタ(1)から出力されるmビットの各
ワードのパリティビットとして付加する。このパリティ
ビットが付加されたデータがパリティ・チェッカ(図示
せず)によりチェックされる。Therefore, the output of the exclusive OR circuit (33) is
If input to the corresponding stage of the shifter (4), the parity bit for each data at the time of q-but left shift can be obtained. Actually, a parity bit for the left shift of pm + q bits is required, so the input of the 8-bit shifter (4) is shifted to the left by p bits to be the output parity signal (8), and this parity bit is n bits. It is added as a parity bit of each m-bit word output from the master barrel shifter (1). The data to which the parity bit is added is checked by a parity checker (not shown).
以上のように構成するとnビット・マスタ・バレルシ
フタ(1)の動作と並列に、パリティ・プリディクト回
路(2)により出力パリティ信号(8)が作成されてい
るので、時間の遅れがなく、かつパリティ・チェックは
最後の段階で一度行うだけであるが、もし入力データ
(7)の段階でパリティエラーがあれば、パリティビッ
ト生成回路(32)の出力がエラーとなり、これが出力パ
リティ信号(8)のエラーとして現れ、出力段のパリテ
ィ・チェッカで検出される。With the above configuration, since the output parity signal (8) is created by the parity predict circuit (2) in parallel with the operation of the n-bit master barrel shifter (1), there is no time delay and the parity is -The check is performed only once at the final stage, but if there is a parity error at the stage of the input data (7), the output of the parity bit generation circuit (32) becomes an error and this is the output parity signal (8). Appears as an error and is detected by the parity checker in the output stage.
またバレルシフタ(1)又はパリティ・プリディクト
回路(2)に故障があってエラーが発生した場合の、バ
レルシフタ(1)の出力と出力パリティ信号(8)との
対応が取れなくなり、出力段のエラーチェッカで検出さ
れる。Further, when an error occurs due to a failure in the barrel shifter (1) or the parity predict circuit (2), the output of the barrel shifter (1) and the output parity signal (8) cannot be associated with each other, and the error checker of the output stage is not provided. Detected in.
[発明の効果] この発明は以上説明したように、ハードウエア量を減
少して、処理速度を向上したシフト回路を得ることがで
きるという効果がある。[Effects of the Invention] As described above, the present invention has an effect that it is possible to obtain a shift circuit in which the amount of hardware is reduced and the processing speed is improved.
第1図はこの発明の一実施例を示す説明図、第2図は第
1図のパリティ・プリディクト回路の構成例を示すブロ
ック図、第3図は第2図の8ビット・パリティ・プリデ
ィクト回路の一例を示すブロック図、第4図は従来の回
路を示す説明図、第5図はパリティビットを有するデー
タのシフトに関する説明図。 (1)はnビット・マスタ・バレルシフタ、(2)はパ
リティ・プリディクト回路、(3)は8ビット・パリテ
ィ・プリディクト回路、(4)は8ビット・シフタ、
(5)はコントロール回路、(6)は制御信号、(7)
は入力データ、(8)は出力パリティ信号、(30)はマ
スクロジック、(31)はシフト信号、(32)はパリティ
ビット生成回路、(33)は排他的論理和回路。 なお、各図中同一符号は同一または相当部分を示すもの
とする。FIG. 1 is an explanatory view showing an embodiment of the present invention, FIG. 2 is a block diagram showing a configuration example of the parity predict circuit of FIG. 1, and FIG. 3 is an 8-bit parity predict circuit of FIG. FIG. 4 is an explanatory diagram showing a conventional circuit, and FIG. 5 is an explanatory diagram relating to shift of data having parity bits. (1) is an n-bit master barrel shifter, (2) is a parity predict circuit, (3) is an 8-bit parity predict circuit, (4) is an 8-bit shifter,
(5) is a control circuit, (6) is a control signal, (7)
Is input data, (8) is an output parity signal, (30) is a mask logic, (31) is a shift signal, (32) is a parity bit generation circuit, and (33) is an exclusive OR circuit. In the drawings, the same reference numerals indicate the same or corresponding parts.
Claims (1)
パリティビットを付加して1個のデータを構成し、この
ようなデータをk個連結して入力し、任意のビット数だ
け任意の方向にシフトして出力するシフト回路におい
て、 入力したデータからパリティビットを削除し、mビット
のデータビットを連結して構成したn=kmビットのデー
タを入力して任意のビット数だけ任意の方向にシフトし
て出力するバレルシフタ、 上記入力したデータから上記バレルシフタの出力ビット
のmビットごとに対応する1ビットのパリティビットを
生成するパリティ・プリディクト回路を備え、 上記パリティ・プリディクト回路は、k個の入力データ
の各1個の入力データにそれぞれ対応して設けられ、対
応する入力データ順に配列されるk個のmビット・パリ
ティ・プリディクト回路と、kビットのシフトレジスタ
1個とを有し、 上記シフト数をpm+q(pは0又は正の整数、q<m)
とすると、 上記各mビット・パリティ・プリディクト回路では、シ
フトアウトされるqビットに対するパリティビットを生
成し、これを隣接する下段へ送ると共に、このパリティ
ビットと隣接する上段から送られたパリティビットとに
より当該段のパリティビットを生成して上記シフトレジ
スタの対応段に入力し、 上記シフトレジスタは、pビットのシフトを行って上記
バレルシフタの出力の各mビットに対応する各パリティ
ビットを生成することを特徴とするシフト回路。1. A 1-bit parity bit is added to each m-bit data bit to form 1 data, and k pieces of such data are concatenated and input, and an arbitrary number of bits in an arbitrary direction. In the shift circuit that shifts to and outputs the data, the parity bit is deleted from the input data, and the n = km-bit data that is configured by concatenating the m-bit data bits is input and any number of bits can be input in any direction. A barrel shifter for shifting and outputting, and a parity predict circuit for generating one parity bit corresponding to each m bits of the output bits of the barrel shifter from the input data are provided, and the parity predict circuit has k inputs. K pieces of m bits are provided corresponding to each input data of data, and are arranged in the order of the corresponding input data. And utility-Puridikuto circuit, and a one k-bit shift register, the number of the shift pm + q (p is 0 or a positive integer, q <m)
Then, in each of the above m-bit parity predict circuits, a parity bit for q bits to be shifted out is generated and sent to the adjacent lower stage, and this parity bit and the parity bit sent from the adjacent upper stage. To generate a parity bit of the stage and input it to the corresponding stage of the shift register, and the shift register shifts p bits to generate each parity bit corresponding to each m bit of the output of the barrel shifter. Shift circuit characterized by.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1005664A JP2518030B2 (en) | 1989-01-12 | 1989-01-12 | Shift circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP1005664A JP2518030B2 (en) | 1989-01-12 | 1989-01-12 | Shift circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH02184916A JPH02184916A (en) | 1990-07-19 |
| JP2518030B2 true JP2518030B2 (en) | 1996-07-24 |
Family
ID=11617371
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP1005664A Expired - Lifetime JP2518030B2 (en) | 1989-01-12 | 1989-01-12 | Shift circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP2518030B2 (en) |
-
1989
- 1989-01-12 JP JP1005664A patent/JP2518030B2/en not_active Expired - Lifetime
Also Published As
| Publication number | Publication date |
|---|---|
| JPH02184916A (en) | 1990-07-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP0230730A2 (en) | CRC calculation machines | |
| JPS62132432A (en) | Crc calculator | |
| US4720831A (en) | CRC calculation machine with concurrent preset and CRC calculation function | |
| JPS5864844A (en) | Synchronism detecting system | |
| JPH0545982B2 (en) | ||
| JPS642986B2 (en) | ||
| JP2518030B2 (en) | Shift circuit | |
| US4556978A (en) | Error checked high speed shift matrix | |
| US4251884A (en) | Parity circuits | |
| US8023614B2 (en) | Counting circuit and address counter using the same | |
| JP3454962B2 (en) | Error correction code encoder and decoder | |
| US5559453A (en) | Interlocked restore circuit | |
| US20040017303A1 (en) | Counter arrangement with recover function | |
| JPH0370416B2 (en) | ||
| JP3895118B2 (en) | Single event upset compensation circuit | |
| JP3310186B2 (en) | Reed-Solomon decoding circuit | |
| US4958353A (en) | Device for calculating the parity bits of a sum of two numbers | |
| US7123679B2 (en) | Counter having improved counting speed | |
| US5689451A (en) | Device for calculating parity bits associated with a sum of two numbers | |
| EP0971362B1 (en) | Data integrity checking apparatus | |
| JP3212979B2 (en) | Timing signal malfunction detection circuit | |
| JPH10340202A (en) | Address trap comparison circuit facilitating fault verification | |
| JPH01193942A (en) | Self-diagnosis method for signal processing circuits | |
| JP3350076B2 (en) | Circuit for avoiding malfunction of Johnson counter | |
| SU723683A1 (en) | Single-cycle shift register |