Skip to content

Commit 90988a2

Browse files
committed
Improved documentation to indicate correspondence to TS38.212 V1.2.1.
1 parent 17b33f7 commit 90988a2

6 files changed

Lines changed: 93 additions & 37 deletions

File tree

PBCH_decoder.m

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
11
function a_hat = PBCH_decoder(f_tilde, A, L, min_sum, a_tilde)
2-
% PCBH_DECODER Public Broadcast Channel (PBCH) polar decoder from 3GPP New
3-
% Radio, as specified in Section 7.1 of TS 38.212 v1.0.1...
4-
% http://www.3gpp.org/ftp/TSG_RAN/WG1_RL1/TSGR1_AH/NR_AH_1709/Docs/R1-1716928.zip
2+
% PCBH_DECODER Polar decoder for the Public Broadcast Channel (PBCH) of 3GPP New Radio, as
3+
% defined in Section 7.1 of TS38.212 V1.2.1. Implements the Cyclic Redudancy
4+
% Check (CRC) attachment of Section 7.1.3, the channel coding of Section 7.1.4
5+
% and the rate matching of Section 7.1.5. Note that this code does not
6+
% implement the payload generation of Section 7.1.1 or the scrambling of
7+
% Section 7.1.2.
58
% a_hat = PBCH_DECODER(f_tilde, A, L, min_sum, a_tilde) decodes the encoded LLR sequence
69
% f_tilde, in order to obtain the recovered information bit sequence
710
% a_hat.
811
%
912
% f_tilde should be a real row vector comprising 864 Logarithmic
1013
% Likelihood Ratios (LLRS), each having a value obtained as LLR =
11-
% ln(P(bit=0)/P(bit=1)).
14+
% ln(P(bit=0)/P(bit=1)). The first LLR corresponds to f_0 from Section
15+
% 7.1.5 of TS38.212 V1.2.1, while the last LLR corresponds to
16+
% f_E-1.
1217
%
1318
% A should be 32. It specifies the number of bits in the
1419
% information bit sequence.
@@ -33,13 +38,14 @@
3338
% scrambling of Section 7.1.1 in TS38.212 V1.1.2, since this depends on
3439
% several higher-layer parameters. If scrambling is implemented
3540
% externally to this code, then a_tilde should pertain to the scrambled
36-
% bit values.
41+
% bit values. The first input bit corresponds to a'_0 from
42+
% Section 7.1.3 of TS38.212 V1.2.1, while the last input bit corresponds
43+
% to a'_A-1.
3744
%
3845
% a_hat will be a binary row vector comprising 32 bits, each
39-
% having the value 0 or 1. Note that this code does not perform the
40-
% scrambling of Section 7.1.1 in TS38.212 V1.1.2, since this depends on
41-
% several higher-layer parameters. But scrambling can be implemented
42-
% externally to this code.
46+
% having the value 0 or 1. The first output bit corresponds to a'_0 from
47+
% Section 7.1.3 of TS38.212 V1.2.1, while the last output bit corresponds
48+
% to a'_A-1.
4349
%
4450
%
4551
% See also PBCH_ENCODER

