Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shweta Shrivastava
openairinterface5G
Commits
e8be11da
Commit
e8be11da
authored
Sep 17, 2020
by
Francesco Mani
Browse files
changes in ta procedure at gnb, to be tested with the phone
parent
4776e13c
Changes
4
Hide whitespace changes
Inline
Side-by-side
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
e8be11da
...
...
@@ -338,7 +338,6 @@ void nr_schedule_pucch(int Mod_idP,
O_ack
=
curr_pucch
->
dai_c
;
O_uci
=
O_ack
+
curr_pucch
->
csi_bits
;
// for now we are just sending acknacks in pucch
if
((
O_uci
>
0
||
SR_flag
==
1
)
&&
(
frameP
==
curr_pucch
->
frame
)
&&
(
slotP
==
curr_pucch
->
ul_slot
))
{
UL_tti_req
->
SFN
=
curr_pucch
->
frame
;
UL_tti_req
->
Slot
=
curr_pucch
->
ul_slot
;
UL_tti_req
->
pdus_list
[
UL_tti_req
->
n_pdus
].
pdu_type
=
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
;
...
...
@@ -477,20 +476,15 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
else
UE_list
->
fiveG_connected
[
UE_id
]
=
true
;
if
(
get_softmodem_params
()
->
phy_test
)
{
if
(
UE_list
->
fiveG_connected
[
UE_id
])
{
// TbD once RACH is available, start ta_timer when UE is connected
if
(
ue_sched_ctl
->
ta_timer
)
ue_sched_ctl
->
ta_timer
--
;
if
(
ue_sched_ctl
->
ta_timer
==
0
)
{
gNB
->
ta_command
=
ue_sched_ctl
->
ta_
updat
e
;
ue_sched_ctl
->
ta_
apply
=
tru
e
;
/* if time is up, then set the timer to not send it for 5 frames
// regardless of the TA value */
ue_sched_ctl
->
ta_timer
=
100
;
/* reset ta_update */
ue_sched_ctl
->
ta_update
=
31
;
/* MAC CE flag indicating TA length */
gNB
->
ta_len
=
2
;
}
}
...
...
@@ -505,8 +499,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
ue_sched_ctl
->
current_harq_pid
=
slot
%
num_slots_per_tdd
;
nr_acknack_scheduling
(
module_idP
,
UE_id
,
frame
,
slot
,
num_slots_per_tdd
,
&
pucch_sched
,
&
pucch_occ
);
nr_schedule_uss_dlsch_phytest
(
module_idP
,
frame
,
slot
,
&
UE_list
->
UE_sched_ctrl
[
UE_id
].
sched_pucch
[
pucch_sched
][
pucch_occ
],
NULL
);
// resetting ta flag
gNB
->
ta_len
=
0
;
ue_sched_ctl
->
ta_apply
=
false
;
}
if
(
UE_list
->
fiveG_connected
[
UE_id
])
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
e8be11da
...
...
@@ -91,13 +91,13 @@ int nr_generate_dlsch_pdu(module_id_t module_idP,
// now TA is always send when ta_timer resets regardless of its value
// this is done to avoid issues with the timeAlignmentTimer which is
// supposed to monitor if the UE received TA or not */
if
(
gNB
->
ta_len
)
{
if
(
ue_sched_ctl
->
ta_apply
)
{
mac_pdu_ptr
->
R
=
0
;
mac_pdu_ptr
->
LCID
=
DL_SCH_LCID_TA_COMMAND
;
//last_size = 1;
mac_pdu_ptr
++
;
// TA MAC CE (1 octet)
timing_advance_cmd
=
gNB
->
ta_command
;
timing_advance_cmd
=
ue_sched_ctl
->
ta_update
;
AssertFatal
(
timing_advance_cmd
<
64
,
"timing_advance_cmd %d > 63
\n
"
,
timing_advance_cmd
);
((
NR_MAC_CE_TA
*
)
ce_ptr
)
->
TA_COMMAND
=
timing_advance_cmd
;
//(timing_advance_cmd+31)&0x3f;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
e8be11da
...
...
@@ -592,7 +592,7 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
LOG_D
(
MAC
,
"In nr_schedule_uss_dlsch_phytest frame %d slot %d
\n
"
,
frameP
,
slotP
);
int
post_padding
=
0
,
ta_len
=
0
,
header_length_total
=
0
,
sdu_length_total
=
0
,
num_sdus
=
0
;
int
post_padding
=
0
,
header_length_total
=
0
,
sdu_length_total
=
0
,
num_sdus
=
0
;
int
lcid
,
offset
,
i
,
header_length_last
,
TBS_bytes
=
0
;
int
UE_id
=
0
,
CC_id
=
0
;
...
...
@@ -611,12 +611,13 @@ void nr_schedule_uss_dlsch_phytest(module_id_t module_idP,
unsigned
char
sdu_lcids
[
NB_RB_MAX
]
=
{
0
};
uint16_t
sdu_lengths
[
NB_RB_MAX
]
=
{
0
};
uint16_t
rnti
=
UE_list
->
rnti
[
UE_id
];
NR_UE_sched_ctrl_t
*
ue_sched_ctl
=
&
UE_list
->
UE_sched_ctrl
[
UE_id
];
uint8_t
mac_sdus
[
MAX_NR_DLSCH_PAYLOAD_BYTES
];
LOG_D
(
MAC
,
"Scheduling UE specific search space DCI type 1
\n
"
);
ta_len
=
gNB_mac
->
ta_len
;
int
ta_len
=
(
ue_sched_ctl
->
ta_apply
)
?
2
:
0
;
TBS_bytes
=
configure_fapi_dl_pdu
(
module_idP
,
dl_req
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
e8be11da
...
...
@@ -310,6 +310,7 @@ typedef struct {
NR_sched_pusch
*
sched_pusch
;
uint16_t
ta_timer
;
int16_t
ta_update
;
bool
ta_apply
;
uint8_t
tpc0
;
uint8_t
tpc1
;
uint16_t
ul_rssi
;
...
...
@@ -362,10 +363,6 @@ typedef struct gNB_MAC_INST_s {
int
pusch_target_snrx10
;
/// Pucch target SNR
int
pucch_target_snrx10
;
/// TA command
int
ta_command
;
/// MAC CE flag indicating TA length
int
ta_len
;
/// Common cell resources
NR_COMMON_channels_t
common_channels
[
NFAPI_CC_MAX
];
/// current PDU index (BCH,DLSCH)
...
...
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