Advertisement
Guest User

Untitled

a guest
Mar 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
VHDL 0.43 KB | None | 0 0
  1. process(clk, rst)
  2.     variable shifted : std_logic_vector(15 downto 0) := (others => '0');
  3.     begin
  4.         if(rst = '1') then
  5.             state <= load;
  6.             seed  <= load;
  7.             shifted := (others => '0');
  8.         elsif(rising_edge(clk)) then
  9.             shifted(15 - 1 downto 0) := state(15 downto 0 + 1);
  10.             shifted(15) := '0';
  11.             if(shifted(0) = '1') then
  12.                 state <= shifted xor x"B400";
  13.             else
  14.                 state <= shifted;
  15.             end if;                    
  16.         end if;
  17.     end process;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement