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

Subversion Repositories reed_solomon_decoder

[/] [reed_solomon_decoder/] [trunk/] [rtl/] [GF_matrix_dec.v] - Blame information for rev 2

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 aelmahmoud
/* This program is free software: you can redistribute it and/or modify
2
   it under the terms of the GNU General Public License as published by
3
   the Free Software Foundation, either version 3 of the License, or
4
   (at your option) any later version.
5
 
6
   This program 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
9
   GNU General Public License for more details.
10
 
11
   You should have received a copy of the GNU General Public License
12
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
13
 
14
   Email : semiconductors@varkongroup.com
15
   Tel   : 1-732-447-8611
16
 
17
*/
18
 
19
 
20
///convert values from  power domain to decimal domain
21
module GF_matrix_dec(clk,re,address_read,data_out);
22
parameter address_width=8;
23
parameter data_width=8;
24
parameter num_words=256;
25
input clk,re;
26
input [address_width-1:0] address_read;
27
output [data_width-1:0] data_out;
28
reg [data_width-1:0] data_out;
29
reg [data_width-1:0] mem [0:num_words-1];
30
initial
31
begin
32
mem[0]<= 'b00000000;
33
mem[1]<= 'b00000001;
34
mem[2]<= 'b00000010;
35
mem[3]<= 'b00000100;
36
mem[4]<= 'b00001000;
37
mem[5]<= 'b00010000;
38
mem[6]<= 'b00100000;
39
mem[7]<= 'b01000000;
40
mem[8]<= 'b10000000;
41
mem[9]<= 'b00011101;
42
mem[10]<= 'b00111010;
43
mem[11]<= 'b01110100;
44
mem[12]<= 'b11101000;
45
mem[13]<= 'b11001101;
46
mem[14]<= 'b10000111;
47
mem[15]<= 'b00010011;
48
mem[16]<= 'b00100110;
49
mem[17]<= 'b01001100;
50
mem[18]<= 'b10011000;
51
mem[19]<= 'b00101101;
52
mem[20]<= 'b01011010;
53
mem[21]<= 'b10110100;
54
mem[22]<= 'b01110101;
55
mem[23]<= 'b11101010;
56
mem[24]<= 'b11001001;
57
mem[25]<= 'b10001111;
58
mem[26]<= 'b00000011;
59
mem[27]<= 'b00000110;
60
mem[28]<= 'b00001100;
61
mem[29]<= 'b00011000;
62
mem[30]<= 'b00110000;
63
mem[31]<= 'b01100000;
64
mem[32]<= 'b11000000;
65
mem[33]<= 'b10011101;
66
mem[34]<= 'b00100111;
67
mem[35]<= 'b01001110;
68
mem[36]<= 'b10011100;
69
mem[37]<= 'b00100101;
70
mem[38]<= 'b01001010;
71
mem[39]<= 'b10010100;
72
mem[40]<= 'b00110101;
73
mem[41]<= 'b01101010;
74
mem[42]<= 'b11010100;
75
mem[43]<= 'b10110101;
76
mem[44]<= 'b01110111;
77
mem[45]<= 'b11101110;
78
mem[46]<= 'b11000001;
79
mem[47]<= 'b10011111;
80
mem[48]<= 'b00100011;
81
mem[49]<= 'b01000110;
82
mem[50]<= 'b10001100;
83
mem[51]<= 'b00000101;
84
mem[52]<= 'b00001010;
85
mem[53]<= 'b00010100;
86
mem[54]<= 'b00101000;
87
mem[55]<= 'b01010000;
88
mem[56]<= 'b10100000;
89
mem[57]<= 'b01011101;
90
mem[58]<= 'b10111010;
91
mem[59]<= 'b01101001;
92
mem[60]<= 'b11010010;
93
mem[61]<= 'b10111001;
94
mem[62]<= 'b01101111;
95
mem[63]<= 'b11011110;
96
mem[64]<= 'b10100001;
97
mem[65]<= 'b01011111;
98
mem[66]<= 'b10111110;
99
mem[67]<= 'b01100001;
100
mem[68]<= 'b11000010;
101
mem[69]<= 'b10011001;
102
mem[70]<= 'b00101111;
103
mem[71]<= 'b01011110;
104
mem[72]<= 'b10111100;
105
mem[73]<= 'b01100101;
106
mem[74]<= 'b11001010;
107
mem[75]<= 'b10001001;
108
mem[76]<= 'b00001111;
109
mem[77]<= 'b00011110;
110
mem[78]<= 'b00111100;
111
mem[79]<= 'b01111000;
112
mem[80]<= 'b11110000;
113
mem[81]<= 'b11111101;
114
mem[82]<= 'b11100111;
115
mem[83]<= 'b11010011;
116
mem[84]<= 'b10111011;
117
mem[85]<= 'b01101011;
118
mem[86]<= 'b11010110;
119
mem[87]<= 'b10110001;
120
mem[88]<= 'b01111111;
121
mem[89]<= 'b11111110;
122
mem[90]<= 'b11100001;
123
mem[91]<= 'b11011111;
124
mem[92]<= 'b10100011;
125
mem[93]<= 'b01011011;
126
mem[94]<= 'b10110110;
127
mem[95]<= 'b01110001;
128
mem[96]<= 'b11100010;
129
mem[97]<= 'b11011001;
130
mem[98]<= 'b10101111;
131
mem[99]<= 'b01000011;
132
mem[100]<= 'b10000110;
133
mem[101]<= 'b00010001;
134
mem[102]<= 'b00100010;
135
mem[103]<= 'b01000100;
136
mem[104]<= 'b10001000;
137
mem[105]<= 'b00001101;
138
mem[106]<= 'b00011010;
139
mem[107]<= 'b00110100;
140
mem[108]<= 'b01101000;
141
mem[109]<= 'b11010000;
142
mem[110]<= 'b10111101;
143
mem[111]<= 'b01100111;
144
mem[112]<= 'b11001110;
145
mem[113]<= 'b10000001;
146
mem[114]<= 'b00011111;
147
mem[115]<= 'b00111110;
148
mem[116]<= 'b01111100;
149
mem[117]<= 'b11111000;
150
mem[118]<= 'b11101101;
151
mem[119]<= 'b11000111;
152
mem[120]<= 'b10010011;
153
mem[121]<= 'b00111011;
154
mem[122]<= 'b01110110;
155
mem[123]<= 'b11101100;
156
mem[124]<= 'b11000101;
157
mem[125]<= 'b10010111;
158
mem[126]<= 'b00110011;
159
mem[127]<= 'b01100110;
160
mem[128]<= 'b11001100;
161
mem[129]<= 'b10000101;
162
mem[130]<= 'b00010111;
163
mem[131]<= 'b00101110;
164
mem[132]<= 'b01011100;
165
mem[133]<= 'b10111000;
166
mem[134]<= 'b01101101;
167
mem[135]<= 'b11011010;
168
mem[136]<= 'b10101001;
169
mem[137]<= 'b01001111;
170
mem[138]<= 'b10011110;
171
mem[139]<= 'b00100001;
172
mem[140]<= 'b01000010;
173
mem[141]<= 'b10000100;
174
mem[142]<= 'b00010101;
175
mem[143]<= 'b00101010;
176
mem[144]<= 'b01010100;
177
mem[145]<= 'b10101000;
178
mem[146]<= 'b01001101;
179
mem[147]<= 'b10011010;
180
mem[148]<= 'b00101001;
181
mem[149]<= 'b01010010;
182
mem[150]<= 'b10100100;
183
mem[151]<= 'b01010101;
184
mem[152]<= 'b10101010;
185
mem[153]<= 'b01001001;
186
mem[154]<= 'b10010010;
187
mem[155]<= 'b00111001;
188
mem[156]<= 'b01110010;
189
mem[157]<= 'b11100100;
190
mem[158]<= 'b11010101;
191
mem[159]<= 'b10110111;
192
mem[160]<= 'b01110011;
193
mem[161]<= 'b11100110;
194
mem[162]<= 'b11010001;
195
mem[163]<= 'b10111111;
196
mem[164]<= 'b01100011;
197
mem[165]<= 'b11000110;
198
mem[166]<= 'b10010001;
199
mem[167]<= 'b00111111;
200
mem[168]<= 'b01111110;
201
mem[169]<= 'b11111100;
202
mem[170]<= 'b11100101;
203
mem[171]<= 'b11010111;
204
mem[172]<= 'b10110011;
205
mem[173]<= 'b01111011;
206
mem[174]<= 'b11110110;
207
mem[175]<= 'b11110001;
208
mem[176]<= 'b11111111;
209
mem[177]<= 'b11100011;
210
mem[178]<= 'b11011011;
211
mem[179]<= 'b10101011;
212
mem[180]<= 'b01001011;
213
mem[181]<= 'b10010110;
214
mem[182]<= 'b00110001;
215
mem[183]<= 'b01100010;
216
mem[184]<= 'b11000100;
217
mem[185]<= 'b10010101;
218
mem[186]<= 'b00110111;
219
mem[187]<= 'b01101110;
220
mem[188]<= 'b11011100;
221
mem[189]<= 'b10100101;
222
mem[190]<= 'b01010111;
223
mem[191]<= 'b10101110;
224
mem[192]<= 'b01000001;
225
mem[193]<= 'b10000010;
226
mem[194]<= 'b00011001;
227
mem[195]<= 'b00110010;
228
mem[196]<= 'b01100100;
229
mem[197]<= 'b11001000;
230
mem[198]<= 'b10001101;
231
mem[199]<= 'b00000111;
232
mem[200]<= 'b00001110;
233
mem[201]<= 'b00011100;
234
mem[202]<= 'b00111000;
235
mem[203]<= 'b01110000;
236
mem[204]<= 'b11100000;
237
mem[205]<= 'b11011101;
238
mem[206]<= 'b10100111;
239
mem[207]<= 'b01010011;
240
mem[208]<= 'b10100110;
241
mem[209]<= 'b01010001;
242
mem[210]<= 'b10100010;
243
mem[211]<= 'b01011001;
244
mem[212]<= 'b10110010;
245
mem[213]<= 'b01111001;
246
mem[214]<= 'b11110010;
247
mem[215]<= 'b11111001;
248
mem[216]<= 'b11101111;
249
mem[217]<= 'b11000011;
250
mem[218]<= 'b10011011;
251
mem[219]<= 'b00101011;
252
mem[220]<= 'b01010110;
253
mem[221]<= 'b10101100;
254
mem[222]<= 'b01000101;
255
mem[223]<= 'b10001010;
256
mem[224]<= 'b00001001;
257
mem[225]<= 'b00010010;
258
mem[226]<= 'b00100100;
259
mem[227]<= 'b01001000;
260
mem[228]<= 'b10010000;
261
mem[229]<= 'b00111101;
262
mem[230]<= 'b01111010;
263
mem[231]<= 'b11110100;
264
mem[232]<= 'b11110101;
265
mem[233]<= 'b11110111;
266
mem[234]<= 'b11110011;
267
mem[235]<= 'b11111011;
268
mem[236]<= 'b11101011;
269
mem[237]<= 'b11001011;
270
mem[238]<= 'b10001011;
271
mem[239]<= 'b00001011;
272
mem[240]<= 'b00010110;
273
mem[241]<= 'b00101100;
274
mem[242]<= 'b01011000;
275
mem[243]<= 'b10110000;
276
mem[244]<= 'b01111101;
277
mem[245]<= 'b11111010;
278
mem[246]<= 'b11101001;
279
mem[247]<= 'b11001111;
280
mem[248]<= 'b10000011;
281
mem[249]<= 'b00011011;
282
mem[250]<= 'b00110110;
283
mem[251]<= 'b01101100;
284
mem[252]<= 'b11011000;
285
mem[253]<= 'b10101101;
286
mem[254]<= 'b01000111;
287
mem[255]<= 'b10001110;
288
end
289
always @ (posedge(clk))
290
begin
291
        if (re==1'b1)
292
                begin
293
                        data_out <= mem[address_read];
294
                end
295
end
296
endmodule

powered by: WebSVN 2.1.0

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