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
wangjie
OpenXG-RAN
Commits
287f47bf
Commit
287f47bf
authored
Jan 07, 2021
by
Fang-WANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msg4
parent
52c556fd
Changes
26
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
810 additions
and
181 deletions
+810
-181
executables/nr-softmodem.c
executables/nr-softmodem.c
+1
-1
executables/softmodem-common.h
executables/softmodem-common.h
+3
-0
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
+2
-2
openair1/SCHED_NR/phy_procedures_nr_gNB.c
openair1/SCHED_NR/phy_procedures_nr_gNB.c
+1
-1
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
+0
-2
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+20
-14
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
+13
-6
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
+15
-0
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+143
-17
openair2/LAYER2/NR_MAC_gNB/config.c
openair2/LAYER2/NR_MAC_gNB/config.c
+1
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
+3
-2
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
+308
-7
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
+97
-45
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
+128
-55
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
+33
-4
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
+18
-8
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
+9
-5
openair2/LAYER2/NR_MAC_gNB/main.c
openair2/LAYER2/NR_MAC_gNB/main.c
+2
-1
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
+3
-1
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
+1
-1
openair2/RRC/NR/rrc_gNB.c
openair2/RRC/NR/rrc_gNB.c
+1
-1
openair2/RRC/NR/rrc_gNB_internode.c
openair2/RRC/NR/rrc_gNB_internode.c
+2
-2
openair2/RRC/NR/rrc_gNB_nsa.c
openair2/RRC/NR/rrc_gNB_nsa.c
+2
-2
openair2/RRC/NR/rrc_gNB_reconfig.c
openair2/RRC/NR/rrc_gNB_reconfig.c
+1
-1
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+1
-1
No files found.
executables/nr-softmodem.c
View file @
287f47bf
...
@@ -419,7 +419,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
...
@@ -419,7 +419,7 @@ int create_gNB_tasks(uint32_t gnb_nb) {
}
}
if
(
AMF_MODE_ENABLED
&&
(
get_softmodem_params
()
->
phy_test
==
0
&&
get_softmodem_params
()
->
do_ra
==
0
))
{
if
(
AMF_MODE_ENABLED
&&
(
get_softmodem_params
()
->
phy_test
==
0
&&
get_softmodem_params
()
->
do_ra
==
0
&&
get_softmodem_params
()
->
sa_ra
==
0
))
{
if
(
gnb_nb
>
0
)
{
if
(
gnb_nb
>
0
)
{
/*
/*
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
if (itti_create_task (TASK_SCTP, sctp_eNB_task, NULL) < 0) {
...
...
executables/softmodem-common.h
View file @
287f47bf
...
@@ -99,6 +99,7 @@ extern "C"
...
@@ -99,6 +99,7 @@ extern "C"
#define SPLIT73 softmodem_params.split73
#define SPLIT73 softmodem_params.split73
#define TP_CONFIG softmodem_params.threadPoolConfig
#define TP_CONFIG softmodem_params.threadPoolConfig
#define PHY_TEST softmodem_params.phy_test
#define PHY_TEST softmodem_params.phy_test
#define SA_RA softmodem_params.sa_ra
#define DO_RA softmodem_params.do_ra
#define DO_RA softmodem_params.do_ra
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
#define WAIT_FOR_SYNC softmodem_params.wait_for_sync
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
#define SINGLE_THREAD_FLAG softmodem_params.single_thread_flag
...
@@ -118,6 +119,7 @@ extern "C"
...
@@ -118,6 +119,7 @@ extern "C"
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
{"split73", CONFIG_HLP_SPLIT73, 0, strptr:(char **)&SPLIT73, defstrval:NULL, TYPE_STRING, sizeof(SPLIT73)},\
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \
{"thread-pool", CONFIG_HLP_TPOOL, 0, strptr:(char **)&TP_CONFIG, defstrval:"n", TYPE_STRING, sizeof(TP_CONFIG)}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
{"phy-test", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&PHY_TEST, defintval:0, TYPE_INT, 0}, \
{"sa-ra", CONFIG_HLP_PHYTST, PARAMFLAG_BOOL, iptr:&SA_RA, defintval:0, TYPE_INT, 0}, \
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \
{"do-ra", CONFIG_HLP_DORA, PARAMFLAG_BOOL, iptr:&DO_RA, defintval:0, TYPE_INT, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
{"usim-test", CONFIG_HLP_USIM, PARAMFLAG_BOOL, u8ptr:&USIM_TEST, defintval:0, TYPE_UINT8, 0}, \
{"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
{"clock-source", CONFIG_HLP_CLK, 0, uptr:&CLOCK_SOURCE, defintval:0, TYPE_UINT, 0}, \
...
@@ -212,6 +214,7 @@ typedef struct {
...
@@ -212,6 +214,7 @@ typedef struct {
char
split73
[
1024
];
char
split73
[
1024
];
char
threadPoolConfig
[
1024
];
char
threadPoolConfig
[
1024
];
int
phy_test
;
int
phy_test
;
int
sa_ra
;
int
do_ra
;
int
do_ra
;
uint8_t
usim_test
;
uint8_t
usim_test
;
int
emulate_rf
;
int
emulate_rf
;
...
...
openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c
View file @
287f47bf
...
@@ -665,8 +665,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
...
@@ -665,8 +665,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
return
((
1
+
dlsch
->
max_ldpc_iterations
));
return
((
1
+
dlsch
->
max_ldpc_iterations
));
}
else
{
}
else
{
//#if UE_DEBUG_TRACE
//#if UE_DEBUG_TRACE
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
LOG_D
(
PHY
,
"[UE %d] DLSCH: Setting ACK for
SFN %d
nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d
\n
"
,
phy_vars_ue
->
Mod_id
,
nr_slot_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
phy_vars_ue
->
Mod_id
,
frame
,
nr_slot_rx
,
harq_process
->
TBS
,
harq_process
->
mcs
,
harq_process
->
nb_rb
,
harq_process
->
round
);
//#endif
//#endif
harq_process
->
status
=
SCH_IDLE
;
harq_process
->
status
=
SCH_IDLE
;
...
...
openair1/SCHED_NR/phy_procedures_nr_gNB.c
View file @
287f47bf
...
@@ -569,7 +569,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
...
@@ -569,7 +569,7 @@ void phy_procedures_gNB_uespec_RX(PHY_VARS_gNB *gNB, int frame_rx, int slot_rx)
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_type
=
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_type
=
NFAPI_NR_UCI_FORMAT_0_1_PDU_TYPE
;
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_0_1_t
);
gNB
->
uci_pdu_list
[
num_ucis
].
pdu_size
=
sizeof
(
nfapi_nr_uci_pucch_pdu_format_0_1_t
);
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu_format0
=
&
gNB
->
uci_pdu_list
[
num_ucis
].
pucch_pdu_format_0_1
;
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_pdu_format0
=
&
gNB
->
uci_pdu_list
[
num_ucis
].
pucch_pdu_format_0_1
;
uci_pdu_format0
->
rnti
=
pucch_pdu
->
rnti
;
nr_decode_pucch0
(
gNB
,
nr_decode_pucch0
(
gNB
,
slot_rx
,
slot_rx
,
uci_pdu_format0
,
uci_pdu_format0
,
...
...
openair1/SCHED_NR_UE/fapi_nr_ue_l1.c
View file @
287f47bf
...
@@ -94,8 +94,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
...
@@ -94,8 +94,6 @@ int8_t nr_ue_scheduled_response(nr_scheduled_response_t *scheduled_response){
dlsch0
->
rnti
=
dl_config
->
dl_config_list
[
i
].
dlsch_config_pdu
.
rnti
;
dlsch0
->
rnti
=
dl_config
->
dl_config_list
[
i
].
dlsch_config_pdu
.
rnti
;
dlsch0_harq
=
dlsch0
->
harq_processes
[
current_harq_pid
];
dlsch0_harq
=
dlsch0
->
harq_processes
[
current_harq_pid
];
LOG_D
(
PHY
,
"current_harq_pid = %d
\n
"
,
current_harq_pid
);
if
(
dlsch0_harq
){
if
(
dlsch0_harq
){
dlsch0_harq
->
BWPStart
=
dlsch_config_pdu
->
BWPStart
;
dlsch0_harq
->
BWPStart
=
dlsch_config_pdu
->
BWPStart
;
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
287f47bf
...
@@ -242,7 +242,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
...
@@ -242,7 +242,7 @@ void phy_procedures_nrUE_TX(PHY_VARS_NR_UE *ue,
//LOG_M("txdata.m","txs",ue->common_vars.txdata[0],1228800,1,1);
//LOG_M("txdata.m","txs",ue->common_vars.txdata[0],1228800,1,1);
/* RACH */
/* RACH */
if
(
get_softmodem_params
()
->
do_ra
==
1
)
{
if
(
(
get_softmodem_params
()
->
do_ra
==
1
)
||
(
get_softmodem_params
()
->
sa_ra
==
1
)
)
{
if
((
ue
->
UE_mode
[
gNB_id
]
>
NOT_SYNCHED
&&
ue
->
UE_mode
[
gNB_id
]
<
PUSCH
)
&&
(
ue
->
prach_vars
[
gNB_id
]
->
prach_Config_enabled
==
1
))
{
if
((
ue
->
UE_mode
[
gNB_id
]
>
NOT_SYNCHED
&&
ue
->
UE_mode
[
gNB_id
]
<
PUSCH
)
&&
(
ue
->
prach_vars
[
gNB_id
]
->
prach_Config_enabled
==
1
))
{
nr_ue_prach_procedures
(
ue
,
proc
,
gNB_id
,
mode
);
nr_ue_prach_procedures
(
ue
,
proc
,
gNB_id
,
mode
);
}
}
...
@@ -800,6 +800,11 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
...
@@ -800,6 +800,11 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
else
{
// This is to adjust the llr offset in the case of skipping over a dmrs symbol (i.e. in case of no PDSCH REs in DMRS)
else
{
// This is to adjust the llr offset in the case of skipping over a dmrs symbol (i.e. in case of no PDSCH REs in DMRS)
if
(
pdsch
==
RA_PDSCH
)
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
]
=
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
-
1
];
if
(
pdsch
==
RA_PDSCH
)
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
]
=
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
-
1
];
else
if
(
pdsch
==
PDSCH
)
{
else
if
(
pdsch
==
PDSCH
)
{
if
(
dlsch0
->
harq_processes
[
harq_pid
]
->
n_dmrs_cdm_groups
==
2
)
{
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
]
=
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
-
1
];
}
else
{
if
(
nr_rx_pdsch
(
ue
,
if
(
nr_rx_pdsch
(
ue
,
proc
,
proc
,
pdsch
,
pdsch
,
...
@@ -814,6 +819,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
...
@@ -814,6 +819,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_
dlsch0
->
current_harq_pid
)
<
0
)
dlsch0
->
current_harq_pid
)
<
0
)
return
-
1
;
return
-
1
;
}
}
}
else
AssertFatal
(
1
==
0
,
"not RA_PDSCH or PDSCH
\n
"
);
else
AssertFatal
(
1
==
0
,
"not RA_PDSCH or PDSCH
\n
"
);
}
}
if
(
pdsch
==
PDSCH
)
LOG_D
(
PHY
,
"Done processing symbol %d : llr_offset %d
\n
"
,
m
,
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
]);
if
(
pdsch
==
PDSCH
)
LOG_D
(
PHY
,
"Done processing symbol %d : llr_offset %d
\n
"
,
m
,
ue
->
pdsch_vars
[
proc
->
thread_id
][
eNB_id
]
->
llr_offset
[
m
]);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ra_procedures.c
View file @
287f47bf
...
@@ -553,12 +553,19 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
...
@@ -553,12 +553,19 @@ uint8_t nr_ue_get_rach(NR_PRACH_RESOURCES_t *prach_resources,
if
(
mac
->
RA_window_cnt
>=
0
&&
mac
->
RA_RAPID_found
==
1
)
{
if
(
mac
->
RA_window_cnt
>=
0
&&
mac
->
RA_RAPID_found
==
1
)
{
if
(
get_softmodem_params
()
->
sa_ra
)
{
mac
->
ra_state
=
WAIT_CONTENTION_RESOLUTION
;
}
else
{
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// Reset RA_active flag: it disables Msg3 retransmission (8.3 of TS 38.213)
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
// TbD Msg3 Retransmissions to be scheduled by DCI 0_0
mac
->
RA_active
=
0
;
mac
->
RA_active
=
0
;
mac
->
RA_window_cnt
=
-
1
;
mac
->
ra_state
=
RA_SUCCEEDED
;
mac
->
ra_state
=
RA_SUCCEEDED
;
mac
->
generate_nr_prach
=
2
;
mac
->
generate_nr_prach
=
2
;
}
mac
->
RA_window_cnt
=
-
1
;
LOG_I
(
MAC
,
"[MAC][UE %d][RAPROC]: RAR successfully received
\n
"
,
mod_id
);
LOG_I
(
MAC
,
"[MAC][UE %d][RAPROC]: RAR successfully received
\n
"
,
mod_id
);
}
else
if
(
mac
->
RA_window_cnt
==
0
&&
!
mac
->
RA_RAPID_found
)
{
}
else
if
(
mac
->
RA_window_cnt
==
0
&&
!
mac
->
RA_RAPID_found
)
{
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_dci_configuration.c
View file @
287f47bf
...
@@ -135,12 +135,22 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
...
@@ -135,12 +135,22 @@ void config_dci_pdu(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_dci_dl_pdu_rel15_t
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
//NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, 275);
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
//NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, 275);
rel15
->
SubcarrierSpacing
=
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
rel15
->
SubcarrierSpacing
=
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
rel15
->
dci_length_options
[
0
]
=
nr_dci_size
(
scc
,
mac
->
scg
,
def_dci_pdu_rel15
,
rel15
->
dci_format_options
[
0
],
NR_RNTI_RA
,
rel15
->
BWPSize
,
bwp_id
);
rel15
->
dci_length_options
[
0
]
=
nr_dci_size
(
scc
,
mac
->
scg
,
def_dci_pdu_rel15
,
rel15
->
dci_format_options
[
0
],
NR_RNTI_RA
,
rel15
->
BWPSize
,
bwp_id
);
LOG_D
(
PHY
,
"pdcch params: rnti %d, bwp %d %d, len %d
\n
"
,
rel15
->
rnti
,
rel15
->
BWPSize
,
rel15
->
BWPStart
,
rel15
->
dci_length_options
[
0
]);
break
;
break
;
case
NR_RNTI_P
:
case
NR_RNTI_P
:
break
;
break
;
case
NR_RNTI_CS
:
case
NR_RNTI_CS
:
break
;
break
;
case
NR_RNTI_TC
:
case
NR_RNTI_TC
:
// we use the initial DL BWP
sps
=
initialDownlinkBWP
->
genericParameters
.
cyclicPrefix
==
NULL
?
14
:
12
;
monitoringSymbolsWithinSlot
=
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
0
]
<<
(
sps
-
8
))
|
(
ss
->
monitoringSymbolsWithinSlot
->
buf
[
1
]
>>
(
16
-
sps
));
rel15
->
rnti
=
mac
->
t_crnti
;
rel15
->
BWPSize
=
NRRIV2BW
(
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
275
);
rel15
->
BWPStart
=
NRRIV2PRBOFFSET
(
bwp_Common
->
genericParameters
.
locationAndBandwidth
,
275
);
//NRRIV2PRBOFFSET(initialDownlinkBWP->genericParameters.locationAndBandwidth, 275);
rel15
->
SubcarrierSpacing
=
initialDownlinkBWP
->
genericParameters
.
subcarrierSpacing
;
rel15
->
dci_length_options
[
0
]
=
nr_dci_size
(
scc
,
mac
->
scg
,
def_dci_pdu_rel15
,
rel15
->
dci_format_options
[
0
],
NR_RNTI_TC
,
rel15
->
BWPSize
,
bwp_id
);
LOG_D
(
PHY
,
"pdcch params: rnti %d, bwp %d %d (%d), len %d
\n
"
,
rel15
->
rnti
,
rel15
->
BWPSize
,
rel15
->
BWPStart
,
initialDownlinkBWP
->
genericParameters
.
locationAndBandwidth
,
rel15
->
dci_length_options
[
0
]);
break
;
break
;
case
NR_RNTI_SP_CSI
:
case
NR_RNTI_SP_CSI
:
break
;
break
;
...
@@ -222,7 +232,12 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
...
@@ -222,7 +232,12 @@ void ue_dci_configuration(NR_UE_MAC_INST_t *mac, fapi_nr_dl_config_request_t *dl
fill_dci_search_candidates
(
ss
,
rel15
);
fill_dci_search_candidates
(
ss
,
rel15
);
break
;
break
;
case
WAIT_CONTENTION_RESOLUTION
:
case
WAIT_CONTENTION_RESOLUTION
:
LOG_D
(
MAC
,
"[DCI_CONFIG] frame %d %d Configure monitoring of PDCCH candidates in Type1-PDCCH common random access search space
\n
"
,
frame
,
slot
);
rel15
->
rnti
=
mac
->
t_crnti
;
rel15
->
rnti
=
mac
->
t_crnti
;
rel15
->
num_dci_options
=
1
;
// just search the dci for msg4, should add the ul dci for retx for msg3 later.
rel15
->
dci_format_options
[
0
]
=
NR_DL_DCI_FORMAT_1_0
;
config_dci_pdu
(
mac
,
rel15
,
dl_config
,
NR_RNTI_TC
,
ss_id
);
fill_dci_search_candidates
(
ss
,
rel15
);
break
;
break
;
default:
default:
break
;
break
;
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
287f47bf
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/config.c
View file @
287f47bf
...
@@ -387,7 +387,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
...
@@ -387,7 +387,7 @@ int rrc_mac_config_req_gNB(module_id_t Mod_idP,
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
if
(
add_ue
==
1
&&
get_softmodem_params
()
->
phy_test
)
{
if
(
add_ue
==
1
&&
get_softmodem_params
()
->
phy_test
)
{
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
);
const
int
UE_id
=
add_new_nr_ue
(
Mod_idP
,
rnti
,
true
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
UE_info
->
secondaryCellGroup
[
UE_id
]
=
secondaryCellGroup
;
compute_csi_bitlen
(
secondaryCellGroup
,
UE_info
,
UE_id
);
compute_csi_bitlen
(
secondaryCellGroup
,
UE_info
,
UE_id
);
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
struct
NR_ServingCellConfig__downlinkBWP_ToAddModList
*
bwpList
=
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler.c
View file @
287f47bf
...
@@ -412,7 +412,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -412,7 +412,7 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
// This schedule RA procedure if not in phy_test mode
// This schedule RA procedure if not in phy_test mode
// Otherwise already consider 5G already connected
// Otherwise already consider 5G already connected
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
if
(
get_softmodem_params
()
->
phy_test
==
0
)
{
nr_schedule_RA
(
module_idP
,
frame
,
slot
);
nr_schedule_RA
(
module_idP
,
frame
,
slot
,
num_slots_per_tdd
);
}
}
// This schedules the DCI for Uplink and subsequently PUSCH
// This schedules the DCI for Uplink and subsequently PUSCH
...
@@ -427,7 +427,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
...
@@ -427,7 +427,8 @@ void gNB_dlsch_ulsch_scheduler(module_id_t module_idP,
}
}
if
(
UE_info
->
active
[
UE_id
])
//if (UE_info->active[UE_id])
if
(
UE_info
->
rnti
[
UE_id
]
>
0
)
nr_schedule_pucch
(
module_idP
,
UE_id
,
nr_ulmix_slots
,
frame
,
slot
);
nr_schedule_pucch
(
module_idP
,
UE_id
,
nr_ulmix_slots
,
frame
,
slot
);
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
stop_meas
(
&
RC
.
nrmac
[
module_idP
]
->
eNB_scheduler
);
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c
View file @
287f47bf
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c
View file @
287f47bf
...
@@ -375,25 +375,26 @@ uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData) {
...
@@ -375,25 +375,26 @@ uint8_t getN_PRB_DMRS(NR_BWP_Downlink_t *bwp, int numDmrsCdmGrpsNoData) {
void
nr_simple_dlsch_preprocessor
(
module_id_t
module_id
,
void
nr_simple_dlsch_preprocessor
(
module_id_t
module_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
int
num_slots_per_tdd
)
{
int
num_slots_per_tdd
,
int
rnti_type
,
int
UE_id
)
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
module_id
]
->
UE_info
;
AssertFatal
(
UE_info
->
num_UEs
<=
1
,
"%s() cannot handle more than one UE, but found %d
\n
"
,
__func__
,
UE_info
->
num_UEs
);
if
(
UE_info
->
num_UEs
==
0
)
return
;
const
int
UE_id
=
0
;
const
int
CC_id
=
0
;
const
int
CC_id
=
0
;
rnti_t
rnti
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
uint16_t
Y
=
0
;
int
m
=
0
;
int
ss_type
;
int
cid
;
rnti
=
UE_info
->
rnti
[
UE_id
];
if
(
rnti_type
==
NR_RNTI_C
)
{
/* Retrieve amount of data to send for this UE */
/* Retrieve amount of data to send for this UE */
sched_ctrl
->
num_total_bytes
=
0
;
sched_ctrl
->
num_total_bytes
=
0
;
const
int
lcid
=
DL_SCH_LCID_DTCH
;
const
int
lcid
=
DL_SCH_LCID_DTCH
;
const
rnti_t
rnti
=
UE_info
->
rnti
[
UE_id
];
sched_ctrl
->
rlc_status
[
lcid
]
=
mac_rlc_status_ind
(
module_id
,
sched_ctrl
->
rlc_status
[
lcid
]
=
mac_rlc_status_ind
(
module_id
,
rnti
,
rnti
,
module_id
,
module_id
,
...
@@ -416,19 +417,52 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
...
@@ -416,19 +417,52 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
lcid
,
lcid
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
sched_ctrl
->
rlc_status
[
lcid
].
bytes_in_buffer
,
sched_ctrl
->
ta_apply
);
sched_ctrl
->
ta_apply
);
ss_type
=
1
;
// UE_Specific
/* Find a free CCE */
const
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
const
int
target_ss
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
sched_ctrl
->
search_space
=
get_searchspace
(
sched_ctrl
->
active_bwp
,
target_ss
);
sched_ctrl
->
search_space
=
get_searchspace
(
sched_ctrl
->
active_bwp
,
target_ss
);
sched_ctrl
->
coreset
=
get_coreset
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
search_space
,
ss_type
);
cid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
Y
=
UE_info
->
Y
[
UE_id
][
cid
][
slot
];
m
=
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
];
}
else
if
(
rnti_type
==
NR_RNTI_TC
)
{
gNB_MAC_INST
*
nr_mac
=
RC
.
nrmac
[
module_id
];
NR_COMMON_channels_t
*
cc
=
&
nr_mac
->
common_channels
[
CC_id
];
NR_RA_t
*
ra
=
&
cc
->
ra
[
0
];
/*
rrc_sdu_length = mac_rrc_data_req(module_idP, CC_idP, frameP, CCCH,
UE_RNTI(module_idP,UE_id),1, // 1 transport block
&cc[CC_idP].CCCH_pdu.payload[0], 0); // not used in this case
*/
int
rrc_sdu_length
=
500
;
sched_ctrl
->
num_total_bytes
+=
rrc_sdu_length
;
if
(
sched_ctrl
->
num_total_bytes
==
0
)
return
;
LOG_D
(
MAC
,
"[gNB %d][RAPROC] CC_id %d Frame %d, slot %d: UE_id %d, rrc_sdu_length %d
\n
"
,
module_id
,
CC_id
,
frame
,
slot
,
UE_id
,
rrc_sdu_length
);
sched_ctrl
->
search_space
=
ra
->
ra_ss
;
ss_type
=
0
;
// Common
sched_ctrl
->
coreset
=
get_coreset
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
search_space
,
ss_type
);
cid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
rnti
=
ra
->
rnti
;
}
else
{
return
;
}
/* Find a free CCE */
uint8_t
nr_of_candidates
;
uint8_t
nr_of_candidates
;
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
find_aggregation_candidates
(
&
sched_ctrl
->
aggregation_level
,
&
nr_of_candidates
,
&
nr_of_candidates
,
sched_ctrl
->
search_space
);
sched_ctrl
->
search_space
);
sched_ctrl
->
coreset
=
get_coreset
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
search_space
,
1
/* dedicated */
);
int
cid
=
sched_ctrl
->
coreset
->
controlResourceSetId
;
const
uint16_t
Y
=
UE_info
->
Y
[
UE_id
][
cid
][
slot
];
const
int
m
=
UE_info
->
num_pdcch_cand
[
UE_id
][
cid
];
sched_ctrl
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
sched_ctrl
->
cce_index
=
allocate_nr_CCEs
(
RC
.
nrmac
[
module_id
],
sched_ctrl
->
active_bwp
,
sched_ctrl
->
active_bwp
,
sched_ctrl
->
coreset
,
sched_ctrl
->
coreset
,
...
@@ -436,6 +470,9 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
...
@@ -436,6 +470,9 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
Y
,
Y
,
m
,
m
,
nr_of_candidates
);
nr_of_candidates
);
LOG_D
(
PHY
,
"simple: frame %d %d, rnti %d, cce index %d, ss_type %d, ue is active %d
\n
"
,
frame
,
slot
,
rnti
,
sched_ctrl
->
cce_index
,
ss_type
,
UE_info
->
active
[
UE_id
]);
if
(
sched_ctrl
->
cce_index
<
0
)
{
if
(
sched_ctrl
->
cce_index
<
0
)
{
LOG_E
(
MAC
,
"%s(): could not find CCE for UE %d
\n
"
,
__func__
,
UE_id
);
LOG_E
(
MAC
,
"%s(): could not find CCE for UE %d
\n
"
,
__func__
,
UE_id
);
return
;
return
;
...
@@ -449,7 +486,8 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
...
@@ -449,7 +486,8 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
slot
,
slot
,
num_slots_per_tdd
,
num_slots_per_tdd
,
&
sched_ctrl
->
pucch_sched_idx
,
&
sched_ctrl
->
pucch_sched_idx
,
&
sched_ctrl
->
pucch_occ_idx
);
&
sched_ctrl
->
pucch_occ_idx
,
ss_type
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
...
@@ -496,7 +534,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
...
@@ -496,7 +534,7 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
// modulation scheme
// modulation scheme
sched_ctrl
->
mcsTableIdx
=
0
;
sched_ctrl
->
mcsTableIdx
=
0
;
sched_ctrl
->
mcs
=
9
;
sched_ctrl
->
mcs
=
9
;
sched_ctrl
->
numDmrsCdmGrpsNoData
=
1
;
sched_ctrl
->
numDmrsCdmGrpsNoData
=
(
ss_type
==
1
)
?
1
:
2
;
// Freq-demain allocation
// Freq-demain allocation
while
(
rbStart
<
bwpSize
&&
vrb_map
[
rbStart
])
rbStart
++
;
while
(
rbStart
<
bwpSize
&&
vrb_map
[
rbStart
])
rbStart
++
;
...
@@ -505,13 +543,22 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
...
@@ -505,13 +543,22 @@ void nr_simple_dlsch_preprocessor(module_id_t module_id,
getN_PRB_DMRS
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
numDmrsCdmGrpsNoData
);
getN_PRB_DMRS
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
numDmrsCdmGrpsNoData
);
int
nrOfSymbols
=
getNrOfSymbols
(
sched_ctrl
->
active_bwp
,
int
nrOfSymbols
=
getNrOfSymbols
(
sched_ctrl
->
active_bwp
,
sched_ctrl
->
time_domain_allocation
);
sched_ctrl
->
time_domain_allocation
);
uint8_t
N_DMRS_SLOT
=
get_num_dmrs_symbols
(
sched_ctrl
->
active_bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
,
uint8_t
N_DMRS_SLOT
=
get_num_dmrs_symbols
(
(
ss_type
==
1
)
?
sched_ctrl
->
active_bwp
->
bwp_Dedicated
->
pdsch_Config
->
choice
.
setup
:
NULL
,
RC
.
nrmac
[
module_id
]
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
RC
.
nrmac
[
module_id
]
->
common_channels
->
ServingCellConfigCommon
->
dmrs_TypeA_Position
,
nrOfSymbols
);
nrOfSymbols
);
int
rbSize
=
0
;
int
rbSize
=
0
;
const
int
oh
=
2
+
(
sched_ctrl
->
num_total_bytes
>=
256
)
int
oh
;
if
(
rnti_type
==
NR_RNTI_C
)
{
oh
=
2
+
(
sched_ctrl
->
num_total_bytes
>=
256
)
+
2
*
(
frame
==
(
sched_ctrl
->
ta_frame
+
10
)
%
1024
);
+
2
*
(
frame
==
(
sched_ctrl
->
ta_frame
+
10
)
%
1024
);
}
else
{
// NR_RNTI_TC, msg4
oh
=
2
+
(
sched_ctrl
->
num_total_bytes
>=
256
)
+
1
+
6
;
// UE Contention Resolution Identity CE
}
uint32_t
TBS
=
0
;
uint32_t
TBS
=
0
;
do
{
do
{
rbSize
++
;
rbSize
++
;
...
@@ -540,16 +587,20 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -540,16 +587,20 @@ void nr_schedule_ue_spec(module_id_t module_id,
int
num_slots_per_tdd
)
{
int
num_slots_per_tdd
)
{
gNB_MAC_INST
*
gNB_mac
=
RC
.
nrmac
[
module_id
];
gNB_MAC_INST
*
gNB_mac
=
RC
.
nrmac
[
module_id
];
/* PREPROCESSOR */
gNB_mac
->
pre_processor_dl
(
module_id
,
frame
,
slot
,
num_slots_per_tdd
);
NR_UE_info_t
*
UE_info
=
&
gNB_mac
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
gNB_mac
->
UE_info
;
const
int
CC_id
=
0
;
const
int
CC_id
=
0
;
NR_UE_list_t
*
UE_list
=
&
UE_info
->
list
;
NR_UE_list_t
*
UE_list
=
&
UE_info
->
list
;
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
for
(
int
UE_id
=
UE_list
->
head
;
UE_id
>=
0
;
UE_id
=
UE_list
->
next
[
UE_id
])
{
if
(
!
UE_info
->
active
[
UE_id
])
continue
;
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
NR_UE_sched_ctrl_t
*
sched_ctrl
=
&
UE_info
->
UE_sched_ctrl
[
UE_id
];
/* PREPROCESSOR */
gNB_mac
->
pre_processor_dl
(
module_id
,
frame
,
slot
,
num_slots_per_tdd
,
NR_RNTI_C
,
UE_id
);
/* update TA and set ta_apply every 10 frames.
/* update TA and set ta_apply every 10 frames.
* Possible improvement: take the periodicity from input file.
* Possible improvement: take the periodicity from input file.
* If such UE is not scheduled now, it will be by the preprocessor later.
* If such UE is not scheduled now, it will be by the preprocessor later.
...
@@ -620,7 +671,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -620,7 +671,8 @@ void nr_schedule_ue_spec(module_id_t module_id,
nrOfSymbols
,
nrOfSymbols
,
current_harq_pid
,
current_harq_pid
,
harq
->
ndi
,
harq
->
ndi
,
harq
->
round
);
harq
->
round
,
NR_RNTI_C
);
NR_UE_ret_info_t
*
retInfo
=
&
sched_ctrl
->
retInfo
[
current_harq_pid
];
NR_UE_ret_info_t
*
retInfo
=
&
sched_ctrl
->
retInfo
[
current_harq_pid
];
if
(
harq
->
round
!=
0
)
{
/* retransmission */
if
(
harq
->
round
!=
0
)
{
/* retransmission */
...
@@ -712,7 +764,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -712,7 +764,7 @@ void nr_schedule_ue_spec(module_id_t module_id,
header_length_total
+=
header_length_last
;
header_length_total
+=
header_length_last
;
num_sdus
++
;
num_sdus
++
;
}
}
else
if
(
get_softmodem_params
()
->
phy_test
||
get_softmodem_params
()
->
do_ra
)
{
else
if
(
get_softmodem_params
()
->
phy_test
||
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
sa_ra
)
{
LOG_D
(
MAC
,
"Configuring DL_TX in %d.%d: random data
\n
"
,
frame
,
slot
);
LOG_D
(
MAC
,
"Configuring DL_TX in %d.%d: random data
\n
"
,
frame
,
slot
);
// fill dlsch_buffer with random data
// fill dlsch_buffer with random data
for
(
int
i
=
0
;
i
<
TBS
;
i
++
)
for
(
int
i
=
0
;
i
<
TBS
;
i
++
)
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_phytest.c
View file @
287f47bf
...
@@ -334,7 +334,8 @@ void nr_preprocessor_phytest(module_id_t module_id,
...
@@ -334,7 +334,8 @@ void nr_preprocessor_phytest(module_id_t module_id,
slot
,
slot
,
num_slots_per_tdd
,
num_slots_per_tdd
,
&
sched_ctrl
->
pucch_sched_idx
,
&
sched_ctrl
->
pucch_sched_idx
,
&
sched_ctrl
->
pucch_occ_idx
);
&
sched_ctrl
->
pucch_occ_idx
,
1
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
AssertFatal
(
sched_ctrl
->
pucch_sched_idx
>=
0
,
"no uplink slot for PUCCH found!
\n
"
);
sched_ctrl
->
rbStart
=
rbStart
;
sched_ctrl
->
rbStart
=
rbStart
;
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c
View file @
287f47bf
This diff is collapsed.
Click to expand it.
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_uci.c
View file @
287f47bf
...
@@ -40,7 +40,9 @@ void nr_schedule_pucch(int Mod_idP,
...
@@ -40,7 +40,9 @@ void nr_schedule_pucch(int Mod_idP,
frame_t
frameP
,
frame_t
frameP
,
sub_frame_t
slotP
)
{
sub_frame_t
slotP
)
{
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
AssertFatal
(
UE_info
->
active
[
UE_id
],
"Cannot find UE_id %d is not active
\n
"
,
UE_id
);
//AssertFatal(UE_info->active[UE_id],"Cannot find UE_id %d is not active\n",UE_id);
if
(
UE_info
->
active
[
UE_id
]
<=
0
)
LOG_D
(
MAC
,
"Cannot find UE_id %d is not active
\n
"
,
UE_id
);
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
for
(
int
k
=
0
;
k
<
nr_ulmix_slots
;
k
++
)
{
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
for
(
int
l
=
0
;
l
<
2
;
l
++
)
{
...
@@ -280,6 +282,8 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -280,6 +282,8 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
)
const
nfapi_nr_uci_pucch_pdu_format_0_1_t
*
uci_01
)
{
{
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
int
UE_id
=
find_nr_UE_id
(
mod_id
,
uci_01
->
rnti
);
LOG_D
(
MAC
,
"handle_nr_uci_pucch_0_1, ue id %d, rnti %d
\n
"
,
UE_id
,
uci_01
->
rnti
);
if
(
UE_id
<
0
)
{
if
(
UE_id
<
0
)
{
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_01
->
rnti
);
LOG_E
(
MAC
,
"%s(): unknown RNTI %04x in PUCCH UCI
\n
"
,
__func__
,
uci_01
->
rnti
);
return
;
return
;
...
@@ -314,6 +318,10 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -314,6 +318,10 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
else
else
sched_ctrl
->
harq_processes
[
harq_idx
].
round
++
;
sched_ctrl
->
harq_processes
[
harq_idx
].
round
++
;
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
LOG_D
(
MAC
,
"%s(): RNTI %04x in PUCCH UCI, harq bit %d, idx %d, feedbanck slot %d, round %d, harq value %d, confidence %d
\n
"
,
__func__
,
uci_01
->
rnti
,
harq_bit
,
harq_idx
,
sched_ctrl
->
harq_processes
[
harq_idx
].
feedback_slot
,
sched_ctrl
->
harq_processes
[
harq_idx
].
round
,
uci_01
->
harq
->
harq_list
[
harq_bit
].
harq_value
,
uci_01
->
harq
->
harq_confidence_level
);
harq_idx_s
=
harq_idx
+
1
;
harq_idx_s
=
harq_idx
+
1
;
// if the max harq rounds was reached
// if the max harq rounds was reached
if
(
sched_ctrl
->
harq_processes
[
harq_idx
].
round
==
max_harq_rounds
)
{
if
(
sched_ctrl
->
harq_processes
[
harq_idx
].
round
==
max_harq_rounds
)
{
...
@@ -334,6 +342,10 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
...
@@ -334,6 +342,10 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
sched_ctrl
->
harq_processes
[
harq_idx
].
round
=
0
;
sched_ctrl
->
harq_processes
[
harq_idx
].
round
=
0
;
}
}
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
LOG_D
(
MAC
,
"%s(): RNTI %04x in PUCCH UCI, harq bit %d, idx %d, feedbanck slot %d, round %d, harq value %d, confidence %d
\n
"
,
__func__
,
uci_01
->
rnti
,
harq_bit
,
harq_idx
,
sched_ctrl
->
harq_processes
[
harq_idx
].
feedback_slot
,
sched_ctrl
->
harq_processes
[
harq_idx
].
round
,
uci_01
->
harq
->
harq_list
[
harq_bit
].
harq_value
,
uci_01
->
harq
->
harq_confidence_level
);
}
}
}
}
}
}
...
@@ -380,6 +392,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
...
@@ -380,6 +392,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
else
else
sched_ctrl
->
harq_processes
[
harq_idx
].
round
++
;
sched_ctrl
->
harq_processes
[
harq_idx
].
round
++
;
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
LOG_D
(
MAC
,
"%s(): RNTI %04x in PUCCH UCI, harq bit %d, idx %d, feedbanck slot %d, round %d, harq crc %d, acknack %d
\n
"
,
__func__
,
uci_234
->
rnti
,
harq_bit
,
harq_idx
,
sched_ctrl
->
harq_processes
[
harq_idx
].
feedback_slot
,
sched_ctrl
->
harq_processes
[
harq_idx
].
round
,
uci_234
->
harq
.
harq_crc
,
acknack
);
harq_idx_s
=
harq_idx
+
1
;
harq_idx_s
=
harq_idx
+
1
;
// if the max harq rounds was reached
// if the max harq rounds was reached
if
(
sched_ctrl
->
harq_processes
[
harq_idx
].
round
==
max_harq_rounds
)
{
if
(
sched_ctrl
->
harq_processes
[
harq_idx
].
round
==
max_harq_rounds
)
{
...
@@ -400,6 +416,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
...
@@ -400,6 +416,10 @@ void handle_nr_uci_pucch_2_3_4(module_id_t mod_id,
sched_ctrl
->
harq_processes
[
harq_idx
].
round
=
0
;
sched_ctrl
->
harq_processes
[
harq_idx
].
round
=
0
;
}
}
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
sched_ctrl
->
harq_processes
[
harq_idx
].
is_waiting
=
0
;
LOG_D
(
MAC
,
"%s(): RNTI %04x in PUCCH UCI, harq bit %d, idx %d, feedbanck slot %d, round %d, harq crc %d, acknack %d
\n
"
,
__func__
,
uci_234
->
rnti
,
harq_bit
,
harq_idx
,
sched_ctrl
->
harq_processes
[
harq_idx
].
feedback_slot
,
sched_ctrl
->
harq_processes
[
harq_idx
].
round
,
uci_234
->
harq
.
harq_crc
,
acknack
);
}
}
}
}
}
}
...
@@ -414,7 +434,8 @@ void nr_acknack_scheduling(int Mod_idP,
...
@@ -414,7 +434,8 @@ void nr_acknack_scheduling(int Mod_idP,
sub_frame_t
slotP
,
sub_frame_t
slotP
,
int
slots_per_tdd
,
int
slots_per_tdd
,
int
*
pucch_id
,
int
*
pucch_id
,
int
*
pucch_occ
)
{
int
*
pucch_occ
,
int
isUEspec
)
{
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
;
NR_ServingCellConfigCommon_t
*
scc
=
RC
.
nrmac
[
Mod_idP
]
->
common_channels
->
ServingCellConfigCommon
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
NR_UE_info_t
*
UE_info
=
&
RC
.
nrmac
[
Mod_idP
]
->
UE_info
;
...
@@ -440,7 +461,15 @@ void nr_acknack_scheduling(int Mod_idP,
...
@@ -440,7 +461,15 @@ void nr_acknack_scheduling(int Mod_idP,
max_acknacks
=
2
;
max_acknacks
=
2
;
// this is hardcoded for now as ue specific
// this is hardcoded for now as ue specific
NR_SearchSpace__searchSpaceType_PR
ss_type
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
NR_SearchSpace__searchSpaceType_PR
ss_type
;
if
(
isUEspec
==
1
)
{
ss_type
=
NR_SearchSpace__searchSpaceType_PR_ue_Specific
;
}
else
{
ss_type
=
NR_SearchSpace__searchSpaceType_PR_common
;
}
get_pdsch_to_harq_feedback
(
Mod_idP
,
UE_id
,
ss_type
,
pdsch_to_harq_feedback
);
get_pdsch_to_harq_feedback
(
Mod_idP
,
UE_id
,
ss_type
,
pdsch_to_harq_feedback
);
// for each possible ul or mixed slot
// for each possible ul or mixed slot
...
...
openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_ulsch.c
View file @
287f47bf
...
@@ -395,7 +395,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -395,7 +395,8 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
current_rnti
);
current_rnti
);
continue
;
continue
;
}
}
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
);
bool
isActive
=
(
get_softmodem_params
()
->
sa_ra
?
false
:
true
);
const
int
UE_id
=
add_new_nr_ue
(
gnb_mod_idP
,
ra
->
rnti
,
isActive
);
UE_info
->
secondaryCellGroup
[
UE_id
]
=
ra
->
secondaryCellGroup
;
UE_info
->
secondaryCellGroup
[
UE_id
]
=
ra
->
secondaryCellGroup
;
compute_csi_bitlen
(
ra
->
secondaryCellGroup
,
UE_info
,
UE_id
);
compute_csi_bitlen
(
ra
->
secondaryCellGroup
,
UE_info
,
UE_id
);
UE_info
->
UE_beam_index
[
UE_id
]
=
ra
->
beam_id
;
UE_info
->
UE_beam_index
[
UE_id
]
=
ra
->
beam_id
;
...
@@ -420,13 +421,22 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
...
@@ -420,13 +421,22 @@ void nr_rx_sdu(const module_id_t gnb_mod_idP,
// re-initialize ta update variables afrer RA procedure completion
// re-initialize ta update variables afrer RA procedure completion
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
UE_info
->
UE_sched_ctrl
[
UE_id
].
ta_frame
=
frameP
;
if
(
isActive
)
// NSA mode
{
free
(
ra
->
preambles
.
preamble_list
);
free
(
ra
->
preambles
.
preamble_list
);
ra
->
state
=
RA_IDLE
;
ra
->
state
=
RA_IDLE
;
LOG_I
(
MAC
,
LOG_I
(
MAC
,
"reset RA state information for RA-RNTI %04x/index %d
\n
"
,
"reset RA state information for RA-RNTI %04x/index %d
\n
"
,
ra
->
rnti
,
ra
->
rnti
,
i
);
i
);
}
else
// SA mode
{
ra
->
state
=
Msg4
;
ra
->
Msg4_frame
=
(
frameP
+
2
)
%
1024
;
ra
->
Msg4_slot
=
1
;
LOG_I
(
MAC
,
"set RA state to Msg4 for RA-RNTI %04x, msg4 frame %d %d
\n
"
,
ra
->
rnti
,
ra
->
Msg4_frame
,
ra
->
Msg4_slot
);
}
return
;
return
;
}
}
}
}
...
...
openair2/LAYER2/NR_MAC_gNB/mac_proto.h
View file @
287f47bf
...
@@ -84,7 +84,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
...
@@ -84,7 +84,9 @@ void nr_schedule_ue_spec(module_id_t module_id,
void
nr_simple_dlsch_preprocessor
(
module_id_t
module_id
,
void
nr_simple_dlsch_preprocessor
(
module_id_t
module_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
int
num_slots_per_tdd
);
int
num_slots_per_tdd
,
int
rnti_type
,
int
UE_id
);
void
schedule_nr_mib
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
uint8_t
slots_per_frame
);
void
schedule_nr_mib
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
subframeP
,
uint8_t
slots_per_frame
);
...
@@ -104,7 +106,7 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
...
@@ -104,7 +106,7 @@ void nr_simple_ulsch_preprocessor(module_id_t module_id,
/////// Random Access MAC-PHY interface functions and primitives ///////
/////// Random Access MAC-PHY interface functions and primitives ///////
void
nr_schedule_RA
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
);
void
nr_schedule_RA
(
module_id_t
module_idP
,
frame_t
frameP
,
sub_frame_t
slotP
,
int
num_slots_per_tdd
);
/* \brief Function to indicate a received preamble on PRACH. It initiates the RA procedure.
/* \brief Function to indicate a received preamble on PRACH. It initiates the RA procedure.
@param module_idP Instance ID of gNB
@param module_idP Instance ID of gNB
...
@@ -178,7 +180,8 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
...
@@ -178,7 +180,8 @@ void nr_fill_nfapi_dl_pdu(int Mod_id,
int
NrOfSymbols
,
int
NrOfSymbols
,
int
harq_pid
,
int
harq_pid
,
int
ndi
,
int
ndi
,
int
round
);
int
round
,
int
rnit_type
);
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
void
handle_nr_uci_pucch_0_1
(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
...
@@ -221,7 +224,8 @@ void nr_acknack_scheduling(int Mod_idP,
...
@@ -221,7 +224,8 @@ void nr_acknack_scheduling(int Mod_idP,
sub_frame_t
slotP
,
sub_frame_t
slotP
,
int
slots_per_tdd
,
int
slots_per_tdd
,
int
*
pucch_id
,
int
*
pucch_id
,
int
*
pucch_occ
);
int
*
pucch_occ
,
int
isUEspec
);
int
get_pucch_resource
(
NR_UE_info_t
*
UE_info
,
int
UE_id
,
int
k
,
int
l
);
int
get_pucch_resource
(
NR_UE_info_t
*
UE_info
,
int
UE_id
,
int
k
,
int
l
);
...
@@ -338,7 +342,7 @@ int find_nr_UE_id(module_id_t mod_idP, rnti_t rntiP);
...
@@ -338,7 +342,7 @@ int find_nr_UE_id(module_id_t mod_idP, rnti_t rntiP);
int
find_nr_RA_id
(
module_id_t
mod_idP
,
int
CC_idP
,
rnti_t
rntiP
);
int
find_nr_RA_id
(
module_id_t
mod_idP
,
int
CC_idP
,
rnti_t
rntiP
);
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
);
int
add_new_nr_ue
(
module_id_t
mod_idP
,
rnti_t
rntiP
,
bool
isActive
);
void
mac_remove_nr_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
void
mac_remove_nr_ue
(
module_id_t
mod_id
,
rnti_t
rnti
);
...
...
openair2/LAYER2/NR_MAC_gNB/main.c
View file @
287f47bf
...
@@ -96,7 +96,7 @@ void mac_top_init_gNB(void)
...
@@ -96,7 +96,7 @@ void mac_top_init_gNB(void)
// These should be out of here later
// These should be out of here later
pdcp_layer_init
();
pdcp_layer_init
();
if
(
IS_SOFTMODEM_NOS1
&&
!
get_softmodem_params
()
->
do_ra
)
if
(
IS_SOFTMODEM_NOS1
&&
!
get_softmodem_params
()
->
do_ra
&&
!
get_softmodem_params
()
->
sa_ra
)
nr_DRB_preconfiguration
(
0x1234
);
nr_DRB_preconfiguration
(
0x1234
);
rrc_init_nr_global_param
();
rrc_init_nr_global_param
();
...
@@ -117,6 +117,7 @@ void mac_top_init_gNB(void)
...
@@ -117,6 +117,7 @@ void mac_top_init_gNB(void)
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_GNB
;
list_el
++
)
{
for
(
list_el
=
0
;
list_el
<
MAX_MOBILES_PER_GNB
;
list_el
++
)
{
UE_info
->
list
.
next
[
list_el
]
=
-
1
;
UE_info
->
list
.
next
[
list_el
]
=
-
1
;
UE_info
->
active
[
list_el
]
=
false
;
UE_info
->
active
[
list_el
]
=
false
;
UE_info
->
rnti
[
list_el
]
=
0
;
for
(
int
list_harq
=
0
;
list_harq
<
NR_MAX_NB_HARQ_PROCESSES
;
list_harq
++
)
{
for
(
int
list_harq
=
0
;
list_harq
<
NR_MAX_NB_HARQ_PROCESSES
;
list_harq
++
)
{
UE_info
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
round
=
0
;
UE_info
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
round
=
0
;
UE_info
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
ndi
=
0
;
UE_info
->
UE_sched_ctrl
[
list_el
].
harq_processes
[
list_harq
].
ndi
=
0
;
...
...
openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h
View file @
287f47bf
...
@@ -476,7 +476,9 @@ typedef struct {
...
@@ -476,7 +476,9 @@ typedef struct {
typedef
void
(
*
nr_pp_impl_dl
)(
module_id_t
mod_id
,
typedef
void
(
*
nr_pp_impl_dl
)(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
int
num_slots_per_tdd
);
int
num_slots_per_tdd
,
int
rnti_type
,
int
UE_id
);
typedef
void
(
*
nr_pp_impl_ul
)(
module_id_t
mod_id
,
typedef
void
(
*
nr_pp_impl_ul
)(
module_id_t
mod_id
,
frame_t
frame
,
frame_t
frame
,
sub_frame_t
slot
,
sub_frame_t
slot
,
...
...
openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c
View file @
287f47bf
...
@@ -109,7 +109,7 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
...
@@ -109,7 +109,7 @@ int nr_ue_ul_indication(nr_uplink_indication_t *ul_info){
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
ret
=
nr_ue_scheduler
(
NULL
,
ul_info
);
if
(
is_nr_UL_slot
(
mac
->
scc
,
ul_info
->
slot_tx
)
&&
get_softmodem_params
()
->
do_ra
)
if
(
is_nr_UL_slot
(
mac
->
scc
,
ul_info
->
slot_tx
)
&&
(
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
sa_ra
)
)
nr_ue_prach_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
thread_id
);
nr_ue_prach_scheduler
(
module_id
,
ul_info
->
frame_tx
,
ul_info
->
slot_tx
,
ul_info
->
thread_id
);
switch
(
ret
){
switch
(
ret
){
...
...
openair2/RRC/NR/rrc_gNB.c
View file @
287f47bf
...
@@ -225,7 +225,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
...
@@ -225,7 +225,7 @@ static void init_NR_SI(gNB_RRC_INST *rrc, gNB_RrcConfigurationReq *configuration
(
NR_CellGroupConfig_t
*
)
NULL
(
NR_CellGroupConfig_t
*
)
NULL
);
);
if
(
get_softmodem_params
()
->
phy_test
>
0
||
get_softmodem_params
()
->
do_ra
>
0
)
{
if
(
get_softmodem_params
()
->
phy_test
>
0
||
get_softmodem_params
()
->
do_ra
>
0
||
get_softmodem_params
()
->
sa_ra
>
0
)
{
// This is for phytest only, emulate first X2 message if uecap.raw file is present
// This is for phytest only, emulate first X2 message if uecap.raw file is present
FILE
*
fd
;
FILE
*
fd
;
fd
=
fopen
(
"uecap.raw"
,
"r"
);
fd
=
fopen
(
"uecap.raw"
,
"r"
);
...
...
openair2/RRC/NR/rrc_gNB_internode.c
View file @
287f47bf
...
@@ -98,7 +98,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
...
@@ -98,7 +98,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
total_size
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
total_size
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
FILE
*
fd
;
// file to be generated for nr-ue
FILE
*
fd
;
// file to be generated for nr-ue
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
>
0
)
{
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
>
0
||
get_softmodem_params
()
->
sa_ra
>
0
)
{
// This is for phytest only, emulate first X2 message if uecap.raw file is present
// This is for phytest only, emulate first X2 message if uecap.raw file is present
LOG_I
(
RRC
,
"Dumping NR_RRCReconfiguration message (%jd bytes)
\n
"
,(
enc_rval
.
encoded
+
7
)
>>
3
);
LOG_I
(
RRC
,
"Dumping NR_RRCReconfiguration message (%jd bytes)
\n
"
,(
enc_rval
.
encoded
+
7
)
>>
3
);
for
(
int
i
=
0
;
i
<
(
enc_rval
.
encoded
+
7
)
>>
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
(
enc_rval
.
encoded
+
7
)
>>
3
;
i
++
)
{
...
@@ -123,7 +123,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
...
@@ -123,7 +123,7 @@ int generate_CG_Config(gNB_RRC_INST *rrc,
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
>
0
)
{
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
>
0
||
get_softmodem_params
()
->
sa_ra
>
0
)
{
LOG_I
(
RRC
,
"Dumping scg_RB_Config message (%jd bytes)
\n
"
,(
enc_rval
.
encoded
+
7
)
>>
3
);
LOG_I
(
RRC
,
"Dumping scg_RB_Config message (%jd bytes)
\n
"
,(
enc_rval
.
encoded
+
7
)
>>
3
);
for
(
int
i
=
0
;
i
<
(
enc_rval
.
encoded
+
7
)
>>
3
;
i
++
)
{
for
(
int
i
=
0
;
i
<
(
enc_rval
.
encoded
+
7
)
>>
3
;
i
++
)
{
...
...
openair2/RRC/NR/rrc_gNB_nsa.c
View file @
287f47bf
...
@@ -162,7 +162,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
...
@@ -162,7 +162,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
NR_RRCReconfiguration_IEs_t
*
reconfig_ies
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_IEs_t
));
NR_RRCReconfiguration_IEs_t
*
reconfig_ies
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_IEs_t
));
ue_context_p
->
ue_context
.
reconfig
->
criticalExtensions
.
choice
.
rrcReconfiguration
=
reconfig_ies
;
ue_context_p
->
ue_context
.
reconfig
->
criticalExtensions
.
choice
.
rrcReconfiguration
=
reconfig_ies
;
carrier
->
initial_csi_index
[
rrc
->
Nb_ue
]
=
0
;
carrier
->
initial_csi_index
[
rrc
->
Nb_ue
]
=
0
;
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
){
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
||
get_softmodem_params
()
->
sa_ra
==
1
){
ue_context_p
->
ue_context
.
rb_config
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_t
));
ue_context_p
->
ue_context
.
rb_config
=
calloc
(
1
,
sizeof
(
NR_RRCReconfiguration_t
));
fill_default_rbconfig
(
ue_context_p
->
ue_context
.
rb_config
);
fill_default_rbconfig
(
ue_context_p
->
ue_context
.
rb_config
);
}
}
...
@@ -255,7 +255,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
...
@@ -255,7 +255,7 @@ void rrc_add_nsa_user(gNB_RRC_INST *rrc,struct rrc_gNB_ue_context_s *ue_context_
1024
);
1024
);
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
rrc_buffer_size
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
X2AP_ENDC_SGNB_ADDITION_REQ_ACK
(
msg
).
rrc_buffer_size
=
(
enc_rval
.
encoded
+
7
)
>>
3
;
itti_send_msg_to_task
(
TASK_X2AP
,
ENB_MODULE_ID_TO_INSTANCE
(
0
),
msg
);
//Check right id instead of hardcoding
itti_send_msg_to_task
(
TASK_X2AP
,
ENB_MODULE_ID_TO_INSTANCE
(
0
),
msg
);
//Check right id instead of hardcoding
}
else
if
(
get_softmodem_params
()
->
do_ra
)
{
}
else
if
(
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
sa_ra
)
{
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
ue_context_p
->
ue_id_rnti
,
0
,
0
,
rrc
->
module_id
);
PROTOCOL_CTXT_SET_BY_MODULE_ID
(
&
ctxt
,
rrc
->
module_id
,
GNB_FLAG_YES
,
ue_context_p
->
ue_id_rnti
,
0
,
0
,
rrc
->
module_id
);
}
}
...
...
openair2/RRC/NR/rrc_gNB_reconfig.c
View file @
287f47bf
...
@@ -79,7 +79,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
...
@@ -79,7 +79,7 @@ void fill_default_secondaryCellGroup(NR_ServingCellConfigCommon_t *servingcellco
secondaryCellGroup
->
cellGroupId
=
scg_id
;
secondaryCellGroup
->
cellGroupId
=
scg_id
;
NR_RLC_BearerConfig_t
*
RLC_BearerConfig
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
));
NR_RLC_BearerConfig_t
*
RLC_BearerConfig
=
calloc
(
1
,
sizeof
(
*
RLC_BearerConfig
));
nr_rlc_bearer_init
(
RLC_BearerConfig
);
nr_rlc_bearer_init
(
RLC_BearerConfig
);
if
(
get_softmodem_params
()
->
do_ra
)
if
(
(
get_softmodem_params
()
->
do_ra
)
||
(
get_softmodem_params
()
->
sa_ra
)
)
nr_drb_config
(
RLC_BearerConfig
->
rlc_Config
,
NR_RLC_Config_PR_um_Bi_Directional
);
nr_drb_config
(
RLC_BearerConfig
->
rlc_Config
,
NR_RLC_Config_PR_um_Bi_Directional
);
else
else
nr_drb_config
(
RLC_BearerConfig
->
rlc_Config
,
NR_RLC_Config_PR_am
);
nr_drb_config
(
RLC_BearerConfig
->
rlc_Config
,
NR_RLC_Config_PR_am
);
...
...
openair2/RRC/NR_UE/rrc_UE.c
View file @
287f47bf
...
@@ -458,7 +458,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
...
@@ -458,7 +458,7 @@ NR_UE_RRC_INST_t* openair_rrc_top_init_ue_nr(char* rrc_config_path){
RRC_LIST_INIT
(
NR_UE_rrc_inst
[
nr_ue
].
CSI_ReportConfig_list
,
NR_maxNrofCSI_ReportConfigurations
);
RRC_LIST_INIT
(
NR_UE_rrc_inst
[
nr_ue
].
CSI_ReportConfig_list
,
NR_maxNrofCSI_ReportConfigurations
);
}
}
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
==
1
)
{
if
(
get_softmodem_params
()
->
phy_test
==
1
||
get_softmodem_params
()
->
do_ra
||
get_softmodem_params
()
->
sa_ra
==
1
)
{
// read in files for RRCReconfiguration and RBconfig
// read in files for RRCReconfiguration and RBconfig
FILE
*
fd
;
FILE
*
fd
;
char
filename
[
1024
];
char
filename
[
1024
];
...
...
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