T
T. Irmen
Guest
Hi,
my poly is G(x)= 1 + x^39 + x^58
and my databuswith ist 64bit.
And that´s my implementation:
( scramble_1s is the history of the scrambler, data_0 the data input, and
scrambled_s is current scrambling result )
scramble: process(scrambled_s,data_0,scrambled1_s)
variable scrambled_v : std_logic_vector(63 downto 0);
begin
if CLK'event and CLK = '1' then
for i in 0 to 17 loop
scrambled_v(i) := scrambled_v(7+i) XOR scrambled_v(46+i) XOR data_0(i);
end loop;
for i in 18 to 56 loop
scrambled_v(i) := scrambled_v(7+i) XOR scrambled1_s(i-18) XOR data_0(i);
end loop;
for i in 57 to 63 loop
scrambled_v(i) := scrambled1_s(i-57) XOR scrambled1_s(i-18) XOR
data_0(i);
end loop;
scrambled_s <= scrambled_v;
end if;
end process scramble;
Something goes wrong here, don´t know what
any suggestions?
thanks,
thomas
my poly is G(x)= 1 + x^39 + x^58
and my databuswith ist 64bit.
And that´s my implementation:
( scramble_1s is the history of the scrambler, data_0 the data input, and
scrambled_s is current scrambling result )
scramble: process(scrambled_s,data_0,scrambled1_s)
variable scrambled_v : std_logic_vector(63 downto 0);
begin
if CLK'event and CLK = '1' then
for i in 0 to 17 loop
scrambled_v(i) := scrambled_v(7+i) XOR scrambled_v(46+i) XOR data_0(i);
end loop;
for i in 18 to 56 loop
scrambled_v(i) := scrambled_v(7+i) XOR scrambled1_s(i-18) XOR data_0(i);
end loop;
for i in 57 to 63 loop
scrambled_v(i) := scrambled1_s(i-57) XOR scrambled1_s(i-18) XOR
data_0(i);
end loop;
scrambled_s <= scrambled_v;
end if;
end process scramble;
Something goes wrong here, don´t know what
any suggestions?
thanks,
thomas