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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [src/] [cam_word_first.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
--------------------------------------
19
--  ENTITY       = CAM_WORD_FIRST    --
20
--  version      = 1.0               --
21
--  last update  = 14/06/98          --
22
--  author       = Jose Nunez        --
23
---------------------------------------
24
 
25
 
26
-- FUNCTION
27
-- 32 bit word element of the CAM array.
28
 
29
 
30
--  PIN LIST
31
--  SEARCH    = input search data word
32
--  PREVIOUS  = data word from the previous location in the array
33
--  CLEAR     = asynchronous clear of the data latch (active LOW)
34
--  CLK       = master clock
35
--  DOUT      = output of the data latch
36
--  MATCH     = indicates a match between search bytes and data bytes (active LOW)
37
 
38
-- no movement control because the first word is always loaded
39
 
40
library ieee;
41
use ieee.std_logic_1164.all;
42
 
43
entity CAM_WORD_FIRST is
44
port
45
(
46
        SEARCH : in bit_vector(31 downto 0);
47
        PREVIOUS : in bit_vector(31 downto 0);
48
        CLEAR : in bit ;
49
        RESET : in bit;
50
        CLK : in bit ;
51
        DOUT : out bit_vector(31 downto 0);
52
        MATCH : out bit_vector(3 downto 0)
53
);
54
 
55
 
56
end CAM_WORD_FIRST;
57
 
58
 
59
 
60
architecture WORD1 of CAM_WORD_FIRST is
61
 
62
component CAM_BYTE_FIRST
63
port
64
(
65
        SEARCH : in bit_vector(7 downto 0);
66
        PREVIOUS : in bit_vector(7 downto 0);
67
        CLEAR : in bit;
68
        RESET : in bit;
69
        CLK : in bit ;
70
        DOUT : out bit_vector(7 downto 0);
71
        MATCH : out bit
72
);
73
end component;
74
 
75
 
76
 
77
 
78
 
79
begin
80
 
81
 
82
 
83
 
84
-- GEN_WORD : for I in 0 to 3 generate
85
--     BYTE3 : CAM_BYTE port map ( SEARCH => SEARCH(7+8*I downto 8*I),
86
--                              PREVIOUS => PREVIOUS(7+8*I downto 8*I),
87
--                              MOVE => MOVE,
88
--                              CLEAR => CLEAR,
89
--                              CLK => CLK,
90
--                              RESET => RESET,
91
--                              DOUT => DOUT(7+8*I downto 8*I),
92
--                              MATCH => TEMP_MATCH(I));
93
 
94
 
95
--end generate;
96
 
97
BYTE1 : CAM_BYTE_FIRST port map ( SEARCH => SEARCH(7 downto 0),
98
 
99
                                PREVIOUS => PREVIOUS(7 downto 0),
100
 
101
                              CLEAR => CLEAR,
102
 
103
                                          RESET => RESET,
104
 
105
                                CLK => CLK,
106
 
107
                                DOUT => DOUT(7 downto 0),
108
 
109
                                MATCH => MATCH(0));
110
 
111
 
112
 
113
BYTE2 : CAM_BYTE_FIRST port map ( SEARCH => SEARCH(15 downto 8),
114
 
115
                                PREVIOUS => PREVIOUS(15 downto 8),
116
 
117
                                CLEAR => CLEAR,
118
 
119
                                        RESET => RESET,
120
 
121
                                CLK => CLK,
122
 
123
                                DOUT => DOUT(15 downto 8),
124
 
125
                                MATCH => MATCH(1));
126
 
127
 
128
 
129
BYTE3 : CAM_BYTE_FIRST port map ( SEARCH => SEARCH(23 downto 16),
130
 
131
                                PREVIOUS => PREVIOUS(23 downto 16),
132
 
133
                                CLEAR => CLEAR,
134
 
135
                                        RESET=> RESET,
136
 
137
                                CLK => CLK,
138
 
139
                                DOUT => DOUT(23 downto 16),
140
 
141
                                MATCH => MATCH(2));
142
 
143
BYTE4 : CAM_BYTE_FIRST port map ( SEARCH => SEARCH(31 downto 24),
144
 
145
                                PREVIOUS => PREVIOUS(31 downto 24),
146
 
147
                                CLEAR => CLEAR,
148
 
149
                                        RESET=>RESET,
150
 
151
                                CLK => CLK,
152
 
153
                                DOUT => DOUT(31 downto 24),
154
 
155
                                MATCH => MATCH(3));
156
 
157
 
158
 
159
-- No logic for validate the word. All the words valid because the dictionary does not grow
160
 
161
 
162
end WORD1;

powered by: WebSVN 2.1.0

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