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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [RLI_coding_logic.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_coding_logic       --
19
--  Version      =  1.0                    --
20
--  last update  =  22/11/99               --
21
--  author       =  Jose Nunez             --
22
---------------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- RLI logic for the compression process
27
 
28
 
29
--  PIN LIST
30
--  RL_DETECTED : run length detection
31
--  COUNT_IN : count coming from the share counter
32
--  COMP_IN : control signal from csm
33
--  FLUSH_IN : control signal from csm
34
--  CODE_IN :normal code in
35
--  LENGTH_IN : length of code in
36
--  CLEAR : asyncronous clear
37
--  CLK : master clock
38
--  FLUSH_OUT : control signal from csm
39
--  COMP_OUT : control signal from csm
40
--  CODE_OUT : 33 bits code out
41
--  LENGTH_OUT : length of code out
42
 
43
library ieee;
44
use ieee.std_logic_1164.all;
45
 
46
entity RLI_coding_logic is
47
port
48
(
49
          RL_DETECTED : in bit;
50
          COUNT_IN : in bit_vector(7 downto 0);
51
          COMP_IN : in bit;
52
          MOVE_ENABLE_IN : in bit;
53
          FLUSH_IN: in bit;
54
    FLUSH_RLI : in bit;
55
          CODE_IN : in bit_vector(34 downto 0);
56
          LENGTH_IN : in bit_vector(5 downto 0);
57
          CODE_RLI : in bit_vector(4 downto 0);
58
      CODE_RLI_LENGTH : in bit_vector(2 downto 0);
59
          CLEAR : in bit;
60
          RESET : in bit;
61
          CLK : in bit;
62
          FLUSH_OUT: out bit;
63
          COMP_OUT: out bit;
64
          CODE_OUT : out bit_vector(34 downto 0);
65
          LENGTH_OUT : out bit_vector(5 downto 0)
66
);
67
end RLI_coding_logic;
68
 
69
architecture STRUCTURAL of RLI_coding_logic is
70
 
71
 
72
 
73
component RLI_CCU
74
port
75
(
76
      CODE_IN : in bit_vector(34 downto 0) ;
77
          MOVE_ENABLE_IN: in bit;
78
          FLUSH_IN : in bit;
79
          LENGTH_IN : in bit_vector (5 downto 0);
80
          CODE_RLI : in bit_vector(4 downto 0);
81
          CODE_RLI_LENGTH : in bit_vector(2 downto 0);
82
          COUNT : in bit_vector(7 downto 0);
83
          RL_DETECTED : in bit;
84
      CLEAR : in bit ;
85
          RESET : in bit;
86
      CLK : in bit ;
87
      CODE_OUT : out bit_vector(34 downto 0);
88
          LENGTH_OUT : out bit_vector(5 downto 0)
89
);
90
end component;
91
 
92
component RLI_CR
93
port         (
94
                        FLUSH_IN : in bit;
95
                        CODE_IN : in bit_vector (34 downto 0);
96
                        LENGTH_IN : in bit_vector (5 downto 0);
97
                        CODE_RLI_IN : in bit_vector(4 downto 0);
98
                        CODE_RLI_LENGTH_IN : in bit_vector(2  downto 0);
99
                        COMP_IN :in bit;
100
                        MOVE_ENABLE_IN: in bit;
101
                        CLEAR:in bit;
102
                        RESET: in bit;
103
                        CLK :in bit;
104
                        FLUSH_OUT:out bit;
105
                        CODE_OUT:out bit_vector(34 downto 0);
106
                        LENGTH_OUT:out bit_vector(5 downto 0);
107
                        CODE_RLI_OUT : out bit_vector(4 downto 0);
108
                        CODE_RLI_LENGTH_OUT : out bit_vector(2 downto 0);
109
                        COMP_OUT: out bit;
110
                        MOVE_ENABLE_OUT : out bit
111
                );
112
end component;
113
 
114
 
115
signal LENGTH_OUT_INT : bit_vector(5 downto 0); -- length to the control unit
116
signal CODE_OUT_INT : bit_vector(34 downto 0); -- code to the control unit
117
signal CODE_RLI_OUT_INT : bit_vector(4 downto 0);
118
signal CODE_RLI_LENGTH_OUT_INT : bit_vector(2  downto 0);
119
signal MOVE_ENABLE_OUT: bit;
120
signal FLUSH_OUT_INT: bit;
121
 
122
 
123
begin
124
 
125
 
126
coding_register : RLI_CR
127
port map(
128
                        FLUSH_IN => FLUSH_IN,
129
                        CODE_IN => CODE_IN,
130
                        LENGTH_IN => LENGTH_IN,
131
                        CODE_RLI_IN => CODE_RLI,
132
                        CODE_RLI_LENGTH_IN => CODE_RLI_LENGTH,
133
                        COMP_IN => COMP_IN,
134
                        MOVE_ENABLE_IN => MOVE_ENABLE_IN,
135
                        CLEAR => CLEAR,
136
                        RESET => RESET,
137
                        CLK => CLK,
138
                        FLUSH_OUT => FLUSH_OUT_INT,
139
                        CODE_OUT => CODE_OUT_INT,
140
                        LENGTH_OUT => LENGTH_OUT_INT,
141
                        CODE_RLI_OUT => CODE_RLI_OUT_INT,
142
                        CODE_RLI_LENGTH_OUT => CODE_RLI_LENGTH_OUT_INT,
143
                        COMP_OUT => COMP_OUT,
144
                        MOVE_ENABLE_OUT => MOVE_ENABLE_OUT
145
                );
146
 
147
control_unit : RLI_CCU
148
port map
149
(
150
      CODE_IN => CODE_OUT_INT,
151
          MOVE_ENABLE_IN => MOVE_ENABLE_IN,
152
          FLUSH_IN => FLUSH_RLI,
153
          LENGTH_IN => LENGTH_OUT_INT,
154
      CODE_RLI => CODE_RLI_OUT_INT,
155
          CODE_RLI_LENGTH => CODE_RLI_LENGTH_OUT_INT,
156
          COUNT => COUNT_IN,
157
          RL_DETECTED => RL_DETECTED,
158
      CLEAR => CLEAR,
159
          RESET => RESET,
160
      CLK => CLK,
161
      CODE_OUT => CODE_OUT,
162
          LENGTH_OUT => LENGTH_OUT
163
);
164
 
165
 
166
FLUSH_OUT <= FLUSH_OUT_INT;
167
 
168
end STRUCTURAL;
169
 

powered by: WebSVN 2.1.0

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