PoC.comm.scramble
The LFSR computation is unrolled to generate an arbitrary number of mask bits in parallel. The mask are output in little endian. The generated bit sequence is independent from the chosen output width.
Entity Declaration:
1entity comm_scramble is
2 generic (
3 GEN : bit_vector; -- Generator Polynomial (little endian)
4 BITS : positive -- Width of Mask Bits to be computed in parallel in each step
5 );
6 port (
7 clk : in std_logic; -- Clock
8
9 set : in std_logic; -- Set LFSR to value provided on din
10 din : in std_logic_vector(GEN'length-2 downto 0) := (others => '0');
11
12 step : in std_logic; -- Compute a Mask Output
13 mask : out std_logic_vector(BITS-1 downto 0)
14 );
15end entity comm_scramble;