PBCH_encoder.m

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
11
function f = PBCH_encoder(a, E)
2-
% PBCH_ENCODER Public Broadcast Channel (PBCH) polar encoder from 3GPP New
3-
% Radio, as specified in Section 7.1 of TS 38.212 v1.0.1...
4-
% http://www.3gpp.org/ftp/TSG_RAN/WG1_RL1/TSGR1_AH/NR_AH_1709/Docs/R1-1716928.zip
2+
% PBCH_ENCODER Polar encoder for the Public Broadcast Channel (PBCH) of 3GPP New Radio, as
3+
% defined in Section 7.1 of TS38.212 V1.2.1. Implements the Cyclic Redudancy
4+
% Check (CRC) attachment of Section 7.1.3, the channel coding of Section 7.1.4
5+
% and the rate matching of Section 7.1.5. Note that this code does not
6+
% implement the payload generation of Section 7.1.1 or the scrambling of
7+
% Section 7.1.2.
58
% f = PBCH_ENCODER(a, E) encodes the information bit sequence a, in
69
% order to obtain the encoded bit sequence e.
710
%
811
% a should be a binary row vector comprising 32 bits, each
9-
% having the value 0 or 1. Note that this code does not perform the
10-
% scrambling of Section 7.1.1 in TS38.212 V1.1.2, since this depends on
11-
% several higher-layer parameters. But scrambling can be implemented
12-
% externally to this code.
12+
% having the value 0 or 1. The first input bit corresponds to a'_0 from
13+
% Section 7.1.3 of TS38.212 V1.2.1, while the last input bit corresponds
14+
% to a'_A-1.
1315
%
1416
% E should be 864. It specifies the number of bits in the
1517
% encoded bit sequence. Since there is only one valid value for this
1618
% parameter, it can be omitted.
1719
%
1820
% f will be a binary row vector comprising 864 bits, each having
19-
% the value 0 or 1.
21+
% the value 0 or 1. The first output bit corresponds to f_0 from Section
22+
% 7.1.5 of TS38.212 V1.2.1, while the last output bit corresponds to
23+
% f_E-1.
2024
%
2125
% See also PBCH_DECODER
2226
%

PDCCH_decoder.m

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
function a_hat = PDCCH_decoder(f_tilde, A, L, min_sum, RNTI)
2-
% PDCCH_DECODER Physical Downlink Control Channel (PDCCH) polar decoder from 3GPP New
3-
% Radio, as specified in Section 7.3 of TS 38.212 v1.0.1...
4-
% http://www.3gpp.org/ftp/TSG_RAN/WG1_RL1/TSGR1_AH/NR_AH_1709/Docs/R1-1716928.zip
2+
% PDCCH_DECODER Polar decoder for the Physical Downlink Control Channel (PDCCH) of 3GPP New
3+
% Radio, as defined in Section 7.3 of TS38.212 V1.2.1. Implements the zero-
4+
% padding to increase the length of short payloads to 12 bits of Section 7.3.1,
5+
% the Cyclic Redudancy Check (CRC) attachment of Section 7.3.2, the channel
6+
% coding of Section 7.3.3 and the rate matching of Section 7.3.4. Note that
7+
% this code does not implement the DCI bit sequence generation of Section
8+
% 7.3.1.
59
% a_hat = PDCCH_DECODER(f_tilde, A, L, min_sum) decodes the encoded LLR sequence
610
% f_tilde, in order to obtain the recovered information bit sequence
711
% a_hat.
812
%
913
% f_tilde should be a real row vector comprising E number of Logarithmic
1014
% Likelihood Ratios (LLRS), each having a value obtained as LLR =
11-
% ln(P(bit=0)/P(bit=1)).
15+
% ln(P(bit=0)/P(bit=1)). The first LLR corresponds to f_0 from Section
16+
% 7.3.4 of TS38.212 V1.2.1, while the last LLR corresponds to
17+
% f_E-1.
1218
%
1319
% A should be an integer scalar. It specifies the number of bits in the
1420
% information bit sequence, where A should be in the range 1 to 140.
@@ -24,10 +30,13 @@
2430
%
2531
% RNTI should be a binary row vector comprising 16 bits, each having the
2632
% value 0 or 1. If this parameter is omitted, then ones(1,16) will be
27-
% used for the RNTI.
33+
% used for the RNTI. The first bit corresponds to x_rnti,0 from Section
34+
% 7.3.2 of TS38.212 V1.2.1, while the last bit corresponds to x_rnti,15.
2835
%
2936
% a_hat will be a binary row vector comprising A number of bits, each
30-
% having the value 0 or 1.
37+
% having the value 0 or 1. The first output bit corresponds to a_0 from
38+
% Section 7.3.1 of TS38.212 V1.2.1, while the last output bit corresponds
39+
% to a_A-1.
3140
%
3241
% See also PDCCH_ENCODER
3342
%

