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

Subversion Repositories wishbone_bfm

[/] [wishbone_bfm/] [tags/] [arelease/] [rtl/] [syscon.vhd] - Blame information for rev 15

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 amulcock
-------------------------------------------------------------------------------
2
----                                                                       ----
3 10 amulcock
---- WISHBONE Wishbone_BFM IP Core                                         ----
4 2 amulcock
----                                                                       ----
5 10 amulcock
---- This file is part of the Wishbone_BFM project                         ----
6
---- http://www.opencores.org/cores/Wishbone_BFM/                          ----
7 2 amulcock
----                                                                       ----
8
---- Description                                                           ----
9 10 amulcock
---- Implementation of Wishbone_BFM IP core according to                   ----
10
---- Wishbone_BFM IP core specification document.                          ----
11 2 amulcock
----                                                                       ----
12
---- To Do:                                                                ----
13
----    NA                                                                 ----
14
----                                                                       ----
15
---- Author(s):                                                            ----
16
----   Andrew Mulcock, amulcock@opencores.org                              ----
17
----                                                                       ----
18
-------------------------------------------------------------------------------
19
----                                                                       ----
20
---- Copyright (C) 2008 Authors and OPENCORES.ORG                          ----
21
----                                                                       ----
22
---- This source file may be used and distributed without                  ----
23
---- restriction provided that this copyright statement is not             ----
24
---- removed from the file and that any derivative work contains           ----
25
---- the original copyright notice and the associated disclaimer.          ----
26
----                                                                       ----
27
---- This source file is free software; you can redistribute it            ----
28
---- and/or modify it under the terms of the GNU Lesser General            ----
29
---- Public License as published by the Free Software Foundation           ----
30
---- either version 2.1 of the License, or (at your option) any            ----
31
---- later version.                                                        ----
32
----                                                                       ----
33
---- This source is distributed in the hope that it will be                ----
34
---- useful, but WITHOUT ANY WARRANTY; without even the implied            ----
35
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR               ----
36
---- PURPOSE. See the GNU Lesser General Public License for more           ----
37
---- details.                                                              ----
38
----                                                                       ----
39
---- You should have received a copy of the GNU Lesser General             ----
40
---- Public License along with this source; if not, download it            ----
41
---- from http://www.opencores.org/lgpl.shtml                              ----
42
----                                                                       ----
43
-------------------------------------------------------------------------------
44
----                                                                       ----
45
-- CVS Revision History                                                    ----
46
----                                                                       ----
47
-- $Log: not supported by cvs2svn $                                                                   ----
48
----                                                                       ----
49
 
50
 
51
use work.io_pack.all;   -- contains the clock frequency integer
52
 
53
 
54
library ieee;
55
use ieee.std_logic_1164.all;
56
-- --------------------------------------------------------------------
57
-- --------------------------------------------------------------------
58
 
59
entity syscon is
60
    port(
61
    -- sys_con ports
62
    RST_sys    : in  std_logic;
63
    CLK_stop   : in  std_logic;
64
    RST_O      : out std_logic;
65
    CLK_O      : out std_logic
66
        );
67
 
68
end syscon;
69
 
70
architecture Behavioral of syscon is
71
 
72
signal  clk_internal    : std_logic;
73
signal  rst_internal    : std_logic := '0'; -- not reset
74
 
75
begin
76
 
77
 
78
-- --------------------------------------------------------------------
79
-- --------------------------------------------------------------------
80
-- --------------------------------------------------------------------
81
 -- sys con siumulator
82
clock_loop : process
83
begin
84
    clk_internal <= '0';
85
        if CLK_stop = '1' then
86
            wait;
87
        end if;
88
    wait for clk_period/2;
89
        clk_internal <= '1';
90
    wait for clk_period/2;
91
end process clock_loop;
92
 
93
 
94
CLK_O <= clk_internal;
95
 
96
rst_loop : process ( RST_sys, clk_internal )
97
begin
98
    if ( RST_sys = '1' ) then
99
        rst_internal <= '1';
100
    elsif rising_edge( clk_internal ) then
101
        if RST_sys = '0' then
102
            rst_internal <= '0';
103
        end if;
104
    end if;
105
end process rst_loop;
106
 
107
RST_O <= rst_internal;
108
 
109
end Behavioral;

powered by: WebSVN 2.1.0

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