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

Subversion Repositories xmatchpro

[/] [xmatchpro/] [trunk/] [xmw4-comdec/] [xmatch_sim7/] [src/] [mld_dprop.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_DPROP   --
19
--  version      = 1.0         --
20
--  last update  = 20/07/98    --
21
--  author       = Jose Nunez  --
22
---------------------------------
23
 
24
 
25
-- FUNCTION
26
-- Match location decision down propagation logic.
27
-- This takes in a column of priority bits and produces a resultant bit vector
28
-- with only one bit (at most) set. This bit is the first bit set in
29
-- the input column.
30
-- This is the down propagation that is required, i.e for equal priorities,
31
-- the location closest to the top of the table is the one to be chosen.
32
 
33
-- PIN LIST
34
-- DIN     = input column of bits
35
-- DOUT    = resultant column of bits
36
-- FULL_OR = or function of all bits in DIN.
37
 
38
 
39
library ieee,dzx;
40
use ieee.std_logic_1164.all;
41
 
42
entity MLD_DPROP is
43
port
44
        (
45
        DIN : in bit_vector(0 to 15);
46
        DOUT : out bit_vector(0 to 15);
47
        FULL_OR : out bit
48
        );
49
end MLD_DPROP;
50
 
51
 
52
---------------------------------
53
--  entity       = MLD_DPROP   --
54
--  ARCHITECTURE = DOWN        --
55
--  version      = 1.0         --
56
--  last update  = 20/07/95    --
57
--  author       = Mark Gooch  --
58
---------------------------------
59
 
60
 
61
architecture DOWN of MLD_DPROP is
62
 
63
signal B_ROW : bit_vector(0 to 15);
64
signal C_ROW : bit_vector(0 to 15);
65
signal D_ROW : bit_vector(0 to 15);
66
signal E_ROW : bit_vector(0 to 15);
67
 
68
 
69
 
70
begin
71
 
72
GEN_B : process (DIN)
73
begin
74
for I in 0 to 7 loop
75
        B_ROW(2*I) <= DIN(2*I);
76
        B_ROW(2*I+1) <= DIN(2*I+1) or DIN(2*I);
77
end loop;
78
end process GEN_B;
79
 
80
 
81
GEN_C : process (B_ROW)
82
begin
83
for I in 0 to 3 loop
84
        for J in 0 to 1 loop
85
                C_ROW(4*I+J) <= B_ROW(4*I+J);
86
        end loop;
87
        for J in 2 to 3 loop
88
                C_ROW(4*I+J) <= B_ROW(4*I+1) or B_ROW(4*I+J);
89
        end loop;
90
end loop;
91
end process GEN_C;
92
 
93
 
94
GEN_D : process (C_ROW)
95
begin
96
for I in 0 to 1 loop
97
        for J in 0 to 3 loop
98
                D_ROW(8*I+J) <= C_ROW(8*I+J);
99
        end loop;
100
        for J in 4 to 7 loop
101
                D_ROW(8*I+J) <= C_ROW(8*I+3) or C_ROW(8*I+J);
102
        end loop;
103
end loop;
104
end process GEN_D;
105
 
106
 
107
GEN_E : process (D_ROW)
108
begin
109
        for J in 0 to 7 loop
110
                E_ROW(J) <= D_ROW(J);
111
        end loop;
112
        for J in 8 to 15 loop
113
                E_ROW(J) <= D_ROW(7) or D_ROW(J);
114
        end loop;
115
 
116
end process GEN_E;
117
 
118
 
119
DOUT <= not(DIN(0) & (DIN(1 to 15) and not(E_ROW(0 to 14))));
120
 
121
FULL_OR <= E_ROW(15);
122
 
123
 
124
 
125
end DOWN; -- end of architecture
126
 
127
 

powered by: WebSVN 2.1.0

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