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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [src/] [ff_v3_delay.vhd] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 8 eejlny
--This library is free software; you can redistribute it and/or
2
--modify it under the terms of the GNU Lesser General Public
3
--License as published by the Free Software Foundation; either
4
--version 2.1 of the License, or (at your option) any later version.
5
 
6
--This library is distributed in the hope that it will be useful,
7
--but WITHOUT ANY WARRANTY; without even the implied warranty of
8
--MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
9
--Lesser General Public License for more details.
10
 
11
--You should have received a copy of the GNU Lesser General Public
12
--License along with this library; if not, write to the Free Software
13
--Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
14
 
15
-- e_mail : j.l.nunez-yanez@byacom.co.uk
16
 
17
---------------------------------
18
--  ENTITY       = FF_V3_DELAY --
19
--  version      = 1.0         --
20
--  last update  = 11/04/00    --
21
--  author       = Jose Nunez  --
22
---------------------------------
23
 
24
--  FUNCTION
25
--  Introduces an extra level of delay for the decompression counter
26
 
27
 
28
--  PIN LIST
29
--  COUNT_D_IN : in enable count signal
30
--  CLK : in clock signal               
31
--  CLEAR : in clear signal
32
--  COUNT_D_OUT : out enable count signal       
33
 
34
 
35
library ieee;
36
use ieee.std_logic_1164.all;
37
 
38
entity FF_V3_DELAY is
39
port
40
        (
41
        COUNT_D_IN : in bit;
42
        CLK : in bit;
43
        CLEAR : in bit;
44
        RESET : in bit;
45
        COUNT_D_OUT : out bit
46
        );
47
 
48
end FF_V3_DELAY;
49
 
50
 
51
architecture FF of FF_V3_DELAY is
52
 
53
signal Q1,Q2 : bit;
54
 
55
begin
56
 
57
FLIP_FLOP1 : process(CLK,CLEAR)
58
begin
59
        if (CLEAR = '0') then
60
                Q1 <= '1';
61
        elsif ((CLK'event) and (CLK='1')) then
62
                if (RESET = '0') then
63
                        Q1 <= '1';
64
                else
65
                        Q1 <= COUNT_D_IN;
66
                end if;
67
        end if;
68
end process FLIP_FLOP1;
69
 
70
FLIP_FLOP2 : process(CLK,CLEAR)
71
begin
72
        if (CLEAR = '0') then
73
                Q2 <= '1';
74
        elsif ((CLK'event) and (CLK='1')) then
75
                if (RESET = '0') then
76
                        Q2 <= '1';
77
                else
78
                        Q2 <= Q1;
79
                end if;
80
        end if;
81
end process FLIP_FLOP2;
82
 
83
 
84
COUNT_D_OUT <= Q2;
85
 
86
end FF;
87
 
88
 

powered by: WebSVN 2.1.0

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