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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [src/] [decode_miss.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       = 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 is
40
port
41
(
42
        CODE : in bit_vector(3 downto 0);
43
        M_LIT_LENGTH : out bit_vector(5 downto 0);
44
        SELECT_MOVE : out bit_vector(2 downto 0);
45
        MASK : out bit_vector(4 downto 0)
46
);
47
end DECODE_MISS;
48
 
49
architecture HUFFMAN of DECODE_MISS is
50
begin
51
 
52
TREE_DEC : process(CODE)
53
begin
54
case CODE is
55
    when "1000" | "1001" | "1010" |"1011" | "1100"  | "1101"  | "1110" | "1111"
56
                                => MASK <= "10000";
57
                M_LIT_LENGTH <= "000010";
58
                        SELECT_MOVE <= "000";
59
 
60
 
61
 
62
    when "0100" | "0101"| "0110" | "0111"
63
                        =>  MASK <= "11111";
64
                    M_LIT_LENGTH <= "100011";
65
                        SELECT_MOVE <= "001";
66
 
67
 
68
    when "0010" | "0011"
69
                =>  MASK <= "11000";
70
                    M_LIT_LENGTH <= "001100";
71
                        SELECT_MOVE <= "010";
72
 
73
 
74
    when "0001"
75
                                =>  MASK <= "11100";
76
                    M_LIT_LENGTH <= "010101";
77
                        SELECT_MOVE <= "011";
78
 
79
 
80
    when "0000"
81
                =>  MASK <= "11110";
82
                    M_LIT_LENGTH <= "011101";
83
                        SELECT_MOVE <= "100";
84
 
85
 
86
    when others
87
                =>  MASK <= "00000";
88
                    M_LIT_LENGTH <= "000000";
89
                        SELECT_MOVE <= "101";
90
 
91
end case;
92
 
93
end process TREE_DEC;
94
 
95
 
96
end HUFFMAN; -- end of architecture
97
 
98
 
99
 

powered by: WebSVN 2.1.0

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