1 |
7 |
dbrochart |
----------------------------------------------------------------------
|
2 |
|
|
---- ----
|
3 |
|
|
---- distances_synth.vhd ----
|
4 |
|
|
---- ----
|
5 |
|
|
---- This file is part of the turbo decoder IP core project ----
|
6 |
|
|
---- http://www.opencores.org/projects/turbocodes/ ----
|
7 |
|
|
---- ----
|
8 |
|
|
---- Author(s): ----
|
9 |
|
|
---- - David Brochart(dbrochart@opencores.org) ----
|
10 |
|
|
---- ----
|
11 |
|
|
---- All additional information is available in the README.txt ----
|
12 |
|
|
---- file. ----
|
13 |
|
|
---- ----
|
14 |
|
|
----------------------------------------------------------------------
|
15 |
|
|
---- ----
|
16 |
|
|
---- Copyright (C) 2005 Authors ----
|
17 |
|
|
---- ----
|
18 |
|
|
---- This source file may be used and distributed without ----
|
19 |
|
|
---- restriction provided that this copyright statement is not ----
|
20 |
|
|
---- removed from the file and that any derivative work contains ----
|
21 |
|
|
---- the original copyright notice and the associated disclaimer. ----
|
22 |
|
|
---- ----
|
23 |
|
|
---- This source file is free software; you can redistribute it ----
|
24 |
|
|
---- and/or modify it under the terms of the GNU Lesser General ----
|
25 |
|
|
---- Public License as published by the Free Software Foundation; ----
|
26 |
|
|
---- either version 2.1 of the License, or (at your option) any ----
|
27 |
|
|
---- later version. ----
|
28 |
|
|
---- ----
|
29 |
|
|
---- This source is distributed in the hope that it will be ----
|
30 |
|
|
---- useful, but WITHOUT ANY WARRANTY; without even the implied ----
|
31 |
|
|
---- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ----
|
32 |
|
|
---- PURPOSE. See the GNU Lesser General Public License for more ----
|
33 |
|
|
---- details. ----
|
34 |
|
|
---- ----
|
35 |
|
|
---- You should have received a copy of the GNU Lesser General ----
|
36 |
|
|
---- Public License along with this source; if not, download it ----
|
37 |
|
|
---- from http://www.opencores.org/lgpl.shtml ----
|
38 |
|
|
---- ----
|
39 |
|
|
----------------------------------------------------------------------
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
|
43 |
|
|
architecture synth of distances is
|
44 |
|
|
signal partDist : ARRAY16b;
|
45 |
|
|
begin
|
46 |
|
|
partDistance_g : for i in 0 to 7 generate
|
47 |
|
|
partDistance_i : partDistance generic map (
|
48 |
|
|
ref => i
|
49 |
|
|
)
|
50 |
|
|
port map (
|
51 |
|
|
a => a,
|
52 |
|
|
b => b,
|
53 |
|
|
y => y,
|
54 |
|
|
w => w,
|
55 |
|
|
res => partDist(i)
|
56 |
|
|
);
|
57 |
|
|
end generate;
|
58 |
|
|
opposite_g : for i in 0 to 7 generate
|
59 |
|
|
opposite_i : opposite port map (
|
60 |
|
|
pos => partDist(i),
|
61 |
|
|
neg => partDist(15 - i)
|
62 |
|
|
);
|
63 |
|
|
end generate;
|
64 |
|
|
distance_g : for i in 0 to 15 generate
|
65 |
|
|
distance_i : distance port map (
|
66 |
|
|
partDist => partDist(i),
|
67 |
|
|
z => z(i / 4),
|
68 |
|
|
dist => distance16(i)
|
69 |
|
|
);
|
70 |
|
|
end generate;
|
71 |
|
|
end;
|