Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alex037yang
OpenXG-RAN
Commits
afd34816
Commit
afd34816
authored
Oct 29, 2018
by
Guy De Souza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Debug info
parent
8855ca03
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
8 deletions
+26
-8
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
+24
-6
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
+2
-2
No files found.
openair1/PHY/NR_TRANSPORT/nr_dlsch.c
View file @
afd34816
...
...
@@ -34,7 +34,7 @@
#include "nr_dci.h"
#include "nr_sch_dmrs.h"
//
#define DEBUG_DLSCH
#define DEBUG_DLSCH
uint8_t
mod_order
[
5
]
=
{
1
,
2
,
4
,
6
,
8
};
uint16_t
mod_offset
[
5
]
=
{
1
,
3
,
7
,
23
,
87
};
...
...
@@ -197,8 +197,10 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
uint32_t
scrambled_output
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
];
int16_t
mod_symbs
[
NR_MAX_NB_CODEWORDS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
];
uint16_t
tx_layers
[
NR_MAX_NB_LAYERS
][
NR_MAX_PDSCH_ENCODED_LENGTH
>>
1
];
uint16_t
n_symbs
[
NR_MAX_NB_CODEWORDS
]
;
uint16_t
n_symbs
;
int8_t
Wf
[
2
],
Wt
[
2
],
l0
,
delta
;
uint16_t
TBS
=
rel15
->
transport_block_size
;
uint8_t
Qm
=
rel15
->
modulation_order
;
/// CRC, coding, interleaving and rate matching
nr_dlsch_encoding
(
harq
->
pdu
,
subframe
,
&
dlsch
,
&
frame_parms
);
...
...
@@ -210,18 +212,34 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
pdcch_params
.
scrambling_id
:
config
.
sch_config
.
physical_cell_id
.
value
;
for
(
int
q
=
0
;
q
<
rel15
->
nb_codewords
;
q
++
)
nr_pdsch_codeword_scrambling
(
harq
->
f
,
rel15
->
transport_block_size
,
TBS
,
q
,
Nid
,
n_RNTI
,
scrambled_output
[
q
]);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH Scrambling(TBS %d): before
\t
after
\n
"
,
TBS
);
for
(
int
i
=
0
;
i
<
TBS
;
i
++
)
{
printf
(
"%d
\t
%d
\n
"
,
harq
->
f
[
i
],
scrambled_output
[
0
][
i
]);
}
#endif
/// Modulation
n_symbs
=
TBS
/
Qm
;
for
(
int
q
=
0
;
q
<
rel15
->
nb_codewords
;
q
++
)
nr_pdsch_codeword_modulation
(
scrambled_output
[
q
],
rel15
->
modulation_order
,
rel15
->
transport_block_size
,
Qm
,
TBS
,
mod_symbs
[
q
]);
#ifdef DEBUG_DLSCH
printf
(
"PDSCH Modulation: Qm %d()
\n
"
,
Qm
,
n_symbs
);
for
(
int
i
=
0
;
i
<
n_symbs
;
i
++
)
for
(
int
j
=
0
;
j
<
Qm
;
j
++
)
{
printf
(
"%d
\t
%d
\n
"
,
mod_symbs
[
0
][(
i
*
Qm
+
j
)
<<
1
],
mod_symbs
[
0
][((
i
*
Qm
+
j
)
<<
1
)
+
1
]);
}
#endif
/// Layer mapping
nr_pdsch_layer_mapping
(
mod_symbs
,
...
...
@@ -279,7 +297,7 @@ uint8_t nr_generate_pdsch(NR_gNB_DLSCH_t dlsch,
}
#ifdef DEBUG_DLSCH
write_output
(
"txdataF_dlsch.m"
,
"txdataF_dlsch"
,
txdataF
[
0
],
frame_parms
.
samples_per_frame_wCP
>>
1
,
1
,
1
);
write_output
(
"txdataF_dlsch.m"
,
"txdataF_dlsch"
,
txdataF
[
0
],
frame_parms
.
samples_per_
sub
frame_wCP
>>
1
,
1
,
1
);
#endif
return
0
;
...
...
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
View file @
afd34816
...
...
@@ -121,8 +121,8 @@ void nr_get_tbs(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
uint16_t
N_RE_prime
=
NR_NB_SC_PER_RB
*
N_sh_symb
-
N_PRB_DMRS
-
N_PRB_oh
;
LOG_I
(
MAC
,
"N_RE_prime %d for %d symbols %d DMRS per PRB and %d overhead
\n
"
,
N_RE_prime
,
N_sh_symb
,
N_PRB_DMRS
,
N_PRB_oh
);
uint16_t
N_RE
,
Ninfo
,
Ninfo_prime
,
C
,
TBS
;
uint8_t
table_idx
,
R
,
Qm
,
n
,
scale
;
uint16_t
N_RE
,
Ninfo
,
Ninfo_prime
,
C
,
TBS
,
R
;
uint8_t
table_idx
,
Qm
,
n
,
scale
;
table_idx
=
get_table_idx
(
mcs_table
,
dci_format
,
rnti_type
,
ss_type
);
scale
=
10
+
(((
table_idx
==
2
)
&&
((
Imcs
==
20
)
||
(
Imcs
==
26
)))
?
1
:
0
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment