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
spbro
OpenXG-RAN
Commits
1e6db77b
Commit
1e6db77b
authored
Dec 22, 2022
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first commit
parent
1a0c0cd1
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
283 additions
and
412 deletions
+283
-412
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
+1
-2
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+2
-2
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+170
-214
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+20
-6
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+0
-2
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+4
-4
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+13
-25
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+41
-104
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+32
-53
No files found.
openair1/PHY/NR_UE_ESTIMATION/nr_dl_channel_estimation.c
View file @
1e6db77b
...
...
@@ -1017,7 +1017,7 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
if
(
nb_rb_coreset
==
0
)
return
;
#ifdef DEBUG_PDCCH
printf
(
PHY
,
"pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d, coreset_nb_rb %d
\n
"
,
printf
(
"pdcch_channel_estimation: first_carrier_offset %d, BWPStart %d, coreset_start_rb %d, coreset_nb_rb %d
\n
"
,
first_carrier_offset
,
BWPStart
,
coreset_start_rb
,
nb_rb_coreset
);
#endif
...
...
@@ -1044,7 +1044,6 @@ void nr_pdcch_channel_estimation(PHY_VARS_NR_UE *ue,
int
dmrs_ref
=
0
;
if
(
coreset
->
CoreSetType
==
NFAPI_NR_CSET_CONFIG_PDCCH_CONFIG
)
dmrs_ref
=
BWPStart
;
// generate pilot
int
pilot
[(
nb_rb_coreset
+
dmrs_ref
)
*
3
]
__attribute__
((
aligned
(
16
)));
nr_pdcch_dmrs_rx
(
ue
,
Ns
,
ue
->
nr_gold_pdcch
[
gNB_id
][
Ns
][
symbol
],
&
pilot
[
0
],
2000
,(
nb_rb_coreset
+
dmrs_ref
));
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
1e6db77b
...
...
@@ -911,8 +911,8 @@ bool nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue,
const
double
N_TA_max
=
Ta_max
*
bw_scaling
*
tc_factor
;
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
0
);
NR_BWP_Id_t
dl_bwp
=
mac
->
DL_BWP_I
d
;
NR_BWP_Id_t
ul_bwp
=
mac
->
UL_BWP_I
d
;
NR_BWP_Id_t
dl_bwp
=
mac
->
current_DL_BWP
.
bwp_i
d
;
NR_BWP_Id_t
ul_bwp
=
mac
->
current_UL_BWP
.
bwp_i
d
;
NR_PUSCH_TimeDomainResourceAllocationList_t
*
pusch_TimeDomainAllocationList
=
NULL
;
if
(
ul_bwp
){
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
1e6db77b
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
1e6db77b
...
...
@@ -372,6 +372,23 @@ typedef struct {
}
NR_PHY_meas_t
;
typedef
struct
NR_DL_BWP
{
NR_BWP_Id_t
bwp_id
;
NR_BWP_t
genericParameters
;
int
scs
;
long
*
cyclicprefix
;
uint16_t
BWPSize
;
uint16_t
BWPStart
;
}
NR_DL_BWP_t
;
typedef
struct
NR_UL_BWP
{
NR_BWP_Id_t
bwp_id
;
NR_BWP_t
genericParameters
;
int
scs
;
long
*
cyclicprefix
;
uint16_t
BWPSize
;
uint16_t
BWPStart
;
}
NR_UL_BWP_t
;
/*!\brief Top level UE MAC structure */
typedef
struct
{
...
...
@@ -393,6 +410,9 @@ typedef struct {
NR_RNTI_Value_t
*
cs_RNTI
;
NR_MIB_t
*
mib
;
NR_DL_BWP_t
current_DL_BWP
;
NR_UL_BWP_t
current_UL_BWP
;
NR_BWP_Downlink_t
*
DLbwp
[
MAX_NUM_BWP_UE
];
NR_BWP_Uplink_t
*
ULbwp
[
MAX_NUM_BWP_UE
];
NR_ControlResourceSet_t
*
coreset
[
MAX_NUM_BWP_UE
][
FAPI_NR_MAX_CORESET_PER_BWP
];
...
...
@@ -400,12 +420,6 @@ typedef struct {
frame_type_t
frame_type
;
/*BWP*/
// dedicated active DL BWP
NR_BWP_Id_t
DL_BWP_Id
;
// dedicated active UL BWP
NR_BWP_Id_t
UL_BWP_Id
;
/// Type0-PDCCH seach space
fapi_nr_dl_config_dci_dl_pdu_rel15_t
type0_pdcch_dci_config
;
uint32_t
type0_pdcch_ss_mux_pattern
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
1e6db77b
...
...
@@ -451,8 +451,6 @@ void fill_dci_search_candidates(NR_SearchSpace_t *ss,fapi_nr_dl_config_dci_dl_pd
void
build_ssb_to_ro_map
(
NR_UE_MAC_INST_t
*
mac
);
void
config_bwp_ue
(
NR_UE_MAC_INST_t
*
mac
,
uint32_t
*
bwp_ind
,
uint8_t
*
dci_format
);
void
configure_ss_coreset
(
NR_UE_MAC_INST_t
*
mac
,
NR_ServingCellConfig_t
*
scd
,
NR_BWP_Id_t
dl_bwp_id
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
1e6db77b
...
...
@@ -177,11 +177,11 @@ void init_RA(module_id_t mod_id,
}
}
if
(
ss_id
<
0
)
{
if
(
mac
->
DL_BWP_I
d
>
0
)
{
ra_ss
=
mac
->
DLbwp
[
mac
->
DL_BWP_I
d
-
1
]
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
;
if
(
mac
->
current_DL_BWP
.
bwp_i
d
>
0
)
{
ra_ss
=
mac
->
DLbwp
[
mac
->
current_DL_BWP
.
bwp_i
d
-
1
]
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
;
if
(
ra_ss
)
{
commonSearchSpaceList
=
mac
->
DLbwp
[
mac
->
DL_BWP_I
d
-
1
]
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
ss_id
=
*
mac
->
DLbwp
[
mac
->
DL_BWP_I
d
-
1
]
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
;
commonSearchSpaceList
=
mac
->
DLbwp
[
mac
->
current_DL_BWP
.
bwp_i
d
-
1
]
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
commonSearchSpaceList
;
ss_id
=
*
mac
->
DLbwp
[
mac
->
current_DL_BWP
.
bwp_i
d
-
1
]
->
bwp_Common
->
pdcch_ConfigCommon
->
choice
.
setup
->
ra_SearchSpace
;
}
}
}
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
1e6db77b
...
...
@@ -94,10 +94,10 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
AssertFatal
(
mac
->
scc
==
NULL
||
mac
->
scc_SIB
==
NULL
,
"both scc and scc_SIB cannot be non-null
\n
"
);
NR_BWP_Id_t
dl_bwp_id
=
mac
->
DL_BWP_Id
;
NR_DL_BWP_t
*
current_DL_BWP
=
&
mac
->
current_DL_BWP
;
NR_BWP_Id_t
dl_bwp_id
=
current_DL_BWP
->
bwp_id
;
NR_ServingCellConfigCommon_t
*
scc
=
mac
->
scc
;
NR_ServingCellConfigCommonSIB_t
*
scc_SIB
=
mac
->
scc_SIB
;
NR_BWP_DownlinkCommon_t
*
bwp_Common
=
NULL
;
NR_BWP_DownlinkCommon_t
*
initialDownlinkBWP
=
NULL
;
NR_BWP_UplinkCommon_t
*
initialUplinkBWP
=
NULL
;
...
...
@@ -105,7 +105,6 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
initialDownlinkBWP
=
scc
!=
NULL
?
scc
->
downlinkConfigCommon
->
initialDownlinkBWP
:
&
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
;
initialUplinkBWP
=
scc
!=
NULL
?
scc
->
uplinkConfigCommon
->
initialUplinkBWP
:
&
scc_SIB
->
uplinkConfigCommon
->
initialUplinkBWP
;
}
bwp_Common
=
dl_bwp_id
>
0
?
mac
->
DLbwp
[
dl_bwp_id
-
1
]
->
bwp_Common
:
NULL
;
NR_SearchSpace_t
*
ss
;
NR_ControlResourceSet_t
*
coreset
;
...
...
@@ -167,28 +166,20 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
switch
(
rnti_type
)
{
case
NR_RNTI_C
:
// we use DL BWP dedicated
sps
=
bwp_Common
?
(
bwp_Common
->
genericParameters
.
cyclicPrefix
?
12
:
14
)
:
initialDownlinkBWP
->
genericParameters
.
cyclicPrefix
?
12
:
14
;
sps
=
current_DL_BWP
->
cyclicprefix
?
12
:
14
;
// for SPS=14 8 MSBs in positions 13 down to 6
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
crnti
;
if
(
!
bwp_Common
)
{
rel15
->
BWPSize
=
NRRIV2BW
(
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
}
else
{
rel15
->
BWPSize
=
NRRIV2BW
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
rel15
->
SubcarrierSpacing
=
bwp_Common
->
genericParameters
.
subcarrierSpacing
;
}
rel15
->
BWPSize
=
current_DL_BWP
->
BWPSize
;
rel15
->
BWPStart
=
current_DL_BWP
->
BWPStart
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
for
(
int
i
=
0
;
i
<
rel15
->
num_dci_options
;
i
++
)
{
rel15
->
dci_length_options
[
i
]
=
nr_dci_size
(
initialDownlinkBWP
,
initialUplinkBWP
,
mac
->
cg
,
&
mac
->
def_dci_pdu_rel15
[
rel15
->
dci_format_options
[
i
]],
rel15
->
dci_format_options
[
i
],
NR_RNTI_C
,
rel15
->
BWPSize
,
dl_bwp_id
,
coreset_id
,
mac
->
type0_PDCCH_CSS_config
.
num_rbs
);
}
break
;
case
NR_RNTI_RA
:
// we use the initial DL BWP
sps
=
initialDownlinkBWP
->
genericParameters
.
cyclicP
refix
==
NULL
?
14
:
12
;
sps
=
current_DL_BWP
->
cyclicp
refix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
ra
.
ra_rnti
;
if
(
get_softmodem_params
()
->
sa
)
{
...
...
@@ -196,9 +187,9 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
rel15
->
BWPStart
=
mac
->
type0_PDCCH_CSS_config
.
cset_start_rb
;
}
else
{
// NSA mode is not using the Initial BWP
rel15
->
BWPSize
=
NRRIV2BW
(
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
);
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
MAX_BWP_SIZE
)
;
rel15
->
BWPStart
=
current_DL_BWP
->
BWPStart
;
}
rel15
->
SubcarrierSpacing
=
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
rel15
->
dci_length_options
[
0
]
=
nr_dci_size
(
initialDownlinkBWP
,
initialUplinkBWP
,
mac
->
cg
,
&
mac
->
def_dci_pdu_rel15
[
rel15
->
dci_format_options
[
0
]],
rel15
->
dci_format_options
[
0
],
NR_RNTI_RA
,
rel15
->
BWPSize
,
dl_bwp_id
,
coreset_id
,
mac
->
type0_PDCCH_CSS_config
.
num_rbs
);
break
;
case
NR_RNTI_P
:
...
...
@@ -207,12 +198,12 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
break
;
case
NR_RNTI_TC
:
// we use the initial DL BWP
sps
=
initialDownlinkBWP
->
genericParameters
.
cyclicP
refix
==
NULL
?
14
:
12
;
sps
=
current_DL_BWP
->
cyclicp
refix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
ra
.
t_crnti
;
rel15
->
BWPSize
=
mac
->
type0_PDCCH_CSS_config
.
num_rbs
;
rel15
->
BWPStart
=
mac
->
type0_PDCCH_CSS_config
.
cset_start_rb
;
rel15
->
SubcarrierSpacing
=
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
rel15
->
SubcarrierSpacing
=
current_DL_BWP
->
scs
;
for
(
int
i
=
0
;
i
<
rel15
->
num_dci_options
;
i
++
)
{
rel15
->
dci_length_options
[
i
]
=
nr_dci_size
(
initialDownlinkBWP
,
initialUplinkBWP
,
mac
->
cg
,
&
mac
->
def_dci_pdu_rel15
[
rel15
->
dci_format_options
[
i
]],
rel15
->
dci_format_options
[
i
],
NR_RNTI_TC
,
rel15
->
BWPSize
,
dl_bwp_id
,
coreset_id
,
mac
->
type0_PDCCH_CSS_config
.
num_rbs
);
}
...
...
@@ -220,9 +211,7 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
case
NR_RNTI_SP_CSI
:
break
;
case
NR_RNTI_SI
:
// we use DL BWP dedicated
if
(
bwp_Common
)
sps
=
bwp_Common
->
genericParameters
.
cyclicPrefix
==
NULL
?
14
:
12
;
else
sps
=
14
;
// note: normally this would be found with SSS detection
sps
=
14
;
// for SPS=14 8 MSBs in positions 13 down to 6
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
...
...
@@ -280,7 +269,7 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
RA_config_t
*
ra
=
&
mac
->
ra
;
int
ss_id
;
uint8_t
bwp_id
=
(
mac
->
cg
)
?
mac
->
DL_BWP_Id
:
0
;
uint8_t
bwp_id
=
mac
->
current_DL_BWP
.
bwp_id
;
//NR_ServingCellConfig_t *scd = mac->scg->spCellConfig->spCellConfigDedicated;
NR_BWP_DownlinkDedicated_t
*
bwpd
=
(
bwp_id
>
0
)
?
mac
->
DLbwp
[
bwp_id
-
1
]
->
bwp_Dedicated
:
mac
->
cg
->
spCellConfig
->
spCellConfigDedicated
->
initialDownlinkBWP
;
NR_BWP_DownlinkCommon_t
*
bwp_Common
=
(
bwp_id
>
0
)
?
mac
->
DLbwp
[
bwp_id
-
1
]
->
bwp_Common
:
&
mac
->
scc_SIB
->
downlinkConfigCommon
.
initialDownlinkBWP
;
...
...
@@ -431,7 +420,6 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
}
// for ss_id
}
else
{
AssertFatal
(
1
==
0
,
"Handle DCI searching when CellGroup without dedicated BWP
\n
"
);
}
}
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
1e6db77b
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
1e6db77b
This diff is collapsed.
Click to expand it.
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