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

Subversion Repositories product_code_iterative_decoder

[/] [product_code_iterative_decoder/] [trunk/] [xilinx/] [xilinx.vhdl] - Blame information for rev 18

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 arif_endro
-- ------------------------------------------------------------------------
2 14 arif_endro
-- Copyright (C) 2005 Arif Endro Nugroho
3 18 arif_endro
-- All rights reserved.
4 9 arif_endro
-- 
5 18 arif_endro
-- Redistribution and use in source and binary forms, with or without
6
-- modification, are permitted provided that the following conditions
7
-- are met:
8 9 arif_endro
-- 
9 18 arif_endro
-- 1. Redistributions of source code must retain the above copyright
10
--    notice, this list of conditions and the following disclaimer.
11
-- 2. Redistributions in binary form must reproduce the above copyright
12
--    notice, this list of conditions and the following disclaimer in the
13
--    documentation and/or other materials provided with the distribution.
14 9 arif_endro
-- 
15 18 arif_endro
-- THIS SOFTWARE IS PROVIDED BY ARIF ENDRO NUGROHO "AS IS" AND ANY EXPRESS
16
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
-- DISCLAIMED. IN NO EVENT SHALL ARIF ENDRO NUGROHO BE LIABLE FOR ANY
19
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21
-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22
-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23
-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24
-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
-- POSSIBILITY OF SUCH DAMAGE.
26 9 arif_endro
-- 
27 18 arif_endro
-- End Of License.
28
-- ------------------------------------------------------------------------
29 9 arif_endro
 
30
library ieee;
31
use ieee.std_logic_1164.all;
32
use ieee.std_logic_arith.all;
33
use ieee.std_logic_unsigned.all;
34
 
35
entity xilinx is
36
   port (
37
      clock     : in  bit;
38
      clear     : in  bit;
39
      start     : out bit;
40
      rom_pos   : out integer;
41
      y0d       : out bit;
42
      y1d       : out bit;
43
      y2d       : out bit;
44
      y3d       : out bit;
45
      senddata  : out bit_vector (3 downto 0);
46
      match     : out bit_vector (3 downto 0);
47
      bit_error : out integer
48
      );
49
end xilinx;
50
 
51
architecture structural of xilinx is
52
 
53
   component product_code
54
      port (
55
         clock : in  bit;
56
         start : in  bit;
57
         rxin  : in  bit_vector (07 downto 00);
58
         y0d   : out bit;
59
         y1d   : out bit;
60
         y2d   : out bit;
61
         y3d   : out bit
62
         );
63
   end component;
64
 
65
   component input
66
      port (
67
         clock   : in  bit;
68
         clear   : in  bit;
69
         start   : out bit;
70
         rom_pos : out integer;
71
         rxin    : out bit_vector (07 downto 00)
72
         );
73
   end component;
74
 
75
   component reference
76
      port (
77
         clear    : in  bit;
78
         start    : in  bit;
79
         y0       : in  bit;
80
         y1       : in  bit;
81
         y2       : in  bit;
82
         y3       : in  bit;
83
         senddata : out bit_vector (3 downto 0);
84
         match    : out bit_vector (3 downto 0)
85
         );
86
   end component;
87
 
88
   component analyze
89
      port (
90
         clear    : in  bit;
91
         start    : in  bit;
92
         match    : in  bit_vector (3 downto 0);
93
         col_0    : out integer;
94
         col_1    : out integer;
95
         col_2    : out integer;
96
         col_3    : out integer;
97
         result   : out integer
98
         );
99
   end component;
100
 
101
   signal str   : bit;
102
   signal y0    : bit;
103
   signal y1    : bit;
104
   signal y2    : bit;
105
   signal y3    : bit;
106
   signal rxin  : bit_vector (07 downto 00);
107
   signal mtch  : bit_vector (03 downto 00);
108
   signal col_0 : integer;
109
   signal col_1 : integer;
110
   signal col_2 : integer;
111
   signal col_3 : integer;
112
 
113
begin
114
 
115
   start <= str;
116
   match <= mtch;
117
   y0d   <= y0;
118
   y1d   <= y1;
119
   y2d   <= y2;
120
   y3d   <= y3;
121
 
122
   my_product_code : product_code
123
      port map (
124
         clock  => clock,
125
         start  => str,
126
         rxin   => rxin,
127
         y0d    => y0,
128
         y1d    => y1,
129
         y2d    => y2,
130
         y3d    => y3
131
         );
132
 
133
   my_input : input
134
      port map (
135
         clock   => clock,
136
         clear   => clear,
137
         start   => str,
138
         rom_pos => rom_pos,
139
         rxin    => rxin
140
         );
141
 
142
   my_senddata: reference
143
      port map (
144
         clear   => clear,
145
         start   => str,
146
         y0      => y0,
147
         y1      => y1,
148
         y2      => y2,
149
         y3      => y3,
150
         senddata=> senddata,
151
         match   => mtch
152
         );
153
   my_analyzer: analyze
154
      port map (
155
         clear   => clear,
156
         start   => str,
157
         match   => mtch,
158
         col_0   => col_0,
159
         col_1   => col_1,
160
         col_2   => col_2,
161
         col_3   => col_3,
162
         result  => bit_error
163
         );
164
 
165
end structural;

powered by: WebSVN 2.1.0

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