JP3618554B2 - Code generation method and code generation apparatus - Google Patents
Code generation method and code generation apparatus Download PDFInfo
- Publication number
- JP3618554B2 JP3618554B2 JP24405698A JP24405698A JP3618554B2 JP 3618554 B2 JP3618554 B2 JP 3618554B2 JP 24405698 A JP24405698 A JP 24405698A JP 24405698 A JP24405698 A JP 24405698A JP 3618554 B2 JP3618554 B2 JP 3618554B2
- Authority
- JP
- Japan
- Prior art keywords
- mask
- transformation matrix
- vector
- shift
- mask pattern
- 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
Images
Description
【0001】
【発明の属する技術分野】
この発明は、符号発生方法および符号発生装置に関し、詳細には、M系列、GOLD系列などの符号系列を発生する符号発生方法および符号発生装置に関するものである。
【0002】
【従来の技術】
近年、移動体通信において、チャネル容量が多いことからCDMA(Code Division Multiple Access) 方式が次世代通信方式として注目されている。CDMA方式では各チャネルを分離するためにチャネル毎に異なるPN系列が用いられ、このPN系列にはM系列(maximum−length sequence;最大周期系列)やM系列より生成されるGOLD系列等が頻繁に用いられている。
【0003】
しかしながら、このM系列の周期が長い場合は、任意に位相シフトした系列を生成するために膨大な演算処理を必要とする。このため、高速で、かつ、少ないメモリ量および回路規模で位相シフトの演算を行う方法を確立することは極めて重要なことである。任意にシフトしたM系列の生成法として、マスクパターンによりM系列をシフトさせることができるが、マスクパターンの生成には膨大な演算処理が必要となる。
【0004】
この種のM系列生成装置として、たとえば、特開平7−297685号公報、同8−18550号公報がある。
【0005】
まず、図24を参照して特開平7−297685号公報開示の技術について説明する。図24には上記特開平7−297685号公報の符号発生装置が開示されている。図24に示した符号発生装置は、PN系列を生成するPN生成器101、該PN生成器101から出力されるPN系列をPNマスク変換器102から出力されるPNマスクデータでマスクしてから出力するマスク回路103、該マスク回路103にPNマスクデータを供給するPNマスク変換器102を備えている。
【0006】
つづいて、上記PNマスク変換器102について図25を用いて説明する。図25はPNマスク変換器102のマスク変換方法について説明するフローチャートであり、図26はM,LSBの変化に対応するm,位相の変化を示している。図25、図26において、初期のマスクパターンをkシフトのmk とし、mk からさらに100シフトしたマスクパターンMl 100 mk =mk+100 を求める。シフト量L=100=1100100b(bは2進)、Ml は1シフトする行列、1ステップはループの1周に対応する。図25では、シフト量の1100100bを右シフトさせながらLSBを取り出し、LSB=1の場合にm←Mmを実行する。
【0007】
具体的には、まずシフト量が0より大きく(ステップS101、Yesルート)、かつ、シフト量のLSBが0の場合(ステップS102、Yesルート)、Mmをmに挿入して(ステップS103)、シフト量を右にシフトする操作が実施される(ステップS104)。またシフト量のLSBが0以外の場合には(ステップS102、Noルート)、ステップS104においてシフト量を右にシフトする操作が実施される。
【0008】
その後、シフト量が0より大きな場合は(ステップS105、Yesルート)、M←MMの処理が実施される(ステップS106)。またシフト量が0の場合には(ステップS105、Noルート)、そのまま処理はステップS101に戻る。なお、ステップS101においてシフト量が0の場合には、マスクパターンがマスク回路103へ供給される。
【0009】
つぎに、図27を参照して特開平8−18550号公報に開示された技術について説明する。図27には特開平8−18550号公報による符号発生装置が示されている。図27に示した符号発生装置は、レジスタ201、演算回路202、メモリ203、スイッチ204、および、制御回路205を備えている。
【0010】
図27に示したように、符号発生装置に、nビットの符号を保持するレジスタ201と、このレジスタ201に対して行列演算を施す演算回路202とを設けることで、その演算結果をレジスタ201に帰還することにより、逐次的に符号系列を発生する演算回路202の行列を、メモリ203とスイッチ204とにより変更して繰り返し用いて所望の符号系列を発生させるものである。
【0011】
【発明が解決しようとする課題】
ところが、上記特開平7−297685号公報に開示の符号発生装置では、汎用の行列×ベクトルの演算が必要となり、ハードウェアにより1ステップで行うには回路規模が大きくなる。また、ソフトで実現するにはnステップが必要であり、処理時間が長くなるという問題点があった。さらに、上記特開平7−297685号公報に開示の符号発生装置では、PN生成器101や行列×行列の演算が必要になることから、回路規模が大きくなるという問題点もあった。
【0012】
また、特開平8−18550号公報開示の符号発生装置では、ROM(メモリ203)が必要となることから、回路規模が大きくなるとともに、汎用の行列×ベクトルの演算回路202が必要となることから、回路規模が大きくなり、さらに、演算にn2 ステップ数が必要となってステップ数が多くなることから、処理時間が長くなるという問題点があった。
【0013】
本発明は、上述した従来の問題を解消するため、マスクパターンの高速生成と回路の小型化を実現することが可能な符号生成方法および符号発生装置を得ることを目的とする。
【0014】
また、本発明は、マスクパターンの計算とM系列の生成法の類似性に着目し、マスクパターンを用いずに直接シフトレジスタの初期状態を生成することが可能な符号発生装置を得ることを目的とする。
【0015】
【課題を解決するための手段】
上述した課題を解決し、目的を達成するため、この発明にかかる符号発生装置は、生成多項式により固定される第1マスク変換行列と変換前のマスクベクトルとの積で新たなマスクベクトルを求める第1ステップと、シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列と前記第1ステップで求めたマスクベクトルとの積で新たなマスクベクトルを求める第2ステップと、前記シフト量データをMSB側へシフトする第3ステップと、前記第1ステップと前記第2ステップと前記第3ステップを指定回数繰り返した後にマスクベクトルに基づくマスクパターンを出力する第4ステップと、を含んだものである。
【0016】
この発明によれば、生成多項式により固定される第1マスク変換行列と変換前のマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列とマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データをMSB側へシフトし、上記各ステップを指定回数繰り返した後にマスクベクトルに基づくマスクパターンを出力するので、マスクパターンを高速に生成することができ、これにより、高速で小型の回路を実現することが可能となる。
【0017】
つぎの発明にかかる符号発生装置は、生成多項式により固定される第1マスク変換行列と変換前のマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列と前記マスクベクトルとの積で新たなマスクベクトルを求める演算手段と、前記シフト量データをMSB側へシフトするシフト手段と、前記演算手段と前記シフト手段を指定回数動作させた後にマスクベクトルに基づくマスクパターンを出力する出力手段と、を備えたものである。
【0018】
この発明によれば、演算手段により生成多項式により固定される第1マスク変換行列と変換前のマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列とマスクベクトルとの積で新たなマスクベクトルを求め、シフト手段によりシフト量データをMSB側へシフトし、出力手段により上記演算手段とシフト手段を指定回数動作させた後にマスクベクトルに基づくマスクパターンを出力するようにしたので、マスクパターンを高速に生成することができ、これにより、高速で小型の回路を実現することが可能となる。
【0019】
つぎの発明にかかる符号発生装置は、前記演算手段と前記シフト手段と前記出力手段とを用いて、任意の初期状態を表すデータを、設定された位相シフト量だけシフトさせるマスクパターンを生成し、以降、クロックが入力される度に1位相ずつシフトさせるマスクパターンを生成するマスクパターン生成手段と、前記マスクパターン生成手段で生成された前記設定された位相シフト量だけシフトさせるマスクパターンで、任意の初期状態を表すデータをマスクして1Bitの符号を得て、以降、前記1位相ずつシフトさせるマスクパターンを用いて順次1Bitずつ符号を得るマスク手段と、を備えたものである。
【0020】
この発明によれば、マスクパターンを生成して、初期状態をマスクすることによりシフトを行うようにしたので、マスクパターンに応じて符号が生成され、専用の符号発生器が不要となることから、回路規模の削減を図ることが可能となる。
【0021】
つぎの発明にかかる符号発生装置は、生成多項式により固定される第1マスク変換行列と符号発生器の状態を表す状態ベクトルとの積を求める第1演算手段と、位相シフトと符号発生のいずれか一方を指示するモードに応じて前記第1演算手段の出力と前記状態ベクトルとのいずれか一方を選択する第1セレクタと、生成多項式により固定される第2マスク変換行列と第1セレクタ出力との積を求める第2演算手段と、位相シフトと符号発生のいずれか一方を指示するモードおよびシフトデータのMSBに応じて前記第1セレクタか、前記第2演算手段の出力のいずれか一方を選択し、新たな状態ベクトルとする第2セレクタと、を備えたものである。
【0022】
この発明によれば、第1演算手段により生成多項式により固定される第1マスク変換行列と符号発生器の状態を表す状態ベクトルとの積を求め、第1セレクタにより位相シフトと符号発生のいずれか一方を指示するモードに応じて第1演算手段の出力と状態ベクトルとのいずれか一方を選択し、第2演算手段により生成多項式により固定される第2マスク変換行列と第1セレクタ出力との積を求め、第2セレクタにより位相シフトと符号発生のいずれか一方を指示するモードおよびシフトデータのMSBに応じて第1セレクタか、第2演算手段の出力のいずれか一方を選択し、新たな状態ベクトルとするようにしたので、簡単な構成でマスクパターンを用いず、直接に符号発生装置としての初期状態を生成すること、および符号を生成することが可能となる。
【0023】
つぎの発明にかかる符号発生装置において、前記状態ベクトルは、セレクタを介して位相の異なる符号をシフトさせる複数のシフトレジスタに接続されるものである。
【0024】
この発明によれば、状態ベクトルを、セレクタを介して位相の異なる符号をシフトさせる複数のシフトレジスタに接続させたので、一つの回路構成で符号発生を行うだけで、マスクを用いなくても、異なる位相の符号を多数得ることが可能となる。
【0025】
つぎの発明にかかる符号発生装置おいて、前記第1マスク変換行列は、前記第2マスク変換行列による位相シフト処理の2倍の位相シフトが可能なマスクパターンに基づいて特定することを特徴とする。
【0026】
この発明によれば、上記第1マスク変換行列および第2マスク変換行列のみを用いて位相シフト処理を行う構成としたため、マスクパターンを計算せずに、回路の状態を直接求めることができる。
【0027】
つぎの発明にかかる符号発生装置は、さらに、前記第1マスク変換行列は、生成多項式f(x)=g n x n +g n−1 x n−1 +g n−2 x n−2 +…+g 0 x 0 で、かつnが偶数の場合、
【数18】
とし、生成多項式f(x)=g n x n +g n−1 x n−1 +g n−2 x n−2 +…+g 0 x 0 で、かつnが奇数の場合、
【数19】
とすることを特徴とする。
【0028】
この発明によれば、特定構造を有する第1のマスク変換行列を用いることで設計が容易になり、さらに、回路規模を小さくすることができる。
【0029】
つぎの発明にかかる符号発生方法は、生成多項式により固定される第1マスク変換行列と符号発生器の状態を表す状態ベクトルとの積を求める第1の演算ステップと、位相シフトと符号発生のいずれか一方を指示するモードに応じて、前記第1の演算ステップによる演算結果と前記状態ベクトルのいずれか一方を選択する第1の選択ステップと、生成多項式により固定される第2マスク変換行列と前記第1の選択ステップによる選択結果との積を求める第2の演算ステップと、位相シフトと符号発生のいずれか一方を指示するモードおよびシフトデータのMSBに応じて、前記第1の選択ステップによる選択結果と前記第2の演算ステップによる演算結果のいずれか一方を選択し、その選択結果を新たな状態ベクトルとする第2の選択ステップと、を含み、さらに、前記第1マスク変換行列は、前記第2マスク変換行列による位相シフト処理の2倍の位相シフトが可能なマスクパターンに基づいて特定される行列とし、前記第1マスク変換行列および前記第2マスク変換行列の組み合わせによって、任意の位相シフト処理を行うことを特徴とする。
【0030】
この発明によれば、上記第1マスク変換行列および第2マスク変換行列のみを用いて位相シフト処理を行うこととしたため、マスクパターンを計算せずに、回路の状態を直接求めることができる。
【0031】
つぎの発明にかかる符号発生方法において、さらに、前記第1マスク変換行列としては、生成多項式f(x)=g n x n +g n−1 x n−1 +g n−2 x n−2 +…+g 0 x 0 で、かつnが偶数の場合、
【数20】
を用い、生成多項式f(x)=g n x n +g n−1 x n−1 +g n−2 x n−2 +…+g 0 x 0 で、かつnが奇数の場合は、
【数21】
を用いることを特徴とする。
【0032】
この発明によれば、特定構造を有する第1のマスク変換行列を用いることで設計が容易になり、さらに、回路規模を小さくすることができる。
【0033】
【発明の実施の形態】
以下に添付図面を参照して、この発明にかかる符号発生方法および符号発生装置の好適な実施の形態を詳細に説明する。
【0034】
実施の形態1.
まず、本実施の形態の説明に入る前に、マスクパターンによる任意位相のM系列の生成原理について一般的に用いられているものを説明する。ここでは、符号発生装置の一例としてM系列発生器を例に挙げる。
【0035】
(M系列の生成原理)
一例として特性多項式 f(x) = x4 + x3 + 1 のM系列をとりあげる。図1に特性多項式 f(x) = x4 + x3 + 1 のM系列を発生するM系列発生器を示す。図1に示した符号発生器は、EX−OR11と4段のシフトレジスタ12とを備えている。特性多項式の次数が4であるので、シフトレジスタ12の段数は4となる。また、x4を除いたx3と1 = x0が帰還タップの位置である3 と0 を示している。
【0036】
図1に示すM系列発生器の各フリップフロップD0〜D3の状態を下記の表1に示す。特性多項式の次数が4 であるのでM系列の周期は24−1 = 15 となり、表1のstep14のつぎはstep0 から繰り返し同じ動作となる。表1の場合はすべて1の場合を初期値としているが、M系列発生器の状態はすべて0の場合以外のすべての状態をとるので、初期値はすべて0 以外のパターンなら任意に設定することができる。
【0037】
【表1】
【0038】
(シフトしたM系列の生成)
まず、M系列の性質について説明する。図1のM系列発生器より生成されるM系列は図2に示すようになり、このM系列はM系列発生器の動作を考慮すると図3に示すような性質があることがわかる。このように上記の演算を左右に動かした場合に常に入力と出力は正しくなっている。ここで xn を組み合わせて書くと図4に示すようになる。
【0039】
以下の演算は、GF(2)上の演算であり、演算結果のモジュロ2を取ることと等価である。
x n+4 = x n+3 + x n
x n+4 + x n+3 + x n = 0(GF(2)上の演算では、+と−は同じ)
x n (x 4 + x3 + 1) = 0
ここで、特性多項式f(x) = x4 +x3 + 1 が現れている。
より一般には、
G(x)f(x) = 0 ( G(x)は任意の多項式 )
であり、式(1)が成立する。
【0040】
ここで、例えば以下の式を考える。
となり、図5に示す関係があることが分かる。このように特性多項式f(x)に掛けるG(x)によりM系列の各位相の関係を計算することができる。
【0041】
つぎにx m をf(x)で割った剰余R(X)について考えると、x m をf(x)で割った商をQ(x)とすると、以下の式が成り立つ。
x m = Q(x)f(x) + R(x)
式(1)より
Q(x)f(x) = 0
なので、
x m = R(x)
となり、式(2)が成立する。
【0042】
つぎに、マスクパターンによるM系列のシフトについて説明する。M系列発生器の動作を示した表1にx n を合わせて表示すると表2となる。
【0043】
【表2】
【0044】
ここで、式(2)よりx m = R(x)であり、R(x)はx m をf(x)で割った剰余であるからその次数はf(x)の次数より小さい。すなわち、、f(x) = x4 + x 3 + 1 の場合はR(x)=r3 x3 + r2 x2 + r1x + r0 と表わすことができる。これより以下の式が成り立つ。
xm =r3x3 + r2x2 + r1x + r0
xn+m =r3xn+3 + r3x n+2 + r3x n+1 + r3x n
【0045】
表2と見比べるとx n+3, x n+2, x n+1, x nはM系列発生器に現れている。このため、図7には、図1に示したM系列発生器に加算器13を付加した構成が示されている。図7に示すように各タップの出力をマスクパターンにしたがって合成できる構成にすることによって、任意の位相シフトを行ったM系列を得ることができる。
out2 =r0D0 + r1D1 + r2D2 + r3D3
を計算することによりシフトしたM系列を得る。より一般には、位相の異なるM系列が次数個あるならそれらの線形結合ですべての位相を表現することができる。
【0046】
つぎに、マスクパターン生成法について説明する。L位相シフトしたM系列を生成するマスクパターンを得るには、「 x L ÷特性多項式 f(x) 」を行い、剰余 R(x) を求めればよい。特性多項式 f(x) = x4+x3+1 を例に5位相シフトする場合のマスクパターンを求めるには「 x 5 ÷ (x 4 +x 3 +1) 」の剰余を求める。以下に 「 x 5 ÷ (x 4 +x 3 +1) 」の計算を示す。
【0047】
【数1】
【0048】
計算の結果得られた剰余 R(x) = x3+x1+1 よりマスクパターンは以下のようにになる。
(r3,r2,r1,r0 )= (1,0,1,1)
【0049】
このマスクパターンより5シフトしたM系列は D3+D1+D0より得られることがわかる。実際に上記のマスクパターンで図7の動作を調べると表3のようになり、step nのD0と step n−5 のD3+D1+D0が同じであることがわかる。すなわち、D3+D1+D0は、D0に対して 5 step 未来の出力である。
【0050】
【表3】
【0051】
つぎに、本実施の形態についての説明に入る。論理演算によりマスクパターンを求める方法について説明する。以下演算はGF(2) 上の演算である。
【0052】
(アルゴリズム)
L位相シフトしたM系列を生成するマスクパターンを得るには、「 x L ÷特性多項式 f(x) 」を行い、剰余 RL (x) を求めればよい。以下に提案するアルゴリズムを説明する。以後、「 g(x) ÷ f(x) 」の剰余 R(x) は R(x) =R f(x)[g(x)]と表わす。また、R L (x) =R f(x)[xL ] とする。
【0053】
R0(x) =R f(x)[x0 ] より、
▲1▼ R0(x) = 1
一般に、
R f(x)[x(x)]= x(x) + Qx(x) f(x)
R f(x)[y(x)]= y(x) + Qy(x) f(x)
Qx(x) はx(x)を f(x) で割った商、Qy(x) はy(x)を f(x) で割った商、と表わせるので、
R f(x)[x(x)]R f(x)[y(x)]= x(x) y(x) + ( Qx(x) y(x) + Qy(x) x(x) + Qx(x)Qy(x)f(x) ) f(x) より、
R f(x)[ R f(x)[x(x)] Rf(x)[y(x)] ]=R f(x)[x(x) y(x)] となり逆も同様に成り立つ。
【0054】
よって、
▲2▼ R2k(x) = R f(x)[Rk (x)2]
▲3▼ Rk+1(x) =R f(x)[xR k (x)]
の如く、 式(3)が成立する。
【0055】
上記式(3)の▲1▼, ▲2▼, ▲3▼を組み合わせて任意のLについてR L (x) を求めることができる。
たとえば R10(x) を求めると、
R10(x) =R f(x)[R5(x)2] ▲2▼
R5(x) = R f(x)[xR4(x)] ▲3▼
R4(x) =Rf(x)[R2(x)2] ▲2▼
R2(x) =Rf(x)[R1(x)2] ▲2▼
R1(x) =Rf(x)[xR0(x)] ▲3▼
R0(x) = 1 ▲1▼
の如く式(4)が成立する。
【0056】
R k (x) のk が偶数なら式▲2▼、奇数なら式▲3▼を順次おこないk=0 となるまで行う。k=0 なら式▲1▼となる。式(4)を逆から計算すればつぎのようにR10(x)を求めることができる。
R10(x) =R f(x)[Rf(x)[xR f(x)[Rf(x)[Rf(x)[xR0(x)]2]2]]2]
式(4)の演算は、10 =5 ×2 、5=4+1 、4=2 ×2 、2=1 ×2 、より10=((1×2)×2+1)×2 と展開しているが、この展開はLを2進数に表わすことにより簡単に求められる。
L = l0 + 2l1 + 22l2 + … + 2n−2ln−2 + 2 n−1ln−1 = ( ( … ( ln−1 ×2 + l n−2 ) ×2 + … + l2 ) ×2 + l1 ) ×2 + l0
【0057】
ここで、式▲2▼式▲3▼をまとめA f(x)[g(x) , i ] i = [1 ,0] を定義する。以下の式(5)が成立する。
【0058】
【数2】
【0059】
A f(x)[g(x) , i ] を用いてR L (x) を、以下に示すように式(6)を求めることができる。
A0(x) = R0(x)
A k (x) = A f(x)[Ak−1(x) , ln−1−k ]
R L (x) = A n−1(x)
ただし、L = l0 + 2l1 + 22l2 + … + 2n−2ln−2 + 2 n−1ln−1
上記式に示すように式(6)の演算をn (f(x)の次数)回行うことによりR L (x) を求めることができる。
【0060】
つづいてハードウェアによる実現方法について説明する。マスクパターン生成法をハードウェアにより実現するには上式(6)をハードウェア化すればよい。ここでは一例として特性多項式 f(x) = x7 + x3 + 1 の場合を取り上げる。
【0061】
まず、2乗回路から説明する。一般に g(x) = x k +xj +xi + … +1 であれば、g(x)2 = x2k +x2j+x2i+ … +1 と簡単に求められる。f(x)の次数が7であるから式(6)の入力と出力の多項式の次数は6である。ここで、A(x)を、
A(x) = a6x6 + a5x5 + a4x4 + a3x3 + a2x2 + a1x + a0
と定義すると、
A2(x) = a6x12 + a5x10 + a4x8 + a3x6 + a2x4 + a1x2 + a0
と求められる。
【0062】
R f(x) [A2(x)]を求めると以下のようになる。
R f(x)[A2(x)]=R f(x)[a6x12 + a5x10 + a4x8 + a3x6 + a2x4 + a1x2 + a0] =a6R f(x)[x12]+ a5Rf(x)[x10]+ a4Rf(x)[x8] + a3x6 + a2x4 + a1x2 + a0
f(x)は7次であるから6次以下の項については剰余を求める必要はない。
R f(x)[x12]=x5 + x4 + x
R f(x)[x10]=x6 + x3
R f(x)[x8 ]=x4 + x
より、
R f(x) [A2(x)]=(a5 + a3) x6 + a6x5 + (a6 + a4 + a2) x4 + a5x3 + a1x2 + (a6 + a4) x + a0
これが、式(7)となる。
【0063】
つぎに、R f(x)[xA2(x)]を求める。R f(x)[A2(x)] = b6x6 + b5x5 + b4x4 + b3x3 + b2x2 + b1x + b0 とする。
ただし、式(7)より、
b6=a5 + a3、b5=a6
b4=a6 + a4 + a2
b3=a5
b2=a1
b1=a6 + a4
b0=a0
R f(x)[x7]=x3 + 1 より、
R f(x)[xA2(x)]=b5x6 + b4x5 + b3x4 + (b2 + b6) x3 + b1x2 + b0x + b6
の如く式(8)が成立する。
【0064】
式(7)、式(8)より式(5)をハードウェア化すると図8に示すように簡単な構成で実現することができる。図8に示した演算器は、EX−OR、セレクタなどにより構成される。図8に示した回路は、以下の式をハードウェア化したものである。
【0065】
【数3】
【0066】
マスクパターンを生成するには式(6)に示すように式(5)を繰り返せばよく、ハードウェアにすると図9に示すように構成すればよい。図9には、マスクパターン生成回路が示され、21は図8の演算器を示し、22,23はシフトレジスタをそれぞれ示す。なお、図9の変形例として、図10のように並列接続させた構成にしてもよい。図10には、マスクパターン生成回路21A〜21Gが直列に接続されている。
【0067】
図9の構成は特性多項式の次数ステップでマスクパターンを得ることができるが、図10のように構成すれば、さらに高速にマスクパターンを得ることができる。ただし、特性多項式の次数が大きな場合には図9に比べ図10の構成は回路規模が非常に大きなものとなる。論理圧縮することにより図10の構成を若干小さくすることは可能である。
【0068】
つづいて、マスクパターン生成器の動作について説明する。まず、図9の回路の動作を説明する。L=100の場合の動作を表4に示す。100を2進数で表わすと1100100であるからi にこれをMSBから入力する。フリップフロップの出力であるD6〜D0と A f(x)[g(x) , i]回路の内部にあるb6〜b0を示す。特性多項式f(x) = x7 + x3 + 1の次数は7であるからstep7 でマスクパターン1110111を得ることができる。
【0069】
【表4】
【0070】
ここで、従来例として挙げた特開平7−297685号公報開示の技術との対応を考え、具体的な動作の流れについて説明する。図11は本実施の形態1による動作を説明するフローチャートであり、図12はMSBの変化に対応するm、位相の変化を説明する図である。
【0071】
本実施の形態1では、まずカウンタ値が0より大きければ(ステップS1、Yesルート)、m←Pmの演算が行われる(ステップS2)。この場合には、シフト量のMSBが0でないとき(ステップS3、Noルート)、さらにm←Amの演算が行われ(ステップS4)、シフト量は左にシフトの操作となり(ステップS5)、カウント値は1引かれる(ステップS6)。なお、シフト量のMSBが0のとき(ステップS3、Yesルート)、ステップS4の演算を飛ばしてステップS5においてシフト量は左にシフトされ、ステップS6においてカウント値を1引く操作となる。この後、処理はステップS1に戻る。また、ステップS1においてシフト量が0以下の場合には、マスクパターン出力が実施される。
【0072】
図12においては、シフト量L=100=1100100b、1ステップはループの1周に対応している。生成多項式の次数を7とすると、M系列の周期は、27 −1=127となる。127kの位相シフトは、0シフトと同じになり、128kシフトはkシフトと同じになる。このため、128k+100=k+100となる。
【0073】
以上によれば、M←MMに相当する演算は必要なく、m←Pmの演算はM←MMの演算に比べてはるかに小さな回路規模および演算量で実現することができる。従来では、M←MMの演算を1番目の行ベクトルのみを求め、他の行はそこから計算するようにしているので、演算量は2n−1ステップ必要となっていた。それに比べると、本実施の形態1では、小規模な回路で1ステップで実現することが可能である。なお、ソフトウェアで実現する場合にも、行列とベクトルの積なので、nステップで実現することが可能である。
【0074】
とくに、従来、原理的に行列を固定にできない分、本実施の形態1では、行列Aや行列Pの演算は、生成多項式により固定にできるので、ハードウェアを非常に小さい規模で設けることが可能となる。
【0075】
実施の形態2.
さて、前述の実施の形態1によるマスクパターン生成法を用いれば、M系列発生器の位相を任意にシフトすることができるが、以下に説明する実施の形態2では、任意の初期状態より任意に位相シフトしたM系列の生成について説明する。上述のようなマスクパターン生成法を用いれば、M系列発生器の位相を任意にシフトできるが、ここではM系列発生器とマスクパターン生成回路を共用化し、ハードウェア規模を縮小した回路構成を説明する。
【0076】
L位相シフトするマスクパターン R(x) が求まっているとすると、L+1位相シフトしたマスクパターンはR f(x)[xR(x)] で求めることができる。この回路はすでにマスクパターン生成回路に組み込まれているので容易に実現できる。そこで、図8に示したA f(x)[g(x) , i]を実現した回路を図13に示すように改良する。図13に示した回路は、EX−OR、セレクタにより構成される。この回路を式で表現すると、つぎのようになる。
【0077】
【数4】
【0078】
mode = 0 の場合は前記マスクパターン生成回路と同じ動作をし、mode = 1の場合は1位相シフトしたマスクパターンを求める。
【0079】
図13に示した回路をマスクパターン生成回路として用い、これによりM系列を生成するM系列発生器を構成する。図14に任意の初期状態から任意にシフトしたM系列を生成するM系列発生器を示す。図14に示したM系列発生器は、図7に示したマスクパターンを生成するマスクパターン生成回路31、クロックにより初期状態バッファ33から供給されるデータをマスクして出力するマスク回路32、初期状態のデータをマスク回路32に供給する初期状態バッファ33、クロックによりシフト量データをMSBより取り出すシフト量バッファ、すなわちシフトレジスタ34、クロックにしたがってマスク回路32の出力を保持するフリップフロップ35を備えている。
【0080】
動作は、まず初期状態バッファ33にM系列の始めのn個のデータを書き込み、シフトレジスタ34に初期状態からのシフト量を書き込む。つぎに、mode = 0でclk をf(x)の次数n回入力し、シフトレジスタ34に設定したシフト量のマスクパターンを生成し、初期状態からシフト量シフトしたM系列を1bit得る。つぎに、mode = 1としclk を入力する毎に1つシフトしたマスクパターンを生成することにより順次1bitずつM系列を得ることができる。
【0081】
マスク回路32の内部構成を図15に示す。このマスク回路32は、EX−ORとANDとの組み合わせで構成される。図7に示した構成と同様であるが、初期状態が固定であれば回路を削減できる。特に初期状態に1が一つしか無いような場合には、マスク回路は不必要である。
【0082】
つぎに動作について説明する。実際に初期状態1111111 で100 シフトした場合のM系列を生成すると表5に示すようになる。
【0083】
【表5】
【0084】
step0 〜step6 でマスクパターンを生成しMode = 0 とし、表4と同じ動作である。step7 からMode = 1 としM系列生成を始める。実際に特性多項式 f(x) = x7 + x3 + 1 初期状態1111111 のM系列は表6に示すようになり、100 シフトした場合は010111であり表5の出力と一致している。
【0085】
【表6】
【0086】
ここで示した任意にシフトしたM系列を生成する回路は、任意にシフトした場合の初期設定に必要な時間が短いのが特徴である。
【0087】
実施の形態3.
以下に説明する実施の形態3では、マスクパターンを用いずに、論理演算により任意に位相シフトする方法について説明する。シフトしたM系列の生成法として、マスクパターンによりM系列をシフトさせることができる。この実施の形態3ではマスクパターンを用いないM系列の高速シフトの新しいアルゴリズムと、それのハードウェアによる実現方法を示す。以下演算はGF(2) 上の演算である。
【0088】
まずM系列発生回路の行列表示について説明する。論理演算によりマスクパターンを求める方法では、A f(x)[g(x),i]を定義し、これを用いてマスクパターンを生成し、M系列の位相シフトを行う方法を提案したが、実用的にはM系列を生成するシフトレジスタの初期値を求めたい場合が多く、そのような方法ではマスクパターンの生成とシフトレジスタの初期値の生成の2段階の操作が必要になる。そこでマスクパターンを求めずに直接シフトレジスタの初期値を生成する方法を考える。
【0089】
図16は、特性多項式 f(x) = x4+x3+1 のM系列発生器であり、41はEX−OR、42はシフトレジスタ、a0〜a3はそれぞれのタップの出力である。これを行列表示すると以下のようになる。
【0090】
【数5】
【0091】
初期状態をa0とすればnシフトした状態は次式で表わせる。
a n = An a0
一般にn段のLFSRはn×nの行列を用いて表現できる。行列AのようにM系列を生成する行列は一つの特性多項式に対して多数存在する。詳細は省くが、a の各要素はそれぞれ異なる位相のM系列となるため一つの特性多項式について(2 n − 2)P(n−1) 個存在する。これは、つぎに示すように正則な行列Tによって関係づけられる。
A’=T−1AT
【0092】
つづいてマスクパターンを用いない任意シフトの方法について説明する。一般例の説明では、以下の三つの式よりマスクパターンを求めていたが、初期値を固定とし、マスクパターンを順次進めながらM系列を生成できることを考えれば式▲3▼自体がM系列を生成することがわかる。
▲1▼ R0 (x) = 1
▲2▼ R2k(x) = R f(x)[Rk (x)2]
▲3▼ Rk+1(x) = Rf(x) [xRk (x)]
上式▲3▼を回路で表わせば図17のようになる。図17に示したM系列発生器は、4段のシフトレジスタ46の2つのレジスタ(D2 、D3 )間に、EX−OR45を接続させた構成である。
【0093】
先ほどと同様に行列で表わすと、以下のように表され、B= AT となっていることがわかる。
【0094】
【数6】
【0095】
同様に式▲2▼を行列で表わすとつぎのようになる。
【0096】
【数7】
【0097】
前述の実施の形態1で説明した一般的な方法を行列を用いて説明すると、b0= (1,0,0,0) として、行列B、Cを用いて任意にシフトさせるマスクパターンを作成している。行列B、Cはつぎの演算を行う行列である。
b k+1 = B b k
b 2k = C b k
b0は0シフトするマスクパターンであり、例えば11シフトするマスクパターンはつぎのように表わされる。
b11=B11b0
【0098】
一般的な方法では11シフトする場合は11を2進数で表わし1011b であるから1 を(BC)、0を(C)としてMSBより順次掛け合わせ、次式(式(9))とする。
(BC)(BC)(C)(BC)b0
【0099】
一方、行列B、Cの間にはB= C−1B2 Cとなる関係があり、
CB=B2 Cが成り立ち、
0シフトを2倍シフトしても0シフトなのでCb0=b0 であり、
(BC)(BC)(C)(BC)b0= B11b0
となる。
【0100】
ここで、一般的な方法では触れなかったが初期値としてb0ではなく b k を用いた場合は、つぎのようになる。
M系列の周期性よりB24= Bとなる。
【0101】
よって、
B11C4bk = B11 + kb0= B11b k
であり、初期値によらず11シフトしたマスクパターンが得られ、このことはシフト量11によらず一般的に成り立ち、b k は0以外のあらゆるパターンを取り得ることによりC4 = Eであることがわかる。よって、次式(式(10))が成立する。
(BC)(BC)(C)(BC)= B11
【0102】
一般に特性多項式の次数がnの場合はCn = Eである。
ここで、
A =T−1BT 式(11)
となるTを求めると、例えば以下のようになる。説明は省くがA =T−1BTを満たすTは多数存在する。
【0103】
【数8】
【0104】
ここで、Cに対応してPを定義する。
P =T−1CT 式(12)
行列Pを用いて11シフトを行うと、
となり11シフトを行うことができる。一般にはA,P を求めれば任意にシフトを行うことができ、マスクパターンを計算せずに図16の回路の状態を直接求めることができる。
【0105】
つぎにハードウェアによる実現を例に挙げる。ここで具体的にPを計算すると式(12)の行列Tの場合は、以下の式となる。
【0106】
【数9】
【0107】
これを回路で表わすとたとえばEX−OR 2個で実現できる。Tの取り方によってPは異なる行列となり回路規模も異なってくる。たとえば、T’=BTとした場合式(11)より、
A =T−1BT=(B−1T’)−1T’ = T’ −1BT’
となり、T’ を用いてP’ を定義すると、次式となる。
【0108】
【数10】
【0109】
P’ を用いてもPを用いた場合と同様に位相シフトを行うことができるが、P’ を回路にした場合はEX−OR 3個を必要とする。このようにPによって回路規模が異なるため、回路規模を小さくするPを求める必要があり、つぎのように設計すると回路規模が小さく、また設計も簡単である。
【0110】
たとえば、特性多項式 f(x) = g4x4 + g3x3 + g2x2 + g1x1 + g0x0とすると、次式が成立する。
【0111】
【数11】
【0112】
特性多項式 f(x) = g5x5 + g4x4 + g3x3 + g2x2 + g1x1 + g0x0 の場合は、次式が成立する。
【0113】
【数12】
【0114】
その結果、比較的小さな回路となり、しかも面倒な計算をせずにPを求めることができる。
【0115】
たとえば特性多項式f(x) = x7 + x3 + 1の場合、次式が成立する。
【0116】
【数13】
【0117】
この設計法では状態がa= (1 0 0 0 0 0 0 )T の場合を0位相として位相を2倍にする行列Pを求めることができる。行列A によるM系列発生器の動作を示した表7を用いて行列Pの動作を確認すると、
b =Paとして
a =(1 0 0 0 0 0 0 )T :位相0→b =(1 0 0 0 0 0 0 )T :位相0
a =(0 0 0 0 0 0 1 )T :位相1→b =(0 0 0 0 0 1 0 )T :位相2
a =(0 0 0 0 0 1 0 )T :位相2→b =(0 0 0 1 0 0 0 )T :位相4
a =(0 0 0 0 1 0 0 )T :位相3→b =(0 1 0 0 0 1 0 )T :位相6
a =(0 0 0 1 0 0 0 )T :位相4→b =(0 0 0 1 0 0 1 )T :位相8
a =(0 0 1 0 0 0 1 )T :位相5→b =(0 1 0 0 1 1 0 )T :位相10
a =(0 1 0 0 0 1 0 )T :位相6→b =(0 0 1 1 0 0 0 )T :位相12
となり、独立な7種類(次数種類)の状態aに対して位相が2倍になっているのでこの行列Pは正しいことがわかる。
【0118】
【表7】
【0119】
行列P、行列Aを回路で表わすとそれぞれ図18、図19になる。図18、図19にそれぞれ示した行列P,行列Aの演算を行う回路は、それぞれEX−ORで構成される。図18では、b=Paを実現し、図19はc=Abを実現する。図18、図19を用いて位相シフトおよびM系列発生器を構成すると、例えば図20になる。
【0120】
図20の構成は特性多項式の次数ステップでM系列発生器の初期値を得ることができ、モードを切り換えてM系列を生成する。図20に示したM系列発生器は、図18に示した行列Pを実現する回路51、図19に示した行列Aを実現する回路52、Dフリップフロップ53、シフトレジスタ54、セレクタ55,56、NAND57を備えている。
【0121】
なお、図20の回路を図21のように変形すれば、さらに高速にM系列発生器の初期値を得ることができる。
【0122】
図14で示した回路と比べマスク回路が不要となり、回路削減されている。さらに、図20の場合はM系列発生器の初期状態が次数ステップで得られるので一般的な構成よりも半分のステップ数で他のM系列発生器等に初期状態をロードすることが可能となる。
【0123】
一例として図20の回路の動作を初期状態initDATAを1111111bとし、phDATAを1100100bとし100 シフトした場合を図22に示す。
【0124】
図22において、iは位相シフト量LをMSBから入力し、これが1の場合には位相を2倍+1、0の場合には2倍とする。ステップ7では、位相は128k+100となるが、位相128kは位相kと同じなので、k+100となる。初期状態は、1111111bとしたが、この発明によれば、初期状態の位相kは何であっても、初期状態から100シフトした状態をステップ7で得ることができる。
【0125】
step0 〜step6 でマスクパターンを生成しstep7 からM系列生成を始める。実際に特性多項式 f(x) = x7 + x3 + 1 初期状態1111111 のM系列を100 シフトしたM系列は0101111 であり表5の例と一致している。
【0126】
ここで、マスクパターンを用いず高速にシフトを行った後のM系列発生器の状態を計算する方法と、その設計方法およびハードウェアによる実現方法について考える。前述の実施の形態2では、まずマスクパターンを計算しその後にM系列を生成するが、本実施の形態3では、マスクパターンの計算とM系列の生成法の類似性に着目し、マスクパターンを用いず直接にM系列発生器の初期状態を生成する方法を実現できる。
【0127】
また、これを実現する回路は多数存在することを示し、その中で経験的に小さな回路規模で簡単に設計できる構成を得ることができる。前述の実施の形態2に示した方式に比べて、マスク回路が不要となり回路規模が削減される。また、M系列発生器の任意にシフト状態を得たい場合は、シフトした状態を並列に得ることができるので前述の実施の形態2と比べ半分のステップ数で計算することができる。
【0128】
以上によれば、ROMが必要なく、行列A,Pは固定の行列となって簡単な回路で済む。また、行列Aや行列Pの演算は、1クロックで実現することができるので、演算処理を高速化することが可能である。さらに、nクロックで任意にシフトした位相を得ることができる。
【0129】
実施の形態4.
前述の実施の形態3の応用として、位相の異なる符号を生成する回路を実現することができる。図23は本発明の実施の形態4による符号発生装置の一構成例を示すブロック図である。図23において、実施の形態3のレジスタ54の出力は、スイッチ85を介してたとえば4つのシフトレジスタ81,82,83,84に結合される。各シフトレジスタ81,82,83,84からは、位相の違う符号が出力される。
【0130】
このようにして、初期値の計算が高速に行えるので、一つの初期値計算で複数の符号発生器の初期状態を作り出すことができる。これにより、マスクを用いなくても異なる位相の符号を多数得ることが可能である。
【0131】
以上、本発明を実施の形態1〜4により説明したが、この発明の主旨の範囲内で種々の変形が可能であり、これらをこの発明の範囲から排除するものではない。
【0132】
【発明の効果】
以上説明したように、この発明によれば、生成多項式により固定される第1マスク変換行列と変換前のマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列とマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データをMSB側へシフトし、上記各ステップを指定回数繰り返した後にマスクベクトルに基づくマスクパターンを出力するので、マスクパターンを高速に生成することができ、これにより、高速で小型の回路を実現することが可能な符号発生方法が得られるという効果を奏する。
【0133】
つぎの発明によれば、演算手段により生成多項式により固定される第1マスク変換行列と変換前のマスクベクトルとの積で新たなマスクベクトルを求め、シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列とマスクベクトルとの積で新たなマスクベクトルを求め、シフト手段によりシフト量データをMSB側へシフトし、出力手段により上記演算手段とシフト手段を指定回数動作させた後にマスクベクトルに基づくマスクパターンを出力するようにしたので、マスクパターンを高速に生成することができ、これにより、高速で小型の回路を実現することが可能な符号発生装置が得られるという効果を奏する。
【0134】
つぎの発明によれば、マスクパターンを生成して、初期状態をマスクすることによりシフトを行うようにしたので、マスクパターンに応じて符号が生成され、専用の符号発生器が不要となることから、回路規模の削減を図ることが可能な符号発生装置が得られるという効果を奏する。
【0135】
つぎの発明によれば、第1演算手段により生成多項式により固定される第1マスク変換行列と符号発生器の状態を表す状態ベクトルとの積を求め、第1セレクタにより位相シフトと符号発生のいずれか一方を指示するモードに応じて第1演算手段の出力と状態ベクトルとのいずれか一方を選択し、第2演算手段により生成多項式により固定される第2マスク変換行列と第1セレクタ出力との積を求め、第2セレクタにより位相シフトと符号発生のいずれか一方を指示するモードおよびシフトデータのMSBに応じて第1セレクタか、第2演算手段の出力のいずれか一方を選択し、新たな状態ベクトルとするようにしたので、簡単な構成でマスクパターンを用いず、直接に符号発生装置としての初期状態を生成すること、および符号を生成することが可能な符号発生装置が得られるという効果を奏する。
【0136】
つぎの発明によれば、状態ベクトルを、セレクタを介して位相の異なる符号をシフトさせる複数のシフトレジスタに接続させたので、一つの回路構成で符号発生を行うだけで、マスクを用いなくても、異なる位相の符号を多数得ることが可能な符号発生装置が得られるという効果を奏する。
【0137】
つぎの発明によれば、上記第1マスク変換行列および第2マスク変換行列のみを用いて位相シフト処理を行う構成としたため、マスクパターンを計算せずに、回路の状態を直接求めることが可能な符号発生装置を得ることができる、という効果を奏する。
【0138】
この発明によれば、特定構造を有する第1のマスク変換行列を用いる構成としたため、回路規模を大幅に小さくすることが可能な符号発生装置を得ることができる、という効果を奏する。
【0139】
つぎの発明によれば、上記第1マスク変換行列および第2マスク変換行列のみを用いて位相シフト処理を行うこととしたため、マスクパターンを計算せずに、回路の状態を直接求めることが可能な符号発生方法を得ることができる、という効果を奏する。
【0140】
この発明によれば、特定構造を有する第1のマスク変換行列を用いることとしたため、回路規模を小さくすることが可能な符号発生方法を得ることができる、という効果を奏する。
【図面の簡単な説明】
【図1】一般的なM系列発生器の一例を示すブロック図である。
【図2】M系列の性質を説明する図である。
【図3】M系列の性質を説明する図である。
【図4】M系列の性質を説明する図である。
【図5】M系列の性質を説明する図である。
【図6】一般的なM系列発生器の他の例を示すブロック図である。
【図7】本発明の実施の形態1によるマスクパターン生成回路の一構成例を示す回路図である。
【図8】本発明の実施の形態1によるM系列発生器の一構成例を示すブロック図である。
【図9】本実施の形態1の変形例を示すブロック図である。
【図10】本実施の形態1の動作を説明するフローチャートである。
【図11】本実施の形態1による位相シフトの手順を説明する図である。
【図12】本発明の実施の形態2によるマスクパターン生成回路の他の例を示す回路図である。
【図13】本発明の実施の形態2によるM系列発生器の一構成例を示すブロック図である。
【図14】本実施の形態2によるマスク回路の一構成例を示す回路図である。
【図15】本発明の実施の形態3によるM系列発生器の原理を説明する図である。
【図16】本発明の実施の形態3によるM系列発生器の原理を別の観点から説明する図である。
【図17】本実施の形態3による一行列を実現する一構成例を示す回路図である。
【図18】本実施の形態3による他の行列を実現する別の構成例を示す回路図である。
【図19】本実施の形態3によるM系列発生器の一構成例を示すブロック図である。
【図20】本実施の形態3によるM系列発生器の変形例を示す図である。
【図21】本実施の形態3による位相シフトの手順を説明する図である。
【図22】本発明の実施の形態4によるM系列発生器の一構成例を示すブロック図である。
【図23】従来例による符号発生装置の一例を示すブロック図である。
【図24】従来例によるマスク変換動作を説明するフローチャートである。
【図25】従来例による位相シフトの手順を説明する図である。
【図26】従来例による符号発生装置の他の例を示すブロック図である。
【符号の説明】
21 演算器、21A〜21G マスクパターン生成回路、22,23 シフトレジスタ、31 マスクパターン生成回路、32 マスク回路、33 初期状態バッファ、34 シフトレジスタ、35 フリップフロップ、41,45 EX−OR、42,46 シフトレジスタ、51,51A,51B,51C 回路、52,52A,52B,52C 回路、53 Dフリップフロップ、54 シフトレジスタ、55,56,61A,61B,61C セレクタ、57 NAND、85 スイッチ、81〜84 シフトレジスタ。[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a code generation method and a code generation device, and more particularly to a code generation method and a code generation device for generating a code sequence such as an M sequence or a GOLD sequence.
[0002]
[Prior art]
In recent years, CDMA (Code Division Multiple Access) has attracted attention as a next-generation communication method because of its large channel capacity in mobile communication. In the CDMA system, a different PN sequence is used for each channel in order to separate each channel. For this PN sequence, an M-sequence (maximum-length sequence), a GOLD sequence generated from the M sequence, and the like are frequently used. UsedThising.
[0003]
However, when the period of the M sequence is long, an enormous amount of arithmetic processing is required to generate an arbitrarily phase-shifted sequence. For this reason, it is very important to establish a method for performing phase shift calculation at high speed, with a small amount of memory and a circuit scale. As a method for generating an arbitrarily shifted M-sequence, the M-sequence can be shifted by a mask pattern, but enormous calculation processing is required to generate a mask pattern.
[0004]
As this type of M-sequence generation device, there are, for example, Japanese Patent Application Laid-Open Nos. 7-297855 and 8-18550.
[0005]
First, the technique disclosed in Japanese Patent Laid-Open No. 7-297865 will be described with reference to FIG. FIG. 24 discloses a code generator disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 7-297685. The code generator shown in FIG. 24 outputs a
[0006]
Next, the
[0007]
Specifically, when the shift amount is larger than 0 (step S101, Yes route) and the LSB of the shift amount is 0 (step S102, Yes route), Mm is inserted into m (step S103). An operation for shifting the shift amount to the right is performed (step S104). If the LSB of the shift amount is other than 0 (step S102, No route), an operation for shifting the shift amount to the right is performed in step S104.
[0008]
Thereafter, if the shift amount is greater than 0 (step S105, Yes route), the process of M ← MM is performed (step S106). If the shift amount is 0 (step S105, No route), the process directly returns to step S101. When the shift amount is 0 in step S101, the mask pattern is supplied to the
[0009]
Next, the technique disclosed in Japanese Patent Laid-Open No. 8-18550 will be described with reference to FIG. FIG. 27 shows a code generator according to Japanese Patent Laid-Open No. 8-18550. 27 includes a
[0010]
As shown in FIG. 27, the code generator is provided with a
[0011]
[Problems to be solved by the invention]
However, the code generator disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 7-297685 requires a general-purpose matrix × vector operation, and the circuit scale becomes large to perform in one step by hardware. In addition, n steps are required to realize with software, and there is a problem that processing time becomes long. Furthermore, the code generator disclosed in the above-mentioned Japanese Patent Application Laid-Open No. 7-297865 has a problem that the circuit scale becomes large because the
[0012]
Further, since the code generator disclosed in Japanese Patent Laid-Open No. 8-18550 requires a ROM (memory 203), the circuit scale is increased and a general-purpose matrix × vector
[0013]
The present invention solves the above-mentioned conventional problems,High-speed mask pattern generation and circuit miniaturizationAn object of the present invention is to provide a code generation method and a code generation apparatus capable of realizing the above.
[0014]
In addition, the present invention pays attention to the similarity between the calculation of the mask pattern and the M-sequence generation method, and does not use the mask patternDirectly into the shift registerAn object of the present invention is to obtain a code generator capable of generating an initial state.
[0015]
[Means for Solving the Problems]
In order to solve the above-described problems and achieve the object, a code generator according to the present invention obtains a new mask vector by a product of a first mask transformation matrix fixed by a generator polynomial and a mask vector before transformation. And a second step of obtaining a new mask vector by a product of the second mask transformation matrix fixed by the generator polynomial and the mask vector obtained in the first step when the MSB of the shift amount data is not zero. A third step of shifting the shift amount data to the MSB side, a fourth step of outputting a mask pattern based on a mask vector after repeating the first step, the second step, and the third step a specified number of times, Is included.
[0016]
According to the present invention, a new mask vector is obtained by the product of the first mask transformation matrix fixed by the generator polynomial and the mask vector before conversion, and is fixed by the generator polynomial when the MSB of the shift amount data is not zero. Since a new mask vector is obtained by the product of the second mask transformation matrix and the mask vector, the shift amount data is shifted to the MSB side, and after repeating the above steps a specified number of times, a mask pattern based on the mask vector is output. A mask pattern can be generated at high speed, which makes it possible to realize a small circuit at high speed.
[0017]
The code generator according to the next invention obtains a new mask vector by the product of the first mask transformation matrix fixed by the generator polynomial and the mask vector before the transformation, and generates when the MSB of the shift amount data is not zero. An arithmetic means for obtaining a new mask vector by a product of a second mask transformation matrix fixed by a polynomial and the mask vector, a shift means for shifting the shift amount data to the MSB side, the arithmetic means and the shift means Output means for outputting a mask pattern based on a mask vector after operating for a specified number of times.
[0018]
According to the present invention, a new mask vector is obtained by the product of the first mask transformation matrix fixed by the generator polynomial by the arithmetic means and the mask vector before conversion, and when the MSB of the shift amount data is not zero, the generator polynomial is obtained. A new mask vector is obtained by the product of the second mask transformation matrix and the mask vector fixed by the step, the shift amount data is shifted to the MSB side by the shift means, and the arithmetic means and the shift means are operated a specified number of times by the output means. After that, since the mask pattern based on the mask vector is output, the mask pattern can be generated at a high speed, whereby a high-speed and small circuit can be realized.
[0019]
The code generator according to the next invention is:Using the arithmetic means, the shift means, and the output means, a mask pattern for shifting data representing an arbitrary initial state by a set phase shift amount is generated. A mask pattern generating means for generating a mask pattern to be shifted phase by phase, and a mask pattern for shifting by the set phase shift amount generated by the mask pattern generating means, and masking data representing an arbitrary initial state to 1 bit A mask means for obtaining the code sequentially by 1 bit using the mask pattern for shifting by one phase,It is equipped with.
[0020]
According to this invention, since the mask pattern is generated and the initial state is masked to perform the shift, a code is generated according to the mask pattern, and a dedicated code generator is not required. It is possible to reduce the circuit scale.
[0021]
The code generator according to the next invention is a first arithmetic means for obtaining a product of a first mask transformation matrix fixed by a generator polynomial and a state vector representing a state of the code generator, and any one of phase shift and code generation A first selector that selects one of the output of the first computing means and the state vector in accordance with a mode for instructing one, a second mask transformation matrix fixed by a generator polynomial, and a first selector output; A second calculating means for obtaining a product, a mode for instructing one of phase shift and code generation, and either the first selector or the output of the second calculating means in accordance with the MSB of the shift data And a second selector for setting a new state vector.
[0022]
According to this invention, the product of the first mask transformation matrix fixed by the generator polynomial by the first arithmetic means and the state vector representing the state of the code generator is obtained, and either the phase shift or the code generation is obtained by the first selector. Either one of the output of the first calculation means and the state vector is selected according to the mode for instructing one of them, and the product of the second mask transformation matrix fixed by the generator polynomial by the second calculation means and the first selector output The second selector selects either the first selector or the output of the second calculation means in accordance with the mode instructing one of phase shift and code generation by the second selector and the MSB of the shift data, and a new state is obtained. Since the vector is used, the initial state as a code generator can be directly generated and the code can be generated without using a mask pattern with a simple configuration. It is possible.
[0023]
Code generator according to next inventionInThe state vector is connected to a plurality of shift registers for shifting codes having different phases through a selector.
[0024]
According to the present invention, since the state vector is connected to the plurality of shift registers that shift the codes having different phases through the selector, it is possible to generate a code with one circuit configuration without using a mask. It is possible to obtain a large number of codes having different phases.
[0025]
In the code generator according to the next invention, the first mask transformation matrix is specified on the basis of a mask pattern capable of a phase shift twice as large as the phase shift processing by the second mask transformation matrix. .
[0026]
According to the present invention, since the phase shift process is performed using only the first mask transformation matrix and the second mask transformation matrix, the circuit state can be directly obtained without calculating the mask pattern.
[0027]
In the code generator according to the next invention, the first mask transformation matrix further includes a generator polynomial f (x) = g n x n + G n-1 x n-1 + G n-2 x n-2 + ... + g 0 x 0 And n is an even number,
[Expression 18]
And the generator polynomial f (x) = g n x n + G n-1 x n-1 + G n-2 x n-2 + ... + g 0 x 0 And n is an odd number,
[Equation 19]
It is characterized by.
[0028]
According to the present invention, the design is facilitated by using the first mask transformation matrix having a specific structure, and the circuit scale can be reduced.
[0029]
A code generation method according to the next invention includes a first calculation step for obtaining a product of a first mask transformation matrix fixed by a generator polynomial and a state vector representing a state of the code generator, and any of phase shift and code generation. A first selection step of selecting one of the calculation result of the first calculation step and the state vector, a second mask transformation matrix fixed by a generator polynomial, The selection by the first selection step according to the second calculation step for obtaining the product of the selection result by the first selection step, the mode for instructing one of phase shift and code generation, and the MSB of the shift data One of the result and the calculation result of the second calculation step is selected, and the selection result is used as a new state vector. And the first mask transformation matrix is a matrix specified based on a mask pattern capable of a phase shift twice the phase shift processing by the second mask transformation matrix, and the first mask transformation Arbitrary phase shift processing is performed by a combination of a matrix and the second mask transformation matrix.
[0030]
According to the present invention, since the phase shift process is performed using only the first mask transformation matrix and the second mask transformation matrix, the circuit state can be directly obtained without calculating the mask pattern.
[0031]
In the code generation method according to the next invention, as the first mask transformation matrix, a generator polynomial f (x) = g n x n + G n-1 x n-1 + G n-2 x n-2 + ... + g 0 x 0 And n is an even number,
[Expression 20]
And the generator polynomial f (x) = g n x n + G n-1 x n-1 + G n-2 x n-2 + ... + g 0 x 0 And n is an odd number,
[Expression 21]
It is characterized by using.
[0032]
According to the present invention, the design is facilitated by using the first mask transformation matrix having a specific structure, and the circuit scale can be reduced.
0033]
DETAILED DESCRIPTION OF THE INVENTION
Exemplary embodiments of a code generation method and a code generation apparatus according to the present invention will be explained below in detail with reference to the accompanying drawings.
0034]
First, before starting the description of the present embodiment, a description will be given of what is generally used for the principle of generating an M-phase with an arbitrary phase using a mask pattern. Here, an M-sequence generator is taken as an example of the code generator.
0035]
(M-sequence generation principle)
As an example, the characteristic polynomial f (x) = x4 + X3Take the M series of +1. FIG. 1 shows a characteristic polynomial f (x) = x4 + X3Fig. 2 shows an M-sequence generator for generating an M sequence of +1. The code generator shown in FIG. 1 includes an EX-OR 11 and a four-
0036]
Each flip-flop D of the M-sequence generator shown in FIG.0~ D3The state is shown in Table 1 below. Since the order of the characteristic polynomial is 4, the period of the M sequence is 24−1 = 15, and after
0037]
[Table 1]
0038]
(Generation of shifted M-sequence)
First, the nature of the M sequence will be described. The M sequence generated from the M sequence generator of FIG. 1 is as shown in FIG. 2, and it is understood that this M sequence has the properties shown in FIG. 3 in consideration of the operation of the M sequence generator. In this way, the input and output are always correct when the above calculation is moved left and right. Where xnPairOnlyWhen combined, it becomes as shown in FIG.
0039]
The following operation is an operation on GF (2) and is equivalent to taking the
xn + 4 = Xn + 3 + Xn
xn + 4 + Xn + 3 + Xn = 0 (+ and-are the same in the calculation on GF (2))
xn (X4+ X3 + 1) = 0
Here, the characteristic polynomial f (x) = x4+ X3+1 appears.
More generally,
G (x) f (x) = 0 (G (x) is an arbitrary polynomial)
And Equation (1) is established.
0040]
Here, for example, consider the following equation.
Thus, it can be seen that there is a relationship shown in FIG. In this way, the relationship of each phase of the M series can be calculated by G (x) multiplied by the characteristic polynomial f (x).
0041]
Then xmAnd the remainder R (X) divided by f (x), xmIs divided by f (x), and Q (x), the following equation holds.
xm= Q (x) f (x) + R (x)
From equation (1)
Q (x) f (x) = 0
So,
xm= R (x)
Thus, Expression (2) is established.
0042]
Next, the shift of the M series by the mask pattern will be described. Table 1 shows the operation of the M-sequence generator.nAre displayed together as shown in Table 2.
0043]
[Table 2]
0044]
Here, x from Formula (2)m= R (x), where R (x) is xmIs the remainder of dividing f by (x), so the order is smaller than the order of f (x). That is, f (x) = x4+ X3In the case of +1, R (x) = r3x3 + R2x2 + R1x + r0Can be expressed as From this, the following equation holds.
xm= R3x3+ R2x2 + R1x + r0
xn + m= R3xn + 3+ R3xn + 2+ R3xn + 1+ R3xn
0045]
Compared with Table 2, xn + 3, Xn + 2, Xn + 1, XnAppears in the M-sequence generator. For this reason, FIG. 7 shows a configuration in which an
out2 = r0D0 + R1D1+ R2D2 + R3D3
A shifted M sequence is obtained by calculating. More generally, if there are several orders of M sequences with different phases, all phases can be expressed by their linear combination.
0046]
Next, a mask pattern generation method will be described. To obtain a mask pattern that generates an L-phase shifted M sequence," x L ÷ characteristic polynomial f (x) "To obtain the remainder R (x). Characteristic polynomial f (x) = x4+ X3To find the mask pattern when shifting -5 phases for example +1" x 5 ÷ (X 4 + X 3 +1) "Find the remainder. less than " x 5 ÷ (X 4 + X 3 +1) "The calculation of is shown.
0047]
[Expression 1]
0048]
Remainder obtained as a result of calculation R (x) = x3+ X1From +1, the mask pattern is as follows.
(R3, r2, r1, r0) = (1, 0, 1, 1)
0049]
M series shifted by 5 from this mask pattern is D3+ D1+ D0It turns out that it is obtained more. When the operation of FIG. 7 is actually examined with the above mask pattern, it becomes as shown in Table 3, and D of step n0And D of step n-53+ D1+ D0Are the same. That is, D3+ D1+ D0D05 step is the future output.
0050]
[Table 3]
0051]
Next, the description of the present embodiment will be started. A method for obtaining a mask pattern by a logical operation will be described. The following operations are operations on GF (2).
0052]
(algorithm)
In order to obtain a mask pattern for generating an L-phase shifted M sequence," x L ÷ characteristic polynomial f (x) "The remainder RL(X) may be obtained. The proposed algorithm is described below. After that" g (x) ÷ f (x) "The remainder R (x) is R (x) = Rf (x)[G (x)]. RL(X) = Rf (x)[XL]
0053]
R0(X) = Rf (x)[X0] Than,
▲ 1 ▼ R0(X) = 1
In general,
Rf (x)[X (x)] = x (x) + Qx (x) f (x)
Rf (x)[Y (x)] = y (x) + Qy (x) f (x)
Qx (x) can be expressed as a quotient obtained by dividing x (x) by f (x), and Qy (x) can be expressed as a quotient obtained by dividing y (x) by f (x).
Rf (x)[X (x)] Rf (x)[Y (x)] = x (x) y (x) + (Qx (x) y (x) + Qy (x) x (x) + Qx (x) Qy (x) f (x)) f ( x)
Rf (x)[Rf (x)[X (x)] Rf (x)[Y (x)]] = Rf (x)[X (x) y (x)] and vice versa.
0054]
Therefore,
▲ 2 ▼ R2k(X) = Rf (x)[Rk(X)2]
▲ 3 ▼ Rk + 1(X) = Rf (x)[XRk(X)]
As shown, Equation (3) is established.
0055]
R for any L by combining (1), (2), and (3) in the above formula (3)L(X) can be obtained.
For example R10(X),
R10(X) = Rf (x)[R5(X)2] (2)
R5(X) = Rf (x)[XR4(X)] ▲ 3 ▼
R4(X) = Rf (x)[R2(X)2] (2)
R2(X) = Rf (x)[R1(X)2] (2)
R1(X) = Rf (x)[XR0(X)] ▲ 3 ▼
R0(X) = 1 (1)
Equation (4) is established as follows.
0056]
RkIf k in (x) is an even number, the equation (2) is repeated, and if k is an odd number, the equation (3) is sequentially performed until k = 0. If k = 0, equation (1) is obtained. If equation (4) is calculated from the reverse, R10(X) can be obtained.
R10(X) = Rf (x)[Rf (x)[XRf (x)[Rf (x)[Rf (x)[XR0(X)]2]2]]2]
The calculation of equation (4) is expanded as 10 = 5 × 2, 5 = 4 + 1, 4 = 2 × 2, 2 = 1 × 2, and 10 = ((1 × 2) × 2 + 1) × 2. This expansion is easily obtained by expressing L in a binary number.
L = l0 + 2l1 +22l2+… + 2n-2ln-2+2n-1ln-1= ((... (ln-1× 2 + ln-2) X2 + ... + l2)
0057]
Here, formula (2) and formula (3) are summarized Af (x)Define [g (x), i] i = [1, 0]. The following formula (5) is established.
0058]
[Expression 2]
0059]
Af (x)R using [g (x), i]LEquation (6) can be obtained from (x) as shown below.
A0(X) = R0(X)
Ak(X) = Af (x)[Ak-1(X), ln-1-k]
RL(X) = An-1(X)
However, L = l0 + 2l1 +22l2+… + 2n-2ln-2+2n-1ln-1
As shown in the above equation, the calculation of equation (6) is performed n (order of f (x)) times to obtain RL(X) can be obtained.
0060]
Next, a hardware implementation method will be described. In order to realize the mask pattern generation method by hardware, the above equation (6) may be realized by hardware. Here, as an example, the characteristic polynomial f (x) = x7 + X3Take the case of +1.
0061]
First, the squaring circuit will be described. In general g (x) = xk+ Xj+ XiIf + ... + 1, then g (x)2= X2k+ X2j+ X2i+ ... +1 is easily obtained. Since the order of f (x) is 7, the order of the polynomial in the input and output of Equation (6) is 6. Where A (x) is
A (x) = a6x6+ A5x5 + A4x4+ A3x3 + A2x2+ A1x + a0
Defined as
A2(X) = a6x12+ A5x10+ A4x8 + A3x6+ A2x4 + A1x2+ A0
Is required.
0062]
Rf (x) [A2(X)] is obtained as follows.
Rf (x)[A2(X)] = Rf (x)[A6x12 + A5x10 + A4x8+ A3x6 + A2x4+ A1x2 + A0] = A6Rf (x)[X12] + A5Rf (x)[X10] + A4Rf (x)[X8] + A3x6+ A2x4 + A1x2+ A0
Since f (x) is 7th order, it is not necessary to obtain a remainder for terms of 6th order or less.
Rf (x)[X12] = X5 + X4+ X
Rf (x)[X10] = X6 + X3
Rf (x)[X8] = X4 + X
Than,
Rf (x) [A2(X)] = (a5 + A3X6+ A6x5 + (A6 + A4+ A2X4 + A5x3+ A1x2 + (A6 + A4) X + a0
This is Equation (7).
0063]
Next, Rf (x)[XA2(X)] is obtained. Rf (x)[A2(X)] = b6x6 + B5x5+ B4x4 + B3x3+ B2x2 + B1x + b0And
However, from equation (7)
b6= A5+ A3, B5= A6
b4= A6+ A4 + A2
b3= A5
b2= A1
b1= A6+ A4
b0= A0
Rf (x)[X7] = X3From +1,
Rf (x)[XA2(X)] = b5x6+ B4x5 + B3x4+ (B2+ B6X3 + B1x2+ B0x + b6
Formula (8) is materialized as follows.
0064]
If Formula (5) is implemented by hardware from Formula (7) and Formula (8), it is easy as shown in FIG.NaIt can be realized with a configuration. The arithmetic unit shown in FIG. 8 includes an EX-OR, a selector, and the like. The circuit shown in FIG. 8 is a hardware implementation of the following equation.
0065]
[Equation 3]
0066]
In order to generate the mask pattern, the equation (5) may be repeated as shown in the equation (6), and the hardware may be configured as shown in FIG. FIG. 9 shows a mask pattern generation circuit, 21 indicates the arithmetic unit of FIG. 8, and 22 and 23 indicate shift registers, respectively. In addition, as a modification of FIG. 9, a configuration in which parallel connection is made as shown in FIG. 10 may be adopted. In FIG. 10, mask
0067]
The configuration of FIG. 9 can obtain a mask pattern in the order of the characteristic polynomial, but if configured as shown in FIG. 10, a mask pattern can be obtained at a higher speed. However, when the degree of the characteristic polynomial is large, the circuit configuration of FIG. 10 is much larger than that of FIG. It is possible to make the configuration of FIG. 10 slightly smaller by performing logical compression.
0068]
Next, the operation of the mask pattern generator will be described. First, the operation of the circuit of FIG. 9 will be described. Table 4 shows the operation when L = 100. When 100 is expressed in binary, it is 1100100, so this is input to i 2 from the MSB. D which is the output of the flip-flop6~ D0And Af (x)[G (x), i] b inside the circuit6~ B0Indicates. Characteristic polynomial f (x) = x7+ X3 Since the order of +1 is 7, the mask pattern 1110111 can be obtained in
0069]
[Table 4]
0070]
Here, considering the correspondence with the technique disclosed in Japanese Patent Laid-Open No. 7-297865 cited as a conventional example, a specific flow of operation will be described. FIG. 11 is a flowchart for explaining the operation according to the first embodiment, and FIG. 12 is a diagram for explaining m and phase changes corresponding to MSB changes.
0071]
In the first embodiment, first, if the counter value is larger than 0 (step S1, Yes route), the calculation of m ← Pm is performed (step S2). In this case, when the MSB of the shift amount is not 0 (step S3, No route), m ← Am is further calculated (step S4), and the shift amount is shifted to the left (step S5). The value is subtracted by 1 (step S6). When the MSB of the shift amount is 0 (step S3, Yes route), the calculation of step S4 is skipped, the shift amount is shifted to the left in step S5, and the count value is subtracted by 1 in step S6. Thereafter, the process returns to step S1. If the shift amount is 0 or less in step S1, mask pattern output is performed.
0072]
In FIG. 12, the shift amount L = 100 = 1100100b, and one step corresponds to one round of the loop. If the degree of the generator polynomial is 7, the period of the M sequence is 27−1 = 127. The 127k phase shift is the same as the 0 shift, and the 128k shift is the same as the k shift. Therefore, 128k + 100 = k + 100.
0073]
According to the above, the calculation corresponding to M ← MM is not necessary, and the calculation of m ← Pm can be realized with a much smaller circuit scale and calculation amount than the calculation of M ← MM. Conventionally, since the calculation of M ← MM is obtained only for the first row vector and the other rows are calculated therefrom, the amount of calculation requires 2n-1 steps. Compared to this, the first embodiment can be realized in one step with a small circuit. Even when implemented by software, since it is a product of a matrix and a vector, it can be implemented in n steps.
0074]
In particular, in the first embodiment, since the matrix cannot be fixed in principle, in the first embodiment, the calculation of the matrix A and the matrix P can be fixed by a generator polynomial, so that hardware can be provided on a very small scale. It becomes.
0075]
By using the mask pattern generation method according to the first embodiment described above, the phase of the M-sequence generator can be arbitrarily shifted. However, in the second embodiment described below, the phase can be arbitrarily changed from any initial state. Generation of the phase-shifted M sequence will be described. If the mask pattern generation method as described above is used, the phase of the M-sequence generator can be arbitrarily shifted. Here, a circuit configuration in which the M-sequence generator and the mask pattern generation circuit are shared and the hardware scale is reduced will be described. To do.
0076]
If a mask pattern R (x) that shifts by L phase is obtained, the mask pattern that is shifted by L + 1 phase is Rf (x)[XR (x)]. Since this circuit is already incorporated in the mask pattern generation circuit, it can be easily realized. Therefore, A shown in FIG.f (x)The circuit realizing [g (x), i] is improved as shown in FIG. The circuit shown in FIG. 13 includes an EX-OR and a selector. This circuit is expressed as follows.
0077]
[Expression 4]
0078]
When mode = 0, the same operation as that of the mask pattern generation circuit is performed, and when mode = 1, a mask pattern shifted by one phase is obtained.
0079]
The circuit shown in FIG. 13 is used as a mask pattern generation circuit, thereby configuring an M-sequence generator that generates an M-sequence. FIG. 14 shows an M-sequence generator that generates an M-sequence arbitrarily shifted from an arbitrary initial state. The M-sequence generator shown in FIG. 14 includes a mask
0080]
The operation first writes the first n data of the M series in the
0081]
The internal configuration of the
0082]
Next, the operation will be described. Table 5 shows the M sequence generated when the initial state 1111111 is actually shifted by 100.
0083]
[Table 5]
0084]
A mask pattern is generated in
0085]
[Table 6]
0086]
The circuit for generating the arbitrarily shifted M-sequence shown here is characterized in that the time required for the initial setting when arbitrarily shifted is short.
0087]
In the third embodiment described below, a method for arbitrarily shifting a phase by a logical operation without using a mask pattern will be described. As a method for generating a shifted M sequence, the M sequence can be shifted by a mask pattern. In this third embodiment, a new algorithm for M-sequence high-speed shift without using a mask pattern and a hardware implementation method thereof will be described. The following operations are operations on GF (2).
0088]
First, the matrix display of the M series generation circuit will be described. In the method of obtaining a mask pattern by a logical operation, Af (x)[G (x), i] is defined, a mask pattern is generated using this, and a method of performing M-sequence phase shift has been proposed. In many cases, such a method requires two-stage operations of mask pattern generation and shift register initial value generation. Therefore, a method for directly generating the initial value of the shift register without obtaining the mask pattern is considered.
0089]
FIG. 16 shows the characteristic polynomial f (x) = x4+ X3+1 M-sequence generator, 41 is EX-OR, 42 is a shift register, a0~ A3Is the output of each tap. When this is displayed in matrix, it becomes as follows.
0090]
[Equation 5]
0091]
The initial state is a0Then, the n-shifted state can be expressed by the following equation.
an= Ana0
In general, an n-stage LFSR can be expressed using an n × n matrix. There are many matrices that generate M sequences, such as the matrix A, for one characteristic polynomial. Although details are omitted, since each element of a is an M-sequence with a different phase, one characteristic polynomial (2n-2) There are P (n-1). This is related by a regular matrix T as shown below.
A '= T-1AT
0092]
Next, an arbitrary shift method without using a mask pattern will be described. In the description of the general example, the mask pattern is obtained from the following three formulas. However, considering that the M value can be generated while the initial value is fixed and the mask pattern is sequentially advanced, the formula (3) itself generates the M sequence. I understand that
▲ 1 ▼ R0(X) = 1
▲ 2 ▼ R2k(X) = Rf (x)[Rk(X)2]
▲ 3 ▼ Rk + 1(X) = Rf (x) [XRk(X)]
If the above equation (3) is represented by a circuit, it will be as shown in FIG. The M-sequence generator shown in FIG. 17 has two registers (D2, D3) Between the EX-OR45.
0093]
When expressed in a matrix as before, it is expressed as follows: B = ATIt turns out that it is.
0094]
[Formula 6]
0095]
Similarly, expression (2) can be expressed as a matrix as follows.
0096]
[Expression 7]
0097]
The general method described in the first embodiment will be described using a matrix.0= Mask pattern to be arbitrarily shifted using matrices B and C as (1, 0, 0, 0)-Is creating. The matrices B and C are matrices for performing the following operations.
bk + 1= B bk
b2k= C bk
b0Is a mask pattern shifted by 0. For example, a mask pattern shifted by 11 is expressed as follows.
b11= B11b0
0098]
In a general method, when 11 shifts are performed, 11 is represented by a binary number and is 1011b. Therefore, 1 is (BC) and 0 is (C) and is sequentially multiplied from the MSB to obtain the following formula (formula (9)).
(BC) (BC) (C) (BC) b0
0099]
On the other hand, B = C between the matrices B and C-1B2There is a relationship of C,
CB = B2C holds,
Even if 0 shift is doubled, it is 0 shift, so Cb0= B0And
(BC) (BC) (C) (BC) b0= B11b0
It becomes.
[0100]
Here, although it was not mentioned in the general method, the initial value b0Well thenThe b k TheWhen used, it is as follows.
B from M-sequence periodicity24= B
[0101]
Therefore,
B11C4bk= B11 + kb0= B11bk
A mask pattern shifted by 11 is obtained regardless of the initial value, and this is generally true regardless of the shift amount of 11, and bkCan take any pattern other than zeroInMore C4It can be seen that = E. Therefore, the following formula (Formula (10)) is established.
(BC) (BC) (C) (BC) = B11
[0102]
Generally, when the degree of the characteristic polynomial is n, Cn= E.
here,
A = T-1BT equation (11)
For example, T is obtained as follows. A = T-1There are many Ts that satisfy BT.
[0103]
[Equation 8]
[0104]
Here, P is defined corresponding to C.
P = T-1CT formula (12)
When 11 shifts are performed using the matrix P,
11 shifts can be performed. In general, if A and P are obtained, an arbitrary shift can be performed, and the state of the circuit of FIG. 16 can be directly obtained without calculating a mask pattern.
[0105]
Next, realization by hardware is given as an example. Here, when P is specifically calculated, the formula (12In the case of the matrix T), the following equation is obtained.
[0106]
[Equation 9]
[0107]
If this is expressed by a circuit, it can be realized by two EX-ORs, for example. Depending on how T is taken, P becomes a different matrix and the circuit scale also differs. For example, when T ′ = BT, from equation (11):
A = T-1BT = (B-1T ’)-1T '= T'-1BT ’
When P ′ is defined using T ′, the following equation is obtained.
[0108]
[Expression 10]
[0109]
Even if P ′ is used, the phase shift can be performed in the same manner as in the case of using P, but when P ′ is used as a circuit, three EX-ORs are required. Since the circuit scale differs depending on P as described above, it is necessary to obtain P for reducing the circuit scale. If the following design is performed, the circuit scale is small and the design is simple.
[0110]
For example, characteristic polynomial f (x) = g4x4 + G3x3+ G2x2 + G1x1+ G0x0Then, the following equation is established.
[0111]
## EQU11 ##
[0112]
Characteristic polynomial f (x) = g5x5 + G4x4+ G3x3 + G2x2+ G1x1 + G0x0In this case, the following equation is established.
[0113]
[Expression 12]
[0114]
As a result, a relatively small circuit can be obtained, and P can be obtained without troublesome calculations.
[0115]
For example, characteristic polynomial f (x) = x7+ X3 In the case of +1, the following equation holds.
[0116]
[Formula 13]
[0117]
In this design method, the state is a = (1 0 0 0 0 0 0)TIt is possible to obtain a matrix P that doubles the phase with 0 as the zero phase. When the operation of the matrix P is confirmed using Table 7 showing the operation of the M-sequence generator according to the
As b = Pa
a = (1 0 0 0 0 0 0)T:
a = (0 0 0 0 0 0 1)T:
a = (0 0 0 0 0 1 0)T:
a = (0 0 0 0 1 0 0)T:
a = (0 0 0 1 0 0 0)T:
a = (0 0 1 0 0 0 1)T:
a = (0 1 0 0 0 1 0)T:
Since the phase is doubled with respect to seven independent (order types) states a, it can be seen that this matrix P is correct.
[0118]
[Table 7]
[0119]
When the matrix P and the matrix A are represented by circuits, they are shown in FIGS. 18 and 19, respectively. The circuits that perform the operations of the matrix P and the matrix A shown in FIG. 18 and FIG. In FIG. 18, b = Pa is realized, and in FIG. 19, c = Ab is realized. When the phase shift and M-sequence generator is configured using FIGS. 18 and 19, for example, FIG. 20 is obtained.
[0120]
The configuration of FIG. 20 can obtain the initial value of the M-sequence generator in the order step of the characteristic polynomial, and generates the M-sequence by switching the mode. 20 includes a
[0121]
If the circuit of FIG. 20 is modified as shown in FIG. 21, the initial value of the M-sequence generator can be obtained at a higher speed.
[0122]
Compared with the circuit shown in FIG. 14, a mask circuit is not necessary and the number of circuits is reduced. Further, in the case of FIG. 20, since the initial state of the M-sequence generator is obtained in the order step, it is possible to load the initial state to another M-sequence generator or the like with half the number of steps than the general configuration. .
[0123]
As an example, FIG. 22 shows a case where the operation of the circuit of FIG. 20 is shifted by 100 with the initial state initDATA set to 1111111b and phDATA set to 1100100b.
[0124]
In FIG. 22, i inputs the phase shift amount L from the MSB, and when this is 1, the phase is doubled +1, and when it is 0, the phase is doubled. In
[0125]
A mask pattern is generated in
[0126]
Here, high-speed shift without using mask patternGoMethod for calculating the state of the M-sequence generator after it has been generated, its design method and hardwareYeThink about the realization method. In the second embodiment described above, the mask pattern is first calculated and then the M series is generated. In the third embodiment, the mask pattern is calculated by focusing on the similarity between the mask pattern calculation and the M series generation method. A method of generating the initial state of the M-sequence generator directly without using it can be realized.
[0127]
Further, it is shown that there are many circuits that realize this, and among them, a configuration that can be easily designed with a small circuit scale can be obtained. Compared to the method described in the second embodiment, a mask circuit is not required and the circuit scale is reduced. In addition, when it is desired to obtain an arbitrarily shifted state of the M-sequence generator, the shifted state can be obtained in parallel, so that the calculation can be performed with half the number of steps as compared with the second embodiment.
[0128]
According to the above, there is no need for a ROM, and the matrices A and P are fixed and a simple circuit is sufficient. In addition, since the calculation of the matrix A and the matrix P can be realized with one clock, the calculation processing can be speeded up. Furthermore, a phase shifted arbitrarily by n clocks can be obtained.
[0129]
As an application of the above-described third embodiment, a circuit that generates codes having different phases can be realized. FIG. 23 is a block diagram showing a configuration example of a code generation apparatus according to
[0130]
In this way, since the initial value can be calculated at high speed, the initial states of a plurality of code generators can be created with one initial value calculation. This makes it possible to obtain a large number of codes having different phases without using a mask.
[0131]
As mentioned above, although this invention was demonstrated by Embodiment 1-4, a various deformation | transformation is possible within the range of the main point of this invention, and these are not excluded from the scope of this invention.
[0132]
【The invention's effect】
As described above, according to the present invention, a new mask vector is obtained by the product of the first mask transformation matrix fixed by the generator polynomial and the mask vector before the transformation, and the MSB of the shift amount data is not zero. A mask based on the mask vector is obtained after obtaining a new mask vector by the product of the second mask transformation matrix fixed by the generator polynomial and the mask vector, shifting the shift amount data to the MSB side, and repeating the above steps a specified number of times. Since the pattern is output, the mask pattern can be generated at a high speed, thereby producing a code generation method capable of realizing a small circuit at a high speed.
[0133]
According to the next invention, a new mask vector is obtained by the product of the first mask transformation matrix fixed by the generator polynomial by the arithmetic means and the mask vector before the transformation, and generated when the MSB of the shift amount data is not zero. A new mask vector is obtained by the product of the second mask transformation matrix fixed by the polynomial and the mask vector, the shift amount data is shifted to the MSB side by the shift means, and the arithmetic means and the shift means are operated a specified number of times by the output means. Since the mask pattern based on the mask vector is output after the generation, the mask pattern can be generated at a high speed, thereby obtaining a code generator capable of realizing a small circuit at a high speed. There is an effect.
[0134]
According to the next invention, since the mask pattern is generated and the initial state is masked to perform the shift, a code is generated according to the mask pattern, and a dedicated code generator is not required. There is an effect that a code generator capable of reducing the circuit scale can be obtained.
[0135]
According to the next invention, the product of the first mask transformation matrix fixed by the generator polynomial by the first computing means and the state vector representing the state of the code generator is obtained, and either the phase shift or the code generation is obtained by the first selector. Either one of the output of the first calculation means and the state vector is selected according to the mode for instructing one of the second mask transformation matrix and the first selector output fixed by the generator polynomial by the second calculation means. The product is obtained, the second selector selects either the first selector or the output of the second arithmetic means according to the mode instructing one of phase shift and code generation and the MSB of the shift data, and a new Since the state vector is used, an initial state as a code generator is directly generated and a code is generated without using a mask pattern with a simple configuration. An effect that bets are capable of code generation apparatus is obtained.
[0136]
According to the next invention, since the state vector is connected to the plurality of shift registers that shift the codes having different phases through the selector, it is possible to generate the code with one circuit configuration without using a mask. There is an effect that a code generator capable of obtaining a large number of codes having different phases can be obtained.
[0137]
According to the next invention, since the phase shift process is performed using only the first mask transformation matrix and the second mask transformation matrix, it is possible to directly obtain the circuit state without calculating the mask pattern. There is an effect that a code generator can be obtained.
[0138]
According to the present invention, since the first mask transformation matrix having the specific structure is used, there is an effect that it is possible to obtain a code generation device capable of greatly reducing the circuit scale.
[0139]
According to the next invention, since the phase shift processing is performed using only the first mask transformation matrix and the second mask transformation matrix, it is possible to directly obtain the circuit state without calculating the mask pattern. There is an effect that a code generation method can be obtained.
[0140]
According to the present invention, since the first mask transformation matrix having a specific structure is used, there is an effect that a code generation method capable of reducing the circuit scale can be obtained.
[Brief description of the drawings]
FIG. 1 is a block diagram showing an example of a general M-sequence generator.
FIG. 2 is a diagram illustrating the nature of an M sequence.
FIG. 3 is a diagram for explaining the nature of an M sequence.
FIG. 4 is a diagram for explaining the nature of an M sequence.
FIG. 5 is a diagram illustrating the nature of an M sequence.
FIG. 6 is a block diagram showing another example of a general M-sequence generator.
FIG. 7 is a circuit diagram showing a configuration example of a mask pattern generation circuit according to the first embodiment of the present invention.
FIG. 8 is a block diagram showing a configuration example of an M-sequence generator according to
FIG. 9 is a block diagram showing a modification of the first embodiment.
FIG. 10 is a flowchart illustrating the operation of the first embodiment.
FIG. 11 is a diagram illustrating a phase shift procedure according to the first embodiment.
FIG. 12 is a circuit diagram showing another example of a mask pattern generation circuit according to the second embodiment of the present invention.
FIG. 13 is a block diagram showing a configuration example of an M-sequence generator according to the second embodiment of the present invention.
FIG. 14 is a circuit diagram showing a configuration example of a mask circuit according to the second embodiment.
FIG. 15 is a diagram illustrating the principle of an M-sequence generator according to
FIG. 16 is a diagram illustrating the principle of the M-sequence generator according to the third embodiment of the present invention from another viewpoint.
FIG. 17 is a circuit diagram showing a configuration example for realizing one matrix according to the third embodiment.
FIG. 18 is a circuit diagram showing another configuration example for realizing another matrix according to the third embodiment.
FIG. 19 is a block diagram showing a configuration example of an M-sequence generator according to the third embodiment.
FIG. 20 shows a modification of the M-sequence generator according to the third embodiment.
FIG. 21 is a diagram illustrating a phase shift procedure according to the third embodiment.
FIG. 22 is a block diagram showing a configuration example of an M-sequence generator according to
FIG. 23 is a block diagram illustrating an example of a code generation device according to a conventional example.
FIG. 24 is a flowchart illustrating a mask conversion operation according to a conventional example.
FIG. 25 is a diagram illustrating a phase shift procedure according to a conventional example.
FIG. 26 is a block diagram showing another example of a conventional code generator.
[Explanation of symbols]
21 arithmetic units, 21A to 21G mask pattern generation circuit, 22, 23 shift register, 31 mask pattern generation circuit, 32 mask circuit, 33 initial state buffer, 34 shift register, 35 flip-flop, 41, 45 EX-OR, 42, 46 shift register, 51, 51A, 51B, 51C circuit, 52, 52A, 52B, 52C circuit, 53D flip-flop, 54 shift register, 55, 56, 61A, 61B, 61C selector, 57 NAND, 85 switch, 81- 84 Shift register.
Claims (9)
シフト量データのMSBがゼロでない場合に、生成多項式により固定される第2マスク変換行列と前記第1ステップで求めたマスクベクトルとの積で新たなマスクベクトルを求める第2ステップと、
前記シフト量データをMSB側へシフトする第3ステップと、
前記第1ステップと前記第2ステップと前記第3ステップを指定回数繰り返した後にマスクベクトルに基づくマスクパターンを出力する第4ステップと、
を含んだことを特徴とする符号発生方法。A first step of obtaining a new mask vector by a product of a first mask transformation matrix fixed by a generator polynomial and a mask vector before transformation;
A second step of obtaining a new mask vector by a product of the second mask transformation matrix fixed by the generator polynomial and the mask vector obtained in the first step when the MSB of the shift amount data is not zero;
A third step of shifting the shift amount data to the MSB side;
A fourth step of outputting a mask pattern based on a mask vector after repeating the first step, the second step, and the third step a specified number of times;
A code generation method comprising:
前記シフト量データをMSB側へシフトするシフト手段と、
前記演算手段と前記シフト手段を指定回数動作させた後にマスクベクトルに基づくマスクパターンを出力する出力手段と、
を備えたことを特徴とする符号発生装置。A new mask vector is obtained by the product of the first mask transformation matrix fixed by the generator polynomial and the mask vector before conversion, and the second mask transformation matrix fixed by the generator polynomial when the MSB of the shift amount data is not zero. Computing means for obtaining a new mask vector by a product of the mask vector and the mask vector;
Shift means for shifting the shift amount data to the MSB side;
An output means for outputting a mask pattern based on a mask vector after operating the arithmetic means and the shift means a specified number of times;
A code generation apparatus comprising:
前記マスクパターン生成手段で生成された前記設定された位相シフト量だけシフトさせるマスクパターンで、任意の初期状態を表すデータをマスクして1Bitの符号を得て、以降、前記1位相ずつシフトさせるマスクパターンを用いて順次1Bitずつ符号を得るマスク手段と、
を備えたことを特徴とする請求項2に記載の符号発生装置。 Using the arithmetic means, the shift means, and the output means, a mask pattern for shifting data representing an arbitrary initial state by a set phase shift amount is generated. Mask pattern generating means for generating a mask pattern for shifting by phase ;
Wherein the mask pattern to be shifted mask pattern phase shift said set generated by the generating means, to obtain the sign of 1Bit masks the data representing the arbitrary initial state, after the mask is shifted by the first phase Mask means for sequentially obtaining 1-bit codes using a pattern ;
The code generator according to claim 2, further comprising:
位相シフトと符号発生のいずれか一方を指示するモードに応じて前記第1演算手段の出力と前記状態ベクトルとのいずれか一方を選択する第1セレクタと、
生成多項式により固定される第2マスク変換行列と第1セレクタ出力との積を求める第2演算手段と、
位相シフトと符号発生のいずれか一方を指示するモードおよびシフトデータのMSBに応じて前記第1セレクタか、前記第2演算手段の出力のいずれか一方を選択し、新たな状態ベクトルとする第2セレクタと、
を備えたことを特徴とする符号発生装置。First computing means for obtaining a product of a first mask transformation matrix fixed by a generator polynomial and a state vector representing the state of the code generator;
A first selector that selects one of the output of the first calculation means and the state vector in accordance with a mode for instructing one of phase shift and code generation;
Second computing means for obtaining a product of the second mask transformation matrix fixed by the generator polynomial and the first selector output;
A second state vector is selected as a new state vector by selecting either the first selector or the output of the second computing means in accordance with the mode for instructing one of phase shift and code generation and the MSB of the shift data. A selector,
A code generation apparatus comprising:
生成多項式f(x)=gnxn+gn-1xn-1+gn-2xn-2+…+g0x0で、かつnが偶数の場合、
生成多項式f(x)=gnxn+gn-1xn-1+gn-2xn-2+…+g0x0で、かつnが奇数の場合、
Generator polynomial f (x) = g n x n + g n-1 x n-1 + g n-2 x n-2 +... + G 0 x 0 and n is an even number,
Generator polynomial f (x) = g n x n + g n-1 x n-1 + g n-2 x n-2 + ... + g 0 x 0 and n is an odd number,
位相シフトと符号発生のいずれか一方を指示するモードに応じて、前記第1の演算ステップによる演算結果と前記状態ベクトルのいずれか一方を選択する第1の選択ステップと、 A first selection step of selecting one of the calculation result of the first calculation step and the state vector according to a mode for instructing one of phase shift and code generation;
生成多項式により固定される第2マスク変換行列と前記第1の選択ステップによる選択結果との積を求める第2の演算ステップと、 A second calculation step for obtaining a product of the second mask transformation matrix fixed by the generator polynomial and the selection result by the first selection step;
位相シフトと符号発生のいずれか一方を指示するモードおよびシフトデータのMSBに応じて、前記第1の選択ステップによる選択結果と前記第2の演算ステップによる演算結果のいずれか一方を選択し、その選択結果を新たな状態ベクトルとする第2の選択ステップと、 According to the mode for instructing either one of phase shift and code generation and the MSB of the shift data, one of the selection result by the first selection step and the calculation result by the second calculation step is selected, A second selection step in which the selection result is a new state vector;
を含み、 Including
さらに、前記第1マスク変換行列は、前記第2マスク変換行列による位相シフト処理の2倍の位相シフトが可能なマスクパターンに基づいて特定される行列とし、 Furthermore, the first mask transformation matrix is a matrix identified based on a mask pattern capable of a phase shift twice as large as the phase shift processing by the second mask transformation matrix,
前記第1マスク変換行列および前記第2マスク変換行列の組み合わせによって、任意の位相シフト処理を行うことを特徴とする符号発生方法。 An arbitrary phase shift process is performed by a combination of the first mask transformation matrix and the second mask transformation matrix.
生成多項式f(x)=g Generator polynomial f (x) = g nn xx nn +g+ G n−1n-1 xx n−1n-1 +g+ G n−2n-2 xx n−2n-2 +…+g+ ... + g 00 xx 00 で、かつnが偶数の場合は、And n is an even number,
生成多項式f(x)=g Generator polynomial f (x) = g nn xx nn +g+ G n−1n-1 xx n−1n-1 +g+ G n−2n-2 xx n−2n-2 +…+g+ ... + g 00 xx 00 で、かつnが奇数の場合は、And n is an odd number,
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP24405698A JP3618554B2 (en) | 1998-08-28 | 1998-08-28 | Code generation method and code generation apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP24405698A JP3618554B2 (en) | 1998-08-28 | 1998-08-28 | Code generation method and code generation apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2000077987A JP2000077987A (en) | 2000-03-14 |
| JP3618554B2 true JP3618554B2 (en) | 2005-02-09 |
Family
ID=17113079
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP24405698A Expired - Fee Related JP3618554B2 (en) | 1998-08-28 | 1998-08-28 | Code generation method and code generation apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3618554B2 (en) |
-
1998
- 1998-08-28 JP JP24405698A patent/JP3618554B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2000077987A (en) | 2000-03-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3022439B2 (en) | Pseudo random number generation method and apparatus | |
| EP2000900A2 (en) | Extending a repetition period of a random sequence | |
| US6816876B2 (en) | Apparatus and method for modifying an M-sequence with arbitrary phase shift | |
| US7486789B2 (en) | Device and method for calculation on elliptic curve | |
| CN114968173A (en) | Polynomial Multiplication Operation Method and Polynomial Multiplier Based on NTT and INTT Structure | |
| JP2002040933A (en) | Ciphering device using standard algorithm for ciphering data | |
| US20090089350A1 (en) | Modular reduction operator | |
| JPH0818550A (en) | Code sequence generator | |
| JP3940714B2 (en) | Arithmetic device and encryption / decryption arithmetic device | |
| CN115473626B (en) | Parallelized, Scalable Linear Feedback Shift Register | |
| JP3618554B2 (en) | Code generation method and code generation apparatus | |
| US8909510B2 (en) | LFSR emulation | |
| JP2002084257A (en) | Orthogonal code generating device, scramble code generating device, and mobile wireless terminal using them | |
| EP1202488B1 (en) | Encryption sub-key generation circuit | |
| JPH10308720A (en) | Circuit for arbitrarily shifting m-sequence | |
| KR100954843B1 (en) | Block indexing-based elliptic curve cryptography method in sensor mote, apparatus and recording medium recording the same | |
| JP3965805B2 (en) | Code sequence generator | |
| Hasan et al. | Toeplitz matrix approach for binary field multiplication using quadrinomials | |
| CN121116238A (en) | Configurable vectorized modular multiplier | |
| JP2002091296A (en) | Expanded key generation device, expanded key generation program, and recording medium | |
| WO2000005779A2 (en) | Quasi-orthogonal code mask generating device in mobile communication system | |
| JP3790514B2 (en) | Pseudo random sequence generation system | |
| JP2000278099A (en) | M-sequencies generating circuit and pn code generating circuit | |
| WO2024226059A1 (en) | Hybrid ring generators | |
| JPS61193183A (en) | Random number generation circuit |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040301 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040427 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040623 |
|
| 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: 20041109 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20041110 |
|
| 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: 20071119 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081119 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081119 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091119 Year of fee payment: 5 |
|
| LAPS | Cancellation because of no payment of annual fees |