From 9bbe4f7cd83efeb0e73e08dc2942fe781a0db520 Mon Sep 17 00:00:00 2001 From: rmagueta Date: Wed, 25 Nov 2020 22:21:24 +0000 Subject: [PATCH] Minor corrections --- openair1/PHY/NR_UE_TRANSPORT/dci_nr.c | 2 +- openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c | 2 ++ openair1/SCHED_NR_UE/phy_procedures_nr_ue.c | 5 +++-- openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c | 2 ++ openair2/RRC/NR_UE/rrc_UE.c | 12 +++++++----- openair2/RRC/NR_UE/rrc_defs.h | 2 -- openair2/RRC/NR_UE/rrc_proto.h | 4 +++- 7 files changed, 18 insertions(+), 11 deletions(-) diff --git a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c index 2b744306c7..269a906119 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c +++ b/openair1/PHY/NR_UE_TRANSPORT/dci_nr.c @@ -908,7 +908,7 @@ uint8_t nr_dci_decoding_procedure(PHY_VARS_NR_UE *ue, } } - LOG_I(PHY,"nr_dci_decoding_procedure: frame = %i, slot = %i\n", frame, slot); + LOG_I(PHY,"nr_dci_decoding_procedure: frame = %i, slot = %i\n", proc->frame_rx, proc->nr_slot_rx); return(dci_ind->number_of_dcis); } diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c index 4db1f90f86..f7a6a55764 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_dlsch_decoding.c @@ -609,6 +609,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue, ret = 1 + dlsch->max_ldpc_iterations; } + getchar(); + nb_total_decod++; if (no_iteration_ldpc > dlsch->max_ldpc_iterations){ nb_error_decod++; diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 8fc457d83b..df85bbc70b 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -744,6 +744,7 @@ int nr_ue_pdsch_procedures(PHY_VARS_NR_UE *ue, UE_nr_rxtx_proc_t *proc, int eNB_ nr_slot_rx, aatx /*p*/, m, + BWPStart, ue->frame_parms.first_carrier_offset+(BWPStart + pdsch_start_rb)*12, pdsch_nb_rb); LOG_D(PHY,"PDSCH Channel estimation gNB id %d, PDSCH antenna port %d, slot %d, symbol %d\n",0,aatx,nr_slot_rx,m); @@ -1936,9 +1937,9 @@ int phy_procedures_nrUE_RX(PHY_VARS_NR_UE *ue, ue->dlsch_SI[gNB_id]->active = 0; // FIXME: It was assumed that SIB1 has only one segment - int harq_pid = PHY_vars_UE_g[0][0]->dlsch_SI[0]->current_harq_pid; + int harq_pid = PHY_vars_UE_g[ue->Mod_id][ue->CC_id]->dlsch_SI[0]->current_harq_pid; if(ue->dlsch_SI[gNB_id]->harq_processes[harq_pid]->harq_ack.ack == 1) { - nr_rrc_ue_decode_NR_SIB1_Message(&ue->dlsch_SI[gNB_id]->harq_processes[harq_pid]->c[0][0], + nr_rrc_ue_decode_NR_SIB1_Message(ue->Mod_id, gNB_id, &ue->dlsch_SI[gNB_id]->harq_processes[harq_pid]->c[0][0], ue->dlsch_SI[gNB_id]->harq_processes[harq_pid]->TBS); } else { LOG_D(PHY,"SIB1 CRC NOT OK"); diff --git a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c index 68e8885af7..34344f8d87 100644 --- a/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c +++ b/openair2/LAYER2/NR_MAC_UE/nr_ue_procedures.c @@ -4013,6 +4013,8 @@ int nr_extract_dci_info(NR_UE_MAC_INST_t *mac, LOG_D(MAC,"dci_pdu_rel15->rv = %i\n", dci_pdu_rel15->rv); LOG_D(MAC,"dci_pdu_rel15->system_info_indicator = %i\n", dci_pdu_rel15->system_info_indicator); + getchar(); + break; case NR_RNTI_TC: diff --git a/openair2/RRC/NR_UE/rrc_UE.c b/openair2/RRC/NR_UE/rrc_UE.c index 2337fd7caa..c74758a9b1 100755 --- a/openair2/RRC/NR_UE/rrc_UE.c +++ b/openair2/RRC/NR_UE/rrc_UE.c @@ -1478,7 +1478,7 @@ int8_t nr_rrc_ue_decode_ccch( const protocol_ctxt_t *const ctxt_pP, const NR_SRB } /*brief decode SIB1 message*/ -int8_t nr_rrc_ue_decode_NR_SIB1_Message(uint8_t *const bufferP, const uint8_t buffer_len){ +int8_t nr_rrc_ue_decode_NR_SIB1_Message(module_id_t module_id, uint8_t gNB_index, uint8_t *const bufferP, const uint8_t buffer_len) { NR_BCCH_DL_SCH_Message_t *bcch_message = NULL; @@ -1501,11 +1501,13 @@ int8_t nr_rrc_ue_decode_NR_SIB1_Message(uint8_t *const bufferP, const uint8_t bu } else { - if(NR_UE_rrc_inst->sib1 != NULL){ - SEQUENCE_free(&asn_DEF_NR_BCCH_BCH_Message, (void *)NR_UE_rrc_inst->sib1, 1 ); + NR_SIB1_t *sib1 = NR_UE_rrc_inst[module_id].sib1[gNB_index]; + + if(sib1 != NULL){ + SEQUENCE_free(&asn_DEF_NR_BCCH_BCH_Message, (void *)sib1, 1 ); } - NR_UE_rrc_inst->sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1; - xer_fprint(stdout, &asn_DEF_NR_SIB1, (const void*)NR_UE_rrc_inst->sib1); + sib1 = bcch_message->message.choice.c1->choice.systemInformationBlockType1; + xer_fprint(stdout, &asn_DEF_NR_SIB1, (const void*)sib1); } diff --git a/openair2/RRC/NR_UE/rrc_defs.h b/openair2/RRC/NR_UE/rrc_defs.h index d9342bb9f2..8f61ebe0c3 100644 --- a/openair2/RRC/NR_UE/rrc_defs.h +++ b/openair2/RRC/NR_UE/rrc_defs.h @@ -124,8 +124,6 @@ typedef struct NR_UE_RRC_INST_s { NR_UE_RRC_INFO Info[NB_SIG_CNX_UE]; NR_MIB_t *mib; - NR_SIB1_t *sib1; // QQQQQ - /* KeNB as computed from parameters within USIM card */ uint8_t kgnb[32]; diff --git a/openair2/RRC/NR_UE/rrc_proto.h b/openair2/RRC/NR_UE/rrc_proto.h index 4e6c7f2b47..4019248441 100644 --- a/openair2/RRC/NR_UE/rrc_proto.h +++ b/openair2/RRC/NR_UE/rrc_proto.h @@ -87,9 +87,11 @@ int8_t nr_rrc_ue_process_radio_bearer_config(NR_RadioBearerConfig_t *radio_beare int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(const module_id_t module_id, const uint8_t gNB_index, uint8_t *const bufferP, const uint8_t buffer_len); /**\brief decode NR SIB1 message + \param module_idP module id + \param gNB_index gNB index \param sduP pointer to buffer of ASN message \param sdu_len length of buffer*/ -int8_t nr_rrc_ue_decode_NR_SIB1_Message(uint8_t *const bufferP, const uint8_t buffer_len); +int8_t nr_rrc_ue_decode_NR_SIB1_Message(module_id_t module_id, uint8_t gNB_index, uint8_t *const bufferP, const uint8_t buffer_len); /**\brief Decode NR DCCH from gNB, sent from lower layer through SRB3 \param module_id module id