Skip to main content

prbs

Function prbs 

Source
pub fn prbs(order: u32, length: usize, seed: u64) -> Result<Vec<u8>>
Expand description

length bits of the PRBS of order order, from the register state seed.

The register is a Fibonacci LFSR (comnum_math::sequences::lfsr) with the polynomial xⁿ + xᵏ + 1 of the order; seed gives its initial content (its n low bits; an all-zero register is replaced by 1, since it would lock the sequence at zero). The output bit is the feedback bit: the sequence of O.150 at another phase and never inverted; O150Sequence gives the test sequences of the Recommendation exactly.

§Errors

comnum_core::Error::Config for an order outside {7, 9, 11, 15, 20, 23, 29, 31}.