JP4152124B2 - Feedback shift register circuit - Google Patents
Feedback shift register circuit Download PDFInfo
- Publication number
- JP4152124B2 JP4152124B2 JP2002153241A JP2002153241A JP4152124B2 JP 4152124 B2 JP4152124 B2 JP 4152124B2 JP 2002153241 A JP2002153241 A JP 2002153241A JP 2002153241 A JP2002153241 A JP 2002153241A JP 4152124 B2 JP4152124 B2 JP 4152124B2
- Authority
- JP
- Japan
- Prior art keywords
- shift
- circuit
- output
- data
- feedback
- 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
Links
- 238000010586 diagram Methods 0.000 description 12
- 230000005540 biological transmission Effects 0.000 description 11
- 230000010363 phase shift Effects 0.000 description 11
- 230000006870 function Effects 0.000 description 2
- 238000000034 method Methods 0.000 description 2
- 238000001228 spectrum Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 1
- 230000009131 signaling function Effects 0.000 description 1
Images
Description
【0001】
【発明の属する技術分野】
本発明は、フィードバックシフトレジスタ回路に関し、特に、M系列の擬似乱数系列を発生させるためのフィードバックシフトレジスタ回路に関する。
【0002】
【従来の技術】
従来、スペクトル拡散変調を用いた通信方式においては、符号分割多元接続(Code Division Multiple Access)によって、多数の信号のスペクトルを広帯域に拡散させ、多重化(暗号化)して伝送するものが知られている。この通信方式では、送信データの多重化のために送信データ系列に擬似乱数を排他的論理和で足し込む処理を行う。この場合、擬似乱数系列(疑似雑音系列)として、一般的にM系列が利用されている。
【0003】
M系列の擬似乱数系列は、図9に示すように、m段のフリップフロップを備えたフィードバックシフトレジスタによって生成することができる。フリップフロップの段数mは、M系列発生のための多項式の次数に応じた値とされる。
【0004】
フィードバックシフトレジスタ100は、セレクタ101-1〜101-mを備え、このセレクタ101-1〜101-mは、フリップフロップ102-1〜102-mへの入力データを切り替える。
【0005】
各セレクタ101-1〜101-mへの入力の一つである初期値データDINITは、mビットのバス信号であり、初期値データDINITの各ビットDINIT-1〜DINIT−mが各々セレクタ101-1〜101-mへ入力される。
【0006】
初期値設定信号SSET=“1”のとき、セレクタ101-1〜101-mは、各々対応する初期値データDINITの各ビットDINIT-1〜DINIT−mを選択する。初期値設定信号SSET=“0”のとき、セレクタ101-1〜101-mは、前段のフリップフロップ102-1〜102-(m-1)の出力を選択し、セレクタ101-1は、演算回路221の出力を選択する。
【0007】
フリップフロップ102-1〜102-(m-1)は、クロックCKが供給されると、前段のセレクタ101-1〜101-(m-1)からの出力を内部状態として保持するとともに、内部状態を次段のセレクタ101-2〜101-m及び演算回路221内の乗算器222-1〜222-(m-1)へ出力する。
【0008】
フリップフロップ102-mは、クロックCKが供給されると、前段のセレクタ101-mからの出力を内部状態として保持するとともに、内部状態をシフト結果データDRES及び演算回路221内の乗算器222-mへ出力する。
【0009】
演算回路221は、フリップフロップ102-1への戻り値を算出する。この演算回路221は、m個の乗算器222-1〜222-mと(m−1)個の加算器223-1〜223-(m-1)により構成される。乗算器は、AND回路(論理積回路)によって、加算器は、EXOR回路(排他的論理和回路)によって実現できる。
【0010】
各乗算器222-1〜222-mへの入力の一つであるフィードバック係数FBは、周期(2 m −1)となるM系列を生成するためのフリップフロップ102-1へのフィードバック値を決定するための係数であり、mビットのバス信号である。フィードバック係数FBの各ビットをFB-1〜FB-mとする。
【0011】
乗算器222-1〜222-mには、各々、被乗算値として、フリップフロップ102-1〜102-(m-1)の出力が入力され、乗算値としてフィードバック係数FBの各ビットFB-1〜FB-mが入力される。
【0012】
乗算器222-1〜222-mの出力が(m−1)個の加算器223-1〜223-(m-1)に入力され、乗算器222-1〜222-m全体の排他的論理和が算出される。算出結果は、フリップフロップ102-1へのフィードバック値として出力される。
【0013】
次に、図9に示したフィードバックシフトレジスタの動作について説明する。
【0014】
初期値設定信号SSET=“1”のとき、セレクタ101-1〜101-mは、初期値データDINITの各ビットDINIT-1〜DINIT−mを選択し、フリップフロップ102-1〜102-(m-1)へ出力する。フリップフロップ102-1〜102-(m-1)は、クロックCKが供給されると、前段のセレクタ101-1〜101-(m-1)から出力される初期値データDINITの各ビットDINIT-1〜DINIT−mを内部状態として保持する。
【0015】
初期値データDINITの設定以後、フリップフロップ102-1〜102-(m-1)は、前段のフリップフロップ102-1〜102-(m-1)の出力を内部状態として保持し、フリップフロップ102-1は、演算回路221の出力を内部状態として保持する。フリップフロップ102-mの出力が、順次シフト結果データDRESとして出力される。シフト結果データDRESがM系列である。
【0016】
【発明が解決しようとする課題】
上記従来のフィードバックシフトレジスタ100においては、クロックが1回供給される度にフリップフロップ102-1〜102-mの内部状態が1ビットシフトしていくので、位相をずらしたM系列が必要となる場合には、位相シフト量に対応する回数のクロックが供給されるまで所望するM系列が出力されないという問題点があった。
【0017】
また、フィードバックシフトレジスタ100では、1周期(2 m −1)ビットのM系列を1ビットづつ出力しているため、暗号元の送信データ系列の伝送速度と同じ処理速度を確保する必要があり、結果としてフィードバックシフトレジスタ100に高速動作が要求されるという問題点があった。
【0018】
そこで、本発明の目的は、少ないクロック数で所望する位相シフト量に対応するM系列の疑似乱数系列を生成することができ、また、シフト結果データDRESの出力先である暗号元の送信データ系列の処理速度よりも内部処理速度を低速動作させることが可能なフィードバックシフトレジスタを提供することを目的とする。
【0019】
【課題を解決するための手段】
上記課題を解決するため、本発明にかかるM系列の擬似乱数系列を発生させるためのフィードバックシフトレジスタ回路は、入力されるデータを1ビット単位でシフトする1シフト回路と、入力されるデータをn(nは2のべき乗で2以上の自然数)ビット単位でシフトするnシフト回路と、前記1シフト回路の出力と前記nシフト回路の出力とのいずれか一方を選択して出力する選択回路と、該選択回路から出力されるデータを内部保持してシフトデータとして出力するとともに、該シフトデータを前記1シフト回路及び前記nシフト回路の入力にフィードバックするシフトデータ生成回路と、前記選択回路での前記nシフト回路の出力の選択回数を所望のシフト数をnで除算した整数解の数に設定するとともに、前記1シフト回路の出力の選択回数を前記除算で生じた余りの数に設定する選択制御回路と、前記シフトデータ生成回路から出力されるシフトデータを所定のタイミングでラッチし、出力データとして外部に出力するラッチ回路とを備えたことを特徴とする。
【0021】
また、前記ラッチ回路は、前記出力データを1周期(2 m −1)ビットのM系列の疑似乱数系列のうちのmビットのデータとして出力するようにしてもよい。
【0022】
さらに、前記シフトデータ生成回路は、前記M系列の擬似乱数系列を発生するための特性多項式の次数に応じたm個の並列接続されたフリップフロップを有し、前記選択回路の出力を内部状態として保持し、その内部状態をmビットの信号として出力するとともに、該mビットの信号を前記1シフト回路及び前記nシフト回路の入力にフィードバックするm段フリップフロップ回路を備えるようにしてもよい。
【0024】
【発明の実施の形態】
次に、本発明の実施の形態について図面を参照しながら詳細に説明する。まず、具体的な実施形態の説明に先立ち、本発明にかかるフィードバックシフトレジスタ回路の動作原理について説明する。
【0025】
本実施形態は、m段フィードバックシフトレジスタの内部状態に対してフィードバックシフト動作を1回実行した後の各フリップフロップの内部状態を算出する回路と、m段フィードバックシフトレジスタの内部状態に対してフィードバックシフト動作をn回(n=2 x 、n≧2)実行した後の各フリップフロップの内部状態を算出する回路を有することを主な特徴とし、1クロックで1回シフトする動作と、1クロックでn回シフトする動作を組み合わせることによって、従来よりも少ないクロック数で所望する位相シフト量に対するM系列の疑似乱数系列を生成するものである。
【0026】
例えば、位相をj(j≧n)シフトさせたM系列を算出するため、1クロックでnシフトする動作を、
INT(j/n) [回]
(ここで、INT(X)は、Xの整数部分を表す。)
行い、1クロックで1シフトする動作を、
j−{n×INT(j/n)} [回]
行うことにより実現する。
【0027】
より具体的には、n=4と設定した場合、位相をj=15シフトさせたM系列を算出するため、1クロックで4シフトする動作を、
INT(j/4)
=INT(15/4)
=INT(3.75)
=3 [回]
行い、残りの
j−{n×INT(j/4)}
=15−{4×INT(15/4)}
=15−{4×INT(3.75)}
=15−{4×3}
=3
回分は1クロックで1シフトする動作を行うことによって、j=15シフト後のM系列を算出する。
【0028】
また、本実施形態では、m段フィードバックシフトレジスタの内部状態をバス信号として外部に出力する。従って、m段フィードバックシフトレジスタは、フリップフロップのm段目の値を順次出力しているので、ある時刻tにおいてm段目の値が出力されると、次の時刻(t+1)では、時刻t時点における(m−1)段目の値が出力され、時刻(t+2)では時刻t時点での(m−2)段目の値が出力される。よって、ある時刻tにおけるm段フィードバックシフトレジスタの内部状態をmビットのバス信号として出力すれば、時刻t〜時刻(t+m)までのM系列が得られる。
【0029】
さらに、本実施形態では、任意の位相シフト量に対するM系列を生成することができるので、mビットのM系列を一旦生成した後、そのときのm段フィードバックシフトレジスタの内部状態に対してmシフト後の内部状態を算出してmビットのM系列として出力するという動作を繰り返す。これにより、従来の回路においてM系列を順次出力した場合と同じM系列がmビットづつ得られる。従って、1周期(2 m −1)ビットのM系列をmビットづつ出力することができ、フィードバックシフトレジスタの内部動作を暗号元の送信データの伝送速度に合わせて高速化する必要がなくなる。
【0030】
次に、本発明にかかるフィードバックシフトレジスタ回路の具体的な実施の形態について説明する。
【0031】
図1は、本発明にかかるフィードバックシフトレジスタ回路の一実施形態を示す概要構成図である。尚、本発明に入力される初期値設定信号SSET、初期値データDINIT、フィードバック係数FBは、信号の機能、ビット幅等において従来回路へ入力される信号と同等であるものとする。
【0032】
フィードバックシフトレジスタ200は、大別すると、制御回路210、1シフト回路220、nシフト回路230、第1セレクタ240、第2セレクタ250、m段フリップフロップ回路260及びラッチ回路270を備えている。
【0033】
制御回路210は、フィードバックシフトレジスタ200を構成する各回路の動作を制御する。
【0034】
1シフト回路220は、m段フリップフロップ260の出力であるシフトデータSD-1〜SD-m及びフィードバック係数FB-1〜FB-mに基づいて、シフトデータSD-1〜SD-mに対してフィードバックシフト動作を1回実行した後(1ビットシフト後)の値を算出する。
【0035】
nシフト回路230は、m段フリップフロップ260の出力であるシフトデータSD-1〜SD-mとフィードバック係数FB-1〜FB-mに基づいて、シフトデータSD-1〜SD-mに対してフィードバックシフト動作をn回実行した後の値を算出する。ここで、nの値は、n=2xとなる2以上の整数であり、nシフト回路230の処理遅延がクロックCKの周期よりも小さくなる範囲であれば任意に設定することができる。
【0036】
第1セレクタ240は、シフト数SFNに基づいて1シフト動作とnシフト動作を切り替える。第2セレクタ250は、m段フリップフロップ260への入力を第1セレクタ240の出力あるいは初期値データDINITのいずれかとする。m段フリップフロップ回路260は、初期値設定信号SSETが“1”のときにクロックCKが供給されると、第2セレクタ250から出力される初期値データDINIT-1〜DINIT-mを内部状態として保持する。また、m段フリップフロップ回路260は、制御回路210から出力されるイネーブル信号SENが“1”のときにクロックCKが供給されると、第2セレクタ250から出力される第1セレクタ240の出力を内部状態として保持する。ラッチ回路270は、シフト数SFNにより設定された回数のフィードバックシフト動作を実行し、得られたシフト結果を出力データDRとして外部に出力する。
【0037】
ここで、フィードバックレジスタ200の概要動作について説明する。フィードバックレジスタ200の制御回路210は、シフト数設定信号SNSETが“1”のときにクロックCKが供給されると、シフト数SFNの値を取り込み、取り込んだシフト数SFNに基づいて、第1セレクタ240において1シフト回路220からの入力である1シフト結果データDS1Rあるいはnシフト回路230からの入力であるnシフト結果データDSnRのいずれかを選択的に切り替えて出力するための切替制御信号となるシフト数制御信号SFCを生成する。
【0038】
同様に、制御回路210は、m段フリップフロップ回路260において入力値を保持するタイミングを制御するイネーブル信号SEN及びラッチ回路270において入力値を保持するタイミングを制御するラッチ信号LTを生成する。
【0039】
1シフト回路220は、m段フリップフロップ260の出力であるシフトデータSD-1〜SD-m及びフィードバック係数ビットFB-1〜FB-mに基づいて、シフトデータSD-1〜SD-mに対してフィードバックシフト動作を1回実行した後の値を算出し、得られた算出結果を1シフト結果データDS1Rとして第1セレクタ240へ出力する。
【0040】
nシフト回路230は、m段フリップフロップ260の出力であるシフトデータSD-1〜SD-m及びフィードバック係数FB-1〜FB-mに基づいて、シフトデータSD-1〜SD-mに対してフィードバックシフト動作をn回実行した後の値を算出し、算出結果をnシフト結果データDSnRとして第1セレクタ240へ出力する。
【0041】
第1セレクタ240は、シフト数SFNにより1シフト動作とnシフト動作を切り替える機能を有する。制御回路210から出力されるシフト数制御信号SFCが1のとき、nシフト回路230の出力を選択し、シフト数制御信号SFCが0のとき、1シフト回路220の出力を選択して第2セレクタ250に選択結果を出力する。
【0042】
第2セレクタ250は、m段フリップフロップ260への入力を切り替える機能を有する。初期値設定信号SSETが1のとき、初期値データDINITを選択し、初期値設定信号SSETが0のとき、第1セレクタ240の出力を選択してm段フリップフロップ260に出力する。
【0043】
図2は、m段フリップフロップ260の概要構成ブロック図である。m段フリップフロップ260は、大別すると、フリップフロップ261-1〜261-mが並列接続されている。
【0044】
m段フリップフロップ260のフリップフロップ261-1〜261-mは、初期値設定信号SSET=“1”がロード端子Loadに供給され、かつ、クロックCKがクロック端子CKTに供給されると、第2セレクタ250から出力され、各データ端子Dataに入力される初期値データDINIT-1〜DINIT-mを内部状態として保持する。
【0045】
そして、図1に示す制御回路210から出力されるイネーブル信号SENが“1”のときにクロックCKが供給されると、第2セレクタ250から出力される第1セレクタ240の出力を内部状態として保持する。
【0046】
フリップフロップ261-1〜261-mは、当該フリップフロップ261-1〜261-mの内部状態をシフトデータビットSD-1〜SD-mとして出力する。mビットのバス信号として構成されるシフトデータSDは、ラッチ回路270に出力されるとともに、1シフト回路220及びnシフト回路230へフィードバックされる。
【0047】
ラッチ回路270は、シフト数SFNにより設定された回数のフィードバックシフト動作を実行し、得られたシフト結果出力データDRとして外部に出力する。ラッチ回路270は、制御回路210から出力されるラッチ信号LTが“1”のときにクロックCKが供給されると、m段フリップフロップ260の出力を保持し、シフト結果出力データDRとして出力する。シフト結果出力データDRは、1周期(2 m −1)ビットのM系列のうちのmビットである。
【0048】
以下、本実施形態における各部の詳細構成及び詳細動作を説明する。
【0049】
図3は、制御回路210の構成例を示すブロック図である。図3では、一例として、nシフト回路230(図1参照)でのシフト量n=4であり、シフト数SFNが8ビット幅の2進値信号である場合の回路構成を示している。
【0050】
制御回路210は、大別すると、第1ダウンカウンタ211、第1比較器212、第2比較器213、第1AND回路214、第2ダウンカウンタ215、第3比較器216、OR回路217、フリップフロップ218及び第2AND回路219を備えている。
【0051】
第1ダウンカウンタ211は、シフト数SFNとして設定されたシフト量のシフト動作を実行するため、nシフト動作を何回実行する必要があるのかを求めるために使用する。シフト数設定信号SNSETが“1”のときにクロックCKが供給されると、シフト数SFNの上位ビットを内部状態として保持する。ここで、上位ビットとは、8ビットのシフト数SFNについてMSBを7ビットとし、LSBを0ビットとした場合のMSBからxビット(2x=n)までを指すものとする。従って、図3の場合には、MSBから2ビットまでが上位ビットに当たる。これと並行して、第1ダウンカウンタ211は、第1比較器212の出力が“1”である間、クロックCKが供給される毎にデクリメントカウントを実行する。
【0052】
第1比較器212は、第1ダウンカウンタ211が動作中かどうかをモニタする。第1比較器212は、第1ダウンカウンタ211の出力が“0”であるか否かを判別し、第1ダウンカウンタ211の出力が“0”でない場合には、シフト数制御信号SFC=“1”としてOR回路217、第1ダウンカウンタ211に出力する。本実施形態においては、シフト数制御信号SFCが“1”である期間、nシフト動作を行うこととなる。
【0053】
第2比較器213は、第1ダウンカウンタ211の動作終了タイミング(動作終了時点)を検出する。第2比較器213は、第1ダウンカウンタ211の出力が“0”であるか否かを判別し、“0”であると判別したとき、第1AND回路214に、第1ダウンカウンタ211の動作終了タイミングであることを表す“1”を出力する。
【0054】
第1AND回路214は、第2ダウンカウンタ215の動作を制御する信号を生成する。第2比較器213の出力及び第3比較器216の出力がともに“1”であるとき、第1AND回路214は、第2ダウンカウンタ215に“1”を出力する。第1AND回路214の出力により、第2ダウンカウンタ215は、第1ダウンカウンタ211のデクリメントカウント終了後から、第2ダウンカウンタ215の内部状態、すなわち、第2ダウンカウンタ215の値=0(カウントダウン終了値)になるまで動作するように制御される。
【0055】
第2ダウンカウンタ215は、シフト数SFNとして設定された回数のシフト動作を行うため、1シフト動作を何回実行する必要があるのかを求めるために使用する。シフト数設定信号SNSETが“1”のときにクロックCKが供給されると、シフト数SFNの下位ビットを内部状態として保持する。ここで、下位ビットとは、8ビットのシフト数SFNについてMSBを7ビットとし、LSBを0ビットとした場合の(x−1)ビット(2x=n)からLSBまでを指す。図3の例では、1ビットからLSBまでが下位ビットに当たる。
【0056】
そして、第2ダウンカウンタ215は、第1AND回路214の出力が“1”である間、クロックCKが供給される毎にデクリメントカウントを実行する。詳細には、第2比較器213の出力が“1”のときにクロックCKが供給されるとデクリメントカウントを開始し、第3比較器216の出力が“1”である間、クロックCKが供給される毎にデクリメントカウントを実行する。
【0057】
第3比較器216は、第2ダウンカウンタ215が動作中か否かをモニタする。第3比較器216は、第2ダウンカウンタ215の出力値=0であるか否かを判別し、第2ダウンカウンタ215の出力値≠0のとき、すなわち、第2ダウンカウンタ215動作期間中に第1AND回路214及びOR回路217に“1”を出力する。
【0058】
OR回路217は、m段フリップフロップ260の動作を制御する信号を生成する。第1比較器212の出力及び第3比較器216の出力の少なくともいずれか一方が“1”の場合に、イネーブル信号SEN及びフリップフロップ218に“1”を出力する。
【0059】
これらの結果、第1比較器212からは1クロックでフィードバックシフト動作をn回実行する必要がある期間中、“1”が出力される。一方、第3比較器216からは1クロックでフィードバックシフト動作を1回実行する必要がある期間中、“1”分1が出力される。
【0060】
従って、第1比較器212の出力と、第3比較器216の出力の論理和(OR)をOR回路217により求めることにより、m段フリップフロップを動作させる必要のある期間が求められる。
【0061】
第2AND回路219は、ラッチ回路270においてデータを保持するタイミングを制御するラッチ信号LTを生成する。第2AND回路219は、OR回路217の反転信号と、フリップフロップ218から出力されるOR回路217の出力が1クロック遅延分した信号がともに“1”のとき、ラッチ信号LTとして“1”を出力する。第2AND回路219により、イネーブル信号SENが“1”→“0”に変化した変化点からクロックCKで1周期分、ラッチ信号LTは“1”を出力することとなる。
【0062】
図4は、1シフト回路220(図1参照)の一例を示す概要構成ブロック図である。図4では、m段フリップフロップ260(図1参照)の段数m=64とした場合の1シフト回路220の構成を示している。
【0063】
演算回路221の内部構成は、図9に示した演算回路221と同じであるため図示を省略する。乗算器222-1〜222-64には各々、被乗算値としてm段フリップフロップ260の出力であるシフトデータSD-1〜SD-64が入力され、乗算値としてフィードバック係数FB-1〜FB-64が入力される。乗算器222-1〜222-64の出力が63個の加算器223-1〜223-(m-1)に入力され、乗算器222-1〜222-64全体の排他的論理和が算出される。演算回路221の出力が1シフト結果データDS1R-1として出力される。1シフト結果データDS1R(2)〜DS1R-64からは、シフトデータSD-1〜SD-63の値が出力される。1シフト結果データDS1R-1〜DS1R-64が、シフトデータSD-1〜SD-64に対してフィードバックシフト動作を1回実行した後のm段フリップフロップ260内の各フリップフロップ261-1〜261-mの内部状態となる。
【0064】
nシフト回路230(図1参照)は、図4に示した演算回路221をn個(演算回路221-1〜221(n))接続して構成する。図6は、m段フリップフロップ260の段数m=64とし、nシフト回路230でのシフト量n=4とした場合のnシフト回路230の構成を示すブロック図である。そのため、図1のnシフト結果データDSnRに当たる信号を4シフト結果DS4Rとして説明する。
【0065】
演算回路221-1では、各乗算器への被乗算値として、m段フリップフロップ260(図1参照)の出力であるシフトデータSD-1〜SD-64が入力され、乗算値としてフィードバック係数FB-1〜FB-64が入力される。演算回路221-1の出力は、演算回路221-2〜221-4及び4シフト結果DS4R-4に出力される。
【0066】
演算回路221-2では、乗算器222-1(図9参照)への被乗算値として演算回路221-1の出力が入力され、乗算器222-2〜222-64への被乗算値としてシフトデータSD-1〜SD-63が入力される。乗算器222-1〜222-64への乗算値としてはフィードバック係数ビットFB-1〜FB-64が入力される。演算回路221-2の出力は、演算回路221-3〜221-4へと出力されるとともに、4シフト結果DS4R-3として出力される。
【0067】
演算回路221-3では、乗算器222-1への被乗算値として演算回路221-2の出力が入力され、乗算器222-2への被乗算値として演算回路221-1の出力が入力され、乗算器222-3〜222-64への被乗算値としてシフトデータSD-1〜SD-62が入力される。乗算器222-1〜222-64への乗算値としては、フィードバック係数FB-1〜FB-64が入力される。演算回路221-3の出力は、演算回路221-4及び4シフト結果DS4R-2に出力される。
【0068】
演算回路221-4では、乗算器222-1への被乗算値として演算回路221-3の出力が入力され、乗算器222-2への被乗算値として演算回路221-2の出力が入力され、乗算器222-3への被乗算値として演算回路221-1の出力が入力され、乗算器222-4〜222-64への被乗算値としてシフトデータSD-1〜SD-61が入力される。乗算器222-1〜222-64への乗算値としては、フィードバック係数FB-1〜FB-64が入力される。演算回路221-4の出力は、4シフト結果DS4R-1として出力される。
【0069】
4シフト結果DS4R-5〜DS4R-64からは、シフトデータSD-1〜D-60の値が出力される。
【0070】
4シフト結果DS4R-1〜DS4R-64が、シフトデータSD-1〜SD-64に対してフィードバックシフト動作を4回実行した後のm段フリップフロップ260内の各フリップフロップ261-1〜261-mの内部状態となる。
【0071】
以上の説明においては、n=4の場合を例として説明したが、nが4以外の場合には、演算回路221をn個使用し、上述した規則と同様に信号線を接続すれば、シフトデータSD-1〜SD-mに対してフィードバックシフト動作をn回実行した後のフリップフロップ261の内部状態を算出することができる。
【0072】
以下、上記フィードバックシフトレジスタ回路の動作について説明する。
【0073】
図6乃至図8は、図1に示すm段フリップフロップ260の段数m=64とし、nシフト回路230でのシフト量n=4、シフト数SFNが8ビット幅の2進値信号である場合の回路動作を示すタイミングチャートである。
【0074】
まず、回路全体の基本動作について図6のタイミングチャートを用いて説明する。
【0075】
図6は、シフト数SFN=5が入力された場合のタイミングチャートである。
【0076】
初期値設定信号SSETが“1”のときにクロックCKが供給されると、m段フリップフロップ260は内部状態として初期値データDINITの値を保持し、シフトデータSDから初期値が出力される。
【0077】
シフト数設定信号SNSETが“1”のときにクロックCKが供給されると、制御回路210においてシフト数SFNが取り込まれ、シフト数制御信号SFC及びイネーブル信号SENが生成される。
【0078】
1シフト回路220では、シフトデータSD(=初期値)に対してフィードバックシフト動作を1回実行した後の値(=1シフト後の値)を算出する。
【0079】
n(=4)シフト回路230では、シフトデータSD(=初期値)に対してフィードバックシフト動作をn=4回実行した後の値(=4シフト後の値)を算出する。
【0080】
このとき、シフト数制御信号SFCが1であるため、第1セレクタ240において、n(=4)シフト回路230の出力(=4シフト後の値)が選択され、m段フリップフロップ260に出力される。
【0081】
イネーブル信号SENが“1”のときにクロックCKが供給されると、m段フリップフロップ260は、内部状態として第1セレクタ240の出力(=4シフト後の値)が第2セレクタ250を介して入力されて保持するとともに、シフトデータSDとして出力する。
【0082】
1シフト回路220では、シフトデータSD(=4シフト後の値)に対してさらにフィードバックシフト動作を1回実行した後の値(=5シフト後の値)を算出する。
【0083】
n(=4)シフト回路230では、シフトデータSD(=4シフト後の値)に対してフィードバックシフト動作を4回実行した後の値(=8シフト後の値)を算出する。
【0084】
このとき、シフト数制御信号SFC=“0”、すなわち、1シフト回路220側が選択されたため、第1セレクタ240において、1シフト回路220の出力(=5シフト後の値)が選択され、m段フリップフロップ260に出力される。
【0085】
イネーブル信号SEN=“1”のときにクロックCKが供給されると、m段フリップフロップ260は内部状態として第1セレクタ240の出力(=5シフト後の値)を保持するとともに、シフトデータSDとして出力する。m段フリップフロップ260の内部状態がシフト数SFNに設定された5シフト後の値になると、制御回路210からラッチ信号LTが出力される。
【0086】
ラッチ信号LT=“1”のときにクロックCKが供給されると、ラッチ回路270において、シフトデータSDの値(=5シフト後の値)が保持され、シフト結果出力データDRとして出力される。シフト結果出力データDRは、1周期(2 m −1)ビットで位相シフト量5のM系列の1〜mビット分に当たる。
【0087】
すなわち、本実施形態によれば、図6に示したように、m段フリップフロップ260に初期値が設定されてから3クロック後に初期値に対する5シフト後のM系列が出力される。従来技術で同様の値を得るためには5クロック分のクロック供給が必要であるから、本実施形態により処理遅延が短縮されたことが判る。従って、本実施形態では、シフト数が大きくなる程、従来技術に対する処理遅延短縮量が大きくなることがわかる。
【0088】
以上が実施形態の基本動作例である。そして、本実施形態によれば、任意の位相シフト量に対するM系列をmビットづつ生成するため、図6の一連の動作終了後、シフト数設定信号SNSET及びシフト数SFNを再設定し、図6の動作終了時のm段フリップフロップ260の内部状態を新しい初期値としてフィードバックシフト動作を実施する。
【0089】
図7に、図6の動作終了後、シフト数SFNに8を設定した場合のタイミングチャートを示す。
【0090】
本実施形態では、1周期(2 m −1)ビットのM系列をmビットづつ出力していくため、初めに任意の位相シフト後のmビットのM系列を出力した後のシフト数SFNには、mを再設定する必要があるが、ここでは回路動作の説明が目的であるため、例としてシフト数SFNに8を設定した場合の動作を示す。図7において、時刻Aまでの動作は図6の場合と同様であるので、その詳細な説明を省略する。
【0091】
m段フリップフロップ260において、内部状態の更新を行うのは、イネーブル信号SEN=“1”のときにクロックCKが供給されたときのみである。従って、シフト数SFNに設定されたシフト分の動作が終了すると、イネーブル信号SEN=“0”になるように構成されている本実施形態では、シフト終了時の値がm段フリップフロップ260の内部状態として保持される。より具体的には、図7においては、シフト終了後、m段フリップフロップ260の内部状態として5シフト後の値が保持される。
【0092】
時刻Aを経過後、所定のタイミングでシフト数SFN=8が設定され、シフト数設定信号SNSET=“1”になると、m段フリップフロップ260に保持されている5シフト後の値を新しい初期値としてフィードバックシフト動作を行う。
【0093】
シフト数設定信号SNSET=“1”のときにクロックCKが供給されると、制御回路210においてシフト数SFNが取り込まれ、シフト数制御信号SFC及びイネーブル信号SENが生成される。
【0094】
1シフト回路220では、シフトデータSD(=5シフト後の値)に対してフィードバックシフト動作を1回実行した後の値(=6シフト後の値)を算出する。
【0095】
n(=4)シフト回路230では、シフトデータSD(=5シフト後の値)に対してフィードバックシフト動作をn(=4)回実行した後の値(=9シフト後の値)を算出する。
【0096】
ここで、シフト数制御信号SFC=“1”であるため、第1セレクタ240において、4シフト回路230の出力(=9シフト後の値)が選択されて、m段フリップフロップ260に出力される。
【0097】
イネーブル信号SEN=“1”のときにクロックCKが供給されると、m段フリップフロップ260は内部状態として第1セレクタ240の出力(=9シフト後の値)を保持するとともに、シフトデータSDとして出力する。
【0098】
1シフト回路220では、シフトデータSD(=9シフト後の値)に対してフィードバックシフト動作を1回実行した後の値(=10シフト後の値)を算出する。
【0099】
n(=4)シフト回路230では、シフトデータSD(=9シフト後の値)に対してフィードバックシフト動作を4回実行した後の値(=13シフト後の値)を算出する。
【0100】
ここで、シフト数制御信号SFC=“1”であるため、第1セレクタ240において、n(=4)シフト回路230の出力(=13シフト後の値)が選択されm段フリップフロップ260に出力される。
【0101】
イネーブル信号SEN=“1”のときにクロックCKが供給されると、m段フリップフロップ260は内部状態として第1セレクタ240の出力(=13シフト後の値)を保持するとともに、シフトデータSDとして出力する。
【0102】
m段フリップフロップ260の内部状態がシフト数SFNに設定された8シフト後の値になると、制御回路210からラッチ信号LTが出力される。ラッチ信号LTが“1”のときにクロックCKが供給されると、ラッチ回路270においてシフトデータSDの値(=13シフト後の値)が保持され、シフト結果出力データDRとして出力される。
【0103】
以上の説明のように、シフト終了後にシフト数設定信号SNSETとシフト数SFNの再設定を行うと、(1回目に設定したシフト数+2回目に設定したシフト数)分のシフト動作終了後のmビット分のM系列が得られる。よって、任意の位相シフト量をシフト数SFNに設定して動作させた後、シフト数SFNにmを設定して回路を動作させれば、1回目の動作で任意の位相のずれがあるM系列の1〜mビット分出力され、2回目の動作で(m+1)〜(m+m)ビット分のM系列が出力される。これは従来回路で生成するM系列と等価なM系列となる。
【0104】
次に、本実施形態の制御回路210の動作について説明する。
【0105】
図8は、制御回路210の動作を示すタイミングチャートである。図8では、一例として、シフト数SFNに15が設定された場合の制御回路210の動作を示している。
【0106】
シフト数設定信号SNSET=“1”のときにクロックCKが供給されると、第1ダウンカウンタ211にシフト数SFNの2進値(=00001111)のうちMSBから2ビットまでの値である「000011」が設定され、第2ダウンカウンタ215にシフト数SFNの2進値のうち1ビットからLSBまでの値である「11」が設定される。
【0107】
第1比較器212は、第1ダウンカウンタ211の内部状態が「000001」以上となったので、“1”を出力する。また、第3比較器216は、第2ダウンカウンタ215の内部状態が「01」以上となったので、“1”を出力する。
【0108】
第1ダウンカウンタ211は、第1ダウンカウンタ211の内部状態が「000001」以上であり、第1比較器212の出力が“1”である間、クロックCKが供給される毎にデクリメントカウントを実行し、第1ダウンカウンタ211の内部状態が「000000」になると、動作を停止する。
【0109】
第1ダウンカウンタ211の内部状態が「000000」になると、第1比較器212は“0”を出力し、第1AND回路214は“1”を出力する。
【0110】
第2ダウンカウンタ215は、第2ダウンカウンタ215の内部状態が「01」以上であり、第1AND回路214の出力が“1”である間、クロックCKが供給される毎にデクリメントカウントを実行し、第2ダウンカウンタ215の内部状態が「00」になると、動作を停止する。第2ダウンカウンタ215の内部状態が「00」になると、第3比較器216及び第1AND回路214は“0”を出力する。
【0111】
シフト数制御信号SFCは、第1比較器212の出力が“1”である間、“1”を出力する。イネーブル信号SENは、第1比較器212あるいは第3比較器216のいずれか一方が“1”である間、“1”を出力する。フリップフロップ218は、イネーブル信号SENをクロックCKの1周期分遅延した信号を出力する。
【0112】
従って、制御回路210から出力されるラッチ信号LTは、第2ダウンカウンタ215の内部状態が「00」になった点からクロックCKの1周期分の期間“1”となる。
【0113】
以上の説明のように、本実施形態によれば、シフト数SFNに設定される値がnシフト回路230でのシフト量nよりも大きい場合、図1に示す回路を用いて1クロックで1シフトする動作と1クロックでnシフトする動作を組み合わせてシフト結果を算出することにより、従来よりも短時間で所望する位相シフト量に対するM系列を生成することができる。
【0114】
また、m段フリップフロップの内部状態をmビットのバス信号であるシフト結果出力データDRとして出力することにより1周期(2 m −1)ビットのM系列をmビットづつパラレル出力することになるため、暗号元の送信データの伝送速度に合わせた高速動作が不要となる。
【0115】
【発明の効果】
以上説明したように、本発明によれば、従来よりも短時間で所望する位相シフト量に対するM系列を生成することができる。また、1周期(2 m −1)ビットのM系列をmビットづつパラレル出力することになるため、暗号元の送信データの伝送速度に合わせた高速動作が不要となる。
【図面の簡単な説明】
【図1】図1のフィードバックシフトレジスタ回路の一実施形態を示す概要構成図である。
【図2】図1のフィードバックシフトレジスタ回路のm段フリップフロップの概要構成ブロック図である。
【図3】図1のフィードバックシフトレジスタ回路の制御回路の概要構成ブロック図である。
【図4】図1のフィードバックシフトレジスタ回路の1シフト回路の概要構成ブロック図である。
【図5】図1のフィードバックシフトレジスタ回路のnシフト回路の概要構成ブロック図である。
【図6】図1のフィードバックシフトレジスタ回路の実施形態の動作タイミングチャートである。
【図7】本発明にかかるフィードバックシフトレジスタ回路において、シフト終了後にシフト数SFNを再設定した場合の動作タイミングチャートである。
【図8】図1のフィードバックシフトレジスタ回路の制御回路210の回路動作図である。
【図9】従来のフィードバックシフトレジスタ回路の一例を示す構成図である。
【符号の説明】
100 フィードバックシフトレジスタ
101 セレクタ
102 フリップフロップ
200 フィードバックシフトレジスタ
210 制御回路
211 第1ダウンカウンタ
212 第1比較器
213 第2比較器
214 第1AND回路
215 第2ダウンカウンタ
216 第3比較器
217 OR回路
218 フリップフロップ
219 第2AND回路
220 1シフト回路
221 演算回路
222 乗算器
223 加算器
230 nシフト回路
240 第1セレクタ
250 第2セレクタ
260 m段フリップフロップ
261 フリップフロップ
270 ラッチ回路
SSET 初期値設定信号
DINIT 初期値データ
FB フィードバック係数
CK クロック
CKT クロック端子
SNSET シフト数設定信号
SFN シフト数
DR シフト結果出力データ
SFC シフト数制御信号
SEN イネーブル信号
LT ラッチ信号
DS1R 1シフト結果
DSnR nシフト結果
SD シフトデータ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a feedback shift register circuit, and more particularly to a feedback shift register circuit for generating an M-sequence pseudo-random number sequence.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, communication systems using spread spectrum modulation are known in which the spectrum of a large number of signals is spread over a wide band, multiplexed (encrypted), and transmitted by code division multiple access. ing. In this communication method, a process of adding a pseudo random number to the transmission data series by exclusive OR for multiplexing of transmission data is performed. In this case, an M sequence is generally used as a pseudo random number sequence (pseudo noise sequence).
[0003]
As shown in FIG. 9, the M-sequence pseudo-random sequence can be generated by a feedback shift register including m stages of flip-flops. The stage number m of the flip-flop is a value corresponding to the degree of the polynomial for generating the M series.
[0004]
The
[0005]
The initial value data DINIT, which is one of the inputs to the selectors 101-1 to 101-m, is an m-bit bus signal, and the bits DINIT-1 to DINIT-m of the initial value data DINIT are respectively selected by the selector 101-. Input to 1 to 101-m.
[0006]
When the initial value setting signal SSET = “1”, the selectors 101-1 to 101-m select the respective bits DINIT-1 to DINIT-m of the corresponding initial value data DINIT. When the initial value setting signal SSET = “0”, the selectors 101-1 to 101-m select the outputs of the preceding flip-flops 102-1 to 102- (m−1), and the selector 101-1 performs the operation. The output of the
[0007]
When the clock CK is supplied to the flip-flops 102-1 to 102- (m-1), the flip-flops 102-1 to 102- (m-1) hold outputs from the selectors 101-1 to 101- (m-1) in the previous stage as internal states and Are output to the selectors 101-2 to 101-m in the next stage and the multipliers 222-1 to 222- (m-1) in the
[0008]
When the clock CK is supplied to the flip-flop 102 -m, the flip-flop 102 -m holds the output from the selector 101 -m in the previous stage as an internal state, and also stores the internal state in the shift result data DRES and the multiplier 222 -m in the
[0009]
The
[0010]
The feedback coefficient FB, which is one of the inputs to the multipliers 222-1 to 222-m, has a period (2 m -1) Is a coefficient for determining a feedback value to the flip-flop 102-1 for generating the M-sequence, and is an m-bit bus signal. Each bit of the feedback coefficient FB is set to FB-1 to FB-m.
[0011]
Each of multipliers 222-1 to 222-m receives the output of flip-flops 102-1 to 102- (m-1) as a multiplied value, and each bit FB-1 of feedback coefficient FB as a multiplied value. ~ FB-m is input.
[0012]
The outputs of the multipliers 222-1 to 222-m are input to (m-1) adders 223-1 to 223- (m-1), and the exclusive logic of the entire multipliers 222-1 to 222-m is obtained. The sum is calculated. The calculation result is output as a feedback value to the flip-flop 102-1.
[0013]
Next, the operation of the feedback shift register shown in FIG. 9 will be described.
[0014]
When the initial value setting signal SSET = "1", the selectors 101-1 to 101-m select the respective bits DINIT-1 to DINIT-m of the initial value data DINIT, and the flip-flops 102-1 to 102- (m Output to -1). When the clock CK is supplied to the flip-flops 102-1 to 102- (m-1), each bit DINIT- of the initial value data DINIT output from the selectors 101-1 to 101- (m-1) in the previous stage is supplied. 1 to DINIT-m are held as internal states.
[0015]
After the initial value data DINIT is set, the flip-flops 102-1 to 102- (m-1) hold the outputs of the preceding flip-flops 102-1 to 102- (m-1) as internal states, and the flip-flop 102 -1 holds the output of the
[0016]
[Problems to be solved by the invention]
In the conventional
[0017]
In the
[0018]
Accordingly, an object of the present invention is to generate an M-sequence pseudo-random number sequence corresponding to a desired phase shift amount with a small number of clocks, and to transmit an encryption source transmission data sequence that is an output destination of the shift result data DRES. An object of the present invention is to provide a feedback shift register capable of operating at an internal processing speed lower than the above processing speed.
[0019]
[Means for Solving the Problems]
In order to solve the above problem, a feedback shift register circuit for generating an M-sequence pseudo-random number sequence according to the present invention includes:Entered1 bit of dataIn unitsA shift circuit for shifting;EnteredN (where n isBy a power of 22 or more natural number) bitsIn unitsAn n-shift circuit for shifting;A selection circuit that selects and outputs one of the output of the 1-shift circuit and the output of the n-shift circuit, internally holds data output from the selection circuit, and outputs it as shift data. Data is fed back to the inputs of the 1 shift circuit and the n shift circuit.Shift data generation circuit andThe number of selections of the output of the n shift circuit in the selection circuit is set to the number of integer solutions obtained by dividing the desired number of shifts by n, and the number of selections of the output of the one shift circuit is a remainder generated by the division A selection control circuit that sets the number of the shift data, and a latch circuit that latches the shift data output from the shift data generation circuit at a predetermined timing and outputs the latched data as output data to the outsideIt is provided with.
[0021]
The latch circuit receives the output data.1 cycle (2 m -1) M bits of M-sequence pseudo-random sequence of bitsOutput as dataYou may do it.
[0022]
further,The shift data generation circuit includes m flip-flops connected in parallel according to the order of a characteristic polynomial for generating the M-sequence pseudo-random sequence,Select circuit outputWhile holding as an internal state and outputting the internal state as an m-bit signal,The m-bit signal1 shift circuit and n shift circuitInputAn m-stage flip-flop circuit that feeds back the signal may be provided.
[0024]
DETAILED DESCRIPTION OF THE INVENTION
Next, embodiments of the present invention will be described in detail with reference to the drawings. First, prior to description of a specific embodiment, an operation principle of a feedback shift register circuit according to the present invention will be described.
[0025]
In the present embodiment, a circuit for calculating the internal state of each flip-flop after performing a feedback shift operation once for the internal state of the m-stage feedback shift register, and feedback for the internal state of the m-stage feedback shift register Shift operation n times (n = 2 x ,n ≧ 2) Mainly characterized by having a circuit that calculates the internal state of each flip-flop after execution, by combining an operation that shifts once per clock and an operation that shifts n times per clock, An M-sequence pseudo-random sequence for a desired phase shift amount is generated with a smaller number of clocks than in the prior art.
[0026]
For example, in order to calculate the M series with the phase shifted by j (j ≧ n), the operation of shifting n by one clock is as follows:
INT (j / n) [times]
(Here, INT (X) represents the integer part of X.)
To perform one shift with one clock,
j- {n × INT (j / n)} [times]
Realize by doing.
[0027]
More specifically, when n = 4 is set, in order to calculate an M sequence in which the phase is shifted by j = 15, an operation of shifting 4 by one clock is performed.
INT (j / 4)
= INT (15/4)
= INT (3.75)
= 3 [times]
Done and the rest
j- {n * INT (j / 4)}
= 15− {4 × INT (15/4)}
= 15− {4 × INT (3.75)}
= 15- {4 × 3}
= 3
By performing the operation of shifting one time by one clock, the M series after j = 15 shift is calculated.
[0028]
In this embodiment, the internal state of the m-stage feedback shift register is output to the outside as a bus signal. Therefore, the m-stage feedback shift register sequentially outputs the m-th value of the flip-flop, so that when the m-th value is output at a certain time t, at the next time (t + 1), the time t The value of the (m−1) th stage at the time is output, and the value of the (m−2) th stage at the time t is output at the time (t + 2). Therefore, if the internal state of the m-stage feedback shift register at a certain time t is output as an m-bit bus signal, an M sequence from time t to time (t + m) can be obtained.
[0029]
Furthermore, in this embodiment, since an M sequence for an arbitrary phase shift amount can be generated, after an m-bit M sequence is generated once, an m shift is performed with respect to the internal state of the m-stage feedback shift register at that time. The operation of calculating the subsequent internal state and outputting it as an m-bit M series is repeated. As a result, the same M sequence as when the M sequence is sequentially output in the conventional circuit is obtained in m bits. Therefore, one cycle (2 m -1It is possible to output M series of bits m bits at a time, eliminating the need to increase the internal operation of the feedback shift register in accordance with the transmission speed of the transmission data of the encryption source.
[0030]
Next, specific embodiments of the feedback shift register circuit according to the present invention will be described.
[0031]
FIG. 1 is a schematic configuration diagram showing an embodiment of a feedback shift register circuit according to the present invention. Note that the initial value setting signal SSET, initial value data DINIT, and feedback coefficient FB input to the present invention are equivalent to signals input to the conventional circuit in terms of signal function, bit width, and the like.
[0032]
The
[0033]
The
[0034]
The 1-
[0035]
The
[0036]
The
[0037]
Here, an outline operation of the
[0038]
Similarly, the
[0039]
The 1-
[0040]
The
[0041]
The
[0042]
The
[0043]
FIG. 2 is a schematic configuration block diagram of the m-stage flip-
[0044]
When the initial value setting signal SSET = “1” is supplied to the load terminal Load and the clock CK is supplied to the clock terminal CKT, the flip-flops 261-1 to 261 -m of the m-stage flip-
[0045]
When the enable signal SEN output from the
[0046]
The flip-flops 261-1 to 261-m output the internal state of the flip-flops 261-1 to 261-m as shift data bits SD-1 to SD-m. The shift data SD configured as an m-bit bus signal is output to the
[0047]
The
[0048]
Hereinafter, the detailed configuration and detailed operation of each unit in this embodiment will be described.
[0049]
FIG. 3 is a block diagram illustrating a configuration example of the
[0050]
The
[0051]
The
[0052]
The
[0053]
The
[0054]
The first AND
[0055]
The
[0056]
The
[0057]
The
[0058]
The OR
[0059]
As a result, “1” is output from the
[0060]
Therefore, the
[0061]
The second AND
[0062]
FIG. 4 is a schematic block diagram showing an example of the 1-shift circuit 220 (see FIG. 1). FIG. 4 shows the configuration of the 1-
[0063]
The internal configuration of the
[0064]
The n shift circuit 230 (see FIG. 1) is configured by connecting n
[0065]
In the arithmetic circuit 221-1, shift data SD-1 to SD-64, which are outputs of the m-stage flip-flop 260 (see FIG. 1), are input as multiplication values to the multipliers, and feedback coefficients FB are used as multiplication values. -1 to FB-64 are input. The output of the arithmetic circuit 221-1 is output to the arithmetic circuits 221-2 to 221-4 and the 4-shift result DS4R-4.
[0066]
In the arithmetic circuit 221-2, the output of the arithmetic circuit 221-1 is input as a multiplied value to the multiplier 222-1 (see FIG. 9), and shifted as the multiplied value to the multipliers 222-2 to 222-64. Data SD-1 to SD-63 are input. Feedback coefficient bits FB-1 to FB-64 are input as multiplication values to the multipliers 222-1 to 222-64. The output of the arithmetic circuit 221-2 is output to the arithmetic circuits 221-3 to 221-4 and is output as the 4-shift result DS4R-3.
[0067]
In the arithmetic circuit 221-3, the output of the arithmetic circuit 221-2 is input as the multiplied value to the multiplier 222-1 and the output of the arithmetic circuit 221-1 is input as the multiplied value to the multiplier 222-2. Shift data SD-1 to SD-62 are input as multiplied values to the multipliers 222-3 to 222-64. Feedback coefficients FB-1 to FB-64 are input as multiplication values to the multipliers 222-1 to 222-64. The output of the arithmetic circuit 221-3 is output to the arithmetic circuit 221-4 and the 4-shift result DS4R-2.
[0068]
In the arithmetic circuit 221-4, the output of the arithmetic circuit 221-3 is input as the multiplied value to the multiplier 222-1 and the output of the arithmetic circuit 221-2 is input as the multiplied value to the multiplier 222-2. The output of the arithmetic circuit 221-1 is input as the multiplied value to the multiplier 222-3, and the shift data SD-1 to SD-61 are input as the multiplied values to the multipliers 222-4 to 222-64. The Feedback coefficients FB-1 to FB-64 are input as multiplication values to the multipliers 222-1 to 222-64. The output of the arithmetic circuit 221-4 is output as the 4-shift result DS4R-1.
[0069]
The values of the shift data SD-1 to D-60 are output from the 4-shift results DS4R-5 to DS4R-64.
[0070]
Each of the flip-flops 261-1 to 261- in the m-stage flip-
[0071]
In the above description, the case where n = 4 has been described as an example. However, when n is other than 4, if n
[0072]
The operation of the feedback shift register circuit will be described below.
[0073]
6 to 8 show the case where the number m of stages of the m-stage flip-
[0074]
First, the basic operation of the entire circuit will be described with reference to the timing chart of FIG.
[0075]
FIG. 6 is a timing chart when the shift number SFN = 5 is input.
[0076]
When the clock CK is supplied when the initial value setting signal SSET is “1”, the m-stage flip-
[0077]
When the clock CK is supplied when the shift number setting signal SNSET is “1”, the
[0078]
The 1
[0079]
The n (= 4)
[0080]
At this time, since the shift number control signal SFC is 1, the output of the n (= 4) shift circuit 230 (= the value after 4 shifts) is selected by the
[0081]
When the clock CK is supplied when the enable signal SEN is “1”, the m-stage flip-
[0082]
The 1-
[0083]
The n (= 4)
[0084]
At this time, since the shift number control signal SFC = “0”, that is, the 1
[0085]
When the clock CK is supplied when the enable signal SEN = “1”, the m-stage flip-
[0086]
When the clock CK is supplied when the latch signal LT = “1”, the value of the shift data SD (= the value after 5 shifts) is held in the
[0087]
That is, according to the present embodiment, as shown in FIG. 6, an M sequence after 5 shifts with respect to the initial value is
[0088]
The above is the basic operation example of the embodiment. According to the present embodiment, in order to generate an M sequence for an arbitrary phase shift amount by m bits, the shift number setting signal SNSET and the shift number SFN are reset after the series of operations in FIG. The feedback shift operation is performed using the internal state of the m-stage flip-
[0089]
FIG. 7 shows a timing chart when the shift number SFN is set to 8 after the operation of FIG.
[0090]
In this embodiment, one cycle (2 m -1) Since the M sequence of bits is output by m bits, it is necessary to reset m to the shift number SFN after the output of the m-bit M sequence after any phase shift first. Since the purpose is to explain the circuit operation, the operation when the shift number SFN is set to 8 is shown as an example. In FIG. 7, since the operation up to time A is the same as that in FIG. 6, detailed description thereof is omitted.
[0091]
In the m-stage flip-
[0092]
After the time A has elapsed, the shift number SFN = 8 is set at a predetermined timing, and when the shift number setting signal SNSET = “1”, the value after 5 shifts held in the m-stage flip-
[0093]
When the clock CK is supplied when the shift number setting signal SNSET = “1”, the
[0094]
The 1-
[0095]
The n (= 4)
[0096]
Here, since the shift number control signal SFC = “1”, the output of the 4 shift circuit 230 (= the value after 9 shifts) is selected by the
[0097]
When the clock CK is supplied when the enable signal SEN = “1”, the m-stage flip-
[0098]
The 1-
[0099]
The n (= 4)
[0100]
Here, since the shift number control signal SFC = “1”, the output of the n (= 4) shift circuit 230 (= the value after 13 shifts) is selected by the
[0101]
When the clock CK is supplied when the enable signal SEN = “1”, the m-stage flip-
[0102]
When the internal state of the m-stage flip-
[0103]
As described above, when the shift number setting signal SNSET and the shift number SFN are reset after the shift is completed, m after the shift operation is completed for (shift number set for the first time + shift number set for the second time). An M sequence of bits is obtained. Therefore, after operating with an arbitrary phase shift amount set to the shift number SFN and then operating the circuit with the shift number SFN set to m, the M sequence has an arbitrary phase shift in the first operation. 1 to m bits are output, and an M sequence of (m + 1) to (m + m) bits is output in the second operation. This is an M sequence equivalent to the M sequence generated by the conventional circuit.
[0104]
Next, the operation of the
[0105]
FIG. 8 is a timing chart showing the operation of the
[0106]
When the clock CK is supplied when the shift number setting signal SNSET = “1”, the binary value of the shift number SFN (= 000011111) to the
[0107]
The
[0108]
The
[0109]
When the internal state of the
[0110]
The
[0111]
The shift number control signal SFC outputs “1” while the output of the
[0112]
Accordingly, the latch signal LT output from the
[0113]
As described above, according to the present embodiment, when the value set in the shift number SFN is larger than the shift amount n in the
[0114]
Further, by outputting the internal state of the m-stage flip-flop as shift result output data DR which is an m-bit bus signal, one cycle (2 m -1) Since the M series of bits is output in m bits in parallel, a high-speed operation in accordance with the transmission speed of the transmission data of the encryption source is unnecessary.
[0115]
【The invention's effect】
As described above, according to the present invention, it is possible to generate an M sequence for a desired phase shift amount in a shorter time than in the past. One cycle (2 m -1) Since the M series of bits is output in m bits in parallel, a high-speed operation in accordance with the transmission speed of the transmission data of the encryption source is unnecessary.
[Brief description of the drawings]
1 is a schematic configuration diagram showing an embodiment of a feedback shift register circuit of FIG. 1;
2 is a schematic configuration block diagram of an m-stage flip-flop of the feedback shift register circuit of FIG. 1;
3 is a block diagram showing a schematic configuration of a control circuit of the feedback shift register circuit of FIG. 1. FIG.
4 is a schematic configuration block diagram of one shift circuit of the feedback shift register circuit of FIG. 1; FIG.
5 is a schematic configuration block diagram of an n shift circuit of the feedback shift register circuit of FIG. 1. FIG.
6 is an operation timing chart of the embodiment of the feedback shift register circuit of FIG. 1; FIG.
FIG. 7 is an operation timing chart when the shift number SFN is reset after the shift is completed in the feedback shift register circuit according to the present invention.
8 is a circuit operation diagram of a
FIG. 9 is a block diagram showing an example of a conventional feedback shift register circuit.
[Explanation of symbols]
100 Feedback shift register
101 selector
102 flip-flop
200 Feedback shift register
210 Control circuit
211 First down counter
212 First comparator
213 Second comparator
214 First AND circuit
215 Second down counter
216 Third comparator
217 OR circuit
218 flip-flop
219 Second AND circuit
220 1 shift circuit
221 arithmetic circuit
222 multiplier
223 Adder
230 n shift circuit
240 First selector
250 Second selector
260 m-stage flip-flop
261 flip-flop
270 Latch circuit
SSET initial value setting signal
DINIT initial value data
FB feedback coefficient
CK clock
CKT clock terminal
SNSET Shift number setting signal
SFN shift number
DR shift result output data
SFC shift number control signal
SEN enable signal
LT Latch signal
DSnR n shift result
SD shift data
Claims (3)
入力されるデータを1ビット単位でシフトする1シフト回路と、
入力されるデータをn(nは2のべき乗で2以上の自然数)ビット単位でシフトするnシフト回路と、
前記1シフト回路の出力と前記nシフト回路の出力とのいずれか一方を選択して出力する選択回路と、
該選択回路から出力されるデータを内部保持してシフトデータとして出力するとともに、該シフトデータを前記1シフト回路及び前記nシフト回路の入力にフィードバックするシフトデータ生成回路と、
前記選択回路での前記nシフト回路の出力の選択回数を所望のシフト数をnで除算した整数解の数に設定するとともに、前記1シフト回路の出力の選択回数を前記除算で生じた余りの数に設定する選択制御回路と、
前記シフトデータ生成回路から出力されるシフトデータを所定のタイミングでラッチし、出力データとして外部に出力するラッチ回路とを備えたことを特徴とするフィードバックシフトレジスタ回路。In a feedback shift register circuit for generating an M-sequence pseudo-random sequence,
A 1-shift circuit that shifts input data in 1-bit units ;
An n shift circuit that shifts input data by n (n is a power of 2 and a natural number of 2 or more) bits;
A selection circuit that selects and outputs either the output of the 1 shift circuit or the output of the n shift circuit;
A shift data generation circuit that internally holds data output from the selection circuit and outputs the data as shift data, and feeds back the shift data to inputs of the 1 shift circuit and the n shift circuit ;
The number of selections of the output of the n shift circuit in the selection circuit is set to the number of integer solutions obtained by dividing the desired number of shifts by n, and the number of selections of the output of the one shift circuit is a remainder generated by the division A selection control circuit to set to a number;
A feedback shift register circuit comprising: a latch circuit that latches shift data output from the shift data generation circuit at a predetermined timing and outputs the latched data as output data to the outside .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002153241A JP4152124B2 (en) | 2002-05-28 | 2002-05-28 | Feedback shift register circuit |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002153241A JP4152124B2 (en) | 2002-05-28 | 2002-05-28 | Feedback shift register circuit |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003345246A JP2003345246A (en) | 2003-12-03 |
| JP4152124B2 true JP4152124B2 (en) | 2008-09-17 |
Family
ID=29770321
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002153241A Expired - Fee Related JP4152124B2 (en) | 2002-05-28 | 2002-05-28 | Feedback shift register circuit |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4152124B2 (en) |
-
2002
- 2002-05-28 JP JP2002153241A patent/JP4152124B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003345246A (en) | 2003-12-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US6339781B1 (en) | M-sequence generator and PN code generator with mask table for obtaining arbitrary phase shift | |
| JP3784476B2 (en) | Timing signal generation method and apparatus | |
| US6192385B1 (en) | Pseudorandom number generating method and pseudorandom number generator | |
| JP4890976B2 (en) | Cryptographic processing device | |
| US20050097153A1 (en) | Pseudorandom number generator | |
| US5608802A (en) | Data ciphering device | |
| US9166795B2 (en) | Device and method for forming a signature | |
| JP2003263310A (en) | Method for multiplying two coefficients from Galois field and multiplier for performing this method | |
| JPH1032492A (en) | Code conversion circuit | |
| CN115268839B (en) | Montgomery modular multiplication method and device based on 2 | |
| JP4152124B2 (en) | Feedback shift register circuit | |
| KR20040048471A (en) | Serial finite-field multiplier | |
| JP5119417B2 (en) | Pseudo random number generator | |
| US6230178B1 (en) | Method for the production of an error correction parameter associated with the implementation of a modular operation according to the Montgomery method | |
| JPH10308720A (en) | Circuit for arbitrarily shifting m-sequence | |
| KR100480997B1 (en) | APPARATUS OF FIELD MULTIPLICATION OVER GF(p) AND GF(2^m) | |
| JP2010160248A (en) | Gold sequence pseudo-random number generating circuit | |
| EP1402394A2 (en) | Dsp execution unit for efficient alternate modes of operation | |
| US7502814B2 (en) | Device and method for generating a pseudorandom sequence of numbers | |
| JP3914626B2 (en) | PN code generation circuit | |
| JP2558678B2 (en) | Pseudo random number generator | |
| JP2000350262A (en) | Code generating method and circuit | |
| JPH10117128A (en) | Pseudo noise sequence code phase controller | |
| JPH1146132A (en) | Code generating circuit | |
| JP3567256B2 (en) | Stepping motor drive circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20050407 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20080121 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20080317 |
|
| 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: 20080611 |
|
| 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: 20080701 |
|
| 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: 20110711 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110711 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120711 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120711 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130711 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |