From 85aaf3a0bae47cdaa4551ed4cd6aed3306015330 Mon Sep 17 00:00:00 2001 From: francescomani Date: Fri, 9 Jun 2023 16:42:32 +0200 Subject: [PATCH 01/13] upper layers handling of radio link monitoring --- .../nfapi/public_inc/fapi_nr_ue_interface.h | 8 +++ openair1/PHY/NR_UE_TRANSPORT/csi_rx.c | 1 + openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 7 ++- .../SIMULATION/NR_PHY/nr_dummy_functions.c | 4 ++ openair2/COMMON/mac_messages_def.h | 1 + openair2/COMMON/mac_messages_types.h | 10 +++- openair2/LAYER2/NR_MAC_UE/mac_defs.h | 3 - openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 - openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c | 25 ++++---- openair2/RRC/NR_UE/L2_interface_ue.c | 10 ++++ openair2/RRC/NR_UE/rrc_UE.c | 32 ++++------ openair2/RRC/NR_UE/rrc_defs.h | 5 ++ openair2/RRC/NR_UE/rrc_proto.h | 9 ++- openair2/RRC/NR_UE/rrc_timers_and_constants.c | 60 +++++++++++++++++++ 14 files changed, 136 insertions(+), 41 deletions(-) diff --git a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h index a425d6b0f5..20cc15dda2 100644 --- a/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h +++ b/nfapi/open-nFAPI/nfapi/public_inc/fapi_nr_ue_interface.h @@ -49,6 +49,12 @@ typedef struct { uint32_t sr; } fapi_nr_uci_pdu_rel15_t; +typedef enum { + RLM_no_monitoring = 0, + RLM_out_of_sync = 1, + RLM_in_sync = 2 +} rlm_t; + typedef struct { uint32_t rsrp; int rsrp_dBm; @@ -56,6 +62,7 @@ typedef struct { uint8_t i1; uint8_t i2; uint8_t cqi; + rlm_t radiolink_monitoring; } fapi_nr_csirs_measurements_t; typedef struct { @@ -125,6 +132,7 @@ typedef struct { uint16_t cell_id; uint16_t ssb_start_subcarrier; short rsrp_dBm; + rlm_t radiolink_monitoring; // -1 no monitoring, 0 out_of_sync, 1 in_sync } fapi_nr_ssb_pdu_t; typedef struct { diff --git a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c index b38184f453..068e1dacf3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c +++ b/openair1/PHY/NR_UE_TRANSPORT/csi_rx.c @@ -1006,6 +1006,7 @@ void nr_ue_csi_rs_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, c16_t csirs_measurements.i1 = *i1; csirs_measurements.i2 = *i2; csirs_measurements.cqi = cqi; + csirs_measurements.radiolink_monitoring = RLM_no_monitoring; // TODO do be activated in case of RLM based on CSI-RS nr_downlink_indication_t dl_indication; fapi_nr_rx_indication_t rx_ind = {0}; nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, NULL); diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 5609f7d608..0a71a1fbae 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -159,15 +159,18 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, fapiPbch_t *pbch = (fapiPbch_t *)typeSpecific; memcpy(ssb_pdu->pdu, pbch->decoded_output, sizeof(pbch->decoded_output)); ssb_pdu->additional_bits = pbch->xtra_byte; - ssb_pdu->ssb_index = (frame_parms->ssb_index)&0x7; + ssb_pdu->ssb_index = (frame_parms->ssb_index) & 0x7; ssb_pdu->ssb_length = frame_parms->Lmax; ssb_pdu->cell_id = frame_parms->Nid_cell; ssb_pdu->ssb_start_subcarrier = frame_parms->ssb_start_subcarrier; ssb_pdu->rsrp_dBm = ue->measurements.ssb_rsrp_dBm[frame_parms->ssb_index]; + ssb_pdu->radiolink_monitoring = RLM_in_sync; // TODO to be removed from here ssb_pdu->decoded_pdu = true; } - else + else { + ssb_pdu->radiolink_monitoring = RLM_out_of_sync; // TODO to be removed from here ssb_pdu->decoded_pdu = false; + } } break; case FAPI_NR_CSIRS_IND: diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c index 930e0d3840..dccdce2934 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c @@ -28,6 +28,10 @@ int nfapi_nr_p7_message_pack(void *pMessageBuf, void *pPackedBuf, uint32_t packe int nfapi_nr_p7_message_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t* config) { return 0; } int nfapi_p7_message_header_unpack(void *pMessageBuf, uint32_t messageBufLen, void *pUnpackedBuf, uint32_t unpackedBufLen, nfapi_p7_codec_config_t *config) { return 0; } +void nr_mac_rrc_sync_ind(const module_id_t module_id, + const frame_t frame, + const bool in_sync) {} + void rrc_data_ind(const protocol_ctxt_t *const ctxt_pP, const rb_id_t Srb_id, const sdu_size_t sdu_sizeP, diff --git a/openair2/COMMON/mac_messages_def.h b/openair2/COMMON/mac_messages_def.h index eeef0d4494..d4a923b90b 100644 --- a/openair2/COMMON/mac_messages_def.h +++ b/openair2/COMMON/mac_messages_def.h @@ -30,6 +30,7 @@ // Messages between RRC and MAC layers MESSAGE_DEF(RRC_MAC_IN_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacInSyncInd, rrc_mac_in_sync_ind) MESSAGE_DEF(RRC_MAC_OUT_OF_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacOutOfSyncInd, rrc_mac_out_of_sync_ind) +MESSAGE_DEF(NR_RRC_MAC_SYNC_IND, MESSAGE_PRIORITY_MED_PLUS, NRRrcMacSyncInd, nr_rrc_mac_sync_ind) MESSAGE_DEF(RRC_MAC_BCCH_DATA_REQ, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataReq, rrc_mac_bcch_data_req) MESSAGE_DEF(RRC_MAC_BCCH_DATA_IND, MESSAGE_PRIORITY_MED_PLUS, RrcMacBcchDataInd, rrc_mac_bcch_data_ind) diff --git a/openair2/COMMON/mac_messages_types.h b/openair2/COMMON/mac_messages_types.h index 6a671eeb10..fde990b0fe 100644 --- a/openair2/COMMON/mac_messages_types.h +++ b/openair2/COMMON/mac_messages_types.h @@ -36,13 +36,14 @@ // Defines to access message fields. #define RRC_MAC_IN_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_in_sync_ind #define RRC_MAC_OUT_OF_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_out_of_sync_ind +#define NR_RRC_MAC_SYNC_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_sync_ind #define RRC_MAC_BCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_req #define RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_data_ind #define NR_RRC_MAC_BCCH_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.nr_rrc_mac_bcch_data_ind -#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req -#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind +#define RRC_MAC_BCCH_MBMS_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_req +#define RRC_MAC_BCCH_MBMS_DATA_IND(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_bcch_mbms_data_ind #define RRC_MAC_CCCH_DATA_REQ(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_req #define RRC_MAC_CCCH_DATA_CNF(mSGpTR) (mSGpTR)->ittiMsg.rrc_mac_ccch_data_cnf @@ -72,6 +73,11 @@ typedef struct RrcMacInSyncInd_s { typedef RrcMacInSyncInd RrcMacOutOfSyncInd; +typedef struct NRRrcMacSyncInd_s { + uint32_t frame; + bool in_sync; +} NRRrcMacSyncInd; + typedef struct RrcMacBcchDataReq_s { uint32_t frame; uint32_t sdu_size; diff --git a/openair2/LAYER2/NR_MAC_UE/mac_defs.h b/openair2/LAYER2/NR_MAC_UE/mac_defs.h index 77a0fc8e58..99c7ba6dcd 100644 --- a/openair2/LAYER2/NR_MAC_UE/mac_defs.h +++ b/openair2/LAYER2/NR_MAC_UE/mac_defs.h @@ -367,12 +367,9 @@ typedef struct { } PUCCH_sched_t; typedef struct { - uint32_t ssb_index; /// SSB RSRP in dBm short ssb_rsrp_dBm; - int consecutive_bch_failures; - } NR_SSB_meas_t; typedef struct NR_UL_TIME_ALIGNMENT { diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 2cc400d2d2..22fbef5614 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -269,8 +269,6 @@ int8_t nr_ue_decode_mib(module_id_t module_id, AssertFatal(mac->mib != NULL, "nr_ue_decode_mib() mac->mib == NULL\n"); - mac->ssb_measurements.consecutive_bch_failures = 0; // resetting decoding failures - uint16_t frame = (mac->mib->systemFrameNumber.buf[0] >> mac->mib->systemFrameNumber.bits_unused); uint16_t frame_number_4lsb = 0; diff --git a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c index 1459d97dc6..d4d03d408f 100644 --- a/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c +++ b/openair2/NR_UE_PHY_INTERFACE/NR_IF_Module.c @@ -1052,14 +1052,6 @@ int handle_bcch_bch(module_id_t module_id, int cc_id, } -void handle_bch_failure(NR_UE_MAC_INST_t *mac) -{ - mac->ssb_measurements.consecutive_bch_failures++; - //TODO handle this properly by scheduling re-synchronization - AssertFatal(mac->ssb_measurements.consecutive_bch_failures < 100, - "Radio link failure caused by 100 consecutive PBCH detection failures.\n"); -} - // L2 Abstraction Layer int handle_bcch_dlsch(module_id_t module_id, int cc_id, unsigned int gNB_index, uint8_t ack_nack, uint8_t *pduP, uint32_t pdu_len){ return nr_ue_decode_BCCH_DL_SCH(module_id, cc_id, gNB_index, ack_nack, pduP, pdu_len); @@ -1098,7 +1090,17 @@ int8_t handle_dlsch(nr_downlink_indication_t *dl_info, int pdu_id) return 0; } -int8_t handle_csirs_measurements(module_id_t module_id, frame_t frame, int slot, fapi_nr_csirs_measurements_t *csirs_measurements) { +void handle_rlm(rlm_t rlm_result, int frame, module_id_t module_id) +{ + if (rlm_result == RLM_no_monitoring) + return; + bool is_sync = rlm_result == RLM_in_sync ? true : false; + nr_mac_rrc_sync_ind(module_id, frame, is_sync); +} + +int8_t handle_csirs_measurements(module_id_t module_id, frame_t frame, int slot, fapi_nr_csirs_measurements_t *csirs_measurements) +{ + handle_rlm(csirs_measurements->radiolink_monitoring, frame, module_id); return nr_ue_process_csirs_measurements(module_id, frame, slot, csirs_measurements); } @@ -1197,6 +1199,9 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info) switch(rx_indication_body.pdu_type){ case FAPI_NR_RX_PDU_TYPE_SSB: + handle_rlm(rx_indication_body.ssb_pdu.radiolink_monitoring, + dl_info->frame, + dl_info->module_id); if(rx_indication_body.ssb_pdu.decoded_pdu) { handle_ssb_meas(mac, rx_indication_body.ssb_pdu.ssb_index, @@ -1209,8 +1214,6 @@ int nr_ue_dl_indication(nr_downlink_indication_t *dl_info) rx_indication_body.ssb_pdu.ssb_start_subcarrier, rx_indication_body.ssb_pdu.cell_id)) << FAPI_NR_RX_PDU_TYPE_SSB; } - else - handle_bch_failure(mac); break; case FAPI_NR_RX_PDU_TYPE_SIB: ret_mask |= (handle_bcch_dlsch(dl_info->module_id, diff --git a/openair2/RRC/NR_UE/L2_interface_ue.c b/openair2/RRC/NR_UE/L2_interface_ue.c index ce0b2ff44b..7222defbe4 100644 --- a/openair2/RRC/NR_UE/L2_interface_ue.c +++ b/openair2/RRC/NR_UE/L2_interface_ue.c @@ -39,6 +39,16 @@ typedef uint32_t channel_t; +void nr_mac_rrc_sync_ind(const module_id_t module_id, + const frame_t frame, + const bool in_sync) +{ + MessageDef *message_p = itti_alloc_new_message(TASK_MAC_UE, 0, NR_RRC_MAC_SYNC_IND); + NR_RRC_MAC_SYNC_IND (message_p).frame = frame; + NR_RRC_MAC_SYNC_IND (message_p).in_sync = in_sync; + itti_send_msg_to_task(TASK_RRC_NRUE, GNB_MODULE_ID_TO_INSTANCE(module_id), message_p); +} + int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const int CC_id, const uint8_t gNB_index, diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index c8d4403094..9d14f19ece 100644 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -2264,24 +2264,6 @@ nr_rrc_ue_establish_srb2( return 0; } - -void nr_rrc_handle_timers(unsigned int mod_id) -{ - NR_UE_Timers_Constants_t *timers = &NR_UE_rrc_inst[mod_id].timers_and_constants; - // T304 - if (timers->T304_active == true) { - timers->T304_cnt += 10; - if(timers->T304_cnt >= timers->T304_k) { - // TODO - // For T304 of MCG, in case of the handover from NR or intra-NR - // handover, initiate the RRC re-establishment procedure; - // In case of handover to NR, perform the actions defined in the - // specifications applicable for the source RAT. - } - } -} - - void *rrc_nrue_task(void *args_p) { MessageDef *msg_p; @@ -2308,10 +2290,22 @@ void *rrc_nrue_task(void *args_p) LOG_D(NR_RRC, "[UE %d] Received %s\n", ue_mod_id, ITTI_MSG_NAME (msg_p)); break; + case NR_RRC_MAC_SYNC_IND: + LOG_D(NR_RRC, "[UE %d] Received %s: frame %d\n", + ue_mod_id, + ITTI_MSG_NAME (msg_p), + NR_RRC_MAC_SYNC_IND (msg_p).frame); + nr_sync_msg_t sync_msg = NR_RRC_MAC_SYNC_IND (msg_p).in_sync ? + IN_SYNC : OUT_OF_SYNC; + NR_UE_Timers_Constants_t *tac = &NR_UE_rrc_inst[ue_mod_id].timers_and_constants; + handle_rlf_sync(tac, sync_msg); + break; + case NRRRC_SLOT_PROCESS: LOG_D(NR_RRC, "[UE %d] Receided %s: frame %d slot %d\n", ue_mod_id, ITTI_MSG_NAME (msg_p), NRRRC_SLOT_PROCESS (msg_p).frame, NRRRC_SLOT_PROCESS (msg_p).slot); - nr_rrc_handle_timers(ue_mod_id); + NR_UE_Timers_Constants_t *timers = &NR_UE_rrc_inst[ue_mod_id].timers_and_constants; + nr_rrc_handle_timers(timers); break; case NR_RRC_MAC_BCCH_DATA_IND: diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index 996069ad68..28d3c52cef 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -182,6 +182,11 @@ typedef struct NR_UE_Timers_Constants_s { uint32_t T319_k; } NR_UE_Timers_Constants_t; +typedef enum { + OUT_OF_SYNC = 0, + IN_SYNC = 1 +} nr_sync_msg_t; + typedef struct NR_UE_RRC_INST_s { NR_MeasConfig_t *meas_config; diff --git a/openair2/RRC/NR_UE/rrc_proto.h b/openair2/RRC/NR_UE/rrc_proto.h index 418c71240c..f303d809fe 100644 --- a/openair2/RRC/NR_UE/rrc_proto.h +++ b/openair2/RRC/NR_UE/rrc_proto.h @@ -113,6 +113,10 @@ int8_t nr_mac_rrc_data_ind_ue(const module_id_t module_id, const uint8_t* pduP, const sdu_size_t pdu_len); +void nr_mac_rrc_sync_ind(const module_id_t module_id, + const frame_t frame, + const bool in_sync); + /**\brief \param module_id module id \param CC_id component carrier id @@ -133,8 +137,7 @@ int8_t nr_rrc_RA_succeeded(const module_id_t mod_id, const uint8_t gNB_index); \param void *args_p Pointer on arguments to start the task. */ void *rrc_nrue_task(void *args_p); -/**\brief RRC timers update at UE. */ -void *nr_rrc_timers_update(); +void nr_rrc_handle_timers(NR_UE_Timers_Constants_t *timers); /**\brief RRC NSA UE task. \param void *args_p Pointer on arguments to start the task. */ @@ -162,6 +165,8 @@ void reset_rlf_timers_and_constants(NR_UE_Timers_Constants_t *tac); void set_default_timers_and_constants(NR_UE_Timers_Constants_t *tac); void nr_rrc_set_sib1_timers_and_constants(NR_UE_Timers_Constants_t *tac, NR_SIB1_t *sib1); void nr_rrc_set_T304(NR_UE_Timers_Constants_t *tac, NR_ReconfigurationWithSync_t *reconfigurationWithSync); +void handle_rlf_sync(NR_UE_Timers_Constants_t *tac, + nr_sync_msg_t sync_msg); void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc, struct NR_SetupRelease_RLF_TimersAndConstants *rlf_TimersAndConstants); diff --git a/openair2/RRC/NR_UE/rrc_timers_and_constants.c b/openair2/RRC/NR_UE/rrc_timers_and_constants.c index f9fc11095b..50c2240339 100644 --- a/openair2/RRC/NR_UE/rrc_timers_and_constants.c +++ b/openair2/RRC/NR_UE/rrc_timers_and_constants.c @@ -21,6 +21,29 @@ #include "openair2/RRC/NR_UE/rrc_proto.h" +void nr_rrc_handle_timers(NR_UE_Timers_Constants_t *timers) +{ + // T304 + if (timers->T304_active == true) { + timers->T304_cnt += 10; + if(timers->T304_cnt >= timers->T304_k) { + // TODO + // For T304 of MCG, in case of the handover from NR or intra-NR + // handover, initiate the RRC re-establishment procedure; + // In case of handover to NR, perform the actions defined in the + // specifications applicable for the source RAT. + } + } + if (timers->T310_active == true) { + timers->T310_cnt += 10; + if(timers->T310_cnt >= timers->T310_k) { + // TODO + // handle detection of radio link failure + // as described in 5.3.10.3 of 38.331 + AssertFatal(false, "Radio link failure! Not handled yet!\n"); + } + } +} void nr_rrc_set_T304(NR_UE_Timers_Constants_t *tac, NR_ReconfigurationWithSync_t *reconfigurationWithSync) { @@ -402,6 +425,43 @@ void nr_rrc_handle_SetupRelease_RLF_TimersAndConstants(NR_UE_RRC_INST_t *rrc, } } +void handle_rlf_sync(NR_UE_Timers_Constants_t *tac, + nr_sync_msg_t sync_msg) +{ + if (sync_msg == IN_SYNC) { + tac->N310_cnt = 0; + if (tac->T310_active) { + tac->N311_cnt++; + // Upon receiving N311 consecutive "in-sync" indications + if (tac->N311_cnt >= tac->N311_k) { + // stop timer T310 + tac->T310_active = false; + tac->T310_cnt = 0; + tac->N311_cnt = 0; + } + } + } + else { + // OUT_OF_SYNC + tac->N311_cnt = 0; + if(tac->T300_active || + tac->T301_active || + tac->T304_active || + tac->T310_active || + tac->T311_active || + tac->T319_active) + return; + tac->N310_cnt++; + // upon receiving N310 consecutive "out-of-sync" indications + if (tac->N310_cnt >= tac->N310_k) { + // start timer T310 + tac->T310_active = true; + tac->T310_cnt = 0; + tac->N310_cnt = 0; + } + } +} + void set_default_timers_and_constants(NR_UE_Timers_Constants_t *tac) { // 38.331 9.2.3 Default values timers and constants From a773d024e84204f6fbe0dfbc602541c8afa88fc6 Mon Sep 17 00:00:00 2001 From: Laurent THOMAS Date: Mon, 19 Jun 2023 09:48:17 +0200 Subject: [PATCH 02/13] no sanitize on generated ldpc code --- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc104_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc112_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc120_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc128_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc144_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc160_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc16_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc176_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc192_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc208_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc224_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc240_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc256_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc288_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc2_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc320_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc32_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc352_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc384_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc4_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc64_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc72_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc80_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc88_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc8_byte.c | 2 +- openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc96_byte.c | 2 +- 26 files changed, 26 insertions(+), 26 deletions(-) diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc104_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc104_byte.c index a1e7193db5..2eea416f89 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc104_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc104_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=104, byte encoding -static inline void ldpc_BG2_Zc104_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc104_byte(uint8_t *c,uint8_t *d) { __m64 *csimd=(__m64 *)c,*dsimd=(__m64 *)d; __m64 *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc112_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc112_byte.c index 621cfaad22..8808a1b915 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc112_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc112_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=112, byte encoding -static inline void ldpc_BG2_Zc112_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc112_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc120_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc120_byte.c index 63639822ef..21e79114d0 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc120_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc120_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=120, byte encoding -static inline void ldpc_BG2_Zc120_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc120_byte(uint8_t *c,uint8_t *d) { __m64 *csimd=(__m64 *)c,*dsimd=(__m64 *)d; __m64 *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc128_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc128_byte.c index ad1bc53f1f..f82e92c6b3 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc128_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc128_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=128, byte encoding -static inline void ldpc_BG2_Zc128_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc128_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc144_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc144_byte.c index 59806345c9..1e26b3535d 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc144_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc144_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=144, byte encoding -static inline void ldpc_BG2_Zc144_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc144_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc160_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc160_byte.c index b2f90e62d0..1c95ccb315 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc160_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc160_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=160, byte encoding -static inline void ldpc_BG2_Zc160_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc160_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc16_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc16_byte.c index 9668daaf20..7fb64cfc4c 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc16_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc16_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=16, byte encoding -static inline void ldpc_BG2_Zc16_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc16_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc176_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc176_byte.c index b73e85e18e..090a394d60 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc176_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc176_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=176, byte encoding -static inline void ldpc_BG2_Zc176_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc176_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc192_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc192_byte.c index bc90a35a86..94ac2a3220 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc192_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc192_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=192, byte encoding -static inline void ldpc_BG2_Zc192_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc192_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc208_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc208_byte.c index f9343323bb..3453a2f3d1 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc208_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc208_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=208, byte encoding -static inline void ldpc_BG2_Zc208_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc208_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc224_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc224_byte.c index 8969c624de..4938de2b2a 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc224_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc224_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=224, byte encoding -static inline void ldpc_BG2_Zc224_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc224_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc240_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc240_byte.c index c2004d7645..997a34f198 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc240_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc240_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=240, byte encoding -static inline void ldpc_BG2_Zc240_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc240_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc256_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc256_byte.c index cd86a0ca22..cb7ce41314 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc256_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc256_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=256, byte encoding -static inline void ldpc_BG2_Zc256_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc256_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc288_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc288_byte.c index 9e349d5424..df03405c2d 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc288_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc288_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=288, byte encoding -static inline void ldpc_BG2_Zc288_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc288_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc2_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc2_byte.c index 808be926ee..af7f20ff63 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc2_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc2_byte.c @@ -1,7 +1,7 @@ #include "PHY/sse_intrin.h" #define scalar_xor(a,b) ((a)^(b)) // generated code for Zc=2, byte encoding -static inline void ldpc_BG2_Zc2_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc2_byte(uint8_t *c,uint8_t *d) { uint8_t *csimd=(uint8_t *)c,*dsimd=(uint8_t *)d; uint8_t *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc320_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc320_byte.c index 2fcdf136fc..29a977a3de 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc320_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc320_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=320, byte encoding -static inline void ldpc_BG2_Zc320_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc320_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc32_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc32_byte.c index 6356cfb391..5b983af26c 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc32_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc32_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=32, byte encoding -static inline void ldpc_BG2_Zc32_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc32_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc352_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc352_byte.c index 7141d91aa9..4fc2acf610 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc352_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc352_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=352, byte encoding -static inline void ldpc_BG2_Zc352_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc352_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc384_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc384_byte.c index b61f7500a8..ea87348f28 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc384_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc384_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=384, byte encoding -static inline void ldpc_BG2_Zc384_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc384_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc4_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc4_byte.c index 06c0838b00..8938311339 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc4_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc4_byte.c @@ -1,7 +1,7 @@ #include "PHY/sse_intrin.h" #define scalar_xor(a,b) ((a)^(b)) // generated code for Zc=4, byte encoding -static inline void ldpc_BG2_Zc4_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc4_byte(uint8_t *c,uint8_t *d) { uint8_t *csimd=(uint8_t *)c,*dsimd=(uint8_t *)d; uint8_t *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc64_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc64_byte.c index 5ab2a77edb..0ae044b3a2 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc64_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc64_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=64, byte encoding -static inline void ldpc_BG2_Zc64_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc64_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc72_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc72_byte.c index e49f7afc19..4d2e586106 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc72_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc72_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=72, byte encoding -static inline void ldpc_BG2_Zc72_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc72_byte(uint8_t *c,uint8_t *d) { __m64 *csimd=(__m64 *)c,*dsimd=(__m64 *)d; __m64 *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc80_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc80_byte.c index 2df111360f..de7b5b06ef 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc80_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc80_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=80, byte encoding -static inline void ldpc_BG2_Zc80_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc80_byte(uint8_t *c,uint8_t *d) { __m128i *csimd=(__m128i *)c,*dsimd=(__m128i *)d; __m128i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc88_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc88_byte.c index 29f71426cc..8dfd2d92c6 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc88_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc88_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=88, byte encoding -static inline void ldpc_BG2_Zc88_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc88_byte(uint8_t *c,uint8_t *d) { __m64 *csimd=(__m64 *)c,*dsimd=(__m64 *)d; __m64 *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc8_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc8_byte.c index aba4440d2b..0a65a40334 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc8_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc8_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=8, byte encoding -static inline void ldpc_BG2_Zc8_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc8_byte(uint8_t *c,uint8_t *d) { __m64i *csimd=(__m64i *)c,*dsimd=(__m64i *)d; __m64i *c2,*d2; diff --git a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc96_byte.c b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc96_byte.c index a4d5a47ef4..5b40d902a2 100644 --- a/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc96_byte.c +++ b/openair1/PHY/CODING/nrLDPC_encoder/ldpc_BG2_Zc96_byte.c @@ -1,6 +1,6 @@ #include "PHY/sse_intrin.h" // generated code for Zc=96, byte encoding -static inline void ldpc_BG2_Zc96_byte(uint8_t *c,uint8_t *d) { +static inline __attribute__ ((no_sanitize("address", "undefined"))) void ldpc_BG2_Zc96_byte(uint8_t *c,uint8_t *d) { __m256i *csimd=(__m256i *)c,*dsimd=(__m256i *)d; __m256i *c2,*d2; From 35b3a6d47825598139d1380b83456c2f340c34bb Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 19 Jun 2023 10:30:32 +0200 Subject: [PATCH 03/13] bugfix in ul rotation and formatting --- openair1/PHY/MODULATION/slot_fep_nr.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index 43d7be3fa3..a3224944ac 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -318,17 +318,16 @@ void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, int nsymb, int link_type) { - int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot; - int soffset = (slot&3)*frame_parms->symbols_per_slot*frame_parms->ofdm_symbol_size; + int symb_offset = (slot % frame_parms->slots_per_subframe) * frame_parms->symbols_per_slot; + int soffset = (slot & 3) * frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size; - for (int symbol=first_symbol;symbolsymbol_rotation[link_type][symbol + symb_offset]; - rot2.i=-rot2.i; - LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n",slot,symb_offset,rot2.r,rot2.i); - + rot2.i = -rot2.i; + LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n", slot, symb_offset, rot2.r, rot2.i); c16_t *shift_rot = frame_parms->timeshift_symbol_rotation; - c16_t *this_symbol = &rxdataF[soffset+(frame_parms->ofdm_symbol_size*symbol)]; + c16_t *this_symbol = &rxdataF[soffset + (frame_parms->ofdm_symbol_size * symbol)]; if (frame_parms->N_RB_UL & 1) { rotate_cpx_vector(this_symbol, &rot2, this_symbol, From 74ae831cf978a3eaeb6e7b55aad8f373193b7c8b Mon Sep 17 00:00:00 2001 From: Cedric Roux Date: Tue, 20 Jun 2023 09:21:45 +0200 Subject: [PATCH 04/13] nr sib1: add mandatory fields for FDD --- openair2/RRC/NR/nr_rrc_config.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index 2a817ff376..3623a13d99 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -1893,6 +1893,23 @@ NR_BCCH_DL_SCH_Message_t *get_SIB1_NR(const gNB_RrcConfigurationReq *configurati asn1cCallocOne(UL->frequencyInfoUL.p_Max, *frequencyInfoUL->p_Max); + frame_type_t frame_type = + get_frame_type((int)*configuration->scc->downlinkConfigCommon->frequencyInfoDL->frequencyBandList.list.array[0], + *configuration->scc->ssbSubcarrierSpacing); + + if (frame_type == FDD) { + UL->frequencyInfoUL.absoluteFrequencyPointA = malloc(sizeof(*UL->frequencyInfoUL.absoluteFrequencyPointA)); + AssertFatal(UL->frequencyInfoUL.absoluteFrequencyPointA != NULL, "out of memory\n"); + *UL->frequencyInfoUL.absoluteFrequencyPointA = + *configuration->scc->uplinkConfigCommon->frequencyInfoUL->absoluteFrequencyPointA; + UL->frequencyInfoUL.frequencyBandList = calloc(1, sizeof(*UL->frequencyInfoUL.frequencyBandList)); + AssertFatal(UL->frequencyInfoUL.frequencyBandList != NULL, "out of memory\n"); + for (int i = 0; i < frequencyInfoUL->frequencyBandList->list.count; i++) { + asn1cSequenceAdd(UL->frequencyInfoUL.frequencyBandList->list, struct NR_NR_MultiBandInfo, nrMultiBandInfo); + nrMultiBandInfo->freqBandIndicatorNR = frequencyInfoUL->frequencyBandList->list.array[i]; + } + } + UL->initialUplinkBWP.genericParameters = configuration->scc->uplinkConfigCommon->initialUplinkBWP->genericParameters; UL->initialUplinkBWP.rach_ConfigCommon = configuration->scc->uplinkConfigCommon->initialUplinkBWP->rach_ConfigCommon; UL->initialUplinkBWP.pusch_ConfigCommon = configuration->scc->uplinkConfigCommon->initialUplinkBWP->pusch_ConfigCommon; From 1c3058e2d2a7f6c59f4542e6e06be647623bc892 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 19 Jun 2023 17:36:33 +0200 Subject: [PATCH 05/13] use of apply_rotation functions also at UE --- doc/SW-archi-graph.md | 4 +- doc/SW_archi.md | 4 +- executables/nr-gnb.c | 15 +++-- openair1/PHY/MODULATION/nr_modulation.h | 21 +++--- openair1/PHY/MODULATION/ofdm_mod.c | 28 ++++---- openair1/PHY/MODULATION/slot_fep_nr.c | 77 +++++++--------------- openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c | 50 ++++---------- openair1/SCHED_NR/phy_procedures_nr_gNB.c | 8 ++- openair1/SIMULATION/NR_PHY/pbchsim.c | 26 ++++---- openair1/SIMULATION/NR_PHY/ulsim.c | 7 +- 10 files changed, 102 insertions(+), 138 deletions(-) diff --git a/doc/SW-archi-graph.md b/doc/SW-archi-graph.md index d397d07f43..a3397ed297 100644 --- a/doc/SW-archi-graph.md +++ b/doc/SW-archi-graph.md @@ -14,7 +14,7 @@ rx_func_implem[rx_func] handle_nr_slot_ind --> rnti_to_remove-mgmt --> L1_nr_prach_procedures - --> apply_nr_rotation_ul + --> apply_nr_rotation_RX end subgraph phy_procedures_gNB_uespec_RX fill_ul_rb_mask @@ -58,7 +58,7 @@ subgraph tx_func subgraph phy_procedures_gNB_TX dcitop[nr_generate dci top] --> nr_generate_csi_rs - --> apply_nr_rotation + --> apply_nr_rotation_TX -- send_msg --> end_tx_func((L1_tx_out)) end subgraph tx_reorder_thread diff --git a/doc/SW_archi.md b/doc/SW_archi.md index cccead370b..7facfcb595 100644 --- a/doc/SW_archi.md +++ b/doc/SW_archi.md @@ -33,7 +33,7 @@ rx_func_implem[rx_func] handle_nr_slot_ind --> rnti_to_remove-mgmt --> L1_nr_prach_procedures - --> apply_nr_rotation_ul + --> apply_nr_rotation_RX end subgraph phy_procedures_gNB_uespec_RX fill_ul_rb_mask @@ -67,7 +67,7 @@ subgraph tx phy_procedures_gNB_TX --> dcitop[nr_generate dci top] --> nr_generate_csi_rs - --> apply_nr_rotation + --> apply_nr_rotation_TX -- send_msg --> end_tx_func((L1_tx_out)) end subgraph tx_reorder_thread diff --git a/executables/nr-gnb.c b/executables/nr-gnb.c index f0da3db241..fd5439ce74 100644 --- a/executables/nr-gnb.c +++ b/executables/nr-gnb.c @@ -231,13 +231,16 @@ void rx_func(void *param) //WA: comment rotation in tx/rx if((gNB->num_RU == 1) && (gNB->RU_list[0]->if_south != REMOTE_IF4p5)) { //apply the rx signal rotation here + int soffset = (slot_rx & 3) * gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size; for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) { - apply_nr_rotation_ul(&gNB->frame_parms, - gNB->common_vars.rxdataF[aa], - slot_rx, - 0, - gNB->frame_parms.Ncp == EXTENDED ? 12 : 14, - link_type_ul); + apply_nr_rotation_RX(&gNB->frame_parms, + gNB->common_vars.rxdataF[aa], + gNB->frame_parms.symbol_rotation[1], + slot_rx, + gNB->frame_parms.N_RB_UL, + soffset, + 0, + gNB->frame_parms.Ncp == EXTENDED ? 12 : 14); } } phy_procedures_gNB_uespec_RX(gNB, frame_rx, slot_rx); diff --git a/openair1/PHY/MODULATION/nr_modulation.h b/openair1/PHY/MODULATION/nr_modulation.h index 09f6c94d2c..8c530676cd 100644 --- a/openair1/PHY/MODULATION/nr_modulation.h +++ b/openair1/PHY/MODULATION/nr_modulation.h @@ -108,23 +108,26 @@ int nr_beam_precoding(c16_t **txdataF, int offset ); -void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, - c16_t* txdata, - int slot, - int first_symbol, - int nsymb, - int link_type); +void apply_nr_rotation_TX(NR_DL_FRAME_PARMS *fp, + c16_t *txdataF, + c16_t *symbol_rotation, + int slot, + int nb_rb, + int first_symbol, + int nsymb); void init_symbol_rotation(NR_DL_FRAME_PARMS *fp); void init_timeshift_rotation(NR_DL_FRAME_PARMS *fp); -void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, +void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms, c16_t *rxdataF, + c16_t *rot, int slot, + int nb_rb, + int soffset, int first_symbol, - int nsymb, - int link_type); + int nsymb); /*! \brief Perform NR precoding. TS 38.211 V15.4.0 subclause 6.3.1.5 @param[in] datatx_F_precoding, Pointer to n_layers*re data array diff --git a/openair1/PHY/MODULATION/ofdm_mod.c b/openair1/PHY/MODULATION/ofdm_mod.c index 16238257d1..45261b1fdb 100644 --- a/openair1/PHY/MODULATION/ofdm_mod.c +++ b/openair1/PHY/MODULATION/ofdm_mod.c @@ -334,17 +334,17 @@ void do_OFDM_mod(c16_t **txdataF, c16_t **txdata, uint32_t frame,uint16_t next_s } -void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, - c16_t *txdataF, - int slot, - int first_symbol, - int nsymb, - int link_type) +void apply_nr_rotation_TX(NR_DL_FRAME_PARMS *fp, + c16_t *txdataF, + c16_t *symbol_rotation, + int slot, + int nb_rb, + int first_symbol, + int nsymb) { - int symb_offset = (slot%fp->slots_per_subframe)*fp->symbols_per_slot; + int symb_offset = (slot % fp->slots_per_subframe) * fp->symbols_per_slot; - c16_t *symbol_rotation = fp->symbol_rotation[link_type] + symb_offset; - int N_RB = (link_type == link_type_sl) ? fp->N_RB_SL : fp->N_RB_DL; + symbol_rotation += symb_offset; for (int sidx = first_symbol; sidx < first_symbol + nsymb; sidx++) { c16_t *this_rotation = symbol_rotation + sidx; @@ -357,20 +357,20 @@ void apply_nr_rotation(NR_DL_FRAME_PARMS *fp, this_rotation->r, this_rotation->i); - if (N_RB & 1) { + if (nb_rb & 1) { rotate_cpx_vector(this_symbol, this_rotation, this_symbol, - (N_RB + 1) * 6, 15); + (nb_rb + 1) * 6, 15); rotate_cpx_vector(this_symbol + fp->first_carrier_offset - 6, this_rotation, this_symbol + fp->first_carrier_offset - 6, - (N_RB + 1) * 6, 15); + (nb_rb + 1) * 6, 15); } else { rotate_cpx_vector(this_symbol, this_rotation, this_symbol, - N_RB * 6, 15); + nb_rb * 6, 15); rotate_cpx_vector(this_symbol + fp->first_carrier_offset, this_rotation, this_symbol + fp->first_carrier_offset, - N_RB * 6, 15); + nb_rb * 6, 15); } } } diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index a3224944ac..6a598582b0 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -96,46 +96,14 @@ int nr_slot_fep(PHY_VARS_NR_UE *ue, stop_meas(&ue->rx_dft_stats); - int symb_offset = (Ns%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot; - c16_t rot2 = frame_parms->symbol_rotation[0][symbol+symb_offset]; - rot2.i=-rot2.i; - -#ifdef DEBUG_FEP - // if (ue->frame <100) - printf("slot_fep: slot %d, symbol %d rx_offset %u, rotation symbol %d %d.%d\n", Ns,symbol, rx_offset, - symbol+symb_offset,rot2.r,rot2.i); -#endif - - c16_t *shift_rot = frame_parms->timeshift_symbol_rotation; - c16_t *this_symbol = &rxdataF[aa][frame_parms->ofdm_symbol_size*symbol]; - - if (frame_parms->N_RB_DL & 1) { - rotate_cpx_vector(this_symbol, &rot2, this_symbol, - (frame_parms->N_RB_DL + 1) * 6, 15); - rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6, - &rot2, - this_symbol + frame_parms->first_carrier_offset - 6, - (frame_parms->N_RB_DL + 1) * 6, 15); - multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol, - 1, (frame_parms->N_RB_DL + 1) * 6, 15); - multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6), - (int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6), - (int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6), - 1, (frame_parms->N_RB_DL + 1) * 6, 15); - } else { - rotate_cpx_vector(this_symbol, &rot2, this_symbol, - frame_parms->N_RB_DL * 6, 15); - rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset, - &rot2, - this_symbol + frame_parms->first_carrier_offset, - frame_parms->N_RB_DL * 6, 15); - multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol, - 1, frame_parms->N_RB_DL * 6, 15); - multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset), - (int16_t *)(shift_rot + frame_parms->first_carrier_offset), - (int16_t *)(this_symbol + frame_parms->first_carrier_offset), - 1, frame_parms->N_RB_DL * 6, 15); - } + apply_nr_rotation_RX(frame_parms, + rxdataF[aa], + frame_parms->symbol_rotation[0], + Ns, + frame_parms->N_RB_DL, + 0, + symbol, + 1); } #ifdef DEBUG_FEP @@ -311,50 +279,51 @@ int nr_slot_fep_ul(NR_DL_FRAME_PARMS *frame_parms, return 0; } -void apply_nr_rotation_ul(NR_DL_FRAME_PARMS *frame_parms, +void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms, c16_t *rxdataF, + c16_t *rot, int slot, + int nb_rb, + int soffset, int first_symbol, - int nsymb, - int link_type) + int nsymb) { int symb_offset = (slot % frame_parms->slots_per_subframe) * frame_parms->symbols_per_slot; - int soffset = (slot & 3) * frame_parms->symbols_per_slot * frame_parms->ofdm_symbol_size; for (int symbol = first_symbol; symbol < first_symbol + nsymb; symbol++) { - c16_t rot2 = frame_parms->symbol_rotation[link_type][symbol + symb_offset]; + c16_t rot2 = rot[symbol + symb_offset]; rot2.i = -rot2.i; LOG_D(PHY,"slot %d, symb_offset %d rotating by %d.%d\n", slot, symb_offset, rot2.r, rot2.i); c16_t *shift_rot = frame_parms->timeshift_symbol_rotation; c16_t *this_symbol = &rxdataF[soffset + (frame_parms->ofdm_symbol_size * symbol)]; - if (frame_parms->N_RB_UL & 1) { + if (nb_rb & 1) { rotate_cpx_vector(this_symbol, &rot2, this_symbol, - (frame_parms->N_RB_UL + 1) * 6, 15); + (nb_rb + 1) * 6, 15); rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6, &rot2, this_symbol + frame_parms->first_carrier_offset - 6, - (frame_parms->N_RB_UL + 1) * 6, 15); + (nb_rb + 1) * 6, 15); multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol, - 1, (frame_parms->N_RB_UL+1) * 6, 15); + 1, (nb_rb + 1) * 6, 15); multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6), (int16_t *)(shift_rot + frame_parms->first_carrier_offset - 6), (int16_t *)(this_symbol + frame_parms->first_carrier_offset - 6), - 1, (frame_parms->N_RB_UL+1) * 6, 15); + 1, (nb_rb + 1) * 6, 15); } else { rotate_cpx_vector(this_symbol, &rot2, this_symbol, - frame_parms->N_RB_UL * 6, 15); + nb_rb * 6, 15); rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset, &rot2, this_symbol + frame_parms->first_carrier_offset, - frame_parms->N_RB_UL * 6, 15); + nb_rb * 6, 15); multadd_cpx_vector((int16_t *)this_symbol, (int16_t *)shift_rot, (int16_t *)this_symbol, - 1, frame_parms->N_RB_UL * 6, 15); + 1, nb_rb * 6, 15); multadd_cpx_vector((int16_t *)(this_symbol + frame_parms->first_carrier_offset), (int16_t *)(shift_rot + frame_parms->first_carrier_offset), (int16_t *)(this_symbol + frame_parms->first_carrier_offset), - 1, frame_parms->N_RB_UL * 6, 15); + 1, nb_rb * 6, 15); } } } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 186ec58d4d..b27b738523 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -592,16 +592,12 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, uint8_t slot, NR_DL_FRAME_PARMS *frame_parms, - uint8_t n_antenna_ports) { - - int tx_offset, ap; - c16_t **txdata; - c16_t **txdataF; - + uint8_t n_antenna_ports) +{ /////////////////////////IFFT/////////////////////// /////////// - tx_offset = frame_parms->get_samples_slot_timestamp(slot, frame_parms, 0); + int tx_offset = frame_parms->get_samples_slot_timestamp(slot, frame_parms, 0); // clear the transmit data array for the current subframe /*for (int aa=0; aaframe_parms.nb_antennas_tx; aa++) { @@ -610,38 +606,20 @@ uint8_t nr_ue_pusch_common_procedures(PHY_VARS_NR_UE *UE, }*/ - txdata = UE->common_vars.txdata; - txdataF = UE->common_vars.txdataF; + c16_t **txdata = UE->common_vars.txdata; + c16_t **txdataF = UE->common_vars.txdataF; - int symb_offset = (slot%frame_parms->slots_per_subframe)*frame_parms->symbols_per_slot; - for(ap = 0; ap < n_antenna_ports; ap++) { - for (int s=0;sofdm_symbol_size * s]; - c16_t rot=frame_parms->symbol_rotation[link_type_ul][s + symb_offset]; - LOG_D(PHY,"rotating txdataF symbol %d (%d) => (%d.%d)\n", - s, - s + symb_offset, - rot.r, rot.i); - - if (frame_parms->N_RB_UL & 1) { - rotate_cpx_vector(this_symbol, &rot, this_symbol, - (frame_parms->N_RB_UL + 1) * 6, 15); - rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset - 6, - &rot, - this_symbol + frame_parms->first_carrier_offset - 6, - (frame_parms->N_RB_UL + 1) * 6, 15); - } else { - rotate_cpx_vector(this_symbol, &rot, this_symbol, - frame_parms->N_RB_UL * 6, 15); - rotate_cpx_vector(this_symbol + frame_parms->first_carrier_offset, - &rot, - this_symbol + frame_parms->first_carrier_offset, - frame_parms->N_RB_UL * 6, 15); - } - } + for(int ap = 0; ap < n_antenna_ports; ap++) { + apply_nr_rotation_TX(frame_parms, + txdataF[ap], + frame_parms->symbol_rotation[1], + slot, + frame_parms->N_RB_UL, + 0, + NR_NUMBER_OF_SYMBOLS_PER_SLOT); } - for (ap = 0; ap < n_antenna_ports; ap++) { + for (int ap = 0; ap < n_antenna_ports; ap++) { if (frame_parms->Ncp == 1) { // extended cyclic prefix PHY_ofdm_mod((int *)txdataF[ap], (int *)&txdata[ap][tx_offset], diff --git a/openair1/SCHED_NR/phy_procedures_nr_gNB.c b/openair1/SCHED_NR/phy_procedures_nr_gNB.c index d7e9969065..d92c0124f1 100644 --- a/openair1/SCHED_NR/phy_procedures_nr_gNB.c +++ b/openair1/SCHED_NR/phy_procedures_nr_gNB.c @@ -222,7 +222,13 @@ void phy_procedures_gNB_TX(processingData_L1tx_t *msgTx, //apply the OFDM symbol rotation here for (aa=0; aacarrier_config.num_tx_ant.value; aa++) { - apply_nr_rotation(fp, &gNB->common_vars.txdataF[aa][txdataF_offset], slot, 0, fp->Ncp == EXTENDED ? 12 : 14, link_type_dl); + apply_nr_rotation_TX(fp, + &gNB->common_vars.txdataF[aa][txdataF_offset], + fp->symbol_rotation[0], + slot, + fp->N_RB_DL, + 0, + fp->Ncp == EXTENDED ? 12 : 14); T(T_GNB_PHY_DL_OUTPUT_SIGNAL, T_INT(0), T_INT(frame), T_INT(slot), diff --git a/openair1/SIMULATION/NR_PHY/pbchsim.c b/openair1/SIMULATION/NR_PHY/pbchsim.c index d5930c0c23..9299cd4073 100644 --- a/openair1/SIMULATION/NR_PHY/pbchsim.c +++ b/openair1/SIMULATION/NR_PHY/pbchsim.c @@ -648,12 +648,13 @@ int main(int argc, char **argv) for (aa=0; aaframe_parms.nb_antennas_tx; aa++) { if (cyclic_prefix_type == 1) { - apply_nr_rotation(frame_parms, - gNB->common_vars.txdataF[aa], - slot, - 0, - 12, - link_type_dl); + apply_nr_rotation_TX(frame_parms, + gNB->common_vars.txdataF[aa], + frame_parms->symbol_rotation[0], + slot, + frame_parms->N_RB_DL, + 0, + 12); PHY_ofdm_mod((int *)gNB->common_vars.txdataF[aa], (int *)&txdata[aa][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)], @@ -662,12 +663,13 @@ int main(int argc, char **argv) frame_parms->nb_prefix_samples, CYCLIC_PREFIX); } else { - apply_nr_rotation(frame_parms, - gNB->common_vars.txdataF[aa], - slot, - 0, - 14, - link_type_dl); + apply_nr_rotation_TX(frame_parms, + gNB->common_vars.txdataF[aa], + frame_parms->symbol_rotation[0], + slot, + frame_parms->N_RB_DL, + 0, + 14); /*nr_normal_prefix_mod(gNB->common_vars.txdataF[aa], &txdata[aa][frame_parms->get_samples_slot_timestamp(slot,frame_parms,0)], diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index f686ce8201..41e80cc7d4 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -1259,11 +1259,14 @@ int main(int argc, char **argv) slot, 0); } - + int offset = (slot & 3) * gNB->frame_parms.symbols_per_slot * gNB->frame_parms.ofdm_symbol_size; for (int aa = 0; aa < gNB->frame_parms.nb_antennas_rx; aa++) { - apply_nr_rotation_ul(&gNB->frame_parms, + apply_nr_rotation_RX(&gNB->frame_parms, gNB->common_vars.rxdataF[aa], + gNB->frame_parms.symbol_rotation[1], slot, + gNB->frame_parms.N_RB_UL, + offset, 0, gNB->frame_parms.Ncp == EXTENDED ? 12 : 14, link_type_ul); From 6c6095fc06284a8e9d992401407e37ac0827ad43 Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 20 Jun 2023 11:36:52 +0200 Subject: [PATCH 06/13] fixing a typo in band 41 sync raster matrix --- openair2/GNB_APP/gnb_config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openair2/GNB_APP/gnb_config.c b/openair2/GNB_APP/gnb_config.c index 1d4a14ad8d..f5ce7121cc 100644 --- a/openair2/GNB_APP/gnb_config.c +++ b/openair2/GNB_APP/gnb_config.c @@ -114,7 +114,7 @@ const sync_raster_t sync_raster[] = { {39, 0, 4706, 1, 4795}, {40, 0, 5756, 1, 5995}, {41, 0, 6246, 3, 6717}, - {41, 1, 6254, 3, 6714}, + {41, 1, 6252, 3, 6714}, {50, 0, 3584, 1, 3787}, {51, 0, 3572, 1, 3574}, {66, 0, 5279, 1, 5494}, @@ -1162,7 +1162,7 @@ void check_ssb_raster(uint64_t freq, int band, int scs) gscn, freq, band); int rel_gscn = gscn - start_gscn; AssertFatal(rel_gscn % step_gscn == 0, - "GSCN %d corresponding to SSB freqyency %lu not in accordance with GSCN step for band %d\n", + "GSCN %d corresponding to SSB frequency %lu not in accordance with GSCN step for band %d\n", gscn, freq, band); } From 7d08b0c06d179f9b8a245ec94aa9590f5e861ad1 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 19 Jun 2023 17:45:11 +0200 Subject: [PATCH 07/13] add assertion in rotation function --- openair1/PHY/MODULATION/slot_fep_nr.c | 3 +++ openair1/SIMULATION/NR_PHY/ulsim.c | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/openair1/PHY/MODULATION/slot_fep_nr.c b/openair1/PHY/MODULATION/slot_fep_nr.c index 6a598582b0..c8ec74d61f 100644 --- a/openair1/PHY/MODULATION/slot_fep_nr.c +++ b/openair1/PHY/MODULATION/slot_fep_nr.c @@ -288,6 +288,9 @@ void apply_nr_rotation_RX(NR_DL_FRAME_PARMS *frame_parms, int first_symbol, int nsymb) { + AssertFatal(first_symbol + nsymb <= NR_NUMBER_OF_SYMBOLS_PER_SLOT, + "First symbol %d and number of symbol %d not compatible with number of symbols in a slot %d\n", + first_symbol, nsymb, NR_NUMBER_OF_SYMBOLS_PER_SLOT); int symb_offset = (slot % frame_parms->slots_per_subframe) * frame_parms->symbols_per_slot; for (int symbol = first_symbol; symbol < first_symbol + nsymb; symbol++) { diff --git a/openair1/SIMULATION/NR_PHY/ulsim.c b/openair1/SIMULATION/NR_PHY/ulsim.c index 41e80cc7d4..53c691afa3 100644 --- a/openair1/SIMULATION/NR_PHY/ulsim.c +++ b/openair1/SIMULATION/NR_PHY/ulsim.c @@ -1268,8 +1268,7 @@ int main(int argc, char **argv) gNB->frame_parms.N_RB_UL, offset, 0, - gNB->frame_parms.Ncp == EXTENDED ? 12 : 14, - link_type_ul); + gNB->frame_parms.Ncp == EXTENDED ? 12 : 14); } ul_proc_error = phy_procedures_gNB_uespec_RX(gNB, frame, slot); From ab1cff7220406b713c4b4349e6efb1042e12b9aa Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Tue, 20 Jun 2023 14:31:19 +0100 Subject: [PATCH 08/13] Tutorials: Update docker install to the latest instructions on the official website --- doc/NR_SA_Tutorial_OAI_CN5G.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/NR_SA_Tutorial_OAI_CN5G.md b/doc/NR_SA_Tutorial_OAI_CN5G.md index 8573391b67..5e6ad3fdbb 100644 --- a/doc/NR_SA_Tutorial_OAI_CN5G.md +++ b/doc/NR_SA_Tutorial_OAI_CN5G.md @@ -32,11 +32,14 @@ Minimum hardware requirements: ```bash sudo apt install -y git net-tools putty -sudo apt install -y apt-transport-https ca-certificates curl software-properties-common -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +# https://docs.docker.com/engine/install/ubuntu/ +sudo apt install -y ca-certificates curl gnupg +sudo install -m 0755 -d /etc/apt/keyrings +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg +sudo chmod a+r /etc/apt/keyrings/docker.gpg +echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null sudo apt update -sudo apt install -y docker docker-ce +sudo apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin # Add your username to the docker group, otherwise you will have to run in sudo mode. sudo usermod -a -G docker $(whoami) From bdc445f766638bd30a349c6e790ef4009f4458fc Mon Sep 17 00:00:00 2001 From: francescomani Date: Tue, 20 Jun 2023 18:50:50 +0200 Subject: [PATCH 09/13] bugfix in RAR time allocation at UE --- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 71bb875af4..da7207f7ed 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -4083,7 +4083,7 @@ int nr_ue_process_rar(nr_downlink_indication_t *dl_info, int pdu_id) // MCS rar_grant.mcs = (unsigned char) (rar->UL_GRANT_4 >> 4); // time alloc - rar_grant.Msg3_t_alloc = (unsigned char) (rar->UL_GRANT_3 & 0x07); + rar_grant.Msg3_t_alloc = (unsigned char) (rar->UL_GRANT_3 & 0x0f); // frequency alloc rar_grant.Msg3_f_alloc = (uint16_t) ((rar->UL_GRANT_3 >> 4) | (rar->UL_GRANT_2 << 4) | ((rar->UL_GRANT_1 & 0x03) << 12)); // frequency hopping From 2922ea5176d1ceb161f34cacd457473c6de02e68 Mon Sep 17 00:00:00 2001 From: francescomani Date: Wed, 21 Jun 2023 11:11:12 +0200 Subject: [PATCH 10/13] fix also on gnb side --- openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c index d2b9f2331e..e0c5879e9c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_RA.c @@ -2224,7 +2224,7 @@ static void nr_fill_rar(uint8_t Mod_idP, NR_RA_t *ra, uint8_t *dlsch_buffer, nfa int mcs = (unsigned char) (rar->UL_GRANT_4 >> 4); // time alloc - int Msg3_t_alloc = (unsigned char) (rar->UL_GRANT_3 & 0x07); + int Msg3_t_alloc = (unsigned char) (rar->UL_GRANT_3 & 0x0f); // frequency alloc int Msg3_f_alloc = (uint16_t) ((rar->UL_GRANT_3 >> 4) | (rar->UL_GRANT_2 << 4) | ((rar->UL_GRANT_1 & 0x03) << 12)); // frequency hopping From 93d6ae6d861d7faa3cace068292d5849bdc29ff9 Mon Sep 17 00:00:00 2001 From: francescomani Date: Mon, 29 May 2023 11:27:48 +0200 Subject: [PATCH 11/13] making CSI-RS RRC configuration independent from UE --- openair2/RRC/NR/nr_rrc_config.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/openair2/RRC/NR/nr_rrc_config.c b/openair2/RRC/NR/nr_rrc_config.c index 2a817ff376..a9d10a885c 100644 --- a/openair2/RRC/NR/nr_rrc_config.c +++ b/openair2/RRC/NR/nr_rrc_config.c @@ -140,11 +140,12 @@ static uint64_t get_ssb_bitmap(const NR_ServingCellConfigCommon_t *scc) return bitmap; } -static void set_csirs_periodicity(NR_NZP_CSI_RS_Resource_t *nzpcsi0, int uid, int nb_slots_per_period, int nb_dl_slots_period) +static void set_csirs_periodicity(NR_NZP_CSI_RS_Resource_t *nzpcsi0, int id, int nb_slots_per_period, int nb_dl_slots_period) { nzpcsi0->periodicityAndOffset = calloc(1,sizeof(*nzpcsi0->periodicityAndOffset)); - const int ideal_period = nb_slots_per_period * MAX_MOBILES_PER_GNB; - const int offset = nb_slots_per_period * uid; + // TODO ideal period to be set according to estimation by the gNB on how fast the channel changes + const int ideal_period = 320; + const int offset = nb_slots_per_period * id; if (ideal_period < 5) { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots4; @@ -184,14 +185,13 @@ static void set_csirs_periodicity(NR_NZP_CSI_RS_Resource_t *nzpcsi0, int uid, in } else { nzpcsi0->periodicityAndOffset->present = NR_CSI_ResourcePeriodicityAndOffset_PR_slots320; - AssertFatal(offset / 320 < nb_dl_slots_period, "Cannot allocate %dth UE. Not enough resources for CSI-RS\n", uid); + AssertFatal(offset / 320 < nb_dl_slots_period, "Cannot allocate CSI-RS for BWP %d. Not enough resources for CSI-RS\n", id); nzpcsi0->periodicityAndOffset->choice.slots320 = (offset % 320) + (offset / 320); } } static void config_csirs(const NR_ServingCellConfigCommon_t *servingcellconfigcommon, NR_CSI_MeasConfig_t *csi_MeasConfig, - int uid, int num_dl_antenna_ports, int curr_bwp, int do_csirs, @@ -266,7 +266,7 @@ static void config_csirs(const NR_ServingCellConfigCommon_t *servingcellconfigco nzpcsi0->powerControlOffsetSS = calloc(1,sizeof(*nzpcsi0->powerControlOffsetSS)); *nzpcsi0->powerControlOffsetSS = NR_NZP_CSI_RS_Resource__powerControlOffsetSS_db0; nzpcsi0->scramblingID = *servingcellconfigcommon->physCellId; - set_csirs_periodicity(nzpcsi0, uid, nb_slots_per_period, nb_dl_slots_period); + set_csirs_periodicity(nzpcsi0, id, nb_slots_per_period, nb_dl_slots_period); nzpcsi0->qcl_InfoPeriodicCSI_RS = calloc(1,sizeof(*nzpcsi0->qcl_InfoPeriodicCSI_RS)); *nzpcsi0->qcl_InfoPeriodicCSI_RS = 0; asn1cSeqAdd(&csi_MeasConfig->nzp_CSI_RS_ResourceToAddModList->list,nzpcsi0); @@ -2226,7 +2226,7 @@ static NR_SpCellConfig_t *get_initial_SpCellConfig(int uid, bwp_id = bwp->bwp_Id; } - config_csirs(scc, csi_MeasConfig, uid, pdsch_AntennaPorts, curr_bwp, configuration->do_CSIRS, bwp_loop); + config_csirs(scc, csi_MeasConfig, pdsch_AntennaPorts, curr_bwp, configuration->do_CSIRS, bwp_loop); config_csiim(configuration->do_CSIRS, pdsch_AntennaPorts, curr_bwp, csi_MeasConfig, bwp_loop); NR_CSI_ResourceConfig_t *csires1 = calloc(1, sizeof(*csires1)); @@ -2780,7 +2780,7 @@ NR_CellGroupConfig_t *get_default_secondaryCellGroup(const NR_ServingCellConfigC secondaryCellGroup->spCellConfig->spCellConfigDedicated->downlinkBWP_ToAddModList->list.array[bwp_loop]; int curr_bwp = NRRIV2BW(bwp->bwp_Common->genericParameters.locationAndBandwidth, MAX_BWP_SIZE); - config_csirs(servingcellconfigcommon, csi_MeasConfig, uid, dl_antenna_ports, curr_bwp, do_csirs, bwp_loop); + config_csirs(servingcellconfigcommon, csi_MeasConfig, dl_antenna_ports, curr_bwp, do_csirs, bwp_loop); config_csiim(do_csirs, dl_antenna_ports, curr_bwp, csi_MeasConfig, bwp_loop); if (do_csirs) { From 7a4dc635755a3d3911b315feae1ab233e90017d7 Mon Sep 17 00:00:00 2001 From: luis_pereira87 Date: Fri, 23 Jun 2023 08:43:04 +0100 Subject: [PATCH 12/13] Avoid segmentation fault when optional IE nAS_PDU is NULL --- openair3/NGAP/ngap_gNB_handlers.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openair3/NGAP/ngap_gNB_handlers.c b/openair3/NGAP/ngap_gNB_handlers.c index 64b29247aa..f548ed4b42 100644 --- a/openair3/NGAP/ngap_gNB_handlers.c +++ b/openair3/NGAP/ngap_gNB_handlers.c @@ -763,7 +763,9 @@ static int ngap_gNB_handle_initial_context_request(uint32_t assoc_id, uint32_t s NGAP_PDUSessionResourceSetupItemCxtReq_t *item_p = ie->value.choice.PDUSessionResourceSetupListCxtReq.list.array[i]; msg->pdusession_param[i].pdusession_id = item_p->pDUSessionID; - allocCopy(&msg->pdusession_param[i].nas_pdu, *item_p->nAS_PDU); + if (item_p->nAS_PDU) { + allocCopy(&msg->pdusession_param[i].nas_pdu, *item_p->nAS_PDU); + } allocCopy(&msg->pdusession_param[i].pdusessionTransfer, item_p->pDUSessionResourceSetupRequestTransfer); } } From 0965e86aca07c3091eab8755f6c83f6c4d20b202 Mon Sep 17 00:00:00 2001 From: francescomani Date: Thu, 15 Jun 2023 16:49:11 +0200 Subject: [PATCH 13/13] schedule CSI-RS only once per BWP --- .../LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c | 2 +- .../NR_MAC_gNB/gNB_scheduler_primitives.c | 18 ++++++++++++------ openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h | 3 ++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c index 3f1ea001b3..0d213c6826 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_dlsch.c @@ -60,7 +60,7 @@ const int get_dl_tda(const gNB_MAC_INST *nrmac, const NR_ServingCellConfigCommon AssertFatal(tdd || nrmac->common_channels->frame_type == FDD, "Dynamic TDD not handled yet\n"); // Use special TDA in case of CSI-RS - if(nrmac->UE_info.sched_csirs) + if(nrmac->UE_info.sched_csirs > 0) return 1; if (tdd && tdd->nrofDownlinkSymbols > 1) { // if there is a mixed slot where we can transmit DL diff --git a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c index f60e79dd11..68a44fa0cf 100644 --- a/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c +++ b/openair2/LAYER2/NR_MAC_gNB/gNB_scheduler_primitives.c @@ -2552,18 +2552,23 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo uint16_t *vrb_map = gNB_mac->common_channels[CC_id].vrb_map; - UE_info->sched_csirs = false; + UE_info->sched_csirs = 0; UE_iterator(UE_info->list, UE) { + NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP; + NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; + // CSI-RS is common to all UEs in a given BWP + // therefore we need to schedule only once per BWP + // the following condition verifies if CSI-RS + // has been already scheduled in this BWP + if (UE_info->sched_csirs & (1 << dl_bwp->bwp_id)) + continue; NR_UE_sched_ctrl_t *sched_ctrl = &UE->UE_sched_ctrl; if (sched_ctrl->rrc_processing_timer > 0) { continue; } - NR_UE_DL_BWP_t *dl_bwp = &UE->current_DL_BWP; - NR_UE_UL_BWP_t *ul_bwp = &UE->current_UL_BWP; - if (!ul_bwp->csi_MeasConfig) continue; NR_CSI_MeasConfig_t *csi_measconfig = ul_bwp->csi_MeasConfig; @@ -2598,8 +2603,9 @@ void nr_csirs_scheduling(int Mod_idP, frame_t frame, sub_frame_t slot, int n_slo if((frame*n_slots_frame+slot-offset)%period == 0) { - LOG_D(NR_MAC,"Scheduling CSI-RS in frame %d slot %d Resource ID %ld\n",frame,slot,nzpcsi->nzp_CSI_RS_ResourceId); - UE_info->sched_csirs = true; + LOG_D(NR_MAC,"Scheduling CSI-RS in frame %d slot %d Resource ID %ld\n", + frame, slot, nzpcsi->nzp_CSI_RS_ResourceId); + UE_info->sched_csirs |= (1 << dl_bwp->bwp_id); nfapi_nr_dl_tti_request_pdu_t *dl_tti_csirs_pdu = &dl_req->dl_tti_pdu_list[dl_req->nPDUs]; memset((void*)dl_tti_csirs_pdu,0,sizeof(nfapi_nr_dl_tti_request_pdu_t)); diff --git a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h index 7db2225da8..4e30c74a5c 100644 --- a/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h +++ b/openair2/LAYER2/NR_MAC_gNB/nr_mac_gNB.h @@ -691,7 +691,8 @@ typedef struct { // last element always NULL pthread_mutex_t mutex; NR_UE_info_t *list[MAX_MOBILES_PER_GNB+1]; - bool sched_csirs; + // bitmap of CSI-RS already scheduled in current slot + int sched_csirs; uid_allocator_t uid_allocator; } NR_UEs_t;