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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [decode_miss_2.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       = DECODE_MISS    --
19
--  version      = 1.0            --
20
--  last update  = 25/06/01       --
21
--  author       = Jose Nunez     --
22
------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- decodes the input (Huffman) miss type code to give a mask,
27
-- miss length and miss+literal character length
28
 
29
-- PIN LIST
30
-- CODE         = input miss type code (Huffman)
31
-- M_LIT_LENGTH = length of miss type code and any required literal characters
32
-- SELECT_MOVE  = select a move vector
33
-- MASK         = decoded mask
34
 
35
library ieee,dzx;
36
use ieee.std_logic_1164.all;
37
 
38
 
39
entity DECODE_MISS_2 is
40
port
41
(
42
        CODE : in bit_vector(3 downto 0);
43
        M_LIT_LENGTH : out bit_vector(5 downto 0);
44
        MASK : out bit_vector(4 downto 0)
45
);
46
end DECODE_MISS_2;
47
 
48
architecture HUFFMAN of DECODE_MISS_2 is
49
begin
50
 
51
TREE_DEC : process(CODE)
52
begin
53
case CODE is
54
    when "1000" | "1001" | "1010" |"1011" | "1100"  | "1101"  | "1110" | "1111"
55
                                => MASK <= "10000";
56
                M_LIT_LENGTH <= "000010";
57
 
58
 
59
 
60
 
61
    when "0100" | "0101"| "0110" | "0111"
62
                        =>  MASK <= "11111";
63
                    M_LIT_LENGTH <= "100011";
64
 
65
 
66
 
67
    when "0010" | "0011"
68
                =>  MASK <= "11000";
69
                    M_LIT_LENGTH <= "001100";
70
 
71
 
72
 
73
    when "0001"
74
                                =>  MASK <= "11100";
75
                    M_LIT_LENGTH <= "010101";
76
 
77
 
78
 
79
    when "0000"
80
                =>  MASK <= "11110";
81
                    M_LIT_LENGTH <= "011101";
82
 
83
 
84
 
85
    when others
86
                =>  MASK <= "00000";
87
                    M_LIT_LENGTH <= "000000";
88
 
89
 
90
end case;
91
 
92
end process TREE_DEC;
93
 
94
 
95
end HUFFMAN; -- end of architecture
96
 
97
 
98
 

powered by: WebSVN 2.1.0

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