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

Subversion Repositories rs_decoder_31_19_6

[/] [rs_decoder_31_19_6/] [trunk/] [RSDecoder.v] - Blame information for rev 4

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 rud_dp
///*************************************************************///
2
///                                                             ///
3
///          Reed-Solomon Decoder (31,19,6)                     ///
4
///                                                             ///
5
///                                                             ///
6
///          Author : Rudy Dwi Putra                            ///
7
///                   rudy.dp@gmail.com                         ///
8
///                                                             ///
9
///*************************************************************///
10
///                                                             ///
11
/// Copyright (C) 2006  Rudy Dwi Putra                          ///
12
///                     rudy.dp@gmail.com                       ///
13
///                                                             ///
14
/// This source file may be used and distributed without        ///
15
/// restriction provided that this copyright statement is not   ///
16
/// removed from the file and that any derivative work contains ///
17
/// the original copyright notice and the associated disclaimer.///
18
///                                                             ///
19
///     THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY     ///
20
/// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED   ///
21
/// TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS   ///
22
/// FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR      ///
23
/// OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,         ///
24
/// INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES    ///
25
/// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE   ///
26
/// GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR        ///
27
/// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF  ///
28
/// LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT  ///
29
/// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT  ///
30
/// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE         ///
31
/// POSSIBILITY OF SUCH DAMAGE.                                 ///
32
///                                                             ///
33
///*************************************************************///
34
 
35
 
36
module RSDecoder(recword, start, clock1, clock2, reset, ready,
37
               errfound, decode_fail, dataoutstart, dataoutend,
38
               corr_recword);
39
 
40
input [4:0] recword;
41
input clock1, clock2;
42
input start, reset;
43
output ready, decode_fail, errfound, dataoutstart, dataoutend;
44
output [4:0] corr_recword;
45
 
46
wire active_sc, active_kes, active_csee, en_sccell;
47
wire evalsynd, holdsynd, evalerror, lastdataout;
48
wire shift_fifo, hold_fifo, en_infifo, en_outfifo;
49
wire errdetect, finish_kes;
50
wire [4:0] dataout_fifo, errorvalue;
51
 
52
wire [4:0] syndvalue0, syndvalue1, syndvalue2, syndvalue3,
53
           syndvalue4, syndvalue5, syndvalue6, syndvalue7,
54
           syndvalue8, syndvalue9, syndvalue10, syndvalue11;
55
wire [4:0] lambda0, lambda1, lambda2, lambda3, lambda4, lambda5,
56
           lambda6;
57
wire [4:0] homega0, homega1, homega2, homega3, homega4, homega5;
58
wire [2:0] rootcntr, lambda_degree;
59
 
60
//****************************//
61
assign en_sccell = shift_fifo;
62
 
63
SCblock SCblock(recword, clock1, clock2, active_sc, reset, syndvalue0,
64
               syndvalue1, syndvalue2, syndvalue3, syndvalue4,
65
               syndvalue5, syndvalue6, syndvalue7, syndvalue8,
66
               syndvalue9, syndvalue10, syndvalue11, errdetect,
67
               en_sccell, evalsynd, holdsynd);
68
KES_block KESblock(active_kes, clock1, clock2, reset, syndvalue0, syndvalue1,                 syndvalue2, syndvalue3, syndvalue4, syndvalue5, syndvalue6,
69
                syndvalue7, syndvalue8, syndvalue9, syndvalue10, syndvalue11,
70
                lambda0, lambda1, lambda2, lambda3, lambda4, lambda5,
71
                lambda6, homega0, homega1, homega2, homega3, homega4,
72
                homega5, lambda_degree, finish_kes);
73
CSEEblock CSEEblock(lambda0, lambda1, lambda2, lambda3, lambda4,
74
                  lambda5, lambda6, homega0, homega1, homega2,
75
                  homega3, homega4, homega5, errorvalue, clock1,
76
                  clock2, active_csee, reset, lastdataout, evalerror,
77
                  en_outfifo, rootcntr);
78
MainControl controller(start, reset, clock1, clock2, finish_kes,
79
                  errdetect, rootcntr, lambda_degree, active_sc,
80
                  active_kes, active_csee, evalsynd, holdsynd,
81
                  errfound, decode_fail, ready, dataoutstart, dataoutend,
82
                  shift_fifo, hold_fifo, en_infifo, en_outfifo,
83
                  lastdataout, evalerror);
84
fifo_register fiforeg(clock1, clock2, shift_fifo, hold_fifo,
85
                     en_outfifo, en_infifo, recword, dataout_fifo);
86
 
87
// Received word correction//
88
gfadder adder(errorvalue, dataout_fifo, corr_recword);
89
 
90
endmodule

powered by: WebSVN 2.1.0

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