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
ZhouShuya
OpenXG-RAN
Commits
f62d94c7
Commit
f62d94c7
authored
Mar 05, 2020
by
Francesco Mani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct scheduling of msg3 reception
parent
94b7d132
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
36 additions
and
20 deletions
+36
-20
openair1/SCHED_NR/fapi_nr_l1.c
openair1/SCHED_NR/fapi_nr_l1.c
+5
-5
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+0
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+4
-0
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+23
-12
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+2
-0
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+2
-2
No files found.
openair1/SCHED_NR/fapi_nr_l1.c
View file @
f62d94c7
...
...
@@ -174,6 +174,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
case
NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE
:
AssertFatal
(
pdcch_received
==
0
,
"pdcch_received is not 0, we can only handle one PDCCH PDU per slot
\n
"
);
LOG_I
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_DL_TTI_PDCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
DL_req
->
SFN
,
DL_req
->
Slot
);
handle_nfapi_nr_pdcch_pdu
(
gNB
,
frame
,
slot
,
&
dl_tti_pdu
->
pdcch_pdu
);
...
...
@@ -184,6 +185,7 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
case
NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE
:
{
LOG_I
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_DL_TTI_PDSCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
DL_req
->
SFN
,
DL_req
->
Slot
);
nfapi_nr_dl_tti_pdsch_pdu_rel15_t
*
pdsch_pdu_rel15
=
&
dl_tti_pdu
->
pdsch_pdu
.
pdsch_pdu_rel15
;
uint16_t
pduIndex
=
pdsch_pdu_rel15
->
pduIndex
;
AssertFatal
(
TX_req
->
pdu_list
[
pduIndex
].
num_TLV
==
1
,
"TX_req->pdu_list[%d].num_TLV %d != 1
\n
"
,
...
...
@@ -205,21 +207,19 @@ void nr_schedule_response(NR_Sched_Rsp_t *Sched_INFO){
for
(
int
i
=
0
;
i
<
number_ul_tti_pdu
;
i
++
)
{
switch
(
UL_tti_req
->
pdus_list
[
i
].
pdu_type
)
{
case
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
:
LOG_
D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_CONFIG
_PUSCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_
I
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI
_PUSCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
nr_fill_ulsch
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
&
UL_tti_req
->
pdus_list
[
i
].
pusch_pdu
);
break
;
case
NFAPI_NR_UL_CONFIG_PUCCH_PDU_TYPE
:
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_
CONFIG
_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_
TTI
_PUCCH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
// handle_nfapi_nr_pucch_pdu(gNB,frame,slot,UL_tti_req->pdus_list[i].pucch_pdu);
break
;
case
NFAPI_NR_UL_CONFIG_PRACH_PDU_TYPE
:
LOG_
D
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_CONFIG
_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
LOG_
I
(
PHY
,
"frame %d, slot %d, Got NFAPI_NR_UL_TTI
_PRACH_PDU_TYPE for %d.%d
\n
"
,
frame
,
slot
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
);
nfapi_nr_prach_pdu_t
*
prach_pdu
=
&
UL_tti_req
->
pdus_list
[
i
].
prach_pdu
;
nr_fill_prach
(
gNB
,
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
prach_pdu
);
nr_fill_prach_ru
(
gNB
->
RU_list
[
0
],
UL_tti_req
->
SFN
,
UL_tti_req
->
Slot
,
prach_pdu
);
break
;
}
}
}
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
f62d94c7
...
...
@@ -407,7 +407,6 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
(
ulsch_harq
->
slot
==
slot_rx
)
&&
(
ulsch_harq
->
handled
==
0
)){
uint8_t
symbol_start
=
ulsch_harq
->
ulsch_pdu
.
ulsch_pdu_rel15
.
start_symbol
;
uint8_t
symbol_end
=
symbol_start
+
ulsch_harq
->
ulsch_pdu
.
ulsch_pdu_rel15
.
number_symbols
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
f62d94c7
...
...
@@ -387,8 +387,12 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
if
(
is_nr_UL_slot
(
cc
->
ServingCellConfigCommon
,
slot_rxP
))
{
schedule_nr_prach
(
module_idP
,
(
frame_rxP
+
1
)
&
1023
,
slot_rxP
);
nr_schedule_reception_msg3
(
module_idP
,
0
,
frame_rxP
,
slot_rxP
);
if
(
phy_test
&&
slot_rxP
==
8
){
//nr_schedule_uss_ulsch_phytest(module_idP, frame_rxP, slot_rxP);
}
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
f62d94c7
...
...
@@ -389,8 +389,25 @@ void nr_get_Msg3alloc(NR_ServingCellConfigCommon_t *scc,
ra
->
msg3_first_rb
=
0
;
}
// WIP
// todo: fix
void
nr_schedule_reception_msg3
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
slotP
){
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
module_idP
];
nfapi_nr_ul_tti_request_t
*
ul_req
=
&
mac
->
UL_tti_req
[
0
];
NR_COMMON_channels_t
*
cc
=
&
mac
->
common_channels
[
CC_id
];
NR_RA_t
*
ra
=
&
cc
->
ra
[
0
];
if
(
ra
->
state
==
WAIT_Msg3
)
{
if
((
frameP
==
ra
->
Msg3_frame
)
&&
(
slotP
==
ra
->
Msg3_slot
)
){
ul_req
->
SFN
=
ra
->
Msg3_frame
;
ul_req
->
Slot
=
ra
->
Msg3_slot
;
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pdu_type
=
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
;
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pdu_size
=
sizeof
(
nfapi_nr_pusch_pdu_t
);
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pusch_pdu
=
ra
->
pusch_pdu
;
ul_req
->
n_pdus
+=
1
;
}
}
}
void
nr_add_msg3
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
slotP
){
gNB_MAC_INST
*
mac
=
RC
.
nrmac
[
module_idP
];
...
...
@@ -398,20 +415,15 @@ void nr_add_msg3(module_id_t module_idP, int CC_id, frame_t frameP, sub_frame_t
NR_ServingCellConfigCommon_t
*
scc
=
cc
->
ServingCellConfigCommon
;
NR_RA_t
*
ra
=
&
cc
->
ra
[
0
];
NR_UE_list_t
*
UE_list
=
&
mac
->
UE_list
;
nfapi_nr_ul_tti_request_t
*
ul_req
=
&
mac
->
UL_tti_req
[
0
];
int
UE_id
=
0
;
AssertFatal
(
ra
->
state
!=
RA_IDLE
,
"RA is not active for RA %X
\n
"
,
ra
->
rnti
);
LOG_D
(
MAC
,
"[gNB %d][RAPROC] Frame %d, Subframe %d : CC_id %d RA is active, Msg3 in (%d,%d)
\n
"
,
module_idP
,
frameP
,
slotP
,
CC_id
,
ra
->
Msg3_frame
,
ra
->
Msg3_slot
);
ul_req
->
SFN
=
ra
->
Msg3_frame
;
ul_req
->
Slot
=
ra
->
Msg3_slot
;
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pdu_type
=
NFAPI_NR_UL_CONFIG_PUSCH_PDU_TYPE
;
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pdu_size
=
sizeof
(
nfapi_nr_pusch_pdu_t
);
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
ul_req
->
pdus_list
[
ul_req
->
n_pdus
].
pusch_pdu
;
nfapi_nr_pusch_pdu_t
*
pusch_pdu
=
&
ra
->
pusch_pdu
;
memset
(
pusch_pdu
,
0
,
sizeof
(
nfapi_nr_pusch_pdu_t
));
ul_req
->
n_pdus
+=
1
;
AssertFatal
(
UE_list
->
active
[
UE_id
]
>=
0
,
"Cannot find UE_id %d is not active
\n
"
,
UE_id
);
...
...
@@ -773,7 +785,6 @@ void nr_fill_rar(uint8_t Mod_idP,
// UL grant
ra
->
msg3_mcs
=
pusch_pdu
->
mcs_index
;
ra
->
msg3_TPC
=
tpc_command
;
bwp_size
=
pusch_pdu
->
bwp_size
;
...
...
@@ -793,7 +804,7 @@ void nr_fill_rar(uint8_t Mod_idP,
f_alloc
=
(
prb_alloc
&
truncation
);
}
ul_grant
=
csi_req
|
(
tpc_command
<<
1
)
|
(
ra
->
msg3_mcs
<<
4
)
|
(
ra
->
Msg3_tda_id
<<
8
)
|
(
f_alloc
<<
12
)
|
(
pusch_pdu
->
frequency_hopping
<<
26
);
ul_grant
=
csi_req
|
(
tpc_command
<<
1
)
|
(
pusch_pdu
->
mcs_index
<<
4
)
|
(
ra
->
Msg3_tda_id
<<
8
)
|
(
f_alloc
<<
12
)
|
(
pusch_pdu
->
frequency_hopping
<<
26
);
rar
->
UL_GRANT_1
=
(
uint8_t
)
(
ul_grant
>>
24
)
&
0x07
;
rar
->
UL_GRANT_2
=
(
uint8_t
)
(
ul_grant
>>
16
)
&
0xff
;
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
f62d94c7
...
...
@@ -240,6 +240,8 @@ void nr_generate_Msg2(module_id_t module_idP,
frame_t
frameP
,
sub_frame_t
slotP
);
void
nr_schedule_reception_msg3
(
module_id_t
module_idP
,
int
CC_id
,
frame_t
frameP
,
sub_frame_t
slotP
);
int
find_aggregation_level
(
NR_SearchSpace_t
*
ss
);
void
find_monitoring_periodicity_offset_common
(
NR_SearchSpace_t
*
ss
,
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
f62d94c7
...
...
@@ -125,8 +125,6 @@ typedef struct {
uint8_t
msg3_first_rb
;
/// Msg3 number of RB
uint8_t
msg3_nb_rb
;
/// Msg3 MCS
uint8_t
msg3_mcs
;
/// Msg3 TPC command
uint8_t
msg3_TPC
;
/// Msg3 ULdelay command
...
...
@@ -135,6 +133,8 @@ typedef struct {
uint8_t
msg3_cqireq
;
/// Round of Msg3 HARQ
uint8_t
msg3_round
;
/// Msg3 pusch pdu
nfapi_nr_pusch_pdu_t
pusch_pdu
;
/// TBS used for Msg4
int
msg4_TBsize
;
/// MCS used for Msg4
...
...
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