PDCCH_encoder.m

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
11
function f = PDCCH_encoder(a, E, RNTI)
2-
% PDCCH_ENCODER Physical Downlink Control Channel (PDCCH) polar encoder from 3GPP New
3-
% Radio, as specified in Section 7.3 of TS 38.212 v1.0.1...
4-
% http://www.3gpp.org/ftp/TSG_RAN/WG1_RL1/TSGR1_AH/NR_AH_1709/Docs/R1-1716928.zip
2+
% PDCCH_ENCODER Polar encoder for the Physical Downlink Control Channel (PDCCH) of 3GPP New
3+
% Radio, as defined in Section 7.3 of TS38.212 V1.2.1. Implements the zero-
4+
% padding to increase the length of short payloads to 12 bits of Section 7.3.1,
5+
% the Cyclic Redudancy Check (CRC) attachment of Section 7.3.2, the channel
6+
% coding of Section 7.3.3 and the rate matching of Section 7.3.4. Note that
7+
% this code does not implement the DCI bit sequence generation of Section
8+
% 7.3.1.
59
% f = PDCCH_ENCODER(a, E) encodes the information bit sequence a, in
610
% order to obtain the encoded bit sequence e.
711
%
812
% a should be a binary row vector comprising A number of bits, each
9-
% having the value 0 or 1. A should be in the range 1 to 140.
13+
% having the value 0 or 1. A should be in the range 1 to 140. The first
14+
% input bit corresponds to a_0 from Section 7.3.1 of TS38.212 V1.2.1, while the
15+
% last input bit corresponds to a_A-1.
1016
%
1117
% E should be an integer scalar. It specifies the number of bits in the
1218
% encoded bit sequence, where E should greater than A.
1319
%
1420
% RNTI should be a binary row vector comprising 16 bits, each having the
1521
% value 0 or 1. If this parameter is omitted, then ones(1,16) will be
16-
% used for the RNTI.
22+
% used for the RNTI. The first bit corresponds to x_rnti,0 from Section
23+
% 7.3.2 of TS38.212 V1.2.1, while the last bit corresponds to x_rnti,15.
1724
%
1825
% f will be a binary row vector comprising E number of bits, each having
19-
% the value 0 or 1.
26+
% the value 0 or 1. The first output bit corresponds to f_0 from Section
27+
% 7.3.4 of TS38.212 V1.2.1, while the last output bit corresponds to
28+
% f_E-1.
2029
%
2130
% See also PDCCH_DECODER
2231
%

PUCCH_decoder.m

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
function a_hat = PUCCH_decoder(f_tilde, A, L, min_sum)
2-
% PUCCH_DECODER Physical Uplink Control Channel (PUCCH) polar decoder from 3GPP New
3-
% Radio, as specified in Section 6.3.1 of TS 38.212 v1.1.1
2+
% PUCCH_DECODER Polar decoder for the Physical Uplink Control Channel (PUCCH) and the
3+
% Physical Uplink Shared Channel (PUSCH) of 3GPP New Radio, as defined in
4+
% Section 6.3 of TS38.212 V1.2.1. Implements the code block segmentation and
5+
% Cyclic Redudancy Check (CRC) attachment of Sections 6.3.1.2.1 and 6.3.2.2.1,
6+
% the channel coding of Sections 6.3.1.3.1 and 6.3.2.3.2, the rate matching of
7+
% Sections 6.3.1.4.1 and 6.3.2.4.1, as well as the code block concatenation of
8+
% Sections 6.3.1.5.1 and 6.3.2.5.1. Note that this code does not implement the
9+
% UCI bit sequence generation of Sections 6.3.1.1 and 6.3.2.1, the
10+
% determination of the encoded block length E_UCI of Sections 6.3.1.4.1 and
11+
% 6.3.2.4.1, or the multiplexing of Sections 6.3.1.6 and 6.3.2.6. Also, this
12+
% code does not implement the small block lengths, which are detailed in
13+
% Sections 6.3.1.2.2, 6.3.1.3.2, 6.3.1.4.2, 6.3.2.2.2, 6.3.2.3.2 and 6.3.2.4.2.
414
% a_hat = PUCCH_DECODER(f_tilde, A, L, min_sum) decodes the encoded LLR sequence
515
% f_tilde, in order to obtain the recovered information bit sequence
616
% a_hat.
717
%
818
% f_tilde should be a real row vector comprising G number of Logarithmic
919
% Likelihood Ratios (LLRS), each having a value obtained as LLR =
1020
% ln(P(bit=0)/P(bit=1)), where G should be no greater than 8192 if A<360
11-
% and no greater than 16384 if A>=360.
21+
% and no greater than 16384 if A>=360. The first LLR corresponds to g_0
22+
% from Sections 6.3.1.5 and 6.3.2.5 of TS38.212 V1.2.1, while the last
23+
% LLR corresponds to g_G-1.
1224
%
1325
% A should be an integer scalar. It specifies the number of bits in the
1426
% information bit sequence, where A should be in the range 12 to 1706.
@@ -23,7 +35,9 @@
2335
% complexity.
2436
%
2537
% a_hat will be a binary row vector comprising A number of bits, each
26-
% having the value 0 or 1.
38+
% having the value 0 or 1. The first output bit corresponds to a_0 from
39+
% Sections 6.3.1.2 and 6.3.2.2 of TS38.212 V1.2.1, while the last output
40+
% bit corresponds to a_A-1.
2741
%
2842
% See also PUCCH_ENCODER
2943
%

