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
zzha zzha
OpenXG-RAN
Commits
18e51299
Commit
18e51299
authored
Sep 10, 2021
by
Eurecom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor changes for testing
parent
f2cd6501
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
125 additions
and
89 deletions
+125
-89
openair1/PHY/NR_TRANSPORT/nr_dci.c
openair1/PHY/NR_TRANSPORT/nr_dci.c
+1
-0
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+13
-13
openair1/SIMULATION/NR_PHY/dlsim.c
openair1/SIMULATION/NR_PHY/dlsim.c
+7
-4
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+39
-34
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+10
-6
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+51
-28
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+1
-2
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+1
-0
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
+1
-1
No files found.
openair1/PHY/NR_TRANSPORT/nr_dci.c
View file @
18e51299
...
@@ -184,6 +184,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
...
@@ -184,6 +184,7 @@ void nr_generate_dci(PHY_VARS_gNB *gNB,
/*Mapping the encoded DCI along with the DMRS */
/*Mapping the encoded DCI along with the DMRS */
for
(
int
symbol_idx
=
0
;
symbol_idx
<
pdcch_pdu_rel15
->
DurationSymbols
;
symbol_idx
++
)
{
for
(
int
symbol_idx
=
0
;
symbol_idx
<
pdcch_pdu_rel15
->
DurationSymbols
;
symbol_idx
++
)
{
int
re_idx
=
0
;
for
(
int
cce_count
=
0
;
cce_count
<
dci_pdu
->
AggregationLevel
;
cce_count
+=
pdcch_pdu_rel15
->
DurationSymbols
)
{
for
(
int
cce_count
=
0
;
cce_count
<
dci_pdu
->
AggregationLevel
;
cce_count
+=
pdcch_pdu_rel15
->
DurationSymbols
)
{
int8_t
cce_idx
=
reg_list_order
[
cce_count
];
int8_t
cce_idx
=
reg_list_order
[
cce_count
];
...
...
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
18e51299
...
@@ -148,7 +148,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
...
@@ -148,7 +148,7 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
}
}
int
f_bundle_j_list
[
NR_MAX_PDCCH_AGG_LEVEL
]
=
{};
int
f_bundle_j_list
[
(
2
*
NR_MAX_PDCCH_AGG_LEVEL
)
-
1
]
=
{};
for
(
int
reg
=
0
;
reg
<
coreset_nbr_rb
;
reg
++
)
{
for
(
int
reg
=
0
;
reg
<
coreset_nbr_rb
;
reg
++
)
{
if
((
reg
%
reg_bundle_size_L
)
==
0
)
{
if
((
reg
%
reg_bundle_size_L
)
==
0
)
{
...
@@ -170,12 +170,14 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
...
@@ -170,12 +170,14 @@ void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
// Get cce_list indices by reg_idx in ascending order
// Get cce_list indices by reg_idx in ascending order
int
f_bundle_j_list_id
=
0
;
int
f_bundle_j_list_id
=
0
;
int
f_bundle_j_list_ord
[
NR_MAX_PDCCH_AGG_LEVEL
]
=
{};
int
f_bundle_j_list_ord
[
(
2
*
NR_MAX_PDCCH_AGG_LEVEL
)
-
1
]
=
{};
for
(
int
c_id
=
0
;
c_id
<
number_of_candidates
;
c_id
++
)
{
for
(
int
c_id
=
0
;
c_id
<
number_of_candidates
;
c_id
++
)
{
f_bundle_j_list_id
=
CCE
[
c_id
];
f_bundle_j_list_id
=
CCE
[
c_id
];
for
(
int
p
=
0
;
p
<
NR_MAX_PDCCH_AGG_LEVEL
;
p
++
)
{
for
(
int
p
=
0
;
p
<
NR_MAX_PDCCH_AGG_LEVEL
;
p
++
)
{
for
(
int
p2
=
CCE
[
c_id
];
p2
<
CCE
[
c_id
]
+
L
[
c_id
];
p2
++
)
{
for
(
int
p2
=
CCE
[
c_id
];
p2
<
CCE
[
c_id
]
+
L
[
c_id
];
p2
++
)
{
AssertFatal
(
p2
<
2
*
NR_MAX_PDCCH_AGG_LEVEL
,
"number_of_candidates %d : p2 %d, CCE[%d] %d, L[%d] %d
\n
"
,
number_of_candidates
,
p2
,
c_id
,
CCE
[
c_id
],
c_id
,
L
[
c_id
]);
if
(
f_bundle_j_list
[
p2
]
==
p
)
{
if
(
f_bundle_j_list
[
p2
]
==
p
)
{
AssertFatal
(
f_bundle_j_list_id
<
2
*
NR_MAX_PDCCH_AGG_LEVEL
,
"f_bundle_j_list_id %d
\n
"
,
f_bundle_j_list_id
);
f_bundle_j_list_ord
[
f_bundle_j_list_id
]
=
p
;
f_bundle_j_list_ord
[
f_bundle_j_list_id
]
=
p
;
f_bundle_j_list_id
++
;
f_bundle_j_list_id
++
;
break
;
break
;
...
@@ -413,7 +415,6 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
...
@@ -413,7 +415,6 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
* we have to point the pointer at (1+c_rb-N_RB_DL/2) in rxdataF
* we have to point the pointer at (1+c_rb-N_RB_DL/2) in rxdataF
*/
*/
LOG_DDD
(
"n_BWP_start=%d, coreset_nbr_rb=%d
\n
"
,
n_BWP_start
,
coreset_nbr_rb
);
int
c_rb_by6
;
int
c_rb_by6
;
c_rb
=
0
;
c_rb
=
0
;
for
(
int
rb
=
0
;
rb
<
coreset_nbr_rb
;
rb
++
,
c_rb
++
)
{
for
(
int
rb
=
0
;
rb
<
coreset_nbr_rb
;
rb
++
,
c_rb
++
)
{
...
@@ -425,7 +426,6 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
...
@@ -425,7 +426,6 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
c_rb_by6
=
c_rb
/
6
;
c_rb_by6
=
c_rb
/
6
;
}
}
LOG_DDD
(
"c_rb=%d
\n
"
,
c_rb
);
rxF
=
NULL
;
rxF
=
NULL
;
// first we set initial conditions for pointer to rxdataF depending on the situation of the first RB within the CORESET (c_rb = n_BWP_start)
// first we set initial conditions for pointer to rxdataF depending on the situation of the first RB within the CORESET (c_rb = n_BWP_start)
...
@@ -547,6 +547,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
...
@@ -547,6 +547,7 @@ void nr_pdcch_extract_rbs_single(int32_t **rxdataF,
#endif
#endif
#define print_shorts(s,x) printf("%s %d,%d,%d,%d,%d,%d,%d,%d\n",s,(x)[0],(x)[1],(x)[2],(x)[3],(x)[4],(x)[5],(x)[6],(x)[7])
void
nr_pdcch_channel_compensation
(
int32_t
**
rxdataF_ext
,
void
nr_pdcch_channel_compensation
(
int32_t
**
rxdataF_ext
,
int32_t
**
dl_ch_estimates_ext
,
int32_t
**
dl_ch_estimates_ext
,
...
@@ -581,16 +582,15 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext,
...
@@ -581,16 +582,15 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext,
#endif
#endif
for
(
rb
=
0
;
rb
<
(
coreset_nbr_rb
*
3
)
>>
2
;
rb
++
)
{
for
(
rb
=
0
;
rb
<
(
coreset_nbr_rb
*
3
)
>>
2
;
rb
++
)
{
//printf("rb %d\n",rb);
#if defined(__x86_64__) || defined(__i386__)
#if defined(__x86_64__) || defined(__i386__)
// multiply by conjugated channel
// multiply by conjugated channel
mmtmpP0
=
_mm_madd_epi16
(
dl_ch128
[
0
],
rxdataF128
[
0
]);
mmtmpP0
=
_mm_madd_epi16
(
dl_ch128
[
0
],
rxdataF128
[
0
]);
//
print_ints("re",&mmtmpP0);
//print_ints("re",&mmtmpP0);
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
mmtmpP1
=
_mm_shufflelo_epi16
(
dl_ch128
[
0
],
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpP1
=
_mm_shufflelo_epi16
(
dl_ch128
[
0
],
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpP1
=
_mm_shufflehi_epi16
(
mmtmpP1
,
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpP1
=
_mm_shufflehi_epi16
(
mmtmpP1
,
_MM_SHUFFLE
(
2
,
3
,
0
,
1
));
mmtmpP1
=
_mm_sign_epi16
(
mmtmpP1
,
*
(
__m128i
*
)
&
conjugate
[
0
]);
mmtmpP1
=
_mm_sign_epi16
(
mmtmpP1
,
*
(
__m128i
*
)
&
conjugate
[
0
]);
//
print_ints("im",&mmtmpP1);
//print_ints("im",&mmtmpP1);
mmtmpP1
=
_mm_madd_epi16
(
mmtmpP1
,
rxdataF128
[
0
]);
mmtmpP1
=
_mm_madd_epi16
(
mmtmpP1
,
rxdataF128
[
0
]);
// mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
// mmtmpP1 contains imag part of 4 consecutive outputs (32-bit)
mmtmpP0
=
_mm_srai_epi32
(
mmtmpP0
,
output_shift
);
mmtmpP0
=
_mm_srai_epi32
(
mmtmpP0
,
output_shift
);
...
@@ -599,12 +599,12 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext,
...
@@ -599,12 +599,12 @@ void nr_pdcch_channel_compensation(int32_t **rxdataF_ext,
// print_ints("im(shift)",&mmtmpP1);
// print_ints("im(shift)",&mmtmpP1);
mmtmpP2
=
_mm_unpacklo_epi32
(
mmtmpP0
,
mmtmpP1
);
mmtmpP2
=
_mm_unpacklo_epi32
(
mmtmpP0
,
mmtmpP1
);
mmtmpP3
=
_mm_unpackhi_epi32
(
mmtmpP0
,
mmtmpP1
);
mmtmpP3
=
_mm_unpackhi_epi32
(
mmtmpP0
,
mmtmpP1
);
//
print_ints("c0",&mmtmpP2);
//print_ints("c0",&mmtmpP2);
//
print_ints("c1",&mmtmpP3);
//print_ints("c1",&mmtmpP3);
rxdataF_comp128
[
0
]
=
_mm_packs_epi32
(
mmtmpP2
,
mmtmpP3
);
rxdataF_comp128
[
0
]
=
_mm_packs_epi32
(
mmtmpP2
,
mmtmpP3
);
//print_shorts("rx:",
rxdataF128);
// print_shorts("rx:",(int16_t*)
rxdataF128);
//print_shorts("ch:",
dl_ch128);
// print_shorts("ch:",(int16_t*)
dl_ch128);
//print_shorts("pack:",
rxdataF_comp128);
// print_shorts("pack:",(int16_t*)
rxdataF_comp128);
// multiply by conjugated channel
// multiply by conjugated channel
mmtmpP0
=
_mm_madd_epi16
(
dl_ch128
[
1
],
rxdataF128
[
1
]);
mmtmpP0
=
_mm_madd_epi16
(
dl_ch128
[
1
],
rxdataF128
[
1
]);
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
// mmtmpP0 contains real part of 4 consecutive outputs (32-bit)
...
@@ -800,7 +800,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
...
@@ -800,7 +800,7 @@ int32_t nr_rx_pdcch(PHY_VARS_NR_UE *ue,
#endif
#endif
}
}
LOG_D
(
PHY
,
"we enter nr_pdcch_demapping_deinterleaving()
\n
"
);
LOG_D
(
PHY
,
"we enter nr_pdcch_demapping_deinterleaving()
, number of candidates %d
\n
"
,
rel15
->
number_of_candidates
);
nr_pdcch_demapping_deinterleaving
((
uint32_t
*
)
pdcch_vars
->
llr
,
nr_pdcch_demapping_deinterleaving
((
uint32_t
*
)
pdcch_vars
->
llr
,
(
uint32_t
*
)
pdcch_vars
->
e_rx
,
(
uint32_t
*
)
pdcch_vars
->
e_rx
,
rel15
->
coreset
.
duration
,
rel15
->
coreset
.
duration
,
...
...
openair1/SIMULATION/NR_PHY/dlsim.c
View file @
18e51299
...
@@ -261,8 +261,8 @@ void nr_dlsim_preprocessor(module_id_t module_id,
...
@@ -261,8 +261,8 @@ void nr_dlsim_preprocessor(module_id_t module_id,
uint8_t
nr_of_candidates
;
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
&
nr_of_candidates
,
&
nr_of_candidates
,
sched_ctrl
->
search_space
);
sched_ctrl
->
search_space
,
4
);
sched_ctrl
->
coreset
=
get_coreset
(
scc
,
sched_ctrl
->
active_bwp
,
sched_ctrl
->
search_space
,
target_ss
);
sched_ctrl
->
coreset
=
get_coreset
(
scc
,
sched_ctrl
->
active_bwp
->
bwp_Dedicated
,
sched_ctrl
->
search_space
,
target_ss
);
sched_ctrl
->
cce_index
=
0
;
sched_ctrl
->
cce_index
=
0
;
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
NR_pdsch_semi_static_t
*
ps
=
&
sched_ctrl
->
pdsch_semi_static
;
...
@@ -270,6 +270,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
...
@@ -270,6 +270,7 @@ void nr_dlsim_preprocessor(module_id_t module_id,
nr_set_pdsch_semi_static
(
scc
,
nr_set_pdsch_semi_static
(
scc
,
UE_info
->
CellGroup
[
0
],
UE_info
->
CellGroup
[
0
],
sched_ctrl
->
active_bwp
,
sched_ctrl
->
active_bwp
,
NULL
,
/* tda = */
2
,
/* tda = */
2
,
/* num_dmrs_cdm_grps_no_data = */
1
,
/* num_dmrs_cdm_grps_no_data = */
1
,
ps
);
ps
);
...
@@ -779,9 +780,9 @@ int main(int argc, char **argv)
...
@@ -779,9 +780,9 @@ int main(int argc, char **argv)
AssertFatal
((
gNB
->
if_inst
=
NR_IF_Module_init
(
0
))
!=
NULL
,
"Cannot register interface"
);
AssertFatal
((
gNB
->
if_inst
=
NR_IF_Module_init
(
0
))
!=
NULL
,
"Cannot register interface"
);
gNB
->
if_inst
->
NR_PHY_config_req
=
nr_phy_config_request
;
gNB
->
if_inst
->
NR_PHY_config_req
=
nr_phy_config_request
;
// common configuration
// common configuration
rrc_mac_config_req_gNB
(
0
,
0
,
n_tx
,
n_tx
,
scc
,
NULL
,
0
,
0
,
NULL
);
rrc_mac_config_req_gNB
(
0
,
0
,
n_tx
,
n_tx
,
0
,
scc
,
NULL
,
0
,
0
,
NULL
);
// UE dedicated configuration
// UE dedicated configuration
rrc_mac_config_req_gNB
(
0
,
0
,
n_tx
,
n_tx
,
scc
,
NULL
,
1
,
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
,
secondaryCellGroup
);
rrc_mac_config_req_gNB
(
0
,
0
,
n_tx
,
n_tx
,
0
,
scc
,
NULL
,
1
,
secondaryCellGroup
->
spCellConfig
->
reconfigurationWithSync
->
newUE_Identity
,
secondaryCellGroup
);
// reset preprocessor to the one of DLSIM after it has been set during
// reset preprocessor to the one of DLSIM after it has been set during
// rrc_mac_config_req_gNB
// rrc_mac_config_req_gNB
gNB_mac
->
pre_processor_dl
=
nr_dlsim_preprocessor
;
gNB_mac
->
pre_processor_dl
=
nr_dlsim_preprocessor
;
...
@@ -1323,6 +1324,8 @@ int main(int argc, char **argv)
...
@@ -1323,6 +1324,8 @@ int main(int argc, char **argv)
LOG_M
(
"chestF0.m"
,
"chF0"
,
&
UE
->
pdsch_vars
[
0
][
0
]
->
dl_ch_estimates_ext
[
0
][
0
],
g_rbSize
*
12
*
14
,
1
,
1
);
LOG_M
(
"chestF0.m"
,
"chF0"
,
&
UE
->
pdsch_vars
[
0
][
0
]
->
dl_ch_estimates_ext
[
0
][
0
],
g_rbSize
*
12
*
14
,
1
,
1
);
write_output
(
"rxF_comp.m"
,
"rxFc"
,
&
UE
->
pdsch_vars
[
0
][
0
]
->
rxdataF_comp0
[
0
][
0
],
N_RB_DL
*
12
*
14
,
1
,
1
);
write_output
(
"rxF_comp.m"
,
"rxFc"
,
&
UE
->
pdsch_vars
[
0
][
0
]
->
rxdataF_comp0
[
0
][
0
],
N_RB_DL
*
12
*
14
,
1
,
1
);
LOG_M
(
"rxF_llr.m"
,
"rxFllr"
,
UE
->
pdsch_vars
[
UE_proc
.
thread_id
][
0
]
->
llr
[
0
],
available_bits
,
1
,
0
);
LOG_M
(
"rxF_llr.m"
,
"rxFllr"
,
UE
->
pdsch_vars
[
UE_proc
.
thread_id
][
0
]
->
llr
[
0
],
available_bits
,
1
,
0
);
LOG_M
(
"pdcch_rxFcomp.m"
,
"pdcch_rxFcomp"
,
&
UE
->
pdcch_vars
[
0
][
0
]
->
rxdataF_comp
[
0
][
0
],
96
*
12
,
1
,
1
);
LOG_M
(
"pdcch_rxFllr.m"
,
"pdcch_rxFllr"
,
UE
->
pdcch_vars
[
0
][
0
]
->
llr
,
96
*
12
,
1
,
1
);
break
;
break
;
}
}
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
18e51299
...
@@ -1287,36 +1287,41 @@ int64_t *get_prach_config_info(frequency_range_t freq_range,
...
@@ -1287,36 +1287,41 @@ int64_t *get_prach_config_info(frequency_range_t freq_range,
void
find_aggregation_candidates
(
uint8_t
*
aggregation_level
,
void
find_aggregation_candidates
(
uint8_t
*
aggregation_level
,
uint8_t
*
nr_of_candidates
,
uint8_t
*
nr_of_candidates
,
NR_SearchSpace_t
*
ss
,
NR_SearchSpace_t
*
ss
,
int
maxL
)
{
int
L
)
{
AssertFatal
(
maxL
>=
1
,
"maxL %d not ok
\n
"
,
maxL
);
AssertFatal
(
L
>=
1
&&
L
<=
16
,
"L %d not ok
\n
"
,
L
);
if
(
ss
->
nrofCandidates
->
aggregationLevel1
!=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
)
{
*
nr_of_candidates
=
0
;
*
aggregation_level
=
1
;
switch
(
L
)
{
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel1
;
case
1
:
}
if
(
ss
->
nrofCandidates
->
aggregationLevel1
!=
NR_SearchSpace__nrofCandidates__aggregationLevel1_n0
)
{
if
(
maxL
==
1
)
return
;
*
aggregation_level
=
1
;
if
(
ss
->
nrofCandidates
->
aggregationLevel2
!=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
)
{
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel1
;
*
aggregation_level
=
2
;
}
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel2
;
break
;
}
case
2
:
if
(
maxL
==
2
)
return
;
if
(
ss
->
nrofCandidates
->
aggregationLevel2
!=
NR_SearchSpace__nrofCandidates__aggregationLevel2_n0
)
{
if
(
ss
->
nrofCandidates
->
aggregationLevel4
!=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
)
{
*
aggregation_level
=
2
;
*
aggregation_level
=
4
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel2
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel4
;
}
}
break
;
if
(
maxL
==
4
)
return
;
case
4
:
if
(
ss
->
nrofCandidates
->
aggregationLevel8
!=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
)
{
if
(
ss
->
nrofCandidates
->
aggregationLevel4
!=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
)
{
*
aggregation_level
=
8
;
*
aggregation_level
=
4
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel8
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel4
;
}
}
if
(
maxL
==
8
)
return
;
break
;
case
8
:
if
(
ss
->
nrofCandidates
->
aggregationLevel16
!=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
)
{
if
(
ss
->
nrofCandidates
->
aggregationLevel8
!=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
)
{
*
aggregation_level
=
16
;
*
aggregation_level
=
8
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel16
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel8
;
}
}
// n8 does not correspont to a value of 8 but 7, the following corrects this
break
;
if
(
*
nr_of_candidates
==
7
)
case
16
:
*
nr_of_candidates
=
8
;
if
(
ss
->
nrofCandidates
->
aggregationLevel16
!=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
)
{
*
aggregation_level
=
16
;
*
nr_of_candidates
=
ss
->
nrofCandidates
->
aggregationLevel16
;
}
break
;
}
}
}
...
@@ -4065,15 +4070,15 @@ uint8_t fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t
...
@@ -4065,15 +4070,15 @@ uint8_t fill_searchSpaceZero(NR_SearchSpace_t *ss0, NR_Type0_PDCCH_CSS_config_t
case
4
:
case
4
:
ss0
->
nrofCandidates
->
aggregationLevel4
=
(((
max_agg
>>
2
)
>
4
)
?
4
:
max_agg
>>
2
);
ss0
->
nrofCandidates
->
aggregationLevel4
=
(((
max_agg
>>
2
)
>
4
)
?
4
:
max_agg
>>
2
);
ss0
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss0
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss0
->
nrofCandidates
->
aggregationLevel
8
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
ss0
->
nrofCandidates
->
aggregationLevel
16
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
break
;
break
;
case
8
:
case
8
:
ss0
->
nrofCandidates
->
aggregationLevel
8
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
;
ss0
->
nrofCandidates
->
aggregationLevel
4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
;
ss0
->
nrofCandidates
->
aggregationLevel8
=
(((
max_agg
>>
3
)
>
2
)
?
2
:
max_agg
>>
3
);
ss0
->
nrofCandidates
->
aggregationLevel8
=
(((
max_agg
>>
3
)
>
2
)
?
2
:
max_agg
>>
3
);
ss0
->
nrofCandidates
->
aggregationLevel
8
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
ss0
->
nrofCandidates
->
aggregationLevel
16
=
NR_SearchSpace__nrofCandidates__aggregationLevel16_n0
;
break
;
break
;
case
16
:
case
16
:
ss0
->
nrofCandidates
->
aggregationLevel
8
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
;
ss0
->
nrofCandidates
->
aggregationLevel
4
=
NR_SearchSpace__nrofCandidates__aggregationLevel4_n0
;
ss0
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss0
->
nrofCandidates
->
aggregationLevel8
=
NR_SearchSpace__nrofCandidates__aggregationLevel8_n0
;
ss0
->
nrofCandidates
->
aggregationLevel16
=
(((
max_agg
>>
4
)
>
1
)
?
1
:
max_agg
>>
4
);
ss0
->
nrofCandidates
->
aggregationLevel16
=
(((
max_agg
>>
4
)
>
1
)
?
1
:
max_agg
>>
4
);
break
;
break
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
18e51299
...
@@ -51,20 +51,24 @@
...
@@ -51,20 +51,24 @@
void
fill_dci_search_candidates
(
NR_SearchSpace_t
*
ss
,
fapi_nr_dl_config_dci_dl_pdu_rel15_t
*
rel15
)
{
void
fill_dci_search_candidates
(
NR_SearchSpace_t
*
ss
,
fapi_nr_dl_config_dci_dl_pdu_rel15_t
*
rel15
)
{
LOG_D
(
MAC
,
"Filling search candidates for DCI
\n
"
);
LOG_D
(
NR_
MAC
,
"Filling search candidates for DCI
\n
"
);
uint8_t
aggregation
;
uint8_t
aggregation
;
uint8_t
number_of_candidates
=
0
;
uint8_t
number_of_candidates
=
0
;
int
i
=
0
;
int
i
=
0
;
for
(
int
maxL
=
16
;
maxL
>
0
;
maxL
>>
1
)
{
rel15
->
number_of_candidates
=
0
;
for
(
int
maxL
=
16
;
maxL
>
0
;
maxL
>>=
1
)
{
find_aggregation_candidates
(
&
aggregation
,
find_aggregation_candidates
(
&
aggregation
,
&
number_of_candidates
,
&
number_of_candidates
,
ss
,
maxL
);
ss
,
maxL
);
rel15
->
number_of_candidates
+=
number_of_candidates
;
if
(
number_of_candidates
>
0
)
{
for
(;
i
<
rel15
->
number_of_candidates
;
i
++
)
{
LOG_D
(
NR_MAC
,
"L %d, number of candidates %d, aggregation %d
\n
"
,
maxL
,
number_of_candidates
,
aggregation
);
rel15
->
CCE
[
i
]
=
i
*
aggregation
;
rel15
->
number_of_candidates
+=
number_of_candidates
;
rel15
->
L
[
i
]
=
aggregation
;
for
(;
i
<
rel15
->
number_of_candidates
;
i
++
)
{
rel15
->
CCE
[
i
]
=
i
*
aggregation
;
rel15
->
L
[
i
]
=
aggregation
;
}
}
}
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_bch.c
View file @
18e51299
...
@@ -349,7 +349,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
...
@@ -349,7 +349,7 @@ uint32_t schedule_control_sib1(module_id_t module_id,
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
=
num_total_bytes
;
gNB_mac
->
sched_ctrlCommon
->
num_total_bytes
=
num_total_bytes
;
uint8_t
nr_of_candidates
;
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
gNB_mac
->
sched_ctrlCommon
->
aggregation_level
,
&
nr_of_candidates
,
gNB_mac
->
sched_ctrlCommon
->
search_space
,
8
);
find_aggregation_candidates
(
&
gNB_mac
->
sched_ctrlCommon
->
aggregation_level
,
&
nr_of_candidates
,
gNB_mac
->
sched_ctrlCommon
->
search_space
,
4
);
AssertFatal
(
nr_of_candidates
>
0
,
"nr_of_candidates is 0
\n
"
);
AssertFatal
(
nr_of_candidates
>
0
,
"nr_of_candidates is 0
\n
"
);
gNB_mac
->
sched_ctrlCommon
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
gNB_mac
->
sched_ctrlCommon
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
NULL
,
NULL
,
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
18e51299
...
@@ -56,7 +56,6 @@
...
@@ -56,7 +56,6 @@
#define HALFWORD 16
#define HALFWORD 16
#define WORD 32
#define WORD 32
//#define SIZE_OF_POINTER sizeof (void *)
//#define SIZE_OF_POINTER sizeof (void *)
static
int
loop_dcch_dtch
=
DL_SCH_LCID_DTCH
;
void
calculate_preferred_dl_tda
(
module_id_t
module_id
,
const
NR_BWP_Downlink_t
*
bwp
)
void
calculate_preferred_dl_tda
(
module_id_t
module_id
,
const
NR_BWP_Downlink_t
*
bwp
)
{
{
...
@@ -396,39 +395,63 @@ void nr_store_dlsch_buffer(module_id_t module_id,
...
@@ -396,39 +395,63 @@ void nr_store_dlsch_buffer(module_id_t module_id,
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
sched_ctrl
->
num_total_bytes
=
0
;
sched_ctrl
->
num_total_bytes
=
0
;
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
4
))
>
0
&&
loop_dcch_dtch
==
DL_SCH_LCID_DCCH1
)
loop_dcch_dtch
=
DL_SCH_LCID_DTCH
;
int
lcid
;
else
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
1
))
>
0
&&
loop_dcch_dtch
==
DL_SCH_LCID_DTCH
)
loop_dcch_dtch
=
DL_SCH_LCID_DCCH
;
else
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
2
))
>
0
&&
loop_dcch_dtch
==
DL_SCH_LCID_DCCH
)
loop_dcch_dtch
=
DL_SCH_LCID_DCCH1
;
const
int
lcid
=
loop_dcch_dtch
;
// const int lcid = DL_SCH_LCID_DTCH;
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
const
uint16_t
rnti
=
UE_info
->
rnti
[
UE_id
];
sched_ctrl
->
rlc_status
[
lcid
]
=
mac_rlc_status_ind
(
module_id
,
LOG_I
(
NR_MAC
,
"UE %d/%x : lcid_mask %x
\n
"
,
UE_id
,
rnti
,
sched_ctrl
->
lcid_mask
);
rnti
,
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
2
))
>
0
)
module_id
,
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH1
]
=
mac_rlc_status_ind
(
module_id
,
frame
,
rnti
,
slot
,
module_id
,
ENB_FLAG_YES
,
frame
,
MBMS_FLAG_NO
,
slot
,
lcid
,
ENB_FLAG_YES
,
0
,
MBMS_FLAG_NO
,
0
);
DL_SCH_LCID_DCCH1
,
0
,
0
);
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
1
))
>
0
)
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
module_id
,
frame
,
slot
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
DL_SCH_LCID_DCCH
,
0
,
0
);
if
((
sched_ctrl
->
lcid_mask
&
(
1
<<
4
))
>
0
)
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DTCH
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
module_id
,
frame
,
slot
,
ENB_FLAG_YES
,
MBMS_FLAG_NO
,
DL_SCH_LCID_DTCH
,
0
,
0
);
if
(
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH
].
bytes_in_buffer
>
0
){
lcid
=
DL_SCH_LCID_DCCH
;
}
else
if
(
sched_ctrl
->
rlc_status
[
DL_SCH_LCID_DCCH1
].
bytes_in_buffer
>
0
)
{
lcid
=
DL_SCH_LCID_DCCH1
;
}
else
{
lcid
=
DL_SCH_LCID_DTCH
;
}
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
sched_ctrl
->
num_total_bytes
+=
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
;
LOG_D
(
NR_MAC
,
//later multiplex here. Just select DCCH/SRB before DTCH/DRB
"%d.%d, LCID%d:->DLSCH, RLC status %d bytes.
\n
"
,
sched_ctrl
->
lcid_to_schedule
=
lcid
;
frame
,
slot
,
lcid
,
sched_ctrl
->
num_total_bytes
);
if
(
sched_ctrl
->
num_total_bytes
==
0
if
(
sched_ctrl
->
num_total_bytes
==
0
&&
!
sched_ctrl
->
ta_apply
)
/* If TA should be applied, give at least one RB */
&&
!
sched_ctrl
->
ta_apply
)
/* If TA should be applied, give at least one RB */
return
;
return
;
LOG_
D
(
NR_MAC
,
LOG_
I
(
NR_MAC
,
"[%s][%d.%d], %s%d->DLSCH, RLC status %d bytes TA %d
\n
"
,
"[%s][%d.%d], %s%d->DLSCH, RLC status %d bytes TA %d
\n
"
,
__func__
,
__func__
,
frame
,
frame
,
...
@@ -1141,7 +1164,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -1141,7 +1164,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
/* next, get RLC data */
/* next, get RLC data */
// const int lcid = DL_SCH_LCID_DTCH;
// const int lcid = DL_SCH_LCID_DTCH;
const
int
lcid
=
loop_dcch_dtch
;
const
int
lcid
=
sched_ctrl
->
lcid_to_schedule
;
int
dlsch_total_bytes
=
0
;
int
dlsch_total_bytes
=
0
;
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
if
(
sched_ctrl
->
num_total_bytes
>
0
)
{
tbs_size_t
len
=
0
;
tbs_size_t
len
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
18e51299
...
@@ -923,7 +923,6 @@ bool allocate_ul_retransmission(module_id_t module_id,
...
@@ -923,7 +923,6 @@ bool allocate_ul_retransmission(module_id_t module_id,
const
uint8_t
num_dmrs_cdm_grps_no_data
=
(
sched_ctrl
->
active_bwp
||
ubwpd
)
?
1
:
2
;
const
uint8_t
num_dmrs_cdm_grps_no_data
=
(
sched_ctrl
->
active_bwp
||
ubwpd
)
?
1
:
2
;
const
int
tda
=
sched_ctrl
->
active_ubwp
?
RC
.
nrmac
[
module_id
]
->
preferred_ul_tda
[
sched_ctrl
->
active_ubwp
->
bwp_Id
][
slot
]
:
0
;
const
int
tda
=
sched_ctrl
->
active_ubwp
?
RC
.
nrmac
[
module_id
]
->
preferred_ul_tda
[
sched_ctrl
->
active_ubwp
->
bwp_Id
][
slot
]
:
0
;
LOG_D
(
NR_MAC
,
"retInfo->time_domain_allocation = %d, tda = %d
\n
"
,
retInfo
->
time_domain_allocation
,
tda
);
LOG_D
(
NR_MAC
,
"retInfo->time_domain_allocation = %d, tda = %d
\n
"
,
retInfo
->
time_domain_allocation
,
tda
);
printf
(
"num_dmrs_cdm_grps_no_data %d, tbs %d
\n
"
,
num_dmrs_cdm_grps_no_data
,
retInfo
->
tb_size
);
if
(
tda
==
retInfo
->
time_domain_allocation
)
{
if
(
tda
==
retInfo
->
time_domain_allocation
)
{
/* Check the resource is enough for retransmission */
/* Check the resource is enough for retransmission */
while
(
rbStart
<
bwpSize
&&
!
rballoc_mask
[
rbStart
])
while
(
rbStart
<
bwpSize
&&
!
rballoc_mask
[
rbStart
])
...
@@ -1039,7 +1038,7 @@ void pf_ul(module_id_t module_id,
...
@@ -1039,7 +1038,7 @@ void pf_ul(module_id_t module_id,
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
module_id
];
gNB_MAC_INST
*
nrmac
=
RC
.
nrmac
[
module_id
];
NR_ServingCellConfigCommon_t
*
scc
=
nrmac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
NR_ServingCellConfigCommon_t
*
scc
=
nrmac
->
common_channels
[
CC_id
].
ServingCellConfigCommon
;
NR_UE_info_t
*
UE_info
=
&
nrmac
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
nrmac
->
UE_info
;
const
int
min_rb
=
5
;
const
int
min_rb
=
40
;
float
coeff_ue
[
MAX_MOBILES_PER_GNB
];
float
coeff_ue
[
MAX_MOBILES_PER_GNB
];
// UEs that could be scheduled
// UEs that could be scheduled
int
ue_array
[
MAX_MOBILES_PER_GNB
];
int
ue_array
[
MAX_MOBILES_PER_GNB
];
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
18e51299
...
@@ -565,6 +565,7 @@ typedef struct {
...
@@ -565,6 +565,7 @@ typedef struct {
mac_rlc_status_resp_t
rlc_status
[
MAX_NUM_LCID
];
mac_rlc_status_resp_t
rlc_status
[
MAX_NUM_LCID
];
int
lcid_mask
;
int
lcid_mask
;
int
lcid_to_schedule
;
uint16_t
ta_frame
;
uint16_t
ta_frame
;
int16_t
ta_update
;
int16_t
ta_update
;
bool
ta_apply
;
bool
ta_apply
;
...
...
openair2/LAYER2/nr_rlc/nr_rlc_oai_api.c
View file @
18e51299
...
@@ -460,7 +460,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
...
@@ -460,7 +460,7 @@ static void deliver_sdu(void *_ue, nr_rlc_entity_t *entity, char *buf, int size)
exit
(
1
);
exit
(
1
);
rb_found:
rb_found:
LOG_
D
(
RLC
,
"%s:%d:%s: delivering SDU (rnti %d is_srb %d rb_id %d) size %d
\n
"
,
LOG_
I
(
RLC
,
"%s:%d:%s: delivering SDU (rnti %d is_srb %d rb_id %d) size %d
\n
"
,
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rnti
,
is_srb
,
rb_id
,
size
);
__FILE__
,
__LINE__
,
__FUNCTION__
,
ue
->
rnti
,
is_srb
,
rb_id
,
size
);
memblock
=
get_free_mem_block
(
size
,
__func__
);
memblock
=
get_free_mem_block
(
size
,
__func__
);
...
...
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