Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

wimax test question, page 444 of 802.16d spec

Status
Not open for further replies.

jinlu8591

Newbie level 3
Joined
Dec 8, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,334
802.16d reed solomon

on the page 444 of 802.16d, there are some test data about encoding:

Modulation Mode: QPSK, rate 3/4, Symbol Number within burst: 1, UIUC: 7, BSID: 1, Frame Number 1 (decimal values)

Input Data (Hex)

45 29 C4 79 AD 0F 55 28 AD 87 B5 76 1A 9C 80 50 45 1B 9F D9 2A 88 95 EB AE B5 2E 03 4F 09 14 69 58 0A 5D

Randomized Data (Hex) (35 bytes)

D4 BA A1 12 F2 74 96 30 27 D4 88 9C 96 E3 A9 52 B3 15 AB FD 92 53 07 32 C0 62 48 F0 19 22 E0 91 62 1A C1

Reed-Solomon encoded Data (Hex) (35 + 1 + 4 bytes)

49 31 40 BF D4 BA A1 12 F2 74 96 30 27 D4 88 9C 96 E3 A9 52 B3 15 AB FD 92 53 07 32 C0 62 48 F0 19 22 E0 91 62 1A C1 00

If you compare the randomized data and reed-solomon (40, 36, 2) encoded data,
you would notice that the 4 bytes of reed-solomon code (49 31 40 BF ) is added to the beginning of the data. Is that correct? Should it be added to the end of the data? Please shed some light, thank in advance.

Jin
 

Yes, certainly it is added at the beginning of your data.
 

Thanks. Actually, I tried the following matlab RS code (also see the attachment) based on the 802.16d spec (see later), and could not get the same result as on page 444 of 802.16d spec:

%test data (36 bytes), page 444 of 802.16d spec
y=['D4';'BA';'A1';'12';'F2';'74';'96';'30';'27';'D4';'88';'9C';'96';'E3';'A9';'52';'B3';'15';'AB';'FD';'92';'53';'07';'32';'C0';'62';'48';'F0';'19';'22';'E0';'91';'62';'1A';'C1';'00'];
data = hex2dec(y); % covert to int in 0-255
data = [zeros(1,239-length(data)) data']; % pad zeros at the beginning to make 239 bytes

pp=285 % p(x)=x^8+x^4+x^3+x^2+1 ->100011101
msg = gf(data, 8, pp);
code = rsenc(msg, 255, 239);

result = code.x;
result = [result(240:240+3) result(239-36+1:239)]; %put the 4 parity bytes in front
%covert to hex
result = dec2hex(result'); % does not match 49 31 40 BF D4 BA A1 .....?


Anyone has tried this, could you please shed some light to it? Thanks in advance.


------------
The relevant paragraph in the spec:

This code is shortened and punctured to enable variable block sizes and variable error-correction capability. When a block is shortened to K' data bytes, add 239-K' zero bytes as a prefix. After encoding discard these 239-K' zero bytes. When a codeword is punctured to permit T' bytes to be corrected, only the first 2T' of the total 16 parity bytes shall be employed. The bit/byte conversion shall be MSB first.
 

Regarding my previous message -- it works if I put the generator poly in the rsenc function. But I have a problem with the decoder. Again, I am using the following simple matlab code to test it and show my problem. The code does not seems to correct errors. In fact,I do not understand how you can use the 4 parity bytes out of 16 bytes ( RS(255, 239, 8) ) to correct 2 errors, as specified below. Please advise what is missing here. Thanks a lot. Jin

% ------------ matlab rs decode test ---------------
%test data for rs decode (4 rs parity bytes + 36 message bytes), page 444 of 802.16d spec
y=['49';'31';'40';'BF';'D4';'BA';'A1';'12';'F2';'74';'96';'30';'27';'D4';'88';'9C';'96';'E3';'A9';'52';'B3';'15';'AB';'FD';'92';'53';'07';'32';'C0';'62';'48';'F0';'19';'22';'E0';'91';'62';'1A';'C1';'00'];
data = hex2dec(y); % covert to int in 0-255
msg = [zeros(1,239-36) data(5:40)' data(1:4)' zeros(1,16-4)]; % pad zeros at the beginning and end to make 266 bytes

genPoly = gf(1,8);
for idx = 0 : 15
genPoly = conv(genPoly, [1 gf(2,8)^idx]);
end

pp=285 % p(x)=x^8+x^4+x^3+x^2+1 ->100011101
msg = gf(msg, 8, pp);

error =zeros(1, 255);
error(203+3:203+4)=[3 5]; % inject 2 bytes of error to the message part starting at 204 = 239-36+1
error = gf(error, m);

msg = msg + error;
code = rsdec(msg, 255, 239, genPoly);

result = code.x;
result = dec2hex(result'); % should be D4 BA A1 .....?


------------------------------- spec ----------------------------
%This code is shortened and punctured to enable variable block sizes
%and variable error-correction capability. When a block is shortened
%to K' data bytes, add 239-K' zero bytes as a prefix. After encoding
%discard these 239-K' zero bytes. When a codeword is punctured to
%permit T' bytes to be corrected, only the first 2T' of the total 16
%parity bytes shall be employed. The bit/byte conversion shall be MSB
%first.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top