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
Michael Black
OpenXG-RAN
Commits
0894a6bf
Commit
0894a6bf
authored
May 06, 2023
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/NR_CCE_fix' into integration_2023_w18b
parents
462ed761
e9ded454
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
45 deletions
+46
-45
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
+19
-19
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+3
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+13
-13
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+11
-11
No files found.
openair1/PHY/NR_UE_TRANSPORT/dci_nr.c
View file @
0894a6bf
...
@@ -80,16 +80,17 @@ char nr_dci_format_string[8][30] = {
...
@@ -80,16 +80,17 @@ char nr_dci_format_string[8][30] = {
static
void
nr_pdcch_demapping_deinterleaving
(
uint32_t
*
llr
,
static
void
nr_pdcch_demapping_deinterleaving
(
uint32_t
*
llr
,
uint32_t
*
e_rx
,
uint32_t
*
e_rx
,
uint8_t
coreset_time_dur
,
uint8_t
coreset_time_dur
,
uint8_t
start_symbol
,
uint8_t
start_symbol
,
uint32_t
coreset_nbr_rb
,
uint32_t
coreset_nbr_rb
,
uint8_t
reg_bundle_size_L
,
uint8_t
reg_bundle_size_L
,
uint8_t
coreset_interleaver_size_R
,
uint8_t
coreset_interleaver_size_R
,
uint8_t
n_shift
,
uint8_t
n_shift
,
uint8_t
number_of_candidates
,
uint8_t
number_of_candidates
,
uint16_t
*
CCE
,
uint16_t
*
CCE
,
uint8_t
*
L
)
{
uint8_t
*
L
)
{
/*
/*
* This function will do demapping and deinterleaving from llr containing demodulated symbols
* This function will do demapping and deinterleaving from llr containing demodulated symbols
* Demapping will regroup in REG and bundles
* Demapping will regroup in REG and bundles
...
@@ -130,7 +131,7 @@ static void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
...
@@ -130,7 +131,7 @@ static void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
uint32_t
coreset_C
=
0
;
uint32_t
coreset_C
=
0
;
uint16_t
index_z
,
index_llr
;
uint16_t
index_z
,
index_llr
;
int
coreset_interleaved
=
0
;
int
coreset_interleaved
=
0
;
int
N_regs
=
coreset_nbr_rb
*
coreset_time_dur
;
int
N_regs
=
coreset_nbr_rb
*
coreset_time_dur
;
if
(
reg_bundle_size_L
!=
0
)
{
// interleaving will be done only if reg_bundle_size_L != 0
if
(
reg_bundle_size_L
!=
0
)
{
// interleaving will be done only if reg_bundle_size_L != 0
coreset_interleaved
=
1
;
coreset_interleaved
=
1
;
...
@@ -139,12 +140,11 @@ static void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
...
@@ -139,12 +140,11 @@ static void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
reg_bundle_size_L
=
6
;
reg_bundle_size_L
=
6
;
}
}
int
B_rb
=
reg_bundle_size_L
/
coreset_time_dur
;
// nb of RBs occupied by each REG bundle
int
B_rb
=
reg_bundle_size_L
/
coreset_time_dur
;
// nb of RBs occupied by each REG bundle
int
num_bundles_per_cce
=
6
/
reg_bundle_size_L
;
int
num_bundles_per_cce
=
6
/
reg_bundle_size_L
;
int
n_cce
=
N_regs
/
6
;
int
n_cce
=
N_regs
/
6
;
int
max_bundles
=
n_cce
*
num_bundles_per_cce
;
int
max_bundles
=
n_cce
*
num_bundles_per_cce
;
int
f_bundle_j_list
[
max_bundles
];
int
f_bundle_j_list
[
max_bundles
];
// for each bundle
// for each bundle
for
(
int
nb
=
0
;
nb
<
max_bundles
;
nb
++
)
{
for
(
int
nb
=
0
;
nb
<
max_bundles
;
nb
++
)
{
if
(
coreset_interleaved
==
0
)
if
(
coreset_interleaved
==
0
)
...
@@ -163,11 +163,11 @@ static void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
...
@@ -163,11 +163,11 @@ static void nr_pdcch_demapping_deinterleaving(uint32_t *llr,
// Get cce_list indices by bundle index in ascending order
// Get cce_list indices by bundle index in ascending order
int
f_bundle_j_list_ord
[
number_of_candidates
][
max_bundles
];
int
f_bundle_j_list_ord
[
number_of_candidates
][
max_bundles
];
for
(
int
c_id
=
0
;
c_id
<
number_of_candidates
;
c_id
++
)
{
for
(
int
c_id
=
0
;
c_id
<
number_of_candidates
;
c_id
++
)
{
int
start_bund_cand
=
CCE
[
c_id
]
*
num_bundles_per_cce
;
int
start_bund_cand
=
CCE
[
c_id
]
*
num_bundles_per_cce
;
int
max_bund_per_cand
=
L
[
c_id
]
*
num_bundles_per_cce
;
int
max_bund_per_cand
=
L
[
c_id
]
*
num_bundles_per_cce
;
int
f_bundle_j_list_id
=
0
;
int
f_bundle_j_list_id
=
0
;
for
(
int
nb
=
0
;
nb
<
max_bundles
;
nb
++
)
{
for
(
int
nb
=
0
;
nb
<
max_bundles
;
nb
++
)
{
for
(
int
bund_cand
=
start_bund_cand
;
bund_cand
<
start_bund_cand
+
max_bund_per_cand
;
bund_cand
++
){
for
(
int
bund_cand
=
start_bund_cand
;
bund_cand
<
start_bund_cand
+
max_bund_per_cand
;
bund_cand
++
){
if
(
f_bundle_j_list
[
bund_cand
]
==
nb
)
{
if
(
f_bundle_j_list
[
bund_cand
]
==
nb
)
{
f_bundle_j_list_ord
[
c_id
][
f_bundle_j_list_id
]
=
nb
;
f_bundle_j_list_ord
[
c_id
][
f_bundle_j_list_id
]
=
nb
;
f_bundle_j_list_id
++
;
f_bundle_j_list_id
++
;
...
...
openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
View file @
0894a6bf
...
@@ -1554,8 +1554,9 @@ const int64_t *get_prach_config_info(frequency_range_t freq_range, uint8_t index
...
@@ -1554,8 +1554,9 @@ const int64_t *get_prach_config_info(frequency_range_t freq_range, uint8_t index
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
,
const
NR_SearchSpace_t
*
ss
,
const
NR_SearchSpace_t
*
ss
,
int
L
)
{
int
L
)
AssertFatal
(
L
>=
1
&&
L
<=
16
,
"L %d not ok
\n
"
,
L
);
{
AssertFatal
(
L
>=
1
&&
L
<=
16
,
"L %d not ok
\n
"
,
L
);
*
nr_of_candidates
=
0
;
*
nr_of_candidates
=
0
;
switch
(
L
)
{
switch
(
L
)
{
case
1
:
case
1
:
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
0894a6bf
...
@@ -51,34 +51,34 @@
...
@@ -51,34 +51,34 @@
void
fill_dci_search_candidates
(
NR_SearchSpace_t
*
ss
,
void
fill_dci_search_candidates
(
NR_SearchSpace_t
*
ss
,
fapi_nr_dl_config_dci_dl_pdu_rel15_t
*
rel15
,
fapi_nr_dl_config_dci_dl_pdu_rel15_t
*
rel15
,
int
slot
,
int
rnti
)
{
int
slot
,
int
rnti
)
{
LOG_D
(
NR_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
;
rel15
->
number_of_candidates
=
0
;
rel15
->
number_of_candidates
=
0
;
int
i
=
0
;
uint32_t
Y
=
0
;
uint32_t
Y
=
0
;
int
i
=
0
;
if
(
slot
>=
0
)
if
(
slot
>=
0
)
Y
=
get_Y
(
ss
,
slot
,
rnti
);
Y
=
get_Y
(
ss
,
slot
,
rnti
);
for
(
int
maxL
=
16
;
maxL
>
0
;
maxL
>>=
1
)
{
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
);
if
(
number_of_candidates
>
0
)
{
if
(
number_of_candidates
>
0
)
{
LOG_D
(
NR_MAC
,
"L %d, number of candidates %d, aggregation %d
\n
"
,
maxL
,
number_of_candidates
,
aggregation
);
LOG_D
(
NR_MAC
,
"L %d, number of candidates %d, aggregation %d
\n
"
,
maxL
,
number_of_candidates
,
aggregation
);
rel15
->
number_of_candidates
+=
number_of_candidates
;
rel15
->
number_of_candidates
+=
number_of_candidates
;
int
N_cce_sym
=
0
;
// nb of rbs of coreset per symbol
int
N_cce_sym
=
0
;
// nb of rbs of coreset per symbol
for
(
int
i
=
0
;
i
<
6
;
i
++
)
{
for
(
int
f
=
0
;
f
<
6
;
f
++
)
{
for
(
int
t
=
0
;
t
<
8
;
t
++
)
{
for
(
int
t
=
0
;
t
<
8
;
t
++
)
{
N_cce_sym
+=
((
rel15
->
coreset
.
frequency_domain_resource
[
i
]
>>
t
)
&
1
);
N_cce_sym
+=
((
rel15
->
coreset
.
frequency_domain_resource
[
f
]
>>
t
)
&
1
);
}
}
}
}
int
N_cces
=
N_cce_sym
*
rel15
->
coreset
.
duration
;
int
N_cces
=
N_cce_sym
*
rel15
->
coreset
.
duration
;
for
(
int
j
=
0
;
j
<
number_of_candidates
;
i
++
,
j
++
)
{
for
(
int
j
=
0
;
j
<
number_of_candidates
;
i
++
,
j
++
)
{
int
first_cce
=
aggregation
*
((
Y
+
CEILIDIV
((
j
*
N_cces
),(
aggregation
*
number_of_candidates
))
+
0
)
%
CEILIDIV
(
N_cces
,
aggregation
));
int
first_cce
=
aggregation
*
((
Y
+
((
j
*
N_cces
)
/
(
aggregation
*
number_of_candidates
))
+
0
)
%
(
N_cces
/
aggregation
));
LOG_D
(
NR_MAC
,
"Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)
\n
"
,
j
,
number_of_candidates
,
first_cce
,
aggregation
,
N_cces
,
Y
);
LOG_D
(
NR_MAC
,
"Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)
\n
"
,
j
,
number_of_candidates
,
first_cce
,
aggregation
,
N_cces
,
Y
);
rel15
->
CCE
[
i
]
=
first_cce
;
rel15
->
CCE
[
i
]
=
first_cce
;
rel15
->
L
[
i
]
=
aggregation
;
rel15
->
L
[
i
]
=
aggregation
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
0894a6bf
...
@@ -413,31 +413,31 @@ int find_pdcch_candidate(const gNB_MAC_INST *mac,
...
@@ -413,31 +413,31 @@ int find_pdcch_candidate(const gNB_MAC_INST *mac,
int
nr_of_candidates
,
int
nr_of_candidates
,
const
NR_sched_pdcch_t
*
pdcch
,
const
NR_sched_pdcch_t
*
pdcch
,
const
NR_ControlResourceSet_t
*
coreset
,
const
NR_ControlResourceSet_t
*
coreset
,
uint32_t
Y
)
{
uint32_t
Y
)
{
const
uint16_t
*
vrb_map
=
mac
->
common_channels
[
cc_id
].
vrb_map
;
const
uint16_t
*
vrb_map
=
mac
->
common_channels
[
cc_id
].
vrb_map
;
const
int
N_ci
=
0
;
const
int
N_ci
=
0
;
const
int
N_rb
=
pdcch
->
n_rb
;
// nb of rbs of coreset per symbol
const
int
N_rb
=
pdcch
->
n_rb
;
// nb of rbs of coreset per symbol
const
int
N_symb
=
coreset
->
duration
;
// nb of coreset symbols
const
int
N_symb
=
coreset
->
duration
;
// nb of coreset symbols
const
int
N_regs
=
N_rb
*
N_symb
;
// nb of REGs per coreset
const
int
N_regs
=
N_rb
*
N_symb
;
// nb of REGs per coreset
const
int
N_cces
=
N_regs
/
NR_NB_REG_PER_CCE
;
// nb of cces in coreset
const
int
N_cces
=
N_regs
/
NR_NB_REG_PER_CCE
;
// nb of cces in coreset
const
int
R
=
pdcch
->
InterleaverSize
;
const
int
R
=
pdcch
->
InterleaverSize
;
const
int
L
=
pdcch
->
RegBundleSize
;
const
int
L
=
pdcch
->
RegBundleSize
;
const
int
C
=
R
>
0
?
N_regs
/
(
L
*
R
)
:
0
;
const
int
C
=
R
>
0
?
N_regs
/
(
L
*
R
)
:
0
;
const
int
B_rb
=
L
/
N_symb
;
// nb of RBs occupied by each REG bundle
const
int
B_rb
=
L
/
N_symb
;
// nb of RBs occupied by each REG bundle
// loop over all the available candidates
// loop over all the available candidates
// this implements TS 38.211 Sec. 7.3.2.2
// this implements TS 38.211 Sec. 7.3.2.2
for
(
int
m
=
0
;
m
<
nr_of_candidates
;
m
++
)
{
// loop over candidates
for
(
int
m
=
0
;
m
<
nr_of_candidates
;
m
++
)
{
// loop over candidates
bool
taken
=
false
;
// flag if the resource for a given candidate are taken
bool
taken
=
false
;
// flag if the resource for a given candidate are taken
int
first_cce
=
aggregation
*
((
Y
+
CEILIDIV
((
m
*
N_cces
),(
aggregation
*
nr_of_candidates
))
+
N_ci
)
%
CEILIDIV
(
N_cces
,
aggregation
));
int
first_cce
=
aggregation
*
((
Y
+
((
m
*
N_cces
)
/
(
aggregation
*
nr_of_candidates
))
+
N_ci
)
%
(
N_cces
/
aggregation
));
LOG_D
(
NR_MAC
,
"Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)
\n
"
,
m
,
nr_of_candidates
,
first_cce
,
aggregation
,
N_cces
,
Y
);
LOG_D
(
NR_MAC
,
"Candidate %d of %d first_cce %d (L %d N_cces %d Y %d)
\n
"
,
m
,
nr_of_candidates
,
first_cce
,
aggregation
,
N_cces
,
Y
);
for
(
int
j
=
first_cce
;
(
j
<
first_cce
+
aggregation
)
&&
!
taken
;
j
++
)
{
// loop over CCEs
for
(
int
j
=
first_cce
;
(
j
<
first_cce
+
aggregation
)
&&
!
taken
;
j
++
)
{
// loop over CCEs
for
(
int
k
=
6
*
j
/
L
;
(
k
<
(
6
*
j
/
L
+
6
/
L
))
&&
!
taken
;
k
++
)
{
// loop over REG bundles
for
(
int
k
=
6
*
j
/
L
;
(
k
<
(
6
*
j
/
L
+
6
/
L
))
&&
!
taken
;
k
++
)
{
// loop over REG bundles
int
f
=
cce_to_reg_interleaving
(
R
,
k
,
pdcch
->
ShiftIndex
,
C
,
L
,
N_regs
);
int
f
=
cce_to_reg_interleaving
(
R
,
k
,
pdcch
->
ShiftIndex
,
C
,
L
,
N_regs
);
for
(
int
rb
=
0
;
rb
<
B_rb
;
rb
++
)
{
// loop over the RBs of the bundle
for
(
int
rb
=
0
;
rb
<
B_rb
;
rb
++
)
{
// loop over the RBs of the bundle
if
(
vrb_map
[
pdcch
->
BWPStart
+
f
*
B_rb
+
rb
]
&
SL_to_bitmap
(
pdcch
->
StartSymbolIndex
,
N_symb
))
{
if
(
vrb_map
[
pdcch
->
BWPStart
+
f
*
B_rb
+
rb
]
&
SL_to_bitmap
(
pdcch
->
StartSymbolIndex
,
N_symb
))
{
taken
=
true
;
taken
=
true
;
break
;
break
;
}
}
...
...
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