PUCCH_encoder.m

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,32 @@
11
function f = PUCCH_encoder(a, G)
2-
% PUCCH_ENCODER Physical Uplink Control Channel (PUCCH) polar encoder from 3GPP New
3-
% Radio, as specified in Section 6.3.1 of TS 38.212 v1.1.1
2+
% PUCCH_ENCODER Polar encoder for the Physical Uplink Control Channel (PUCCH) and the
3+
% Physical Uplink Shared Channel (PUSCH) of 3GPP New Radio, as defined in
4+
% Section 6.3 of TS38.212 V1.2.1. Implements the code block segmentation and
5+
% Cyclic Redudancy Check (CRC) attachment of Sections 6.3.1.2.1 and 6.3.2.2.1,
6+
% the channel coding of Sections 6.3.1.3.1 and 6.3.2.3.2, the rate matching of
7+
% Sections 6.3.1.4.1 and 6.3.2.4.1, as well as the code block concatenation of
8+
% Sections 6.3.1.5.1 and 6.3.2.5.1. Note that this code does not implement the
9+
% UCI bit sequence generation of Sections 6.3.1.1 and 6.3.2.1, the
10+
% determination of the encoded block length E_UCI of Sections 6.3.1.4.1 and
11+
% 6.3.2.4.1, or the multiplexing of Sections 6.3.1.6 and 6.3.2.6. Also, this
12+
% code does not implement the small block lengths, which are detailed in
13+
% Sections 6.3.1.2.2, 6.3.1.3.2, 6.3.1.4.2, 6.3.2.2.2, 6.3.2.3.2 and 6.3.2.4.2.
414
% f = PUCCH_ENCODER(a, G) encodes the information bit sequence a, in
515
% order to obtain the encoded bit sequence f.
616
%
717
% a should be a binary row vector comprising A number of bits, each
8-
% having the value 0 or 1, where A should be in the range 12 to 1706.
18+
% having the value 0 or 1, where A should be in the range 12 to 1706. The first
19+
% input bit corresponds to a_0 from Sections 6.3.1.2 and 6.3.2.2 of TS38.212
20+
% V1.2.1, while the last input bit corresponds to a_A-1.
921
%
1022
% G should be an integer scalar. It specifies the number of bits in the
1123
% encoded bit sequence, where G should be no greater than 8192 if A<360
1224
% and no greater than 16384 if A>=360.
1325
%
1426
% f will be a binary row vector comprising G number of bits, each having
15-
% the value 0 or 1.
27+
% the value 0 or 1. The first output bit corresponds to g_0 from Sections
28+
% 6.3.1.5 and 6.3.2.5 of TS38.212 V1.2.1, while the last output bit
29+
% corresponds to g_G-1.
1630
%
1731
% See also PUCCH_DECODER
1832
%

0 commit comments

Comments
 (0)