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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [RLI_CR.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_CR (Coding Register)     --
19
--  version      = 1.0                          --
20
--  last update  = 22/11/99                     --
21
--  author       = Jose Nunez                   --
22
--------------------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- RLI coding register
27
 
28
 
29
-- PIN LIST 
30
-- FLUSH_IN : the flush signal from the csm pipeline 
31
-- CODE_IN  : the 33 maximum bit of compressed code
32
-- LENGTH_IN : the length of the compressed code
33
-- COMP_IN : the comp signal pipeline from the csm
34
-- CLEAR : the asyncronous clear
35
-- CLK : the clk signal
36
-- FLUSH_OUT : the output signals start here
37
-- CODE_OUT :
38
-- LENGTH_OUT :
39
-- COMP_OUT :
40
 
41
library IEEE;
42
use IEEE.std_logic_1164.all;
43
 
44
entity RLI_CR is
45
port         (
46
                        FLUSH_IN : in bit;
47
                        CODE_IN : in bit_vector (34 downto 0);
48
                        LENGTH_IN : in bit_vector (5 downto 0);
49
                        CODE_RLI_IN : in bit_vector(4 downto 0);
50
                        CODE_RLI_LENGTH_IN : in bit_vector(2  downto 0);
51
                        COMP_IN :in bit;
52
                        MOVE_ENABLE_IN : in bit;
53
                        CLEAR:in bit;
54
                        RESET: in bit;
55
                        CLK :in bit;
56
                        FLUSH_OUT:out bit;
57
                        CODE_OUT:out bit_vector(34 downto 0);
58
                        LENGTH_OUT:out bit_vector( 5 downto 0);
59
                        CODE_RLI_OUT : out bit_vector(4 downto 0);
60
                        CODE_RLI_LENGTH_OUT : out bit_vector(2 downto 0);
61
                        COMP_OUT: out bit;
62
                        MOVE_ENABLE_OUT : out bit
63
                );
64
 end RLI_CR;
65
 
66
architecture STRUCTURAL of RLI_CR is
67
 
68
 signal FLUSH_OUT_aux : bit;
69
 signal CODE_OUT_aux : bit_vector (34 downto 0);
70
 signal COMP_OUT_aux : bit;
71
 signal LENGTH_OUT_aux: bit_vector(5 downto 0);
72
 signal CODE_RLI_OUT_aux : bit_vector(4 downto 0);
73
 signal CODE_RLI_LENGTH_OUT_aux : bit_vector(2 downto 0);
74
 signal MOVE_ENABLE_OUT_aux : bit;
75
 
76
 
77
begin
78
 
79
 process(CLK,CLEAR)
80
 begin
81
        if (CLEAR='0') then
82
              FLUSH_OUT_aux<='1';
83
          CODE_OUT_aux<="00000000000000000000000000000000000";
84
          COMP_OUT_aux<='1';
85
          LENGTH_OUT_aux<="000000";
86
                  CODE_RLI_OUT_aux <="00000";
87
                  CODE_RLI_LENGTH_OUT_aux <= "000";
88
                  MOVE_ENABLE_OUT_aux <='1';
89
 
90
        elsif ((CLK'event) and (CLK='1')) then
91
                if (RESET='0') then
92
              FLUSH_OUT_aux<='1';
93
          CODE_OUT_aux<="00000000000000000000000000000000000";
94
          COMP_OUT_aux<='1';
95
          LENGTH_OUT_aux<="000000";
96
                  CODE_RLI_OUT_aux <="00000";
97
                  CODE_RLI_LENGTH_OUT_aux <= "000";
98
                  MOVE_ENABLE_OUT_aux <='1';
99
                elsif (MOVE_ENABLE_IN = '0') then -- active at zero
100
                  FLUSH_OUT_aux<=FLUSH_IN;
101
          CODE_OUT_aux<=CODE_IN;
102
          COMP_OUT_aux<=COMP_IN;
103
          LENGTH_OUT_aux<=LENGTH_IN;
104
                  CODE_RLI_OUT_aux <= CODE_RLI_IN;
105
                  CODE_RLI_LENGTH_OUT_aux <= CODE_RLI_LENGTH_IN;
106
                  MOVE_ENABLE_OUT_aux <=MOVE_ENABLE_IN;
107
     else
108
                     FLUSH_OUT_aux<=FLUSH_IN;
109
          CODE_OUT_aux<=CODE_OUT_aux;
110
          COMP_OUT_aux<=COMP_IN;
111
          LENGTH_OUT_aux<= LENGTH_OUT_aux;
112
                     CODE_RLI_OUT_aux <= CODE_RLI_OUT_aux;
113
                    CODE_RLI_LENGTH_OUT_aux <= CODE_RLI_LENGTH_OUT_aux;
114
                    MOVE_ENABLE_OUT_aux <= MOVE_ENABLE_IN;
115
                end if;
116
        end if;
117
 
118
 
119
 end process;
120
 
121
 
122
 FLUSH_OUT<=FLUSH_OUT_aux;
123
 CODE_OUT<=CODE_OUT_aux;
124
 COMP_OUT<=COMP_OUT_aux;
125
 LENGTH_OUT<=LENGTH_OUT_aux;
126
 CODE_RLI_LENGTH_OUT <= CODE_RLI_LENGTH_OUT_aux;
127
 CODE_RLI_OUT<= CODE_RLI_OUT_aux;
128
 MOVE_ENABLE_OUT <= MOVE_ENABLE_OUT_aux;
129
 
130
--FLUSH_OUT<=FLUSH_IN;
131
--CODE_OUT<=CODE_IN;
132
--COMP_OUT<=COMP_IN;
133
--LENGTH_OUT<=LENGTH_IN;
134
 
135
 
136
end structural;

powered by: WebSVN 2.1.0

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