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

Subversion Repositories System09

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

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

powered by: WebSVN 2.1.0

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