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

Subversion Repositories tinyvliw8

[/] [tinyvliw8/] [trunk/] [src/] [vhdl/] [rstCtrl.vhd] - Blame information for rev 9

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

Line No. Rev Author Line
1 2 steckol
-----------------------------------------------------------------
2
-- Project: Aeternitas
3
-- Author:  Oliver Stecklina <stecklina@ihp-microelectronics.com>
4
-- Date:    10.03.2015 
5
-- File:    rstCtrl.vhd
6
-- Design:  AeternitasSWUR
7
-----------------------------------------------------------------
8
-- Description : This unit is a reset control to synchronize
9
--               reset and clock signal.
10
--
11
--     Copyright (c) 2015 IHP Microelectronics GmbH
12
--     All rights reserved
13
-----------------------------------------------------------------
14
-- $Log$
15
-----------------------------------------------------------------
16
 
17
library ieee;
18
use ieee.std_logic_1164.all;
19
 
20
entity rstCtrl is
21
        port (
22
                rstIn_n  : in std_logic;
23
                clk      : in std_logic;
24
                pol      : in std_logic;  -- polarity of 1st clock edge (0 => falling)
25
 
26
                rstOut_n : out std_logic
27
        );
28
end rstCtrl;
29
 
30
architecture behav of rstCtrl is
31
 
32
component gendelay
33
        generic (n: integer := 1);
34
        port (
35
                a_in    : in    std_logic;
36
                a_out   : out   std_logic
37
        );
38
end component;
39
 
40
        signal rst_n_s : std_logic;
41
        signal clk_s   : std_logic;
42
 
43
begin
44
 
45
        sync_clkRst: process(clk_s)
46
        begin
47
                if clk_s'event and clk_s = '1' then
48
                        rst_n_s <= rstIn_n;
49
                end if;
50
        end process;
51
 
52
        clk_s <= clk      when pol = '0' else
53
                 not(clk);
54
 
55
        rst_delay_i: gendelay
56
        generic map (n => 1)
57
        port map (
58
                a_in    => rst_n_s,
59
                a_out   => rstOut_n
60
        );
61
 
62
end behav;
63
 

powered by: WebSVN 2.1.0

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