diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c index 4d9e2dce35..16933df870 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_pbch.c @@ -607,7 +607,7 @@ int nr_rx_pbch( PHY_VARS_NR_UE *ue, uint16_t number_pdus = 1; nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, NULL, number_pdus); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SSB, gNB_id, ue, NULL, NULL, number_pdus, proc); if (ue->if_inst && ue->if_inst->dl_indication) ue->if_inst->dl_indication(&dl_indication, NULL); diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c index 5733ef6eb3..e044217249 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_coding.c @@ -257,7 +257,6 @@ int nr_ulsch_encoding(NR_UE_ULSCH_t *ulsch, Ilbrm = 0; Tbslbrm = 950984; //max tbs Coderate = 0.0; - trace_NRpdu(DIRECTION_UPLINK, harq_process->a, harq_process->pusch_pdu.pusch_data.tb_size, 0, WS_C_RNTI, 0, 0, 0,0, 0); /////////// ///////////////////////////////////////////////////////////////////////////////////////// diff --git a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c index 4ada19ba33..e521ce9ba3 100644 --- a/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c +++ b/openair1/PHY/NR_UE_TRANSPORT/nr_ulsch_ue.c @@ -47,6 +47,7 @@ #include "LAYER2/NR_MAC_UE/mac_proto.h" #include "PHY/NR_REFSIG/ul_ref_seq_nr.h" +#include //#define DEBUG_PUSCH_MAPPING //#define DEBUG_MAC_PDU @@ -158,7 +159,10 @@ void nr_ue_ulsch_procedures(PHY_VARS_NR_UE *UE, unsigned int G = nr_get_G(nb_rb, number_of_symbols, nb_dmrs_re_per_rb, number_dmrs_symbols, mod_order, Nl); - + trace_NRpdu(DIRECTION_UPLINK, + ulsch_ue->harq_processes[harq_pid]->a, + ulsch_ue->harq_processes[harq_pid]->pusch_pdu.pusch_data.tb_size, + 0, WS_C_RNTI, rnti, frame, slot, 0, 0); nr_ulsch_encoding(ulsch_ue, frame_parms, harq_pid, G); /////////// diff --git a/openair1/SCHED_NR_UE/defs.h b/openair1/SCHED_NR_UE/defs.h index c4a3de1d5a..348bb24bc8 100644 --- a/openair1/SCHED_NR_UE/defs.h +++ b/openair1/SCHED_NR_UE/defs.h @@ -418,7 +418,8 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, PHY_VARS_NR_UE *ue, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1, - uint16_t n_pdus); + uint16_t n_pdus, + UE_nr_rxtx_proc_t *proc); #endif diff --git a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c index 6ca02050b7..66cff7eb6d 100644 --- a/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c +++ b/openair1/SCHED_NR_UE/phy_procedures_nr_ue.c @@ -123,7 +123,8 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, PHY_VARS_NR_UE *ue, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1, - uint16_t n_pdus){ + uint16_t n_pdus, + UE_nr_rxtx_proc_t *proc ){ NR_DL_FRAME_PARMS *frame_parms = &ue->frame_parms; @@ -132,6 +133,16 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, LOG_E(PHY, "In %s: multiple number of DL PDUs not supported yet...\n", __FUNCTION__); } + if (pdu_type != FAPI_NR_RX_PDU_TYPE_SSB) + trace_NRpdu(DIRECTION_DOWNLINK, + dlsch0->harq_processes[dlsch0->current_harq_pid]->b, + dlsch0->harq_processes[dlsch0->current_harq_pid]->TBS / 8, + pdu_type, + WS_C_RNTI, + dlsch0->rnti, + proc->frame_rx, + proc->nr_slot_rx, + 0,0); switch (pdu_type){ case FAPI_NR_RX_PDU_TYPE_SIB: rx_ind->rx_indication_body[n_pdus - 1].pdsch_pdu.harq_pid = dlsch0->current_harq_pid; @@ -1035,16 +1046,16 @@ void nr_ue_dlsch_procedures(PHY_VARS_NR_UE *ue, switch (pdsch) { case RA_PDSCH: nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, gNB_id, ue, dlsch0, NULL, number_pdus); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_RAR, gNB_id, ue, dlsch0, NULL, number_pdus, proc); ue->UE_mode[gNB_id] = RA_RESPONSE; break; case PDSCH: nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, gNB_id, ue, dlsch0, NULL, number_pdus); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_DLSCH, gNB_id, ue, dlsch0, NULL, number_pdus, proc); break; case SI_PDSCH: nr_fill_dl_indication(&dl_indication, NULL, &rx_ind, proc, ue, gNB_id); - nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, gNB_id, ue, dlsch0, NULL, number_pdus); + nr_fill_rx_indication(&rx_ind, FAPI_NR_RX_PDU_TYPE_SIB, gNB_id, ue, dlsch0, NULL, number_pdus, proc); break; default: break; diff --git a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c index 70d65a3dc2..c452e0f463 100644 --- a/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c +++ b/openair1/SIMULATION/NR_PHY/nr_dummy_functions.c @@ -28,4 +28,5 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind, PHY_VARS_NR_UE *ue, NR_UE_DLSCH_t *dlsch0, NR_UE_DLSCH_t *dlsch1, - uint16_t n_pdus) {} + uint16_t n_pdus, + UE_nr_rxtx_proc_t *proc) {} diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c index 08f5b11c23..b078a89c2b 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_am.c @@ -576,20 +576,20 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity, /* dicard PDU if no data */ if (data_size <= 0) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, no data\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, no data\n", __FILE__, __LINE__, __FUNCTION__); goto discard; } /* dicard PDU if rx buffer is full */ if (entity->rx_size + data_size > entity->rx_maxsize) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n", __FILE__, __LINE__, __FUNCTION__); goto discard; } if (!sn_in_recv_window(entity, sn)) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, sn out of window (sn %d rx_next %d)\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, sn out of window (sn %d rx_next %d)\n", __FILE__, __LINE__, __FUNCTION__, sn, entity->rx_next); goto discard; @@ -597,7 +597,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity, /* discard segment if all the bytes of the segment are already there */ if (segment_already_received(entity, sn, so, data_size)) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, already received\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, already received\n", __FILE__, __LINE__, __FUNCTION__); goto discard; } @@ -623,7 +623,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity, entity->status_triggered = 1; if (!(sn_compare_rx(entity, sn, entity->rx_highest_status) < 0 || sn_compare_rx(entity, sn, v) >= 0)) { - LOG_D(RLC, "%s:%d:%s: warning: STATUS trigger should be delayed, according to specs\n", + LOG_W(RLC, "%s:%d:%s: warning: STATUS trigger should be delayed, according to specs\n", __FILE__, __LINE__, __FUNCTION__); } } @@ -633,7 +633,7 @@ void nr_rlc_entity_am_recv_pdu(nr_rlc_entity_t *_entity, control: cpt = nr_rlc_pdu_decoder_get_bits(&decoder, 3); R(decoder); if (cpt != 0) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, CPT not 0 (%d)\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, CPT not 0 (%d)\n", __FILE__, __LINE__, __FUNCTION__, cpt); goto discard; } @@ -1644,7 +1644,7 @@ static void check_t_poll_retransmit(nr_rlc_entity_am_t *entity) */ entity->force_poll = 1; - LOG_D(RLC, "%s:%d:%s: warning: t_poll_retransmit expired\n", + LOG_W(RLC, "%s:%d:%s: warning: t_poll_retransmit expired\n", __FILE__, __LINE__, __FUNCTION__); /* do we meet conditions of 38.322 5.3.3.4? */ diff --git a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c index f967c3c543..4b4af8ba95 100644 --- a/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c +++ b/openair2/LAYER2/nr_rlc/nr_rlc_entity_um.c @@ -299,21 +299,21 @@ void nr_rlc_entity_um_recv_pdu(nr_rlc_entity_t *_entity, /* dicard PDU if no data */ if (data_size <= 0) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, no data\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, no data\n", __FILE__, __LINE__, __FUNCTION__); goto discard; } /* dicard PDU if rx buffer is full */ if (entity->rx_size + data_size > entity->rx_maxsize) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, RX buffer full\n", __FILE__, __LINE__, __FUNCTION__); goto discard; } /* discard PDU if sn < rx_next_reassembly */ if (sn_compare_rx(entity, sn, entity->rx_next_reassembly) < 0) { - LOG_D(RLC, "%s:%d:%s: warning: discard PDU, SN (%d) < rx_next_reassembly (%d)\n", + LOG_W(RLC, "%s:%d:%s: warning: discard PDU, SN (%d) < rx_next_reassembly (%d)\n", __FILE__, __LINE__, __FUNCTION__, sn, entity->rx_next_reassembly); goto discard; @@ -545,7 +545,7 @@ void nr_rlc_entity_um_recv_sdu(nr_rlc_entity_t *_entity, } if (entity->tx_size + size > entity->tx_maxsize) { - LOG_D(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n", + LOG_W(RLC, "%s:%d:%s: warning: SDU rejected, SDU buffer full\n", __FILE__, __LINE__, __FUNCTION__); return; } diff --git a/openair2/RRC/NR/rrc_gNB.c b/openair2/RRC/NR/rrc_gNB.c index 0bd772850b..10967aaa3c 100755 --- a/openair2/RRC/NR/rrc_gNB.c +++ b/openair2/RRC/NR/rrc_gNB.c @@ -3054,7 +3054,7 @@ static int rrc_process_DU_DL(MessageDef *msg_p, const char *msg_name, instance_ } } else if (req->srb_id == 2) { // TODO - abort(); + //abort(); } LOG_I(F1AP, "Received DL RRC Transfer on srb_id %ld\n", req->srb_id);