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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [ov_latch.vhd] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 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       = OV_LATCH    --
19
--  version      = 1.0         --
20
--  last update  = 30/07/98    --
21
--  author       = Jose Nunez  --
22
---------------------------------
23
 
24
 
25
-- FUNCTION
26
-- 1 bit latch for generation of overflow signals to memory address
27
-- generation logic and ob-assembler logic.
28
 
29
 
30
-- PIN LIST
31
-- OVERFLOW_LENGTH = indicates a length overflow (active LOW)
32
-- OVERFLOW_FLUSH  = indicates a flushing overflow (active LOW)
33
-- PRESET          = asynchronous setting of latch
34
-- CLK             = master clock
35
-- OVERFLOW_MEM    = overflow signal to memory address generation logic
36
-- OVERFLOW_OLD    = clocked version of OVERFLOW_LENGTH
37
 
38
entity OV_LATCH is
39
port
40
(
41
        OVERFLOW_LENGTH : in bit;
42
        OVERFLOW_FLUSH : in bit;
43
        CLEAR : in bit;
44
        RESET : in bit;
45
        CLK : in bit;
46
        OVERFLOW_MEM : out bit;
47
        OVERFLOW_OLD : out bit
48
);
49
end OV_LATCH;
50
 
51
architecture FLIP_FLOP of OV_LATCH is
52
signal TEMP_Q : bit;
53
begin
54
 
55
OVERFLOW_MEM <= TEMP_Q and OVERFLOW_FLUSH;
56
OVERFLOW_OLD <= TEMP_Q;
57
 
58
FLOP : process (CLK,CLEAR)
59
begin
60
if (CLEAR = '0') then
61
    TEMP_Q <= '1';
62
elsif ((CLK'event) and (CLK = '1')) then
63
    if (RESET = '0') then
64
        TEMP_Q <= '1';
65
    else
66
        TEMP_Q <= OVERFLOW_LENGTH;
67
    end if;
68
end if;
69
end process FLOP;
70
 
71
end FLIP_FLOP; -- end of architecture
72
 
73
 

powered by: WebSVN 2.1.0

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