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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [parser_register.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       = PARSER_REGISTER         --
19
--  version      = 1.0                     --
20
--  last update  = 3/05/01                 --
21
--  author       = Jose Nunez              --
22
---------------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- The parser register latches data and length in the parsing unit
27
 
28
--  PIN LIST
29
 
30
--  ENABLE = parsing unit active
31
--  DATA_IN_32  = data to be parse from the buffer
32
--  DATA_OUT_32  = output data to the search register
33
--  CLEAR    = asynchronous clear
34
--  CLK      = master clock
35
 
36
library ieee;
37
use ieee.std_logic_1164.all;
38
 
39
entity PARSER_REGISTER is
40
port (
41
          ENABLE_IN : in bit;
42
          DATA_IN : in bit_vector(55 downto 0);
43
          LENGTH_IN : in bit_vector(2 downto 0);
44
          CLK : in bit;
45
          CLEAR : in bit;
46
          RESET : in bit;
47
          ENABLE_OUT : out bit;
48
          DATA_OUT : out bit_vector(55 downto 0);
49
          LENGTH_OUT: out bit_vector(2 downto 0)
50
         );
51
end PARSER_REGISTER;
52
 
53
architecture STRUCTURAL of PARSER_REGISTER is
54
 
55
 
56
signal DATA_OUT_aux:bit_vector(55 downto 0);
57
signal LENGTH_OUT_aux:bit_vector(2 downto 0);
58
signal ENABLE_OUT_aux : bit;
59
 
60
 
61
begin
62
 
63
process(CLK,CLEAR)
64
 begin
65
        if (CLEAR='0') then
66
                ENABLE_OUT_aux <= '0';
67
                DATA_OUT_aux <= "00000000000000000000000000000000000000000000000000000000";
68
                LENGTH_OUT_aux <= "000";
69
        elsif ((CLK'event) and (CLK='1')) then
70
                if (RESET='0') then
71
                        DATA_OUT_aux <= "00000000000000000000000000000000000000000000000000000000";
72
                        ENABLE_OUT_aux <= '0';
73
                        LENGTH_OUT_aux <= "000";
74
                else
75
                      DATA_OUT_aux<= DATA_IN;
76
                  ENABLE_OUT_aux <= ENABLE_IN;
77
                        LENGTH_OUT_aux<= LENGTH_IN;
78
                end if;
79
        end if;
80
end process;
81
 
82
ENABLE_OUT <= ENABLE_OUT_aux;
83
DATA_OUT <= DATA_OUT_aux;
84
LENGTH_OUT <= LENGTH_OUT_aux;
85
 
86
end STRUCTURAL;

powered by: WebSVN 2.1.0

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