Commit a986e709 authored by Robert Schmidt's avatar Robert Schmidt

REMOVE Logging statements for debug

parent 1e00319d
......@@ -32,6 +32,7 @@
#include <stdint.h>
#include "assertions.h"
#include "common/utils/LOG/log.h"
int NRRIV2BW(int locationAndBandwidth,int N_RB) {
int tmp = locationAndBandwidth/N_RB;
......@@ -54,7 +55,11 @@ int NRRIV2PRBOFFSET(int locationAndBandwidth,int N_RB) {
/* TS 38.214 ch. 6.1.2.2.2 - Resource allocation type 1 for DL and UL */
int PRBalloc_to_locationandbandwidth0(int NPRB,int RBstart,int BWPsize) {
AssertFatal(NPRB>0 && (NPRB + RBstart <= BWPsize),"Illegal NPRB/RBstart Configuration (%d,%d) for BWPsize %d\n",NPRB,RBstart,BWPsize);
if (!(NPRB>0 && (NPRB + RBstart <= BWPsize))) {
LOG_E(MAC ,"Illegal NPRB/RBstart Configuration (%d,%d) for BWPsize %d\n",NPRB,RBstart,BWPsize);
int *a = 0;
*a = 1;
}
if (NPRB <= 1+(BWPsize>>1)) return(BWPsize*(NPRB-1)+RBstart);
else return(BWPsize*(BWPsize+1-NPRB) + (BWPsize-1-RBstart));
......
......@@ -642,6 +642,15 @@ void nr_schedule_ue_spec(module_id_t module_id,
harq->round,
harq->ndi);
} else { /* initial transmission */
LOG_I(MAC,
"%d.%2d new DL transmission RNTI %04x HARQ PID %d round %d NDI %d feedback_slot %d\n",
frame,
slot,
rnti,
current_harq_pid,
harq->round,
harq->ndi,
harq->feedback_slot);
/* reserve space for timing advance of UE if necessary,
* nr_generate_dlsch_pdu() checks for ta_apply and add TA CE if necessary */
......
......@@ -322,15 +322,21 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
for (int harq_idx = harq_idx_s; harq_idx < NR_MAX_NB_HARQ_PROCESSES; harq_idx++) {
// if the gNB received ack with a good confidence
if ((slot - 1) == sched_ctrl->harq_processes[harq_idx].feedback_slot) {
sched_ctrl->harq_processes[harq_idx].feedback_slot = -1;
if ((uci_01->harq->harq_list[harq_bit].harq_value == 1) &&
(uci_01->harq->harq_confidence_level == 0)) {
// toggle NDI and reset round
sched_ctrl->harq_processes[harq_idx].ndi ^= 1;
sched_ctrl->harq_processes[harq_idx].round = 0;
}
else
} else {
LOG_E(MAC,
"%4d.%2d HARQ not received (val %d) or bad confidence (%d) for harq_idx %d (feedback_slot %d)\n",
frame, slot,
uci_01->harq->harq_list[harq_bit].harq_value,
uci_01->harq->harq_confidence_level,
harq_idx, sched_ctrl->harq_processes[harq_idx].feedback_slot);
sched_ctrl->harq_processes[harq_idx].round++;
}
sched_ctrl->harq_processes[harq_idx].feedback_slot = -1;
sched_ctrl->harq_processes[harq_idx].is_waiting = 0;
harq_idx_s = harq_idx + 1;
// if the max harq rounds was reached
......@@ -345,6 +351,7 @@ void handle_nr_uci_pucch_0_1(module_id_t mod_id,
else if (sched_ctrl->harq_processes[harq_idx].feedback_slot != -1
&& (slot - 1) > sched_ctrl->harq_processes[harq_idx].feedback_slot
&& sched_ctrl->harq_processes[harq_idx].is_waiting) {
LOG_E(MAC, "%4d.%2d HARQ not discarded for harq_idx %d (feedback_slot %d)\n", frame, slot, harq_idx, sched_ctrl->harq_processes[harq_idx].feedback_slot);
sched_ctrl->harq_processes[harq_idx].feedback_slot = -1;
sched_ctrl->harq_processes[harq_idx].round++;
if (sched_ctrl->harq_processes[harq_idx].round == max_harq_rounds) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment