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

Subversion Repositories myhdl_lfsr

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 raineys
-- File: generated/lfsr_29.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_29 is
14
    port (
15
        reset: in std_logic;
16
        clock: in std_logic;
17
        lfsr_out: out unsigned(28 downto 0)
18
    );
19
end entity lfsr_29;
20
 
21
 
22
architecture MyHDL of lfsr_29 is
23
 
24
 
25
constant tap_const__val: integer := 335544320;
26
 
27
 
28
 
29
signal reg_internal: unsigned(28 downto 0);
30
 
31
begin
32
 
33
 
34
 
35
 
36
 
37
LFSR_29_LFSR_LOGIC: process (clock, reset) is
38
begin
39
    if (reset = '1') then
40
        reg_internal <= to_unsigned(128420263, 29);
41
    elsif rising_edge(clock) then
42
        if (reg_internal(0) = '1') then
43
            reg_internal <= (shift_right(reg_internal, 1) xor to_unsigned(tap_const__val, 29));
44
        else
45
            reg_internal <= shift_right(reg_internal, 1);
46
        end if;
47
    end if;
48
end process LFSR_29_LFSR_LOGIC;
49
 
50
 
51
 
52
lfsr_out <= reg_internal;
53
 
54
end architecture MyHDL;

powered by: WebSVN 2.1.0

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