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
a4945802
Commit
a4945802
authored
Apr 22, 2024
by
francescomani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
configuring n_TimingAdvanceOffset from upper layers, if present
parent
900a78fd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
3 deletions
+38
-3
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
+1
-0
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+10
-0
openair2/LAYER2/NR_MAC_UE/config_ue.c
openair2/LAYER2/NR_MAC_UE/config_ue.c
+20
-0
openair2/LAYER2/NR_MAC_UE/mac_defs.h
openair2/LAYER2/NR_MAC_UE/mac_defs.h
+1
-0
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
+1
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+5
-3
No files found.
nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h
View file @
a4945802
...
...
@@ -550,6 +550,7 @@ typedef struct {
int
ta_frame
;
int
ta_slot
;
int
ta_command
;
int
ta_offset
;
bool
is_rar
;
}
fapi_nr_ta_command_pdu
;
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
a4945802
...
...
@@ -382,9 +382,19 @@ static void configure_ta_command(PHY_VARS_NR_UE *ue, fapi_nr_ta_command_pdu *ta_
ue
->
ta_frame
=
ta_command_pdu
->
ta_frame
;
ue
->
ta_command
=
ta_command_pdu
->
ta_command
;
}
LOG_D
(
PHY
,
"TA command received in %d.%d Starting UL time alignment procedures. TA update will be applied at frame %d slot %d
\n
"
,
ta_command_pdu
->
ta_frame
,
ta_command_pdu
->
ta_slot
,
ue
->
ta_frame
,
ue
->
ta_slot
);
if
(
ta_command_pdu
->
ta_offset
!=
-
1
)
{
// ta_offset_samples : ta_offset = samples_per_subframe : (Δf_max x N_f / 1000)
// As described in Section 4.3.1 in 38.211
int
ta_offset_samples
=
(
ta_command_pdu
->
ta_offset
*
samples_per_subframe
)
/
(
4096
*
480
);
ue
->
N_TA_offset
=
ta_offset_samples
;
LOG_D
(
PHY
,
"Received N_TA offset %d from upper layers. Corresponds to %d samples.
\n
"
,
ta_command_pdu
->
ta_offset
,
ta_offset_samples
);
}
}
static
void
nr_ue_scheduled_response_dl
(
NR_UE_MAC_INST_t
*
mac
,
...
...
openair2/LAYER2/NR_MAC_UE/config_ue.c
View file @
a4945802
...
...
@@ -1587,6 +1587,24 @@ void nr_rrc_mac_config_req_reset(module_id_t module_id,
}
}
static
int
get_ta_offset
(
long
*
n_TimingAdvanceOffset
)
{
if
(
!
n_TimingAdvanceOffset
)
return
-
1
;
switch
(
*
n_TimingAdvanceOffset
)
{
case
NR_ServingCellConfigCommonSIB__n_TimingAdvanceOffset_n0
:
return
0
;
case
NR_ServingCellConfigCommonSIB__n_TimingAdvanceOffset_n25600
:
return
25600
;
case
NR_ServingCellConfigCommonSIB__n_TimingAdvanceOffset_n39936
:
return
39936
;
default
:
AssertFatal
(
false
,
"Invalid n-TimingAdvanceOffset
\n
"
);
}
return
-
1
;
}
void
nr_rrc_mac_config_req_sib1
(
module_id_t
module_id
,
int
cc_idP
,
NR_SI_SchedulingInfo_t
*
si_SchedulingInfo
,
...
...
@@ -1599,6 +1617,7 @@ void nr_rrc_mac_config_req_sib1(module_id_t module_id,
UPDATE_IE
(
mac
->
tdd_UL_DL_ConfigurationCommon
,
scc
->
tdd_UL_DL_ConfigurationCommon
,
NR_TDD_UL_DL_ConfigCommon_t
);
UPDATE_IE
(
mac
->
si_SchedulingInfo
,
si_SchedulingInfo
,
NR_SI_SchedulingInfo_t
);
UPDATE_IE
(
mac
->
si_SchedulingInfo_v1700
,
si_SchedulingInfo_v1700
,
NR_SI_SchedulingInfo_v1700_t
);
mac
->
n_ta_offset
=
get_ta_offset
(
scc
->
n_TimingAdvanceOffset
);
config_common_ue_sa
(
mac
,
scc
,
cc_idP
);
configure_common_BWP_dl
(
mac
,
...
...
@@ -1652,6 +1671,7 @@ static void handle_reconfiguration_with_sync(NR_UE_MAC_INST_t *mac,
if
(
reconfigurationWithSync
->
spCellConfigCommon
)
{
NR_ServingCellConfigCommon_t
*
scc
=
reconfigurationWithSync
->
spCellConfigCommon
;
mac
->
n_ta_offset
=
get_ta_offset
(
scc
->
n_TimingAdvanceOffset
);
if
(
scc
->
physCellId
)
mac
->
physCellId
=
*
scc
->
physCellId
;
mac
->
dmrs_TypeA_Position
=
scc
->
dmrs_TypeA_Position
;
...
...
openair2/LAYER2/NR_MAC_UE/mac_defs.h
View file @
a4945802
...
...
@@ -576,6 +576,7 @@ typedef struct NR_UE_MAC_INST_s {
int
dmrs_TypeA_Position
;
int
p_Max
;
int
p_Max_alt
;
int
n_ta_offset
;
// -1 not present, otherwise value to be applied
long
pdsch_HARQ_ACK_Codebook
;
...
...
openair2/LAYER2/NR_MAC_UE/main_ue_nr.c
View file @
a4945802
...
...
@@ -69,6 +69,7 @@ void nr_ue_init_mac(NR_UE_MAC_INST_t *mac)
mac
->
uecap_maxMIMO_PUSCH_layers_nocb
=
0
;
mac
->
p_Max
=
INT_MIN
;
mac
->
p_Max_alt
=
INT_MIN
;
mac
->
n_ta_offset
=
-
1
;
reset_mac_inst
(
mac
);
// need to inizialize because might not been setup (optional timer)
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
a4945802
...
...
@@ -61,7 +61,7 @@
}
static
void
nr_ue_prach_scheduler
(
NR_UE_MAC_INST_t
*
mac
,
frame_t
frameP
,
sub_frame_t
slotP
);
static
void
schedule_ta_command
(
fapi_nr_dl_config_request_t
*
dl_config
,
NR_U
L_TIME_ALIGNMENT_t
*
ul_time_alignment
);
static
void
schedule_ta_command
(
fapi_nr_dl_config_request_t
*
dl_config
,
NR_U
E_MAC_INST_t
*
mac
);
static
void
nr_ue_fill_phr
(
NR_UE_MAC_INST_t
*
mac
,
NR_SINGLE_ENTRY_PHR_MAC_CE
*
phr
,
float
P_CMAX
,
...
...
@@ -1245,7 +1245,7 @@ void nr_ue_dl_scheduler(NR_UE_MAC_INST_t *mac, nr_downlink_indication_t *dl_info
ue_dci_configuration
(
mac
,
dl_config
,
rx_frame
,
rx_slot
);
if
(
mac
->
ul_time_alignment
.
ta_apply
!=
no_ta
)
schedule_ta_command
(
dl_config
,
&
mac
->
ul_time_alignment
);
schedule_ta_command
(
dl_config
,
mac
);
nr_scheduled_response_t
scheduled_response
=
{.
dl_config
=
dl_config
,
.
module_id
=
mac
->
ue_id
,
...
...
@@ -3534,11 +3534,13 @@ uint8_t nr_ue_get_sdu(NR_UE_MAC_INST_t *mac,
return
num_sdus
>
0
?
1
:
0
;
}
static
void
schedule_ta_command
(
fapi_nr_dl_config_request_t
*
dl_config
,
NR_U
L_TIME_ALIGNMENT_t
*
ul_time_alignment
)
static
void
schedule_ta_command
(
fapi_nr_dl_config_request_t
*
dl_config
,
NR_U
E_MAC_INST_t
*
mac
)
{
NR_UL_TIME_ALIGNMENT_t
*
ul_time_alignment
=
&
mac
->
ul_time_alignment
;
fapi_nr_ta_command_pdu
*
ta
=
&
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
ta_command_pdu
;
ta
->
ta_frame
=
ul_time_alignment
->
frame
;
ta
->
ta_slot
=
ul_time_alignment
->
slot
;
ta
->
ta_offset
=
mac
->
n_ta_offset
;
ta
->
is_rar
=
ul_time_alignment
->
ta_apply
==
rar_ta
;
ta
->
ta_command
=
ul_time_alignment
->
ta_command
;
dl_config
->
dl_config_list
[
dl_config
->
number_pdus
].
pdu_type
=
FAPI_NR_CONFIG_TA_COMMAND
;
...
...
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