URL
https://opencores.org/ocsvn/myhdl_lfsr/myhdl_lfsr/trunk
Details |
Compare with Previous |
View Log
Line No. |
Rev |
Author |
Line |
1 |
2 |
raineys |
-- File: generated/lfsr_1024.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_1024 is
|
14 |
|
|
port (
|
15 |
|
|
reset: in std_logic;
|
16 |
|
|
clock: in std_logic;
|
17 |
|
|
lfsr_out: out unsigned(1023 downto 0)
|
18 |
|
|
);
|
19 |
|
|
end entity lfsr_1024;
|
20 |
|
|
|
21 |
|
|
|
22 |
|
|
architecture MyHDL of lfsr_1024 is
|
23 |
|
|
|
24 |
|
|
|
25 |
|
|
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
signal reg_internal: unsigned(1023 downto 0);
|
29 |
|
|
|
30 |
|
|
begin
|
31 |
|
|
|
32 |
|
|
|
33 |
|
|
|
34 |
|
|
|
35 |
|
|
|
36 |
|
|
LFSR_1024_LFSR_LOGIC: process (clock, reset) is
|
37 |
|
|
begin
|
38 |
|
|
if (reset = '1') then
|
39 |
|
|
reg_internal <= unsigned'"0010101001100110010111000110010110001000111011111000011010001110000111011011010010100011100001110100000111101001110110010000010111110110001010011001111001111111011101010110011001011101100111110011000000100011100111111010010010011110110011000001101100110100110000010101111001110010100110111001001011101101110111010100111010001110110101101010010011011111010011010001101001011110110010100100010001011010001001110110011001011001011111101011100001000000111011110001110111111110111111111000100011110110100011000000101110110001100000101111000101111010010100000001011100001100110010101000100001100110011001011101010011110100011001101110101100111101100110101010011110100111100001110001100001100110010000000111001100001011101101011000100111010000001010110000000011001000111010000001110001000100010110111000100011001101011100111000000101000010010010100011110001001001010011010110000001111000001100101010111101010111010101000100101001001111100000101110111111011000000011010010001010011011001001011101110010011010001001111001111000111110";
|
40 |
|
|
elsif rising_edge(clock) then
|
41 |
|
|
if (reg_internal(0) = '1') then
|
42 |
|
|
reg_internal <= (shift_right(reg_internal, 1) xor unsigned'("1000000001000000000000110000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"));
|
43 |
|
|
else
|
44 |
|
|
reg_internal <= shift_right(reg_internal, 1);
|
45 |
|
|
end if;
|
46 |
|
|
end if;
|
47 |
|
|
end process LFSR_1024_LFSR_LOGIC;
|
48 |
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
|
|
lfsr_out <= reg_internal;
|
52 |
|
|
|
53 |
|
|
end architecture MyHDL;
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.