Commit 283c5678 authored by Florian Kaltenberger's avatar Florian Kaltenberger

Merge remote-tracking branch 'oai-nr/ldpc_nos1_test' into oai_ue_mwc18_integration

Conflicts:
	openair1/PHY/CODING/ldpc_encoder.c
	openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
parents 0933c1c7 c14d2886
......@@ -176,14 +176,14 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,sh
int simd_size;
//determine number of bits in codeword
if (block_length>3840)
//if (block_length>3840)
{
BG=1;
Kb = 22;
nrows=46; //parity check bits
ncols=22; //info bits
}
else if (block_length<=3840)
/*else if (block_length<=3840)
{
BG=2;
nrows=42; //parity check bits
......@@ -197,7 +197,7 @@ int ldpc_encoder_optim(unsigned char *test_input,unsigned char *channel_input,sh
Kb = 8;
else
Kb = 6;
}
}*/
//find minimum value in all sets of lifting size
Zc=0;
......
......@@ -65,7 +65,7 @@ int32_t nr_segmentation(unsigned char *input_buffer,
// Find K+
Bprime_by_C = Bprime/(*C);
if (Bprime <=192) {
/*if (Bprime <=192) {
Kb = 6;
} else if (Bprime <=560) {
Kb = 8;
......@@ -73,9 +73,9 @@ int32_t nr_segmentation(unsigned char *input_buffer,
Kb = 9;
} else if (Bprime <=3840) {
Kb = 10;;
} else {
} else {*/
Kb = 22;
}
//}
if ((Bprime_by_C%Kb) > 0)
......@@ -141,8 +141,9 @@ else
*F = ((*C)*(*Kplus) - (Bprime));
//printf("final nr seg output Z %d Kplus %d F %d \n", *Zout, *Kplus, *F);
#ifdef DEBUG_SEGMENTATION
printf("final nr seg output Z %d Kplus %d F %d \n", *Zout, *Kplus, *F);
printf("C %d, Kplus %d, Kminus %d, Bprime_bytes %d, Bprime %d, F %d\n",*C,*Kplus,*Kminus,Bprime>>3,Bprime,*F);
#endif
......
......@@ -715,6 +715,10 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
#ifdef DEBUG_DLSCH_CODING
printf("start ldpc encoder segment %d/%d\n",r,dlsch->harq_processes[harq_pid]->C);
printf("input %d %d %d %d %d \n", dlsch->harq_processes[harq_pid]->c[r][0], dlsch->harq_processes[harq_pid]->c[r][1], dlsch->harq_processes[harq_pid]->c[r][2],dlsch->harq_processes[harq_pid]->c[r][3], dlsch->harq_processes[harq_pid]->c[r][4]);
/*for (int cnt =0 ; cnt < 22*(*pz); cnt ++){
printf("%d ", dlsch->harq_processes[harq_pid]->c[r][cnt]);
}*/
#endif
//ldpc_encoder((unsigned char*)dlsch->harq_processes[harq_pid]->c[r],&dlsch->harq_processes[harq_pid]->d[r][96],Kr,rate);
ldpc_encoder_optim((unsigned char*)dlsch->harq_processes[harq_pid]->c[r],(unsigned char*)&dlsch->harq_processes[harq_pid]->d[r][96],Kr,1,3,NULL,NULL,NULL,NULL);
......@@ -819,7 +823,7 @@ int dlsch_encoding_SIC(PHY_VARS_UE *ue,
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
A = dlsch->harq_processes[harq_pid]->TBS; //6228
printf("Encoder: A: %d\n",A);
//printf("Encoder: A: %d\n",A);
mod_order = get_Qm(dlsch->harq_processes[harq_pid]->mcs);
if(dlsch->harq_processes[harq_pid]->mimo_mode == TM7)
......
......@@ -573,11 +573,11 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
}
//}
for (int cnt =0; cnt < 8; cnt++){
/*for (int cnt =0; cnt < 8; cnt++){
printf("dr %d inv_d %d \n", harq_process->d[r][96+cnt], inv_d[cnt]);
}
printf(" \n");
printf(" \n");*/
/*printf("end dr \n");
for (int cnt =(50*p_decParams->Z-16) ; cnt < 50*p_decParams->Z; cnt++){
......@@ -627,7 +627,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
llrProcBuf,
p_procTime);
ret = no_iteration_ldpc;
//ret = no_iteration_ldpc;
nb_total_decod++;
if (no_iteration_ldpc > 5){
......@@ -650,11 +650,15 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#endif
//#ifdef DEBUG_DLSCH_DECODING
#ifdef DEBUG_DLSCH_DECODING
printf("output decoder %d %d %d %d %d \n", harq_process->c[r][0], harq_process->c[r][1], harq_process->c[r][2],harq_process->c[r][3], harq_process->c[r][4]);
printf("no_iterations_ldpc %d\n",no_iteration_ldpc);
write_output("dec_output.m","dec0",harq_process->c[0],Kr_bytes,1,4);
//#endif
/* for (int cnt =0 ; cnt < 22*p_decParams->Z; cnt ++){
printf("%d ", harq_process->c[r][cnt]);
}
printf("\n");*/
#endif
#if UE_TIMING_TRACE
......
This diff is collapsed.
......@@ -609,7 +609,7 @@ static void *UE_thread_rxn_txnp4(void *arg) {
#endif
// Prepare the future Tx data
#if 0
#if 1
if ((subframe_select( &UE->frame_parms, proc->subframe_tx) == SF_UL) ||
(UE->frame_parms.frame_type == FDD) )
if (UE->mode != loop_through_memory)
......
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