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

Subversion Repositories myhdl_lfsr

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 raineys
-- File: generated/lfsr_37.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_37 is
14
    port (
15
        reset: in std_logic;
16
        clock: in std_logic;
17
        lfsr_out: out unsigned(36 downto 0)
18
    );
19
end entity lfsr_37;
20
 
21
 
22
architecture MyHDL of lfsr_37 is
23
 
24
 
25
 
26
 
27
 
28
signal reg_internal: unsigned(36 downto 0);
29
 
30
begin
31
 
32
 
33
 
34
 
35
 
36
LFSR_37_LFSR_LOGIC: process (clock, reset) is
37
begin
38
    if (reset = '1') then
39
        reg_internal <= unsigned'"0010101000011111100110111001110110001";
40
    elsif rising_edge(clock) then
41
        if (reg_internal(0) = '1') then
42
            reg_internal <= (shift_right(reg_internal, 1) xor unsigned'("1100101000000000000000000000000000000"));
43
        else
44
            reg_internal <= shift_right(reg_internal, 1);
45
        end if;
46
    end if;
47
end process LFSR_37_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.