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
zzha zzha
OpenXG-RAN
Commits
7e244b3d
Commit
7e244b3d
authored
Jan 23, 2024
by
Laurent THOMAS
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make return in ul_config case correct, replace asserts by LOG_E()and return error
parent
84ade524
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
50 additions
and
35 deletions
+50
-35
executables/nr-ue.c
executables/nr-ue.c
+6
-1
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
+1
-3
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
+3
-6
openair2/LAYER2/NR_MAC_UE/mac_proto.h
openair2/LAYER2/NR_MAC_UE/mac_proto.h
+8
-2
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
+24
-21
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
+8
-2
No files found.
executables/nr-ue.c
View file @
7e244b3d
...
...
@@ -540,7 +540,12 @@ void processSlotTX(void *arg) {
PHY_VARS_NR_UE
*
UE
=
rxtxD
->
UE
;
nr_phy_data_tx_t
phy_data
=
{
0
};
LOG_D
(
PHY
,
"%d.%d => slot type %d
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
,
proc
->
tx_slot_type
);
LOG_D
(
PHY
,
"SlotTx %d.%d => slot type %d, wait: %d
\n
"
,
proc
->
frame_tx
,
proc
->
nr_slot_tx
,
proc
->
tx_slot_type
,
rxtxD
->
tx_wait_for_dlsch
);
if
(
proc
->
tx_slot_type
==
NR_UPLINK_SLOT
||
proc
->
tx_slot_type
==
NR_MIXED_SLOT
){
if
(
rxtxD
->
tx_wait_for_dlsch
)
LOG_D
(
PHY
,
"enter wait for tx, slot %d, nb events to wait %d; "
,
proc
->
nr_slot_tx
,
rxtxD
->
tx_wait_for_dlsch
);
...
...
openair1/PHY/NR_TRANSPORT/nr_ulsch_decoding.c
View file @
7e244b3d
...
...
@@ -372,9 +372,7 @@ int nr_ulsch_decoding(PHY_VARS_gNB *phy_vars_gNB,
}
LOG_D
(
PHY
,
"ULSCH Decoding, ulsch_id %d, harq_pid %d rnti %x TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, Coderate %f RV %d round %d new "
"RX %d
\n
"
,
ULSCH_id
,
"ULSCH Decoding, harq_pid %d rnti %x TBS %d G %d mcs %d Nl %d nb_rb %d, Qm %d, Coderate %f RV %d round %d new RX %d
\n
"
,
harq_pid
,
ulsch
->
rnti
,
A
,
...
...
openair1/SCHED_NR_UE/phy_procedures_nr_ue.c
View file @
7e244b3d
...
...
@@ -1025,7 +1025,6 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
time_stats_t
meas
=
{
0
};
start_meas
(
&
meas
);
// do procedures for C-RNTI
int
ret_pdsch
=
0
;
const
uint32_t
rxdataF_sz
=
ue
->
frame_parms
.
samples_per_slot_wCP
;
__attribute__
((
aligned
(
32
)))
c16_t
rxdataF
[
ue
->
frame_parms
.
nb_antennas_rx
][
rxdataF_sz
];
...
...
@@ -1081,11 +1080,8 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
llr
[
i
]
=
(
int16_t
*
)
malloc16_clear
(
rx_llr_buf_sz
*
sizeof
(
int16_t
));
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C
,
VCD_FUNCTION_IN
);
ret_pdsch
=
nr_ue_pdsch_procedures
(
ue
,
proc
,
dlsch
,
llr
,
rxdataF
);
// it returns -1 in case of internal failure, or 0 in case of normal result
int
ret_pdsch
=
nr_ue_pdsch_procedures
(
ue
,
proc
,
dlsch
,
llr
,
rxdataF
);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDSCH_PROC_C
,
VCD_FUNCTION_OUT
);
...
...
@@ -1103,6 +1099,7 @@ void pdsch_processing(PHY_VARS_NR_UE *ue, const UE_nr_rxtx_proc_t *proc, nr_phy_
send_dl_done_to_tx_thread
(
ue
->
tx_resume_ind_fifo
+
(
proc
->
nr_slot_rx
+
dlsch_config
->
k1_feedback
)
%
ue
->
frame_parms
.
slots_per_frame
,
proc
->
nr_slot_rx
);
LOG_W
(
NR_PHY
,
"nr_ue_pdsch_procedures failed in slot %d
\n
"
,
proc
->
nr_slot_rx
);
}
stop_meas
(
&
ue
->
dlsch_procedures_stat
);
...
...
openair2/LAYER2/NR_MAC_UE/mac_proto.h
View file @
7e244b3d
...
...
@@ -382,7 +382,7 @@ int get_deltatf(uint16_t nb_of_prbs,
int
N_sc_ctrl_RB
,
int
O_UCI
);
void
nr_ue_configure_pucch
(
NR_UE_MAC_INST_t
*
mac
,
int
nr_ue_configure_pucch
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
,
uint16_t
rnti
,
PUCCH_sched_t
*
pucch
,
...
...
@@ -496,7 +496,13 @@ int16_t compute_nr_SSB_PL(NR_UE_MAC_INST_t *mac, short ssb_rsrp_dBm);
// - in which ULSCH should be scheduled. K2 is configured in RRC configuration.
// PUSCH Msg3 scheduler:
// - scheduled by RAR UL grant according to 8.3 of TS 38.213
int
nr_ue_pusch_scheduler
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
is_Msg3
,
frame_t
current_frame
,
int
current_slot
,
frame_t
*
frame_tx
,
int
*
slot_tx
,
long
k2
);
int
nr_ue_pusch_scheduler
(
const
NR_UE_MAC_INST_t
*
mac
,
const
uint8_t
is_Msg3
,
const
frame_t
current_frame
,
const
int
current_slot
,
frame_t
*
frame_tx
,
int
*
slot_tx
,
const
long
k2
);
int
get_rnti_type
(
NR_UE_MAC_INST_t
*
mac
,
uint16_t
rnti
);
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c
View file @
7e244b3d
...
...
@@ -102,7 +102,7 @@ random-access procedure
@param selected_rar_buffer the output buffer for storing the selected RAR header and RAR payload
@returns timing advance or 0xffff if preamble doesn't match
*/
static
int
nr_ue_process_rar
(
nr_downlink_indication_t
*
dl_info
,
int
pdu_id
);
static
void
nr_ue_process_rar
(
nr_downlink_indication_t
*
dl_info
,
int
pdu_id
);
int
get_pucch0_mcs
(
const
int
O_ACK
,
const
int
O_SR
,
const
int
ack_payload
,
const
int
sr_payload
)
{
...
...
@@ -190,7 +190,7 @@ int get_rnti_type(NR_UE_MAC_INST_t *mac, uint16_t rnti)
}
else
if
(
rnti
==
0xFFFF
)
{
rnti_type
=
TYPE_SI_RNTI_
;
}
else
{
AssertFatal
(
1
==
0
,
"
In %s: Not identified/handled rnti %d
\n
"
,
__FUNCTION__
,
rnti
);
AssertFatal
(
1
==
0
,
"
Not identified/handled rnti %d
\n
"
,
rnti
);
}
LOG_D
(
MAC
,
"Returning rnti_type %s
\n
"
,
rnti_types
(
rnti_type
));
...
...
@@ -1279,7 +1279,7 @@ void set_harq_status(NR_UE_MAC_INST_t *mac,
harq_id
,
frame
,
slot
,
current_harq
->
ul_frame
,
current_harq
->
ul_slot
,
data_toul_fb
);
}
void
nr_ue_configure_pucch
(
NR_UE_MAC_INST_t
*
mac
,
int
nr_ue_configure_pucch
(
NR_UE_MAC_INST_t
*
mac
,
int
slot
,
uint16_t
rnti
,
PUCCH_sched_t
*
pucch
,
...
...
@@ -1341,11 +1341,11 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
if
(
mac
->
harq_ACK_SpatialBundlingPUCCH
||
mac
->
pdsch_HARQ_ACK_Codebook
!=
NR_PhysicalCellGroupConfig__pdsch_HARQ_ACK_Codebook_dynamic
)
{
LOG_E
(
MAC
,
"PUCCH Unsupported cell group configuration
\n
"
);
return
;
LOG_E
(
NR_MAC
,
"PUCCH Unsupported cell group configuration
\n
"
);
return
-
1
;
}
else
if
(
sc_info
->
pdsch_CGB_Transmission
)
{
LOG_E
(
MAC
,
"PUCCH Unsupported code block group for serving cell config
\n
"
);
return
;
LOG_E
(
NR_MAC
,
"PUCCH Unsupported code block group for serving cell config
\n
"
);
return
-
1
;
}
NR_PUSCH_Config_t
*
pusch_Config
=
current_UL_BWP
?
current_UL_BWP
->
pusch_Config
:
NULL
;
...
...
@@ -1371,8 +1371,8 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
int
n_uci
=
pucch
->
n_sr
+
pucch
->
n_harq
+
pucch
->
n_csi
;
if
(
n_uci
>
(
sizeof
(
uint64_t
)
*
8
))
{
LOG_E
(
MAC
,
"PUCCH number of UCI bits exceeds payload size
\n
"
);
return
;
LOG_E
(
NR_MAC
,
"PUCCH number of UCI bits exceeds payload size
\n
"
);
return
-
1
;
}
switch
(
pucchres
->
format
.
present
)
{
...
...
@@ -1470,7 +1470,8 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
pucch_pdu
->
payload
=
(
pucch
->
csi_part1_payload
<<
(
pucch
->
n_harq
+
pucch
->
n_sr
))
|
(
pucch
->
sr_payload
<<
pucch
->
n_harq
)
|
pucch
->
ack_payload
;
break
;
default
:
AssertFatal
(
1
==
0
,
"Undefined PUCCH format
\n
"
);
LOG_E
(
NR_MAC
,
"Undefined PUCCH format
\n
"
);
return
-
1
;
}
pucch_pdu
->
pucch_tx_power
=
get_pucch_tx_power_ue
(
mac
,
...
...
@@ -1484,8 +1485,10 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
pucch_pdu
->
nr_of_symbols
,
subframe_number
,
n_uci
);
}
else
AssertFatal
(
1
==
0
,
"problem with pucch configuration
\n
"
);
}
else
{
LOG_E
(
NR_MAC
,
"problem with pucch configuration
\n
"
);
return
-
1
;
}
NR_PUCCH_ConfigCommon_t
*
pucch_ConfigCommon
=
current_UL_BWP
->
pucch_ConfigCommon
;
...
...
@@ -1511,8 +1514,10 @@ void nr_ue_configure_pucch(NR_UE_MAC_INST_t *mac,
pucch_pdu
->
sequence_hop_flag
=
1
;
break
;
default:
AssertFatal
(
1
==
0
,
"Group hopping flag undefined (0,1,2)
\n
"
);
LOG_E
(
NR_MAC
,
"Group hopping flag undefined (0,1,2)
\n
"
);
return
-
1
;
}
return
0
;
}
int16_t
get_pucch_tx_power_ue
(
NR_UE_MAC_INST_t
*
mac
,
...
...
@@ -1696,7 +1701,7 @@ NR_PUCCH_Resource_t *find_pucch_resource_from_list(struct NR_PUCCH_Config__resou
return
pucch_resource
;
}
bool
check_mux_acknack_csi
(
NR_PUCCH_Resource_t
*
csi_res
,
NR_PUCCH_Config_t
*
pucch_Config
)
static
bool
check_mux_acknack_csi
(
NR_PUCCH_Resource_t
*
csi_res
,
NR_PUCCH_Config_t
*
pucch_Config
)
{
bool
ret
;
switch
(
csi_res
->
format
.
present
)
{
...
...
@@ -3969,7 +3974,7 @@ int nr_write_ce_ulsch_pdu(uint8_t *mac_ce,
// - b buffer
// - ulsch power offset
// - optimize: mu_pusch, j and table_6_1_2_1_1_2_time_dom_res_alloc_A are already defined in nr_ue_procedures
static
int
nr_ue_process_rar
(
nr_downlink_indication_t
*
dl_info
,
int
pdu_id
)
static
void
nr_ue_process_rar
(
nr_downlink_indication_t
*
dl_info
,
int
pdu_id
)
{
module_id_t
mod_id
=
dl_info
->
module_id
;
frame_t
frame
=
dl_info
->
frame
;
...
...
@@ -3977,7 +3982,7 @@ static int nr_ue_process_rar(nr_downlink_indication_t *dl_info, int pdu_id)
if
(
dl_info
->
rx_ind
->
rx_indication_body
[
pdu_id
].
pdsch_pdu
.
ack_nack
==
0
)
{
LOG_W
(
NR_MAC
,
"[UE %d][RAPROC][%d.%d] CRC check failed on RAR (NAK)
\n
"
,
mod_id
,
frame
,
slot
);
return
0
;
return
;
}
NR_UE_MAC_INST_t
*
mac
=
get_mac_inst
(
mod_id
);
...
...
@@ -4046,7 +4051,6 @@ static int nr_ue_process_rar(nr_downlink_indication_t *dl_info, int pdu_id)
#endif
if
(
ra
->
RA_RAPID_found
)
{
RAR_grant_t
rar_grant
;
unsigned
char
tpc_command
;
...
...
@@ -4147,7 +4151,7 @@ static int nr_ue_process_rar(nr_downlink_indication_t *dl_info, int pdu_id)
rar_grant
.
Msg3_t_alloc
);
if
(
tda_info
.
nrOfSymbols
==
0
)
{
LOG_E
(
MAC
,
"Cannot schedule Msg3. Something wrong in TDA information
\n
"
);
return
-
1
;
return
;
}
ret
=
nr_ue_pusch_scheduler
(
mac
,
is_Msg3
,
frame
,
slot
,
&
frame_tx
,
&
slot_tx
,
tda_info
.
k2
);
...
...
@@ -4158,7 +4162,6 @@ static int nr_ue_process_rar(nr_downlink_indication_t *dl_info, int pdu_id)
if
(
!
ul_config
)
{
LOG_W
(
MAC
,
"In %s: ul_config request is NULL. Probably due to unexpected UL DCI in frame.slot %d.%d. Ignoring DCI!
\n
"
,
__FUNCTION__
,
frame
,
slot
);
return
-
1
;
}
AssertFatal
(
ul_config
->
number_pdus
<
sizeof
(
ul_config
->
ul_config_list
)
/
sizeof
(
ul_config
->
ul_config_list
[
0
]),
"Number of PDUS in ul_config = %d > ul_config_list num elements"
,
ul_config
->
number_pdus
);
...
...
@@ -4185,7 +4188,7 @@ static int nr_ue_process_rar(nr_downlink_indication_t *dl_info, int pdu_id)
ra
->
t_crnti
=
0
;
}
return
ret
;
return
;
}
// Returns the pathloss in dB for the active UL BWP on the selected carrier based on the DL RS associated with the PRACH transmission
...
...
openair2/LAYER2/NR_MAC_UE/nr_ue_scheduler.c
View file @
7e244b3d
...
...
@@ -1420,7 +1420,13 @@ int nr_get_sf_retxBSRTimer(uint8_t sf_offset) {
// PUSCH Msg3 scheduler:
// - scheduled by RAR UL grant according to 8.3 of TS 38.213
// Note: Msg3 tx in the uplink symbols of mixed slot
int
nr_ue_pusch_scheduler
(
NR_UE_MAC_INST_t
*
mac
,
uint8_t
is_Msg3
,
frame_t
current_frame
,
int
current_slot
,
frame_t
*
frame_tx
,
int
*
slot_tx
,
long
k2
)
int
nr_ue_pusch_scheduler
(
const
NR_UE_MAC_INST_t
*
mac
,
const
uint8_t
is_Msg3
,
const
frame_t
current_frame
,
const
int
current_slot
,
frame_t
*
frame_tx
,
int
*
slot_tx
,
const
long
k2
)
{
AssertFatal
(
k2
>
DURATION_RX_TO_TX
,
"Slot offset K2 (%ld) needs to be higher than DURATION_RX_TO_TX (%d). Please set min_rxtxtime at least to %d in gNB config file or gNBs.[0].min_rxtxtime=%d via command line.
\n
"
,
...
...
@@ -1430,7 +1436,7 @@ int nr_ue_pusch_scheduler(NR_UE_MAC_INST_t *mac, uint8_t is_Msg3, frame_t curren
DURATION_RX_TO_TX
);
int
delta
=
0
;
NR_UE_UL_BWP_t
*
current_UL_BWP
=
mac
->
current_UL_BWP
;
const
NR_UE_UL_BWP_t
*
current_UL_BWP
=
mac
->
current_UL_BWP
;
// Get the numerology to calculate the Tx frame and slot
int
mu
=
current_UL_BWP
->
scs
;
...
...
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