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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [RLI_DR.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       = RLI_DR      --
19
--  version      = 1.0              --
20
--  last update  = 26/11/01          --
21
--  author       = Jose Nunez       --
22
--------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- RLI decoding register
27
 
28
-- PIN LIST
29
-- MATCH_LOCATION_IN : the match location
30
-- MATCH_TYPE_IN : the match type
31
-- SEARCH_STRING_IN : we must pipeline the literal data
32
-- FLUSH_IN : flush signal from csm
33
-- MASK : mask information
34
-- COMP_IN : compression signal from csm
35
-- CLEAR : clear signal
36
-- CLK : clock signal
37
-- MATCH_LOCATION_OUT : the match location out
38
-- MATCH_TYPE_OUT : the match type out
39
-- SEARCH_STRING_OUT : the search string out
40
-- FLUSH_OUT : 
41
-- COMP_OUT :
42
 
43
 
44
library IEEE;
45
use IEEE.std_logic_1164.all;
46
 
47
entity RLI_DR is
48
    port(
49
            MATCH_LOC_IN: in bit_vector( 3 downto 0);
50
                MATCH_TYPE_IN: in bit_vector(3 downto 0);
51
                FULL_HIT_IN : in bit;
52
                ENABLE : in bit;
53
                MASK_IN : in bit_vector(4 downto 0);
54
            SEARCH_STRING_IN:  in bit_vector(31 downto 0);
55
--                  INC_IN:in bit;
56
            CLEAR:in bit;
57
                RESET: in bit;
58
            CLK:in bit;
59
                MATCH_LOC_OUT: out bit_vector (3 downto 0);
60
                MATCH_TYPE_OUT:out bit_vector(3 downto 0);
61
                FULL_HIT_OUT : out bit;
62
                MASK_OUT : out bit_vector(4 downto 0);
63
            SEARCH_STRING_OUT:  out bit_vector(31 downto 0)
64
 
65
            );
66
 
67
end RLI_DR;
68
architecture STRUCTURAL of RLI_DR is
69
 
70
 signal SEARCH_STRING_OUT_aux:bit_vector(31 downto 0);
71
 signal MATCH_LOC_OUT_aux: bit_vector( 3 downto 0);
72
 signal MATCH_TYPE_OUT_aux: bit_vector(3 downto 0);
73
 signal MASK_AUX : bit_vector(4 downto 0);
74
 
75
signal FULL_HIT_OUT_aux : bit;
76
 -- signal INC_OUT_aux:bit;
77
 
78
 begin
79
 
80
 process(CLK,CLEAR)
81
 begin
82
        if (CLEAR='0') then
83
                MATCH_LOC_OUT_aux<="0000";
84
        MATCH_TYPE_OUT_aux<="1111";
85
            SEARCH_STRING_OUT_aux<=x"00000000";
86
        FULL_HIT_OUT_aux <= '1';
87
                MASK_AUX <= "00000";
88
        elsif ((CLK'event) and (CLK='1')) then
89
                if (RESET='0') then
90
                MATCH_LOC_OUT_aux<="0000";
91
        MATCH_TYPE_OUT_aux<="1111";
92
            SEARCH_STRING_OUT_aux<=x"00000000";
93
            FULL_HIT_OUT_aux <= '1';
94
            MASK_AUX <= "00000";
95
                elsif (ENABLE = '0') then
96
            SEARCH_STRING_OUT_aux<=SEARCH_STRING_IN;
97
                MATCH_TYPE_OUT_aux<=MATCH_TYPE_IN;
98
                MATCH_LOC_OUT_aux<=MATCH_LOC_IN;
99
                FULL_HIT_OUT_aux <= FULL_HIT_IN;
100
             MASK_AUX <= MASK_IN;
101
                else
102
                 SEARCH_STRING_OUT_aux<=SEARCH_STRING_OUT_aux;
103
                MATCH_TYPE_OUT_aux<=MATCH_TYPE_OUT_aux;
104
                MATCH_LOC_OUT_aux<=MATCH_LOC_OUT_aux;
105
                FULL_HIT_OUT_aux <= FULL_HIT_OUT_aux;
106
              MASK_AUX <= MASK_AUX;
107
                end if;
108
        end if;
109
 end process;
110
 
111
 SEARCH_STRING_OUT<=SEARCH_STRING_OUT_aux;
112
 MATCH_TYPE_OUT<=MATCH_TYPE_OUT_aux;
113
 MATCH_LOC_OUT<=MATCH_LOC_OUT_aux;
114
FULL_HIT_OUT<=FULL_HIT_OUT_aux;
115
 MASK_OUT <= MASK_AUX;
116
 
117
end structural;
118
 
119
 
120
 
121
 
122
 
123
 

powered by: WebSVN 2.1.0

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