Merge remote-tracking branch 'origin/ue-fixes-gnb-testion' into integration_2024_w38b
This commit is contained in:
@@ -99,73 +99,58 @@ static bool nr_ue_postDecode(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
LOG_D(PHY, "DLSCH %d in error\n", rdata->dlsch_id);
|
LOG_D(PHY, "DLSCH %d in error\n", rdata->dlsch_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if all segments are done
|
if (!last)
|
||||||
if (last) {
|
return false; // continue decoding
|
||||||
kpiStructure.nb_total++;
|
|
||||||
kpiStructure.blockSize = dlsch->dlsch_config.TBS;
|
|
||||||
kpiStructure.dl_mcs = dlsch->dlsch_config.mcs;
|
|
||||||
kpiStructure.nofRBs = dlsch->dlsch_config.number_rbs;
|
|
||||||
|
|
||||||
if (*num_seg_ok == harq_process->C) {
|
// all segments are done
|
||||||
if (harq_process->C > 1) {
|
kpiStructure.nb_total++;
|
||||||
int A = dlsch->dlsch_config.TBS;
|
kpiStructure.blockSize = dlsch->dlsch_config.TBS;
|
||||||
/* check global CRC */
|
kpiStructure.dl_mcs = dlsch->dlsch_config.mcs;
|
||||||
// we have regrouped the transport block, so it is "1" segment
|
kpiStructure.nofRBs = dlsch->dlsch_config.number_rbs;
|
||||||
if (!check_crc(b, lenWithCrc(1, A), crcType(1, A))) {
|
|
||||||
harq_process->ack = 0;
|
|
||||||
dlsch->last_iteration_cnt = dlsch->max_ldpc_iterations + 1;
|
|
||||||
LOG_E(PHY, " Frame %d.%d LDPC global CRC fails, but individual LDPC CRC succeeded. %d segs\n",
|
|
||||||
proc->frame_rx, proc->nr_slot_rx, harq_process->C);
|
|
||||||
LOG_D(PHY, "DLSCH received nok \n");
|
|
||||||
return true; //stop
|
|
||||||
}
|
|
||||||
const int sz=A / 8;
|
|
||||||
if (b[sz] == 0 && b[sz + 1] == 0) { // We search only a reccuring OAI error that propagates all 0 packets with a 0 CRC, so we
|
|
||||||
// do the check only if the 2 first bytes of the CRC are 0 (it can be CRC16 or CRC24)
|
|
||||||
int i = 0;
|
|
||||||
while (b[i] == 0 && i < sz)
|
|
||||||
i++;
|
|
||||||
if (i == sz) {
|
|
||||||
LOG_E(PHY,
|
|
||||||
"received all 0 pdu, consider it false reception, even if the TS 38.212 7.2.1 says only we should attach the "
|
|
||||||
"corresponding CRC, and nothing prevents to have a all 0 packet\n");
|
|
||||||
dlsch->last_iteration_cnt = dlsch->max_ldpc_iterations + 1;
|
|
||||||
return true; // stop
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for nr_slot_rx %d TBS %d mcs %d nb_rb %d harq_process->round %d\n",
|
|
||||||
// phy_vars_ue->Mod_id,nr_slot_rx,harq_process->TBS,harq_process->mcs,harq_process->nb_rb, harq_process->round);
|
|
||||||
harq_process->status = SCH_IDLE;
|
|
||||||
harq_process->ack = 1;
|
|
||||||
|
|
||||||
//LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d)\n",
|
harq_process->decodeResult = *num_seg_ok == harq_process->C;
|
||||||
// phy_vars_ue->Mod_id, frame, subframe, harq_pid, harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs);
|
|
||||||
|
|
||||||
//if(is_crnti) {
|
if (harq_process->decodeResult && harq_process->C > 1) {
|
||||||
// LOG_D(PHY,"[UE %d] DLSCH: Setting ACK for nr_slot_rx %d (pid %d, round %d, TBS %d)\n",phy_vars_ue->Mod_id,nr_slot_rx,harq_pid,harq_process->round,harq_process->TBS);
|
/* check global CRC */
|
||||||
//}
|
int A = dlsch->dlsch_config.TBS;
|
||||||
dlsch->last_iteration_cnt = rdata->decodeIterations;
|
// we have regrouped the transport block
|
||||||
LOG_D(PHY, "DLSCH received ok \n");
|
if (!check_crc(b, lenWithCrc(1, A), crcType(1, A))) {
|
||||||
} else {
|
LOG_E(PHY,
|
||||||
kpiStructure.nb_nack++;
|
" Frame %d.%d LDPC global CRC fails, but individual LDPC CRC succeeded. %d segs\n",
|
||||||
//LOG_D(PHY,"[UE %d] DLSCH: Setting NAK for SFN/SF %d/%d (pid %d, status %d, round %d, TBS %d, mcs %d) Kr %d r %d harq_process->round %d\n",
|
proc->frame_rx,
|
||||||
// phy_vars_ue->Mod_id, frame, nr_slot_rx, harq_pid,harq_process->status, harq_process->round,harq_process->TBS,harq_process->mcs,Kr,r,harq_process->round);
|
proc->nr_slot_rx,
|
||||||
harq_process->ack = 0;
|
harq_process->C);
|
||||||
|
harq_process->decodeResult = false;
|
||||||
//if(is_crnti) {
|
|
||||||
// LOG_D(PHY,"[UE %d] DLSCH: Setting NACK for nr_slot_rx %d (pid %d, pid status %d, round %d/Max %d, TBS %d)\n",
|
|
||||||
// phy_vars_ue->Mod_id,nr_slot_rx,harq_pid,harq_process->status,harq_process->round,dlsch->Mdlharq,harq_process->TBS);
|
|
||||||
//}
|
|
||||||
dlsch->last_iteration_cnt = dlsch->max_ldpc_iterations + 1;
|
|
||||||
LOG_D(PHY, "DLSCH received nok \n");
|
|
||||||
}
|
}
|
||||||
return true; //stop
|
|
||||||
}
|
}
|
||||||
else {
|
|
||||||
return false; //not last one
|
if (harq_process->decodeResult) {
|
||||||
|
// We search only a reccuring OAI error that propagates all 0 packets with a 0 CRC, so we
|
||||||
|
const int sz = dlsch->dlsch_config.TBS / 8;
|
||||||
|
if (b[sz] == 0 && b[sz + 1] == 0) {
|
||||||
|
// do the check only if the 2 first bytes of the CRC are 0 (it can be CRC16 or CRC24)
|
||||||
|
int i = 0;
|
||||||
|
while (b[i] == 0 && i < sz)
|
||||||
|
i++;
|
||||||
|
if (i == sz) {
|
||||||
|
LOG_E(PHY,
|
||||||
|
"received all 0 pdu, consider it false reception, even if the TS 38.212 7.2.1 says only we should attach the "
|
||||||
|
"corresponding CRC, and nothing prevents to have a all 0 packet\n");
|
||||||
|
harq_process->decodeResult = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (harq_process->decodeResult) {
|
||||||
|
LOG_D(PHY, "DLSCH received ok \n");
|
||||||
|
harq_process->status = SCH_IDLE;
|
||||||
|
dlsch->last_iteration_cnt = rdata->decodeIterations;
|
||||||
|
} else {
|
||||||
|
LOG_D(PHY, "DLSCH received nok \n");
|
||||||
|
kpiStructure.nb_nack++;
|
||||||
|
dlsch->last_iteration_cnt = dlsch->max_ldpc_iterations + 1;
|
||||||
|
}
|
||||||
|
return true; // end TB decoding
|
||||||
}
|
}
|
||||||
|
|
||||||
static void nr_processDLSegment(void *arg)
|
static void nr_processDLSegment(void *arg)
|
||||||
@@ -174,13 +159,9 @@ static void nr_processDLSegment(void *arg)
|
|||||||
NR_UE_DLSCH_t *dlsch = rdata->dlsch;
|
NR_UE_DLSCH_t *dlsch = rdata->dlsch;
|
||||||
NR_DL_UE_HARQ_t *harq_process= rdata->harq_process;
|
NR_DL_UE_HARQ_t *harq_process= rdata->harq_process;
|
||||||
t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms;
|
t_nrLDPC_dec_params *p_decoderParms = &rdata->decoderParms;
|
||||||
int Kr;
|
|
||||||
int K_bits_F;
|
|
||||||
int r = rdata->segment_r;
|
int r = rdata->segment_r;
|
||||||
int A = rdata->A;
|
|
||||||
int E = rdata->E;
|
int E = rdata->E;
|
||||||
int Qm = rdata->Qm;
|
int Qm = rdata->Qm;
|
||||||
//int rv_index = rdata->rv_index;
|
|
||||||
int r_offset = rdata->r_offset;
|
int r_offset = rdata->r_offset;
|
||||||
uint8_t kc = rdata->Kc;
|
uint8_t kc = rdata->Kc;
|
||||||
uint32_t Tbslbrm = rdata->Tbslbrm;
|
uint32_t Tbslbrm = rdata->Tbslbrm;
|
||||||
@@ -189,8 +170,8 @@ static void nr_processDLSegment(void *arg)
|
|||||||
int16_t z[68 * 384 + 16] __attribute__((aligned(16)));
|
int16_t z[68 * 384 + 16] __attribute__((aligned(16)));
|
||||||
int8_t l [68*384 + 16] __attribute__ ((aligned(16)));
|
int8_t l [68*384 + 16] __attribute__ ((aligned(16)));
|
||||||
|
|
||||||
Kr = harq_process->K;
|
const int Kr = harq_process->K;
|
||||||
K_bits_F = Kr-harq_process->F;
|
const int K_bits_F = Kr - harq_process->F;
|
||||||
|
|
||||||
t_nrLDPC_time_stats procTime = {0};
|
t_nrLDPC_time_stats procTime = {0};
|
||||||
|
|
||||||
@@ -265,6 +246,7 @@ static void nr_processDLSegment(void *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_IN);
|
//VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_LDPC, VCD_FUNCTION_IN);
|
||||||
|
uint32_t A = dlsch->dlsch_config.TBS;
|
||||||
p_decoderParms->E = lenWithCrc(harq_process->C, A);
|
p_decoderParms->E = lenWithCrc(harq_process->C, A);
|
||||||
p_decoderParms->crc_type = crcType(harq_process->C, A);
|
p_decoderParms->crc_type = crcType(harq_process->C, A);
|
||||||
rdata->decodeIterations =
|
rdata->decodeIterations =
|
||||||
@@ -331,26 +313,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
return(dlsch->max_ldpc_iterations + 1);
|
return(dlsch->max_ldpc_iterations + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*if (nr_slot_rx> (frame_parms->slots_per_frame-1)) {
|
|
||||||
printf("dlsch_decoding.c: Illegal slot index %d\n",nr_slot_rx);
|
|
||||||
return(dlsch->max_ldpc_iterations + 1);
|
|
||||||
}*/
|
|
||||||
/*if (harq_process->harq_ack.ack != 2) {
|
|
||||||
LOG_D(PHY, "[UE %d] DLSCH @ SF%d : ACK bit is %d instead of DTX even before PDSCH is decoded!\n",
|
|
||||||
phy_vars_ue->Mod_id, nr_slot_rx, harq_process->harq_ack.ack);
|
|
||||||
}*/
|
|
||||||
// nb_rb = dlsch->nb_rb;
|
|
||||||
/*
|
|
||||||
if (nb_rb > frame_parms->N_RB_DL) {
|
|
||||||
printf("dlsch_decoding.c: Illegal nb_rb %d\n",nb_rb);
|
|
||||||
return(max_ldpc_iterations + 1);
|
|
||||||
}*/
|
|
||||||
/*harq_pid = dlsch->current_harq_pid[proc->thread_id];
|
|
||||||
if (harq_pid >= 8) {
|
|
||||||
printf("dlsch_decoding.c: Illegal harq_pid %d\n",harq_pid);
|
|
||||||
return(max_ldpc_iterations + 1);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
nb_rb = dlsch->dlsch_config.number_rbs;
|
nb_rb = dlsch->dlsch_config.number_rbs;
|
||||||
uint32_t A = dlsch->dlsch_config.TBS;
|
uint32_t A = dlsch->dlsch_config.TBS;
|
||||||
ret = dlsch->max_ldpc_iterations + 1;
|
ret = dlsch->max_ldpc_iterations + 1;
|
||||||
@@ -359,8 +321,6 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
// target_code_rate is in 0.1 units
|
// target_code_rate is in 0.1 units
|
||||||
float Coderate = (float) dlsch->dlsch_config.targetCodeRate / 10240.0f;
|
float Coderate = (float) dlsch->dlsch_config.targetCodeRate / 10240.0f;
|
||||||
|
|
||||||
LOG_D(PHY,"%d.%d DLSCH Decoding, harq_pid %d TBS %d (%d) G %d nb_re_dmrs %d length dmrs %d mcs %d Nl %d nb_symb_sch %d nb_rb %d Qm %d Coderate %f\n",
|
|
||||||
frame,nr_slot_rx,harq_pid,A,A/8,G, nb_re_dmrs, dmrs_length, dlsch->dlsch_config.mcs, dlsch->Nl, nb_symb_sch, nb_rb, dlsch->dlsch_config.qamModOrder, Coderate);
|
|
||||||
decParams.BG = dlsch->dlsch_config.ldpcBaseGraph;
|
decParams.BG = dlsch->dlsch_config.ldpcBaseGraph;
|
||||||
unsigned int kc = decParams.BG == 2 ? 52 : 68;
|
unsigned int kc = decParams.BG == 2 ? 52 : 68;
|
||||||
|
|
||||||
@@ -426,11 +386,8 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
rdata->decoderParms = decParams;
|
rdata->decoderParms = decParams;
|
||||||
rdata->dlsch_llr = dlsch_llr;
|
rdata->dlsch_llr = dlsch_llr;
|
||||||
rdata->Kc = kc;
|
rdata->Kc = kc;
|
||||||
rdata->harq_pid = harq_pid;
|
|
||||||
rdata->segment_r = r;
|
rdata->segment_r = r;
|
||||||
rdata->nbSegments = harq_process->C;
|
|
||||||
rdata->E = E;
|
rdata->E = E;
|
||||||
rdata->A = A;
|
|
||||||
rdata->Qm = dlsch->dlsch_config.qamModOrder;
|
rdata->Qm = dlsch->dlsch_config.qamModOrder;
|
||||||
rdata->r_offset = r_offset;
|
rdata->r_offset = r_offset;
|
||||||
rdata->Kr_bytes = Kr_bytes;
|
rdata->Kr_bytes = Kr_bytes;
|
||||||
@@ -438,8 +395,7 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
rdata->Tbslbrm = dlsch->dlsch_config.tbslbrm;
|
rdata->Tbslbrm = dlsch->dlsch_config.tbslbrm;
|
||||||
rdata->offset = offset;
|
rdata->offset = offset;
|
||||||
rdata->dlsch = dlsch;
|
rdata->dlsch = dlsch;
|
||||||
rdata->dlsch_id = 0;
|
rdata->dlsch_id = harq_pid;
|
||||||
rdata->proc = *proc;
|
|
||||||
reset_meas(&rdata->ts_deinterleave);
|
reset_meas(&rdata->ts_deinterleave);
|
||||||
reset_meas(&rdata->ts_rate_unmatch);
|
reset_meas(&rdata->ts_rate_unmatch);
|
||||||
reset_meas(&rdata->ts_ldpc_decode);
|
reset_meas(&rdata->ts_ldpc_decode);
|
||||||
@@ -459,7 +415,26 @@ uint32_t nr_dlsch_decoding(PHY_VARS_NR_UE *phy_vars_ue,
|
|||||||
delNotifiedFIFO_elt(req);
|
delNotifiedFIFO_elt(req);
|
||||||
nbDecode--;
|
nbDecode--;
|
||||||
}
|
}
|
||||||
|
LOG_D(PHY,
|
||||||
|
"%d.%d DLSCH Decoded, harq_pid %d, round %d, result: %d TBS %d (%d) G %d nb_re_dmrs %d length dmrs %d mcs %d Nl %d "
|
||||||
|
"nb_symb_sch %d "
|
||||||
|
"nb_rb %d Qm %d Coderate %f\n",
|
||||||
|
frame,
|
||||||
|
nr_slot_rx,
|
||||||
|
harq_pid,
|
||||||
|
harq_process->DLround,
|
||||||
|
harq_process->decodeResult,
|
||||||
|
A,
|
||||||
|
A / 8,
|
||||||
|
G,
|
||||||
|
nb_re_dmrs,
|
||||||
|
dmrs_length,
|
||||||
|
dlsch->dlsch_config.mcs,
|
||||||
|
dlsch->Nl,
|
||||||
|
nb_symb_sch,
|
||||||
|
nb_rb,
|
||||||
|
dlsch->dlsch_config.qamModOrder,
|
||||||
|
Coderate);
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_DLSCH_COMBINE_SEG, VCD_FUNCTION_OUT);
|
||||||
ret = dlsch->last_iteration_cnt;
|
ret = dlsch->last_iteration_cnt;
|
||||||
return(ret);
|
return(ret);
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ typedef struct {
|
|||||||
/// codeword this transport block is mapped to
|
/// codeword this transport block is mapped to
|
||||||
uint8_t codeword;
|
uint8_t codeword;
|
||||||
/// HARQ-ACKs
|
/// HARQ-ACKs
|
||||||
uint8_t ack;
|
bool decodeResult;
|
||||||
/// Last index of LLR buffer that contains information.
|
/// Last index of LLR buffer that contains information.
|
||||||
/// Used for computing LDPC decoder R
|
/// Used for computing LDPC decoder R
|
||||||
int llrLen;
|
int llrLen;
|
||||||
|
|||||||
@@ -620,14 +620,11 @@ typedef struct LDPCDecode_ue_s {
|
|||||||
NR_UE_DLSCH_t *dlsch;
|
NR_UE_DLSCH_t *dlsch;
|
||||||
short* dlsch_llr;
|
short* dlsch_llr;
|
||||||
int dlsch_id;
|
int dlsch_id;
|
||||||
int harq_pid;
|
|
||||||
int rv_index;
|
int rv_index;
|
||||||
int A;
|
|
||||||
int E;
|
int E;
|
||||||
int Kc;
|
int Kc;
|
||||||
int Qm;
|
int Qm;
|
||||||
int Kr_bytes;
|
int Kr_bytes;
|
||||||
int nbSegments;
|
|
||||||
int segment_r;
|
int segment_r;
|
||||||
int r_offset;
|
int r_offset;
|
||||||
int offset;
|
int offset;
|
||||||
@@ -636,7 +633,6 @@ typedef struct LDPCDecode_ue_s {
|
|||||||
time_stats_t ts_deinterleave;
|
time_stats_t ts_deinterleave;
|
||||||
time_stats_t ts_rate_unmatch;
|
time_stats_t ts_rate_unmatch;
|
||||||
time_stats_t ts_ldpc_decode;
|
time_stats_t ts_ldpc_decode;
|
||||||
UE_nr_rxtx_proc_t proc;
|
|
||||||
} ldpcDecode_ue_t;
|
} ldpcDecode_ue_t;
|
||||||
|
|
||||||
static inline void start_meas_nr_ue_phy(PHY_VARS_NR_UE *ue, int meas_index) {
|
static inline void start_meas_nr_ue_phy(PHY_VARS_NR_UE *ue, int meas_index) {
|
||||||
|
|||||||
@@ -321,7 +321,8 @@ static void configure_dlsch(NR_UE_DLSCH_t *dlsch0,
|
|||||||
// dlsch0_harq->status not ACTIVE due to false retransmission
|
// dlsch0_harq->status not ACTIVE due to false retransmission
|
||||||
// Reset the following flag to skip PDSCH procedures in that case and retrasmit harq status
|
// Reset the following flag to skip PDSCH procedures in that case and retrasmit harq status
|
||||||
dlsch0->active = false;
|
dlsch0->active = false;
|
||||||
update_harq_status(mac, current_harq_pid, dlsch0_harq->ack);
|
LOG_W(NR_MAC, "dlsch0_harq->status not ACTIVE due to false retransmission harq pid: %d\n", current_harq_pid);
|
||||||
|
update_harq_status(mac, current_harq_pid, dlsch0_harq->decodeResult);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ void init_downlink_harq_status(NR_DL_UE_HARQ_t *dl_harq)
|
|||||||
dl_harq->status = SCH_IDLE;
|
dl_harq->status = SCH_IDLE;
|
||||||
dl_harq->first_rx = 1;
|
dl_harq->first_rx = 1;
|
||||||
dl_harq->DLround = 0;
|
dl_harq->DLround = 0;
|
||||||
dl_harq->ack = DL_ACKNACK_NO_SET;
|
dl_harq->decodeResult = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*******************************************************************
|
/*******************************************************************
|
||||||
|
|||||||
@@ -35,13 +35,7 @@
|
|||||||
|
|
||||||
/************** DEFINE ********************************************/
|
/************** DEFINE ********************************************/
|
||||||
|
|
||||||
#define NR_DEFAULT_DLSCH_HARQ_PROCESSES (8) /* TS 38.214 5.1 */
|
#define NR_DEFAULT_DLSCH_HARQ_PROCESSES (8) /* TS 38.214 5.1 */
|
||||||
|
|
||||||
#define DL_ACKNACK_NO_SET (2)
|
|
||||||
#define DL_NACK (0)
|
|
||||||
#define DL_ACK (1)
|
|
||||||
#define DL_DAI_NO_SET (0xFF)
|
|
||||||
#define UL_DAI_NO_SET (DL_DAI_NO_SET)
|
|
||||||
|
|
||||||
/************** INCLUDE *******************************************/
|
/************** INCLUDE *******************************************/
|
||||||
|
|
||||||
|
|||||||
@@ -137,10 +137,10 @@ void nr_fill_rx_indication(fapi_nr_rx_indication_t *rx_ind,
|
|||||||
if(dlsch0) {
|
if(dlsch0) {
|
||||||
NR_DL_UE_HARQ_t *dl_harq0 = &ue->dl_harq_processes[0][dlsch0->dlsch_config.harq_process_nbr];
|
NR_DL_UE_HARQ_t *dl_harq0 = &ue->dl_harq_processes[0][dlsch0->dlsch_config.harq_process_nbr];
|
||||||
rx->pdsch_pdu.harq_pid = dlsch0->dlsch_config.harq_process_nbr;
|
rx->pdsch_pdu.harq_pid = dlsch0->dlsch_config.harq_process_nbr;
|
||||||
rx->pdsch_pdu.ack_nack = dl_harq0->ack;
|
rx->pdsch_pdu.ack_nack = dl_harq0->decodeResult;
|
||||||
rx->pdsch_pdu.pdu = b;
|
rx->pdsch_pdu.pdu = b;
|
||||||
rx->pdsch_pdu.pdu_length = dlsch0->dlsch_config.TBS / 8;
|
rx->pdsch_pdu.pdu_length = dlsch0->dlsch_config.TBS / 8;
|
||||||
if (dl_harq0->ack) {
|
if (dl_harq0->decodeResult) {
|
||||||
int t = WS_C_RNTI;
|
int t = WS_C_RNTI;
|
||||||
if (pdu_type == FAPI_NR_RX_PDU_TYPE_RAR)
|
if (pdu_type == FAPI_NR_RX_PDU_TYPE_RAR)
|
||||||
t = WS_RA_RNTI;
|
t = WS_RA_RNTI;
|
||||||
|
|||||||
@@ -982,8 +982,8 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
NR_gNB_DLSCH_t *gNB_dlsch = &msgDataTx->dlsch[0][0];
|
NR_gNB_DLSCH_t *gNB_dlsch = &msgDataTx->dlsch[0][0];
|
||||||
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &gNB_dlsch->harq_process.pdsch_pdu.pdsch_pdu_rel15;
|
nfapi_nr_dl_tti_pdsch_pdu_rel15_t *rel15 = &gNB_dlsch->harq_process.pdsch_pdu.pdsch_pdu_rel15;
|
||||||
|
|
||||||
UE_harq_process->ack = 0;
|
UE_harq_process->decodeResult = false;
|
||||||
round = 0;
|
round = 0;
|
||||||
UE_harq_process->DLround = round;
|
UE_harq_process->DLround = round;
|
||||||
UE_harq_process->first_rx = 1;
|
UE_harq_process->first_rx = 1;
|
||||||
@@ -996,7 +996,7 @@ int main(int argc, char **argv)
|
|||||||
memset(Sched_INFO, 0, sizeof(*Sched_INFO));
|
memset(Sched_INFO, 0, sizeof(*Sched_INFO));
|
||||||
Sched_INFO->sched_response_id = -1;
|
Sched_INFO->sched_response_id = -1;
|
||||||
|
|
||||||
while ((round<num_rounds) && (UE_harq_process->ack==0)) {
|
while (round < num_rounds && !UE_harq_process->decodeResult) {
|
||||||
round_trials[round]++;
|
round_trials[round]++;
|
||||||
|
|
||||||
clear_nr_nfapi_information(RC.nrmac[0], 0, frame, slot, &Sched_INFO->DL_req, &Sched_INFO->TX_req, &Sched_INFO->UL_dci_req);
|
clear_nr_nfapi_information(RC.nrmac[0], 0, frame, slot, &Sched_INFO->DL_req, &Sched_INFO->TX_req, &Sched_INFO->UL_dci_req);
|
||||||
@@ -1178,7 +1178,8 @@ int main(int argc, char **argv)
|
|||||||
printf("errors_bit = %u (trial %d)\n", errors_bit, trial);
|
printf("errors_bit = %u (trial %d)\n", errors_bit, trial);
|
||||||
}
|
}
|
||||||
roundStats += ((float)round);
|
roundStats += ((float)round);
|
||||||
if (UE_harq_process->ack==1) effRate += ((float)TBS)/round;
|
if (UE_harq_process->decodeResult)
|
||||||
|
effRate += ((float)TBS) / round;
|
||||||
} // noise trials
|
} // noise trials
|
||||||
|
|
||||||
roundStats /= ((float)n_trials);
|
roundStats /= ((float)n_trials);
|
||||||
|
|||||||
@@ -277,7 +277,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
|||||||
v_return = -1;
|
v_return = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
harq_status->ack = DL_NACK;
|
harq_status->decodeResult = false;
|
||||||
|
|
||||||
printf("\n => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n");
|
printf("\n => Test : PUCCH format from common config in prach mode: one negative downlink ACKnowledgment \n");
|
||||||
|
|
||||||
@@ -308,7 +308,7 @@ int test_pucch_common_config_single_transport_block(PHY_VARS_NR_UE *ue, int gNB_
|
|||||||
v_return = -1;
|
v_return = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
harq_status->ack = DL_NACK;
|
harq_status->decodeResult = false;
|
||||||
|
|
||||||
printf("\n => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n");
|
printf("\n => Test : PUCCH format from common config in dedicated mode: one positive and one negative downlink ACKnowledgments \n");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user