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

Subversion Repositories System09

[/] [System09/] [trunk/] [rtl/] [VHDL/] [Flasher.vhd] - Blame information for rev 100

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

Line No. Rev Author Line
1 100 davidgb
--===========================================================================--
2
--                                                                           --
3
--                    LED Flasher                                            --
4
--                                                                           --
5
--===========================================================================--
6
--
7
--  File name      : flasher.vhd
8
--
9
--  Entity name    : flasher
10
--
11
--  Purpose        : Implements a long counter used to flash a LED
12
--                   to indicate code has loaded correctly
13
--
14
--  Dependencies   : ieee.std_logic_1164
15
--                   ieee.numeric_std
16
--                   ieee.std_logic_unsigned
17
--                   unisim.vcomponents
18
--
19
--  Author         : John E. Kent
20
--
21
--  Email          : dilbert57@opencores.org      
22
--
23
--  Web            : http://opencores.org/project,system09
24
--
25
--
26
--  Copyright (C) 2010 John Kent
27
--
28
--  This program is free software: you can redistribute it and/or modify
29
--  it under the terms of the GNU General Public License as published by
30
--  the Free Software Foundation, either version 3 of the License, or
31
--  (at your option) any later version.
32
--
33
--  This program is distributed in the hope that it will be useful,
34
--  but WITHOUT ANY WARRANTY; without even the implied warranty of
35
--  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
36
--  GNU General Public License for more details.
37
--
38
--  You should have received a copy of the GNU General Public License
39
--  along with this program.  If not, see <http://www.gnu.org/licenses/>.
40
--
41
--===========================================================================--
42
--                                                                           --
43
--                              Revision  History                            --
44
--                                                                           --
45
--===========================================================================--
46
--
47
-- Version Author        Date         Changes
48
--
49
-- 0.1     John Kent     2010-08-28   Made separate module
50
--
51
 
52
library ieee;
53
  use ieee.std_logic_1164.all;
54
  use ieee.numeric_std.all;
55
  use ieee.std_logic_unsigned.all;
56
library unisim;
57
  use unisim.vcomponents.all;
58
 
59
-----------------------------------------------------------------------
60
--                    Entity for B3_SRAM                             --
61
-----------------------------------------------------------------------
62
 
63
entity flasher is
64
  port (
65
    clk      : in  std_logic;           -- Clock input
66
    rst      : in  std_logic;           -- Reset input (active high)
67
    LED      : out Std_Logic            -- LED output        
68
  );
69
end flasher;
70
 
71
--================== End of entity ==============================--
72
 
73
-------------------------------------------------------------------------------
74
-- Architecture for Flasher
75
-------------------------------------------------------------------------------
76
 
77
architecture rtl of  flasher is
78
 
79
-- Flashing LED test signals
80
signal countL       : std_logic_vector(23 downto 0);
81
 
82
begin
83
 
84
--
85
-- LED Flasher to indicate code has loaded
86
--
87
my_LED_Flasher : process (clk, rst, CountL )
88
begin
89
  if falling_edge(clk) then
90
    if rst = '1' then
91
      countL <= (others=>'0');
92
    else
93
      countL <= countL + 1;
94
    end if;
95
  end if;
96
  LED <= countL(23);
97
end process;
98
 
99
end rtl;

powered by: WebSVN 2.1.0

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