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

Subversion Repositories iota_pow_vhdl

[/] [iota_pow_vhdl/] [trunk/] [vhdl_cyclone10_lp/] [de1.vhd] - Blame information for rev 6

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 4 microengin
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.STD_LOGIC_ARITH.ALL;
4
use IEEE.STD_LOGIC_UNSIGNED.ALL;
5
 
6
entity de1 is
7
        port (
8
                CLOCK_50 : in std_logic;
9
                reset : in std_logic;
10
                led_running : out std_logic;
11
                led_found : out std_logic;
12
                led_overflow : out std_logic;
13
--              ////////////////////////        UART    ////////////////////////
14
                spi_mosi : in std_logic;
15
                spi_sck : in std_logic;
16
                spi_ss : in std_logic;
17
                spi_miso : out std_logic
18
 
19
        );
20
end;
21
 
22
architecture beh of de1 is
23
 
24
 
25
 
26
 
27
signal pll_clk : std_logic;
28
signal pll_reset : std_logic := '0';
29
signal pll_locked : std_logic;
30
 
31
signal spi_data_tx : std_logic_vector(31 downto 0);
32
signal spi_data_rx  : std_logic_vector(31 downto 0);
33
signal spi_data_rx_en : std_logic;
34
 
35
 
36
signal pll_slow : std_logic;
37
 
38
component spi_slave
39
        port
40
        (
41
                clk : in std_logic;
42
                reset : in std_logic;
43
 
44
                mosi : in std_logic;
45
                miso : out std_logic;
46
                sck : in std_logic;
47
                ss : in std_logic;
48
 
49
 
50
                data_rd : in std_logic_vector(31 downto 0);
51
                data_wr : out std_logic_vector(31 downto 0);
52
                data_wren : out std_logic
53
        );
54
end component;
55
 
56
component pll
57
        PORT
58
        (
59
                areset          : IN STD_LOGIC  := '0';
60
                inclk0          : IN STD_LOGIC  := '0';
61
                c0              : OUT STD_LOGIC ;
62
                c1 : out std_logic;
63
                locked          : OUT STD_LOGIC
64
        );
65
end component;
66
 
67
component curl
68
        port
69
        (
70
                clk : in std_logic;
71
                clk_slow : in std_logic;
72
                reset : in std_logic;
73
 
74
                spi_data_rx : in std_logic_vector(31 downto 0);
75
                spi_data_tx : out std_logic_vector(31 downto 0);
76
                spi_data_rxen : in std_logic;
77
 
78
                overflow : out std_logic;
79
                running : out std_logic;
80
                found : out std_logic
81
        );
82
end component;
83
 
84
begin
85
        pll0 : pll port map (
86
                areset => pll_reset,
87
                inclk0 => CLOCK_50,
88
                c0 => pll_clk,
89
                c1      => pll_slow,
90
                locked => pll_locked
91
        );
92
 
93
 
94
        spi0 : spi_slave port map (
95
                clk => pll_slow,
96
                reset => reset,
97
 
98
                mosi => spi_mosi,
99
                miso => spi_miso,
100
                sck => spi_sck,
101
                ss => spi_ss,
102
 
103
                data_rd => spi_data_tx,
104
                data_wr => spi_data_rx,
105
                data_wren => spi_data_rx_en
106
        );
107
 
108
        curl0 : curl port map (
109
                clk => pll_clk,
110
                reset => reset,
111
                clk_slow => pll_slow,
112
 
113
                spi_data_rx => spi_data_rx,
114
                spi_data_tx => spi_data_tx,
115
                spi_data_rxen => spi_data_rx_en,
116
 
117
                overflow => led_overflow,
118
                running => led_running,
119
                found => led_found
120
        );
121
 
122
 
123
end architecture;

powered by: WebSVN 2.1.0

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