Full Support for TM4 HARQ, excpept for PUSCH precoder at this moment.
This commit is contained in:
@@ -44,6 +44,7 @@
|
|||||||
#include "PHY/vars.h"
|
#include "PHY/vars.h"
|
||||||
#endif
|
#endif
|
||||||
#include "assertions.h"
|
#include "assertions.h"
|
||||||
|
//#define DEBUG_HARQ
|
||||||
|
|
||||||
//#define DEBUG_DCI
|
//#define DEBUG_DCI
|
||||||
|
|
||||||
@@ -1525,7 +1526,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
|||||||
dlsch1_harq->status = ACTIVE;
|
dlsch1_harq->status = ACTIVE;
|
||||||
dlsch0_harq->codeword=0;
|
dlsch0_harq->codeword=0;
|
||||||
dlsch1_harq->codeword=1;
|
dlsch1_harq->codeword=1;
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
printf("\n ENB: BOTH ACTIVE\n");
|
printf("\n ENB: BOTH ACTIVE\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (TB0_active && TB1_active && tbswap==1) {
|
else if (TB0_active && TB1_active && tbswap==1) {
|
||||||
dlsch0=dlsch[0];
|
dlsch0=dlsch[0];
|
||||||
@@ -1564,7 +1567,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
|||||||
dlsch1_harq->codeword = 0;
|
dlsch1_harq->codeword = 0;
|
||||||
dlsch0=NULL;
|
dlsch0=NULL;
|
||||||
dlsch0_harq = NULL;
|
dlsch0_harq = NULL;
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
printf("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
|
printf("\n ENB: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dlsch0 != NULL){
|
if (dlsch0 != NULL){
|
||||||
@@ -2800,8 +2805,15 @@ int generate_eNB_dlsch_params_from_dci(int frame,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// compute DL power control parameters
|
// compute DL power control parameters
|
||||||
|
if (dlsch0 != NULL){
|
||||||
computeRhoA_eNB(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off, frame_parms->nb_antennas_tx_eNB);
|
computeRhoA_eNB(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off, frame_parms->nb_antennas_tx_eNB);
|
||||||
computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[0],dlsch0_harq->dl_power_off);
|
computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[0],dlsch0_harq->dl_power_off);
|
||||||
|
}
|
||||||
|
if (dlsch1 != NULL){
|
||||||
|
computeRhoA_eNB(pdsch_config_dedicated, dlsch[1],dlsch1_harq->dl_power_off, frame_parms->nb_antennas_tx_eNB);
|
||||||
|
computeRhoB_eNB(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[1],dlsch1_harq->dl_power_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
@@ -4879,6 +4891,9 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
if ((rv2 == 1) && (mcs2 == 0)) {
|
if ((rv2 == 1) && (mcs2 == 0)) {
|
||||||
TB1_active=0;
|
TB1_active=0;
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
|
printf("[DCI UE]: TB0 status %d , TB1 status %d\n", TB0_active, TB1_active);
|
||||||
|
#endif
|
||||||
|
|
||||||
//printf("RV TB0 = %d\n", rv1);
|
//printf("RV TB0 = %d\n", rv1);
|
||||||
|
|
||||||
@@ -4898,7 +4913,9 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
dlsch1_harq->status = ACTIVE;
|
dlsch1_harq->status = ACTIVE;
|
||||||
dlsch0_harq->codeword=0;
|
dlsch0_harq->codeword=0;
|
||||||
dlsch1_harq->codeword=1;
|
dlsch1_harq->codeword=1;
|
||||||
//printf("\n UE: BOTH ACTIVE\n");
|
#ifdef DEBUG_HARQ
|
||||||
|
printf("[DCI UE]: BOTH ACTIVE\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else if (TB0_active && TB1_active && tbswap==1) {
|
else if (TB0_active && TB1_active && tbswap==1) {
|
||||||
dlsch0=dlsch[0];
|
dlsch0=dlsch[0];
|
||||||
@@ -4937,7 +4954,9 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
dlsch1_harq->codeword = 0;
|
dlsch1_harq->codeword = 0;
|
||||||
dlsch0=NULL;
|
dlsch0=NULL;
|
||||||
dlsch0_harq = NULL;
|
dlsch0_harq = NULL;
|
||||||
//printf("\n UE: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
|
#ifdef DEBUG_HARQ
|
||||||
|
printf("[DCI UE]: TB0 is deactivated, retransmit TB1 transmit in TM6\n");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -4990,7 +5009,9 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
dlsch1_harq->rb_alloc_odd[1]= dlsch1_harq->rb_alloc_even[1];
|
dlsch1_harq->rb_alloc_odd[1]= dlsch1_harq->rb_alloc_even[1];
|
||||||
dlsch1_harq->rb_alloc_odd[2]= dlsch1_harq->rb_alloc_even[2];
|
dlsch1_harq->rb_alloc_odd[2]= dlsch1_harq->rb_alloc_even[2];
|
||||||
dlsch1_harq->rb_alloc_odd[3]= dlsch1_harq->rb_alloc_even[3];
|
dlsch1_harq->rb_alloc_odd[3]= dlsch1_harq->rb_alloc_even[3];
|
||||||
dlsch1_harq->nb_rb = dlsch0_harq->nb_rb;
|
dlsch1_harq->nb_rb = conv_nprb(rah,
|
||||||
|
rballoc,
|
||||||
|
frame_parms->N_RB_DL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -5010,6 +5031,9 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
|
|
||||||
if (dlsch1_harq != NULL)
|
if (dlsch1_harq != NULL)
|
||||||
dlsch1_harq->Nl = 1;
|
dlsch1_harq->Nl = 1;
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
|
printf ("[DCI UE] tpmi = %d\n", tpmi);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
if ((dlsch0 != NULL) && (dlsch1 != NULL)){ //two CW active
|
if ((dlsch0 != NULL) && (dlsch1 != NULL)){ //two CW active
|
||||||
@@ -5112,7 +5136,10 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
|
printf("[DCI UE] harq1 MIMO mode = %d\n", dlsch1_harq->mimo_mode);
|
||||||
|
#endif
|
||||||
|
//printf(" UE DCI harq0 MIMO mode = %d\n", dlsch0_harq->mimo_mode);
|
||||||
if ((frame_parms->mode1_flag == 1) && (dlsch0_harq != NULL))
|
if ((frame_parms->mode1_flag == 1) && (dlsch0_harq != NULL))
|
||||||
dlsch0_harq->mimo_mode = SISO;
|
dlsch0_harq->mimo_mode = SISO;
|
||||||
|
|
||||||
@@ -5196,6 +5223,12 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
|
|
||||||
dlsch1->rnti = rnti;
|
dlsch1->rnti = rnti;
|
||||||
}
|
}
|
||||||
|
#ifdef DEBUG_HARQ
|
||||||
|
if (dlsch0 != NULL)
|
||||||
|
printf("[DCI UE] dlsch0_harq status = %d, dlsch1_harq status = %d\n", dlsch0_harq->status, dlsch1_harq->status);
|
||||||
|
else
|
||||||
|
printf("[DCI UE] dlsch1_harq status = %d\n", dlsch1_harq->status);
|
||||||
|
#endif
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -5869,11 +5902,19 @@ int generate_ue_dlsch_params_from_dci(int frame,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
dlsch[0]->active=1;
|
//dlsch[0]->active=1;
|
||||||
|
|
||||||
// compute DL power control parameters
|
// compute DL power control parameters
|
||||||
computeRhoA_UE(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off, frame_parms->nb_antennas_tx_eNB);
|
if (dlsch0_harq != NULL){
|
||||||
computeRhoB_UE(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[0],dlsch0_harq->dl_power_off);
|
computeRhoA_UE(pdsch_config_dedicated, dlsch[0],dlsch0_harq->dl_power_off, frame_parms->nb_antennas_tx_eNB);
|
||||||
|
computeRhoB_UE(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[0],dlsch0_harq->dl_power_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dlsch1_harq != NULL) {
|
||||||
|
computeRhoA_UE(pdsch_config_dedicated, dlsch[1],dlsch1_harq->dl_power_off, frame_parms->nb_antennas_tx_eNB);
|
||||||
|
computeRhoB_UE(pdsch_config_dedicated,&(frame_parms->pdsch_config_common),frame_parms->nb_antennas_tx_eNB,dlsch[1],dlsch1_harq->dl_power_off);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|||||||
Executable → Regular
+722
-697
File diff suppressed because it is too large
Load Diff
@@ -156,7 +156,7 @@ int allocate_REs_in_RB(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
|
|
||||||
uint8_t *x0 = NULL; //dlsch0_harq->e;
|
uint8_t *x0 = NULL; //dlsch0_harq->e;
|
||||||
MIMO_mode_t mimo_mode = dlsch0_harq->mimo_mode;
|
MIMO_mode_t mimo_mode;//= dlsch0_harq->mimo_mode;
|
||||||
|
|
||||||
int first_layer0; //= dlsch0_harq->first_layer;
|
int first_layer0; //= dlsch0_harq->first_layer;
|
||||||
int Nlayers0; // = dlsch0_harq->Nlayers;
|
int Nlayers0; // = dlsch0_harq->Nlayers;
|
||||||
@@ -1411,8 +1411,13 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
|
|
||||||
nsymb = (frame_parms->Ncp==0) ? 14:12;
|
nsymb = (frame_parms->Ncp==0) ? 14:12;
|
||||||
|
|
||||||
|
if (dlsch0 != NULL){
|
||||||
amp_rho_a = (int16_t)(((int32_t)amp*dlsch0->sqrt_rho_a)>>13); //amp=512 in full scale; dlsch0->sqrt_rho_a=8192in Q2.13, 1 in full scale
|
amp_rho_a = (int16_t)(((int32_t)amp*dlsch0->sqrt_rho_a)>>13); //amp=512 in full scale; dlsch0->sqrt_rho_a=8192in Q2.13, 1 in full scale
|
||||||
amp_rho_b = (int16_t)(((int32_t)amp*dlsch0->sqrt_rho_b)>>13);
|
amp_rho_b = (int16_t)(((int32_t)amp*dlsch0->sqrt_rho_b)>>13);
|
||||||
|
} else{
|
||||||
|
amp_rho_a = (int16_t)(((int32_t)amp*dlsch1->sqrt_rho_a)>>13);
|
||||||
|
amp_rho_b = (int16_t)(((int32_t)amp*dlsch1->sqrt_rho_b)>>13);
|
||||||
|
}
|
||||||
|
|
||||||
if (mod_order0 == 4)
|
if (mod_order0 == 4)
|
||||||
for (i=0; i<4; i++) {
|
for (i=0; i<4; i++) {
|
||||||
@@ -1445,6 +1450,7 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
// printf("num_pdcch_symbols %d, nsymb %d\n",num_pdcch_symbols,nsymb);
|
// printf("num_pdcch_symbols %d, nsymb %d\n",num_pdcch_symbols,nsymb);
|
||||||
for (l=num_pdcch_symbols; l<nsymb; l++) {
|
for (l=num_pdcch_symbols; l<nsymb; l++) {
|
||||||
|
|
||||||
|
if (dlsch0 != NULL ) {
|
||||||
#ifdef DEBUG_DLSCH_MODULATION
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
printf("Generating DLSCH (harq_pid %d,mimo %d, pmi_alloc0 %lx, mod0 %d, mod1 %d, rb_alloc[0] %d) in %d\n",
|
printf("Generating DLSCH (harq_pid %d,mimo %d, pmi_alloc0 %lx, mod0 %d, mod1 %d, rb_alloc[0] %d) in %d\n",
|
||||||
harq_pid,
|
harq_pid,
|
||||||
@@ -1455,6 +1461,7 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
rb_alloc[0],
|
rb_alloc[0],
|
||||||
len);
|
len);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
if (frame_parms->Ncp==0) { // normal prefix
|
if (frame_parms->Ncp==0) { // normal prefix
|
||||||
if ((l==4)||(l==11))
|
if ((l==4)||(l==11))
|
||||||
@@ -1611,9 +1618,11 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dlsch0_harq->Nlayers>1) {
|
if (dlsch0) {
|
||||||
msg("Nlayers %d: re_offset %d, symbol %d offset %d\n",dlsch0_harq->Nlayers,re_offset,l,symbol_offset);
|
if (dlsch0_harq->Nlayers>1) {
|
||||||
return(-1);
|
msg("Nlayers %d: re_offset %d, symbol %d offset %d\n",dlsch0_harq->Nlayers,re_offset,l,symbol_offset);
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (dlsch1) {
|
if (dlsch1) {
|
||||||
@@ -1639,6 +1648,17 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
|
|
||||||
if (rb_alloc_ind > 0) {
|
if (rb_alloc_ind > 0) {
|
||||||
// printf("Allocated rb %d/symbol %d, skip_half %d, subframe_offset %d, symbol_offset %d, re_offset %d, jj %d\n",rb,l,skip_half,subframe_offset,symbol_offset,re_offset,jj);
|
// printf("Allocated rb %d/symbol %d, skip_half %d, subframe_offset %d, symbol_offset %d, re_offset %d, jj %d\n",rb,l,skip_half,subframe_offset,symbol_offset,re_offset,jj);
|
||||||
|
if (dlsch0 != NULL) {
|
||||||
|
get_pmi_temp = get_pmi(frame_parms->N_RB_DL,
|
||||||
|
dlsch0->harq_processes[harq_pid]->mimo_mode,
|
||||||
|
dlsch0->harq_processes[harq_pid]->pmi_alloc,
|
||||||
|
rb);
|
||||||
|
} else
|
||||||
|
get_pmi_temp = get_pmi(frame_parms->N_RB_DL,
|
||||||
|
dlsch1->harq_processes[harq_pid]->mimo_mode,
|
||||||
|
dlsch1->harq_processes[harq_pid]->pmi_alloc,
|
||||||
|
rb);
|
||||||
|
|
||||||
|
|
||||||
allocate_REs_in_RB(frame_parms,
|
allocate_REs_in_RB(frame_parms,
|
||||||
txdataF,
|
txdataF,
|
||||||
@@ -1646,11 +1666,11 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
&jj2,
|
&jj2,
|
||||||
re_offset,
|
re_offset,
|
||||||
symbol_offset,
|
symbol_offset,
|
||||||
dlsch0->harq_processes[harq_pid],
|
(dlsch0 == NULL) ? NULL : dlsch0->harq_processes[harq_pid],
|
||||||
(dlsch1==NULL) ? NULL : dlsch1->harq_processes[harq_pid],
|
(dlsch1 == NULL) ? NULL : dlsch1->harq_processes[harq_pid],
|
||||||
pilots,
|
pilots,
|
||||||
((pilots) ? amp_rho_b : amp_rho_a),
|
((pilots) ? amp_rho_b : amp_rho_a),
|
||||||
get_pmi(frame_parms->N_RB_DL,dlsch0->harq_processes[harq_pid]->mimo_mode,dlsch0->harq_processes[harq_pid]->pmi_alloc,rb),
|
get_pmi_temp,
|
||||||
qam_table_s0,
|
qam_table_s0,
|
||||||
qam_table_s1,
|
qam_table_s1,
|
||||||
&re_allocated,
|
&re_allocated,
|
||||||
@@ -1672,7 +1692,11 @@ int dlsch_modulation(int32_t **txdataF,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG_DLSCH_MODULATION
|
#ifdef DEBUG_DLSCH_MODULATION
|
||||||
msg("generate_dlsch : jj = %d,re_allocated = %d (G %d)\n",jj,re_allocated,get_G(frame_parms,dlsch0_harq->nb_rb,dlsch0_harq->rb_alloc,mod_order0,Nl0,2,0,subframe_offset));
|
if (dlsch0 != NULL){
|
||||||
|
msg("generate_dlsch : jj = %d,re_allocated = %d (G %d)\n",jj,re_allocated,get_G(frame_parms,dlsch0_harq->nb_rb,dlsch0_harq->rb_alloc,mod_order0,Nl0,2,0,subframe_offset));
|
||||||
|
}else{
|
||||||
|
msg("generate_dlsch : jj = %d,re_allocated = %d (G %d)\n",jj,re_allocated,get_G(frame_parms,dlsch1_harq->nb_rb,dlsch1_harq->rb_alloc,mod_order1,Nl1,2,0,subframe_offset));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_OUT);
|
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME(VCD_SIGNAL_DUMPER_FUNCTIONS_ENB_DLSCH_MODULATION, VCD_FUNCTION_OUT);
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ double ratioPB[2][4]={{ 1.0,4.0/5.0,3.0/5.0,2.0/5.0},
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
double ratioPB[2][4]={{ 0.00000, -0.96910, -2.21849, -3.97940}, //in db
|
double ratioPB[2][4]={{ 0.00000, -0.96910, -2.21849, -3.97940}, //in db
|
||||||
{ 0.96910, 0.00000, -1.24939, -3.01030}};
|
{ 0.96910, 0.00000, -1.24939, -3.01030}};
|
||||||
|
|
||||||
double pa_values[8]={-6.0,-4.77,-3.0,-1.77,0.0,1.0,2.0,3.0}; //reported by higher layers
|
double pa_values[8]={-6.0,-4.77,-3.0,-1.77,0.0,1.0,2.0,3.0}; //reported by higher layers
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ double get_pa_dB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated)
|
|||||||
}
|
}
|
||||||
|
|
||||||
double computeRhoA_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
double computeRhoA_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
LTE_eNB_DLSCH_t *dlsch_eNB,int dl_power_off, uint8_t n_antenna_port){
|
LTE_eNB_DLSCH_t *dlsch_eNB, int dl_power_off, uint8_t n_antenna_port){
|
||||||
double rho_a_dB;
|
double rho_a_dB;
|
||||||
double sqrt_rho_a_lin;
|
double sqrt_rho_a_lin;
|
||||||
|
|
||||||
@@ -100,8 +100,8 @@ double computeRhoB_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
|||||||
double computeRhoA_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
double computeRhoA_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
LTE_UE_DLSCH_t *dlsch_ue,
|
LTE_UE_DLSCH_t *dlsch_ue,
|
||||||
unsigned char dl_power_off,
|
unsigned char dl_power_off,
|
||||||
uint8_t n_antenna_port
|
uint8_t n_antenna_port
|
||||||
){
|
){
|
||||||
|
|
||||||
double rho_a_dB;
|
double rho_a_dB;
|
||||||
double sqrt_rho_a_lin;
|
double sqrt_rho_a_lin;
|
||||||
|
|||||||
@@ -217,7 +217,7 @@ int32_t dlsch_modulation_SIC(int32_t **sic_buffer,
|
|||||||
uint8_t num_pdcch_symbols,
|
uint8_t num_pdcch_symbols,
|
||||||
LTE_eNB_DLSCH_t *dlsch0,
|
LTE_eNB_DLSCH_t *dlsch0,
|
||||||
LTE_eNB_DLSCH_t *dlsch1,
|
LTE_eNB_DLSCH_t *dlsch1,
|
||||||
int G);
|
int G);
|
||||||
/*
|
/*
|
||||||
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
|
\brief This function is the top-level routine for generation of the sub-frame signal (frequency-domain) for MCH.
|
||||||
@param txdataF Table of pointers for frequency-domain TX signals
|
@param txdataF Table of pointers for frequency-domain TX signals
|
||||||
@@ -720,15 +720,15 @@ int32_t dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
|
|
||||||
int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
int32_t dlsch_qpsk_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
int **rxdataF_comp,
|
int **rxdataF_comp,
|
||||||
int32_t **sic_buffer,
|
int32_t **sic_buffer,
|
||||||
int **rho_i,
|
int **rho_i,
|
||||||
short *dlsch_llr,
|
short *dlsch_llr,
|
||||||
uint8_t num_pdcch_symbols,
|
uint8_t num_pdcch_symbols,
|
||||||
uint16_t nb_rb,
|
uint16_t nb_rb,
|
||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
uint32_t rb_alloc,
|
uint32_t rb_alloc,
|
||||||
uint16_t mod_order_0,
|
uint16_t mod_order_0,
|
||||||
LTE_UE_DLSCH_t *dlsch0);
|
LTE_UE_DLSCH_t *dlsch0);
|
||||||
|
|
||||||
void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
int32_t **rxdataF_comp,
|
int32_t **rxdataF_comp,
|
||||||
@@ -753,30 +753,30 @@ void dlsch_16qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
*/
|
*/
|
||||||
void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
|
void dlsch_16qam_llr_SIC (LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
int32_t **rxdataF_comp,
|
int32_t **rxdataF_comp,
|
||||||
int32_t **sic_buffer, //Q15
|
int32_t **sic_buffer, //Q15
|
||||||
int32_t **rho_i,
|
int32_t **rho_i,
|
||||||
int16_t *dlsch_llr,
|
int16_t *dlsch_llr,
|
||||||
uint8_t num_pdcch_symbols,
|
uint8_t num_pdcch_symbols,
|
||||||
int32_t **dl_ch_mag,
|
int32_t **dl_ch_mag,
|
||||||
uint16_t nb_rb,
|
uint16_t nb_rb,
|
||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
uint32_t rb_alloc,
|
uint32_t rb_alloc,
|
||||||
uint16_t mod_order_0,
|
uint16_t mod_order_0,
|
||||||
LTE_UE_DLSCH_t *dlsch0);
|
LTE_UE_DLSCH_t *dlsch0);
|
||||||
|
|
||||||
void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
void dlsch_64qam_llr_SIC(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
int32_t **rxdataF_comp,
|
int32_t **rxdataF_comp,
|
||||||
int32_t **sic_buffer, //Q15
|
int32_t **sic_buffer, //Q15
|
||||||
int32_t **rho_i,
|
int32_t **rho_i,
|
||||||
int16_t *dlsch_llr,
|
int16_t *dlsch_llr,
|
||||||
uint8_t num_pdcch_symbols,
|
uint8_t num_pdcch_symbols,
|
||||||
int32_t **dl_ch_mag,
|
int32_t **dl_ch_mag,
|
||||||
int32_t **dl_ch_magb,
|
int32_t **dl_ch_magb,
|
||||||
uint16_t nb_rb,
|
uint16_t nb_rb,
|
||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
uint32_t rb_alloc,
|
uint32_t rb_alloc,
|
||||||
uint16_t mod_order_0,
|
uint16_t mod_order_0,
|
||||||
LTE_UE_DLSCH_t *dlsch0);
|
LTE_UE_DLSCH_t *dlsch0);
|
||||||
|
|
||||||
|
|
||||||
void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
void dlsch_64qam_llr(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
@@ -889,12 +889,12 @@ void dlsch_detection_mrc(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
uint8_t dual_stream_UE);
|
uint8_t dual_stream_UE);
|
||||||
|
|
||||||
void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
void dlsch_detection_mrc_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
||||||
int harq_pid,
|
int harq_pid,
|
||||||
int round,
|
int round,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
unsigned short nb_rb,
|
unsigned short nb_rb,
|
||||||
unsigned char dual_stream_UE);
|
unsigned char dual_stream_UE);
|
||||||
|
|
||||||
/** \fn dlsch_extract_rbs_single(int32_t **rxdataF,
|
/** \fn dlsch_extract_rbs_single(int32_t **rxdataF,
|
||||||
int32_t **dl_ch_estimates,
|
int32_t **dl_ch_estimates,
|
||||||
@@ -967,7 +967,7 @@ uint16_t dlsch_extract_rbs_dual(int32_t **rxdataF,
|
|||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
uint32_t high_speed_flag,
|
uint32_t high_speed_flag,
|
||||||
LTE_DL_FRAME_PARMS *frame_parms,
|
LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
MIMO_mode_t mimo_mode);
|
MIMO_mode_t mimo_mode);
|
||||||
|
|
||||||
/** \brief This function performs channel compensation (matched filtering) on the received RBs for this allocation. In addition, it computes the squared-magnitude of the channel with weightings for 16QAM/64QAM detection as well as dual-stream detection (cross-correlation)
|
/** \brief This function performs channel compensation (matched filtering) on the received RBs for this allocation. In addition, it computes the squared-magnitude of the channel with weightings for 16QAM/64QAM detection as well as dual-stream detection (cross-correlation)
|
||||||
@param rxdataF_ext Frequency-domain received signal in RBs to be demodulated
|
@param rxdataF_ext Frequency-domain received signal in RBs to be demodulated
|
||||||
@@ -1013,7 +1013,7 @@ void dlsch_dual_stream_correlationTM34(LTE_DL_FRAME_PARMS *frame_parms,
|
|||||||
int **dl_ch_estimates_ext_i,
|
int **dl_ch_estimates_ext_i,
|
||||||
int **dl_ch_rho_ext,
|
int **dl_ch_rho_ext,
|
||||||
unsigned char output_shift0,
|
unsigned char output_shift0,
|
||||||
unsigned char output_shift1);
|
unsigned char output_shift1);
|
||||||
|
|
||||||
void dlsch_channel_compensation_TM56(int **rxdataF_ext,
|
void dlsch_channel_compensation_TM56(int **rxdataF_ext,
|
||||||
int **dl_ch_estimates_ext,
|
int **dl_ch_estimates_ext,
|
||||||
@@ -1032,18 +1032,18 @@ void dlsch_channel_compensation_TM56(int **rxdataF_ext,
|
|||||||
|
|
||||||
|
|
||||||
void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
void dlsch_channel_compensation_TM34(LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
LTE_UE_PDSCH *lte_ue_pdsch_vars,
|
||||||
PHY_MEASUREMENTS *phy_measurements,
|
PHY_MEASUREMENTS *phy_measurements,
|
||||||
int eNB_id,
|
int eNB_id,
|
||||||
unsigned char symbol,
|
unsigned char symbol,
|
||||||
unsigned char mod_order0,
|
unsigned char mod_order0,
|
||||||
unsigned char mod_order1,
|
unsigned char mod_order1,
|
||||||
int harq_pid,
|
int harq_pid,
|
||||||
int round,
|
int round,
|
||||||
MIMO_mode_t mimo_mode,
|
MIMO_mode_t mimo_mode,
|
||||||
unsigned short nb_rb,
|
unsigned short nb_rb,
|
||||||
unsigned char output_shift0,
|
unsigned char output_shift0,
|
||||||
unsigned char output_shift1);
|
unsigned char output_shift1);
|
||||||
|
|
||||||
|
|
||||||
/** \brief This function computes the average channel level over all allocated RBs and antennas (TX/RX) in order to compute output shift for compensated signal
|
/** \brief This function computes the average channel level over all allocated RBs and antennas (TX/RX) in order to compute output shift for compensated signal
|
||||||
@@ -1061,13 +1061,13 @@ void dlsch_channel_level(int32_t **dl_ch_estimates_ext,
|
|||||||
|
|
||||||
|
|
||||||
void dlsch_channel_level_TM34(int **dl_ch_estimates_ext,
|
void dlsch_channel_level_TM34(int **dl_ch_estimates_ext,
|
||||||
LTE_DL_FRAME_PARMS *frame_parms,
|
LTE_DL_FRAME_PARMS *frame_parms,
|
||||||
unsigned char *pmi_ext,
|
unsigned char *pmi_ext,
|
||||||
int *avg_0,
|
int *avg_0,
|
||||||
int *avg_1,
|
int *avg_1,
|
||||||
uint8_t symbol,
|
uint8_t symbol,
|
||||||
unsigned short nb_rb,
|
unsigned short nb_rb,
|
||||||
MIMO_mode_t mimo_mode);
|
MIMO_mode_t mimo_mode);
|
||||||
|
|
||||||
|
|
||||||
void dlsch_channel_level_TM56(int32_t **dl_ch_estimates_ext,
|
void dlsch_channel_level_TM56(int32_t **dl_ch_estimates_ext,
|
||||||
@@ -1133,15 +1133,15 @@ uint32_t dlsch_decoding_emul(PHY_VARS_UE *phy_vars_ue,
|
|||||||
@param i_mod Modulation order of the interfering stream
|
@param i_mod Modulation order of the interfering stream
|
||||||
*/
|
*/
|
||||||
int32_t rx_pdsch(PHY_VARS_UE *phy_vars_ue,
|
int32_t rx_pdsch(PHY_VARS_UE *phy_vars_ue,
|
||||||
PDSCH_t type,
|
PDSCH_t type,
|
||||||
uint8_t eNB_id,
|
uint8_t eNB_id,
|
||||||
uint8_t eNB_id_i,
|
uint8_t eNB_id_i,
|
||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
uint8_t symbol,
|
uint8_t symbol,
|
||||||
uint8_t first_symbol_flag,
|
uint8_t first_symbol_flag,
|
||||||
RX_type_t rx_type,
|
RX_type_t rx_type,
|
||||||
uint8_t i_mod,
|
uint8_t i_mod,
|
||||||
uint8_t harq_pid);
|
uint8_t harq_pid);
|
||||||
|
|
||||||
int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
|
int32_t rx_pdcch(LTE_UE_COMMON *lte_ue_common_vars,
|
||||||
LTE_UE_PDCCH **lte_ue_pdcch_vars,
|
LTE_UE_PDCCH **lte_ue_pdcch_vars,
|
||||||
@@ -1437,7 +1437,7 @@ uint8_t subframe2harq_pid(LTE_DL_FRAME_PARMS *frame_parms,frame_t frame,uint8_t
|
|||||||
uint8_t subframe2harq_pid_eNBrx(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
|
uint8_t subframe2harq_pid_eNBrx(LTE_DL_FRAME_PARMS *frame_parms,uint8_t subframe);
|
||||||
|
|
||||||
int generate_ue_dlsch_params_from_dci(int frame,
|
int generate_ue_dlsch_params_from_dci(int frame,
|
||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
void *dci_pdu,
|
void *dci_pdu,
|
||||||
rnti_t rnti,
|
rnti_t rnti,
|
||||||
DCI_format_t dci_format,
|
DCI_format_t dci_format,
|
||||||
@@ -1692,11 +1692,11 @@ uint32_t pmi_extend(LTE_DL_FRAME_PARMS *frame_parms,uint8_t wideband_pmi, uint8_
|
|||||||
uint8_t get_pmi(uint8_t N_RB_DL,MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb);
|
uint8_t get_pmi(uint8_t N_RB_DL,MIMO_mode_t mode, uint32_t pmi_alloc,uint16_t rb);
|
||||||
|
|
||||||
int get_nCCE_offset_l1(int *CCE_table,
|
int get_nCCE_offset_l1(int *CCE_table,
|
||||||
const unsigned char L,
|
const unsigned char L,
|
||||||
const int nCCE,
|
const int nCCE,
|
||||||
const int common_dci,
|
const int common_dci,
|
||||||
const unsigned short rnti,
|
const unsigned short rnti,
|
||||||
const unsigned char subframe);
|
const unsigned char subframe);
|
||||||
|
|
||||||
uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi);
|
uint16_t get_nCCE(uint8_t num_pdcch_symbols,LTE_DL_FRAME_PARMS *frame_parms,uint8_t mi);
|
||||||
|
|
||||||
@@ -1758,22 +1758,22 @@ void generate_pucch_emul(PHY_VARS_UE *phy_vars_ue,
|
|||||||
|
|
||||||
|
|
||||||
uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
uint32_t rx_pucch(PHY_VARS_eNB *phy_vars_eNB,
|
||||||
PUCCH_FMT_t fmt,
|
PUCCH_FMT_t fmt,
|
||||||
uint8_t UE_id,
|
uint8_t UE_id,
|
||||||
uint16_t n1_pucch,
|
uint16_t n1_pucch,
|
||||||
uint16_t n2_pucch,
|
uint16_t n2_pucch,
|
||||||
uint8_t shortened_format,
|
uint8_t shortened_format,
|
||||||
uint8_t *payload,
|
uint8_t *payload,
|
||||||
int frame,
|
int frame,
|
||||||
uint8_t subframe,
|
uint8_t subframe,
|
||||||
uint8_t pucch1_thres);
|
uint8_t pucch1_thres);
|
||||||
|
|
||||||
int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
|
int32_t rx_pucch_emul(PHY_VARS_eNB *phy_vars_eNB,
|
||||||
uint8_t UE_index,
|
uint8_t UE_index,
|
||||||
PUCCH_FMT_t fmt,
|
PUCCH_FMT_t fmt,
|
||||||
uint8_t n1_pucch_sel,
|
uint8_t n1_pucch_sel,
|
||||||
uint8_t *payload,
|
uint8_t *payload,
|
||||||
uint8_t subframe);
|
uint8_t subframe);
|
||||||
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@@ -1865,18 +1865,19 @@ double get_pa_dB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated);
|
|||||||
|
|
||||||
double computeRhoA_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
double computeRhoA_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
LTE_eNB_DLSCH_t *dlsch_eNB,
|
LTE_eNB_DLSCH_t *dlsch_eNB,
|
||||||
int dl_power_off,
|
int dl_power_off,
|
||||||
uint8_t n_antenna_port);
|
uint8_t n_antenna_port);
|
||||||
|
|
||||||
double computeRhoB_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
double computeRhoB_eNB(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
PDSCH_CONFIG_COMMON *pdsch_config_common,
|
PDSCH_CONFIG_COMMON *pdsch_config_common,
|
||||||
uint8_t n_antenna_port,
|
uint8_t n_antenna_port,
|
||||||
LTE_eNB_DLSCH_t *dlsch_eNB,int dl_power_off);
|
LTE_eNB_DLSCH_t *dlsch_eNB,
|
||||||
|
int dl_power_off);
|
||||||
|
|
||||||
double computeRhoA_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
double computeRhoA_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
LTE_UE_DLSCH_t *dlsch_ue,
|
LTE_UE_DLSCH_t *dlsch_ue,
|
||||||
uint8_t dl_power_off,
|
uint8_t dl_power_off,
|
||||||
uint8_t n_antenna_port);
|
uint8_t n_antenna_port);
|
||||||
|
|
||||||
double computeRhoB_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
double computeRhoB_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
|
||||||
PDSCH_CONFIG_COMMON *pdsch_config_common,
|
PDSCH_CONFIG_COMMON *pdsch_config_common,
|
||||||
|
|||||||
+328
-271
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -46,7 +46,7 @@ static unsigned int seed, iy, ir[98];
|
|||||||
#define a 1664525lu
|
#define a 1664525lu
|
||||||
#define mod 4294967296.0 /* is 2**32 */
|
#define mod 4294967296.0 /* is 2**32 */
|
||||||
|
|
||||||
|
#if 1
|
||||||
void randominit(unsigned seed_init)
|
void randominit(unsigned seed_init)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -70,9 +70,10 @@ void randominit(unsigned seed_init)
|
|||||||
|
|
||||||
iy=1;
|
iy=1;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*void randominit(unsigned seed_init)
|
void randominit(unsigned seed_init)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
// this need to be integrated with the existing rng, like taus: navid
|
// this need to be integrated with the existing rng, like taus: navid
|
||||||
@@ -90,14 +91,14 @@ void randominit(unsigned seed_init)
|
|||||||
|
|
||||||
if (seed % 2 == 0) seed += 1; /* seed and mod are relative prime */
|
if (seed % 2 == 0) seed += 1; /* seed and mod are relative prime */
|
||||||
|
|
||||||
// for (i=1; i<=97; i++) {
|
for (i=1; i<=97; i++) {
|
||||||
// seed = a*seed; /* mod 2**32 */
|
seed = a*seed; /* mod 2**32 */
|
||||||
// ir[i]= seed; /* initialize the shuffle table */
|
ir[i]= seed; /* initialize the shuffle table */
|
||||||
// }
|
}
|
||||||
|
|
||||||
// iy=1;
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
iy=1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
/*!\brief Uniform linear congruential random number generator on \f$[0,1)\f$. Returns a double-precision floating-point number.*/
|
/*!\brief Uniform linear congruential random number generator on \f$[0,1)\f$. Returns a double-precision floating-point number.*/
|
||||||
|
|
||||||
double uniformrandom(void)
|
double uniformrandom(void)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ unsigned int taus(void)
|
|||||||
s2 = (((s2 & 0xFFFFFFF0) << 17)^ b);
|
s2 = (((s2 & 0xFFFFFFF0) << 17)^ b);
|
||||||
return s0 ^ s1 ^ s2;
|
return s0 ^ s1 ^ s2;
|
||||||
}
|
}
|
||||||
|
#if 1
|
||||||
void set_taus_seed(unsigned int seed_init)
|
void set_taus_seed(unsigned int seed_init)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -88,8 +88,10 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* void set_taus_seed(unsigned int seed_init)
|
#if 0
|
||||||
|
void set_taus_seed(unsigned int seed_init)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef USER_MODE
|
#ifdef USER_MODE
|
||||||
@@ -113,18 +115,17 @@ void set_taus_seed(unsigned int seed_init)
|
|||||||
s2 = (unsigned int)0xfe1a133e;
|
s2 = (unsigned int)0xfe1a133e;
|
||||||
#else
|
#else
|
||||||
// Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
// Use reentrant version of rand48 to ensure that no conflicts with other generators occur */
|
||||||
// srand48_r((long int)seed_init, &buffer);
|
srand48_r((long int)seed_init, &buffer);
|
||||||
// mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
// s0 = result;
|
s0 = result;
|
||||||
// mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
// s1 = result;
|
s1 = result;
|
||||||
// mrand48_r(&buffer, (long int *)&result);
|
mrand48_r(&buffer, (long int *)&result);
|
||||||
// s2 = result;
|
s2 = result;
|
||||||
//#endif
|
#endif
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user