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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [location_equal.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       =  LOCATION_EQUAL    --
19
--  version      = 4.0         --
20
--  last update  = 11/02/98    --
21
--  author       = Jose Nunez  --
22
---------------------------------
23
 
24
 
25
-- FUNCTION
26
-- Movement control multiplexor.
27
-- Selects either a compressed (A inputs) or decompressed
28
-- (B inputs) match location and full hit indicator and
29
-- makes them available on the Y outputs under the control
30
-- of SELB. If SELB=0 then B inputs are selected.
31
 
32
--  PIN LIST
33
-- A   = match location for compression
34
-- B   = match location for decompression
35
-- SELB = select 
36
-- ENABLEC = enable compression
37
-- ENABLED = enable decompression
38
-- Y   = match location output
39
 
40
library ieee,dzx;
41
use ieee.std_logic_1164.all;
42
use dzx.attributes.all;
43
 
44
entity LOCATION_EQUAL is
45
        port (
46
                  WRITE_ADDRESS_IN : in bit_vector(3 downto 0);
47
                  READ_ADDRESS_IN : in bit_vector(3 downto 0);
48
                  CLK : in bit;
49
                  CLEAR : in bit;
50
                  RESET : in bit;
51
                  ENABLE : in bit;
52
                  WRITE_ADDRESS_OUT : out bit_vector(3 downto 0);
53
                  READ_ADDRESS_OUT  : out bit_vector(7 downto 0);
54
              EQUAL : out bit);
55
end LOCATION_EQUAL;
56
 
57
architecture EQUALITY of LOCATION_EQUAL is
58
 
59
signal EQUAL_INT : bit;
60
signal EQUAL_AUX : bit;
61
 
62
begin
63
 
64
COMP : process (WRITE_ADDRESS_IN , READ_ADDRESS_IN, ENABLE)
65
begin
66
        if (WRITE_ADDRESS_IN = READ_ADDRESS_IN and ENABLE = '0')then
67
                EQUAL_INT <= '1';
68
                READ_ADDRESS_OUT <= "11111111";
69
        else
70
            EQUAL_INT <= '0';
71
         READ_ADDRESS_OUT <= "0000" & READ_ADDRESS_IN;
72
    end if;
73
end process COMP;
74
 
75
WRITE_ADDRESS_OUT <= WRITE_ADDRESS_IN;
76
 
77
FLIP_FLOP : process(CLK, CLEAR)
78
begin
79
        if(CLEAR = '0') then
80
                EQUAL_AUX <= '0';
81
        elsif ((CLK'event) and (CLK = '1')) then
82
                if(RESET = '0') then
83
                        EQUAL_AUX <= '0';
84
                elsif (ENABLE = '0') then
85
                        EQUAL_AUX <= EQUAL_INT;
86
                else
87
                        EQUAL_AUX <= EQUAL_AUX;
88
                end if;
89
        end if;
90
end process FLIP_FLOP;
91
 
92
EQUAL <= EQUAL_AUX;
93
 
94
end EQUALITY;
95
 
96
 

powered by: WebSVN 2.1.0

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