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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [src/] [cam_bit_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
--  ENTITY       = CAM_BIT_FIRST     --
19
--  version      = 1.0               --
20
--  last update  = 30/05/98          --
21
--  author       = Jose Nunez        --
22
---------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- basic bit element of the CAM array
27
 
28
 
29
--  PIN LIST
30
--  SEARCH   = input search data bit
31
--  PREVIOUS = data from the previous location in the array
32
--  CLEAR    = asynchronous clear of the data latch (active LOW)
33
--  CLK      = master clock
34
--  DOUT     = output of the data latch
35
--  MATCH    = indicates a match between search bit and data bit (active LOW)
36
 
37
 
38
library ieee;
39
use ieee.std_logic_1164.all;
40
 
41
entity CAM_BIT_FIRST is
42
port
43
(
44
        SEARCH : in bit;
45
        PREVIOUS : in bit;
46
        CLEAR : in bit ;
47
        RESET: in bit;
48
        CLK : in bit ;
49
        DOUT : out bit;
50
        MATCH : out bit
51
);
52
 
53
 
54
end CAM_BIT_FIRST;
55
 
56
 
57
architecture BIT1 of CAM_BIT_FIRST is
58
 
59
signal TEMP_Q : bit;
60
 
61
begin
62
 
63
 
64
COMB : process(CLK,CLEAR)
65
begin
66
 
67
 
68
 
69
if (CLEAR = '0') then
70
 
71
 
72
        TEMP_Q <= '0';                   -- check for CLEAR active
73
 
74
 
75
elsif (CLK'event and CLK='1') then
76
 
77
        if (RESET = '0') then
78
 
79
        TEMP_Q <= '0';                   -- check for CLEAR active
80
 
81
        else
82
 
83
        TEMP_Q <= PREVIOUS;     -- get data from previous location
84
 
85
        end if;
86
 
87
end if;
88
 
89
end process COMB;
90
 
91
DOUT <= TEMP_Q;
92
MATCH <= SEARCH xor TEMP_Q;             -- match goes low if SEARCH = TEMP_Q
93
 
94
 
95
end BIT1;

powered by: WebSVN 2.1.0

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