Forum Discussion
Altera_Forum
Honored Contributor
15 years agoI normally code as below
signal shift : std_logic_vector(15 downto 1);
process(reset,clk)
if reset = '1' then
shift <= "010"&x"123"; -- seed
elsif rising_edge(clk) then
if en = '1' then
shift(1) <= shift(14) xor shift(15); -- taps
shift(2 to 15) <= shift(1 to 14); -- shift
end if;
end if;
end process;