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
常顺宇
OpenXG-RAN
Commits
6e38f754
Commit
6e38f754
authored
Oct 24, 2019
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moving scale inside tbs computation function
parent
f2c5ebd4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
15 additions
and
23 deletions
+15
-23
openair1/PHY/CODING/coding_defs.h
openair1/PHY/CODING/coding_defs.h
+1
-2
openair1/PHY/CODING/nr_compute_tbs.c
openair1/PHY/CODING/nr_compute_tbs.c
+4
-3
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
+2
-4
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+1
-1
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+3
-7
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
+1
-2
openair1/SIMULATION/NR_PHY/dlschsim.c
openair1/SIMULATION/NR_PHY/dlschsim.c
+1
-2
openair1/SIMULATION/NR_PHY/ulschsim.c
openair1/SIMULATION/NR_PHY/ulschsim.c
+1
-1
openair1/SIMULATION/NR_PHY/ulsim.c
openair1/SIMULATION/NR_PHY/ulsim.c
+1
-1
No files found.
openair1/PHY/CODING/coding_defs.h
View file @
6e38f754
...
@@ -463,8 +463,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
...
@@ -463,8 +463,7 @@ uint32_t nr_compute_tbs(uint16_t Qm,
uint16_t
nb_symb_sch
,
uint16_t
nb_symb_sch
,
uint16_t
nb_dmrs_prb
,
uint16_t
nb_dmrs_prb
,
uint16_t
nb_rb_oh
,
uint16_t
nb_rb_oh
,
uint8_t
Nl
,
uint8_t
Nl
);
uint8_t
scale
);
uint32_t
nr_compute_tbslbrm
(
uint16_t
table
,
uint32_t
nr_compute_tbslbrm
(
uint16_t
table
,
uint16_t
nb_rb
,
uint16_t
nb_rb
,
...
...
openair1/PHY/CODING/nr_compute_tbs.c
View file @
6e38f754
...
@@ -37,18 +37,19 @@ uint32_t nr_compute_tbs(uint16_t Qm,
...
@@ -37,18 +37,19 @@ uint32_t nr_compute_tbs(uint16_t Qm,
uint16_t
nb_symb_sch
,
uint16_t
nb_symb_sch
,
uint16_t
nb_dmrs_prb
,
uint16_t
nb_dmrs_prb
,
uint16_t
nb_rb_oh
,
uint16_t
nb_rb_oh
,
uint8_t
Nl
,
uint8_t
Nl
)
uint8_t
scale
)
{
{
uint16_t
nbp_re
,
nb_re
;
uint16_t
nbp_re
,
nb_re
;
uint32_t
nr_tbs
=
0
;
uint32_t
nr_tbs
=
0
;
uint32_t
Ninfo
,
Np_info
,
C
;
uint32_t
Ninfo
,
Np_info
,
C
;
uint8_t
n
;
uint8_t
n
,
scale
;
nbp_re
=
NR_NB_SC_PER_RB
*
nb_symb_sch
-
nb_dmrs_prb
-
nb_rb_oh
;
nbp_re
=
NR_NB_SC_PER_RB
*
nb_symb_sch
-
nb_dmrs_prb
-
nb_rb_oh
;
nb_re
=
min
(
156
,
nbp_re
)
*
nb_rb
;
nb_re
=
min
(
156
,
nbp_re
)
*
nb_rb
;
scale
=
(
R
>
1024
)
?
11
:
10
;
// Intermediate number of information bits
// Intermediate number of information bits
Ninfo
=
(
nb_re
*
R
*
Qm
*
Nl
)
>>
scale
;
Ninfo
=
(
nb_re
*
R
*
Qm
*
Nl
)
>>
scale
;
...
...
openair1/PHY/NR_TRANSPORT/nr_tbs_tools.c
View file @
6e38f754
...
@@ -185,7 +185,7 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
...
@@ -185,7 +185,7 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
LOG_D
(
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
);
LOG_D
(
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
R
,
TBS
=
0
;
uint16_t
R
,
TBS
=
0
;
uint8_t
table_idx
,
Qm
,
scale
;
uint8_t
table_idx
,
Qm
;
/*uint8_t mcs_table = config.pdsch_config.mcs_table.value;
/*uint8_t mcs_table = config.pdsch_config.mcs_table.value;
uint8_t ss_type = params_rel15.search_space_type;
uint8_t ss_type = params_rel15.search_space_type;
...
@@ -194,7 +194,6 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
...
@@ -194,7 +194,6 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
table_idx
=
0
;
table_idx
=
0
;
R
=
nr_get_code_rate_dl
(
Imcs
,
table_idx
);
R
=
nr_get_code_rate_dl
(
Imcs
,
table_idx
);
Qm
=
nr_get_Qm_dl
(
Imcs
,
table_idx
);
Qm
=
nr_get_Qm_dl
(
Imcs
,
table_idx
);
scale
=
((
table_idx
==
1
)
&&
((
Imcs
==
20
)
||
(
Imcs
==
26
)))
?
11
:
10
;
TBS
=
nr_compute_tbs
(
Qm
,
TBS
=
nr_compute_tbs
(
Qm
,
R
,
R
,
...
@@ -202,8 +201,7 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
...
@@ -202,8 +201,7 @@ void nr_get_tbs_dl(nfapi_nr_dl_config_dlsch_pdu *dlsch_pdu,
N_sh_symb
,
N_sh_symb
,
N_PRB_DMRS
,
N_PRB_DMRS
,
N_PRB_oh
,
N_PRB_oh
,
dlsch_rel15
->
nb_layers
,
dlsch_rel15
->
nb_layers
);
scale
);
dlsch_rel15
->
coding_rate
=
R
;
dlsch_rel15
->
coding_rate
=
R
;
dlsch_rel15
->
modulation_order
=
Qm
;
dlsch_rel15
->
modulation_order
=
Qm
;
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
6e38f754
...
@@ -339,7 +339,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
...
@@ -339,7 +339,7 @@ uint32_t nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
}
}
// harq_process->trials[nfapi_ulsch_pdu_rel15->round]++;
// harq_process->trials[nfapi_ulsch_pdu_rel15->round]++;
harq_process
->
TBS
=
nr_compute_tbs
(
Qm
,
R
,
nb_rb
,
number_symbols
,
nb_re_dmrs
*
length_dmrs
,
0
,
n_layers
,
10
);
harq_process
->
TBS
=
nr_compute_tbs
(
Qm
,
R
,
nb_rb
,
number_symbols
,
nb_re_dmrs
*
length_dmrs
,
0
,
n_layers
);
A
=
harq_process
->
TBS
;
A
=
harq_process
->
TBS
;
ret
=
ulsch
->
max_ldpc_iterations
+
1
;
ret
=
ulsch
->
max_ldpc_iterations
+
1
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
6e38f754
...
@@ -299,10 +299,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -299,10 +299,9 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
harq_process
->
trials
[
harq_process
->
round
]
++
;
harq_process
->
trials
[
harq_process
->
round
]
++
;
scale
=
((
harq_process
->
mcs_table
==
1
)
&&
((
harq_process
->
mcs
==
20
)
||
(
harq_process
->
mcs
==
26
)))
?
11
:
10
;
uint16_t
nb_rb_oh
=
0
;
// it was not computed at UE side even before and set to 0 in nr_compute_tbs
uint16_t
nb_rb_oh
=
0
;
// it was not computed at UE side even before and set to 0 in nr_compute_tbs
harq_process
->
TBS
=
nr_compute_tbs
(
harq_process
->
Qm
,
harq_process
->
R
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
nb_rb_oh
,
harq_process
->
Nl
,
scale
);
harq_process
->
TBS
=
nr_compute_tbs
(
harq_process
->
Qm
,
harq_process
->
R
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
nb_rb_oh
,
harq_process
->
Nl
);
A
=
harq_process
->
TBS
;
A
=
harq_process
->
TBS
;
ret
=
dlsch
->
max_ldpc_iterations
+
1
;
ret
=
dlsch
->
max_ldpc_iterations
+
1
;
...
@@ -833,11 +832,9 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -833,11 +832,9 @@ uint32_t nr_dlsch_decoding_mthread(PHY_VARS_NR_UE *phy_vars_ue,
nb_rb
=
harq_process
->
nb_rb
;
nb_rb
=
harq_process
->
nb_rb
;
harq_process
->
trials
[
harq_process
->
round
]
++
;
harq_process
->
trials
[
harq_process
->
round
]
++
;
scale
=
((
harq_process
->
mcs_table
==
1
)
&&
((
harq_process
->
mcs
==
20
)
||
(
harq_process
->
mcs
==
26
)))
?
11
:
10
;
uint16_t
nb_rb_oh
=
0
;
// it was not computed at UE side even before and set to 0 in nr_compute_tbs
uint16_t
nb_rb_oh
=
0
;
// it was not computed at UE side even before and set to 0 in nr_compute_tbs
harq_process
->
TBS
=
nr_compute_tbs
(
harq_process
->
Qm
,
harq_process
->
R
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
nb_rb_oh
,
harq_process
->
Nl
,
scale
);
harq_process
->
TBS
=
nr_compute_tbs
(
harq_process
->
Qm
,
harq_process
->
R
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
nb_rb_oh
,
harq_process
->
Nl
);
A
=
harq_process
->
TBS
;
A
=
harq_process
->
TBS
;
...
@@ -1414,10 +1411,9 @@ void *nr_dlsch_decoding_process(void *arg)
...
@@ -1414,10 +1411,9 @@ void *nr_dlsch_decoding_process(void *arg)
harq_process
->
trials
[
harq_process
->
round
]
++
;
harq_process
->
trials
[
harq_process
->
round
]
++
;
scale
=
((
harq_process
->
mcs_table
==
1
)
&&
((
harq_process
->
mcs
==
20
)
||
(
harq_process
->
mcs
==
26
)))
?
11
:
10
;
uint16_t
nb_rb_oh
=
0
;
// it was not computed at UE side even before and set to 0 in nr_compute_tbs
uint16_t
nb_rb_oh
=
0
;
// it was not computed at UE side even before and set to 0 in nr_compute_tbs
harq_process
->
TBS
=
nr_compute_tbs
(
harq_process
->
Qm
,
harq_process
->
R
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
nb_rb_oh
,
harq_process
->
Nl
,
scale
);
harq_process
->
TBS
=
nr_compute_tbs
(
harq_process
->
Qm
,
harq_process
->
R
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
nb_rb_oh
,
harq_process
->
Nl
);
A
=
harq_process
->
TBS
;
//2072 for QPSK 1/3
A
=
harq_process
->
TBS
;
//2072 for QPSK 1/3
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c
View file @
6e38f754
...
@@ -139,8 +139,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
...
@@ -139,8 +139,7 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE,
harq_process_ul_ue
->
number_of_symbols
,
harq_process_ul_ue
->
number_of_symbols
,
ulsch_ue
->
nb_re_dmrs
*
ulsch_ue
->
length_dmrs
,
ulsch_ue
->
nb_re_dmrs
*
ulsch_ue
->
length_dmrs
,
0
,
0
,
harq_process_ul_ue
->
Nl
,
harq_process_ul_ue
->
Nl
);
10
);
//-----------------------------------------------------//
//-----------------------------------------------------//
// to be removed later when MAC is ready
// to be removed later when MAC is ready
...
...
openair1/SIMULATION/NR_PHY/dlschsim.c
View file @
6e38f754
...
@@ -443,8 +443,7 @@ int main(int argc, char **argv)
...
@@ -443,8 +443,7 @@ int main(int argc, char **argv)
mod_order
=
nr_get_Qm_dl
(
Imcs
,
mcs_table
);
mod_order
=
nr_get_Qm_dl
(
Imcs
,
mcs_table
);
rate
=
nr_get_code_rate_dl
(
Imcs
,
mcs_table
);
rate
=
nr_get_code_rate_dl
(
Imcs
,
mcs_table
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
scale
=
((
mcs_table
==
1
)
&&
((
Imcs
==
20
)
||
(
Imcs
==
26
)))
?
11
:
10
;
TBS
=
nr_compute_tbs
(
mod_order
,
rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
Nl
);
TBS
=
nr_compute_tbs
(
mod_order
,
rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
Nl
,
scale
);
printf
(
"available bits %u TBS %u mod_order %d
\n
"
,
available_bits
,
TBS
,
mod_order
);
printf
(
"available bits %u TBS %u mod_order %d
\n
"
,
available_bits
,
TBS
,
mod_order
);
//dlsch->harq_ids[subframe]= 0;
//dlsch->harq_ids[subframe]= 0;
rel15
->
n_prb
=
nb_rb
;
rel15
->
n_prb
=
nb_rb
;
...
...
openair1/SIMULATION/NR_PHY/ulschsim.c
View file @
6e38f754
...
@@ -389,7 +389,7 @@ int main(int argc, char **argv)
...
@@ -389,7 +389,7 @@ int main(int argc, char **argv)
mod_order
=
nr_get_Qm_ul
(
Imcs
,
0
);
mod_order
=
nr_get_Qm_ul
(
Imcs
,
0
);
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
0
);
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
0
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
TBS
=
nr_compute_tbs
(
mod_order
,
code_rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
Nl
,
10
);
TBS
=
nr_compute_tbs
(
mod_order
,
code_rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
Nl
);
printf
(
"
\n
Available bits %u TBS %u mod_order %d
\n
"
,
available_bits
,
TBS
,
mod_order
);
printf
(
"
\n
Available bits %u TBS %u mod_order %d
\n
"
,
available_bits
,
TBS
,
mod_order
);
...
...
openair1/SIMULATION/NR_PHY/ulsim.c
View file @
6e38f754
...
@@ -415,7 +415,7 @@ int main(int argc, char **argv)
...
@@ -415,7 +415,7 @@ int main(int argc, char **argv)
mod_order
=
nr_get_Qm_ul
(
Imcs
,
0
);
mod_order
=
nr_get_Qm_ul
(
Imcs
,
0
);
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
0
);
code_rate
=
nr_get_code_rate_ul
(
Imcs
,
0
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
available_bits
=
nr_get_G
(
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
,
length_dmrs
,
mod_order
,
1
);
TBS
=
nr_compute_tbs
(
mod_order
,
code_rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
precod_nbr_layers
,
10
);
TBS
=
nr_compute_tbs
(
mod_order
,
code_rate
,
nb_rb
,
nb_symb_sch
,
nb_re_dmrs
*
length_dmrs
,
0
,
precod_nbr_layers
);
NR_gNB_ULSCH_t
*
ulsch_gNB
=
gNB
->
ulsch
[
UE_id
+
1
][
0
];
NR_gNB_ULSCH_t
*
ulsch_gNB
=
gNB
->
ulsch
[
UE_id
+
1
][
0
];
nfapi_nr_ul_config_ulsch_pdu
*
rel15_ul
=
&
ulsch_gNB
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
nfapi_nr_ul_config_ulsch_pdu
*
rel15_ul
=
&
ulsch_gNB
->
harq_processes
[
harq_pid
]
->
ulsch_pdu
;
...
...
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