URL
https://opencores.org/ocsvn/myhdl_lfsr/myhdl_lfsr/trunk
Subversion Repositories myhdl_lfsr
[/] [myhdl_lfsr/] [trunk/] [sample_modules/] [VHDL/] [lfsr_256.vhd] - Rev 2
Compare with Previous | Blame | View Log
-- File: generated/lfsr_256.vhd -- Generated by MyHDL 0.9.0 -- Date: Thu Jan 11 17:29:05 2018 library IEEE; use IEEE.std_logic_1164.all; use IEEE.numeric_std.all; use std.textio.all; use work.pck_myhdl_090.all; entity lfsr_256 is port ( reset: in std_logic; clock: in std_logic; lfsr_out: out unsigned(255 downto 0) ); end entity lfsr_256; architecture MyHDL of lfsr_256 is signal reg_internal: unsigned(255 downto 0); begin LFSR_256_LFSR_LOGIC: process (clock, reset) is begin if (reset = '1') then reg_internal <= unsigned'"0011111000011111111101011111001101001110110101011000110001110111110000011100011001110100010010010110101000111010010101000000101000011001000101101100111010001101001001111000101111001011101000001100100100111111100100010001100101101111110111000011101111100000"; elsif rising_edge(clock) then if (reg_internal(0) = '1') then reg_internal <= (shift_right(reg_internal, 1) xor unsigned'("1010010000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000")); else reg_internal <= shift_right(reg_internal, 1); end if; end if; end process LFSR_256_LFSR_LOGIC; lfsr_out <= reg_internal; end architecture MyHDL;