Commit c1963645 authored by hongzhi's avatar hongzhi

Merge branch 'ldpc_encoder_decoder' into oai_ue_mwc18_integration

parents a02683dc 13ecf0ec
......@@ -574,5 +574,5 @@ void phy_viterbi_dot11(int8_t *,uint8_t *,uint16_t);
//short *ldpc_decoder(short *msgChannel,short block_length,short No_iteration,double rate);
//short *ldpc_encoder(char *test_input,char* channel_input,short block_length,double rate);
int ldpc_encoder(unsigned char *test_input,unsigned char* channel_input,short block_length,double rate);
int ldpc_encoder_multi_segment(unsigned char **test_input,unsigned char **channel_input,short block_length,double rate,uint8_t n_segments);
#endif
This diff is collapsed.
......@@ -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)
......
......@@ -1037,7 +1037,7 @@ void phy_init_lte_ue__PDSCH( LTE_UE_PDSCH* const pdsch, const LTE_DL_FRAME_PARMS
AssertFatal( pdsch, "pdsch==0" );
pdsch->pmi_ext = (uint8_t*)malloc16_clear( fp->N_RB_DL );
pdsch->llr[0] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
pdsch->llr[0] = (int16_t*)malloc16_clear( (8*((3*8*8448)+12))*sizeof(int16_t) );
pdsch->llr128 = (int16_t**)malloc16_clear( sizeof(int16_t*) );
// FIXME! no further allocation for (int16_t*)pdsch->llr128 !!! expect SIGSEGV
// FK, 11-3-2015: this is only as a temporary pointer, no memory is stored there
......@@ -1198,7 +1198,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
(*pdsch_vars_th)[th_id][eNB_id]->llr_shifts = (uint8_t*)malloc16_clear(7*2*fp->N_RB_DL*12);
(*pdsch_vars_th)[th_id][eNB_id]->llr_shifts_p = (*pdsch_vars_th)[0][eNB_id]->llr_shifts;
(*pdsch_vars_th)[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
(*pdsch_vars_th)[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*8448)+12))*sizeof(int16_t) );
(*pdsch_vars_th)[th_id][eNB_id]->llr128_2ndstream = (int16_t**)malloc16_clear( sizeof(int16_t*) );
(*pdsch_vars_th)[th_id][eNB_id]->rho = (int32_t**)malloc16_clear( fp->nb_antennas_rx*sizeof(int32_t*) );
}
......@@ -1319,7 +1319,7 @@ int phy_init_lte_ue(PHY_VARS_UE *ue,
if (abstraction_flag == 0) {
for (th_id=0; th_id<RX_NB_TH_MAX; th_id++) {
phy_init_lte_ue__PDSCH( (*pdsch_vars_th)[th_id][eNB_id], fp );
(*pdsch_vars_th)[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
(*pdsch_vars_th)[th_id][eNB_id]->llr[1] = (int16_t*)malloc16_clear( (8*((3*8*8448)+12))*sizeof(int16_t) );
}
} else { //abstraction == 1
......@@ -1583,7 +1583,7 @@ int phy_init_lte_eNB(PHY_VARS_eNB *eNB,
}
} //eNB_id
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*6144)+12))*sizeof(int16_t) );
pusch_vars[UE_id]->llr = (int16_t*)malloc16_clear( (8*((3*8*8448)+12))*sizeof(int16_t) );
} // abstraction_flag
} //UE_id
......
......@@ -145,7 +145,7 @@ typedef struct {
/// Turbo-code outputs (36-212 V8.6 2009-03, p.12
uint8_t *d[MAX_NUM_DLSCH_SEGMENTS];//[(96+3+(3*6144))];
/// Sub-block interleaver outputs (36-212 V8.6 2009-03, p.16-17)
uint8_t w[MAX_NUM_DLSCH_SEGMENTS][3*6144];
uint8_t w[MAX_NUM_DLSCH_SEGMENTS][3*8448];
/// Number of code segments (for definition see 36-212 V8.6 2009-03, p.9)
uint32_t C;
/// Number of "small" code segments (for definition see 36-212 V8.6 2009-03, p.10)
......@@ -553,9 +553,9 @@ typedef struct {
/// MIMO mode for this DLSCH
MIMO_mode_t mimo_mode;
/// soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t w[MAX_NUM_DLSCH_SEGMENTS][3*(6144+64)];
int16_t w[MAX_NUM_DLSCH_SEGMENTS][3*(8448+64)];
/// for abstraction soft bits for each received segment ("w"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
double w_abs[MAX_NUM_DLSCH_SEGMENTS][3*(6144+64)];
double w_abs[MAX_NUM_DLSCH_SEGMENTS][3*(8448+64)];
/// soft bits for each received segment ("d"-sequence)(for definition see 36-212 V8.6 2009-03, p.15)
int16_t *d[MAX_NUM_DLSCH_SEGMENTS];
/// Number of code segments (for definition see 36-212 V8.6 2009-03, p.9)
......
......@@ -94,11 +94,11 @@ void free_eNB_dlsch(LTE_eNB_DLSCH_t *dlsch)
#endif
if (dlsch->harq_processes[i]->c[r]) {
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+1056);
dlsch->harq_processes[i]->c[r] = NULL;
}
if (dlsch->harq_processes[i]->d[r]) {
free16(dlsch->harq_processes[i]->d[r],(96+12+3+(3*6144)));
free16(dlsch->harq_processes[i]->d[r],(96+12+3+(3*8448)));
dlsch->harq_processes[i]->d[r] = NULL;
}
......@@ -189,16 +189,16 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,uint32_
if (abstraction_flag==0) {
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling; r++) {
// account for filler in first segment and CRCs for multiple segment case
dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(((r==0)?8:0) + 3+ 768);
dlsch->harq_processes[i]->d[r] = (uint8_t*)malloc16((96+12+3+(3*6144)));
dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(((r==0)?8:0) + 3+ 1056);
dlsch->harq_processes[i]->d[r] = (uint8_t*)malloc16((96+12+3+(3*8448)));
if (dlsch->harq_processes[i]->c[r]) {
bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 768);
bzero(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+ 1056);
} else {
printf("Can't get c\n");
exit_flag=2;
}
if (dlsch->harq_processes[i]->d[r]) {
bzero(dlsch->harq_processes[i]->d[r],(96+12+3+(3*6144)));
bzero(dlsch->harq_processes[i]->d[r],(96+12+3+(3*8448)));
} else {
printf("Can't get d\n");
exit_flag=2;
......@@ -582,6 +582,7 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
unsigned int Kr=0,Kr_bytes,r,r_offset=0;
unsigned short m=dlsch->harq_processes[harq_pid]->mcs;
uint8_t beamforming_mode=0;
uint8_t *d_tmp[MAX_NUM_DLSCH_SEGMENTS];
double rate = 0.33;
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_ENCODING, VCD_FUNCTION_IN);
......@@ -646,10 +647,11 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
&dlsch->harq_processes[harq_pid]->F);
#endif
printf("Encoder: B %d F %d harq_pid %d \n",dlsch->harq_processes[harq_pid]->B, dlsch->harq_processes[harq_pid]->F, harq_pid);
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
//printf("Encoder: B %d F %d \n",dlsch->harq_processes[harq_pid]->B, dlsch->harq_processes[harq_pid]->F);
#ifdef TD_DECODING
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
if (r<dlsch->harq_processes[harq_pid]->Cminus)
Kr = dlsch->harq_processes[harq_pid]->Kminus;
else
......@@ -691,17 +693,6 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
printf("Encoding ... iind %d f1 %d, f2 %d\n",iind,f1f2mat_old[iind*2],f1f2mat_old[(iind*2)+1]);
#endif
start_meas(te_stats);
/*printf("start turbo encoder kr %d kr>>3 %d\n", Kr, Kr>>3);
for (int tbc_counter = 0; tbc_counter< 8; tbc_counter++){
printf("turbo tbc number %d input %d\n",tbc_counter, dlsch->harq_processes[harq_pid]->c[r][tbc_counter]);
}*/
printf("start encoder kr %d kr>>3 %d segment %d total segments %d rate %.2f\n", Kr, Kr>>3, r, dlsch->harq_processes[harq_pid]->C,rate);
for (int tbs_counter = 0; tbs_counter< 8; tbs_counter++){
printf("%d ", dlsch->harq_processes[harq_pid]->c[r][tbs_counter]);
}
printf("end encoder \n");
#ifdef TD_DECODING
threegpplte_turbo_encoder(dlsch->harq_processes[harq_pid]->c[r],
......@@ -711,38 +702,47 @@ int dlsch_encoding(PHY_VARS_eNB *eNB,
f1f2mat_old[iind*2], // f1 (see 36121-820, page 14)
f1f2mat_old[(iind*2)+1] // f2 (see 36121-820, page 14)
);
stop_meas(te_stats);
}
#else
printf("start ldpc encoder\n");
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]);
//ldpc_encoder((char*)dlsch->harq_processes[harq_pid]->c[r],(char*)&dlsch->harq_processes[harq_pid]->d[r][96],dlsch->harq_processes[harq_pid]->B,rate);
ldpc_encoder((unsigned char*)dlsch->harq_processes[harq_pid]->c[r],&dlsch->harq_processes[harq_pid]->d[r][96],Kr,rate);
Kr = dlsch->harq_processes[harq_pid]->Kplus;
Kr_bytes = Kr>>3;
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
d_tmp[r] = &dlsch->harq_processes[harq_pid]->d[r][96];
#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]);
#endif
/*printf("end ldpc encoder -- output\n");
/*printf("output %d %d %d %d %d \n", dlsch->harq_processes[harq_pid]->d[r][96], dlsch->harq_processes[harq_pid]->d[r][96+1], dlsch->harq_processes[harq_pid]->d[r][96+2],dlsch->harq_processes[harq_pid]->d[r][96+3], dlsch->harq_processes[harq_pid]->d[r][96+4]);
for (int cnt =0 ; cnt < 66*(*pz); cnt ++){
printf("%d \n", dlsch->harq_processes[harq_pid]->d[r][96+cnt]);
//ldpc_encoder((unsigned char*)dlsch->harq_processes[harq_pid]->c[r],&dlsch->harq_processes[harq_pid]->d[r][96],Kr,rate);
}
start_meas(te_stats);
ldpc_encoder_multi_segment(dlsch->harq_processes[harq_pid]->c,d_tmp,Kr,rate,dlsch->harq_processes[harq_pid]->C);
stop_meas(te_stats);
#endif
/*printf("end ldpc encoder -- output\n");
}
printf("\n");*/
stop_meas(te_stats);
#ifdef DEBUG_DLSCH_CODING
if (r==0)
write_output("enc_output0.m","enc0",&dlsch->harq_processes[harq_pid]->d[r][96],(3*8*Kr_bytes)+12,1,4);
printf("output %d %d %d %d %d \n", dlsch->harq_processes[harq_pid]->d[r][96], dlsch->harq_processes[harq_pid]->d[r][96+1], dlsch->harq_processes[harq_pid]->d[r][96+2],dlsch->harq_processes[harq_pid]->d[r][96+3], dlsch->harq_processes[harq_pid]->d[r][96+4]);
for (int cnt =0 ; cnt < 66*(*pz); cnt ++){
printf("%d \n", dlsch->harq_processes[harq_pid]->d[r][96+cnt]);
}
printf("\n");*/
#ifdef DEBUG_DLSCH_CODING
write_output("enc_output0.m","enc0",&dlsch->harq_processes[harq_pid]->d[0][96],(3*8*Kr_bytes)+12,1,4);
#endif
start_meas(i_stats);
dlsch->harq_processes[harq_pid]->RTC[r] =
sub_block_interleaving_turbo(4+(Kr_bytes*8),
&dlsch->harq_processes[harq_pid]->d[r][96],
dlsch->harq_processes[harq_pid]->w[r]);
for (r=0; r<dlsch->harq_processes[harq_pid]->C; r++) {
dlsch->harq_processes[harq_pid]->RTC[r] =
sub_block_interleaving_turbo(4+(Kr_bytes*8),
&dlsch->harq_processes[harq_pid]->d[r][96],
dlsch->harq_processes[harq_pid]->w[r]);
}
stop_meas(i_stats);
}
}
......
......@@ -42,7 +42,7 @@
//#define DEBUG_DLSCH_DECODING
//#define TD_DECODING
#define OAI_LDPC_MAX_NUM_LLR 26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX
#define OAI_LDPC_MAX_NUM_LLR 27000//26112 // NR_LDPC_NCOL_BG1*NR_LDPC_ZMAX
static int8_t llrRes [OAI_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
static int8_t llrProcBuf[OAI_LDPC_MAX_NUM_LLR] __attribute__ ((aligned(32)));
......@@ -68,13 +68,13 @@ void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch)
}
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS; r++) {
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+768);
free16(dlsch->harq_processes[i]->c[r],((r==0)?8:0) + 3+1056);
dlsch->harq_processes[i]->c[r] = NULL;
}
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS; r++)
if (dlsch->harq_processes[i]->d[r]) {
free16(dlsch->harq_processes[i]->d[r],((3*8*6144)+12+96)*sizeof(short));
free16(dlsch->harq_processes[i]->d[r],((3*8*8448)+12+96)*sizeof(short));
dlsch->harq_processes[i]->d[r] = NULL;
}
......@@ -139,17 +139,17 @@ LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint32_t Nsoft,uint8_
if (abstraction_flag == 0) {
for (r=0; r<MAX_NUM_DLSCH_SEGMENTS/bw_scaling; r++) {
dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(((r==0)?8:0) + 3+ 768);
dlsch->harq_processes[i]->c[r] = (uint8_t*)malloc16(((r==0)?8:0) + 3+ 1056);
if (dlsch->harq_processes[i]->c[r])
memset(dlsch->harq_processes[i]->c[r],0,((r==0)?8:0) + 3+ 768);
memset(dlsch->harq_processes[i]->c[r],0,((r==0)?8:0) + 3+ 1056);
else
exit_flag=2;
dlsch->harq_processes[i]->d[r] = (short*)malloc16(((3*8*6144)+12+96)*sizeof(short));
dlsch->harq_processes[i]->d[r] = (short*)malloc16(((3*8*8448)+12+96)*sizeof(short));
if (dlsch->harq_processes[i]->d[r])
memset(dlsch->harq_processes[i]->d[r],0,((3*8*6144)+12+96)*sizeof(short));
memset(dlsch->harq_processes[i]->d[r],0,((3*8*8448)+12+96)*sizeof(short));
else
exit_flag=2;
}
......@@ -193,7 +193,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
uint16_t iind;
int32_t no_iteration_ldpc;
// uint8_t dummy_channel_output[(3*8*block_length)+12];
short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(6144+64)];
short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(8448+64)];
uint32_t r,r_offset=0,Kr,Kr_bytes,err_flag=0;
uint8_t crc_type;
t_nrLDPC_dec_params decParams;
......@@ -205,6 +205,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
//__m128i l;
int16_t inv_d [68*384];
int16_t *p_invd =&inv_d;
uint8_t kb, kc;
uint32_t i,j;
uint32_t k;
......@@ -212,11 +213,6 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
__m128i *pv = (__m128i*)&z;
__m128i *pl = (__m128i*)&l;
#ifdef DEBUG_DLSCH_DECODING
uint16_t i;
#endif
//#ifdef __AVX2__
#if 0
int Kr_last,skipped_last=0;
......@@ -355,11 +351,20 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
}
kb = harq_process->Kplus/harq_process->Z;
// p_decParams->Z = 128;
p_decParams->BG = 1;
p_decParams->R = 89;
if ( kb==22){
p_decParams->BG = 1;
p_decParams->R = 13;
kc = 68;}
else{
p_decParams->BG = 2;
p_decParams->R = 15;
kc = 52;
}
p_decParams->numMaxIter = 5;
Kr = p_decParams->Z*22;
Kr = p_decParams->Z*kb;
p_decParams->outMode= 0;
/*
......@@ -425,8 +430,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
else if (Kr_bytes <= 768)
iind = 123 + ((Kr_bytes-256)>>3);
else {
printf("dlsch_decoding: Illegal codeword size %d!!!\n",Kr_bytes);
return(dlsch->max_turbo_iterations);
//printf("dlsch_decoding: Illegal codeword size %d!!!\n",Kr_bytes);
//return(dlsch->max_turbo_iterations);
}
#ifdef DEBUG_DLSCH_DECODING
......@@ -436,7 +441,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#if UE_TIMING_TRACE
start_meas(dlsch_rate_unmatching_stats);
#endif
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
memset(&dummy_w[r][0],0,3*(8448+64)*sizeof(short));
harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t*) &dummy_w[r][0],
(r==0) ? harq_process->F : 0);
......@@ -554,16 +559,16 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
//66*p_decParams->Z
//if (A < 1000){
for (int cnt =0; cnt < 66*p_decParams->Z; cnt++){
for (int cnt =0; cnt < (kc-2)*p_decParams->Z; cnt++){
inv_d[cnt] = (-1)*harq_process->d[r][96+cnt];
}
//}
/*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++){
......@@ -595,13 +600,13 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
memset(pv,0,2*p_decParams->Z*sizeof(int16_t));
//memset(pl,0,2*p_decParams->Z*sizeof(int8_t));
for (i=2*p_decParams->Z/8, j = 0; i < (68*p_decParams->Z/8+1); i++, j++)
for (i=2*p_decParams->Z/8, j = 0; i < (kc*p_decParams->Z/8+1); i++, j++)
{
pv[i]= _mm_loadu_si128((__m128i*)(&inv_d[8*j]));
}
for (i=0, j=0; j < (68*p_decParams->Z/16); i+=2, j++)
for (i=0, j=0; j < (kc*p_decParams->Z/16); i+=2, j++)
{
pl[j] = _mm_packs_epi16(pv[i],pv[i+1]);
......@@ -612,7 +617,8 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
&pl[0],
llrProcBuf,
p_procTime);
ret = no_iteration_ldpc;
//ret = no_iteration_ldpc;
nb_total_decod++;
......@@ -620,8 +626,9 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
nb_error_decod++;
}
if (!nb_total_decod%10000){
printf("Error number of iteration LPDC %d %ld/%ld \n", no_iteration_ldpc, nb_error_decod,nb_total_decod);fflush(stdout);}
//if (!nb_total_decod%10000){
printf("Error number of iteration LPDC %d %ld/%ld \n", no_iteration_ldpc, nb_error_decod,nb_total_decod);fflush(stdout);
//}
//else
//printf("OK number of iteration LPDC %d\n", no_iteration_ldpc);
......@@ -633,13 +640,19 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
#endif
#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);
#endif
#if UE_TIMING_TRACE
stop_meas(dlsch_turbo_decoding_stats);
#endif
}
#else
#else //1
if ((harq_process->C == 1) ||
((r==harq_process->C-1) && (skipped_last==0))) { // last segment with odd number of segments
......@@ -785,7 +798,7 @@ uint32_t dlsch_decoding(PHY_VARS_UE *phy_vars_ue,
}
}
}
#endif
#endif //1
/*printf("Segmentation: C %d r %d, dlsch_rate_unmatching_stats %5.3f dlsch_deinterleaving_stats %5.3f dlsch_turbo_decoding_stats %5.3f \n",
harq_process->C,
......@@ -922,7 +935,7 @@ uint32_t dlsch_decoding_mthread(PHY_VARS_UE *phy_vars_ue,
uint32_t ret,offset;
uint16_t iind;
// uint8_t dummy_channel_output[(3*8*block_length)+12];
short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(6144+64)];
short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(8448+64)];
uint32_t r,r_offset=0,Kr,Kr_bytes,err_flag=0;
uint8_t crc_type;
//UE_rxtx_proc_t *proc = &phy_vars_ue->proc;
......@@ -1299,7 +1312,7 @@ if (harq_process->C>1) { // wakeup worker if more than 1 segment
#if UE_TIMING_TRACE
start_meas(dlsch_rate_unmatching_stats);
#endif
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
memset(&dummy_w[r][0],0,3*(8448+64)*sizeof(short));
harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t*) &dummy_w[r][0],
(r==0) ? harq_process->F : 0);
......@@ -1827,7 +1840,7 @@ uint32_t dlsch_decoding_2thread0(void *arg)
uint32_t ret,offset;
uint16_t iind;
// uint8_t dummy_channel_output[(3*8*block_length)+12];
short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(6144+64)];
short dummy_w[MAX_NUM_DLSCH_SEGMENTS][3*(8448+64)];
uint32_t r,r_offset=0,Kr,Kr_bytes,err_flag=0;
uint8_t crc_type;
uint8_t C;
......@@ -2059,7 +2072,7 @@ uint32_t dlsch_decoding_2thread0(void *arg)
#if UE_TIMING_TRACE
start_meas(dlsch_rate_unmatching_stats);
#endif
memset(&dummy_w[r][0],0,3*(6144+64)*sizeof(short));
memset(&dummy_w[r][0],0,3*(8448+64)*sizeof(short));
harq_process->RTC[r] = generate_dummy_w(4+(Kr_bytes*8),
(uint8_t*) &dummy_w[r][0],
(r==0) ? harq_process->F : 0);
......
This diff is collapsed.
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