OpenCores
URL https://opencores.org/ocsvn/myhdl_lfsr/myhdl_lfsr/trunk

Subversion Repositories myhdl_lfsr

[/] [myhdl_lfsr/] [trunk/] [sample_modules/] [VHDL/] [lfsr_512.vhd] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 raineys
-- File: generated/lfsr_512.vhd
2
-- Generated by MyHDL 0.9.0
3
-- Date: Thu Jan 11 17:29:05 2018
4
 
5
 
6
library IEEE;
7
use IEEE.std_logic_1164.all;
8
use IEEE.numeric_std.all;
9
use std.textio.all;
10
 
11
use work.pck_myhdl_090.all;
12
 
13
entity lfsr_512 is
14
    port (
15
        reset: in std_logic;
16
        clock: in std_logic;
17
        lfsr_out: out unsigned(511 downto 0)
18
    );
19
end entity lfsr_512;
20
 
21
 
22
architecture MyHDL of lfsr_512 is
23
 
24
 
25
 
26
 
27
 
28
signal reg_internal: unsigned(511 downto 0);
29
 
30
begin
31
 
32
 
33
 
34
 
35
 
36
LFSR_512_LFSR_LOGIC: process (clock, reset) is
37
begin
38
    if (reset = '1') then
39
        reg_internal <= unsigned'"00101010110110000010001111101100010011010110111101101000111000111100100100010010010011101110010100110001100111010101110101100100100110000111101000000101110001101001011010101001010011011111100011101010100011110111111110111010001001000100010000000111001111111111101100111110000011010110101111111100010101000110110001100000101000011100010010101011110101011100110011010010111100010010001100110000000011011011011010100000111100010100011100100110110100010000100000101001101100010110111100000010001000010110001001010001";
40
    elsif rising_edge(clock) then
41
        if (reg_internal(0) = '1') then
42
            reg_internal <= (shift_right(reg_internal, 1) xor unsigned'("10100100100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"));
43
        else
44
            reg_internal <= shift_right(reg_internal, 1);
45
        end if;
46
    end if;
47
end process LFSR_512_LFSR_LOGIC;
48
 
49
 
50
 
51
lfsr_out <= reg_internal;
52
 
53
end architecture MyHDL;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.