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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [max_pbc_length_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       = MAX_PBC_LENGTH          --
19
--  version      = 1.0                     --
20
--  last update  = 20/07/01                 --
21
--  author       = Jose Nunez              --
22
---------------------------------------------
23
 
24
 
25
-- FUNCTION
26
-- produces two possible start for the match type code depending on the PBC code
27
 
28
--  PIN LIST
29
 
30
 
31
--  NFL_MINUS_ONE = next free location minus one
32
--  CODE = all the bits that can contain match location plus match type code
33
--  POS_MT_K_1 = match type when using k-1 bits
34
--  POS_MT_K = match type when using k bits
35
 
36
 
37
library ieee,dzx;
38
use ieee.std_logic_1164.all;
39
use dzx.bit_arith.all;
40
 
41
entity MAX_PBC_LENGTH_2 is
42
 
43
port (OR_VECTOR: in bit_vector(2 downto 0);
44
          CODE : in bit_vector(14 downto 0); -- 4 ml and 6 mt or (3 mt + 8 rl ) = 15
45
          POS_RL_K_1 : out bit_vector(7 downto 0);
46
          POS_RL_K : out bit_vector(7 downto 0);
47
          POS_ML_K_1 : out bit_vector(3 downto 0);
48
          POS_ML_K : out bit_vector(3 downto 0);
49
          POS_MT_K_1 : out bit_vector(5 downto 0);
50
          POS_MT_K : out bit_vector(5 downto 0)
51
          );
52
 
53
end MAX_PBC_LENGTH_2;
54
 
55
architecture STRUCTURAL of MAX_PBC_LENGTH_2 is
56
 
57
begin
58
 
59
 
60
LENGTH_SELECTION : process(OR_VECTOR, CODE)
61
 
62
begin
63
 
64
case OR_VECTOR is
65
 when "000"  =>
66
    POS_RL_K_1 <= CODE(11 downto 4);
67
    POS_RL_K <= CODE(10 downto 3);
68
        POS_ML_K_1 <= "0000";
69
        POS_ML_K <= "000" & CODE(14);
70
        POS_MT_K_1 <= CODE(14 downto 9);
71
        POS_MT_K <= CODE(13 downto 8);
72
when "001"  =>
73
    POS_RL_K_1 <= CODE(10 downto 3);
74
    POS_RL_K <= CODE(9 downto 2);
75
        POS_ML_K_1 <= "000" & CODE(14);
76
        POS_ML_K <= "00" & CODE(14 downto 13);
77
        POS_MT_K_1 <= CODE(13 downto 8);
78
        POS_MT_K <= CODE(12 downto 7);
79
when "011"  =>
80
    POS_RL_K_1 <= CODE(9 downto 2);
81
    POS_RL_K <= CODE(8 downto 1);
82
        POS_ML_K_1 <= "00" & CODE(14 downto 13);
83
        POS_ML_K <= "0" & CODE(14 downto 12);
84
        POS_MT_K_1 <= CODE(12 downto 7);
85
        POS_MT_K <= CODE(11 downto 6);
86
when "111"  =>
87
    POS_RL_K_1 <= CODE(8 downto 1);
88
    POS_RL_K <= CODE(7 downto 0);
89
        POS_ML_K_1 <= "0" & CODE(14 downto 12);
90
        POS_ML_K <=  CODE(14 downto 11);
91
        POS_MT_K_1 <= CODE(11 downto 6);
92
        POS_MT_K <= CODE(10 downto 5);
93
when others =>
94
    POS_RL_K_1 <= "00000000";
95
    POS_RL_K <= "00000000";
96
        POS_ML_K_1 <= "0000";
97
        POS_ML_K <=  "0000";
98
        POS_MT_K_1 <= "000000";
99
        POS_MT_K <= "000000";
100
end case;
101
 
102
end process LENGTH_SELECTION;
103
 
104
end STRUCTURAL;

powered by: WebSVN 2.1.0

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