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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [mld_decode.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       = MLD_DECODE  --
19
--  version      = 1.0         --
20
--  last update  = 20/04/01    --
21
--  author       = Jose Nunez  --
22
---------------------------------
23
 
24
-- FUNCTION
25
-- Decodes incoming match type into a pre-determined priority.
26
 
27
-- PIN LIST
28
-- M_TYPE   = input match type.
29
-- PRIORITY = output priority.
30
 
31
library ieee,dzx;
32
use ieee.std_logic_1164.all;
33
 
34
 
35
entity MLD_DECODE is
36
port
37
        (
38
        M_TYPE : in bit_vector(3 downto 0);
39
        PRIORITY : out bit_vector(5 downto 0)
40
        );
41
end MLD_DECODE;
42
 
43
 
44
 
45
architecture DEC of MLD_DECODE is
46
 
47
begin
48
 
49
DECODE : process (M_TYPE)
50
begin
51
case M_TYPE is
52
        -- priority 6
53
        when "0000" => PRIORITY <= "100000";
54
        -- priority 5
55
        when "0001" => PRIORITY <= "010000";
56
        -- priority 4
57
        when "1000" => PRIORITY <= "001000";
58
        -- priority 3
59
        when "0010" | "0100" => PRIORITY <= "000100";
60
        -- priority 2
61
        when "0011" => PRIORITY <= "000010";
62
        -- priority 1
63
        when "1001" | "1100" => PRIORITY <= "000001";
64
        -- anything else is priority 0
65
        when others => PRIORITY <= "000000";
66
end case;
67
 
68
end process DECODE;
69
 
70
end DEC; -- end of architecture
71
 
72
 

powered by: WebSVN 2.1.0

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