| Communications Toolbox | ![]() |
Convert mask vector to shift for a shift register configuration
Syntax
Description
shift = mask2shift(prpoly,mask)
returns the shift that is equivalent to a mask, for a linear feedback shift register whose connections are specified by the primitive polynomial prpoly. The prpoly input can have one of these formats:
The mask input is a binary vector whose length is the degree of the primitive polynomial.
Note
To save time, mask2shift does not check that prpoly is primitive. If it is not primitive, then the output is not meaningful. To find primitive polynomials, use primpoly or see [2].
|
For more information about how masks and shifts are related to pseudonoise sequence generators, see shift2mask.
Definition of Equivalent Shift
If A is a root of the primitive polynomial and m(A) is the mask polynomial evaluated at A, then the equivalent shift s solves the equation As = m(A). To interpret the vector mask as a polynomial, treat mask as a list of coefficients in order of descending powers.
Examples
The first command below converts a mask of x3 + 1 into an equivalent shift, for the linear feedback shift register whose connections are specified by the primitive polynomial x4 + x3 + 1. The second command shows that a mask of 1 is equivalent to a shift of 0. In both cases, notice that the length of the mask vector is one less than the length of the prpoly vector.
See Also
shift2mask, log, isprimitive, primpoly
References
[1] Lee, J. S., and L. E. Miller, CDMA Systems Engineering Handbook, Boston, Artech House, 1998.
[2] Simon, Marvin K., Jim K. Omura, et al., Spread Spectrum Communications Handbook, New York, McGraw-Hill, 1994.
| marcumq | minpol | ![]() |